Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,98 @@
|
||||
/* Metro module 15664; source: modules/quests/native/ATTModal/ATTManager.android.tsx; dependencies: [6, 7, 15, 17, 18, 7125, 1216, 4860, 2] */
|
||||
function _fun120097(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15872:6, offset: 0x02520c5b, size: 230 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun120101(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/ATTModal/ATTManager.android.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_120098() { // fn#120098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15872:148, offset: 0x02520d41, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_120098_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun120101(a0) { // fn#120101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15872:351, offset: 0x02520da3, size: 97 bytes, params: 2, frame: 16
|
||||
const closure = ATTManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'onPostConnectionOpen', value: value_120103}, {key: '_terminate', value: function() {
|
||||
if (this._openATTPrePromptOrFlowTimeoutId != null) {
|
||||
global.clearTimeout(this._openATTPrePromptOrFlowTimeoutId);
|
||||
this._openATTPrePromptOrFlowTimeoutId = null;
|
||||
}
|
||||
}}]);
|
||||
}
|
||||
|
||||
function ATTManager(a0) { // fn#120102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15872:363, offset: 0x02520e04, size: 153 bytes, params: 2, frame: 19
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, ATTManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_6(ATTManager);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_120098()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value._openATTPrePromptOrFlowTimeoutId = null;
|
||||
value.actions = {POST_CONNECTION_OPEN: value.onPostConnectionOpen};
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_120103() { // fn#120103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15872:748, offset: 0x02520e9d, size: 86 bytes, params: 1, frame: 12
|
||||
var value;
|
||||
var property;
|
||||
var moduleValue;
|
||||
var error;
|
||||
try {
|
||||
value = environment.__proto__;
|
||||
property = dependencyMap[5];
|
||||
moduleValue = require(property);
|
||||
moduleValue.fetchAdUser('post_connection_open');
|
||||
} catch (error) {
|
||||
value = importDefault(dependencyMap[6]);
|
||||
value.captureException(error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,796 @@
|
||||
/* Metro module 13523; source: modules/quests/native/AdVideoPlayer.tsx; dependencies: [57, 31, 27, 7030, 661, 33, 697, 8011, 4501, 674, 4017, 4577, 4581, 4504, 4507, 1239, 566, 477, 1216, 1585, 1244, 5278, 13524, 13526, 13528, 13529, 10234, 9376, 9554, 13530, 13531, 2] */
|
||||
function _fun102796(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:6, offset: 0x02248c8c, size: 1300 bytes, params: 8, frame: 30
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.View;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const env0_6 = value2.Pressable;
|
||||
const env0_7 = value2.ActivityIndicator;
|
||||
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_9 = constantsModule.AppStates;
|
||||
const env0_10 = constantsModule.ComponentActions;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value4.jsx;
|
||||
const env0_12 = value4.jsxs;
|
||||
object2 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.left = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.right = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.top = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.bottom = PX_16;
|
||||
const env0_14 = value.memo(importDefault(8011) /* metro dependency 8011 */);
|
||||
object2 = {code: 'function hasVideoEnded_AdVideoPlayerTsx1(currentTime,videoDuration){return currentTime>=videoDuration-1;}'};
|
||||
const value5 = _fun102798();
|
||||
const closure = y_102800;
|
||||
closure.__closure = {hasVideoEnded: value5};
|
||||
closure.__workletHash = 16693292055973;
|
||||
closure.__initData = {code: 'function AdVideoPlayerTsx2(currentTime,maxTimestamp,videoDuration,allowUnrestrictedSeeking){const{hasVideoEnded}=this.__closure;return!hasVideoEnded(currentTime,videoDuration)&&(allowUnrestrictedSeeking||currentTime<=maxTimestamp-1);}'};
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
const object5 = {};
|
||||
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
|
||||
object2.container = object5;
|
||||
const object8 = {};
|
||||
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object8['backgroundColor'] = BACKGROUND_BASE_LOWEST;
|
||||
object8['justifyContent'] = 'center';
|
||||
object8['alignItems'] = 'center';
|
||||
object2.loadingContainer = object8;
|
||||
object2.bufferingSpinner = {position: 'absolute'};
|
||||
const object9 = {};
|
||||
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
|
||||
object9['justifyContent'] = 'center';
|
||||
object9['alignItems'] = 'center';
|
||||
object2.bufferingSpinnerCentered = object9;
|
||||
object2.video = {'height': '100%', 'width': '100%'};
|
||||
object2.videoContainer = {'position': 'relative', 'height': '100%', 'width': '100%'};
|
||||
const object10 = {};
|
||||
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
|
||||
const value7 = importDefault(674) /* metro dependency 674 */;
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
|
||||
const value9 = value7(BLACK).alpha(0.5);
|
||||
object10['backgroundColor'] = value9.hex();
|
||||
object10['justifyContent'] = 'center';
|
||||
object10['alignItems'] = 'center';
|
||||
object10['flexDirection'] = 'column';
|
||||
object2.controls = object10;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.controlsTopBottom = {'flexDirection': 'row', 'justifyContent': 'flex-end', 'padding': null,
|
||||
'position': 'absolute', 'left': 0, 'right': 0, padding: PX_8};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.controlsMiddle = {'justifyContent': 'center', 'alignItems': 'center', 'flexGrow': 1, 'flexDirection': 'row',
|
||||
'gap': null, 'pointerEvents': 'box-none', gap: PX_24};
|
||||
object2.controlsTop = {top: 0};
|
||||
object2.controlsBottom = {bottom: 0};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.progressContainer = {'position': 'absolute', 'bottom': 0, 'right': 0, 'left': 0,
|
||||
'justifyContent': 'flex-end', 'height': null, 'overflow': 'hidden', height: PX_16};
|
||||
const object11 = {'height': 1, 'backgroundColor': null, 'shadowOffset': null, 'shadowRadius': 6, 'shadowOpacity': 1,
|
||||
'elevation': 5};
|
||||
let WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object11.backgroundColor = WHITE;
|
||||
object11.shadowOffset = {'width': 0, 'height': 0};
|
||||
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object11.shadowColor = WHITE;
|
||||
object2.progress = object11;
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object2.icon = {color: TEXT_DEFAULT};
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object2.iconDisabled = {color: TEXT_SUBTLE};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.controlButton = {padding: PX_8};
|
||||
const env0_18 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
const env0_21 = {code: 'function AdVideoPlayerTsx3(){const{hasLoaded,hideControls,showControls,playerState,PlayerState,isVideoEnded}=this.__closure;return hasLoaded&&!hideControls&&(showControls.get()||playerState===PlayerState.PAUSED||playerState===PlayerState.ENDED||playerState===PlayerState.ERRORED||isVideoEnded);}'};
|
||||
const env0_22 = {code: "function AdVideoPlayerTsx4(){const{shouldShowControls,withSpring,SUBTLE_SPRING}=this.__closure;const show=shouldShowControls();return{opacity:withSpring(show?1:0,SUBTLE_SPRING),pointerEvents:show?'auto':'none'};}"};
|
||||
const env0_23 = {code: 'function AdVideoPlayerTsx5(){const{withTiming,progressSharedValue,timingFast}=this.__closure;return{width:withTiming(progressSharedValue.get()*100+"%",timingFast,\'animate-always\')};}'};
|
||||
value = value.memo(_fun102801);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/AdVideoPlayer.tsx');
|
||||
exports.PlayerState = {PAUSED: 'paused', PLAYING: 'playing', ENDED: 'ended', LOADING: 'loading', ERRORED: 'errored'};
|
||||
exports.PlaybackTriggerSource = {USER_INTERACTION: 'USER_INTERACTION', SYSTEM_INITIATED: 'SYSTEM_INITIATED',
|
||||
IMPERATIVE_API: 'IMPERATIVE_API'};
|
||||
exports.AdVideoPlayer = value;
|
||||
}
|
||||
|
||||
function getSafeAreaInsetOrPadding(a0, a1) { // fn#102797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:374, offset: 0x022491a0, size: 42 bytes, params: 3, frame: 14
|
||||
const Math = global.Math;
|
||||
return Math.max(a0[a1], env0_13[a1]);
|
||||
}
|
||||
|
||||
function _fun102798() { // fn#102798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:584, offset: 0x022491ca, size: 48 bytes, params: 1, frame: 2
|
||||
const closure = function(a0, a1) {
|
||||
return a0 >= a1 - 1;
|
||||
};
|
||||
closure.__closure = {};
|
||||
closure.__workletHash = 8992945176371;
|
||||
closure.__initData = env0_15;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function y_102800(a0, a1, a2, a3) { // fn#102800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:1014, offset: 0x0224920d, size: 52 bytes, params: 5, frame: 14
|
||||
return !env0_16(a0, a2) && (a3 || a0 <= a1 - 1);
|
||||
}
|
||||
|
||||
function _fun102801({source, initialProgress, contentDuration, allowUnrestrictedSeeking, disableResumeOnLoad, style, isFullscreen, externallyPaused, contentInsets, captionsEnabled, onToggleCaptions, onOpenTranscript, onToggleFullscreen, renderCaptions, onLoadStart, onLoad, onReadyForDisplay, onProgress, onSeek, onBuffer, onError, onEnd, onPlayerStateChange, onPausePlayback, onResumePlayback, onVideoTracks, onVideoLayout, videoRef, bufferingSpinnerPlacement, showCaptionsButton, showTranscriptButton, showFullscreenButton, showProgress, showSkipButtons, hideControls, httpEngine, automaticallyWaitsToMinimizeStalling, repeat, ref}) { // fn#102801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:3495, offset: 0x02249241, size: 4363 bytes, params: 2, frame: 74
|
||||
var r25;
|
||||
var r24;
|
||||
var getSafeAreaInsetOrPaddingBinding;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
var items7;
|
||||
const VideoQuestPlayerControlButton = (require(13528) /* metro dependency 13528: VideoQuestPlayerControlButton */).VideoQuestPlayerControlButton;
|
||||
contentDuration = contentDuration === undefined ? 0 : contentDuration;
|
||||
allowUnrestrictedSeeking = !(allowUnrestrictedSeeking === undefined) && allowUnrestrictedSeeking;
|
||||
disableResumeOnLoad = !(disableResumeOnLoad === undefined) && disableResumeOnLoad;
|
||||
captionsEnabled = !(captionsEnabled === undefined) && captionsEnabled;
|
||||
const env0_3 = onLoadStart;
|
||||
const env0_4 = onLoad;
|
||||
bufferingSpinnerPlacement = bufferingSpinnerPlacement === undefined ? 'top-left' : bufferingSpinnerPlacement;
|
||||
showCaptionsButton = !(showCaptionsButton === undefined) && showCaptionsButton;
|
||||
showTranscriptButton = !(showTranscriptButton === undefined) && showTranscriptButton;
|
||||
showFullscreenButton = !(showFullscreenButton === undefined) && showFullscreenButton;
|
||||
showProgress = !(showProgress === undefined) && showProgress;
|
||||
showSkipButtons = showSkipButtons === undefined || showSkipButtons;
|
||||
hideControls = !(hideControls === undefined) && hideControls;
|
||||
repeat = !(repeat === undefined) && repeat;
|
||||
const env0_14 = repeat;
|
||||
const styles = useStyles();
|
||||
let binding = env0_4;
|
||||
const r58 = videoRef ?? binding.useRef(null);
|
||||
binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value16 = Reflect.apply(useState, binding, [contentDuration]);
|
||||
const binding2 = env0_3;
|
||||
const value17 = binding2(value16, 2);
|
||||
const property = value17[0];
|
||||
const env0_16 = property;
|
||||
const env0_17 = value17[1];
|
||||
useState = binding.useState;
|
||||
let object = {};
|
||||
copyDataProperties(object, initialProgress, undefined);
|
||||
const value19 = binding2(Reflect.apply(useState, binding, [object]), 2);
|
||||
const property2 = value19[0];
|
||||
const env0_19 = value19[1];
|
||||
useState = binding.useState;
|
||||
const LOADING = env0_19.LOADING;
|
||||
const value20 = binding2(Reflect.apply(useState, binding, [LOADING]), 2);
|
||||
const property3 = value20[0];
|
||||
const env0_21 = value20[1];
|
||||
useState = binding.useState;
|
||||
const value21 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property4 = value21[0];
|
||||
const env0_22 = property4;
|
||||
const env0_23 = value21[1];
|
||||
const env0_24 = binding.useRef(null);
|
||||
const env0_25 = binding.useRef(0);
|
||||
let useCallback = binding.useCallback;
|
||||
const value22 = Reflect.apply(useCallback, binding, [_fun102802, [onPlayerStateChange]]);
|
||||
const r34 = property4 && property3 === env0_19.ENDED && env0_16(property2.timestampSec, property2.duration);
|
||||
const value25 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
let closure = shouldShowControls;
|
||||
binding = env0_19;
|
||||
closure.__closure = {hasLoaded: property4, hideControls: hideControls, showControls: value25,
|
||||
playerState: property3, PlayerState: binding, isVideoEnded: r34};
|
||||
closure.__workletHash = 6484184524579;
|
||||
closure.__initData = env0_21;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure2 = he_102804;
|
||||
object = {shouldShowControls: closure};
|
||||
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
|
||||
object.SUBTLE_SPRING = SUBTLE_SPRING;
|
||||
closure2.__closure = object;
|
||||
closure2.__workletHash = 311315682972;
|
||||
closure2.__initData = env0_22;
|
||||
const value26 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure2]);
|
||||
const value27 = closure();
|
||||
const value28 = reanimatedRexportModule.useSharedValue(0);
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue4.useAnimatedStyle;
|
||||
closure = pe;
|
||||
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
|
||||
progressSharedValue: value28, timingFast: (require(4507) /* metro dependency 4507: timingPresets */).timingFast};
|
||||
closure.__workletHash = 11793601648786;
|
||||
closure.__initData = env0_23;
|
||||
const value29 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
|
||||
const binding3 = env0_4;
|
||||
const env0_31 = binding3.useRef(-1);
|
||||
const value30 = binding3.useCallback(function(a0) {
|
||||
var env0_0 = a0;
|
||||
return _fun102807;
|
||||
}, [value25]);
|
||||
const value31 = binding3.useCallback(_fun102809, []);
|
||||
const [property5, env0_33] = env0_3(binding3.useState(false), 2);
|
||||
const value34 = binding3.useCallback(_fun102811, [onReadyForDisplay]);
|
||||
const value35 = binding3.useCallback(_fun102812, [allowUnrestrictedSeeking, property2.duration,
|
||||
property2.maxTimestampSec, r58]);
|
||||
binding3.useImperativeHandle(ref, function() {
|
||||
return {seekToStart: _fun102814, play: _fun102815, pause: _fun102816};
|
||||
}, [value35, property3, value22, onResumePlayback, onPausePlayback]);
|
||||
useCallback = binding3.useCallback;
|
||||
object = [r58];
|
||||
object[1] = initialProgress.timestampSec;
|
||||
object[2] = disableResumeOnLoad;
|
||||
object[3] = value22;
|
||||
object[4] = onLoad;
|
||||
object[5] = value35;
|
||||
const value36 = Reflect.apply(useCallback, binding3, [_fun102817, object]);
|
||||
const value37 = binding3.useCallback(_fun102818, [property3, onPausePlayback, onResumePlayback, r34, value22,
|
||||
value35]);
|
||||
const value38 = binding3.useCallback(_fun102819, [value37]);
|
||||
const env0_36 = binding3.useRef(false);
|
||||
binding3.useEffect(_fun102822, [binding3.useCallback(_fun102820, [property3, value22, onPausePlayback]),
|
||||
binding3.useCallback(_fun102821, [property3, value22, onResumePlayback])]);
|
||||
const value41 = binding3.useCallback(_fun102824, [value25, value37]);
|
||||
const value42 = binding3.useCallback(_fun102825, [property, value28, onSeek, value31, r58]);
|
||||
let ERRORED = binding.ERRORED;
|
||||
const r33 = property3 === ERRORED || !y_102800(property2.timestampSec, property2.maxTimestampSec,
|
||||
property2.duration, allowUnrestrictedSeeking);
|
||||
binding = env0_4;
|
||||
const value45 = binding.useCallback(_fun102826, [value35, property, value28, r33]);
|
||||
useCallback = binding.useCallback;
|
||||
const value46 = value30(Reflect.apply(useCallback, binding, [_fun102827, [value35, property, value28, property3,
|
||||
value22]]));
|
||||
const value47 = value30(value45);
|
||||
const value48 = binding.useCallback(_fun102828, [value28, value31, onProgress]);
|
||||
const value49 = binding.useCallback(_fun102829, [value22, onEnd, repeat]);
|
||||
const value50 = binding.useCallback(_fun102830, [value22, onLoadStart]);
|
||||
const value51 = binding.useCallback(_fun102831, [value22, onError]);
|
||||
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
|
||||
return AppStateStore.getState();
|
||||
});
|
||||
const ACTIVE = AppStates.ACTIVE;
|
||||
const value52 = state === ACTIVE;
|
||||
binding.useLayoutEffect(_fun102833, [r58]);
|
||||
let r32 = value52 ? property3 === env0_19.PAUSED : !value52;
|
||||
r32 = !r32 ? property3 === env0_19.LOADING : r32;
|
||||
r32 = !r32 ? externallyPaused : r32;
|
||||
const {isBuffering, toggleBuffering} = useBufferingState({onBuffer: onBuffer});
|
||||
binding = env0_4;
|
||||
const value57 = binding.useCallback(_fun102837, [toggleBuffering, property3]);
|
||||
const value58 = binding.useCallback(_fun102838, [toggleBuffering]);
|
||||
const value59 = binding.useCallback(_fun102839, [toggleBuffering]);
|
||||
const value60 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
let r22 = isFullscreen && value60 != null;
|
||||
if (r22) {
|
||||
object = {};
|
||||
getSafeAreaInsetOrPaddingBinding = getSafeAreaInsetOrPadding;
|
||||
object.paddingRight = getSafeAreaInsetOrPaddingBinding(value60, 'right');
|
||||
object.paddingLeft = getSafeAreaInsetOrPaddingBinding(value60, 'left');
|
||||
r22 = object;
|
||||
}
|
||||
const items2 = [styles.container, style];
|
||||
const pressableBindingProps = {style: [styles.videoContainer], onPress: value41, accessible: !value27};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
pressableBindingProps.accessibilityLabel = Reflect.apply(string, intl, [r32 ? t.R3aFPe : t.fTMEUi]);
|
||||
ERRORED = env0_19.ERRORED;
|
||||
const items3 = [property3 !== ERRORED && ((Component) => <Component mixWithOthers="inherit" httpEngine={httpEngine} automaticallyWaitsToMinimizeStalling={automaticallyWaitsToMinimizeStalling} ref={r58} accessible={false} importantForAccessibility="no-hide-descendants" accessibilityRole="none" style={styles.video} paused={r32} repeat={repeat} source={source} onBuffer={value57} onPlaybackStalled={value58} onPlaybackResume={value59} onLoad={value36} onSeek={value42} onProgress={value48} onLoadStart={value50} onEnd={value49} onError={value51} onReadyForDisplay={value34} onVideoTracks={onVideoTracks} onLayout={onVideoLayout} resizeMode="contain" />)(env0_14)];
|
||||
items3[1] = renderCaptions?.(property2.timestampSec);
|
||||
items3[2] = isBuffering && <ActivityIndicator animating style={[styles.bufferingSpinner,
|
||||
isFullscreen || bufferingSpinnerPlacement === 'center' ? styles.bufferingSpinnerCentered : {top: contentInsets?.top ?? 0,
|
||||
left: contentInsets?.left ?? 0}]} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE} />;
|
||||
items3[3] = !property5 && <View style={styles.loadingContainer}><ActivityIndicator animating /></View>;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items5 = [styles.controls, value26];
|
||||
let r18 = showCaptionsButton || showTranscriptButton;
|
||||
if (r18) {
|
||||
var viewProps = {style: [styles.controlsTopBottom, styles.controlsTop, r22]};
|
||||
items7 = [showCaptionsButton && <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bDSZO1)} onPress={onToggleCaptions} style={styles.controlButton}>{((ClosedCaptionsOutlineIcon) => <ClosedCaptionsOutlineIcon color={captionsEnabled ? styles.icon.color : styles.iconDisabled.color} />)((require(13524) /* metro dependency 13524: ClosedCaptionsOutlineIcon */).ClosedCaptionsOutlineIcon)}</PressableOpacity>];
|
||||
items7[1] = showTranscriptButton && <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.KCzjTi)} onPress={onOpenTranscript} style={styles.controlButton}>{((TranscriptOutlineIcon) => <TranscriptOutlineIcon color={styles.iconDisabled.color} />)((require(13526) /* metro dependency 13526: TranscriptOutlineIcon */).TranscriptOutlineIcon)}</PressableOpacity>;
|
||||
r18 = <View {...viewProps}>{items7}</View>;
|
||||
}
|
||||
const items8 = [r18];
|
||||
if (showSkipButtons) {
|
||||
r25 = <VideoQuestPlayerControlButton disabled={property3 === env0_19.ERRORED} accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.r9s3Uv)} onPress={value46}>{((SkipBackwardIcon) => <SkipBackwardIcon color={styles.icon.color} width={16} height={16} />)((require(13529) /* metro dependency 13529: SkipBackwardIcon */).SkipBackwardIcon)}</VideoQuestPlayerControlButton>;
|
||||
} else {
|
||||
r25 = showSkipButtons;
|
||||
}
|
||||
const items9 = [r25];
|
||||
string = intl.string;
|
||||
const r37 = r34 || property3 === env0_19.ERRORED ? (require(1244) /* metro dependency 1244: indexNative */).t.K0e7M9 : r32 ? t.R3aFPe : t.fTMEUi;
|
||||
if (r34 || property3 === env0_19.ERRORED) {
|
||||
const RetryIcon = (require(10234) /* metro dependency 10234: RetryIcon */).RetryIcon;
|
||||
r32 = <RetryIcon size="lg" />;
|
||||
} else {
|
||||
r32 = ((Component) => <Component size="lg" />)(r32 ? (require(9376) /* metro dependency 9376: PlayIcon */).PlayIcon : (require(9554) /* metro dependency 9554: PauseIcon */).PauseIcon);
|
||||
}
|
||||
items9[1] = <VideoQuestPlayerControlButton accessibilityRole="button" accessibilityLabel={Reflect.apply(string,
|
||||
intl, [r37])} onPress={value38}>{r32}</VideoQuestPlayerControlButton>;
|
||||
if (showSkipButtons) {
|
||||
r24 = <VideoQuestPlayerControlButton disabled={r33} accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zWDcNP)} onPress={value47}>{((SkipForwardIcon) => <SkipForwardIcon color={styles.icon.color} width={16} height={16} />)((require(13530) /* metro dependency 13530: SkipForwardIcon */).SkipForwardIcon)}</VideoQuestPlayerControlButton>;
|
||||
} else {
|
||||
r24 = showSkipButtons;
|
||||
}
|
||||
items9[2] = r24;
|
||||
items8[1] = <View style={styles.controlsMiddle}>{items9}</View>;
|
||||
items8[2] = showFullscreenButton && <View style={[styles.controlsTopBottom, styles.controlsBottom,
|
||||
r22]}><PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vKZT5t)} onPress={onToggleFullscreen} style={styles.controlButton}>{((FullscreenEnterIcon) => <FullscreenEnterIcon />)((require(13531) /* metro dependency 13531: FullscreenEnterIcon */).FullscreenEnterIcon)}</PressableOpacity></View>;
|
||||
items3[4] = <View2 style={items5} accessible={false}>{items8}</View2>;
|
||||
items3[5] = showProgress && <View style={styles.progressContainer}>{((View) => <View style={[styles.progress,
|
||||
value29]} />)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}</View>;
|
||||
return (
|
||||
<View style={items2} accessible={false}>
|
||||
<Pressable {...pressableBindingProps}>
|
||||
{items3}
|
||||
</Pressable>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun102802(a0) { // fn#102802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:4522, offset: 0x0224a34c, size: 38 bytes, params: 2, frame: 13
|
||||
env0_21(a0);
|
||||
if (onPlayerStateChange != null) {
|
||||
onPlayerStateChange(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function shouldShowControls() { // fn#102803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:4644, offset: 0x0224a372, size: 117 bytes, params: 1, frame: 12
|
||||
var r1;
|
||||
let r0 = env0_22 && !hideControls;
|
||||
if (r0) {
|
||||
r1 = env0_28.get() || env0_20 === env1_19.PAUSED;
|
||||
r1 = !r1 ? env0_20 === env1_19.ENDED : r1;
|
||||
r1 = !r1 ? env0_20 === env1_19.ERRORED : r1;
|
||||
r1 = !r1 ? env0_27 : r1;
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function he_102804() { // fn#102804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:4920, offset: 0x0224a3e7, size: 105 bytes, params: 1, frame: 18
|
||||
const shouldShowControls2 = shouldShowControls();
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const r3 = shouldShowControls2 ? 1 : 0;
|
||||
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
|
||||
return {opacity: Reflect.apply(withSpring, springModule, [r3, SUBTLE_SPRING]),
|
||||
pointerEvents: shouldShowControls2 ? 'auto' : 'none'};
|
||||
}
|
||||
|
||||
function pe() { // fn#102805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:5265, offset: 0x0224a450, size: 100 bytes, params: 1, frame: 18
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
object2.width = value.withTiming(100 * env0_30.get() + '%',
|
||||
(require(4507) /* metro dependency 4507: timingPresets */).timingFast, 'animate-always');
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun102806(a0) { // fn#102806, offset: 0x0224a4b4, size: 18 bytes, params: 2, frame: 2
|
||||
const env0_0 = a0;
|
||||
return _fun102807;
|
||||
}
|
||||
|
||||
function _fun102809(a0, a1) { // fn#102809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:5684, offset: 0x0224a564, size: 39 bytes, params: 3, frame: 11
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
env0_19(_fun102810);
|
||||
}
|
||||
|
||||
function _fun102811() { // fn#102811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:5874, offset: 0x0224a5d5, size: 38 bytes, params: 1, frame: 11
|
||||
if (onReadyForDisplay != null) {
|
||||
onReadyForDisplay();
|
||||
}
|
||||
env0_33(true);
|
||||
}
|
||||
|
||||
function _fun102812(a0) { // fn#102812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:5924, offset: 0x0224a5fb, size: 176 bytes, params: 2, frame: 16
|
||||
var r6;
|
||||
var allowUnrestrictedSeekingBinding;
|
||||
var binding;
|
||||
var Math;
|
||||
var value3;
|
||||
let current = env0_15.current;
|
||||
if (current != null) {
|
||||
allowUnrestrictedSeekingBinding = allowUnrestrictedSeeking;
|
||||
binding = env0_18;
|
||||
r6 = allowUnrestrictedSeekingBinding ? binding.duration : binding.maxTimestampSec;
|
||||
Math = global.Math;
|
||||
value3 = Math.max(0, global.Math.min(a0, r6));
|
||||
binding = env0_25;
|
||||
current = binding.current;
|
||||
binding.current = (current + 1) % 100;
|
||||
current = env0_15.current;
|
||||
current.seek(value3 + 0.0001 * env0_25.current);
|
||||
env0_24.current = value3;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102813() { // fn#102813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:6162, offset: 0x0224a6ab, size: 42 bytes, params: 1, frame: 3
|
||||
return {seekToStart: seekToStart, play: play_102815, pause: pause_102816};
|
||||
}
|
||||
|
||||
function _fun102817(a0) { // fn#102817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:6453, offset: 0x0224a7dc, size: 149 bytes, params: 2, frame: 16
|
||||
var r3;
|
||||
var timestampSec;
|
||||
var binding;
|
||||
var value5;
|
||||
const duration = a0.duration;
|
||||
env0_17(duration);
|
||||
env0_23(true);
|
||||
if (env0_15.current != null) {
|
||||
timestampSec = initialProgress.timestampSec;
|
||||
r3 = !disableResumeOnLoad && timestampSec > 5;
|
||||
r3 = r3 && timestampSec < duration - 3;
|
||||
if (r3) {
|
||||
env0_34(timestampSec - 1);
|
||||
}
|
||||
binding = env0_26;
|
||||
value5 = environment.__proto__;
|
||||
binding(env1_19.PLAYING);
|
||||
if (onLoad != null) {
|
||||
onLoad(a0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102818() { // fn#102818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:6633, offset: 0x0224a871, size: 284 bytes, params: 1, frame: 14
|
||||
const value = a0;
|
||||
let shouldRestartVideo = (value !== undefined ? value : {}).shouldRestartVideo;
|
||||
shouldRestartVideo = shouldRestartVideo === undefined || shouldRestartVideo;
|
||||
const binding = env0_20;
|
||||
const ERRORED = env1_19.ERRORED;
|
||||
if (binding === ERRORED) {
|
||||
env0_34(0);
|
||||
env0_26(env1_19.PLAYING);
|
||||
if (onResumePlayback != null) {
|
||||
onResumePlayback(env1_20.USER_INTERACTION);
|
||||
}
|
||||
} else if (env0_27) {
|
||||
if (shouldRestartVideo) {
|
||||
env0_34(0);
|
||||
env0_26(env1_19.PLAYING);
|
||||
if (onResumePlayback != null) {
|
||||
onResumePlayback(env1_20.USER_INTERACTION);
|
||||
}
|
||||
} else if (env0_20 === env1_19.PAUSED) {
|
||||
env0_26(env1_19.PLAYING);
|
||||
if (onResumePlayback != null) {
|
||||
onResumePlayback(env1_20.USER_INTERACTION);
|
||||
}
|
||||
} else if (env0_20 === env1_19.LOADING) {
|
||||
env0_26(env1_19.PLAYING);
|
||||
if (onResumePlayback != null) {
|
||||
onResumePlayback(env1_20.USER_INTERACTION);
|
||||
}
|
||||
} else if (env0_20 === env1_19.PLAYING) {
|
||||
env0_26(env1_19.PAUSED);
|
||||
if (onPausePlayback != null) {
|
||||
onPausePlayback(env1_20.USER_INTERACTION);
|
||||
}
|
||||
}
|
||||
} else if (env0_20 === env1_19.PAUSED) {
|
||||
env0_26(env1_19.PLAYING);
|
||||
if (onResumePlayback != null) {
|
||||
onResumePlayback(env1_20.USER_INTERACTION);
|
||||
}
|
||||
} else if (env0_20 === env1_19.LOADING) {
|
||||
env0_26(env1_19.PLAYING);
|
||||
if (onResumePlayback != null) {
|
||||
onResumePlayback(env1_20.USER_INTERACTION);
|
||||
}
|
||||
} else if (env0_20 === env1_19.PLAYING) {
|
||||
env0_26(env1_19.PAUSED);
|
||||
if (onPausePlayback != null) {
|
||||
onPausePlayback(env1_20.USER_INTERACTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102820() { // fn#102820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:6969, offset: 0x0224a98d, size: 102 bytes, params: 1, frame: 13
|
||||
env0_36.current = false;
|
||||
const binding = env0_20;
|
||||
const PLAYING = env1_19.PLAYING;
|
||||
if (binding === PLAYING) {
|
||||
env0_36.current = true;
|
||||
env0_26(env1_19.PAUSED);
|
||||
if (onPausePlayback != null) {
|
||||
onPausePlayback(env1_20.SYSTEM_INITIATED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102821() { // fn#102821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:7095, offset: 0x0224a9f3, size: 102 bytes, params: 1, frame: 13
|
||||
var binding;
|
||||
var value2;
|
||||
if (env0_36.current) {
|
||||
env0_36.current = false;
|
||||
binding = env0_20;
|
||||
value2 = environment.__proto__;
|
||||
if (binding !== env1_19.ERRORED) {
|
||||
env0_26(env1_19.PLAYING);
|
||||
if (onResumePlayback != null) {
|
||||
onResumePlayback(env1_20.SYSTEM_INITIATED);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102822() { // fn#102822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:7217, offset: 0x0224aa59, size: 108 bytes, params: 1, frame: 19
|
||||
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
let subscribe = ComponentDispatch.subscribe;
|
||||
const QUEST_GAME_LINK_OPENED = ComponentActions.QUEST_GAME_LINK_OPENED;
|
||||
Reflect.apply(subscribe, ComponentDispatch, [QUEST_GAME_LINK_OPENED, env0_37]);
|
||||
subscribe = ComponentDispatch.subscribe;
|
||||
const QUEST_APP_STORE_OVERLAY_FINISHED = ComponentActions.QUEST_APP_STORE_OVERLAY_FINISHED;
|
||||
Reflect.apply(subscribe, ComponentDispatch, [QUEST_APP_STORE_OVERLAY_FINISHED, env0_38]);
|
||||
return _fun102823;
|
||||
}
|
||||
|
||||
function _fun102824() { // fn#102824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:7549, offset: 0x0224ab28, size: 57 bytes, params: 1, frame: 12
|
||||
const binding = env0_28;
|
||||
const get = binding.get;
|
||||
if (Reflect.apply(get, binding, [])) {
|
||||
env0_28.set(false);
|
||||
}
|
||||
env0_35({shouldRestartVideo: false});
|
||||
}
|
||||
|
||||
function _fun102825(a0) { // fn#102825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:7632, offset: 0x0224ab61, size: 114 bytes, params: 2, frame: 16
|
||||
var binding;
|
||||
var set;
|
||||
var currentTime;
|
||||
if (env0_15.current != null) {
|
||||
env0_24.current = null;
|
||||
if (env0_16 > 0) {
|
||||
binding = env0_30;
|
||||
set = binding.set;
|
||||
currentTime = a0.currentTime;
|
||||
Reflect.apply(set, binding, [currentTime / env0_16]);
|
||||
binding = env0_32;
|
||||
currentTime = a0.currentTime;
|
||||
binding(currentTime, env0_16);
|
||||
}
|
||||
if (onSeek != null) {
|
||||
onSeek(a0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102826() { // fn#102826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:7849, offset: 0x0224abd3, size: 68 bytes, params: 1, frame: 12
|
||||
if (!env0_39) {
|
||||
env0_34((env0_24.current ?? env0_30.get() * env0_16) + 10);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102827() { // fn#102827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:7957, offset: 0x0224ac17, size: 99 bytes, params: 1, frame: 13
|
||||
env0_34((env0_24.current ?? env0_30.get() * env0_16) - 10);
|
||||
const binding = env0_20;
|
||||
const ENDED = env1_19.ENDED;
|
||||
if (binding === ENDED) {
|
||||
env0_26(env1_19.PLAYING);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102828(a0) { // fn#102828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:8091, offset: 0x0224ac7a, size: 122 bytes, params: 2, frame: 16
|
||||
const seekableDuration = a0.seekableDuration;
|
||||
const value = 0;
|
||||
const r3 = value === seekableDuration ? value : a0.currentTime / a0.seekableDuration;
|
||||
env0_32(a0.currentTime, a0.seekableDuration);
|
||||
env0_30.set(r3);
|
||||
if (onProgress != null) {
|
||||
onProgress({currentTime: a0.currentTime, seekableDuration: a0.seekableDuration, progress: r3});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102829() { // fn#102829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:8324, offset: 0x0224acf4, size: 58 bytes, params: 1, frame: 12
|
||||
var binding;
|
||||
var value2;
|
||||
if (!repeat) {
|
||||
binding = env0_26;
|
||||
value2 = environment.__proto__;
|
||||
binding(env1_19.ENDED);
|
||||
}
|
||||
if (onEnd != null) {
|
||||
onEnd();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102830() { // fn#102830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:8389, offset: 0x0224ad2e, size: 47 bytes, params: 1, frame: 12
|
||||
const binding = env0_26;
|
||||
const LOADING = env1_19.LOADING;
|
||||
binding(LOADING);
|
||||
if (onLoadStart != null) {
|
||||
onLoadStart();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102831(a0) { // fn#102831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:8449, offset: 0x0224ad5d, size: 51 bytes, params: 2, frame: 12
|
||||
const binding = env0_26;
|
||||
const ERRORED = env1_19.ERRORED;
|
||||
binding(ERRORED);
|
||||
if (onError != null) {
|
||||
onError(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102833() { // fn#102833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:8576, offset: 0x0224ad90, size: 67 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
var current;
|
||||
let value = environment.__proto__;
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (value.isAndroid()) {
|
||||
current = env0_15.current;
|
||||
return _fun102834;
|
||||
}
|
||||
}
|
||||
|
||||
function useBufferingState({onBuffer}) { // fn#102835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:8823, offset: 0x0224ae4b, size: 120 bytes, params: 2, frame: 16
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_4;
|
||||
const env0_1 = binding.useRef(false);
|
||||
value = env1_3(binding.useState(false), 2);
|
||||
const property = value[0];
|
||||
const env0_2 = value[1];
|
||||
const useCallback = binding.useCallback;
|
||||
let object = [onBuffer];
|
||||
object = {isBuffering: property, toggleBuffering: Reflect.apply(useCallback, binding, [_fun102836, object])};
|
||||
return object;
|
||||
}
|
||||
|
||||
function _fun102837({isBuffering}) { // fn#102837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:9112, offset: 0x0224af00, size: 109 bytes, params: 2, frame: 13
|
||||
var binding;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (isBuffering) {
|
||||
binding = env0_20;
|
||||
value2 = environment.__proto__;
|
||||
if (binding === env1_19.LOADING) {
|
||||
toggleBuffering(true);
|
||||
} else {
|
||||
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue.isIOS()) {
|
||||
if (!isBuffering) {
|
||||
toggleBuffering(false);
|
||||
}
|
||||
} else {
|
||||
toggleBuffering(true);
|
||||
}
|
||||
}
|
||||
} else if (!isBuffering) {
|
||||
toggleBuffering(false);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102838() { // fn#102838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:9215, offset: 0x0224af6d, size: 54 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (value.isIOS()) {
|
||||
toggleBuffering(true);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102839() { // fn#102839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:9271, offset: 0x0224afa3, size: 54 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (value.isIOS()) {
|
||||
toggleBuffering(false);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102807(a0) { // fn#102807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:5541, offset: 0x0224a4c6, size: 135 bytes, params: 2, frame: 18
|
||||
var binding3;
|
||||
var items2;
|
||||
const value = copyRestArgs(0, undefined);
|
||||
global.clearTimeout(env1_31.current);
|
||||
const binding = env1_28;
|
||||
binding.set(true);
|
||||
env1_31.current = global.setTimeout(_fun102808, 2000);
|
||||
if (env0_0 != null) {
|
||||
binding3 = env0_0;
|
||||
items2 = [];
|
||||
arraySpread(items2, value, 0, binding);
|
||||
return apply(binding3, items2, undefined, binding);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102810({maxTimestampSec}) { // fn#102810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:5696, offset: 0x0224a58b, size: 74 bytes, params: 2, frame: 16
|
||||
const Math = global.Math;
|
||||
const max = Math.max;
|
||||
const Math2 = global.Math;
|
||||
const floor = Math2.floor;
|
||||
const binding = env0_0;
|
||||
return {timestampSec: binding, maxTimestampSec: Reflect.apply(max, Math, [maxTimestampSec, Reflect.apply(floor,
|
||||
Math2, [binding])]), duration: require};
|
||||
}
|
||||
|
||||
function seekToStart() { // fn#102814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:6180, offset: 0x0224a6d5, size: 107 bytes, params: 1, frame: 13
|
||||
const binding = env1_20;
|
||||
const ERRORED = env2_19.ERRORED;
|
||||
if (binding !== ERRORED) {
|
||||
env1_34(0);
|
||||
if (env1_20 === env2_19.ENDED) {
|
||||
env1_26(env2_19.PLAYING);
|
||||
if (onResumePlayback != null) {
|
||||
onResumePlayback(env2_20.IMPERATIVE_API);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function play_102815() { // fn#102815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:6274, offset: 0x0224a740, size: 78 bytes, params: 1, frame: 13
|
||||
const binding = env1_20;
|
||||
const PAUSED = env2_19.PAUSED;
|
||||
if (binding === PAUSED) {
|
||||
env1_26(env2_19.PLAYING);
|
||||
if (onResumePlayback != null) {
|
||||
onResumePlayback(env2_20.IMPERATIVE_API);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function pause_102816() { // fn#102816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:6346, offset: 0x0224a78e, size: 78 bytes, params: 1, frame: 13
|
||||
const binding = env1_20;
|
||||
const PLAYING = env2_19.PLAYING;
|
||||
if (binding === PLAYING) {
|
||||
env1_26(env2_19.PAUSED);
|
||||
if (onPausePlayback != null) {
|
||||
onPausePlayback(env2_20.IMPERATIVE_API);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102823() { // fn#102823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:7364, offset: 0x0224aac5, size: 99 bytes, params: 1, frame: 19
|
||||
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
let unsubscribe = ComponentDispatch.unsubscribe;
|
||||
const QUEST_GAME_LINK_OPENED = ComponentActions.QUEST_GAME_LINK_OPENED;
|
||||
Reflect.apply(unsubscribe, ComponentDispatch, [QUEST_GAME_LINK_OPENED, env1_37]);
|
||||
unsubscribe = ComponentDispatch.unsubscribe;
|
||||
const QUEST_APP_STORE_OVERLAY_FINISHED = ComponentActions.QUEST_APP_STORE_OVERLAY_FINISHED;
|
||||
Reflect.apply(unsubscribe, ComponentDispatch, [QUEST_APP_STORE_OVERLAY_FINISHED, env1_38]);
|
||||
}
|
||||
|
||||
function _fun102834() { // fn#102834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:8629, offset: 0x0224add3, size: 120 bytes, params: 1, frame: 13
|
||||
var r1;
|
||||
var value;
|
||||
var value2;
|
||||
var setNativeProps;
|
||||
var value3;
|
||||
var error;
|
||||
try {
|
||||
value = environment;
|
||||
value2 = current == null;
|
||||
if (value2) {
|
||||
r1 = value2;
|
||||
} else {
|
||||
setNativeProps = current.setNativeProps;
|
||||
value3 = setNativeProps == null;
|
||||
r1 = value3;
|
||||
}
|
||||
if (!r1) {
|
||||
current.setNativeProps({'paused': true, 'repeat': false, src: {uri: null}});
|
||||
}
|
||||
} catch (error) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
|
||||
value.captureException(error);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102836(a0) { // fn#102836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:8940, offset: 0x0224aec3, size: 61 bytes, params: 2, frame: 13
|
||||
env0_2(a0);
|
||||
if (a0 !== env0_1.current) {
|
||||
env0_1.current = a0;
|
||||
if (onBuffer != null) {
|
||||
onBuffer(a0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102808() { // fn#102808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13713:5612, offset: 0x0224a54d, size: 23 bytes, params: 1, frame: 11
|
||||
env2_28.set(false);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
/* Metro module 9521; source: modules/quests/native/AppStoreOverlayTelemetryManager.tsx; dependencies: [6, 7, 15, 17, 18, 661, 477, 676, 4860, 2] */
|
||||
function _fun74283(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:6, offset: 0x01d88cc3, size: 284 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun74287(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/AppStoreOverlayTelemetryManager.tsx');
|
||||
exports.default = value;
|
||||
exports.setAppStoreOverlayOpen = function(a0) {
|
||||
env0_8 = a0;
|
||||
};
|
||||
exports.clearAppStoreOverlayOpen = function() {
|
||||
env0_8 = null;
|
||||
env0_9 = null;
|
||||
};
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_74284() { // fn#74284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:173, offset: 0x01d88ddf, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_74284_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun74287(a0) { // fn#74287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:394, offset: 0x01d88e41, size: 72 bytes, params: 2, frame: 15
|
||||
const closure = AppStoreOverlayTelemetryManager;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'handleAppStateUpdate', value: value_74290}]);
|
||||
}
|
||||
|
||||
function AppStoreOverlayTelemetryManager(a0) { // fn#74288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:406, offset: 0x01d88e89, size: 152 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_2;
|
||||
binding(this, AppStoreOverlayTelemetryManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_5(AppStoreOverlayTelemetryManager);
|
||||
binding = env1_4;
|
||||
if (_isNativeReflectConstruct_74284()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_5(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.actions = {APP_STATE_UPDATE: APP_STATE_UPDATE_74289};
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_74290({state}) { // fn#74290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9707:858, offset: 0x01d88f21, size: 259 bytes, params: 2, frame: 18
|
||||
var r1;
|
||||
var r0;
|
||||
var value3;
|
||||
const AppStates = (require(676) /* metro dependency 676: ConstantsIOS */).AppStates;
|
||||
var BACKGROUND;
|
||||
var value4;
|
||||
var binding;
|
||||
const value = environment.__proto__;
|
||||
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
if (isAndroid2) {
|
||||
r0 = !isAndroid2;
|
||||
} else {
|
||||
value3 = env1_8 != null;
|
||||
if (value3) {
|
||||
if (state !== AppStates.ACTIVE) {
|
||||
BACKGROUND = AppStates.BACKGROUND;
|
||||
value4 = false;
|
||||
if (state !== BACKGROUND) {
|
||||
r1 = value4;
|
||||
} else {
|
||||
binding = env1_8;
|
||||
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_BACKGROUNDED);
|
||||
env1_9 = global.Date.now();
|
||||
r1 = value4;
|
||||
}
|
||||
} else if (env1_9 != null) {
|
||||
binding = env1_8;
|
||||
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_RETURNED, global.Date.now() - env1_9);
|
||||
r1 = false;
|
||||
} else {
|
||||
BACKGROUND = AppStates.BACKGROUND;
|
||||
value4 = false;
|
||||
if (state !== BACKGROUND) {
|
||||
r1 = value4;
|
||||
} else {
|
||||
binding = env1_8;
|
||||
binding.trackOverlayEvent(AnalyticEvents.QUEST_APP_STORE_OVERLAY_BACKGROUNDED);
|
||||
env1_9 = global.Date.now();
|
||||
r1 = value4;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/* Metro module 13564; source: modules/quests/native/BountiesBannerBackground.tsx; dependencies: [31, 27, 4502, 33, 566, 9543, 4589, 2] */
|
||||
function _fun103065(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13754:6, offset: 0x02255ed5, size: 232 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value2.StyleSheet;
|
||||
const env0_4 = value2.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value3.jsx;
|
||||
const env0_7 = value3.jsxs;
|
||||
const env0_8 = [0, 0.6];
|
||||
const env0_9 = ['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 0.9)'];
|
||||
value = value.memo(BountiesBannerBackground);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesBannerBackground.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function BountiesBannerBackground({children, style, uri}) { // fn#103066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13754:244, offset: 0x02255fbd, size: 244 bytes, params: 2, frame: 22
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
|
||||
return (
|
||||
<View style={style}>
|
||||
<VideoComponent
|
||||
source={{uri: uri}}
|
||||
style={StyleSheet.absoluteFillObject}
|
||||
resizeMode="cover"
|
||||
muted
|
||||
disableFocus
|
||||
paused={useReducedMotion}
|
||||
importantForAccessibility="no-hide-descendants"
|
||||
/>
|
||||
{((Component) => <Component colors={env0_9} locations={env0_8} style={StyleSheet.absoluteFillObject} />)(importDefault(4589) /* metro dependency 4589 */)}
|
||||
{children}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
/* Metro module 13562; source: modules/quests/native/BountiesCtaHeader.tsx; dependencies: [31, 27, 4502, 13563, 6528, 33, 4501, 697, 1244, 4573, 13557, 6766, 566, 7121, 9529, 6531, 7110, 7120, 13515, 13564, 13565, 1305, 4578, 13561, 9949, 3868, 13551, 10183, 2] */
|
||||
function _fun103039(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:6, offset: 0x02254a75, size: 307 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
value2.StyleSheet;
|
||||
const env0_4 = value2.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const adContentSeenStore = importDefault(13563) /* metro dependency 13563: AdContentSeenStore */;
|
||||
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
|
||||
const env0_7 = questConstantsModule.BountyCarouselEmptyStateReason;
|
||||
const env0_8 = questConstantsModule.DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value4.jsx;
|
||||
const env0_10 = value4.jsxs;
|
||||
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun103046);
|
||||
value = value.memo(BountiesCtaHeader);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesCtaHeader.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function BountiesCtaDescription({isEmptyOrCompleted}) { // fn#103040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:1628, offset: 0x02254ba8, size: 379 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r13 = isEmptyOrCompleted ? t.q4wlOE : t.AZGGo1;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const text = <Text variant="text-sm/medium" color="text-subtle">{intl.string(r13)}</Text>;
|
||||
const value3 = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.fjSvsC,
|
||||
{onClick: importDefault(13557) /* metro dependency 13557: openBountiesNuxPromoSheet */});
|
||||
if (isEmptyOrCompleted) {
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
return (
|
||||
<TextWithIOSLinkWorkaround variant="text-sm/medium">
|
||||
{text}
|
||||
{' '}
|
||||
{value3}
|
||||
</TextWithIOSLinkWorkaround>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<View style={styles.description}>
|
||||
{text}
|
||||
{((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround variant="text-sm/medium">{value3}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function BountiesCtaHeaderInner({bounties, isEmptyOrCompleted, containerRef}) { // fn#103041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:2097, offset: 0x02254d23, size: 750 bytes, params: 2, frame: 32
|
||||
isEmptyOrCompleted = !(isEmptyOrCompleted === undefined) && isEmptyOrCompleted;
|
||||
const styles = useStyles();
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AdContentSeenStore], function() {
|
||||
return bounties.some(_fun103044);
|
||||
}, [bounties]);
|
||||
const value3 = (require(9529) /* metro dependency 9529: useVideoModalPlacementEnabled */).useVideoModalPlacementEnabled('BountiesCtaHeader');
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const value4 = env0_3.useCallback(_fun103045, [bounties,
|
||||
value3 ? QuestContent.VIDEO_MODAL_MOBILE : QuestContent.QUEST_HOME_MOBILE_CAROUSEL]);
|
||||
const BountiesBannerBackground = importDefault(13564) /* metro dependency 13564: BountiesBannerBackground */;
|
||||
const bountiesBannerBackgroundProps = {uri: importDefault(13565) /* metro dependency 13565: bounty_bannerMp4 */,
|
||||
style: [styles.header, styles.headerRoundedBottom]};
|
||||
const r8 = value2 && ((NewTag) => <NewTag variant="text-xs/bold" containerStyle={styles.newPill} textStyle={styles.newPillText} />)((require(1305) /* metro dependency 1305: native */).NewTag);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const items4 = [<Text variant="text-lg/semibold" color="white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qetVDw)}</Text>];
|
||||
items4[1] = <BountiesCtaDescription isEmptyOrCompleted={isEmptyOrCompleted} />;
|
||||
items4[2] = !isEmptyOrCompleted && ((Button) => <Button grow size="md" variant="primary-overlay" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1kkbKw'])} onPress={value4} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
|
||||
return (
|
||||
<View ref={containerRef} style={styles.container}>
|
||||
<BountiesBannerBackground {...bountiesBannerBackgroundProps}>
|
||||
{r8}
|
||||
<View style={styles.headerTextBox}>
|
||||
{items4}
|
||||
</View>
|
||||
</BountiesBannerBackground>
|
||||
{false}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun103046() { // fn#103046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:301, offset: 0x02255154, size: 719 bytes, params: 1, frame: 16
|
||||
const object3 = {};
|
||||
const object6 = {'width': '100%', 'backgroundColor': null, 'borderWidth': 1};
|
||||
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object6.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object6.borderColor = BORDER_MUTED;
|
||||
object6.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
|
||||
object6.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
|
||||
object6.overflow = 'hidden';
|
||||
object3.container = object6;
|
||||
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object3.header = {'width': '100%', 'minHeight': 296, 'justifyContent': 'flex-end', 'overflow': 'hidden',
|
||||
backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
const object8 = {};
|
||||
object8.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
|
||||
object8.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
|
||||
object3.headerRoundedBottom = object8;
|
||||
const object10 = {position: 'absolute'};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object10.top = PX_12;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object10.left = PX_12;
|
||||
object10.zIndex = 1;
|
||||
const CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
|
||||
object10.backgroundColor = CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
|
||||
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object10.paddingHorizontal = PX_8;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object10.paddingVertical = PX_4;
|
||||
object3.newPill = object10;
|
||||
const CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
|
||||
object3.newPillText = {color: CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT};
|
||||
const object12 = {};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object12.paddingBottom = PX_24;
|
||||
const PX_20 = (importDefault(697) /* metro dependency 697: native */).space.PX_20;
|
||||
object12.paddingHorizontal = PX_20;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object12.gap = PX_8;
|
||||
object3.headerTextBox = object12;
|
||||
object3.description = {marginBottom: 16};
|
||||
const object13 = {'width': '100%', 'overflow': 'hidden'};
|
||||
object13.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
||||
object13.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
||||
object3.bottomSection = object13;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.bottomContent = {'paddingBottom': 24, 'paddingHorizontal': 20, gap: PX_12};
|
||||
const object14 = {'alignSelf': 'stretch', 'height': 160};
|
||||
object14.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object14.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object3.placeholderCards = object14;
|
||||
return object3;
|
||||
}
|
||||
|
||||
function BountiesCtaHeader(a0) { // fn#103047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:3476, offset: 0x02255423, size: 406 bytes, params: 2, frame: 25
|
||||
var QuestContentImpressionTrackerNative;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
var QUEST_HOME_ENTRYPOINT_MOBILE;
|
||||
const env0_0 = a0;
|
||||
const {containerRef, isInView} = (importDefault(13561) /* metro dependency 13561: useIsCarouselInView */)();
|
||||
const bounties = a0.bounties;
|
||||
const isEmptyOrCompleted = a0.isEmptyOrCompleted;
|
||||
let r4 = isEmptyOrCompleted !== undefined && isEmptyOrCompleted;
|
||||
(require(9949) /* metro dependency 9949: AnalyticsHooks */).useBountyCarouselEmptyStateAnalytics(r4 ? bounties.length === 0 ? BountyCarouselEmptyStateReason.EMPTY : BountyCarouselEmptyStateReason.COMPLETED : null);
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
const ThemeTypes = (require(13551) /* metro dependency 13551: ThemeTypes */).ThemeTypes;
|
||||
const DARKER = ThemeTypes.DARKER;
|
||||
if (r4) {
|
||||
r4 = <BountiesCtaHeaderInner {...a0} {...{['containerRef']: containerRef}} />;
|
||||
} else {
|
||||
QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
||||
var questContentImpressionTrackerNativeProps = {adContentId: DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID,
|
||||
adCreativeType: (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY};
|
||||
QUEST_HOME_ENTRYPOINT_MOBILE = QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE;
|
||||
questContentImpressionTrackerNativeProps.questContent = QUEST_HOME_ENTRYPOINT_MOBILE;
|
||||
questContentImpressionTrackerNativeProps.questContentPosition = 0;
|
||||
questContentImpressionTrackerNativeProps.overrideVisibility = isInView;
|
||||
QUEST_HOME_ENTRYPOINT_MOBILE = QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE;
|
||||
questContentImpressionTrackerNativeProps.sourceQuestContent = QUEST_HOME_ENTRYPOINT_MOBILE;
|
||||
r4 = <QuestContentImpressionTrackerNative {...questContentImpressionTrackerNativeProps}>{children_103048}</QuestContentImpressionTrackerNative>;
|
||||
}
|
||||
return (
|
||||
<ThemeContextProvider theme={DARKER}>
|
||||
{r4}
|
||||
</ThemeContextProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun103043() { // fn#103043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:2286, offset: 0x02255011, size: 29 bytes, params: 1, frame: 11
|
||||
return bounties.some(function(a0) {
|
||||
var BOUNTY = require(dependencyMap[13]).AdCreativeType.BOUNTY;
|
||||
return !AdContentSeenStore.hasSeen(BOUNTY, a0.id);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun103045() { // fn#103045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:2527, offset: 0x02255070, size: 228 bytes, params: 1, frame: 20
|
||||
const property = bounties[0];
|
||||
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
const trackAdContentClicked = analyticsActionsModule.trackAdContentClicked;
|
||||
const object2 = {};
|
||||
object2.adContentId = DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const BOUNTY = AdCreativeType.BOUNTY;
|
||||
object2.adCreativeType = BOUNTY;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_HOME_ENTRYPOINT_MOBILE = QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE;
|
||||
object2.questContent = QUEST_HOME_ENTRYPOINT_MOBILE;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const START_BOUNTY = QuestContentCTA.START_BOUNTY;
|
||||
object2.questContentCTA = START_BOUNTY;
|
||||
QUEST_HOME_ENTRYPOINT_MOBILE = QuestContent.QUEST_HOME_ENTRYPOINT_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_HOME_ENTRYPOINT_MOBILE;
|
||||
object2.questContentPosition = 0;
|
||||
Reflect.apply(trackAdContentClicked, analyticsActionsModule, [object2]);
|
||||
(importDefault(13515) /* metro dependency 13515: BountiesModalActionCreators */).showModal({bountyId: property.id,
|
||||
sourceQuestContent: env0_1});
|
||||
}
|
||||
|
||||
function BountiesCtaHeaderChildren() { // fn#103048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13752:4123, owner: BountiesCtaHeader.children, offset: 0x022555b9, size: 50 bytes, params: 1, frame: 14
|
||||
return <BountiesCtaHeaderInner {...env0_0} {...{['containerRef']: containerRef}} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/* Metro module 13516; source: modules/quests/native/BountiesModal/BountiesModal.tsx; dependencies: [31, 6528, 33, 9530, 13517, 13552, 7717, 10121, 2] */
|
||||
function _fun102687(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:6, offset: 0x02244d47, size: 174 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = value.memo(BountiesModal);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModal.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function BountiesModal({bountyId, sourceQuestContent}) { // fn#102688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:186, offset: 0x02244df5, size: 218 bytes, params: 2, frame: 20
|
||||
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
|
||||
const useConfig = BountiesStage1Experiment.useConfig;
|
||||
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
|
||||
const verticalScrollEnabled = Reflect.apply(useConfig, BountiesStage1Experiment,
|
||||
[{location: VIDEO_MODAL_MOBILE}]).verticalScrollEnabled;
|
||||
const binding = env0_3;
|
||||
const value2 = binding.useMemo(function() {
|
||||
return {['bounty_main']: {fullscreen: true, headerLeft: _fun102690, render: _fun102691}};
|
||||
}, [bountyId, sourceQuestContent, verticalScrollEnabled]);
|
||||
binding.useLayoutEffect(_fun102692, []);
|
||||
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
|
||||
return (
|
||||
<Modal
|
||||
hideTitle
|
||||
initialRouteName="bounty_main"
|
||||
screens={value2}
|
||||
viewStyle={{backgroundColor: '#000000'}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun102689() { // fn#102689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:361, offset: 0x02244ecf, size: 50 bytes, params: 1, frame: 4
|
||||
return {['bounty_main']: {fullscreen: true, headerLeft: function() {
|
||||
return null;
|
||||
}, render: render_102691}};
|
||||
}
|
||||
|
||||
function _fun102692() { // fn#102692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:508, offset: 0x02244f4d, size: 60 bytes, params: 1, frame: 17
|
||||
const value = environment.__proto__;
|
||||
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
|
||||
return (require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation;
|
||||
}
|
||||
|
||||
function render_102691() { // fn#102691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13706:413, offset: 0x02244f01, size: 76 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ((Component) => <Component bountyId={bountyId} sourceQuestContent={sourceQuestContent} />)(importDefault(verticalScrollEnabled ? dependencyMap[4] : dependencyMap[5]));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/* Metro module 13515; source: modules/quests/native/BountiesModal/BountiesModalActionCreators.tsx; dependencies: [5080, 13516, 1962, 2] */
|
||||
function _fun102684(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13705:6, offset: 0x02244c2c, size: 134 bytes, params: 8, frame: 18
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object2 = {showModal: showModal_102685, hideModal: hideModal_102686};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalActionCreators.tsx');
|
||||
exports.default = object2;
|
||||
exports.BOUNTIES_MODAL_KEY = 'BOUNTIES_MODAL';
|
||||
}
|
||||
|
||||
function showModal_102685({bountyId, sourceQuestContent}) { // fn#102685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13705:118, offset: 0x02244cb2, size: 106 bytes, params: 2, frame: 18
|
||||
const defaultImport = importDefault(dependencyMap[0]);
|
||||
const pushLazy = defaultImport.pushLazy;
|
||||
let value = require(dependencyMap[2]);
|
||||
value = value(dependencyMap[1], dependencyMap.paths);
|
||||
Reflect.apply(pushLazy, defaultImport, [value, {bountyId: bountyId, sourceQuestContent: sourceQuestContent},
|
||||
'BOUNTIES_MODAL']);
|
||||
}
|
||||
|
||||
function hideModal_102686() { // fn#102686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13705:240, offset: 0x02244d1c, size: 43 bytes, params: 1, frame: 12
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('BOUNTIES_MODAL');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
/* Metro module 13541; source: modules/quests/native/BountiesModal/BountiesModalAdvertiserCta.tsx; dependencies: [29, 31, 27, 33, 4017, 4501, 697, 13542, 9495, 13519, 4507, 4504, 4583, 9520, 7121, 7120, 6533, 7976, 5475, 4573, 4578, 2] */
|
||||
function _fun102904(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:6, offset: 0x0224e35b, size: 294 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const env0_3 = ['style'];
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(29) /* metro dependency 29 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const Pressable = value.Pressable;
|
||||
const env0_6 = value.StyleSheet;
|
||||
const env0_7 = value.View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(Pressable);
|
||||
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102905);
|
||||
object = {code: 'function BountiesModalAdvertiserCtaTsx1(){const{withTiming,interpolate,visibility,visible,timingStandard,timingFast}=this.__closure;return{transform:[{translateY:withTiming(interpolate(visibility,[0,1],[8,0]),visible?timingStandard:timingFast)}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalAdvertiserCta.tsx');
|
||||
exports.default = BountiesModalAdvertiserCta;
|
||||
}
|
||||
|
||||
function _fun102905() { // fn#102905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:268, offset: 0x0224e481, size: 435 bytes, params: 1, frame: 18
|
||||
const object7 = {};
|
||||
const object8 = {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0, 'paddingHorizontal': null,
|
||||
'paddingBottom': null, 'alignItems': 'center'};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.paddingBottom = PX_16;
|
||||
object7.outerContainer = object8;
|
||||
const object9 = {};
|
||||
const SHADOW_TOP_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_TOP_HIGH;
|
||||
copyDataProperties(object9, SHADOW_TOP_HIGH, undefined);
|
||||
object9['alignSelf'] = 'stretch';
|
||||
object9['borderWidth'] = 1;
|
||||
object9['borderColor'] = 'transparent';
|
||||
object9['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object9['overflow'] = 'hidden';
|
||||
object7.ctaPressable = object9;
|
||||
const object10 = {'flexDirection': 'row', 'alignItems': 'center'};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object10.paddingLeft = PX_12;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object10.paddingRight = PX_16;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object10.paddingVertical = PX_12;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object10.gap = PX_12;
|
||||
object7.cta = object10;
|
||||
const object11 = {'width': 40, 'height': 40, 'backgroundColor': null, 'borderRadius': null, 'overflow': 'hidden'};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object11.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object7.ctaLogoContainer = object11;
|
||||
const object12 = {};
|
||||
copyDataProperties(object12, StyleSheet.absoluteFillObject, 'hidden');
|
||||
object7.ctaLogo = object12;
|
||||
object7.ctaInfo = {'flex': 1, 'justifyContent': 'center', 'gap': 2};
|
||||
return object7;
|
||||
}
|
||||
|
||||
function BountiesModalAdvertiserCta({bounty, visible, sourceQuestContent}) { // fn#102906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:1248, offset: 0x0224e634, size: 1117 bytes, params: 2, frame: 31
|
||||
var r0;
|
||||
var View2;
|
||||
var label;
|
||||
var BackgroundBlurView;
|
||||
var items3;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var items4;
|
||||
const env0_4 = undefined;
|
||||
const styles = useStyles();
|
||||
const bountyCtaInfo = (require(13542) /* metro dependency 13542: BountyCtaHelpers */).getBountyCtaInfo(bounty);
|
||||
const r20 = bountyCtaInfo.iconImageUri != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({'assetUrl': null,
|
||||
'width': 40, 'height': 40, assetUrl: bountyCtaInfo.iconImageUri}) : undefined;
|
||||
const useVisibilityTransitionModule = require(13519) /* metro dependency 13519: useVisibilityTransition */;
|
||||
const useVisibilityTransition = useVisibilityTransitionModule.useVisibilityTransition;
|
||||
const object2 = {visible: visible};
|
||||
object2.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
|
||||
object2.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingFast;
|
||||
const {opacityStyle, shouldRender} = Reflect.apply(useVisibilityTransition, useVisibilityTransitionModule,
|
||||
[object2]);
|
||||
const r19 = visible ? 1 : 0;
|
||||
const env0_3 = r19;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = BountiesModalAdvertiserCtaB;
|
||||
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
|
||||
interpolate: reanimatedRexportModule.interpolate, visibility: r19, visible: visible,
|
||||
timingStandard: (require(4507) /* metro dependency 4507: timingPresets */).timingStandard,
|
||||
timingFast: (require(4507) /* metro dependency 4507: timingPresets */).timingFast};
|
||||
closure.__workletHash = 4075229418021;
|
||||
closure.__initData = env0_12;
|
||||
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const value9 = reanimatedRexportModule.useSharedValue(0);
|
||||
const value10 = (require(4583) /* metro dependency 4583: ButtonHooksNative */).useButtonPressAnimationProps(value9);
|
||||
const style = value10.style;
|
||||
let binding = env0_4;
|
||||
const value11 = binding(value10, env0_3);
|
||||
binding = env0_5;
|
||||
let useCallback = binding.useCallback;
|
||||
const value12 = Reflect.apply(useCallback, binding, [_fun102908, [bounty.id, bounty.cta, sourceQuestContent]]);
|
||||
const value13 = binding.useCallback(_fun102909, [value12]);
|
||||
useCallback = binding.useCallback;
|
||||
if (shouldRender) {
|
||||
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
var view2Props = {style: [styles.outerContainer, opacityStyle, value8]};
|
||||
binding = env0_10;
|
||||
var bindingProps = {...value11};
|
||||
bindingProps['onPress'] = value13;
|
||||
bindingProps['accessibilityRole'] = 'button';
|
||||
label = bountyCtaInfo.label;
|
||||
bindingProps['accessibilityLabel'] = label;
|
||||
bindingProps['style'] = [styles.ctaPressable, style];
|
||||
BackgroundBlurView = (require(7976) /* metro dependency 7976: BackgroundBlurViewNative */).BackgroundBlurView;
|
||||
var backgroundBlurViewProps = {blurTheme: 'dark', style: styles.cta, pressed: value9};
|
||||
items3 = [<View style={styles.ctaLogoContainer}>{((Component) => <Component source={{uri: r20}} style={styles.ctaLogo} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</View>];
|
||||
var viewBindingProps2 = {style: styles.ctaInfo};
|
||||
label = bountyCtaInfo.label;
|
||||
items4 = [<Text lineClamp={2} variant="text-sm/semibold" color="text-default">{label}</Text>];
|
||||
items4[1] = <Text variant="text-xs/medium" color="text-default">{bountyCtaInfo.subtext}</Text>;
|
||||
items3[1] = <View {...viewBindingProps2}>{items4}</View>;
|
||||
items3[2] = <View accessible={false} importantForAccessibility="no-hide-descendants">{((Button) => <Button variant="primary-overlay" text={bountyCtaInfo.buttonLabel} size="sm" onPress={Reflect.apply(useCallback,
|
||||
|
||||
binding, [_fun102910,
|
||||
[value12]])} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
|
||||
r0 = <View2 {...view2Props}>{((Component) => <Component {...bindingProps}><BackgroundBlurView {...backgroundBlurViewProps}>{items3}</BackgroundBlurView></Component>)(binding)}</View2>;
|
||||
} else {
|
||||
r0 = shouldRender;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function BountiesModalAdvertiserCtaB() { // fn#102907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:1661, owner: BountiesModalAdvertiserCta.b, offset: 0x0224ea91, size: 152 bytes, params: 1, frame: 22
|
||||
let value = environment.__proto__;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const value3 = reanimatedRexportModule.interpolate(env0_3, [0, 1], [8, 0]);
|
||||
const visibleBinding = visible;
|
||||
value = require(4507) /* metro dependency 4507: timingPresets */;
|
||||
return {transform: [{translateY: Reflect.apply(withTiming, timingModule, [value3,
|
||||
visibleBinding ? value.timingStandard : value.timingFast])}]};
|
||||
}
|
||||
|
||||
function _fun102908(a0) { // fn#102908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:2121, offset: 0x0224eb29, size: 145 bytes, params: 2, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
|
||||
const openAdGameLinkDirectly = value.openAdGameLinkDirectly;
|
||||
const object2 = {};
|
||||
const bountyBinding = bounty;
|
||||
object2.adContentId = bountyBinding.id;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const BOUNTY = AdCreativeType.BOUNTY;
|
||||
object2.adCreativeType = BOUNTY;
|
||||
object2.cta = bountyBinding.cta;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
|
||||
Reflect.apply(openAdGameLinkDirectly, value, [object2, {content: a0, ctaContent: OPEN_GAME_LINK,
|
||||
sourceQuestContent: sourceQuestContent}]);
|
||||
}
|
||||
|
||||
function _fun102909() { // fn#102909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:2352, offset: 0x0224ebba, size: 51 bytes, params: 1, frame: 12
|
||||
const binding = env0_4;
|
||||
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
|
||||
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
|
||||
binding(VIDEO_MODAL_MOBILE);
|
||||
}
|
||||
|
||||
function _fun102910() { // fn#102910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13731:2425, offset: 0x0224ebed, size: 51 bytes, params: 1, frame: 12
|
||||
const binding = env0_4;
|
||||
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
|
||||
const VIDEO_MODAL_MOBILE_FOOTER = QuestContent.VIDEO_MODAL_MOBILE_FOOTER;
|
||||
binding(VIDEO_MODAL_MOBILE_FOOTER);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/* Metro module 13550; source: modules/quests/native/BountiesModal/BountiesModalCloseButton.tsx; dependencies: [31, 33, 4501, 697, 5278, 1244, 5312, 2] */
|
||||
function _fun102933(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13740:6, offset: 0x022500f2, size: 171 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102934);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalCloseButton.tsx');
|
||||
exports.default = BountiesModalCloseButton;
|
||||
}
|
||||
|
||||
function _fun102934() { // fn#102934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13740:142, offset: 0x0225019d, size: 130 bytes, params: 1, frame: 15
|
||||
const object = {'alignItems': 'center', 'justifyContent': 'center'};
|
||||
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object.width = PX_32;
|
||||
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object.height = PX_32;
|
||||
return {closeButton: object};
|
||||
}
|
||||
|
||||
function BountiesModalCloseButton({onPress}) { // fn#102935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13740:480, offset: 0x0225021f, size: 209 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
|
||||
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
|
||||
const CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT;
|
||||
return (
|
||||
<PressableOpacity
|
||||
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
|
||||
accessibilityRole="button"
|
||||
hitSlop={12}
|
||||
onPress={onPress}
|
||||
style={styles.closeButton}
|
||||
>
|
||||
<XSmallIcon size="sm" color={CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT} />
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/* Metro module 13535; source: modules/quests/native/BountiesModal/BountiesModalConstants.tsx; dependencies: [2] */
|
||||
function _fun102866(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13725:6, offset: 0x0224c002, size: 84 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalConstants.tsx');
|
||||
exports.BOUNTY_REWARD_CLAIM_FAILED_TOAST_DURATION_MS = 10000;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,384 @@
|
||||
/* Metro module 13552; source: modules/quests/native/BountiesModal/BountiesModalContent.tsx; dependencies: [5, 31, 27, 7092, 6528, 661, 482, 33, 1478, 1585, 4501, 697, 566, 10069, 9530, 13533, 13537, 9532, 13534, 13536, 7110, 7121, 7120, 6533, 9522, 13515, 13538, 10183, 13553, 13550, 6618, 13554, 9483, 3868, 2] */
|
||||
function _fun102937(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:6, offset: 0x022503b2, size: 338 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const bountyStore = importDefault(7092) /* metro dependency 7092: BountyStore */;
|
||||
const env0_7 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_9 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.Fragment;
|
||||
const env0_12 = value.jsxs;
|
||||
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102952);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalContent.tsx');
|
||||
exports.default = BountiesModalContent;
|
||||
}
|
||||
|
||||
function BountiesModalContentInner({bounty, sourceQuestContent}) { // fn#102938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:648, offset: 0x02250504, size: 1397 bytes, params: 2, frame: 45
|
||||
let env0_4 = undefined;
|
||||
const styles = useStyles();
|
||||
const value2 = useBountiesModalVideoLayout();
|
||||
const env0_3 = value2;
|
||||
const value3 = env0_4.useMemo(_fun102941, [styles.videoWrapper, value2]);
|
||||
const value4 = env0_4.useMemo(_fun102942, [styles.closeButton, value2.top, value2.left, value2.width]);
|
||||
const value5 = env0_4.useMemo(_fun102943, [styles.bottomContainer, styles.bottomContainerFullWidth,
|
||||
styles.bottomContainerNotFullWidth, value2.isFullWidth, value2.left, value2.width]);
|
||||
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], function() {
|
||||
return BountyStore.isBountyCompleted(bounty.id);
|
||||
});
|
||||
const hooksModule = require(10069) /* metro dependency 10069: hooks */;
|
||||
const useFetchVirtualCurrencyBalance = hooksModule.useFetchVirtualCurrencyBalance;
|
||||
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, hooksModule, []).balance;
|
||||
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
|
||||
const useConfig = BountiesStage1Experiment.useConfig;
|
||||
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
|
||||
const {enabled, loopingEnabled, rewardTimerSeconds} = Reflect.apply(useConfig, BountiesStage1Experiment,
|
||||
[{location: VIDEO_MODAL_MOBILE}]);
|
||||
const BountyVideoEndMode = (require(13533) /* metro dependency 13533: useBountiesModalTiming */).BountyVideoEndMode;
|
||||
const r19 = loopingEnabled ? BountyVideoEndMode.LOOP : BountyVideoEndMode.END_CARD;
|
||||
const r7 = enabled ? 1000 * rewardTimerSeconds : 1000 * bounty.rewardTimerSeconds;
|
||||
env0_4 = r7;
|
||||
const {initialProgress, handleProgress,
|
||||
flushProgress} = (require(13537) /* metro dependency 13537: useBountyVideoProgressPersistence */).useBountyVideoProgressPersistence({bountyId: bounty.id,
|
||||
endMode: r19});
|
||||
const value12 = env0_4.useCallback(env0_3(_fun102946), [bounty.id, sourceQuestContent]);
|
||||
const {handleVideoProgressAnalytics, handleVideoEndAnalytics, handleVideoLoopedAnalytics,
|
||||
handleVideoPausedAnalytics,
|
||||
handleVideoResumedAnalytics} = (require(13536) /* metro dependency 13536: useBountiesModalVideoAnalytics */).useBountiesModalVideoAnalytics({bountyId: bounty.id,
|
||||
sourceQuestContent: sourceQuestContent, rewardDurationMs: r7});
|
||||
const value14 = env0_4.useCallback(function(a0, a1, a2) {
|
||||
handleVideoProgressAnalytics(a0, a1);
|
||||
handleProgress(a0, a1, a2);
|
||||
}, [handleVideoProgressAnalytics, handleProgress]);
|
||||
const useBountiesModalTimingModule = require(13533) /* metro dependency 13533: useBountiesModalTiming */;
|
||||
const useBountiesModalTiming = useBountiesModalTimingModule.useBountiesModalTiming;
|
||||
let duration = initialProgress.duration;
|
||||
duration = duration > 0 ? initialProgress.duration : null;
|
||||
const {isCtaVisible, isEndCardVisible, handleVideoEnd, handleVideoProgress, handleVideoPaused, handleVideoResumed,
|
||||
rewardRemainingSeconds, rewardTotalSeconds, normalizedProgress, maxVideoProgressSeconds,
|
||||
videoDuration} = Reflect.apply(useBountiesModalTiming, useBountiesModalTimingModule, [{endMode: r19,
|
||||
rewardDurationMs: r7, isCompleted: value6, onRewardEarned: value12, onVideoProgress: value14,
|
||||
onVideoEnd: handleVideoEndAnalytics, onVideoLooped: handleVideoLoopedAnalytics,
|
||||
onVideoPaused: handleVideoPausedAnalytics, onVideoResumed: handleVideoResumedAnalytics,
|
||||
initialProgressSec: initialProgress.timestampSec, initialMaxVideoProgressSec: initialProgress.maxTimestampSec,
|
||||
initialVideoDurationSec: duration}]);
|
||||
const value17 = env0_4.useCallback(_fun102948, [bounty.id, maxVideoProgressSeconds, r7, sourceQuestContent,
|
||||
videoDuration, flushProgress]);
|
||||
const value18 = env0_4.useCallback(_fun102949, [bounty.id, maxVideoProgressSeconds, r7, sourceQuestContent,
|
||||
videoDuration, flushProgress]);
|
||||
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
|
||||
const BountyVideo = (require(13538) /* metro dependency 13538: BountyVideo */).BountyVideo;
|
||||
const items2 = [<View style={value3}><BountyVideo isActive bounty={bounty} sourceQuestContent={sourceQuestContent} isCompleted={value6} isCtaVisible={isCtaVisible} isEndCardVisible={isEndCardVisible} isProgressBarVisible={!isEndCardVisible} orbsBalance={balance} handleVideoEnd={handleVideoEnd} handleVideoProgress={handleVideoProgress} handleVideoPaused={handleVideoPaused} handleVideoResumed={handleVideoResumed} rewardRemainingSeconds={rewardRemainingSeconds} rewardTotalSeconds={rewardTotalSeconds} normalizedProgress={normalizedProgress} repeat={loopingEnabled} initialProgress={initialProgress} renderEndCard={renderEndCard} /></View>];
|
||||
items2[1] = <View style={value4}>{((Component) => <Component onPress={value17} />)(importDefault(13550) /* metro dependency 13550: BountiesModalCloseButton */)}</View>;
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
items2[2] = <SafeAreaPaddingView left={value2.isFullWidth} right={value2.isFullWidth} bottom style={value5} pointerEvents="box-none">{((Component) => <Component bounty={bounty} visible={isEndCardVisible} sourceQuestContent={sourceQuestContent} onClose={value18} />)(importDefault(13554) /* metro dependency 13554: BountiesModalEndedCtaButtons */)}</SafeAreaPaddingView>;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun102952() { // fn#102952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:300, offset: 0x0225113b, size: 199 bytes, params: 1, frame: 15
|
||||
const object2 = {};
|
||||
object2.videoWrapper = {position: 'absolute'};
|
||||
object2.closeButton = {position: 'absolute'};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.bottomContainer = {'position': 'absolute', 'bottom': null, 'justifyContent': 'flex-end', bottom: PX_24};
|
||||
const object3 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.left = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.right = PX_16;
|
||||
object2.bottomContainerFullWidth = object3;
|
||||
const object4 = {};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingLeft = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingRight = PX_16;
|
||||
object2.bottomContainerNotFullWidth = object4;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function BountiesModalContent({bountyId, sourceQuestContent}) { // fn#102953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:5002, offset: 0x02251202, size: 280 bytes, params: 2, frame: 22
|
||||
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
|
||||
const useQuestHomeBounties = questHooksModule.useQuestHomeBounties;
|
||||
const value2 = Reflect.apply(useQuestHomeBounties, questHooksModule, []).questHomeBounties.find(function({id}) {
|
||||
return id === bountyId;
|
||||
});
|
||||
if (value2 == null) {
|
||||
return null;
|
||||
} else {
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
return (
|
||||
<ThemeContextProvider theme={ThemeTypes.DARKER}>
|
||||
{((QuestContentImpressionTrackerNative) => <QuestContentImpressionTrackerNative adContentId={value2.id} adCreativeType={(require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY} questContent={(require(6533) /* metro dependency 6533: QuestContent */).QuestContent.VIDEO_MODAL_MOBILE} sourceQuestContent={sourceQuestContent} overrideVisibility>{children_102955}</QuestContentImpressionTrackerNative>)((require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative)}
|
||||
</ThemeContextProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function useBountiesModalVideoLayout() { // fn#102939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:728, owner: BountiesModalContentInner.useBountiesModalVideoLayout, offset: 0x02250a79, size: 141 bytes, params: 1, frame: 17
|
||||
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
|
||||
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
return env1_4.useMemo(_fun102940, [width, height, value3.top, value3.bottom, value3.left, value3.right]);
|
||||
}
|
||||
|
||||
function _fun102941() { // fn#102941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:1099, offset: 0x02250be2, size: 69 bytes, params: 1, frame: 4
|
||||
const binding = env0_3;
|
||||
return [styles.videoWrapper, {top: binding.top, left: binding.left, width: binding.width, height: binding.height}];
|
||||
}
|
||||
|
||||
function _fun102942() { // fn#102942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:1208, offset: 0x02250c27, size: 146 bytes, params: 1, frame: 17
|
||||
const items2 = [styles.closeButton];
|
||||
const object2 = {};
|
||||
const binding = env0_3;
|
||||
const top = binding.top;
|
||||
let value = environment.__proto__;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.top = top + PX_8;
|
||||
value = binding.left + binding.width;
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
value -= PX_32;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.left = value - PX_8;
|
||||
items2[1] = object2;
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun102943() { // fn#102943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:1373, offset: 0x02250cb9, size: 97 bytes, params: 1, frame: 6
|
||||
const isFullWidth = env0_3.isFullWidth;
|
||||
const stylesBinding = styles;
|
||||
const bottomContainer = stylesBinding.bottomContainer;
|
||||
return isFullWidth ? [bottomContainer, stylesBinding.bottomContainerFullWidth] : [bottomContainer,
|
||||
stylesBinding.bottomContainerNotFullWidth, {left: env0_3.left, width: env0_3.width}];
|
||||
}
|
||||
|
||||
function* _fun102946() { // fn#102946, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:2133, offset: 0x02250d45, size: 121 bytes, params: 1, frame: 14
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value3;
|
||||
var claimBountyReward;
|
||||
var id;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var error;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value = binding(env2_2[18]);
|
||||
value.openBountyRewardClaimErrorToast(error);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value = binding(env2_2[18]);
|
||||
value.openBountyRewardClaimErrorToast(error);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding2[17];
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value = binding(env2_2[18]);
|
||||
value.openBountyRewardClaimErrorToast(error);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value3 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value = binding(env2_2[18]);
|
||||
value.openBountyRewardClaimErrorToast(error);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
claimBountyReward = value3.claimBountyReward;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value = binding(env2_2[18]);
|
||||
value.openBountyRewardClaimErrorToast(error);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value = binding(env2_2[18]);
|
||||
value.openBountyRewardClaimErrorToast(error);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
id = require.id;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value = binding(env2_2[18]);
|
||||
value.openBountyRewardClaimErrorToast(error);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value = binding(env2_2[18]);
|
||||
value.openBountyRewardClaimErrorToast(error);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value5 = Reflect.apply(claimBountyReward, value3, [id, importDefault]);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value = binding(env2_2[18]);
|
||||
value.openBountyRewardClaimErrorToast(error);
|
||||
return undefined;
|
||||
}
|
||||
yield value5;
|
||||
try {
|
||||
value6 = undefined;
|
||||
value7 = false;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value = binding(env2_2[18]);
|
||||
value.openBountyRewardClaimErrorToast(error);
|
||||
return undefined;
|
||||
}
|
||||
if (value7) {
|
||||
return value6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102948() { // fn#102948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:3138, offset: 0x02250de3, size: 325 bytes, params: 1, frame: 22
|
||||
const value = environment.__proto__;
|
||||
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
|
||||
const object3 = {};
|
||||
object3.adContentId = bounty.id;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const BOUNTY = AdCreativeType.BOUNTY;
|
||||
object3.adCreativeType = BOUNTY;
|
||||
const AD_VIDEO_MODAL_CLOSED = AnalyticEvents.AD_VIDEO_MODAL_CLOSED;
|
||||
object3.event = AD_VIDEO_MODAL_CLOSED;
|
||||
const object4 = {};
|
||||
const analyticsTypesModule = require(7120) /* metro dependency 7120: AnalyticsTypes */;
|
||||
const getQuestContentName = analyticsTypesModule.getQuestContentName;
|
||||
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
|
||||
let VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
|
||||
object4.content_name = Reflect.apply(getQuestContentName, analyticsTypesModule, [VIDEO_MODAL_MOBILE]);
|
||||
VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
|
||||
object4.content_id = VIDEO_MODAL_MOBILE;
|
||||
const videoQuestUtilsModule = require(9522) /* metro dependency 9522: VideoQuestUtils */;
|
||||
object4.video_progress = videoQuestUtilsModule.formatVideoProgressRatio(maxVideoProgressSeconds, videoDuration ?? 0);
|
||||
object4.threshold_met = 1000 * maxVideoProgressSeconds >= env0_4;
|
||||
object4.reward_timer_seconds = env0_4 / 1000;
|
||||
object3.properties = object4;
|
||||
object3.sourceQuestContent = sourceQuestContent;
|
||||
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object3]);
|
||||
flushProgress();
|
||||
(importDefault(13515) /* metro dependency 13515: BountiesModalActionCreators */).hideModal();
|
||||
}
|
||||
|
||||
function _fun102949() { // fn#102949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:3621, offset: 0x02250f28, size: 311 bytes, params: 1, frame: 22
|
||||
const value = environment.__proto__;
|
||||
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
|
||||
const object3 = {};
|
||||
object3.adContentId = bounty.id;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const BOUNTY = AdCreativeType.BOUNTY;
|
||||
object3.adCreativeType = BOUNTY;
|
||||
const AD_VIDEO_MODAL_CLOSED = AnalyticEvents.AD_VIDEO_MODAL_CLOSED;
|
||||
object3.event = AD_VIDEO_MODAL_CLOSED;
|
||||
const object4 = {};
|
||||
const analyticsTypesModule = require(7120) /* metro dependency 7120: AnalyticsTypes */;
|
||||
const getQuestContentName = analyticsTypesModule.getQuestContentName;
|
||||
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
|
||||
let VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
|
||||
object4.content_name = Reflect.apply(getQuestContentName, analyticsTypesModule, [VIDEO_MODAL_END_CARD]);
|
||||
VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
|
||||
object4.content_id = VIDEO_MODAL_END_CARD;
|
||||
const videoQuestUtilsModule = require(9522) /* metro dependency 9522: VideoQuestUtils */;
|
||||
object4.video_progress = videoQuestUtilsModule.formatVideoProgressRatio(maxVideoProgressSeconds, videoDuration ?? 0);
|
||||
object4.threshold_met = true;
|
||||
object4.reward_timer_seconds = env0_4 / 1000;
|
||||
object3.properties = object4;
|
||||
object3.sourceQuestContent = sourceQuestContent;
|
||||
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object3]);
|
||||
flushProgress();
|
||||
(importDefault(13515) /* metro dependency 13515: BountiesModalActionCreators */).hideModal();
|
||||
}
|
||||
|
||||
function BountiesModalContentInnerRenderEndCard() { // fn#102950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:4468, owner: BountiesModalContentInner.renderEndCard, offset: 0x0225105f, size: 151 bytes, params: 1, frame: 17
|
||||
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
||||
const id = bounty.id;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const BOUNTY = AdCreativeType.BOUNTY;
|
||||
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
|
||||
const VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
|
||||
return (
|
||||
<QuestContentImpressionTrackerNative
|
||||
adContentId={id}
|
||||
adCreativeType={BOUNTY}
|
||||
questContent={VIDEO_MODAL_END_CARD}
|
||||
sourceQuestContent={sourceQuestContent}
|
||||
overrideVisibility={isEndCardVisible}
|
||||
>
|
||||
{children_102951}
|
||||
</QuestContentImpressionTrackerNative>
|
||||
);
|
||||
}
|
||||
|
||||
function BountiesModalContentChildren() { // fn#102955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:5437, owner: BountiesModalContent.children, offset: 0x0225131a, size: 44 bytes, params: 1, frame: 14
|
||||
return <BountiesModalContentInner bounty={env0_2} sourceQuestContent={sourceQuestContent} />;
|
||||
}
|
||||
|
||||
function _fun102940() { // fn#102940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:834, offset: 0x02250b06, size: 220 bytes, params: 1, frame: 20
|
||||
var r1;
|
||||
var r4;
|
||||
var r6;
|
||||
var value9;
|
||||
const widthBinding = width;
|
||||
let binding = env0_2;
|
||||
const value3 = widthBinding - binding.left - binding.right;
|
||||
const value5 = height - binding.top - binding.bottom;
|
||||
const value7 = value3 / env2_13;
|
||||
if (value7 > value5) {
|
||||
value9 = value5 * env2_13;
|
||||
r1 = false;
|
||||
r4 = value5;
|
||||
r6 = value9;
|
||||
} else {
|
||||
r1 = true;
|
||||
r4 = value7;
|
||||
r6 = value3;
|
||||
}
|
||||
const object2 = {};
|
||||
let Math = global.Math;
|
||||
const floor = Math.floor;
|
||||
binding = env0_2;
|
||||
object2.top = Reflect.apply(floor, Math, [binding.top + (value5 - r4) / 2]);
|
||||
Math = global.Math;
|
||||
object2.left = Math.floor(binding.left + (value3 - r6) / 2);
|
||||
Math = global.Math;
|
||||
object2.width = Math.floor(r6);
|
||||
Math = global.Math;
|
||||
object2.height = Math.floor(r4);
|
||||
object2.isFullWidth = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function renderEndCardChildren_102951() { // fn#102951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13742:4690, owner: BountiesModalContentInner.renderEndCard.children, offset: 0x022510f6, size: 69 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ((Component) => <Component bounty={bounty} visible={isEndCardVisible} sourceQuestContent={sourceQuestContent} />)(importDefault(13553) /* metro dependency 13553: BountiesModalEndCard */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,879 @@
|
||||
/* Metro module 13517; source: modules/quests/native/BountiesModal/BountiesModalContentScroll.tsx; dependencies: [57, 31, 27, 7092, 6528, 661, 1376, 33, 478, 697, 4501, 4017, 1478, 1585, 13518, 9483, 9530, 566, 13520, 1365, 7013, 491, 7110, 7120, 13521, 9484, 7121, 6533, 9522, 13515, 13522, 13544, 13545, 10183, 13546, 8416, 13550, 3880, 13551, 2] */
|
||||
function _fun102693(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:6, offset: 0x02244f89, size: 790 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const bountyStore = importDefault(7092) /* metro dependency 7092: BountyStore */;
|
||||
let value = require(6528) /* metro dependency 6528: QuestConstants */;
|
||||
const env0_7 = value.DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID;
|
||||
const env0_8 = value.QuestsExperimentLocations;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_10 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value.jsx;
|
||||
const env0_12 = value.jsxs;
|
||||
const env0_13 = (require(478) /* metro dependency 478: PlatformUtils */).isAndroid();
|
||||
const env0_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object = {code: 'function isScrollEventInBounds_BountiesModalContentScrollTsx1(event){const maxOffset=Math.max(0,event.contentSize.height-event.layoutMeasurement.height);return event.contentOffset.y>=0&&event.contentOffset.y<=maxOffset;}'};
|
||||
const env0_20 = _fun102745();
|
||||
const env0_21 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102747);
|
||||
object = {code: 'function BountiesModalContentScrollTsx2(){const{scrollY,index,slotHeight,interpolate,FADE_DEADBAND,Extrapolation}=this.__closure;const distance=Math.abs(scrollY.get()-index*slotHeight)/slotHeight;return{opacity:interpolate(distance,[0,FADE_DEADBAND,1],[1,1,0],Extrapolation.CLAMP)};}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx3(event){const{scrollY,isDraggingSharedValue,isScrollingInBoundsSharedValue,isScrollEventInBounds}=this.__closure;scrollY.set(event.contentOffset.y);if(isDraggingSharedValue.get()){isScrollingInBoundsSharedValue.set(isScrollEventInBounds(event));}}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx4(event){const{isDraggingSharedValue,isScrollingInBoundsSharedValue,isScrollEventInBounds}=this.__closure;isDraggingSharedValue.set(true);isScrollingInBoundsSharedValue.set(isScrollEventInBounds(event));}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx5(){const{isDraggingSharedValue,IS_ANDROID,isScrollingInBoundsSharedValue}=this.__closure;isDraggingSharedValue.set(false);if(!IS_ANDROID){isScrollingInBoundsSharedValue.set(false);}}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx6(event){const{showRecapPullZone,runOnJS,handleRecapMomentumEnd,isScrollingInBoundsSharedValue}=this.__closure;if(showRecapPullZone){runOnJS(handleRecapMomentumEnd)(event);}isScrollingInBoundsSharedValue.set(false);}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx7(){const{scrollY,slotHeight,lastBountyIndex}=this.__closure;return Math.min(Math.max(Math.round(scrollY.get()/slotHeight),0),lastBountyIndex);}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx8(next,prev){const{runOnJS,commitSwipe}=this.__closure;if(next!==prev){runOnJS(commitSwipe)(next);}}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx9(){const{showRecapPullZone,scrollY,lastBountyScrollOffset,RECAP_SNAP_EPSILON}=this.__closure;return showRecapPullZone&&scrollY.get()>=lastBountyScrollOffset-RECAP_SNAP_EPSILON;}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx10(show,previousShow){const{runOnJS,setShowRecapFooter}=this.__closure;if(show!==previousShow){runOnJS(setShowRecapFooter)(show);}}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx11(){const{showRecapPullZone,scrollY,lastBountyScrollOffset}=this.__closure;return showRecapPullZone&&scrollY.get()>lastBountyScrollOffset;}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx12(revealed,previousRevealed){const{runOnJS,setIsRecapPageRevealed}=this.__closure;if(revealed!==previousRevealed){runOnJS(setIsRecapPageRevealed)(revealed);}}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx13(){const{showRecapPullZone,scrollY,fullRecapScrollOffset,RECAP_SNAP_EPSILON}=this.__closure;return showRecapPullZone&&scrollY.get()>=fullRecapScrollOffset-RECAP_SNAP_EPSILON;}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx14(onTop,previousOnTop){const{runOnJS,setIsRecapPageOnTop}=this.__closure;if(onTop!==previousOnTop){runOnJS(setIsRecapPageOnTop)(onTop);}}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx15(){const{getRevealProgress,scrollY,lastBountyScrollOffset,recapRevealHeight}=this.__closure;return getRevealProgress(scrollY.get(),lastBountyScrollOffset,recapRevealHeight);}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx16(){const{interpolate,recapPullProgress,Extrapolation}=this.__closure;return{opacity:interpolate(recapPullProgress.get(),[0,1],[0,1],Extrapolation.CLAMP)};}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx17(){const{interpolate,recapPullProgress,FOOTER_FADE_START_PROGRESS,FOOTER_FADE_END_PROGRESS,Extrapolation}=this.__closure;return{opacity:interpolate(recapPullProgress.get(),[FOOTER_FADE_START_PROGRESS,FOOTER_FADE_END_PROGRESS],[1,0],Extrapolation.CLAMP)};}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx18(){const{scrollY,lastBountyScrollOffset,slotHeight,recapPullProgress,getRevealProgress,recapRevealHeight,interpolate,FOOTER_FADE_START_PROGRESS,FOOTER_FADE_END_PROGRESS,Extrapolation}=this.__closure;const progress=scrollY.get()>=lastBountyScrollOffset-slotHeight/2?recapPullProgress.get():getRevealProgress(scrollY.get(),0,recapRevealHeight);return{opacity:interpolate(progress,[FOOTER_FADE_START_PROGRESS,FOOTER_FADE_END_PROGRESS],[1,0],Extrapolation.CLAMP)};}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx19(){const{recapPullProgress,FOOTER_FADE_END_PROGRESS}=this.__closure;return recapPullProgress.get()<FOOTER_FADE_END_PROGRESS;}'};
|
||||
object = {code: 'function BountiesModalContentScrollTsx20(pressable,previousPressable){const{runOnJS,setIsCloseButtonPressable}=this.__closure;if(pressable!==previousPressable){runOnJS(setIsCloseButtonPressable)(pressable);}}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalContentScroll.tsx');
|
||||
exports.default = BountiesModalContentScroll;
|
||||
}
|
||||
|
||||
function ItemSeparator_102694({trailingItem}) { // fn#102694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:391, offset: 0x0224529f, size: 55 bytes, params: 2, frame: 15
|
||||
const value = null;
|
||||
return value == trailingItem ? value : <View style={{height: PX_8}} />;
|
||||
}
|
||||
|
||||
function BountiesScrollVideoItemContainer({index, slotHeight, scrollY, style, children}) { // fn#102696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:1581, offset: 0x022452d6, size: 244 bytes, params: 2, frame: 23
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = BountiesScrollVideoItemContainerI;
|
||||
const object2 = {scrollY: scrollY, index: index, slotHeight: slotHeight};
|
||||
object2.interpolate = reanimatedRexportModule.interpolate;
|
||||
object2.FADE_DEADBAND = 0.3;
|
||||
const Extrapolation = reanimatedRexportModule.Extrapolation;
|
||||
object2.Extrapolation = Extrapolation;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 15300322839358;
|
||||
closure.__initData = env0_22;
|
||||
const value2 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View style={[style, value2]}>
|
||||
{children}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInner({initialBountyId, sourceQuestContent}) { // fn#102698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:6344, offset: 0x0224545b, size: 4162 bytes, params: 2, frame: 59
|
||||
var object3;
|
||||
const styles = useStyles();
|
||||
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
|
||||
const env0_3 = height;
|
||||
let binding = env0_4;
|
||||
const value3 = binding.useRef(null);
|
||||
binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const BOUNTIES_MODAL_BASE_FOOTER_HEIGHT = (require(13518) /* metro dependency 13518: BountiesScrollPromptFooter */).BOUNTIES_MODAL_BASE_FOOTER_HEIGHT;
|
||||
const value5 = env0_3(Reflect.apply(useState, binding, [BOUNTIES_MODAL_BASE_FOOTER_HEIGHT]), 2);
|
||||
let property = value5[0];
|
||||
var env0_4 = value5[1];
|
||||
binding = env0_4;
|
||||
let closure = _fun102699;
|
||||
const value6 = binding.useCallback(closure, []);
|
||||
const value7 = useBountiesScrollVideoLayout({footerHeight: property});
|
||||
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
|
||||
const useQuestHomeBounties = questHooksModule.useQuestHomeBounties;
|
||||
const env0_6 = Reflect.apply(useQuestHomeBounties, questHooksModule, []).questHomeBounties;
|
||||
property = env0_3(env0_4.useState(_fun102702), 1)[0];
|
||||
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
|
||||
const useConfig = BountiesStage1Experiment.useConfig;
|
||||
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
|
||||
const {orbAmount, rewardTimerSeconds} = Reflect.apply(useConfig, BountiesStage1Experiment,
|
||||
[{location: VIDEO_MODAL_MOBILE}]);
|
||||
const value10 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], _fun102704,
|
||||
[property, orbAmount]);
|
||||
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], _fun102705,
|
||||
[property[0], rewardTimerSeconds]);
|
||||
const height2 = value7.height;
|
||||
const value12 = height2 + PX_8;
|
||||
const value13 = property.length - 1;
|
||||
const env0_13 = value13;
|
||||
const value14 = value10 > 0;
|
||||
const value15 = value13 * value12;
|
||||
const value16 = value15 + height2;
|
||||
const env0_17 = value16;
|
||||
const value17 = env0_4.useMemo(_fun102706, [value16, value15, height2]);
|
||||
const useBountiesRecapScrollModule = require(13520) /* metro dependency 13520: useBountiesRecapScroll */;
|
||||
const useBountiesRecapScroll = useBountiesRecapScrollModule.useBountiesRecapScroll;
|
||||
const handleRecapMomentumEnd = Reflect.apply(useBountiesRecapScroll, useBountiesRecapScrollModule,
|
||||
[{listRef: value3, enabled: value14, offsets: value17}]).handleRecapMomentumEnd;
|
||||
const env0_18 = handleRecapMomentumEnd;
|
||||
const value18 = env0_4.useMemo(_fun102707, [property, value16, value14, value12]);
|
||||
const [property3, property4] = env0_3(env0_4.useState(false), 2);
|
||||
const env0_20 = property4;
|
||||
const [property5, property6] = env0_3(env0_4.useState(false), 2);
|
||||
const [property7, property8] = env0_3(env0_4.useState(true), 2);
|
||||
const env0_23 = property8;
|
||||
const [property9, property10] = env0_3(env0_4.useState(false), 2);
|
||||
const env0_24 = property10;
|
||||
const value28 = env0_3(env0_4.useState(0), 2);
|
||||
const property11 = value28[0];
|
||||
const env0_25 = property11;
|
||||
const env0_26 = value28[1];
|
||||
const value29 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
const env0_27 = value29;
|
||||
const value30 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
const env0_28 = value30;
|
||||
const value31 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const env0_29 = value31;
|
||||
const value33 = env0_3((require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent(property.length > 1 ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.BOUNTIES_SWIPE_UP_NUX] : []),
|
||||
2);
|
||||
const property12 = value33[0];
|
||||
const property13 = value33[1];
|
||||
const env0_30 = property13;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const BOUNTIES_SWIPE_UP_NUX = DismissibleContent.BOUNTIES_SWIPE_UP_NUX;
|
||||
const r18 = property11 === 0 && property12 === BOUNTIES_SWIPE_UP_NUX;
|
||||
const env0_31 = r18;
|
||||
let r13 = value11 && r18;
|
||||
const value36 = env0_4.useMemo(_fun102709, []);
|
||||
const env0_32 = value36;
|
||||
const env0_33 = env0_4.useRef(0);
|
||||
const env0_34 = env0_4.useRef(0);
|
||||
env0_4.useEffect(_fun102710, []);
|
||||
const value37 = env0_4.useCallback(_fun102711, [value36]);
|
||||
const env0_35 = value37;
|
||||
const value38 = env0_4.useCallback(_fun102712, [property13, value37, r18]);
|
||||
const env0_36 = value38;
|
||||
const env0_37 = (require(13521) /* metro dependency 13521: useBountiesRecapOrbCount */).useBountiesRecapOrbCount({scrollY: value31,
|
||||
lastBountyScrollOffset: value15, recapRevealHeight: height2, targetOrbAmount: value10, enabled: value14});
|
||||
env0_4.useEffect(_fun102713, [property, property11]);
|
||||
const value39 = env0_4.useCallback(_fun102714, [property, property11, rewardTimerSeconds, sourceQuestContent]);
|
||||
const env0_38 = env0_4.useCallback(_fun102715, [sourceQuestContent]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedScrollHandler = reanimatedRexportModule.useAnimatedScrollHandler;
|
||||
object3 = {};
|
||||
closure = onScroll_102716;
|
||||
closure.__closure = {scrollY: value31, isDraggingSharedValue: value30, isScrollingInBoundsSharedValue: value29,
|
||||
isScrollEventInBounds: env0_20};
|
||||
closure.__workletHash = 7942598540397;
|
||||
closure.__initData = env0_23;
|
||||
object3.onScroll = closure;
|
||||
closure = onBeginDrag;
|
||||
closure.__closure = {isDraggingSharedValue: value30, isScrollingInBoundsSharedValue: value29,
|
||||
isScrollEventInBounds: env0_20};
|
||||
closure.__workletHash = 14039038912528;
|
||||
closure.__initData = env0_24;
|
||||
object3.onBeginDrag = closure;
|
||||
closure = onEndDrag;
|
||||
closure.__closure = {isDraggingSharedValue: value30, IS_ANDROID: env0_13, isScrollingInBoundsSharedValue: value29};
|
||||
closure.__workletHash = 9975335138319;
|
||||
closure.__initData = env0_25;
|
||||
object3.onEndDrag = closure;
|
||||
closure = onMomentumEnd;
|
||||
const object2 = {showRecapPullZone: value14};
|
||||
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object2.handleRecapMomentumEnd = handleRecapMomentumEnd;
|
||||
object2.isScrollingInBoundsSharedValue = value29;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 13684210320337;
|
||||
closure.__initData = env0_26;
|
||||
object3.onMomentumEnd = closure;
|
||||
const value40 = Reflect.apply(useAnimatedScrollHandler, reanimatedRexportModule, [object3]);
|
||||
const moduleValue11 = reanimatedRexportModule;
|
||||
let useAnimatedReaction = moduleValue11.useAnimatedReaction;
|
||||
closure = BountiesModalContentScrollInnerRt;
|
||||
closure.__closure = {scrollY: value31, slotHeight: value12, lastBountyIndex: value13};
|
||||
closure.__workletHash = 14048843158960;
|
||||
closure.__initData = env0_27;
|
||||
const closure2 = BountiesModalContentScrollInnerSt;
|
||||
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, commitSwipe: value38};
|
||||
closure2.__workletHash = 14015091539518;
|
||||
closure2.__initData = env0_28;
|
||||
Reflect.apply(useAnimatedReaction, moduleValue11, [closure, closure2]);
|
||||
const moduleValue12 = reanimatedRexportModule;
|
||||
useAnimatedReaction = moduleValue12.useAnimatedReaction;
|
||||
closure = BountiesModalContentScrollInnerIt;
|
||||
object3 = {showRecapPullZone: value14, scrollY: value31, lastBountyScrollOffset: value15};
|
||||
const RECAP_SNAP_EPSILON = useBountiesRecapScrollModule.RECAP_SNAP_EPSILON;
|
||||
object3.RECAP_SNAP_EPSILON = RECAP_SNAP_EPSILON;
|
||||
closure.__closure = object3;
|
||||
closure.__workletHash = 6584708256992;
|
||||
closure.__initData = env0_29;
|
||||
const closure3 = BountiesModalContentScrollInnerAt;
|
||||
closure3.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setShowRecapFooter: property10};
|
||||
closure3.__workletHash = 10788669301891;
|
||||
closure3.__initData = env0_30;
|
||||
Reflect.apply(useAnimatedReaction, moduleValue12, [closure, closure3]);
|
||||
const moduleValue13 = reanimatedRexportModule;
|
||||
useAnimatedReaction = moduleValue13.useAnimatedReaction;
|
||||
closure = BountiesModalContentScrollInnerCt;
|
||||
closure.__closure = {showRecapPullZone: value14, scrollY: value31, lastBountyScrollOffset: value15};
|
||||
closure.__workletHash = 6186370630693;
|
||||
closure.__initData = env0_31;
|
||||
const closure4 = ut;
|
||||
closure4.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setIsRecapPageRevealed: property4};
|
||||
closure4.__workletHash = 12713474352874;
|
||||
closure4.__initData = env0_32;
|
||||
Reflect.apply(useAnimatedReaction, moduleValue13, [closure, closure4]);
|
||||
const moduleValue14 = reanimatedRexportModule;
|
||||
useAnimatedReaction = moduleValue14.useAnimatedReaction;
|
||||
closure = BountiesModalContentScrollInnerDt;
|
||||
closure.__closure = {showRecapPullZone: value14, scrollY: value31, fullRecapScrollOffset: value16,
|
||||
RECAP_SNAP_EPSILON: RECAP_SNAP_EPSILON};
|
||||
closure.__workletHash = 5669564400667;
|
||||
closure.__initData = env0_33;
|
||||
const closure5 = BountiesModalContentScrollInner_t;
|
||||
closure5.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setIsRecapPageOnTop: property6};
|
||||
closure5.__workletHash = 8102193741774;
|
||||
closure5.__initData = env0_34;
|
||||
Reflect.apply(useAnimatedReaction, moduleValue14, [closure, closure5]);
|
||||
const value41 = env0_4.useMemo(_fun102728, [height2, value14]);
|
||||
const value42 = env0_4.useMemo(_fun102729, [styles.listWrapper, value7]);
|
||||
const value43 = env0_4.useMemo(_fun102730, [value7.top]);
|
||||
const value44 = env0_4.useMemo(_fun102731, [value7.width, value7.height]);
|
||||
const env0_39 = value44;
|
||||
const value45 = env0_4.useMemo(_fun102732, [styles.closeButton, value7.top, value7.left, value7.width]);
|
||||
const value46 = env0_4.useMemo(_fun102733, [property5, styles.recapPage, value7.top, value7.left, value7.width,
|
||||
height]);
|
||||
const moduleValue15 = reanimatedRexportModule;
|
||||
const useDerivedValue = moduleValue15.useDerivedValue;
|
||||
closure = BountiesModalContentScrollInnerGt;
|
||||
const getRevealProgress = useBountiesRecapScrollModule.getRevealProgress;
|
||||
closure.__closure = {getRevealProgress: getRevealProgress, scrollY: value31, lastBountyScrollOffset: value15,
|
||||
recapRevealHeight: height2};
|
||||
closure.__workletHash = 8427964721554;
|
||||
closure.__initData = env0_35;
|
||||
const value47 = Reflect.apply(useDerivedValue, moduleValue15, [closure]);
|
||||
const env0_40 = value47;
|
||||
const moduleValue16 = reanimatedRexportModule;
|
||||
let useAnimatedStyle = moduleValue16.useAnimatedStyle;
|
||||
closure = BountiesModalContentScrollInnerEt;
|
||||
object3 = {interpolate: reanimatedRexportModule.interpolate, recapPullProgress: value47};
|
||||
const Extrapolation = reanimatedRexportModule.Extrapolation;
|
||||
object3.Extrapolation = Extrapolation;
|
||||
closure.__closure = object3;
|
||||
closure.__workletHash = 1497321349449;
|
||||
closure.__initData = env0_36;
|
||||
const value48 = Reflect.apply(useAnimatedStyle, moduleValue16, [closure]);
|
||||
const moduleValue17 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue17.useAnimatedStyle;
|
||||
closure = Ot;
|
||||
object3 = {interpolate: reanimatedRexportModule.interpolate, recapPullProgress: value47,
|
||||
FOOTER_FADE_START_PROGRESS: env0_17, FOOTER_FADE_END_PROGRESS: env0_18};
|
||||
object3.Extrapolation = Extrapolation;
|
||||
closure.__closure = object3;
|
||||
closure.__workletHash = 3685190194249;
|
||||
closure.__initData = env0_37;
|
||||
const value49 = Reflect.apply(useAnimatedStyle, moduleValue17, [closure]);
|
||||
const moduleValue18 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue18.useAnimatedStyle;
|
||||
closure = BountiesModalContentScrollInnerFt;
|
||||
object3 = {scrollY: value31, lastBountyScrollOffset: value15, slotHeight: value12, recapPullProgress: value47};
|
||||
object3.getRevealProgress = getRevealProgress;
|
||||
object3.recapRevealHeight = height2;
|
||||
object3.interpolate = reanimatedRexportModule.interpolate;
|
||||
object3.FOOTER_FADE_START_PROGRESS = env0_17;
|
||||
object3.FOOTER_FADE_END_PROGRESS = env0_18;
|
||||
object3.Extrapolation = Extrapolation;
|
||||
closure.__closure = object3;
|
||||
closure.__workletHash = 15092194442650;
|
||||
closure.__initData = env0_38;
|
||||
const value50 = Reflect.apply(useAnimatedStyle, moduleValue18, [closure]);
|
||||
const moduleValue19 = reanimatedRexportModule;
|
||||
useAnimatedReaction = moduleValue19.useAnimatedReaction;
|
||||
closure = BountiesModalContentScrollInnerPt;
|
||||
closure.__closure = {recapPullProgress: value47, FOOTER_FADE_END_PROGRESS: env0_18};
|
||||
closure.__workletHash = 7847901178403;
|
||||
closure.__initData = env0_39;
|
||||
const closure6 = BountiesModalContentScrollInnerRt_102739;
|
||||
closure6.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setIsCloseButtonPressable: property8};
|
||||
closure6.__workletHash = 13255883555182;
|
||||
closure6.__initData = env0_40;
|
||||
Reflect.apply(useAnimatedReaction, moduleValue19, [closure, closure6]);
|
||||
const value51 = env0_4.useCallback(_fun102740, [value12, value31, value44, sourceQuestContent, value7.width,
|
||||
value7.height, property11, property3, property5, value29]);
|
||||
const value52 = env0_4.useMemo(_fun102741, [property11, property3, property5, value7.width, value7.height]);
|
||||
const value53 = env0_4.useCallback(function(a0) {
|
||||
a0.size = height;
|
||||
}, [height2]);
|
||||
if (property.length === 0) {
|
||||
return null;
|
||||
}
|
||||
const r9 = r13 ? ((Component) => <Component />)(importDefault(13544) /* metro dependency 13544: BountiesScrollPromptNuxFooter */) : property9 ? ((BountiesScrollRecapFooter) => <BountiesScrollRecapFooter orbAmount={value10} />)((require(13545) /* metro dependency 13545: BountiesScrollRecapFooter */).BountiesScrollRecapFooter) : null;
|
||||
const items4 = [value14 ? ((View) => <View style={[value46,
|
||||
value48]} pointerEvents={property5 ? 'box-none' : 'none'}>{((QuestContentImpressionTrackerNative) => <QuestContentImpressionTrackerNative adContentId={DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID} adCreativeType={(require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY} questContent={(require(6533) /* metro dependency 6533: QuestContent */).QuestContent.BOUNTIES_END_INTERSTITIAL} overrideVisibility={property5} sourceQuestContent={sourceQuestContent}>{children_102743}</QuestContentImpressionTrackerNative>)((require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View) : null];
|
||||
const AnimatedFlashList = (require(8416) /* metro dependency 8416: flashList */).AnimatedFlashList;
|
||||
items4[1] = <View style={value42}><AnimatedFlashList ref={value3} data={property} keyExtractor={function(a0) {
|
||||
return a0.id;
|
||||
}} renderItem={value51} extraData={value52} overrideItemLayout={value53} ItemSeparatorComponent={ItemSeparator_102694} ListFooterComponent={value41} snapToOffsets={value18} snapToEnd={false} estimatedItemSize={value12} decelerationRate={0.85} showsVerticalScrollIndicator={false} drawDistance={value12} onScroll={value40} scrollEventThrottle={16} contentContainerStyle={value43} /></View>;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
items4[2] = <View3 style={[value45,
|
||||
value49]} pointerEvents={property7 ? 'box-none' : 'none'}>{property7 ? ((Component) => <Component onPress={value39} />)(importDefault(13550) /* metro dependency 13550: BountiesModalCloseButton */) : null}</View3>;
|
||||
const BountiesScrollPromptFooter = importDefault(13518) /* metro dependency 13518: BountiesScrollPromptFooter */;
|
||||
r13 = !r13 ? property9 : r13;
|
||||
items4[3] = <BountiesScrollPromptFooter visible={r13} onContentLayout={value6} zIndex={env0_14} opacityStyle={value50}>{r9}</BountiesScrollPromptFooter>;
|
||||
return (
|
||||
<View style={styles.root}>
|
||||
{items4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun102745() { // fn#102745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:714, offset: 0x0224739d, size: 48 bytes, params: 1, frame: 2
|
||||
const closure = function(a0) {
|
||||
var Math = global.Math;
|
||||
return a0.contentOffset.y >= 0 && a0.contentOffset.y <= Math.max(0,
|
||||
a0.contentSize.height - a0.layoutMeasurement.height);
|
||||
};
|
||||
closure.__closure = {};
|
||||
closure.__workletHash = 14148486927190;
|
||||
closure.__initData = env0_19;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun102747() { // fn#102747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:1135, offset: 0x02247422, size: 83 bytes, params: 1, frame: 3
|
||||
return {root: {flex: 1}, recapPage: {'position': 'absolute', 'zIndex': 0}, listWrapper: {'position': 'absolute',
|
||||
'zIndex': 1}, closeButton: {position: 'absolute', zIndex: env0_14}};
|
||||
}
|
||||
|
||||
function BountiesModalContentScroll({bountyId, sourceQuestContent}) { // fn#102748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:16725, offset: 0x02247475, size: 119 bytes, params: 2, frame: 19
|
||||
const ThemeContextProvider = (require(3880) /* metro dependency 3880: ThemeContextProvider */).ThemeContextProvider;
|
||||
const ThemeTypes = (require(13551) /* metro dependency 13551: ThemeTypes */).ThemeTypes;
|
||||
const DARKER = ThemeTypes.DARKER;
|
||||
return (
|
||||
<ThemeContextProvider theme={DARKER}>
|
||||
<BountiesModalContentScrollInner initialBountyId={bountyId} sourceQuestContent={sourceQuestContent} />
|
||||
</ThemeContextProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function BountiesScrollVideoItemContainerI() { // fn#102697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:1714, owner: BountiesScrollVideoItemContainer.i, offset: 0x022453ca, size: 145 bytes, params: 1, frame: 19
|
||||
const Math = global.Math;
|
||||
const abs = Math.abs;
|
||||
const value2 = scrollY.get();
|
||||
const indexBinding = index;
|
||||
const slotHeightBinding = slotHeight;
|
||||
const value = Reflect.apply(abs, Math, [value2 - indexBinding * slotHeightBinding]) / slotHeightBinding;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = reanimatedRexportModule.interpolate;
|
||||
const Extrapolation = reanimatedRexportModule.Extrapolation;
|
||||
const CLAMP = Extrapolation.CLAMP;
|
||||
return {opacity: Reflect.apply(interpolate, reanimatedRexportModule, [value, [0, 0.3, 1], [1, 1, 0], CLAMP])};
|
||||
}
|
||||
|
||||
function _fun102699({nativeEvent}) { // fn#102699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:6572, offset: 0x0224649d, size: 55 bytes, params: 2, frame: 11
|
||||
const Math = global.Math;
|
||||
env0_4(Math.ceil(nativeEvent.layout.height));
|
||||
}
|
||||
|
||||
function useBountiesScrollVideoLayout({footerHeight}) { // fn#102700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:6634, owner: BountiesModalContentScrollInner.useBountiesScrollVideoLayout, offset: 0x022464d4, size: 149 bytes, params: 2, frame: 18
|
||||
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
|
||||
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
return env1_4.useMemo(_fun102701, [width, height, value3.top, value3.left, value3.right, footerHeight]);
|
||||
}
|
||||
|
||||
function _fun102702() { // fn#102702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:7038, offset: 0x0224661e, size: 86 bytes, params: 1, frame: 17
|
||||
var r0;
|
||||
var items2;
|
||||
var value;
|
||||
const index = questHomeBounties.findIndex(function({id}) {
|
||||
return id === initialBountyId;
|
||||
});
|
||||
if (index <= 0) {
|
||||
r0 = questHomeBounties;
|
||||
} else {
|
||||
questHomeBountiesBinding = questHomeBounties;
|
||||
value = questHomeBountiesBinding.slice(index);
|
||||
items2 = [];
|
||||
value = arraySpread(items2, value, 0, index);
|
||||
arraySpread(items2, questHomeBountiesBinding.slice(0, index), value, index);
|
||||
r0 = items2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun102704() { // fn#102704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:7296, offset: 0x02246674, size: 37 bytes, params: 1, frame: 12
|
||||
return BountyStore.getCompletedBountyCount(env0_7) * orbAmount;
|
||||
}
|
||||
|
||||
function _fun102705() { // fn#102705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:7388, offset: 0x02246699, size: 67 bytes, params: 1, frame: 13
|
||||
if (env0_10 == null) {
|
||||
return false;
|
||||
}
|
||||
const bountyVideoProgress = BountyStore.getBountyVideoProgress(env0_10.id);
|
||||
return bountyVideoProgress != null && bountyVideoProgress.maxTimestampSec >= rewardTimerSeconds;
|
||||
}
|
||||
|
||||
function _fun102706() { // fn#102706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:7582, offset: 0x022466dc, size: 34 bytes, params: 1, frame: 3
|
||||
return {lastBounty: env0_16, fullRecap: env0_17, revealHeight: height};
|
||||
}
|
||||
|
||||
function _fun102707() { // fn#102707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:7753, offset: 0x022466fe, size: 49 bytes, params: 1, frame: 12
|
||||
const value2 = env0_7.map(_fun102708);
|
||||
if (result) {
|
||||
value2.push(env0_17);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun102710() { // fn#102710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:8460, offset: 0x0224673f, size: 34 bytes, params: 1, frame: 10
|
||||
const binding = env0_33;
|
||||
const Date = global.Date;
|
||||
binding.current = Date.now();
|
||||
}
|
||||
|
||||
function _fun102711(a0) { // fn#102711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:8515, offset: 0x02246761, size: 231 bytes, params: 2, frame: 20
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
var moduleValue;
|
||||
var trackBountyVerticalScroll;
|
||||
var object2;
|
||||
const VerticalScrollingDirection = (require(7120) /* metro dependency 7120: AnalyticsTypes */).VerticalScrollingDirection;
|
||||
const current = env0_34.current;
|
||||
if (a0 !== current) {
|
||||
env0_34.current = a0;
|
||||
value2 = global.Date.now();
|
||||
value3 = value2 - env0_33.current;
|
||||
env0_33.current = value2;
|
||||
value4 = environment.__proto__;
|
||||
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
trackBountyVerticalScroll = moduleValue.trackBountyVerticalScroll;
|
||||
object2 = {};
|
||||
object2.scrollingType = (require(7120) /* metro dependency 7120: AnalyticsTypes */).BountyScrollingType.MANUAL;
|
||||
object2.scrollingDirection = a0 > current ? VerticalScrollingDirection.DOWN : VerticalScrollingDirection.UP;
|
||||
object2.verticalScrollingPosition = a0;
|
||||
object2.scrollSessionId = env0_32;
|
||||
object2.timeWatchedPreScrollMs = value3;
|
||||
Reflect.apply(trackBountyVerticalScroll, moduleValue, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102712(a0) { // fn#102712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:8894, offset: 0x02246848, size: 66 bytes, params: 2, frame: 13
|
||||
env0_26(a0);
|
||||
env0_35(a0);
|
||||
let binding = env0_31;
|
||||
if (binding && a0 > 0) {
|
||||
binding = env0_30;
|
||||
value = environment.__proto__;
|
||||
binding(ContentDismissActionType.USER_DISMISS);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102713() { // fn#102713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:9093, offset: 0x0224688a, size: 99 bytes, params: 1, frame: 16
|
||||
var value;
|
||||
const property = env0_7[env0_25];
|
||||
if (property != null) {
|
||||
value = environment.__proto__;
|
||||
value = require(9484) /* metro dependency 9484: QuestActionCreators */;
|
||||
value.markAdContentSeen((require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY,
|
||||
[property.id]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102714() { // fn#102714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:9255, offset: 0x022468ed, size: 385 bytes, params: 1, frame: 25
|
||||
var maxTimestampSec;
|
||||
var r7;
|
||||
var r10;
|
||||
var value2;
|
||||
var getBountyVideoProgress;
|
||||
var id;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var value6;
|
||||
var moduleValue;
|
||||
var trackAdContentEvent;
|
||||
var object3;
|
||||
var object4;
|
||||
var moduleValue2;
|
||||
var getQuestContentName;
|
||||
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
|
||||
var VIDEO_MODAL_MOBILE;
|
||||
const property = env0_7[env0_25];
|
||||
if (property != null) {
|
||||
value2 = environment.__proto__;
|
||||
getBountyVideoProgress = BountyStore.getBountyVideoProgress;
|
||||
id = property.id;
|
||||
value3 = Reflect.apply(getBountyVideoProgress, BountyStore, [id]);
|
||||
value4 = undefined;
|
||||
maxTimestampSec = value3 == null ? value4 : value3.maxTimestampSec;
|
||||
value5 = 0;
|
||||
r7 = maxTimestampSec ?? value5;
|
||||
r10 = (value3 == null ? value4 : value3.duration) ?? value5;
|
||||
value6 = 1000 * rewardTimerSeconds;
|
||||
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
trackAdContentEvent = moduleValue.trackAdContentEvent;
|
||||
object3 = {};
|
||||
id = property.id;
|
||||
object3.adContentId = id;
|
||||
object3.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY;
|
||||
object3.event = AnalyticEvents.AD_VIDEO_MODAL_CLOSED;
|
||||
object4 = {};
|
||||
moduleValue2 = require(7120) /* metro dependency 7120: AnalyticsTypes */;
|
||||
getQuestContentName = moduleValue2.getQuestContentName;
|
||||
VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
|
||||
object4.content_name = Reflect.apply(getQuestContentName, moduleValue2, [VIDEO_MODAL_MOBILE]);
|
||||
VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
|
||||
object4.content_id = VIDEO_MODAL_MOBILE;
|
||||
object4.video_progress = (require(9522) /* metro dependency 9522: VideoQuestUtils */).formatVideoProgressRatio(r7,
|
||||
|
||||
r10);
|
||||
object4.threshold_met = 1000 * r7 >= value6;
|
||||
object4.reward_timer_seconds = value6 / 1000;
|
||||
object3.properties = object4;
|
||||
object3.sourceQuestContent = sourceQuestContent;
|
||||
Reflect.apply(trackAdContentEvent, moduleValue, [object3]);
|
||||
}
|
||||
const value = environment.__proto__;
|
||||
(importDefault(13515) /* metro dependency 13515: BountiesModalActionCreators */).hideModal();
|
||||
}
|
||||
|
||||
function _fun102715() { // fn#102715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:9881, offset: 0x02246a6e, size: 216 bytes, params: 1, frame: 20
|
||||
const value = environment.__proto__;
|
||||
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
|
||||
const object3 = {};
|
||||
object3.adContentId = DEFAULT_PLACEHOLDER_ENTRYPOINT_BOUNTY_ID;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const BOUNTY = AdCreativeType.BOUNTY;
|
||||
object3.adCreativeType = BOUNTY;
|
||||
const AD_VIDEO_MODAL_CLOSED = AnalyticEvents.AD_VIDEO_MODAL_CLOSED;
|
||||
object3.event = AD_VIDEO_MODAL_CLOSED;
|
||||
const object4 = {};
|
||||
const analyticsTypesModule = require(7120) /* metro dependency 7120: AnalyticsTypes */;
|
||||
const getQuestContentName = analyticsTypesModule.getQuestContentName;
|
||||
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
|
||||
let BOUNTIES_END_INTERSTITIAL = QuestContent.BOUNTIES_END_INTERSTITIAL;
|
||||
object4.content_name = Reflect.apply(getQuestContentName, analyticsTypesModule, [BOUNTIES_END_INTERSTITIAL]);
|
||||
BOUNTIES_END_INTERSTITIAL = QuestContent.BOUNTIES_END_INTERSTITIAL;
|
||||
object4.content_id = BOUNTIES_END_INTERSTITIAL;
|
||||
object3.properties = object4;
|
||||
object3.sourceQuestContent = sourceQuestContent;
|
||||
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object3]);
|
||||
(importDefault(13515) /* metro dependency 13515: BountiesModalActionCreators */).hideModal();
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerOnScroll(a0) { // fn#102716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:10272, owner: BountiesModalContentScrollInner.onScroll, offset: 0x02246b46, size: 79 bytes, params: 2, frame: 13
|
||||
let binding = env0_29;
|
||||
let set = binding.set;
|
||||
Reflect.apply(set, binding, [a0.contentOffset.y]);
|
||||
const get = env0_28.get;
|
||||
if (Reflect.apply(get, binding, [])) {
|
||||
binding = env0_27;
|
||||
set = binding.set;
|
||||
value = environment.__proto__;
|
||||
Reflect.apply(set, binding, [env1_20(a0)]);
|
||||
}
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerOnBeginDrag(a0) { // fn#102717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:10510, owner: BountiesModalContentScrollInner.onBeginDrag, offset: 0x02246b95, size: 52 bytes, params: 2, frame: 13
|
||||
env0_28.set(true);
|
||||
env0_27.set(env1_20(a0));
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerOnEndDrag() { // fn#102718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:10710, owner: BountiesModalContentScrollInner.onEndDrag, offset: 0x02246bc9, size: 47 bytes, params: 1, frame: 12
|
||||
env0_28.set(false);
|
||||
if (!env1_13) {
|
||||
env0_27.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerOnMomentumEnd(a0) { // fn#102719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:10903, owner: BountiesModalContentScrollInner.onMomentumEnd, offset: 0x02246bf8, size: 77 bytes, params: 2, frame: 13
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (result) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS(handleRecapMomentumEnd)(a0);
|
||||
}
|
||||
env0_27.set(false);
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerRt() { // fn#102720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:11163, owner: BountiesModalContentScrollInner.rt, offset: 0x02246c45, size: 84 bytes, params: 1, frame: 18
|
||||
const Math = global.Math;
|
||||
const min = Math.min;
|
||||
const Math2 = global.Math;
|
||||
const max = Math2.max;
|
||||
const Math3 = global.Math;
|
||||
return Reflect.apply(min, Math, [Reflect.apply(max, Math2, [Math3.round(env0_29.get() / env0_12), 0]), env0_13]);
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerSt(a0, a1) { // fn#102721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:11329, owner: BountiesModalContentScrollInner.st, offset: 0x02246c99, size: 61 bytes, params: 3, frame: 13
|
||||
var value;
|
||||
if (a0 !== a1) {
|
||||
value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(env0_36)(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerIt() { // fn#102722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:11514, owner: BountiesModalContentScrollInner.it, offset: 0x02246cd6, size: 68 bytes, params: 1, frame: 14
|
||||
var r0;
|
||||
var binding;
|
||||
var value2;
|
||||
var value;
|
||||
const resultBinding = result;
|
||||
if (resultBinding) {
|
||||
binding = env0_29;
|
||||
value2 = binding.get();
|
||||
binding = env0_16;
|
||||
value = environment.__proto__;
|
||||
value = value2 >= binding - (require(13520) /* metro dependency 13520: useBountiesRecapScroll */).RECAP_SNAP_EPSILON;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = resultBinding;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerAt(a0, a1) { // fn#102723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:11737, owner: BountiesModalContentScrollInner.at, offset: 0x02246d1a, size: 61 bytes, params: 3, frame: 13
|
||||
var value;
|
||||
if (a0 !== a1) {
|
||||
value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(env0_24)(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerCt() { // fn#102724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:11929, owner: BountiesModalContentScrollInner.ct, offset: 0x02246d57, size: 33 bytes, params: 1, frame: 11
|
||||
return result && env0_29.get() > env0_16;
|
||||
}
|
||||
|
||||
function ut(a0, a1) { // fn#102725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:12076, owner: BountiesModalContentScrollInner.ut, offset: 0x02246d78, size: 61 bytes, params: 3, frame: 13
|
||||
var value;
|
||||
if (a0 !== a1) {
|
||||
value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(env0_20)(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerDt() { // fn#102726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:12272, owner: BountiesModalContentScrollInner.dt, offset: 0x02246db5, size: 68 bytes, params: 1, frame: 14
|
||||
var r0;
|
||||
var binding;
|
||||
var value2;
|
||||
var value;
|
||||
const resultBinding = result;
|
||||
if (resultBinding) {
|
||||
binding = env0_29;
|
||||
value2 = binding.get();
|
||||
binding = env0_17;
|
||||
value = environment.__proto__;
|
||||
value = value2 >= binding - (require(13520) /* metro dependency 13520: useBountiesRecapScroll */).RECAP_SNAP_EPSILON;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = resultBinding;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInner_t(a0, a1) { // fn#102727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:12494, owner: BountiesModalContentScrollInner._t, offset: 0x02246df9, size: 61 bytes, params: 3, frame: 13
|
||||
var value;
|
||||
if (a0 !== a1) {
|
||||
value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(env0_22)(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102728() { // fn#102728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:12689, offset: 0x02246e36, size: 43 bytes, params: 1, frame: 14
|
||||
return result ? <BountiesRecapPullZone height={height} /> : null;
|
||||
}
|
||||
|
||||
function _fun102729() { // fn#102729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:12762, offset: 0x02246e61, size: 82 bytes, params: 1, frame: 4
|
||||
const binding = env0_5;
|
||||
return [styles.listWrapper, {top: 0, left: binding.left, width: binding.width,
|
||||
height: binding.top + binding.height + 97}];
|
||||
}
|
||||
|
||||
function _fun102730() { // fn#102730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:12875, offset: 0x02246eb3, size: 29 bytes, params: 1, frame: 2
|
||||
return {paddingTop: env0_5.top, paddingBottom: 97};
|
||||
}
|
||||
|
||||
function _fun102731() { // fn#102731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:12941, offset: 0x02246ed0, size: 29 bytes, params: 1, frame: 3
|
||||
const binding = env0_5;
|
||||
return {width: binding.width, height: binding.height};
|
||||
}
|
||||
|
||||
function _fun102732() { // fn#102732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:13014, offset: 0x02246eed, size: 146 bytes, params: 1, frame: 17
|
||||
const items2 = [styles.closeButton];
|
||||
const object2 = {};
|
||||
const binding = env0_5;
|
||||
const top = binding.top;
|
||||
let value = environment.__proto__;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.top = top + PX_8;
|
||||
value = binding.left + binding.width;
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
value -= PX_32;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.left = value - PX_8;
|
||||
items2[1] = object2;
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun102733() { // fn#102733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:13180, offset: 0x02246f7f, size: 113 bytes, params: 1, frame: 14
|
||||
var r2;
|
||||
var r4;
|
||||
const items2 = [styles.recapPage];
|
||||
const object2 = {};
|
||||
let binding = env0_5;
|
||||
object2.top = binding.top;
|
||||
object2.left = binding.left;
|
||||
object2.width = binding.width;
|
||||
const heightBinding = height;
|
||||
object2.height = heightBinding - binding.top;
|
||||
let value = null;
|
||||
if (env0_21) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_14;
|
||||
r2 = {zIndex: binding};
|
||||
r4 = binding;
|
||||
} else {
|
||||
r2 = value;
|
||||
r4 = heightBinding;
|
||||
}
|
||||
copyDataProperties(object2, r2, r4);
|
||||
items2[1] = object2;
|
||||
return items2;
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerGt() { // fn#102734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:13348, owner: BountiesModalContentScrollInner.gt, offset: 0x02246ff0, size: 64 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
return (require(13520) /* metro dependency 13520: useBountiesRecapScroll */).getRevealProgress(env0_29.get(),
|
||||
env0_16, height);
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerEt() { // fn#102735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:13597, owner: BountiesModalContentScrollInner.Et, offset: 0x02247030, size: 106 bytes, params: 1, frame: 20
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = value.interpolate;
|
||||
const value3 = env0_40.get();
|
||||
const Extrapolation = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolation;
|
||||
const CLAMP = Extrapolation.CLAMP;
|
||||
return {opacity: Reflect.apply(interpolate, value, [value3, [0, 1], [0, 1], CLAMP])};
|
||||
}
|
||||
|
||||
function Ot() { // fn#102736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:13875, owner: BountiesModalContentScrollInner.Ot, offset: 0x0224709a, size: 119 bytes, params: 1, frame: 22
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = reanimatedRexportModule.interpolate;
|
||||
const value3 = env0_40.get();
|
||||
const items2 = [env1_17, env1_18];
|
||||
const Extrapolation = reanimatedRexportModule.Extrapolation;
|
||||
const CLAMP = Extrapolation.CLAMP;
|
||||
return {opacity: Reflect.apply(interpolate, reanimatedRexportModule, [value3, items2, [1, 0], CLAMP])};
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerFt() { // fn#102737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:14209, owner: BountiesModalContentScrollInner.ft, offset: 0x02247111, size: 214 bytes, params: 1, frame: 22
|
||||
var r6;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
if (env0_29.get() >= env0_16 - env0_12 / 2) {
|
||||
r6 = env0_40.get();
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
moduleValue = require(13520) /* metro dependency 13520: useBountiesRecapScroll */;
|
||||
r6 = moduleValue.getRevealProgress(env0_29.get(), 0, height);
|
||||
}
|
||||
const value = environment.__proto__;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = reanimatedRexportModule.interpolate;
|
||||
const items2 = [env1_17, env1_18];
|
||||
const Extrapolation = reanimatedRexportModule.Extrapolation;
|
||||
const CLAMP = Extrapolation.CLAMP;
|
||||
return {opacity: Reflect.apply(interpolate, reanimatedRexportModule, [r6, items2, [1, 0], CLAMP])};
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerPt() { // fn#102738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:14740, owner: BountiesModalContentScrollInner.Pt, offset: 0x022471e7, size: 29 bytes, params: 1, frame: 9
|
||||
return env0_40.get() < env1_18;
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerRt_102739(a0, a1) { // fn#102739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:14872, owner: BountiesModalContentScrollInner.Rt, offset: 0x02247204, size: 61 bytes, params: 3, frame: 13
|
||||
var value;
|
||||
if (a0 !== a1) {
|
||||
value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(env0_23)(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102740({item, index}) { // fn#102740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:15059, offset: 0x02247241, size: 193 bytes, params: 2, frame: 22
|
||||
const bountiesScrollVideoItemContainerBindingProps = {index: index, slotHeight: env0_12, scrollY: env0_29,
|
||||
style: env0_39};
|
||||
const BountiesScrollVideoItem = (require(13522) /* metro dependency 13522: BountiesScrollVideoItem */).BountiesScrollVideoItem;
|
||||
const sourceQuestContentBinding = sourceQuestContent;
|
||||
const binding = env0_5;
|
||||
return (
|
||||
<BountiesScrollVideoItemContainer {...bountiesScrollVideoItemContainerBindingProps}>
|
||||
<BountiesScrollVideoItem
|
||||
bounty={item}
|
||||
sourceQuestContent={sourceQuestContentBinding}
|
||||
width={binding.width}
|
||||
height={binding.height}
|
||||
isActive={index === env0_25}
|
||||
isRecapPageRevealed={env0_19}
|
||||
isRecapPageOnTop={env0_21}
|
||||
isScrollingInBoundsSharedValue={env0_27}
|
||||
key={item.id}
|
||||
/>
|
||||
</BountiesScrollVideoItemContainer>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun102741() { // fn#102741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:15422, offset: 0x02247302, size: 56 bytes, params: 1, frame: 3
|
||||
const binding = env0_5;
|
||||
return {activeIndex: env0_25, isRecapPageRevealed: env0_19, isRecapPageOnTop: env0_21, width: binding.width,
|
||||
height: binding.height};
|
||||
}
|
||||
|
||||
function BountiesModalContentScrollInnerChildren() { // fn#102743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:16048, owner: BountiesModalContentScrollInner.children, offset: 0x0224734e, size: 79 bytes, params: 1, frame: 15
|
||||
const BountiesScrollRecapPage = (require(13546) /* metro dependency 13546: BountiesScrollRecapPage */).BountiesScrollRecapPage;
|
||||
return (
|
||||
<BountiesScrollRecapPage
|
||||
orbAmount={env0_37}
|
||||
onClose={env0_38}
|
||||
style={{flex: 1}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun102701() { // fn#102701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:6761, offset: 0x02246569, size: 181 bytes, params: 1, frame: 17
|
||||
var r3;
|
||||
var r5;
|
||||
var value8;
|
||||
const widthBinding = width;
|
||||
let binding = env0_3;
|
||||
const value3 = widthBinding - binding.left - binding.right;
|
||||
const value5 = height - binding.top - footerHeight;
|
||||
const value7 = value3 / env2_15;
|
||||
if (value7 > value5) {
|
||||
value8 = value5 * env2_15;
|
||||
r3 = value5;
|
||||
r5 = value8;
|
||||
} else {
|
||||
r3 = value7;
|
||||
r5 = value3;
|
||||
}
|
||||
const object2 = {};
|
||||
binding = env0_3;
|
||||
object2.top = binding.top;
|
||||
let Math = global.Math;
|
||||
object2.left = Math.floor(binding.left + (value3 - r5) / 2);
|
||||
Math = global.Math;
|
||||
object2.width = Math.floor(r5);
|
||||
Math = global.Math;
|
||||
object2.height = Math.floor(r3);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun102708(a0, a1) { // fn#102708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13707:7772, offset: 0x0224672f, size: 16 bytes, params: 3, frame: 2
|
||||
return a1 * env1_12;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
/* Metro module 13553; source: modules/quests/native/BountiesModal/BountiesModalEndCard.tsx; dependencies: [27, 33, 4501, 697, 13542, 9495, 4017, 4504, 4507, 4589, 9520, 7121, 6533, 7120, 5475, 4573, 2] */
|
||||
function _fun102956(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:6, offset: 0x02251346, size: 222 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.Pressable;
|
||||
const env0_4 = value.StyleSheet;
|
||||
const env0_5 = value.View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102957);
|
||||
object = {code: 'function BountiesModalEndCardTsx1(){const{withTiming,visible,timingStandard}=this.__closure;return{opacity:withTiming(visible?1:0,timingStandard)};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalEndCard.tsx');
|
||||
exports.default = BountiesModalEndCard;
|
||||
}
|
||||
|
||||
function _fun102957() { // fn#102957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:195, offset: 0x02251424, size: 249 bytes, params: 1, frame: 17
|
||||
const object6 = {container: {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
|
||||
'justifyContent': 'center', 'alignItems': 'center'}};
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
||||
object7['backgroundColor'] = 'rgba(241, 251, 169, 0.15)';
|
||||
object6.backdropTint = object7;
|
||||
const object8 = {};
|
||||
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
|
||||
object6.backdropGradient = object8;
|
||||
const object9 = {'width': 92, 'height': 92, 'borderRadius': null, 'borderWidth': 1};
|
||||
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
||||
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object9.borderColor = BORDER_MUTED;
|
||||
object6.image = object9;
|
||||
const object10 = {};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object10.gap = PX_4;
|
||||
object10.alignItems = 'center';
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object10.marginTop = PX_12;
|
||||
object6.info = object10;
|
||||
object6.ctaContainer = {'position': 'relative', 'alignItems': 'center'};
|
||||
return object6;
|
||||
}
|
||||
|
||||
function BountiesModalEndCard({bounty, visible, sourceQuestContent}) { // fn#102958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:849, offset: 0x0225151d, size: 693 bytes, params: 2, frame: 28
|
||||
var r0;
|
||||
var View2;
|
||||
var items2;
|
||||
var label;
|
||||
var items3;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var items4;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const bountyCtaInfo = (require(13542) /* metro dependency 13542: BountyCtaHelpers */).getBountyCtaInfo(bounty);
|
||||
const r17 = bountyCtaInfo.iconImageUri != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({'assetUrl': null,
|
||||
'width': 92, 'height': 92, assetUrl: bountyCtaInfo.iconImageUri}) : undefined;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = function() {
|
||||
var object = {};
|
||||
var moduleValue = require(dependencyMap[7]);
|
||||
object.opacity = moduleValue.withTiming(visible ? 1 : 0, require(dependencyMap[8]).timingStandard);
|
||||
return object;
|
||||
};
|
||||
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, visible: visible,
|
||||
timingStandard: (require(4507) /* metro dependency 4507: timingPresets */).timingStandard};
|
||||
closure.__workletHash = 15062259404736;
|
||||
closure.__initData = env0_9;
|
||||
if (visible) {
|
||||
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
var view2Props = {style: [styles.container, Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
|
||||
[closure])],
|
||||
pointerEvents: 'box-none'};
|
||||
items2 = [<View style={styles.backdropTint} />];
|
||||
items2[1] = ((Component) => <Component colors={['rgba(0, 0, 0, 0.60)', 'rgba(0, 0, 0, 1)']} locations={[0,
|
||||
0.841]} style={styles.backdropGradient} />)(importDefault(4589) /* metro dependency 4589 */);
|
||||
var pressableBindingProps = {'onPress': null, 'hitSlop': 16, 'accessibilityRole': 'button',
|
||||
onPress: onPress_102960};
|
||||
label = bountyCtaInfo.label;
|
||||
pressableBindingProps.accessibilityLabel = label;
|
||||
pressableBindingProps.style = styles.ctaContainer;
|
||||
items3 = [((Component) => <Component source={{uri: r17}} style={styles.image} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
|
||||
var viewBindingProps = {style: styles.info};
|
||||
label = bountyCtaInfo.label;
|
||||
value = <Text variant="text-md/semibold" color="text-strong">{label}</Text>;
|
||||
items4 = [value];
|
||||
items4[1] = <Text variant="text-sm/medium" color="text-default">{bountyCtaInfo.subtext}</Text>;
|
||||
items3[1] = <View {...viewBindingProps}>{items4}</View>;
|
||||
items2[2] = <Pressable {...pressableBindingProps}>{items3}</Pressable>;
|
||||
value = <View2 {...view2Props}>{items2}</View2>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = visible;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function BountiesModalEndCardOnPress() { // fn#102960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13743:1533, owner: BountiesModalEndCard.onPress, offset: 0x02251827, size: 166 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
|
||||
const openAdGameLinkDirectly = value.openAdGameLinkDirectly;
|
||||
const object3 = {};
|
||||
const bountyBinding = bounty;
|
||||
object3.adContentId = bountyBinding.id;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const BOUNTY = AdCreativeType.BOUNTY;
|
||||
object3.adCreativeType = BOUNTY;
|
||||
object3.cta = bountyBinding.cta;
|
||||
const object4 = {};
|
||||
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
|
||||
const VIDEO_MODAL_ICON_END_CARD = QuestContent.VIDEO_MODAL_ICON_END_CARD;
|
||||
object4.content = VIDEO_MODAL_ICON_END_CARD;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
|
||||
object4.ctaContent = OPEN_GAME_LINK;
|
||||
object4.sourceQuestContent = sourceQuestContent;
|
||||
Reflect.apply(openAdGameLinkDirectly, value, [object3, object4]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/* Metro module 13554; source: modules/quests/native/BountiesModal/BountiesModalEndedCtaButtons.tsx; dependencies: [33, 4501, 697, 4017, 4504, 4507, 13542, 4578, 9520, 7121, 6533, 7120, 1244, 2] */
|
||||
function _fun102961(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13744:6, offset: 0x022518cd, size: 181 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.jsxs;
|
||||
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
|
||||
var object2 = {};
|
||||
object2.gap = importDefault(dependencyMap[2]).space.PX_8;
|
||||
return {container: object2};
|
||||
});
|
||||
object = {code: 'function BountiesModalEndedCtaButtonsTsx1(){const{withTiming,visible,timingStandard}=this.__closure;return{opacity:withTiming(visible?1:0,timingStandard)};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalEndedCtaButtons.tsx');
|
||||
exports.default = BountiesModalEndedCtaButtons;
|
||||
}
|
||||
|
||||
function BountiesModalEndedCtaButtons({bounty, visible, sourceQuestContent, onClose}) { // fn#102963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13744:366, offset: 0x022519b3, size: 436 bytes, params: 2, frame: 24
|
||||
var r0;
|
||||
var View;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var items2;
|
||||
var intl;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = function() {
|
||||
var object = {};
|
||||
var moduleValue = require(dependencyMap[4]);
|
||||
object.opacity = moduleValue.withTiming(visible ? 1 : 0, require(dependencyMap[5]).timingStandard);
|
||||
return object;
|
||||
};
|
||||
const object2 = {};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.visible = visible;
|
||||
object2.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 11417131685254;
|
||||
closure.__initData = env0_6;
|
||||
if (visible) {
|
||||
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
var viewProps = {style: [styles.container, Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
|
||||
[closure])]};
|
||||
value = <Button variant="primary-overlay" text={(require(13542) /* metro dependency 13542: BountyCtaHelpers */).getBountyCtaInfo(bounty).buttonLabel} size="lg" onPress={onPress_102965} />;
|
||||
items2 = [value];
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items2[1] = <Button variant="secondary-overlay" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} size="lg" onPress={onClose} />;
|
||||
value = <View {...viewProps}>{items2}</View>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = visible;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function BountiesModalEndedCtaButtonsOnPress() { // fn#102965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13744:874, owner: BountiesModalEndedCtaButtons.onPress, offset: 0x02251bbc, size: 166 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
|
||||
const openAdGameLinkDirectly = value.openAdGameLinkDirectly;
|
||||
const object3 = {};
|
||||
const bountyBinding = bounty;
|
||||
object3.adContentId = bountyBinding.id;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const BOUNTY = AdCreativeType.BOUNTY;
|
||||
object3.adCreativeType = BOUNTY;
|
||||
object3.cta = bountyBinding.cta;
|
||||
const object4 = {};
|
||||
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
|
||||
const VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
|
||||
object4.content = VIDEO_MODAL_END_CARD;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const OPEN_GAME_LINK = QuestContentCTA.OPEN_GAME_LINK;
|
||||
object4.ctaContent = OPEN_GAME_LINK;
|
||||
object4.sourceQuestContent = sourceQuestContent;
|
||||
Reflect.apply(openAdGameLinkDirectly, value, [object3, object4]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
/* Metro module 13539; source: modules/quests/native/BountiesModal/BountiesModalProgress.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4017, 4504, 4507, 2] */
|
||||
function _fun102892(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:6, offset: 0x0224d3f3, size: 269 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.StyleSheet;
|
||||
const env0_6 = value.View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102893);
|
||||
object = {code: 'function BountiesModalProgressTsx1(){const{withTiming,visible,timingFast}=this.__closure;return{opacity:withTiming(visible?1:0,timingFast)};}'};
|
||||
object = {code: 'function BountiesModalProgressTsx2(){const{withTiming,progress,shouldSkipAnimation,timingNone,timingFast}=this.__closure;return{width:withTiming(progress*100+"%",shouldSkipAnimation?timingNone:timingFast,\'animate-always\')};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalProgress.tsx');
|
||||
exports.default = BountiesModalProgress;
|
||||
exports.PROGRESS_BAR_HEIGHT = 4;
|
||||
}
|
||||
|
||||
function _fun102893() { // fn#102893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:201, offset: 0x0224d500, size: 331 bytes, params: 1, frame: 17
|
||||
const object2 = {};
|
||||
object2.progressContainer = {height: 4};
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
||||
object6['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object6['backgroundColor'] = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object6['opacity'] = 0.54;
|
||||
object2.progressTrack = object6;
|
||||
const object7 = {'position': 'absolute', 'height': '100%', 'left': 0, 'bottom': 0, 'borderRadius': null,
|
||||
'backgroundColor': null, 'shadowOffset': null, 'shadowRadius': 8, 'shadowOpacity': 1, 'elevation': 4,
|
||||
'shadowColor': '#30C773'};
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
let GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
|
||||
object7.backgroundColor = GREEN_300;
|
||||
object7.shadowOffset = {'width': 0, 'height': 0};
|
||||
object2.progressBar = object7;
|
||||
const object8 = {'position': 'absolute', 'height': '100%', 'left': 0, 'bottom': 0, 'borderRadius': null,
|
||||
'backgroundColor': null, 'shadowOffset': null, 'shadowRadius': 12, 'shadowOpacity': 1, 'elevation': 8};
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
|
||||
object8.backgroundColor = GREEN_300;
|
||||
object8.shadowOffset = {'width': 0, 'height': 0};
|
||||
GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
|
||||
object8.shadowColor = GREEN_300;
|
||||
object2.progressBarGlowLayer = object8;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function BountiesModalProgress({progress, visible, style}) { // fn#102894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:1323, offset: 0x0224d64b, size: 575 bytes, params: 2, frame: 26
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, [false]);
|
||||
const binding2 = env0_3;
|
||||
const value3 = binding2(value2, 2);
|
||||
const property = value3[0];
|
||||
const property2 = value3[1];
|
||||
useState = binding.useState;
|
||||
const value4 = binding2(Reflect.apply(useState, binding, [progress]), 2);
|
||||
const property3 = value4[0];
|
||||
if (progress !== property3) {
|
||||
value4[1](progress);
|
||||
property2(progress < property3);
|
||||
}
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = function() {
|
||||
var object = {};
|
||||
var moduleValue = require(dependencyMap[7]);
|
||||
object.opacity = moduleValue.withTiming(visible ? 1 : 0, require(dependencyMap[8]).timingFast);
|
||||
return object;
|
||||
};
|
||||
const object2 = {};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.visible = visible;
|
||||
object2.timingFast = (require(4507) /* metro dependency 4507: timingPresets */).timingFast;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 5158131592262;
|
||||
closure.__initData = env0_10;
|
||||
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue2 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue2.useAnimatedStyle;
|
||||
closure = BountiesModalProgressB;
|
||||
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, progress: progress,
|
||||
shouldSkipAnimation: property,
|
||||
timingNone: (require(4507) /* metro dependency 4507: timingPresets */).timingNone,
|
||||
timingFast: (require(4507) /* metro dependency 4507: timingPresets */).timingFast};
|
||||
closure.__workletHash = 15586067343237;
|
||||
closure.__initData = env0_11;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items3 = [styles.progressContainer, style, value5];
|
||||
const items2 = [<View style={styles.progressTrack} />];
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
items2[1] = <View3 style={[styles.progressBarGlowLayer, value6]} />;
|
||||
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
items2[2] = <View4 style={[styles.progressBar, value6]} />;
|
||||
return (
|
||||
<View2 style={items3}>
|
||||
{items2}
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function BountiesModalProgressB() { // fn#102896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13729:1759, owner: BountiesModalProgress.B, offset: 0x0224d8df, size: 114 bytes, params: 1, frame: 19
|
||||
let value = environment.__proto__;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const value3 = 100 * progress;
|
||||
const binding = env0_2;
|
||||
value = require(4507) /* metro dependency 4507: timingPresets */;
|
||||
return {width: Reflect.apply(withTiming, timingModule, [value3 + '%', binding ? value.timingNone : value.timingFast,
|
||||
'animate-always'])};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
/* Metro module 13540; source: modules/quests/native/BountiesModal/BountiesModalTimer.tsx; dependencies: [31, 27, 33, 4582, 4017, 7744, 4501, 697, 477, 4504, 4573, 8707, 2] */
|
||||
function _fun102897(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:6, offset: 0x0224d951, size: 817 bytes, params: 8, frame: 26
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = undefined;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value2.jsx;
|
||||
const env0_6 = value2.jsxs;
|
||||
const SMALL_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT;
|
||||
const value3 = (SMALL_BUTTON_HEIGHT - 4) / 2;
|
||||
const Math = global.Math;
|
||||
const PI = Math.PI;
|
||||
const env0_8 = 2 * PI * value3;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const env0_9 = Easing.bezier(0.15, 0.21, 0.58, 1);
|
||||
const env0_10 = Easing.bezier(0.61, 0, 0.58, 1);
|
||||
const env0_11 = Easing.bezier(0.42, 0, 0.58, 1);
|
||||
const reanimatedRexport = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const createAnimatedComponent = reanimatedRexport.createAnimatedComponent;
|
||||
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
|
||||
const env0_12 = Reflect.apply(createAnimatedComponent, reanimatedRexport, [Circle]);
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'alignItems': 'center', 'justifyContent': 'center'};
|
||||
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object4.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object4.width = SMALL_BUTTON_HEIGHT;
|
||||
object4.height = SMALL_BUTTON_HEIGHT;
|
||||
object3.progress = object4;
|
||||
object3.ring = {position: 'absolute', transform: [{rotate: '-90deg'}]};
|
||||
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
|
||||
object3.trackPath = {color: BACKGROUND_SURFACE_HIGHEST};
|
||||
const object5 = {};
|
||||
const CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT;
|
||||
object5.color = CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
object5.lineHeight = platformUtilsModule.isAndroid() ? 14 : value;
|
||||
object3.countdownText = object5;
|
||||
object3.checkmarkLayer = {'position': 'absolute', 'inset': 6, 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
const object8 = {'width': 20, 'height': 20, 'backgroundColor': '#2ECC71'};
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object3.checkmarkBackground = object8;
|
||||
object3.checkmarkIcon = {'width': 20, 'height': 20};
|
||||
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
object3 = {code: 'function BountiesModalTimerTsx1(){const{PROGRESS_CIRCUMFERENCE,animatedProgress}=this.__closure;return{strokeDashoffset:PROGRESS_CIRCUMFERENCE-PROGRESS_CIRCUMFERENCE*animatedProgress.get()};}'};
|
||||
object3 = {code: 'function BountiesModalTimerTsx2(){const{checkmarkBackgroundScale}=this.__closure;return{transform:[{scale:checkmarkBackgroundScale.get()}]};}'};
|
||||
object3 = {code: 'function BountiesModalTimerTsx3(){const{checkmarkScale}=this.__closure;return{transform:[{scale:checkmarkScale.get()}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesModalTimer.tsx');
|
||||
exports.default = BountiesModalTimer;
|
||||
return value;
|
||||
}
|
||||
|
||||
function BountiesModalTimer({isCompleted, totalSeconds, remainingSeconds}) { // fn#102898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1577, offset: 0x0224dc82, size: 1169 bytes, params: 2, frame: 34
|
||||
const styles = useStyles();
|
||||
let r6 = isCompleted || remainingSeconds <= 0;
|
||||
const Math = global.Math;
|
||||
const max = Math.max;
|
||||
const Math2 = global.Math;
|
||||
const value5 = Reflect.apply(max, Math, [1, Math2.ceil(remainingSeconds)]);
|
||||
const r1 = isCompleted ? 1 : totalSeconds > 0 ? 1 - remainingSeconds / totalSeconds : 0;
|
||||
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r1);
|
||||
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const env0_3 = value9;
|
||||
const value10 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
let binding = env0_3;
|
||||
binding.useEffect(_fun102899, [value8, r1]);
|
||||
const env0_5 = binding.useRef(false);
|
||||
binding.useEffect(_fun102900, [r6, value9, value10]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedProps = reanimatedRexportModule.useAnimatedProps;
|
||||
let closure = BountiesModalTimerU;
|
||||
binding = env0_8;
|
||||
closure.__closure = {PROGRESS_CIRCUMFERENCE: binding, animatedProgress: value8};
|
||||
closure.__workletHash = 12964700773124;
|
||||
closure.__initData = env0_14;
|
||||
const value11 = Reflect.apply(useAnimatedProps, reanimatedRexportModule, [closure]);
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
let useAnimatedStyle = moduleValue5.useAnimatedStyle;
|
||||
closure = BountiesModalTimerX;
|
||||
closure.__closure = {checkmarkBackgroundScale: value9};
|
||||
closure.__workletHash = 10834015407160;
|
||||
closure.__initData = env0_15;
|
||||
const value12 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue6.useAnimatedStyle;
|
||||
closure = BountiesModalTimerG;
|
||||
closure.__closure = {checkmarkScale: value10};
|
||||
closure.__workletHash = 7510845920441;
|
||||
closure.__initData = env0_16;
|
||||
const value13 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
|
||||
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
|
||||
const object = {};
|
||||
const SMALL_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT;
|
||||
object.height = SMALL_BUTTON_HEIGHT;
|
||||
object.width = SMALL_BUTTON_HEIGHT;
|
||||
object.style = styles.ring;
|
||||
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
|
||||
const binding2 = env0_7;
|
||||
const items2 = [((Component) => <Component {...object}><Circle cx={SMALL_BUTTON_HEIGHT / 2} cy={SMALL_BUTTON_HEIGHT / 2} r={binding2} fill="none" stroke={styles.trackPath.color} strokeWidth={4} />{((Component) => <Component cx={SMALL_BUTTON_HEIGHT / 2} cy={SMALL_BUTTON_HEIGHT / 2} r={binding2} fill="none" stroke="#2ECC71" strokeWidth={4} strokeDasharray={binding} strokeLinecap="round" animatedProps={value11} />)(env0_12)}</Component>)(defaultImport)];
|
||||
r6 = !r6 && ((Text) => <Text variant="text-sm/semibold" style={styles.countdownText} maxFontSizeMultiplier={1}>{value5}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
items2[1] = r6;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
items2[2] = <View2 style={[styles.checkmarkLayer, value12]}><View style={styles.checkmarkBackground} /></View2>;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items4 = [styles.checkmarkLayer, value13];
|
||||
const CheckmarkSmallBoldIcon = (require(8707) /* metro dependency 8707: CheckmarkSmallBoldIcon */).CheckmarkSmallBoldIcon;
|
||||
const CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
|
||||
items2[3] = <View3 style={items4}><CheckmarkSmallBoldIcon size="custom" color={CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT} style={styles.checkmarkIcon} /></View3>;
|
||||
return (
|
||||
<View style={styles.progress}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun102899() { // fn#102899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1829, offset: 0x0224e113, size: 78 bytes, params: 1, frame: 18
|
||||
const binding = env0_2;
|
||||
const set = binding.set;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
Reflect.apply(set, binding, [timingModule.withTiming(env0_1, {duration: 500}, 'animate-always')]);
|
||||
}
|
||||
|
||||
function _fun102900() { // fn#102900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:1936, offset: 0x0224e161, size: 388 bytes, params: 1, frame: 30
|
||||
var r1;
|
||||
var r0;
|
||||
var value2;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var withSequence;
|
||||
var withTiming;
|
||||
var value4;
|
||||
var moduleValue3;
|
||||
var withDelay;
|
||||
var moduleValue4;
|
||||
var moduleValue5;
|
||||
var binding3;
|
||||
var value5;
|
||||
var moduleValue6;
|
||||
var value;
|
||||
const current = env0_5.current;
|
||||
env0_5.current = true;
|
||||
let binding = env0_0;
|
||||
const binding2 = env0_3;
|
||||
let set = binding2.set;
|
||||
if (binding) {
|
||||
if (current) {
|
||||
value2 = environment.__proto__;
|
||||
value3 = undefined;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withSequence = moduleValue.withSequence;
|
||||
value4 = (require(4504) /* metro dependency 4504: timing */).withTiming(1.65, {duration: 267,
|
||||
easing: env1_9});
|
||||
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue3.withTiming;
|
||||
Reflect.apply(set, binding2, [Reflect.apply(withSequence, moduleValue, [value4, Reflect.apply(withTiming,
|
||||
moduleValue3, [1, {duration: 233, easing: env1_10}])])]);
|
||||
binding = env0_4;
|
||||
set = binding.set;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withDelay = value.withDelay;
|
||||
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withSequence = moduleValue4.withSequence;
|
||||
moduleValue5 = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue5.withTiming;
|
||||
binding3 = env1_11;
|
||||
value5 = Reflect.apply(withTiming, moduleValue5, [1.25, {duration: 167, easing: binding3}]);
|
||||
moduleValue6 = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue6.withTiming;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [167, Reflect.apply(withSequence, moduleValue4,
|
||||
[value5, Reflect.apply(withTiming, moduleValue6, [1, {duration: 333, easing: binding3}])])])]);
|
||||
r1 = value3;
|
||||
} else {
|
||||
Reflect.apply(set, binding2, [1]);
|
||||
env0_4.set(1);
|
||||
r1 = undefined;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
Reflect.apply(set, binding2, [0]);
|
||||
env0_4.set(0);
|
||||
r0 = undefined;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function BountiesModalTimerU() { // fn#102901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2362, owner: BountiesModalTimer.U, offset: 0x0224e2e5, size: 40 bytes, params: 1, frame: 11
|
||||
const binding = env1_8;
|
||||
const binding2 = env0_2;
|
||||
const get = binding2.get;
|
||||
return {strokeDashoffset: binding - binding * Reflect.apply(get, binding2, [])};
|
||||
}
|
||||
|
||||
function BountiesModalTimerX() { // fn#102902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2536, owner: BountiesModalTimer.x, offset: 0x0224e30d, size: 39 bytes, params: 1, frame: 11
|
||||
const object = {};
|
||||
object.scale = env0_3.get();
|
||||
return {transform: [object]};
|
||||
}
|
||||
|
||||
function BountiesModalTimerG() { // fn#102903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13730:2692, owner: BountiesModalTimer.G, offset: 0x0224e334, size: 39 bytes, params: 1, frame: 11
|
||||
const object = {};
|
||||
object.scale = env0_4.get();
|
||||
return {transform: [object]};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
/* Metro module 13543; source: modules/quests/native/BountiesModal/BountiesScrollEndCard.tsx; dependencies: [31, 27, 33, 4501, 697, 13542, 1244, 13519, 4507, 4017, 4504, 4589, 4573, 10234, 2] */
|
||||
function _fun102913(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:6, offset: 0x0224eced, size: 237 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.Pressable;
|
||||
const env0_4 = value.StyleSheet;
|
||||
const env0_5 = value.View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102914);
|
||||
object = {code: 'function BountiesScrollEndCardTsx1(){const{isScrollingInBoundsSharedValue,withTiming,isActive,timingStandard}=this.__closure;var _isScrollingInBoundsS;const isScrollingInBounds=((_isScrollingInBoundsS=isScrollingInBoundsSharedValue)===null||_isScrollingInBoundsS===void 0?void 0:_isScrollingInBoundsS.get())===true;return{opacity:withTiming(isActive&&!isScrollingInBounds?1:0,timingStandard)};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollEndCard.tsx');
|
||||
exports.default = BountiesScrollEndCard;
|
||||
}
|
||||
|
||||
function _fun102914() { // fn#102914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:203, offset: 0x0224edda, size: 242 bytes, params: 1, frame: 17
|
||||
const object6 = {};
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
||||
object6.container = object7;
|
||||
const object8 = {};
|
||||
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
|
||||
object8['backgroundColor'] = 'rgba(0, 0, 0, 0.6)';
|
||||
object6.backdropTint = object8;
|
||||
const object9 = {};
|
||||
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
|
||||
object6.backdropGradient = object9;
|
||||
const object10 = {};
|
||||
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
|
||||
object10['justifyContent'] = 'center';
|
||||
object10['alignItems'] = 'center';
|
||||
object6.pressable = object10;
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object6.overlayContent = {alignItems: 'center', gap: PX_4};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object6.textBlock = {alignItems: 'center', gap: PX_4};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object6.replayIcon = {margin: PX_12};
|
||||
return object6;
|
||||
}
|
||||
|
||||
function BountiesScrollEndCard({bounty, visible, onReplay, isActive, isScrollingInBoundsSharedValue}) { // fn#102915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:1015, offset: 0x0224eecc, size: 826 bytes, params: 2, frame: 33
|
||||
var r0;
|
||||
var View2;
|
||||
var items2;
|
||||
var View3;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var items4;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const bountyCtaInfo = (require(13542) /* metro dependency 13542: BountyCtaHelpers */).getBountyCtaInfo(bounty);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const value4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9UtZAY']);
|
||||
const useVisibilityTransitionModule = require(13519) /* metro dependency 13519: useVisibilityTransition */;
|
||||
const useVisibilityTransition = useVisibilityTransitionModule.useVisibilityTransition;
|
||||
let object2 = {visible: visible};
|
||||
object2.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
|
||||
object2.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
|
||||
const {opacityStyle, shouldRender} = Reflect.apply(useVisibilityTransition, useVisibilityTransitionModule,
|
||||
[object2]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = BountiesScrollEndCardH;
|
||||
object2 = {isScrollingInBoundsSharedValue: isScrollingInBoundsSharedValue};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.isActive = isActive;
|
||||
object2.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 13628650628423;
|
||||
closure.__initData = env0_9;
|
||||
if (shouldRender) {
|
||||
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
var view2Props = {style: [styles.container, opacityStyle], pointerEvents: 'box-none'};
|
||||
items2 = [<View style={styles.backdropTint} />];
|
||||
items2[1] = ((Component) => <Component colors={['rgba(0, 0, 0, 0.48)',
|
||||
'rgba(0, 0, 0, 0.8)']} style={styles.backdropGradient} />)(importDefault(4589) /* metro dependency 4589 */);
|
||||
var pressableBindingProps = {onPress: isActive ? onReplay : undefined, disabled: !isActive,
|
||||
accessibilityRole: 'button', accessibilityLabel: value4, style: styles.pressable};
|
||||
View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
var view3Props = {style: [styles.overlayContent, Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
|
||||
[closure])]};
|
||||
var viewBindingProps = {style: styles.textBlock};
|
||||
value = <Text variant="heading-md/semibold" color="text-strong">{bountyCtaInfo.label}</Text>;
|
||||
items4 = [value];
|
||||
items4[1] = <Text variant="heading-sm/medium" color="text-default">{value4}</Text>;
|
||||
value = <View {...viewBindingProps}>{items4}</View>;
|
||||
items2[2] = <Pressable {...pressableBindingProps}><View3 {...view3Props}>{value}{((RetryIcon) => <RetryIcon accessible={false} color={(importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT} style={styles.replayIcon} />)((require(10234) /* metro dependency 10234: RetryIcon */).RetryIcon)}</View3></Pressable>;
|
||||
value = <View2 {...view2Props}>{items2}</View2>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = shouldRender;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function BountiesScrollEndCardH() { // fn#102916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13733:1392, owner: BountiesScrollEndCard.h, offset: 0x0224f206, size: 121 bytes, params: 1, frame: 18
|
||||
const r7 = isScrollingInBoundsSharedValue?.get();
|
||||
const object2 = {};
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const isActiveBinding = isActive;
|
||||
const value = 0;
|
||||
object2.opacity = Reflect.apply(withTiming, timingModule, [isActiveBinding ? r7 === true ? value : 1 : value,
|
||||
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/* Metro module 13518; source: modules/quests/native/BountiesModal/BountiesScrollPromptFooter.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 13519, 4507, 566, 1585, 4017, 3868, 2] */
|
||||
function _fun102749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13708:6, offset: 0x022474ec, size: 231 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).StyleSheet;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
|
||||
var object = {root: {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0}};
|
||||
var object2 = {'flex': 1, 'minHeight': 97, 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
object2.paddingHorizontal = importDefault(dependencyMap[5]).space.PX_16;
|
||||
object.content = object2;
|
||||
var object3 = {};
|
||||
copyDataProperties(object3, StyleSheet.absoluteFillObject, importDefault);
|
||||
object.gradient = object3;
|
||||
return object;
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollPromptFooter.tsx');
|
||||
exports.default = BountiesScrollPromptFooter;
|
||||
exports.BOUNTIES_MODAL_BASE_FOOTER_HEIGHT = 97;
|
||||
}
|
||||
|
||||
function BountiesScrollPromptFooter({visible, children, onContentLayout, zIndex, opacityStyle}) { // fn#102751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13708:507, offset: 0x0224763b, size: 547 bytes, params: 2, frame: 28
|
||||
const styles = useStyles();
|
||||
const useVisibilityTransitionModule = require(13519) /* metro dependency 13519: useVisibilityTransition */;
|
||||
const useVisibilityTransition = useVisibilityTransitionModule.useVisibilityTransition;
|
||||
const object2 = {visible: visible};
|
||||
object2.entranceTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
|
||||
object2.exitTiming = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
|
||||
const value2 = Reflect.apply(useVisibilityTransition, useVisibilityTransitionModule, [object2]);
|
||||
const opacityStyle2 = value2.opacityStyle;
|
||||
const shouldRender = value2.shouldRender;
|
||||
const binding = env0_3;
|
||||
let useMemo = binding.useMemo;
|
||||
const value3 = Reflect.apply(useMemo, binding, [function() {
|
||||
return zIndex != null ? {zIndex: zIndex} : undefined;
|
||||
}, [zIndex]]);
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const value4 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
useMemo = binding.useMemo;
|
||||
return shouldRender && ((View) => <View style={[styles.root, opacityStyle2,
|
||||
value3]} pointerEvents="none">{((View) => <View style={[styles.gradient,
|
||||
opacityStyle]}>{((BountiesScrollGradientRive) => <BountiesScrollGradientRive stateMachine="State Machine 1" fit="fill" alignment="bottom-center" withReducedMotion={useReducedMotion ? 'halt' : 'play'} />)((require(3868) /* metro dependency 3868: native */).BountiesScrollGradientRive)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}{((View) => <View style={[styles.content,
|
||||
Reflect.apply(useMemo, binding, [_fun102754, [value4.bottom]]),
|
||||
opacityStyle]} onLayout={onContentLayout}>{children}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
|
||||
}
|
||||
|
||||
function _fun102754() { // fn#102754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13708:905, offset: 0x02247880, size: 75 bytes, params: 1, frame: 16
|
||||
const Math = global.Math;
|
||||
const max = Math.max;
|
||||
const bottom = env0_1.bottom;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
return {paddingBottom: Reflect.apply(max, Math, [bottom, PX_8])};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/* Metro module 13544; source: modules/quests/native/BountiesModal/BountiesScrollPromptNuxFooter.tsx; dependencies: [27, 33, 4501, 4573, 1244, 2] */
|
||||
function _fun102917(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13734:6, offset: 0x0224f27f, size: 179 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.jsxs;
|
||||
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
|
||||
return {root: {'alignItems': 'center', 'gap': 2}, titleText: {textAlign: 'center'},
|
||||
swipeText: {'textAlign': 'center', 'textTransform': 'uppercase'}};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollPromptNuxFooter.tsx');
|
||||
exports.default = BountiesScrollPromptFooter_102919;
|
||||
}
|
||||
|
||||
function BountiesScrollPromptFooter_102919() { // fn#102919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13734:406, offset: 0x0224f36b, size: 263 bytes, params: 1, frame: 24
|
||||
const styles = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const H57f41 = (require(1244) /* metro dependency 1244: indexNative */).t.H57f41;
|
||||
return (
|
||||
<View style={styles.root}>
|
||||
<Text
|
||||
variant="text-md/semibold"
|
||||
color="text-default"
|
||||
style={styles.titleText}
|
||||
>
|
||||
{Reflect.apply(string, intl, [H57f41])}
|
||||
</Text>
|
||||
<Text
|
||||
variant="text-xxs/semibold"
|
||||
color="text-muted"
|
||||
style={styles.swipeText}
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tG0zsk)}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Metro module 13545; source: modules/quests/native/BountiesModal/BountiesScrollRecapFooter.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 477, 1244, 4573, 10076, 566, 3868, 2] */
|
||||
function _fun102920(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:6, offset: 0x0224f472, size: 232 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102921);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollRecapFooter.tsx');
|
||||
exports.BountiesScrollRecapFooter = BountiesScrollRecapFooter;
|
||||
exports.BountiesScrollRecapFooterGradient = BountiesScrollRecapFooterGradient;
|
||||
}
|
||||
|
||||
function _fun102921() { // fn#102921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:180, offset: 0x0224f55a, size: 185 bytes, params: 1, frame: 16
|
||||
const object2 = {};
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.container = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', gap: PX_4};
|
||||
object2.headerLabel = {textTransform: 'uppercase'};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.orbRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
|
||||
object2.rive = {'flex': 1, 'width': '100%'};
|
||||
const object3 = {};
|
||||
const value = 6;
|
||||
object3.marginTop = require(dependencyMap[value]).isIOS() ? value : 0;
|
||||
object2.orbAmount = object3;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function BountiesScrollRecapFooter({orbAmount}) { // fn#102922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:585, offset: 0x0224f613, size: 381 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const value2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.d6Rrn6);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const items2 = [<Text variant="text-xs/bold" color="text-brand" style={styles.headerLabel} accessible={false}>{value2}</Text>];
|
||||
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
|
||||
items2[1] = <View style={styles.orbRow} accessible={false} importantForAccessibility="no-hide-descendants"><OrbsIcon size="sm" color="icon-strong" accessible={false} /><Text variant="display-sm" color="text-strong" accessible={false} style={styles.orbAmount}>{'+' + orbAmount}</Text></View>;
|
||||
return (
|
||||
<View
|
||||
style={styles.container}
|
||||
pointerEvents="none"
|
||||
accessible
|
||||
accessibilityRole="text"
|
||||
accessibilityLabel={'' + value2 + ', +' + orbAmount}
|
||||
>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function BountiesScrollRecapFooterGradient() { // fn#102923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13735:1232, offset: 0x0224f790, size: 153 bytes, params: 1, frame: 18
|
||||
const styles = useStyles();
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const BountiesScrollGradientRive = (require(3868) /* metro dependency 3868: native */).BountiesScrollGradientRive;
|
||||
return (
|
||||
<View style={styles.rive}>
|
||||
<BountiesScrollGradientRive
|
||||
stateMachine="State Machine 1"
|
||||
fit="fill"
|
||||
alignment="bottom-center"
|
||||
withReducedMotion={useReducedMotion ? 'halt' : 'play'}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
/* Metro module 13546; source: modules/quests/native/BountiesModal/BountiesScrollRecapPage.tsx; dependencies: [31, 27, 4502, 33, 697, 4501, 477, 7897, 13547, 9543, 13548, 1585, 566, 13549, 4573, 1244, 10076, 4578, 2] */
|
||||
function _fun102925(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:6, offset: 0x0224f829, size: 265 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.StyleSheet;
|
||||
const env0_4 = value.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102927);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollRecapPage.tsx');
|
||||
exports.BountiesScrollRecapPage = BountiesScrollRecapPage;
|
||||
}
|
||||
|
||||
function BountiesRecapOrbsBackground({style, reducedMotion}) { // fn#102926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:922, offset: 0x0224f932, size: 260 bytes, params: 2, frame: 22
|
||||
var r0;
|
||||
var VideoComponent;
|
||||
var object;
|
||||
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) {
|
||||
r0 = <View style={style} needsOffscreenAlphaCompositing renderToHardwareTextureAndroid pointerEvents="none">{((APNGPlayer) => <APNGPlayer url={importDefault(13547) /* metro dependency 13547: _3d_orbsPng */} style={StyleSheet.absoluteFillObject} autoplay={!reducedMotion} />)((require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer)}</View>;
|
||||
} else {
|
||||
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
|
||||
object = {};
|
||||
object.uri = importDefault(13548) /* metro dependency 13548: _3d_orbsMov */;
|
||||
r0 = <VideoComponent source={object} style={style} resizeMode="contain" paused={reducedMotion} disableFocus preventsDisplaySleepDuringVideoPlayback={false} importantForAccessibility="no-hide-descendants" />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun102927() { // fn#102927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:218, offset: 0x0224fa36, size: 398 bytes, params: 1, frame: 18
|
||||
const object3 = {};
|
||||
const object4 = {overflow: 'hidden'};
|
||||
object4.borderRadius = lg;
|
||||
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object4.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object3.root = object4;
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object3.content = {'flex': 1, 'paddingHorizontal': null, 'justifyContent': 'center', 'alignItems': 'center',
|
||||
paddingHorizontal: PX_24};
|
||||
object3.centeredCopy = {'alignItems': 'center', 'width': '100%'};
|
||||
object3.orbsBackground = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': '40%', 'zIndex': 1};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object3.headerLabel = {paddingBottom: PX_4, textTransform: 'uppercase'};
|
||||
const object8 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object8.paddingBottom = PX_24;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object8.gap = PX_8;
|
||||
object3.titleRow = object8;
|
||||
const object9 = {position: 'absolute'};
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object9.left = PX_24;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object9.right = PX_24;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object9.gap = PX_12;
|
||||
object3.actions = object9;
|
||||
const object10 = {};
|
||||
const value = 6;
|
||||
object10.marginTop = require(dependencyMap[value]).isIOS() ? value : 0;
|
||||
object10.lineHeight = 46;
|
||||
object3.orbAmount = object10;
|
||||
return object3;
|
||||
}
|
||||
|
||||
function BountiesScrollRecapPage({orbAmount, onClose, style}) { // fn#102928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13736:1520, offset: 0x0224fbc4, size: 1017 bytes, params: 2, frame: 41
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const items2 = [styles.root, style];
|
||||
const viewBinding2Props = {style: StyleSheet.absoluteFillObject, pointerEvents: 'none'};
|
||||
const VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
|
||||
const view = <View {...viewBinding2Props}><VideoComponent source={{uri: importDefault(13549) /* metro dependency 13549: starfield_bgMp4 */}} style={StyleSheet.absoluteFillObject} resizeMode="cover" paused={useReducedMotion} disableFocus preventsDisplaySleepDuringVideoPlayback={false} importantForAccessibility="no-hide-descendants" /><BountiesRecapOrbsBackground style={styles.orbsBackground} reducedMotion={useReducedMotion} /></View>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const items4 = [<Text variant="text-xs/bold" color="text-brand" style={styles.headerLabel}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.d6Rrn6)}</Text>];
|
||||
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
|
||||
items4[1] = <View accessible accessibilityRole="text" accessibilityLabel={'+' + orbAmount}><View style={styles.titleRow}><OrbsIcon size="lg" color="icon-strong" accessible={false} /><Text variant="display-lg" color="text-strong" accessible={false} style={styles.orbAmount}>{'+' + orbAmount}</Text></View></View>;
|
||||
items4[2] = <Text variant="text-md/medium" color="text-muted" style={{textAlign: 'center'}}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.x0Ffz3)}</Text>;
|
||||
const view2 = <View style={styles.centeredCopy} pointerEvents="none">{items4}</View>;
|
||||
const items7 = [styles.actions];
|
||||
const bottom = value2.bottom;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
items7[1] = {bottom: bottom + PX_8};
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<View style={items2} pointerEvents="box-none">
|
||||
{view}
|
||||
<View style={styles.content} pointerEvents="box-none">
|
||||
{view2}
|
||||
<View style={items7}>
|
||||
<Button
|
||||
grow
|
||||
variant="primary"
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4jeWR)}
|
||||
size="lg"
|
||||
onPress={onClose}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,481 @@
|
||||
/* Metro module 13522; source: modules/quests/native/BountiesModal/BountiesScrollVideoItem.tsx; dependencies: [5, 57, 31, 27, 10071, 7092, 6528, 33, 13523, 566, 9530, 13533, 9532, 13534, 13536, 13537, 13538, 10183, 7121, 6533, 13543, 2] */
|
||||
function _fun102777(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:6, offset: 0x0224825f, size: 260 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_6 = (require(27) /* metro dependency 27 */).View;
|
||||
const virtualCurrencyStore = importDefault(10071) /* metro dependency 10071: VirtualCurrencyStore */;
|
||||
const bountyStore = importDefault(7092) /* metro dependency 7092: BountyStore */;
|
||||
const env0_9 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
|
||||
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountiesScrollVideoItem.tsx');
|
||||
exports.BountiesScrollVideoItem = BountiesScrollVideoItem;
|
||||
}
|
||||
|
||||
function BountiesScrollVideoItemInner({bounty, sourceQuestContent, width, height, isActive, isRecapPageRevealed, isRecapPageOnTop, isScrollingInBoundsSharedValue}) { // fn#102778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:211, offset: 0x02248363, size: 1184 bytes, params: 2, frame: 44
|
||||
var currentBalance;
|
||||
const env0_3 = height;
|
||||
const env0_4 = isActive;
|
||||
const env0_5 = isScrollingInBoundsSharedValue;
|
||||
const value2 = env0_5.useMemo(function() {
|
||||
return {width: width, height: height};
|
||||
}, [width, height]);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], function() {
|
||||
return BountyStore.isBountyCompleted(bounty.id);
|
||||
});
|
||||
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
|
||||
const useConfig = BountiesStage1Experiment.useConfig;
|
||||
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
|
||||
const {enabled, loopingEnabled, orbAmount, rewardTimerSeconds} = Reflect.apply(useConfig, BountiesStage1Experiment,
|
||||
[{location: VIDEO_MODAL_MOBILE}]);
|
||||
const BountyVideoEndMode = (require(13533) /* metro dependency 13533: useBountiesModalTiming */).BountyVideoEndMode;
|
||||
const r26 = loopingEnabled ? BountyVideoEndMode.LOOP : BountyVideoEndMode.END_CARD_WITH_CTA;
|
||||
const r25 = enabled ? 1000 * rewardTimerSeconds : 1000 * bounty.rewardTimerSeconds;
|
||||
const value8 = env0_5.useRef(null);
|
||||
const handlePlayerStateChange = useResumeOnActive({isActive: isActive, playerRef: value8}).handlePlayerStateChange;
|
||||
const [property, property2] = env0_4(env0_5.useState(isActive), 2);
|
||||
const [property3, property4] = env0_4(env0_5.useState(_fun102784), 2);
|
||||
const value14 = env0_4(env0_5.useState(0), 2);
|
||||
const property5 = value14[0];
|
||||
if (property !== isActive) {
|
||||
property2(isActive);
|
||||
if (isActive) {
|
||||
currentBalance = VirtualCurrencyStore.getCurrentBalance();
|
||||
property4(currentBalance);
|
||||
if (currentBalance !== property3) {
|
||||
value14[1](function(a0) {
|
||||
return a0 + 1;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
const value17 = env0_5.useCallback(env0_3(_fun102787), [bounty.id, isActive, orbAmount, sourceQuestContent]);
|
||||
const {handleVideoProgressAnalytics, handleVideoEndAnalytics, handleVideoLoopedAnalytics,
|
||||
handleVideoPausedAnalytics,
|
||||
handleVideoResumedAnalytics} = (require(13536) /* metro dependency 13536: useBountiesModalVideoAnalytics */).useBountiesModalVideoAnalytics({bountyId: bounty.id,
|
||||
sourceQuestContent: sourceQuestContent, rewardDurationMs: r25});
|
||||
const value19 = (require(13537) /* metro dependency 13537: useBountyVideoProgressPersistence */).useBountyVideoProgressPersistence({bountyId: bounty.id,
|
||||
endMode: r26});
|
||||
const initialProgress = value19.initialProgress;
|
||||
const handleProgress = value19.handleProgress;
|
||||
env0_5.useEffect(function() {
|
||||
return _fun102790;
|
||||
}, [value19.flushProgress]);
|
||||
const value20 = env0_5.useCallback(function(a0, a1, a2) {
|
||||
handleVideoProgressAnalytics(a0, a1);
|
||||
handleProgress(a0, a1, a2);
|
||||
}, [handleVideoProgressAnalytics, handleProgress]);
|
||||
const useBountiesModalTimingModule = require(13533) /* metro dependency 13533: useBountiesModalTiming */;
|
||||
const useBountiesModalTiming = useBountiesModalTimingModule.useBountiesModalTiming;
|
||||
let duration = initialProgress.duration;
|
||||
duration = duration > 0 ? initialProgress.duration : null;
|
||||
const value21 = Reflect.apply(useBountiesModalTiming, useBountiesModalTimingModule, [{endMode: r26,
|
||||
rewardDurationMs: r25, isCompleted: value3, onRewardEarned: value17, onVideoProgress: value20,
|
||||
onVideoEnd: handleVideoEndAnalytics, onVideoLooped: handleVideoLoopedAnalytics,
|
||||
onVideoPaused: handleVideoPausedAnalytics, onVideoResumed: handleVideoResumedAnalytics, playerRef: value8,
|
||||
initialProgressSec: initialProgress.timestampSec, initialMaxVideoProgressSec: initialProgress.maxTimestampSec,
|
||||
initialVideoDurationSec: duration}]);
|
||||
const isCtaVisible = value21.isCtaVisible;
|
||||
const isEndCardVisible = value21.isEndCardVisible;
|
||||
const handleVideoEnd = value21.handleVideoEnd;
|
||||
const handleVideoProgress = value21.handleVideoProgress;
|
||||
const handleVideoPaused = value21.handleVideoPaused;
|
||||
const handleVideoResumed = value21.handleVideoResumed;
|
||||
const env0_12 = value21.handleReplay;
|
||||
const rewardRemainingSeconds = value21.rewardRemainingSeconds;
|
||||
const rewardTotalSeconds = value21.rewardTotalSeconds;
|
||||
const normalizedProgress = value21.normalizedProgress;
|
||||
const BountyVideo = (require(13538) /* metro dependency 13538: BountyVideo */).BountyVideo;
|
||||
return (
|
||||
<View style={value2}>
|
||||
<BountyVideo
|
||||
bounty={bounty}
|
||||
sourceQuestContent={sourceQuestContent}
|
||||
isCompleted={value3}
|
||||
isCtaVisible={isCtaVisible}
|
||||
isEndCardVisible={isEndCardVisible}
|
||||
isProgressBarVisible={!isRecapPageOnTop}
|
||||
orbsBalance={property3}
|
||||
handleVideoEnd={handleVideoEnd}
|
||||
handleVideoProgress={handleVideoProgress}
|
||||
handleVideoPaused={handleVideoPaused}
|
||||
handleVideoResumed={handleVideoResumed}
|
||||
rewardRemainingSeconds={rewardRemainingSeconds}
|
||||
rewardTotalSeconds={rewardTotalSeconds}
|
||||
normalizedProgress={normalizedProgress}
|
||||
repeat={loopingEnabled}
|
||||
initialProgress={initialProgress}
|
||||
isActive={isActive}
|
||||
isRecapPageRevealed={isRecapPageRevealed}
|
||||
isScrollingInBoundsSharedValue={isScrollingInBoundsSharedValue}
|
||||
playerRef={value8}
|
||||
onPlayerStateChange={handlePlayerStateChange}
|
||||
balanceWidgetPillResetKey={property5}
|
||||
renderEndCard={renderEndCard}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function BountiesScrollVideoItem({bounty, sourceQuestContent, width, height, isActive, isRecapPageRevealed, isRecapPageOnTop, isScrollingInBoundsSharedValue}) { // fn#102794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3539, offset: 0x02248b41, size: 235 bytes, params: 2, frame: 19
|
||||
isActive = !(isActive === undefined) && isActive;
|
||||
if (isRecapPageRevealed !== undefined) {
|
||||
}
|
||||
if (isRecapPageOnTop !== undefined) {
|
||||
}
|
||||
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
||||
const id = bounty.id;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const BOUNTY = AdCreativeType.BOUNTY;
|
||||
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
|
||||
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
|
||||
return (
|
||||
<QuestContentImpressionTrackerNative
|
||||
adContentId={id}
|
||||
adCreativeType={BOUNTY}
|
||||
questContent={VIDEO_MODAL_MOBILE}
|
||||
sourceQuestContent={sourceQuestContent}
|
||||
overrideVisibility={isActive}
|
||||
>
|
||||
{children_102795}
|
||||
</QuestContentImpressionTrackerNative>
|
||||
);
|
||||
}
|
||||
|
||||
function useResumeOnActive({isActive, playerRef}) { // fn#102781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:784, owner: BountiesScrollVideoItemInner.useResumeOnActive, offset: 0x0224883a, size: 137 bytes, params: 2, frame: 17
|
||||
const env0_2 = env1_5.useRef(true);
|
||||
const env0_3 = env1_5.useRef(null);
|
||||
const value2 = env1_5.useCallback(_fun102782, []);
|
||||
env1_5.useEffect(_fun102783, [isActive, playerRef]);
|
||||
return {handlePlayerStateChange: value2};
|
||||
}
|
||||
|
||||
function _fun102784() { // fn#102784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:1186, offset: 0x02248939, size: 31 bytes, params: 1, frame: 10
|
||||
var r0;
|
||||
const isActiveBinding = isActive;
|
||||
let value = null;
|
||||
if (isActiveBinding) {
|
||||
value = environment.__proto__;
|
||||
value = VirtualCurrencyStore.getCurrentBalance();
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function* _fun102787() { // fn#102787, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:1378, offset: 0x02248963, size: 167 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
var r2;
|
||||
var r1;
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value4;
|
||||
var claimBountyReward;
|
||||
var id;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var error;
|
||||
var value9;
|
||||
if (true) {
|
||||
value = false;
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value9 = binding(env2_2[13]);
|
||||
value9.openBountyRewardClaimErrorToast(error);
|
||||
r2 = value;
|
||||
if (r2) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_4;
|
||||
r1 = binding;
|
||||
} else {
|
||||
r1 = r2;
|
||||
}
|
||||
if (r1) {
|
||||
value = environment.__proto__;
|
||||
VirtualCurrencyStore(_fun102788);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value9 = binding(env2_2[13]);
|
||||
value9.openBountyRewardClaimErrorToast(error);
|
||||
r2 = value;
|
||||
if (r2) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_4;
|
||||
r1 = binding;
|
||||
} else {
|
||||
r1 = r2;
|
||||
}
|
||||
if (r1) {
|
||||
value = environment.__proto__;
|
||||
VirtualCurrencyStore(_fun102788);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding2[12];
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value9 = binding(env2_2[13]);
|
||||
value9.openBountyRewardClaimErrorToast(error);
|
||||
r2 = value;
|
||||
if (r2) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_4;
|
||||
r1 = binding;
|
||||
} else {
|
||||
r1 = r2;
|
||||
}
|
||||
if (r1) {
|
||||
value = environment.__proto__;
|
||||
VirtualCurrencyStore(_fun102788);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value4 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value9 = binding(env2_2[13]);
|
||||
value9.openBountyRewardClaimErrorToast(error);
|
||||
r2 = value;
|
||||
if (r2) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_4;
|
||||
r1 = binding;
|
||||
} else {
|
||||
r1 = r2;
|
||||
}
|
||||
if (r1) {
|
||||
value = environment.__proto__;
|
||||
VirtualCurrencyStore(_fun102788);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
claimBountyReward = value4.claimBountyReward;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value9 = binding(env2_2[13]);
|
||||
value9.openBountyRewardClaimErrorToast(error);
|
||||
r2 = value;
|
||||
if (r2) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_4;
|
||||
r1 = binding;
|
||||
} else {
|
||||
r1 = r2;
|
||||
}
|
||||
if (r1) {
|
||||
value = environment.__proto__;
|
||||
VirtualCurrencyStore(_fun102788);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value9 = binding(env2_2[13]);
|
||||
value9.openBountyRewardClaimErrorToast(error);
|
||||
r2 = value;
|
||||
if (r2) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_4;
|
||||
r1 = binding;
|
||||
} else {
|
||||
r1 = r2;
|
||||
}
|
||||
if (r1) {
|
||||
value = environment.__proto__;
|
||||
VirtualCurrencyStore(_fun102788);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
id = require.id;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value9 = binding(env2_2[13]);
|
||||
value9.openBountyRewardClaimErrorToast(error);
|
||||
r2 = value;
|
||||
if (r2) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_4;
|
||||
r1 = binding;
|
||||
} else {
|
||||
r1 = r2;
|
||||
}
|
||||
if (r1) {
|
||||
value = environment.__proto__;
|
||||
VirtualCurrencyStore(_fun102788);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value9 = binding(env2_2[13]);
|
||||
value9.openBountyRewardClaimErrorToast(error);
|
||||
r2 = value;
|
||||
if (r2) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_4;
|
||||
r1 = binding;
|
||||
} else {
|
||||
r1 = r2;
|
||||
}
|
||||
if (r1) {
|
||||
value = environment.__proto__;
|
||||
VirtualCurrencyStore(_fun102788);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value6 = Reflect.apply(claimBountyReward, value4, [id, importDefault]);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value9 = binding(env2_2[13]);
|
||||
value9.openBountyRewardClaimErrorToast(error);
|
||||
r2 = value;
|
||||
if (r2) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_4;
|
||||
r1 = binding;
|
||||
} else {
|
||||
r1 = r2;
|
||||
}
|
||||
if (r1) {
|
||||
value = environment.__proto__;
|
||||
VirtualCurrencyStore(_fun102788);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
yield value6;
|
||||
try {
|
||||
value7 = undefined;
|
||||
value8 = false;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
value9 = binding(env2_2[13]);
|
||||
value9.openBountyRewardClaimErrorToast(error);
|
||||
r2 = value;
|
||||
if (r2) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_4;
|
||||
r1 = binding;
|
||||
} else {
|
||||
r1 = r2;
|
||||
}
|
||||
if (r1) {
|
||||
value = environment.__proto__;
|
||||
VirtualCurrencyStore(_fun102788);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
if (value8) {
|
||||
return value7;
|
||||
}
|
||||
r2 = true;
|
||||
if (r2 && env1_4) {
|
||||
value = environment.__proto__;
|
||||
VirtualCurrencyStore(_fun102788);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102789() { // fn#102789, offset: 0x02248a23, size: 11 bytes, params: 1, frame: 1
|
||||
return function() {
|
||||
return flushProgress();
|
||||
};
|
||||
}
|
||||
|
||||
function BountiesScrollVideoItemInnerRenderEndCard() { // fn#102792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3092, owner: BountiesScrollVideoItemInner.renderEndCard, offset: 0x02248a53, size: 151 bytes, params: 1, frame: 17
|
||||
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
||||
const id = bounty.id;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const BOUNTY = AdCreativeType.BOUNTY;
|
||||
const QuestContent = (require(6533) /* metro dependency 6533: QuestContent */).QuestContent;
|
||||
const VIDEO_MODAL_END_CARD = QuestContent.VIDEO_MODAL_END_CARD;
|
||||
return (
|
||||
<QuestContentImpressionTrackerNative
|
||||
adContentId={id}
|
||||
adCreativeType={BOUNTY}
|
||||
questContent={VIDEO_MODAL_END_CARD}
|
||||
sourceQuestContent={sourceQuestContent}
|
||||
overrideVisibility={isEndCardVisible}
|
||||
>
|
||||
{children_102793}
|
||||
</QuestContentImpressionTrackerNative>
|
||||
);
|
||||
}
|
||||
|
||||
function BountiesScrollVideoItemChildren() { // fn#102795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3939, owner: BountiesScrollVideoItem.children, offset: 0x02248c2c, size: 96 bytes, params: 1, frame: 14
|
||||
return (
|
||||
<BountiesScrollVideoItemInner
|
||||
bounty={bounty}
|
||||
sourceQuestContent={sourceQuestContent}
|
||||
width={width}
|
||||
height={height}
|
||||
isActive={isActive}
|
||||
isRecapPageRevealed={isRecapPageRevealed}
|
||||
isRecapPageOnTop={isRecapPageOnTop}
|
||||
isScrollingInBoundsSharedValue={isScrollingInBoundsSharedValue}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun102783() { // fn#102783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:932, offset: 0x022488c3, size: 118 bytes, params: 1, frame: 14
|
||||
var r1;
|
||||
var isActiveBinding;
|
||||
var value2;
|
||||
let current = env0_2.current;
|
||||
if (current) {
|
||||
env0_2.current = false;
|
||||
} else {
|
||||
isActiveBinding = isActive;
|
||||
if (isActiveBinding) {
|
||||
current = env0_3.current;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
r1 = current === (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlayerState.PAUSED;
|
||||
} else {
|
||||
r1 = isActiveBinding;
|
||||
}
|
||||
if (r1) {
|
||||
current = playerRef.current;
|
||||
if (current != null) {
|
||||
current.play();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102788(a0) { // fn#102788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:1511, offset: 0x02248a0a, size: 25 bytes, params: 2, frame: 3
|
||||
var r0;
|
||||
let value = null;
|
||||
if (value == a0) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = a0 + View;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function renderEndCardChildren() { // fn#102793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13712:3315, owner: BountiesScrollVideoItemInner.renderEndCard.children, offset: 0x02248aea, size: 87 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ((Component) => <Component bounty={bounty} visible={isEndCardVisible} onReplay={handleReplay} isActive={isActive} isScrollingInBoundsSharedValue={isScrollingInBoundsSharedValue} />)(importDefault(13543) /* metro dependency 13543: BountiesScrollEndCard */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/* Metro module 13542; source: modules/quests/native/BountiesModal/BountyCtaHelpers.tsx; dependencies: [1244, 2] */
|
||||
function _fun102911(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13732:6, offset: 0x0224ec20, size: 96 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountyCtaHelpers.tsx');
|
||||
exports.getBountyCtaInfo = function(a0) {
|
||||
var object = {label: a0.productName, subtext: a0.cta.buttonLabel};
|
||||
object.buttonLabel = require(dependencyMap[0]).intl.string(require(dependencyMap[0]).t.LLLLPD);
|
||||
object.iconImageUri = a0.productIcon;
|
||||
return object;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
/* Metro module 13538; source: modules/quests/native/BountiesModal/BountyVideo.tsx; dependencies: [31, 27, 6528, 33, 697, 4501, 13539, 9564, 9530, 4017, 4504, 4507, 13523, 13540, 10124, 13541, 2] */
|
||||
function _fun102888(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:6, offset: 0x0224cda1, size: 304 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.StyleSheet;
|
||||
const env0_5 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = value.Fragment;
|
||||
const env0_9 = {'top': 48, 'bottom': 16, 'left': 16, 'right': 16};
|
||||
const env0_10 = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun102889);
|
||||
object = {code: 'function BountyVideoTsx1(){const{isScrollingInBoundsSharedValue,withTiming,isActive,timingStandard}=this.__closure;var _isScrollingInBoundsS;const isScrollingInBounds=((_isScrollingInBoundsS=isScrollingInBoundsSharedValue)===null||_isScrollingInBoundsS===void 0?void 0:_isScrollingInBoundsS.get())===true;return{opacity:withTiming(isActive&&!isScrollingInBounds?1:0,timingStandard)};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/BountyVideo.tsx');
|
||||
exports.BountyVideo = BountyVideo;
|
||||
}
|
||||
|
||||
function _fun102889() { // fn#102889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:295, offset: 0x0224ced1, size: 215 bytes, params: 1, frame: 18
|
||||
const object4 = {};
|
||||
const object5 = {};
|
||||
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
|
||||
object5['overflow'] = 'hidden';
|
||||
const lgBinding = lg;
|
||||
object5['borderRadius'] = lgBinding;
|
||||
object4.videoContainer = object5;
|
||||
const object6 = {'position': 'absolute', 'top': null, 'left': null, 'flexDirection': 'row', 'alignItems': 'center'};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.top = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.left = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.gap = PX_8;
|
||||
object4.leftRow = object6;
|
||||
const PROGRESS_BAR_HEIGHT = (require(13539) /* metro dependency 13539: BountiesModalProgress */).PROGRESS_BAR_HEIGHT;
|
||||
object4.progress = {'position': 'absolute', 'bottom': 0, height: PROGRESS_BAR_HEIGHT, left: lgBinding,
|
||||
right: lgBinding};
|
||||
return object4;
|
||||
}
|
||||
|
||||
function BountyVideo({bounty, sourceQuestContent, isCompleted, isCtaVisible, isEndCardVisible, isProgressBarVisible, orbsBalance, handleVideoEnd, handleVideoProgress, handleVideoPaused, handleVideoResumed, rewardRemainingSeconds, rewardTotalSeconds, normalizedProgress, initialProgress, repeat, isActive, isRecapPageRevealed, isScrollingInBoundsSharedValue, renderEndCard, playerRef, onPlayerStateChange, balanceWidgetPillResetKey}) { // fn#102890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:1105, offset: 0x0224cfa8, size: 978 bytes, params: 2, frame: 51
|
||||
var object2;
|
||||
isActive = !(isActive === undefined) && isActive;
|
||||
isRecapPageRevealed = !(isRecapPageRevealed === undefined) && isRecapPageRevealed;
|
||||
const styles = useStyles();
|
||||
const value5 = (require(9564) /* metro dependency 9564: AndroidRNVHttpEngineExperiment */).useRnvHttpEngine();
|
||||
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
|
||||
const useConfig = BountiesStage1Experiment.useConfig;
|
||||
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
|
||||
const enabled = Reflect.apply(useConfig, BountiesStage1Experiment, [{location: VIDEO_MODAL_MOBILE}]).enabled;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = BountyVideoL;
|
||||
object2 = {isScrollingInBoundsSharedValue: isScrollingInBoundsSharedValue};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.isActive = isActive;
|
||||
object2.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 12287714482150;
|
||||
closure.__initData = env0_12;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
||||
const AdVideoPlayer = (require(13523) /* metro dependency 13523: AdVideoPlayer */).AdVideoPlayer;
|
||||
const r35 = !enabled && undefined;
|
||||
let r33 = isActive ? isEndCardVisible : !isActive;
|
||||
r33 = !r33 ? isRecapPageRevealed : r33;
|
||||
const items3 = [<AdVideoPlayer ref={playerRef} source={{uri: bounty.videoHls ?? ''}} httpEngine={value5} automaticallyWaitsToMinimizeStalling={r35} initialProgress={initialProgress} isFullscreen={false} externallyPaused={r33} style={StyleSheet.absoluteFillObject} contentInsets={env0_9} onProgress={handleVideoProgress} onEnd={handleVideoEnd} onPausePlayback={handleVideoPaused} onResumePlayback={handleVideoResumed} hideControls={isEndCardVisible} showSkipButtons={false} repeat={repeat} bufferingSpinnerPlacement="center" onPlayerStateChange={onPlayerStateChange} />];
|
||||
items3[1] = renderEndCard?.();
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.leftRow, value6];
|
||||
const value12 = ((Component) => <Component isCompleted={isCompleted} totalSeconds={rewardTotalSeconds} remainingSeconds={rewardRemainingSeconds} />)(importDefault(13540) /* metro dependency 13540: BountiesModalTimer */);
|
||||
const BalanceWidgetPill = (require(10124) /* metro dependency 10124: BalanceWidgetPill */).BalanceWidgetPill;
|
||||
items3[2] = <View2 style={items2}>{value12}<BalanceWidgetPill balance={orbsBalance} key={balanceWidgetPillResetKey} /></View2>;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
items3[3] = <View3 style={[StyleSheet.absoluteFillObject,
|
||||
value6]} pointerEvents="box-none">{((Component) => <Component bounty={bounty} visible={isCtaVisible} sourceQuestContent={sourceQuestContent} />)(importDefault(13541) /* metro dependency 13541: BountiesModalAdvertiserCta */)}</View3>;
|
||||
const view = <View style={styles.videoContainer}>{items3}</View>;
|
||||
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<>
|
||||
{view}
|
||||
<View4 style={[styles.progress, value6]}>
|
||||
{((Component) => <Component progress={normalizedProgress} visible={isProgressBarVisible} />)(importDefault(13539) /* metro dependency 13539: BountiesModalProgress */)}
|
||||
</View4>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function BountyVideoL() { // fn#102891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13728:1728, owner: BountyVideo.L, offset: 0x0224d37a, size: 121 bytes, params: 1, frame: 18
|
||||
const r7 = isScrollingInBoundsSharedValue?.get();
|
||||
const object2 = {};
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const isActiveBinding = isActive;
|
||||
const value = 0;
|
||||
object2.opacity = Reflect.apply(withTiming, timingModule, [isActiveBinding ? r7 === true ? value : 1 : value,
|
||||
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/* Metro module 13534; source: modules/quests/native/BountiesModal/bountyError.tsx; dependencies: [13535, 1244, 3857, 8947, 2] */
|
||||
function _fun102863(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13724:6, offset: 0x0224be6f, size: 175 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(13535) /* metro dependency 13535: BountiesModalConstants */).BOUNTY_REWARD_CLAIM_FAILED_TOAST_DURATION_MS;
|
||||
const Set = global.Set;
|
||||
const set = new Set([260021]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/bountyError.tsx');
|
||||
exports.openBountyRewardClaimErrorToast = function(a0) {
|
||||
var defaultImport = importDefault(dependencyMap[2]);
|
||||
var object = {key: 'QUESTS_BOUNTIES_REWARD_CLAIM_FAILED'};
|
||||
object.content = resolveBountyRewardClaimErrorMessage(a0);
|
||||
object.icon = importDefault(dependencyMap[3]);
|
||||
object.toastDurationMs = BOUNTY_REWARD_CLAIM_FAILED_TOAST_DURATION_MS;
|
||||
defaultImport.open(object);
|
||||
};
|
||||
}
|
||||
|
||||
function resolveBountyRewardClaimErrorMessage(a0) { // fn#102864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13724:171, offset: 0x0224bf1e, size: 137 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const value = undefined;
|
||||
return (a0 == null ? value : a0.code) == null ? intl.string(t.uLjCfn) : env0_4.has(a0.code) && (a0 == null ? value : a0.message) != null ? a0.message : intl.string(t.uLjCfn);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
/* Metro module 13533; source: modules/quests/native/BountiesModal/useBountiesModalTiming.tsx; dependencies: [57, 31, 6528, 9530, 2] */
|
||||
function _fun102855(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:6, offset: 0x0224b836, size: 197 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesModalTiming.tsx');
|
||||
exports.BountyVideoEndMode = {END_CARD: 'END_CARD', END_CARD_WITH_CTA: 'END_CARD_WITH_CTA', LOOP: 'LOOP'};
|
||||
exports.useBountiesModalTiming = useBountiesModalTiming;
|
||||
}
|
||||
|
||||
function useBountiesModalTiming({endMode, rewardDurationMs, isCompleted, onRewardEarned, onVideoProgress, onVideoEnd, onVideoLooped, onVideoPaused, onVideoResumed, playerRef, initialProgressSec, initialMaxVideoProgressSec, initialVideoDurationSec}) { // fn#102856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:400, offset: 0x0224b8fb, size: 901 bytes, params: 2, frame: 35
|
||||
var r7;
|
||||
var value20;
|
||||
const env0_2 = onRewardEarned;
|
||||
const env0_3 = onVideoProgress;
|
||||
const env0_5 = onVideoLooped;
|
||||
initialProgressSec = initialProgressSec === undefined ? 0 : initialProgressSec;
|
||||
initialMaxVideoProgressSec = initialMaxVideoProgressSec === undefined ? 0 : initialMaxVideoProgressSec;
|
||||
initialVideoDurationSec = initialVideoDurationSec === undefined ? null : initialVideoDurationSec;
|
||||
let binding = env0_3;
|
||||
let useState = binding.useState;
|
||||
const value5 = Reflect.apply(useState, binding,
|
||||
[initialVideoDurationSec != null && initialProgressSec >= initialVideoDurationSec - 1 && endMode !== env0_5.LOOP]);
|
||||
binding = env0_2;
|
||||
const value6 = binding(value5, 2);
|
||||
const property = value6[0];
|
||||
const env0_11 = value6[1];
|
||||
const binding2 = env0_3;
|
||||
useState = binding2.useState;
|
||||
const value8 = binding(Reflect.apply(useState, binding2, [_fun102857]), 2);
|
||||
const property2 = value8[0];
|
||||
const env0_12 = value8[1];
|
||||
useState = binding2.useState;
|
||||
const value9 = binding(Reflect.apply(useState, binding2, [null]), 2);
|
||||
const property3 = value9[0];
|
||||
const env0_13 = value9[1];
|
||||
useState = binding2.useState;
|
||||
const value10 = binding(Reflect.apply(useState, binding2, [initialMaxVideoProgressSec]), 2);
|
||||
const property4 = value10[0];
|
||||
const env0_14 = value10[1];
|
||||
useState = binding2.useState;
|
||||
const value11 = binding(Reflect.apply(useState, binding2, [initialVideoDurationSec]), 2);
|
||||
const property5 = value11[0];
|
||||
const env0_15 = value11[1];
|
||||
const env0_16 = binding2.useRef(isCompleted);
|
||||
const env0_17 = binding2.useRef(initialMaxVideoProgressSec);
|
||||
const env0_18 = binding2.useRef(initialVideoDurationSec ?? 0);
|
||||
binding = env0_3;
|
||||
const env0_19 = binding.useRef(0);
|
||||
const env0_20 = binding.useRef(0);
|
||||
const value12 = binding.useCallback(_fun102858, [onVideoProgress, onRewardEarned, rewardDurationMs]);
|
||||
const value13 = binding.useCallback(_fun102859, [endMode, onVideoEnd, onVideoLooped, onRewardEarned]);
|
||||
const value14 = binding.useCallback(_fun102860, [playerRef]);
|
||||
const value15 = binding.useCallback(_fun102861, [onVideoPaused]);
|
||||
const value16 = binding.useCallback(_fun102862, [onVideoResumed]);
|
||||
const value17 = 1000 * property4;
|
||||
const value18 = rewardDurationMs / 1000;
|
||||
let Math = global.Math;
|
||||
const value19 = Math.max(0, value18 - property4);
|
||||
if (value17 >= rewardDurationMs) {
|
||||
r7 = 0;
|
||||
} else if (property) {
|
||||
r7 = 0;
|
||||
} else if (isCompleted) {
|
||||
r7 = 0;
|
||||
} else if (property5 == null) {
|
||||
r7 = value19;
|
||||
} else if (property5 > 0) {
|
||||
Math = global.Math;
|
||||
value20 = Math.min(value18, property5);
|
||||
Math = global.Math;
|
||||
r7 = Math.max(0, value20 - property4);
|
||||
} else {
|
||||
r7 = value19;
|
||||
}
|
||||
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
|
||||
const useConfig = BountiesStage1Experiment.useConfig;
|
||||
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
|
||||
return {isCtaVisible: (isCompleted || value17 > Reflect.apply(useConfig, BountiesStage1Experiment,
|
||||
[{location: VIDEO_MODAL_MOBILE}]).ctaTimerMilliSeconds) && !(property && endMode !== env0_5.END_CARD_WITH_CTA),
|
||||
isEndCardVisible: property, handleVideoEnd: value13, handleVideoProgress: value12, handleVideoPaused: value15,
|
||||
handleVideoResumed: value16, handleReplay: value14, rewardRemainingSeconds: r7, rewardTotalSeconds: value18,
|
||||
normalizedProgress: property3 ?? property2, maxVideoProgressSeconds: property4, videoDuration: property5};
|
||||
}
|
||||
|
||||
function _fun102857() { // fn#102857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:755, offset: 0x0224bc80, size: 32 bytes, params: 1, frame: 3
|
||||
return initialVideoDurationSec != null ? initialProgressSec / initialVideoDurationSec : 0;
|
||||
}
|
||||
|
||||
function _fun102858({progress, currentTime, seekableDuration}) { // fn#102858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1015, offset: 0x0224bca0, size: 191 bytes, params: 2, frame: 18
|
||||
env0_13(null);
|
||||
const Math = global.Math;
|
||||
const value2 = Math.max(currentTime, env0_17.current);
|
||||
env0_17.current = value2;
|
||||
env0_18.current = seekableDuration;
|
||||
env0_20.current = currentTime;
|
||||
env0_12(progress);
|
||||
env0_14(value2);
|
||||
env0_15(seekableDuration);
|
||||
onVideoProgress(value2, seekableDuration, currentTime);
|
||||
if (!env0_16.current && 1000 * value2 >= rewardDurationMs) {
|
||||
env0_16.current = true;
|
||||
onRewardEarned();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102859() { // fn#102859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1230, offset: 0x0224bd5f, size: 141 bytes, params: 1, frame: 14
|
||||
var binding;
|
||||
var onVideoLoopedBinding;
|
||||
const onVideoEndBinding = onVideoEnd;
|
||||
let current = env0_17.current;
|
||||
onVideoEndBinding(current, env0_18.current);
|
||||
const endModeBinding = endMode;
|
||||
const LOOP = env1_5.LOOP;
|
||||
if (endModeBinding === LOOP) {
|
||||
binding = env0_19;
|
||||
current = binding.current;
|
||||
binding.current = current + 1;
|
||||
onVideoLoopedBinding = onVideoLooped;
|
||||
current = env0_19.current;
|
||||
onVideoLoopedBinding(current);
|
||||
} else {
|
||||
env0_11(true);
|
||||
}
|
||||
if (!env0_16.current) {
|
||||
env0_16.current = true;
|
||||
onRewardEarned();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102860() { // fn#102860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1363, offset: 0x0224bdec, size: 73 bytes, params: 1, frame: 14
|
||||
var r2;
|
||||
var r3;
|
||||
var current;
|
||||
const value2 = playerRef == null;
|
||||
const value3 = undefined;
|
||||
if (value2) {
|
||||
r2 = value2;
|
||||
r3 = value3;
|
||||
} else {
|
||||
current = playerRef.current;
|
||||
r2 = current == null;
|
||||
r3 = current;
|
||||
}
|
||||
if (!r2) {
|
||||
r3.seekToStart();
|
||||
}
|
||||
env0_13(0);
|
||||
env0_11(false);
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _fun102861(a0) { // fn#102861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1455, offset: 0x0224be35, size: 29 bytes, params: 2, frame: 13
|
||||
onVideoPaused(env0_20.current, a0);
|
||||
}
|
||||
|
||||
function _fun102862(a0) { // fn#102862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13723:1498, offset: 0x0224be52, size: 29 bytes, params: 2, frame: 13
|
||||
onVideoResumed(env0_20.current, a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,317 @@
|
||||
/* Metro module 13536; source: modules/quests/native/BountiesModal/useBountiesModalVideoAnalytics.tsx; dependencies: [31, 661, 9513, 491, 7110, 7121, 9522, 13523, 2] */
|
||||
function _fun102867(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:6, offset: 0x0224c056, size: 172 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_102870 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_4 = [25, 50, 75];
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesModalVideoAnalytics.tsx');
|
||||
exports.useBountiesModalVideoAnalytics = useBountiesModalVideoAnalytics;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_102868(a0, a1) { // fn#102868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:137, offset: 0x0224c102, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun102869;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_102870(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_102870(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_102870(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun102869;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function useBountiesModalVideoAnalytics({bountyId, sourceQuestContent, rewardDurationMs}) { // fn#102871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1203, offset: 0x0224c276, size: 551 bytes, params: 2, frame: 24
|
||||
var object2;
|
||||
const env0_2 = rewardDurationMs;
|
||||
const value2 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
|
||||
const binding = env0_2;
|
||||
const value = binding.useMemo(_fun102872, []);
|
||||
const useRef = binding.useRef;
|
||||
const Set = global.Set;
|
||||
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set();
|
||||
const env0_5 = Reflect.apply(useRef, binding, [set instanceof Object ? set : value3]);
|
||||
const value5 = binding.useCallback(_fun102873, [bountyId, value, value2, sourceQuestContent, rewardDurationMs]);
|
||||
const value6 = binding.useCallback(_fun102874, [value5]);
|
||||
const value7 = binding.useCallback(_fun102875, [value5, rewardDurationMs]);
|
||||
const value8 = binding.useCallback(_fun102876, [value5]);
|
||||
const value9 = binding.useCallback(_fun102877, [value5, rewardDurationMs]);
|
||||
object2 = {};
|
||||
object2.handleVideoProgressAnalytics = binding.useCallback(_fun102878, [value6, value7, value9, rewardDurationMs]);
|
||||
object2.handleVideoEndAnalytics = binding.useCallback(_fun102879, [value6, value7, value9, value8]);
|
||||
object2.handleVideoLoopedAnalytics = binding.useCallback(_fun102880, [bountyId, value, value2, sourceQuestContent,
|
||||
rewardDurationMs]);
|
||||
object2.handleVideoPausedAnalytics = binding.useCallback(_fun102881, [bountyId, value, value2, sourceQuestContent,
|
||||
rewardDurationMs]);
|
||||
object2.handleVideoResumedAnalytics = binding.useCallback(_fun102882, [bountyId, value, value2, sourceQuestContent,
|
||||
rewardDurationMs]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun102872() { // fn#102872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1348, offset: 0x0224c49d, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(491) /* metro dependency 491 */).v4();
|
||||
}
|
||||
|
||||
function _fun102873({videoTimestampSeconds, progress, thresholdMet}) { // fn#102873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1408, offset: 0x0224c4c2, size: 185 bytes, params: 2, frame: 20
|
||||
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
|
||||
const object2 = {};
|
||||
object2.adContentId = bountyId;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const BOUNTY = AdCreativeType.BOUNTY;
|
||||
object2.adCreativeType = BOUNTY;
|
||||
const AD_VIDEO_PROGRESSED = AnalyticEvents.AD_VIDEO_PROGRESSED;
|
||||
object2.event = AD_VIDEO_PROGRESSED;
|
||||
object2.properties = {progress: progress, video_timestamp_seconds: videoTimestampSeconds, video_session_id: env0_4,
|
||||
impression_id: env0_3, threshold_met: thresholdMet, reward_timer_seconds: rewardDurationMs / 1000};
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object2]);
|
||||
}
|
||||
|
||||
function _fun102874() { // fn#102874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1765, offset: 0x0224c57b, size: 77 bytes, params: 1, frame: 12
|
||||
const current = env0_5.current;
|
||||
if (!current.has('start')) {
|
||||
env0_5.current.add('start');
|
||||
env0_6({'videoTimestampSeconds': 0, 'progress': 0, 'thresholdMet': false});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102875(a0, a1) { // fn#102875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:1899, offset: 0x0224c5c8, size: 159 bytes, params: 3, frame: 15
|
||||
var Math;
|
||||
var value2;
|
||||
var value3;
|
||||
const current = env0_5.current;
|
||||
if (!current.has('threshold')) {
|
||||
env0_5.current.add('threshold');
|
||||
Math = global.Math;
|
||||
value2 = Math.max(rewardDurationMs / 1000, a0);
|
||||
value3 = environment.__proto__;
|
||||
env0_6({videoTimestampSeconds: value2,
|
||||
progress: (require(9522) /* metro dependency 9522: VideoQuestUtils */).formatVideoProgressRatio(value2, a1),
|
||||
thresholdMet: true});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102876(a0, a1) { // fn#102876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2114, offset: 0x0224c667, size: 108 bytes, params: 3, frame: 14
|
||||
const current = env0_5.current;
|
||||
if (!current.has('end')) {
|
||||
env0_5.current.add('end');
|
||||
env0_6({'videoTimestampSeconds': null, 'progress': 1, 'thresholdMet': true,
|
||||
videoTimestampSeconds: global.Math.max(a0, a1)});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102877(a0, a1) { // fn#102877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2270, offset: 0x0224c6d3, size: 225 bytes, params: 3, frame: 23
|
||||
var r1;
|
||||
var value;
|
||||
var value2;
|
||||
var value3;
|
||||
var done;
|
||||
var value5;
|
||||
var value6;
|
||||
var current;
|
||||
var has;
|
||||
var binding;
|
||||
var value7;
|
||||
var value8;
|
||||
if (!(a1 <= 0)) {
|
||||
value = environment.__proto__;
|
||||
value2 = (require(9522) /* metro dependency 9522: VideoQuestUtils */).formatVideoProgressRatio(a0, a1);
|
||||
value = _createForOfIteratorHelperLoose_102868(env1_4);
|
||||
value3 = value();
|
||||
done = value3.done;
|
||||
if (!done) {
|
||||
r1 = value3;
|
||||
while (true) {
|
||||
value5 = r1.value;
|
||||
value6 = 'p' + value5;
|
||||
current = env0_5.current;
|
||||
has = current.has;
|
||||
if (!Reflect.apply(has, current, [value6])) {
|
||||
if (value2 < value5 / 100) {
|
||||
break;
|
||||
}
|
||||
current = env0_5.current;
|
||||
current.add(value6);
|
||||
binding = env0_6;
|
||||
value7 = 1000 * a0;
|
||||
binding({videoTimestampSeconds: a0, progress: value2, thresholdMet: value7 >= rewardDurationMs});
|
||||
break;
|
||||
}
|
||||
value8 = value();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r1 = value8;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102878(a0, a1) { // fn#102878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2588, offset: 0x0224c7b4, size: 59 bytes, params: 3, frame: 15
|
||||
env0_7();
|
||||
if (1000 * a0 >= rewardDurationMs) {
|
||||
env0_8(a0, a1);
|
||||
}
|
||||
env0_10(a0, a1);
|
||||
}
|
||||
|
||||
function _fun102879(a0, a1) { // fn#102879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2676, offset: 0x0224c7ef, size: 51 bytes, params: 3, frame: 14
|
||||
env0_7();
|
||||
env0_8(a0, a1);
|
||||
env0_10(a0, a1);
|
||||
env0_9(a0, a1);
|
||||
}
|
||||
|
||||
function _fun102880(a0) { // fn#102880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:2764, offset: 0x0224c822, size: 159 bytes, params: 2, frame: 17
|
||||
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
const trackAdContentEvent = analyticsActionsModule.trackAdContentEvent;
|
||||
const object2 = {};
|
||||
object2.adContentId = bountyId;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const BOUNTY = AdCreativeType.BOUNTY;
|
||||
object2.adCreativeType = BOUNTY;
|
||||
const AD_VIDEO_LOOPED = AnalyticEvents.AD_VIDEO_LOOPED;
|
||||
object2.event = AD_VIDEO_LOOPED;
|
||||
object2.properties = {video_session_id: env0_4, impression_id: env0_3, loop_count: a0,
|
||||
reward_timer_seconds: rewardDurationMs / 1000};
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
Reflect.apply(trackAdContentEvent, analyticsActionsModule, [object2]);
|
||||
}
|
||||
|
||||
function _fun102881(a0, a1) { // fn#102881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:3050, offset: 0x0224c8c1, size: 199 bytes, params: 3, frame: 17
|
||||
var moduleValue;
|
||||
var trackAdContentEvent;
|
||||
var object2;
|
||||
const PlaybackTriggerSource = (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlaybackTriggerSource;
|
||||
const USER_INTERACTION = PlaybackTriggerSource.USER_INTERACTION;
|
||||
if (a1 === USER_INTERACTION) {
|
||||
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
trackAdContentEvent = moduleValue.trackAdContentEvent;
|
||||
object2 = {};
|
||||
object2.adContentId = bountyId;
|
||||
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY;
|
||||
object2.event = AnalyticEvents.AD_VIDEO_PAUSED;
|
||||
object2.properties = {video_timestamp_seconds: a0, video_session_id: env0_4, impression_id: env0_3,
|
||||
reward_timer_seconds: rewardDurationMs / 1000};
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
Reflect.apply(trackAdContentEvent, moduleValue, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102882(a0, a1) { // fn#102882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13726:3407, offset: 0x0224c988, size: 199 bytes, params: 3, frame: 17
|
||||
var moduleValue;
|
||||
var trackAdContentEvent;
|
||||
var object2;
|
||||
const PlaybackTriggerSource = (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlaybackTriggerSource;
|
||||
const USER_INTERACTION = PlaybackTriggerSource.USER_INTERACTION;
|
||||
if (a1 === USER_INTERACTION) {
|
||||
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
trackAdContentEvent = moduleValue.trackAdContentEvent;
|
||||
object2 = {};
|
||||
object2.adContentId = bountyId;
|
||||
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.BOUNTY;
|
||||
object2.event = AnalyticEvents.AD_VIDEO_RESUMED;
|
||||
object2.properties = {video_timestamp_seconds: a0, video_session_id: env0_4, impression_id: env0_3,
|
||||
reward_timer_seconds: rewardDurationMs / 1000};
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
Reflect.apply(trackAdContentEvent, moduleValue, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
/* Metro module 13521; source: modules/quests/native/BountiesModal/useBountiesRecapOrbCount.tsx; dependencies: [57, 31, 4017, 13520, 2] */
|
||||
function _fun102768(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:6, offset: 0x02247e54, size: 202 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
object = {code: 'function getRecapOrbCountFromPullProgress_useBountiesRecapOrbCountTsx1(progress,targetOrbAmount){if(targetOrbAmount<=0||!Number.isFinite(targetOrbAmount)){return 0;}const clampedProgress=Math.min(1,Math.max(0,progress));return Math.round(clampedProgress*targetOrbAmount);}'};
|
||||
const value = _fun102769();
|
||||
object = {code: 'function useBountiesRecapOrbCountTsx2(){const{enabled,recapRevealHeight,getRevealProgress,scrollY,lastBountyScrollOffset,RECAP_ORB_COUNT_REACHES_TARGET_AT_PROGRESS,getRecapOrbCountFromPullProgress,targetOrbAmount}=this.__closure;if(!enabled||recapRevealHeight<=0){return{count:0,revealed:false};}const pullProgress=getRevealProgress(scrollY.get(),lastBountyScrollOffset,recapRevealHeight)/RECAP_ORB_COUNT_REACHES_TARGET_AT_PROGRESS;if(pullProgress<=0.1){return{count:0,revealed:false};}return{count:getRecapOrbCountFromPullProgress(pullProgress,targetOrbAmount),revealed:true};}'};
|
||||
object = {code: 'function useBountiesRecapOrbCountTsx3({count:count,revealed:revealed}){const{runOnJS,resetDisplayCount,setDisplayCountMonotonic}=this.__closure;if(!revealed){runOnJS(resetDisplayCount)();return;}runOnJS(setDisplayCountMonotonic)(count);}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesRecapOrbCount.tsx');
|
||||
exports.getRecapOrbCountFromPullProgress = value;
|
||||
exports.useBountiesRecapOrbCount = useBountiesRecapOrbCount;
|
||||
}
|
||||
|
||||
function _fun102769() { // fn#102769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:402, offset: 0x02247f1e, size: 48 bytes, params: 1, frame: 2
|
||||
const closure = function(a0, a1) {
|
||||
var value;
|
||||
if (!(a1 <= 0)) {
|
||||
var property = global.Number;
|
||||
if (property.isFinite(a1)) {
|
||||
property = global.Math;
|
||||
value = global.Math.max(0, a0);
|
||||
value = property.min(1, value);
|
||||
property = global.Math;
|
||||
return property.round(value * a1);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
closure.__closure = {};
|
||||
closure.__workletHash = 14295638108053;
|
||||
closure.__initData = env0_4;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function useBountiesRecapOrbCount({scrollY, lastBountyScrollOffset, recapRevealHeight, targetOrbAmount, enabled}) { // fn#102771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1755, offset: 0x02247fad, size: 373 bytes, params: 2, frame: 27
|
||||
const env0_2 = recapRevealHeight;
|
||||
const binding = targetOrbAmount;
|
||||
const [property, env0_5] = env0_2(binding.useState(0), 2);
|
||||
let closure = _fun102772;
|
||||
const value4 = binding.useCallback(closure, []);
|
||||
const env0_6 = value4;
|
||||
const value5 = binding.useCallback(_fun102774, []);
|
||||
const env0_7 = value5;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
closure = useBountiesRecapOrbCountB;
|
||||
let object2 = {enabled: enabled, recapRevealHeight: recapRevealHeight};
|
||||
const getRevealProgress = (require(13520) /* metro dependency 13520: useBountiesRecapScroll */).getRevealProgress;
|
||||
object2.getRevealProgress = getRevealProgress;
|
||||
object2.scrollY = scrollY;
|
||||
object2.lastBountyScrollOffset = lastBountyScrollOffset;
|
||||
object2.RECAP_ORB_COUNT_REACHES_TARGET_AT_PROGRESS = 0.95;
|
||||
object2.getRecapOrbCountFromPullProgress = env0_5;
|
||||
object2.targetOrbAmount = targetOrbAmount;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 2855285055570;
|
||||
closure.__initData = env0_6;
|
||||
const closure2 = useBountiesRecapOrbCountP;
|
||||
object2 = {};
|
||||
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object2.resetDisplayCount = value5;
|
||||
object2.setDisplayCountMonotonic = value4;
|
||||
closure2.__closure = object2;
|
||||
closure2.__workletHash = 12006414940221;
|
||||
closure2.__initData = env0_7;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
return property;
|
||||
}
|
||||
|
||||
function _fun102772(a0) { // fn#102772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1939, offset: 0x02248122, size: 32 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
env0_5(_fun102773);
|
||||
}
|
||||
|
||||
function _fun102774() { // fn#102774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1982, offset: 0x02248156, size: 18 bytes, params: 1, frame: 11
|
||||
env0_5(0);
|
||||
}
|
||||
|
||||
function useBountiesRecapOrbCountB() { // fn#102775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:2037, owner: useBountiesRecapOrbCount.b, offset: 0x02248168, size: 166 bytes, params: 1, frame: 18
|
||||
var r0;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var value5;
|
||||
var object2;
|
||||
if (enabled) {
|
||||
if (recapRevealHeight <= 0) {
|
||||
return {'count': 0, 'revealed': false};
|
||||
}
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(13520) /* metro dependency 13520: useBountiesRecapScroll */;
|
||||
value5 = moduleValue.getRevealProgress(scrollY.get(), lastBountyScrollOffset, recapRevealHeight) / 0.95;
|
||||
if (value5 <= 0.1) {
|
||||
r0 = {'count': 0, 'revealed': false};
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.count = env1_5(value5, targetOrbAmount);
|
||||
object2.revealed = true;
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
return {'count': 0, 'revealed': false};
|
||||
}
|
||||
|
||||
function useBountiesRecapOrbCountP({count, revealed}) { // fn#102776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:2474, owner: useBountiesRecapOrbCount.p, offset: 0x0224820e, size: 81 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const runOnJS = value.runOnJS;
|
||||
if (revealed) {
|
||||
Reflect.apply(runOnJS, value, [env0_6])(count);
|
||||
} else {
|
||||
Reflect.apply(runOnJS, value, [env0_7])();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102773(a0) { // fn#102773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13711:1946, offset: 0x02248142, size: 20 bytes, params: 2, frame: 3
|
||||
const value = a0;
|
||||
return env0_0 > value ? env0_0 : value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/* Metro module 13520; source: modules/quests/native/BountiesModal/useBountiesRecapScroll.tsx; dependencies: [31, 2] */
|
||||
function _fun102760(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:6, offset: 0x02247b91, size: 152 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importAll(31) /* metro dependency 31 */;
|
||||
object = {code: 'function getRevealProgress_useBountiesRecapScrollTsx1(scrollOffset,startOffset,revealHeight){if(revealHeight<=0){return 0;}return(scrollOffset-startOffset)/revealHeight;}'};
|
||||
const value = _fun102761();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountiesRecapScroll.tsx');
|
||||
exports.RECAP_SNAP_EPSILON = 2;
|
||||
exports.getRevealProgress = value;
|
||||
exports.useBountiesRecapScroll = useBountiesRecapScroll;
|
||||
}
|
||||
|
||||
function _fun102761() { // fn#102761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:290, offset: 0x02247c29, size: 48 bytes, params: 1, frame: 2
|
||||
const closure = function(a0, a1, a2) {
|
||||
var value = 0;
|
||||
return a2 <= value ? value : (a0 - a1) / a2;
|
||||
};
|
||||
closure.__closure = {};
|
||||
closure.__workletHash = 9769647749947;
|
||||
closure.__initData = env0_1;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function useBountiesRecapScroll({listRef, enabled, offsets}) { // fn#102763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:664, offset: 0x02247c75, size: 217 bytes, params: 2, frame: 18
|
||||
const binding = listRef;
|
||||
let useCallback = binding.useCallback;
|
||||
let value = Reflect.apply(useCallback, binding, [function(a0) {
|
||||
if (listRef.current != null) {
|
||||
listRef.current.scrollToOffset({offset: a0, animated: true});
|
||||
}
|
||||
}, [listRef]]);
|
||||
const value2 = binding.useCallback(_fun102765, [offsets.lastBounty, value]);
|
||||
value = binding.useCallback(_fun102766, [enabled, offsets.fullRecap, offsets.lastBounty, offsets.revealHeight,
|
||||
value]);
|
||||
useCallback = binding.useCallback;
|
||||
return {scrollToLastBounty: value2, handleRecapMomentumEnd: Reflect.apply(useCallback, binding, [_fun102767,
|
||||
[enabled, value]])};
|
||||
}
|
||||
|
||||
function _fun102765() { // fn#102765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:844, offset: 0x02247d89, size: 26 bytes, params: 1, frame: 11
|
||||
env0_3(offsets.lastBounty);
|
||||
}
|
||||
|
||||
function _fun102766(a0) { // fn#102766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:902, offset: 0x02247da3, size: 138 bytes, params: 2, frame: 16
|
||||
var r1;
|
||||
var offsetsBinding;
|
||||
var value2;
|
||||
var binding;
|
||||
if (enabled) {
|
||||
if (!(a0 <= offsets.lastBounty)) {
|
||||
value2 = environment.__proto__;
|
||||
binding = env1_2;
|
||||
offsetsBinding = offsets;
|
||||
r1 = binding(a0, offsetsBinding.lastBounty,
|
||||
offsetsBinding.revealHeight) >= 0.25 ? offsets.fullRecap : offsets.lastBounty;
|
||||
if (!(global.Math.abs(a0 - r1) < 2)) {
|
||||
env0_3(r1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102767(a0) { // fn#102767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13710:1139, offset: 0x02247e2d, size: 39 bytes, params: 2, frame: 11
|
||||
if (enabled) {
|
||||
env0_4(a0.contentOffset.y);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/* Metro module 13537; source: modules/quests/native/BountiesModal/useBountyVideoProgressPersistence.tsx; dependencies: [57, 31, 7092, 6528, 9530, 13533, 9532, 2] */
|
||||
function _fun102883(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:6, offset: 0x0224ca4f, size: 189 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const bountyStore = importDefault(7092) /* metro dependency 7092: BountyStore */;
|
||||
const env0_5 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
|
||||
const env0_6 = {'timestampSec': 0, 'maxTimestampSec': 0, 'duration': 0};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useBountyVideoProgressPersistence.tsx');
|
||||
exports.useBountyVideoProgressPersistence = useBountyVideoProgressPersistence;
|
||||
}
|
||||
|
||||
function useBountyVideoProgressPersistence({bountyId, endMode}) { // fn#102884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:353, offset: 0x0224cb0c, size: 284 bytes, params: 2, frame: 17
|
||||
var object2;
|
||||
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
|
||||
const useConfig = BountiesStage1Experiment.useConfig;
|
||||
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
|
||||
const enabled = Reflect.apply(useConfig, BountiesStage1Experiment, [{location: VIDEO_MODAL_MOBILE}]).enabled;
|
||||
const env0_2 = enabled;
|
||||
const binding = env0_3;
|
||||
const property = env0_2(binding.useState(_fun102885), 1)[0];
|
||||
var env0_3 = binding.useRef(0);
|
||||
const env0_4 = binding.useRef(property.timestampSec);
|
||||
const env0_5 = binding.useRef(property.maxTimestampSec);
|
||||
const env0_6 = binding.useRef(property.duration);
|
||||
object2 = {initialProgress: property};
|
||||
object2.handleProgress = binding.useCallback(_fun102886, [enabled, bountyId]);
|
||||
object2.flushProgress = binding.useCallback(_fun102887, [enabled, bountyId]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun102885() { // fn#102885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:524, offset: 0x0224cc28, size: 136 bytes, params: 1, frame: 15
|
||||
var value3;
|
||||
if (enabled) {
|
||||
value3 = BountyStore.getBountyVideoProgress(bountyId);
|
||||
return value3 == null ? env1_6 : endMode !== (require(13533) /* metro dependency 13533: useBountiesModalTiming */).BountyVideoEndMode.LOOP ? value3.timestampSec <= 5 ? env1_6 : value3 : value3.duration > 0 && value3.maxTimestampSec >= value3.duration - 1 || value3.timestampSec <= 5 ? env1_6 : value3;
|
||||
}
|
||||
return env1_6;
|
||||
}
|
||||
|
||||
function _fun102886(a0, a1, a2) { // fn#102886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:902, offset: 0x0224ccb0, size: 143 bytes, params: 4, frame: 16
|
||||
var value3;
|
||||
var moduleValue;
|
||||
env0_4.current = a2;
|
||||
env0_5.current = a0;
|
||||
env0_6.current = a1;
|
||||
if (enabled && a2 >= env0_3.current) {
|
||||
env0_3.current = a2 + 1;
|
||||
value3 = environment.__proto__;
|
||||
moduleValue = require(9532) /* metro dependency 9532: BountyActionCreators */;
|
||||
moduleValue.setBountyVideoProgress(bountyId, {timestampSec: a2, maxTimestampSec: a0, duration: a1});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102887() { // fn#102887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13727:1099, offset: 0x0224cd3f, size: 98 bytes, params: 1, frame: 15
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var setBountyVideoProgress;
|
||||
var bountyIdBinding;
|
||||
var object2;
|
||||
var current;
|
||||
if (enabled) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(9532) /* metro dependency 9532: BountyActionCreators */;
|
||||
setBountyVideoProgress = moduleValue.setBountyVideoProgress;
|
||||
bountyIdBinding = bountyId;
|
||||
object2 = {};
|
||||
current = env0_4.current;
|
||||
object2.timestampSec = current;
|
||||
current = env0_5.current;
|
||||
object2.maxTimestampSec = current;
|
||||
current = env0_6.current;
|
||||
object2.duration = current;
|
||||
Reflect.apply(setBountyVideoProgress, moduleValue, [bountyIdBinding, object2]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
/* Metro module 13519; source: modules/quests/native/BountiesModal/useVisibilityTransition.tsx; dependencies: [57, 31, 4017, 4504, 2] */
|
||||
function _fun102755(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:6, offset: 0x022478cb, size: 165 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
object = {code: "function useVisibilityTransitionTsx1(){const{withTiming,visibility,visible,entranceTiming,exitTiming,runOnJS,animationCallbackJSThread}=this.__closure;return{opacity:withTiming(visibility,visible?entranceTiming:exitTiming,'respect-motion-settings',function(){'worklet';runOnJS(animationCallbackJSThread)();})};}"};
|
||||
object = {code: 'function useVisibilityTransitionTsx2(){const{runOnJS,animationCallbackJSThread}=this.__closure;runOnJS(animationCallbackJSThread)();}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesModal/useVisibilityTransition.tsx');
|
||||
exports.useVisibilityTransition = useVisibilityTransition;
|
||||
}
|
||||
|
||||
function useVisibilityTransition({visible, entranceTiming, exitTiming}) { // fn#102756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:707, offset: 0x02247970, size: 332 bytes, params: 2, frame: 26
|
||||
const env0_2 = exitTiming;
|
||||
let binding = env0_3;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, [false]);
|
||||
const binding2 = env0_2;
|
||||
const value3 = binding2(value2, 2);
|
||||
const property = value3[0];
|
||||
const property2 = value3[1];
|
||||
var env0_3 = property2;
|
||||
useState = binding.useState;
|
||||
const value6 = binding2(Reflect.apply(useState, binding, [visible]), 2);
|
||||
if (value6[0] !== visible) {
|
||||
value6[1](visible);
|
||||
if (!visible) {
|
||||
property2(true);
|
||||
}
|
||||
}
|
||||
binding = env0_3;
|
||||
let closure = _fun102757;
|
||||
const value7 = binding.useCallback(closure, []);
|
||||
const env0_4 = value7;
|
||||
const r15 = visible ? 1 : 0;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
closure = useVisibilityTransitionK;
|
||||
const object = {};
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object.visibility = r15;
|
||||
object.visible = visible;
|
||||
object.entranceTiming = entranceTiming;
|
||||
object.exitTiming = exitTiming;
|
||||
object.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object.animationCallbackJSThread = value7;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 12648900540770;
|
||||
closure.__initData = env0_4;
|
||||
return {opacityStyle: Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]),
|
||||
shouldRender: visible || property};
|
||||
}
|
||||
|
||||
function useVisibilityTransitionK() { // fn#102758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:986, owner: useVisibilityTransition.k, offset: 0x02247abc, size: 165 bytes, params: 1, frame: 24
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const binding = env0_5;
|
||||
const r3 = visible ? entranceTiming : exitTiming;
|
||||
const closure = kN;
|
||||
const object = {};
|
||||
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object.animationCallbackJSThread = env0_4;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 11904317879470;
|
||||
closure.__initData = env1_5;
|
||||
return {opacity: Reflect.apply(withTiming, timingModule, [binding, r3, 'respect-motion-settings', closure])};
|
||||
}
|
||||
|
||||
function kN() { // fn#102759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13709:1062, owner: useVisibilityTransition.k.n, offset: 0x02247b61, size: 48 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(env1_4)();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Metro module 13558; source: modules/quests/native/BountiesNuxPromoSheet.tsx; dependencies: [31, 27, 33, 4501, 697, 4080, 13557, 12765, 1244, 5581, 4578, 2] */
|
||||
function _fun102971(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13748:6, offset: 0x022521ce, size: 226 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{illustrationContainer: {paddingTop: PX_12}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountiesNuxPromoSheet.tsx');
|
||||
exports.default = BountiesNuxPromoSheet;
|
||||
}
|
||||
|
||||
function BountiesNuxPromoSheet() { // fn#102972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13748:308, offset: 0x022522b0, size: 356 bytes, params: 1, frame: 22
|
||||
const styles = useStyles();
|
||||
const value2 = env0_3.useCallback(function() {
|
||||
importDefault(dependencyMap[5]).hideActionSheet(require(dependencyMap[6]).PROMO_SHEET_KEY);
|
||||
}, []);
|
||||
const PromoSheet = (require(12765) /* metro dependency 12765: PromoSheetNative */).PromoSheet;
|
||||
const object2 = {gradientColor: 'purple'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const DDpHZG = (require(1244) /* metro dependency 1244: indexNative */).t.DDpHZG;
|
||||
object2.title = Reflect.apply(string, intl, [DDpHZG]);
|
||||
object2.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LY+igv']);
|
||||
const BountiesPosterSpotIllustration = (require(5581) /* metro dependency 5581: BountiesPosterSpotIllustrationNative */).BountiesPosterSpotIllustration;
|
||||
object2.illustration = <View style={styles.illustrationContainer}><BountiesPosterSpotIllustration width={273} height={205} /></View>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
object2.actions = <Button grow size="lg" variant="primary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} onPress={value2} />;
|
||||
return <PromoSheet {...object2} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,248 @@
|
||||
/* Metro module 13560; source: modules/quests/native/BountyCard.tsx; dependencies: [57, 31, 27, 4502, 7092, 33, 4501, 697, 478, 566, 9495, 3860, 6239, 8011, 5475, 8707, 4573, 1244, 4578, 4073, 2] */
|
||||
function _fun103013(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:6, offset: 0x02253ab2, size: 370 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = 0;
|
||||
const env0_3 = importDefault(dependencyMap[value]);
|
||||
const value2 = importAll(31) /* metro dependency 31 */;
|
||||
const value3 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value3.AppState;
|
||||
const env0_6 = value3.StyleSheet;
|
||||
const env0_7 = value3.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const bountyStore = importDefault(7092) /* metro dependency 7092: BountyStore */;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value4.jsx;
|
||||
const env0_11 = value4.jsxs;
|
||||
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun103014);
|
||||
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
|
||||
const env0_13 = platformUtilsModule.isAndroid() ? 150 : value;
|
||||
const env0_14 = platformUtilsModule.isAndroid();
|
||||
const env0_15 = platformUtilsModule.isAndroid();
|
||||
value = value2.memo(_fun103015);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/BountyCard.tsx');
|
||||
exports.default = value;
|
||||
exports.CARD_WIDTH = 188;
|
||||
}
|
||||
|
||||
function _fun103014() { // fn#103014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:240, offset: 0x02253c24, size: 557 bytes, params: 1, frame: 17
|
||||
const object2 = {};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.tile = {gap: PX_12};
|
||||
object2.card = {'width': 188, 'height': 313, 'overflow': 'hidden', 'padding': 0};
|
||||
const object6 = {};
|
||||
const value = copyDataProperties(object6, StyleSheet.absoluteFillObject, PX_12);
|
||||
object2.cardImage = object6;
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, value);
|
||||
object2.previewVideo = object7;
|
||||
const object9 = {position: 'absolute'};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object9.top = PX_12;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object9.left = PX_12;
|
||||
const CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
|
||||
object9.backgroundColor = CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT;
|
||||
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object9.paddingHorizontal = PX_8;
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object9.paddingVertical = PX_4;
|
||||
let CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
|
||||
object9.color = CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
|
||||
object2.badge = object9;
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.badgeContent = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
|
||||
CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT;
|
||||
object2.badgeText = {textTransform: 'uppercase', color: CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT};
|
||||
const object10 = {position: 'absolute'};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object10.bottom = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object10.left = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object10.right = PX_8;
|
||||
object2.startButton = object10;
|
||||
object2.cardFooter = {'flexDirection': 'column', 'alignItems': 'flex-start', 'maxWidth': 188};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.advertiserRow = {'flexDirection': 'row', 'gap': null, 'alignItems': 'center', gap: PX_4};
|
||||
object2.advertiserName = {flexShrink: 1};
|
||||
object2.advertiserIcon = {'flexShrink': 0, 'opacity': 0.7};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun103015({bounty, index, isActive, isModalVisible, onPress}) { // fn#103015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:1310, offset: 0x02253e51, size: 1995 bytes, params: 2, frame: 39
|
||||
const env0_3 = onPress;
|
||||
let env0_4 = undefined;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], function() {
|
||||
return BountyStore.isBountyCompleted(bounty.id);
|
||||
});
|
||||
let binding = env0_4;
|
||||
const value4 = binding.useCallback(function() {
|
||||
onPress(bounty, index);
|
||||
}, [onPress, bounty, index]);
|
||||
const videoPreview = bounty.videoPreview;
|
||||
let r12 = bounty.imagePreview != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({'assetUrl': null,
|
||||
'width': 188, 'height': 313, assetUrl: bounty.imagePreview}) : null;
|
||||
r12 = r12 == null && videoPreview != null ? (require(9495) /* metro dependency 9495: AssetUtils */).getScaledFirstFrameImageUrl({'assetUrl': null,
|
||||
'width': 188, 'height': 313, assetUrl: videoPreview}) : r12;
|
||||
binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value10 = Reflect.apply(useState, binding, [false]);
|
||||
const binding2 = env0_3;
|
||||
const value11 = binding2(value10, 2);
|
||||
const property = value11[0];
|
||||
env0_4 = value11[1];
|
||||
const value12 = binding.useCallback(_fun103018, []);
|
||||
useState = binding.useState;
|
||||
const value13 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property2 = value13[0];
|
||||
const property3 = value13[1];
|
||||
useState = binding.useState;
|
||||
const value14 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property4 = value14[0];
|
||||
const property5 = value14[1];
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const BOUNTY_TILE_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.BOUNTY_TILE_BORDER_RADIUS;
|
||||
const value15 = Reflect.apply(useToken, useTokenModule, [BOUNTY_TILE_BORDER_RADIUS]);
|
||||
const env0_8 = binding.useRef(null);
|
||||
const value16 = binding.useCallback(_fun103020, []);
|
||||
useState = binding.useState;
|
||||
const value17 = binding2(Reflect.apply(useState, binding, [isActive]), 2);
|
||||
if (isActive !== value17[0]) {
|
||||
value17[1](isActive);
|
||||
if (isActive) {
|
||||
if (property2 && !property4) {
|
||||
property3(false);
|
||||
}
|
||||
if (property4) {
|
||||
property5(false);
|
||||
}
|
||||
} else if (env0_14) {
|
||||
property5(true);
|
||||
}
|
||||
}
|
||||
binding = env0_4;
|
||||
const env0_9 = binding.useRef(null);
|
||||
binding.useEffect(_fun103022, [property4]);
|
||||
binding.useEffect(_fun103025, [isActive]);
|
||||
binding.useEffect(function() {
|
||||
return _fun103027;
|
||||
}, []);
|
||||
useState = binding.useState;
|
||||
const value20 = env0_3(Reflect.apply(useState, binding, [AppState.currentState === 'active']), 2);
|
||||
const property8 = value20[0];
|
||||
const env0_10 = value20[1];
|
||||
binding.useEffect(function() {
|
||||
var env0_0 = AppState.addEventListener('change', _fun103029);
|
||||
return _fun103030;
|
||||
}, []);
|
||||
let r7 = (isActive || property4) && videoPreview != null && property;
|
||||
let r5 = env0_15 && isModalVisible;
|
||||
r5 = !r5 && !(property4 && !isActive) && r7 && property2;
|
||||
const value25 = env0_4.useMemo(_fun103031, [r5]);
|
||||
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
|
||||
r7 = r7 && ((Component) => <Component accessible={false} importantForAccessibility="no-hide-descendants" accessibilityRole="none" onReadyForDisplay={value16} source={{uri: videoPreview}} style={styles.previewVideo} resizeMode="cover" repeat muted disableFocus paused={property8 ? useReducedMotion : !property8} />)(importDefault(8011) /* metro dependency 8011 */);
|
||||
const items2 = [r7];
|
||||
items2[1] = ((Component) => <Component style={[styles.cardImage,
|
||||
value25]} onLoad={value12} source={{uri: r12 ?? undefined}} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
const r9 = value3 && ((CheckmarkSmallBoldIcon) => <CheckmarkSmallBoldIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT} />)((require(8707) /* metro dependency 8707: CheckmarkSmallBoldIcon */).CheckmarkSmallBoldIcon);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
items2[2] = <View style={styles.badge}><View style={styles.badgeContent}>{r9}<Text variant="text-xs/bold" style={styles.badgeText}>{Reflect.apply(string,
|
||||
intl, [value3 ? t.vlGTLf : t['fFIJ/9']])}</Text></View></View>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
string = intl.string;
|
||||
items2[3] = <View style={styles.startButton}><Button variant="secondary-overlay" text={value3 ? Reflect.apply(string,
|
||||
intl, [t['9UtZAY']]) : Reflect.apply(string, intl, [t.LhlgY9])} onPress={value4} /></View>;
|
||||
const card = <Card style={styles.card} radius={value15} onPress={value4} android_ripple={{color: 'transparent'}}>{items2}</Card>;
|
||||
const text = <Text variant="text-sm/medium" color="text-subtle" lineClamp={1} style={styles.advertiserName}>{bounty.advertiserName ?? ''}</Text>;
|
||||
const CircleCheckIcon = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
|
||||
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
|
||||
return (
|
||||
<View style={styles.tile}>
|
||||
{card}
|
||||
<View style={styles.cardFooter}>
|
||||
<View style={styles.advertiserRow}>
|
||||
{text}
|
||||
<CircleCheckIcon
|
||||
size="xxs"
|
||||
style={styles.advertiserIcon}
|
||||
color={ICON_SUBTLE}
|
||||
/>
|
||||
</View>
|
||||
<Text variant="text-sm/medium" color="text-muted">
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.o6FLcF)}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun103020() { // fn#103020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2026, offset: 0x0225464e, size: 86 bytes, params: 1, frame: 14
|
||||
if (env0_8.current != null) {
|
||||
global.clearTimeout(env0_8.current);
|
||||
}
|
||||
env0_8.current = global.setTimeout(_fun103021, env1_13);
|
||||
}
|
||||
|
||||
function _fun103022() { // fn#103022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2238, offset: 0x022546a4, size: 57 bytes, params: 1, frame: 15
|
||||
if (env0_6) {
|
||||
env0_9.current = global.setTimeout(_fun103023, 150);
|
||||
}
|
||||
return _fun103024;
|
||||
}
|
||||
|
||||
function _fun103025() { // fn#103025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2393, offset: 0x0225473c, size: 129 bytes, params: 1, frame: 12
|
||||
if (isActive && env0_9.current != null) {
|
||||
global.clearTimeout(env0_9.current);
|
||||
env0_9.current = null;
|
||||
}
|
||||
if (!(isActive || env0_8.current == null)) {
|
||||
global.clearTimeout(env0_8.current);
|
||||
env0_8.current = null;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103026() { // fn#103026, offset: 0x022547bd, size: 11 bytes, params: 1, frame: 1
|
||||
return _fun103027;
|
||||
}
|
||||
|
||||
function _fun103028() { // fn#103028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2698, offset: 0x02254800, size: 45 bytes, params: 1, frame: 14
|
||||
const env0_0 = AppState.addEventListener('change', _fun103029);
|
||||
return _fun103030;
|
||||
}
|
||||
|
||||
function _fun103031() { // fn#103031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2859, offset: 0x0225482d, size: 23 bytes, params: 1, frame: 3
|
||||
return {opacity: env0_11 ? 0 : 1};
|
||||
}
|
||||
|
||||
function _fun103023() { // fn#103023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2269, offset: 0x022546dd, size: 39 bytes, params: 1, frame: 12
|
||||
env1_7(false);
|
||||
env1_5(false);
|
||||
env1_9.current = null;
|
||||
}
|
||||
|
||||
function _fun103024() { // fn#103024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2309, offset: 0x02254704, size: 56 bytes, params: 1, frame: 13
|
||||
if (env1_9.current != null) {
|
||||
global.clearTimeout(env1_9.current);
|
||||
env1_9.current = null;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103027() { // fn#103027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13750:2544, offset: 0x022547c8, size: 56 bytes, params: 1, frame: 13
|
||||
if (env1_8.current != null) {
|
||||
global.clearTimeout(env1_8.current);
|
||||
env1_8.current = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/* Metro module 13634; source: modules/quests/native/PremiumRewardGradient.tsx; dependencies: [31, 27, 33, 4501, 4000, 697, 3860, 4048, 3967, 4589, 5302, 2] */
|
||||
function _fun104119(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:6, offset: 0x022864fa, size: 521 bytes, params: 8, frame: 24
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
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({wrapper: {'position': 'relative',
|
||||
'overflow': 'hidden'}, fill: {'position': 'absolute', 'left': 0, 'right': 0, 'bottom': 0, 'height': '100%'},
|
||||
glow: {'position': 'absolute', 'left': 0, 'right': 0, 'bottom': 0, 'height': '50%'}, glowLight: {opacity: 0.5}});
|
||||
const env0_9 = {'x': 0, 'y': 0.5};
|
||||
const env0_10 = {'x': 1, 'y': 0.5};
|
||||
const env0_11 = {'x': 0.5, 'y': 0};
|
||||
const env0_12 = {'x': 0.5, 'y': 1};
|
||||
value = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
value = value.hexOpacityToRgba('#000000', 0);
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
const value3 = (require(4000) /* metro dependency 4000: ColorUtils */).hexOpacityToRgba('#FFFFFF', 0);
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const env0_13 = createStylesModule.createStyleProperties({transparentBlack: value, opaqueBlack: BLACK,
|
||||
transparentWhite: value3, opaqueWhite: WHITE});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/PremiumRewardGradient.tsx');
|
||||
exports.default = _default_104125;
|
||||
}
|
||||
|
||||
function useGradientColors() { // fn#104120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:672, offset: 0x02286703, size: 149 bytes, params: 1, frame: 20
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
const EXPRESSIVE_GRADIENT_NITRO_PINK_START = (importDefault(697) /* metro dependency 697: native */).colors.EXPRESSIVE_GRADIENT_NITRO_PINK_START;
|
||||
const value2 = Reflect.apply(useToken, useTokenModule, [EXPRESSIVE_GRADIENT_NITRO_PINK_START]);
|
||||
const moduleValue2 = useTokenModule;
|
||||
useToken = moduleValue2.useToken;
|
||||
const EXPRESSIVE_GRADIENT_NITRO_PINK_END = (importDefault(697) /* metro dependency 697: native */).colors.EXPRESSIVE_GRADIENT_NITRO_PINK_END;
|
||||
return env0_3.useMemo(_fun104121, [value2, Reflect.apply(useToken, moduleValue2,
|
||||
[EXPRESSIVE_GRADIENT_NITRO_PINK_END])]);
|
||||
}
|
||||
|
||||
function PremiumRewardFillGradient({children, style}) { // fn#104122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:883, offset: 0x022867b1, size: 364 bytes, params: 2, frame: 26
|
||||
const styles = useStyles();
|
||||
const value2 = useGradientColors();
|
||||
const {transparentBlack, opaqueBlack, transparentWhite, opaqueWhite} = env0_13();
|
||||
return (
|
||||
<View style={[styles.wrapper, style]}>
|
||||
{((Component) => <Component style={styles.fill} colors={value2} start={env0_9} end={env0_10} pointerEvents="none" />)(importDefault(4589) /* metro dependency 4589 */)}
|
||||
{((Component) => <Component style={styles.fill} colors={opaqueWhite.useMemo(_fun104123, [transparentBlack,
|
||||
opaqueBlack, transparentWhite, opaqueWhite,
|
||||
(require(3967) /* metro dependency 3967: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)())])} start={env0_11} end={env0_12} pointerEvents="none" />)(importDefault(4589) /* metro dependency 4589 */)}
|
||||
{children}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function PremiumRewardGlowGradient({children, style}) { // fn#104124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:1321, offset: 0x02286956, size: 339 bytes, params: 2, frame: 26
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View style={[styles.wrapper, style]}>
|
||||
{((Component) => <Component style={[styles.glow,
|
||||
!(require(3967) /* metro dependency 3967: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)()) && styles.glowLight]} maskElement={((Component) => <Component style={StyleSheet.absoluteFill} colors={['transparent',
|
||||
'black']} start={env0_11} end={env0_12} />)(importDefault(4589) /* metro dependency 4589 */)}>{((Component) => <Component style={StyleSheet.absoluteFill} colors={useGradientColors()} start={env0_9} end={env0_10} />)(importDefault(4589) /* metro dependency 4589 */)}</Component>)(importDefault(5302) /* metro dependency 5302 */)}
|
||||
{children}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_104125({visible, style, children, glow}) { // fn#104125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:1709, offset: 0x02286aa9, size: 77 bytes, params: 2, frame: 16
|
||||
return ((Component) => <Component style={style}>{children}</Component>)(visible ? glow ? PremiumRewardGlowGradient : PremiumRewardFillGradient : View);
|
||||
}
|
||||
|
||||
function _fun104121() { // fn#104121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:865, offset: 0x02286798, size: 25 bytes, params: 1, frame: 3
|
||||
return [env0_0, env0_1];
|
||||
}
|
||||
|
||||
function _fun104123() { // fn#104123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13831:1102, offset: 0x0228691d, size: 57 bytes, params: 1, frame: 4
|
||||
return env0_4 ? [transparentBlack, opaqueBlack] : [transparentWhite, opaqueWhite];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,283 @@
|
||||
/* Metro module 15386; source: modules/quests/native/QuestActivityUnenrolledModal.tsx; dependencies: [5, 57, 31, 27, 7093, 15385, 6528, 33, 4501, 697, 478, 4048, 3866, 566, 6777, 7116, 9483, 9950, 6531, 1423, 9484, 7120, 5080, 3874, 4572, 5475, 9542, 4573, 1244, 4578, 7974, 5277, 8160, 10183, 10121, 2] */
|
||||
function _fun117629(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:6, offset: 0x024bb1c2, size: 339 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 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.Pressable;
|
||||
const env0_7 = value.View;
|
||||
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
||||
const unenrolledActivityQuestStore = importDefault(15385) /* metro dependency 15385: UnenrolledActivityQuestStore */;
|
||||
const env0_10 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value.jsx;
|
||||
const env0_12 = value.jsxs;
|
||||
object = {MAIN: 'main'};
|
||||
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun117639);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestActivityUnenrolledModal.tsx');
|
||||
exports.default = QuestActivityUnenrolledModal;
|
||||
}
|
||||
|
||||
function QuestActivityUnenrolledModalInner({quest}) { // fn#117630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:1751, offset: 0x024bb315, size: 1610 bytes, params: 2, frame: 41
|
||||
var object2;
|
||||
const value2 = (require(4048) /* metro dependency 4048: useTheme */).useTheme();
|
||||
const themesModule = require(3866) /* metro dependency 3866: themes */;
|
||||
const styles = useStyles(themesModule.isThemeDark(value2));
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
const [property, env0_2] = env0_4(env0_5.useState(Reflect.apply(useStateFromStores, fluxModule,
|
||||
[[UnenrolledActivityQuestStore], function() {
|
||||
return UnenrolledActivityQuestStore.getState().autoEnroll;
|
||||
}])), 2);
|
||||
const useGetOrFetchApplicationsModule = require(6777) /* metro dependency 6777: useGetOrFetchApplications */;
|
||||
const useGetOrFetchApplication = useGetOrFetchApplicationsModule.useGetOrFetchApplication;
|
||||
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
||||
const getActivityApplicationId = questTaskUtilsModule.getActivityApplicationId;
|
||||
const value5 = Reflect.apply(useGetOrFetchApplication, useGetOrFetchApplicationsModule,
|
||||
[Reflect.apply(getActivityApplicationId, questTaskUtilsModule, [quest])]);
|
||||
const env0_3 = value5;
|
||||
const value6 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const questCopyHooksModule = require(9950) /* metro dependency 9950: QuestCopyHooks */;
|
||||
const useQuestsInstructionsToWinReward = questCopyHooksModule.useQuestsInstructionsToWinReward;
|
||||
object2 = {quest: quest, taskDetails: value6};
|
||||
let QUEST_ACTIVITY_UNENROLLED_MODAL = QuestsExperimentLocations.QUEST_ACTIVITY_UNENROLLED_MODAL;
|
||||
object2.location = QUEST_ACTIVITY_UNENROLLED_MODAL;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
QUEST_ACTIVITY_UNENROLLED_MODAL = QuestContent.QUEST_ACTIVITY_UNENROLLED_MODAL;
|
||||
object2.sourceQuestContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
|
||||
const value7 = Reflect.apply(useQuestsInstructionsToWinReward, questCopyHooksModule, [object2]);
|
||||
const value8 = env0_5.useMemo(_fun117632, [value5]);
|
||||
const value10 = env0_5.useCallback(env0_3(_fun117634), [quest.id]);
|
||||
const {accessibilityRole,
|
||||
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useCheckboxA11yNative({checked: property});
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const view = <View style={styles.baseShadow}><View style={styles.imagesContainer}>{value8 != null && <View style={styles.appIconContainer}>{((Component) => <Component source={{uri: value8}} style={styles.appIcon} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</View>}<View style={styles.rewardTileContainer}>{((Component) => <Component quest={quest} height={87} width={87} style={styles.questRewardTile} />)(importDefault(9542) /* metro dependency 9542: QuestRewardTile */)}</View></View></View>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const IrNgN4 = (require(1244) /* metro dependency 1244: indexNative */).t.IrNgN4;
|
||||
const text = <Text variant="heading-xl/bold" color="mobile-text-heading-primary" style={{textAlign: 'center'}}>{Reflect.apply(string,
|
||||
intl, [IrNgN4])}</Text>;
|
||||
const format = intl.format;
|
||||
const V3NSJx = (require(1244) /* metro dependency 1244: indexNative */).t.V3NSJx;
|
||||
const view2 = <View style={styles.content}>{view}<View style={styles.textContainer}>{text}<Text variant="text-sm/normal" color="text-subtle" style={{textAlign: 'center'}}>{Reflect.apply(format,
|
||||
intl, [V3NSJx, {questName: quest.config.messages.questName}])}{'\xa0'}{value7}</Text></View></View>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const view3 = <View style={styles.buttonsContainer}><Button size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.l7E81v)} onPress={value10} /><Button size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyT2ol)} onPress={onPress_117635} variant="secondary" /></View>;
|
||||
const pressableProps = {accessibilityRole: accessibilityRole,
|
||||
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['931n1T']),
|
||||
accessibilityState: accessibilityState, onPress: onPress_117636, style: {'alignSelf': 'center',
|
||||
'flexDirection': 'row', 'alignItems': 'center', 'gap': 8}};
|
||||
const FormCheckbox = (require(7974) /* metro dependency 7974: FormCheckboxNative */).FormCheckbox;
|
||||
return (
|
||||
<Stack
|
||||
direction="vertical"
|
||||
align="center"
|
||||
justify="center"
|
||||
style={styles.container}
|
||||
>
|
||||
{view2}
|
||||
<View style={styles.footer}>
|
||||
{view3}
|
||||
<Pressable {...pressableProps}>
|
||||
<FormCheckbox checked={property} />
|
||||
<Text variant="text-sm/normal" color="text-subtle">
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['931n1T'])}
|
||||
</Text>
|
||||
</Pressable>
|
||||
</View>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
function CloseButton_117637() { // fn#117637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4284, offset: 0x024bbb21, size: 129 bytes, params: 1, frame: 18
|
||||
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
|
||||
const headerActionButtonProps = {source: importDefault(8160) /* metro dependency 8160 */, onPress: onPress_117638};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
headerActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
|
||||
return <HeaderActionButton {...headerActionButtonProps} />;
|
||||
}
|
||||
|
||||
function _fun117639(a0) { // fn#117639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:311, offset: 0x024bbbc7, size: 783 bytes, params: 2, frame: 22
|
||||
var r12;
|
||||
var items;
|
||||
var r3;
|
||||
var object3;
|
||||
const object5 = {};
|
||||
const object6 = {flex: 1};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object6.paddingHorizontal = PX_24;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingVertical = PX_16;
|
||||
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
|
||||
object6.paddingBottom = PX_48;
|
||||
object5.container = object6;
|
||||
object5.content = {marginTop: 'auto'};
|
||||
const object7 = {'flexDirection': 'row', 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object7.marginBottom = PX_32;
|
||||
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
|
||||
if (platformUtilsModule.isIOS()) {
|
||||
r3 = a0 ? {'shadowColor': 'rgb(144, 144, 251)', 'shadowOffset': null, 'shadowOpacity': 0.6, 'shadowRadius': 85,
|
||||
shadowOffset: {'width': 0, 'height': 0}} : {};
|
||||
} else {
|
||||
if (a0) {
|
||||
object3 = {'standardDeviation': '85px', 'color': 'rgba(144, 144, 250, 0.41)', 'offsetX': 0, 'offsetY': 0};
|
||||
items = [{dropShadow: {'standardDeviation': '85px', 'color': 'rgba(144, 144, 251, 0.65)', 'offsetX': 0,
|
||||
'offsetY': 0}}, {dropShadow: object3}];
|
||||
r12 = object3;
|
||||
} else {
|
||||
items = [];
|
||||
}
|
||||
r3 = {filter: items};
|
||||
}
|
||||
copyDataProperties(object7, r3, r12);
|
||||
object5.imagesContainer = object7;
|
||||
const isIOS2 = platformUtilsModule.isIOS();
|
||||
const object9 = {};
|
||||
if (isIOS2) {
|
||||
copyDataProperties(object9, a0 ? {'shadowColor': 'rgb(144, 144, 250)', 'shadowOffset': null,
|
||||
'shadowOpacity': 0.4,
|
||||
'shadowRadius': 85, shadowOffset: {'width': 0, 'height': 16}} : {}, r12);
|
||||
}
|
||||
object5.baseShadow = object9;
|
||||
const object10 = {'borderRadius': null, 'borderWidth': 2.18, 'borderColor': 'rgba(151, 151, 159, 0.24)',
|
||||
'borderStyle': 'solid', 'transform': null, 'overflow': 'hidden'};
|
||||
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
||||
object10.transform = [{rotate: '-12.41deg'}];
|
||||
object5.appIconContainer = object10;
|
||||
const object12 = {'width': 87, 'height': 87};
|
||||
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl - 2.18;
|
||||
object5.appIcon = object12;
|
||||
const object13 = {'borderWidth': 2.18, 'borderColor': 'rgba(151, 151, 159, 0.24)', 'borderRadius': null,
|
||||
'borderStyle': 'solid', 'transform': null, 'overflow': 'hidden'};
|
||||
object13.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
||||
object13.transform = [{translateX: -10}, {rotate: '7.81deg'}];
|
||||
object5.rewardTileContainer = object13;
|
||||
const object15 = {};
|
||||
object15.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl - 2.18;
|
||||
object5.questRewardTile = object15;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object5.textContainer = {alignItems: 'center', gap: PX_8};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object5.buttonsContainer = {'flexDirection': 'column', 'gap': null, 'marginBottom': 20, gap: PX_8};
|
||||
object5.footer = {'flexDirection': 'column', 'width': '100%', 'marginTop': 'auto'};
|
||||
return object5;
|
||||
}
|
||||
|
||||
function QuestActivityUnenrolledModal({questId}) { // fn#117640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4548, offset: 0x024bbed6, size: 202 bytes, params: 2, frame: 18
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [QuestStore];
|
||||
if (Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return QuestStore.getQuest(questId);
|
||||
}]) == null) {
|
||||
return null;
|
||||
}
|
||||
object = {};
|
||||
const binding = env0_13;
|
||||
let MAIN = binding.MAIN;
|
||||
object[MAIN] = {headerLeft: CloseButton_117637, headerRight: function() {
|
||||
return null;
|
||||
}, headerTitle: headerTitle_117643, render: render_117644};
|
||||
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
|
||||
MAIN = binding.MAIN;
|
||||
return <Modal screens={object} initialRouteName={MAIN} />;
|
||||
}
|
||||
|
||||
function _fun117632() { // fn#117632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:2270, offset: 0x024bb978, size: 85 bytes, params: 1, frame: 14
|
||||
var r0;
|
||||
var value3;
|
||||
var defaultImport;
|
||||
var getApplicationIconURL;
|
||||
var binding;
|
||||
const value2 = null;
|
||||
if (value2 == env0_3) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
getApplicationIconURL = defaultImport.getApplicationIconURL;
|
||||
binding = env0_3;
|
||||
r0 = Reflect.apply(getApplicationIconURL, defaultImport, [{id: binding.id, icon: binding.icon, size: 87}]);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function* _fun117634() { // fn#117634, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:2374, offset: 0x024bb9d8, size: 194 bytes, params: 1, frame: 20
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_0;
|
||||
var binding2 = env2_2;
|
||||
var value3 = binding(binding2[20]);
|
||||
var enrollInQuest = value3.enrollInQuest;
|
||||
var id = require.id;
|
||||
var object2 = {};
|
||||
var QuestContent = binding(binding2[18]).QuestContent;
|
||||
var QUEST_ACTIVITY_UNENROLLED_MODAL = QuestContent.QUEST_ACTIVITY_UNENROLLED_MODAL;
|
||||
object2.questContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
|
||||
var QuestContentCTA = binding(binding2[21]).QuestContentCTA;
|
||||
var START_QUEST = QuestContentCTA.START_QUEST;
|
||||
object2.questContentCTA = START_QUEST;
|
||||
QuestContent = binding(binding2[18]).QuestContent;
|
||||
QUEST_ACTIVITY_UNENROLLED_MODAL = QuestContent.QUEST_ACTIVITY_UNENROLLED_MODAL;
|
||||
object2.sourceQuestContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
|
||||
yield Reflect.apply(enrollInQuest, value3, [id, object2]);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
env2_1(env2_2[22]).pop();
|
||||
}
|
||||
}
|
||||
|
||||
function QuestActivityUnenrolledModalInnerOnPress() { // fn#117635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:3778, owner: QuestActivityUnenrolledModalInner.onPress, offset: 0x024bba9a, size: 76 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const questActionCreatorsModule = require(9484) /* metro dependency 9484: QuestActionCreators */;
|
||||
questActionCreatorsModule.dismissQuestActivityModal(quest.id);
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
}
|
||||
|
||||
function QuestActivityUnenrolledModalInnerOnPress_117636() { // fn#117636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:3981, owner: QuestActivityUnenrolledModalInner.onPress, offset: 0x024bbae6, size: 59 bytes, params: 1, frame: 13
|
||||
const binding = env0_2;
|
||||
const value = !env0_1;
|
||||
binding(value);
|
||||
(require(9484) /* metro dependency 9484: QuestActionCreators */).setAutoEnroll(value);
|
||||
}
|
||||
|
||||
function CloseButton_117637OnPress() { // fn#117638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4369, owner: CloseButton_117637.onPress, offset: 0x024bbba2, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
}
|
||||
|
||||
function QuestActivityUnenrolledModalHeaderTitle() { // fn#117643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4754, owner: QuestActivityUnenrolledModal.headerTitle, offset: 0x024bbfbb, size: 107 bytes, params: 1, frame: 18
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Text variant="redesign/heading-18/bold" color="mobile-text-heading-primary">
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.l7E81v)}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestActivityUnenrolledModalRender() { // fn#117644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:4904, owner: QuestActivityUnenrolledModal.render, offset: 0x024bc026, size: 125 bytes, params: 1, frame: 17
|
||||
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
||||
const questContentImpressionTrackerNativeProps = {questOrQuests: quest};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_ACTIVITY_UNENROLLED_MODAL = QuestContent.QUEST_ACTIVITY_UNENROLLED_MODAL;
|
||||
questContentImpressionTrackerNativeProps.questContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
|
||||
QUEST_ACTIVITY_UNENROLLED_MODAL = QuestContent.QUEST_ACTIVITY_UNENROLLED_MODAL;
|
||||
questContentImpressionTrackerNativeProps.sourceQuestContent = QUEST_ACTIVITY_UNENROLLED_MODAL;
|
||||
return (
|
||||
<QuestContentImpressionTrackerNative {...questContentImpressionTrackerNativeProps}>
|
||||
{children_117645}
|
||||
</QuestContentImpressionTrackerNative>
|
||||
);
|
||||
}
|
||||
|
||||
function renderChildren() { // fn#117645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15583:5121, owner: QuestActivityUnenrolledModal.render.children, offset: 0x024bc0a3, size: 35 bytes, params: 1, frame: 13
|
||||
return <QuestActivityUnenrolledModalInner quest={quest} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,424 @@
|
||||
/* Metro module 13591; source: modules/quests/native/QuestBottomSheet/QuestBottomSheet.tsx; dependencies: [57, 31, 27, 7093, 6528, 33, 4501, 697, 7099, 9484, 3857, 1244, 8947, 9483, 9520, 6531, 13568, 566, 10183, 7116, 6275, 13592, 13593, 9949, 9513, 7120, 9519, 9517, 9518, 7121, 13630, 13632, 13633, 7114, 8129, 4573, 2] */
|
||||
function _fun103256(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:6, offset: 0x0225e8d9, size: 687 bytes, params: 8, frame: 28
|
||||
const env0_0 = require;
|
||||
const closure = useEnrolledQuestContentProps;
|
||||
const closure2 = QuestBottomSheetContent;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importDefault(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(31) /* metro dependency 31 */).useState;
|
||||
const env0_6 = (require(27) /* metro dependency 27 */).View;
|
||||
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
||||
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
|
||||
const env0_8 = questConstantsModule.QuestsExperimentLocations;
|
||||
const env0_9 = questConstantsModule.QuestTaskPlatform;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value3.jsx;
|
||||
const env0_11 = value3.jsxs;
|
||||
const env0_12 = value3.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {};
|
||||
const object5 = {display: 'flex'};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.paddingHorizontal = PX_16;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object5.gap = PX_24;
|
||||
object.contentContainer = object5;
|
||||
const object6 = {display: 'flex'};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.gap = PX_8;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.marginHorizontal = -PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.marginTop = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingTop = PX_16;
|
||||
object6.borderTopWidth = 1;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object6.borderTopColor = BORDER_SUBTLE;
|
||||
object.microphoneUnit = object6;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object.microphoneUnitHeader = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
|
||||
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object]);
|
||||
value = value.createContext({isInQuestBottomSheet: false});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheet.tsx');
|
||||
exports.default = QuestBottomSheetConnected;
|
||||
exports.QuestBottomSheetStep = {TASK_SELECT: 'TASK_SELECT', CONSOLE_CONNECT: 'CONSOLE_CONNECT',
|
||||
TASK_STATUS: 'TASK_STATUS'};
|
||||
exports.useEnrolledQuestContentProps = closure;
|
||||
exports.QuestBottomSheetContent = closure2;
|
||||
exports.QuestBottomSheetContext = value;
|
||||
}
|
||||
|
||||
function QuestBottomSheet({quest, initialStep, sourceQuestContent}) { // fn#103257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:861, offset: 0x0225eb88, size: 628 bytes, params: 2, frame: 35
|
||||
const styles = useStyles();
|
||||
let QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
|
||||
const {step, defibrillator, stepActions, handleTaskSelect,
|
||||
showMicrophone} = useEnrolledQuestContentProps({quest: quest, initialStep: initialStep,
|
||||
location: QUEST_HOME_MOBILE, sourceQuestContent: sourceQuestContent});
|
||||
const value3 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
|
||||
const hasWatchVideoTasks2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).hasWatchVideoTasks(quest);
|
||||
const isInGameQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isInGameQuest(quest);
|
||||
const [property, env0_0] = env0_3(useState(0), 2);
|
||||
const value7 = env0_4.useMemo(function() {
|
||||
return {isInQuestBottomSheet: true};
|
||||
}, []);
|
||||
const Provider = env0_15.Provider;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const object = {};
|
||||
const QuestBottomSheetHeader = importDefault(13592) /* metro dependency 13592: QuestBottomSheetHeader */;
|
||||
QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
|
||||
object.header = <QuestBottomSheetHeader quest={quest} step={step} location={QUEST_HOME_MOBILE} />;
|
||||
object.footer = isInGameQuest2 ? null : hasWatchVideoTasks2 ? value3 ? ((Component) => <Component quest={quest} sourceQuestContent={sourceQuestContent} step={step} isDefibrilating={defibrillator.isActive} onLayout={onLayout_103259} onBack={stepActions.onBack} onDefib={defibrillator.start} onConnectConsoleNext={stepActions.onNext} />)(importDefault(13593) /* metro dependency 13593: QuestBottomSheetFooter */) : null : ((Component) => <Component quest={quest} sourceQuestContent={sourceQuestContent} step={step} isDefibrilating={defibrillator.isActive} onLayout={onLayout_103259} onBack={stepActions.onBack} onDefib={defibrillator.start} onConnectConsoleNext={stepActions.onNext} />)(importDefault(13593) /* metro dependency 13593: QuestBottomSheetFooter */);
|
||||
object.startExpanded = true;
|
||||
const TASK_SELECT = env0_13.TASK_SELECT;
|
||||
QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
|
||||
return (
|
||||
<Provider value={value7}>
|
||||
<BottomSheet {...object}>
|
||||
<View style={[styles.contentContainer, {paddingBottom: step === TASK_SELECT ? 0 : property}]}>
|
||||
<QuestBottomSheetContent
|
||||
defibrillator={defibrillator}
|
||||
quest={quest}
|
||||
handleTaskSelect={handleTaskSelect}
|
||||
location={QUEST_HOME_MOBILE}
|
||||
showMicrophone={showMicrophone}
|
||||
sourceQuestContent={sourceQuestContent}
|
||||
step={step}
|
||||
/>
|
||||
</View>
|
||||
</BottomSheet>
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function useEnrolledQuestContentProps({quest, initialStep, location, sourceQuestContent}) { // fn#103260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:1913, offset: 0x0225ee07, size: 407 bytes, params: 2, frame: 23
|
||||
const env0_2 = (require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression();
|
||||
const env0_3 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
|
||||
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const value4 = (require(9483) /* metro dependency 9483: QuestHooks */).useIsQuestProgressing(quest);
|
||||
const value6 = env0_3((require(9483) /* metro dependency 9483: QuestHooks */).useTaskPlatformScreen(quest, value3),
|
||||
3);
|
||||
const property = value6[0];
|
||||
const env0_4 = value6[2];
|
||||
const value7 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
|
||||
const value9 = env0_3(useSteps({quest: quest, initialStep: initialStep, location: location}), 2);
|
||||
const property2 = value9[0];
|
||||
const property3 = value9[1];
|
||||
const value10 = useDefibrillator(quest);
|
||||
const userStatus = quest.userStatus;
|
||||
return {quest: quest, defibrillator: value10, step: property2, stepActions: property3,
|
||||
showMicrophone: !(userStatus?.completedAt != null) && !value4 && property === (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen.CONSOLE && !value7,
|
||||
handleTaskSelect: handleTaskSelect};
|
||||
}
|
||||
|
||||
function QuestBottomSheetContent({defibrillator, quest, handleTaskSelect, showMicrophone, sourceQuestContent, step}) { // fn#103279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:5366, offset: 0x0225f98c, size: 400 bytes, params: 2, frame: 27
|
||||
var r5;
|
||||
var r10;
|
||||
var items2;
|
||||
showMicrophone = !(showMicrophone === undefined) && showMicrophone;
|
||||
const value4 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
|
||||
const value5 = env0_4.useMemo(_fun103280, [quest, value4, sourceQuestContent]);
|
||||
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
||||
const TASK_SELECT = env0_13.TASK_SELECT;
|
||||
const items3 = [step === TASK_SELECT && ((Component) => <Component onTaskSelect={handleTaskSelect} />)(importDefault(13632) /* metro dependency 13632: QuestBottomSheetTaskSelect */)];
|
||||
const CONSOLE_CONNECT = env0_13.CONSOLE_CONNECT;
|
||||
items3[1] = step === CONSOLE_CONNECT && ((Component) => <Component quest={quest} step={step} sourceQuestContent={sourceQuestContent} />)(importDefault(13633) /* metro dependency 13633: QuestBottomSheetConsoleConnect */);
|
||||
const TASK_STATUS = env0_13.TASK_STATUS;
|
||||
const value10 = step === TASK_STATUS;
|
||||
if (value10) {
|
||||
items2 = [value5];
|
||||
r10 = showMicrophone && !value4;
|
||||
r10 = r10 && <MicrophoneUnit quest={quest} errorHints={defibrillator?.errorHints} />;
|
||||
items2[1] = r10;
|
||||
r5 = <View>{items2}</View>;
|
||||
} else {
|
||||
r5 = value10;
|
||||
}
|
||||
items3[2] = r5;
|
||||
return (
|
||||
<>
|
||||
{items3}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function MicrophoneUnit({quest, errorHints}) { // fn#103281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:6111, offset: 0x0225fbec, size: 648 bytes, params: 2, frame: 30
|
||||
var r7;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var items;
|
||||
var value7;
|
||||
var value8;
|
||||
const styles = useStyles();
|
||||
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
|
||||
const useQuestHowToHelpArticle = questHooksModule.useQuestHowToHelpArticle;
|
||||
const message = Reflect.apply(useQuestHowToHelpArticle, questHooksModule, []).message;
|
||||
const value4 = (errorHints?.length ?? 0) > 0;
|
||||
if (value4) {
|
||||
if (errorHints != null) {
|
||||
value7 = errorHints.map(function(a0) {
|
||||
return a0.message;
|
||||
});
|
||||
items = [];
|
||||
value8 = arraySpread(items, value7, 0, undefined);
|
||||
items[value8] = message;
|
||||
value8 + 1;
|
||||
r7 = items;
|
||||
} else {
|
||||
r7 = [(require(7114) /* metro dependency 7114: QuestUtils */).isSponsoredPlayQuest(quest) ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bUyEZZ) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.GXqvC1,
|
||||
|
||||
|
||||
{gameTitle: quest.config.messages.gameTitle})];
|
||||
}
|
||||
} else {
|
||||
r7 = [(require(7114) /* metro dependency 7114: QuestUtils */).isSponsoredPlayQuest(quest) ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bUyEZZ) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.GXqvC1,
|
||||
|
||||
{gameTitle: quest.config.messages.gameTitle})];
|
||||
}
|
||||
const WarningIcon = (require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon;
|
||||
const warningIcon = <WarningIcon color={value4 ? 'text-feedback-critical' : 'text-feedback-warning'} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const items2 = [<View style={styles.microphoneUnitHeader}>{warningIcon}<Text variant="text-md/medium" color="mobile-text-heading-primary">{value4 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['28Ql27'],
|
||||
{gameTitle: quest.config.messages.gameTitle}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.YstzGO)}</Text></View>];
|
||||
items2[1] = r7.map(_fun103283);
|
||||
return (
|
||||
<View style={styles.microphoneUnit}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestBottomSheetConnected({questId, initialStep, sourceQuestContent, questContentPosition}) { // fn#103284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:7103, offset: 0x0225feb5, size: 211 bytes, params: 2, frame: 21
|
||||
const quest = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], function() {
|
||||
return QuestStore.getQuest(questId);
|
||||
});
|
||||
if (quest == null) {
|
||||
return null;
|
||||
} else {
|
||||
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
||||
return (
|
||||
<QuestContentImpressionTrackerNative
|
||||
overrideVisibility
|
||||
questOrQuests={quest}
|
||||
questContent={(require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_BOTTOM_SHEET}
|
||||
questContentPosition={questContentPosition}
|
||||
sourceQuestContent={sourceQuestContent}
|
||||
>
|
||||
{children_103286}
|
||||
</QuestContentImpressionTrackerNative>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function useSteps({quest, initialStep}) { // fn#103261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2287, owner: useEnrolledQuestContentProps.useSteps, offset: 0x0225ef9e, size: 843 bytes, params: 2, frame: 31
|
||||
const TaskPlatformScreen = (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen;
|
||||
const userStatus = quest.userStatus;
|
||||
const value2 = userStatus?.completedAt != null;
|
||||
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
|
||||
const useConnectedAccounts = questHooksModule.useConnectedAccounts;
|
||||
const xboxAndPlaystationAccounts = Reflect.apply(useConnectedAccounts, questHooksModule,
|
||||
[]).xboxAndPlaystationAccounts;
|
||||
let binding = env1_4;
|
||||
const value4 = binding.useMemo(_fun103262, [quest, xboxAndPlaystationAccounts]);
|
||||
const value5 = questHooksModule.useQuestTaskDetails(quest);
|
||||
const value6 = questHooksModule.useIsQuestProgressing(quest);
|
||||
const value8 = env1_3(questHooksModule.useTaskPlatformScreen(quest, value5), 3);
|
||||
const property = value8[0];
|
||||
const property2 = value8[1];
|
||||
const property3 = value8[2];
|
||||
binding = env1_4;
|
||||
const useState = binding.useState;
|
||||
let r7 = value4.length === 0 && !value2 && property === TaskPlatformScreen.CONSOLE;
|
||||
r7 = !r7 ? initialStep === env1_13.CONSOLE_CONNECT : r7;
|
||||
const value14 = env1_3(Reflect.apply(useState, binding, [r7]), 2);
|
||||
const property4 = value14[0];
|
||||
const property5 = value14[1];
|
||||
const r12 = value6 || value5.progressSeconds > 0;
|
||||
let r5 = value4.length !== 0 || value2;
|
||||
r5 = !r5 ? property !== TaskPlatformScreen.CONSOLE : r5;
|
||||
r5 = !r5 ? property4 : r5;
|
||||
if (!r5) {
|
||||
property5(true);
|
||||
}
|
||||
const value18 = env1_4.useCallback(_fun103265, [property3]);
|
||||
const value19 = env1_4.useMemo(_fun103268, []);
|
||||
const value20 = env1_4.useMemo(_fun103269, [property4, r12]);
|
||||
const value21 = env1_4.useMemo(_fun103270, [property, property4, r12, value18]);
|
||||
const value22 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
|
||||
const questHooksNativeModule = require(13568) /* metro dependency 13568: QuestHooksNative */;
|
||||
const useMobileActivityQuest = questHooksNativeModule.useMobileActivityQuest;
|
||||
const value23 = env1_4.useMemo(_fun103271, [property2, value21, value19, value20, value22,
|
||||
Reflect.apply(useMobileActivityQuest, questHooksNativeModule, [quest]).isMobileActivityQuest]);
|
||||
return [value23.type, {onBack: value23?.onBack, onNext: value23?.onNext}];
|
||||
}
|
||||
|
||||
function useDefibrillator(a0) { // fn#103273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3985, owner: useEnrolledQuestContentProps.useDefibrillator, offset: 0x0225f5c3, size: 206 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const value = environment.__proto__;
|
||||
const getQuestLoggerModule = require(7099) /* metro dependency 7099: getQuestLogger */;
|
||||
const getQuestLogger = getQuestLoggerModule.getQuestLogger;
|
||||
const QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
|
||||
const value2 = Reflect.apply(getQuestLogger, getQuestLoggerModule, [{quest: a0, location: QUEST_HOME_MOBILE}]);
|
||||
const [property, property2] = env1_3(useState([]), 2);
|
||||
const [property3, property4] = env1_3(useState(false), 2);
|
||||
const binding = env1_4;
|
||||
const useCallback = binding.useCallback;
|
||||
return {errorHints: property, isActive: property3, start: Reflect.apply(useCallback, binding, [_fun103274, [a0,
|
||||
value2, property4, property2]])};
|
||||
}
|
||||
|
||||
function handleTaskSelect(a0) { // fn#103278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:4688, owner: useEnrolledQuestContentProps.handleTaskSelect, offset: 0x0225f7bf, size: 461 bytes, params: 2, frame: 19
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
var object2;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
var captureAdUserAction;
|
||||
let value = environment.__proto__;
|
||||
const CONSOLE = QuestTaskPlatform.CONSOLE;
|
||||
const r6 = a0 === CONSOLE ? QuestContentCTA.SELECT_CONSOLE_PLATFORM : a0 === QuestTaskPlatform.DESKTOP ? QuestContentCTA.SELECT_DESKTOP_PLATFORM : QuestContentCTA.DESELECT_PLATFORM;
|
||||
const adAnalyticsInterfaceExperimentModule = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
||||
const shouldMigrateToAdAnalyticsInterface = adAnalyticsInterfaceExperimentModule.shouldMigrateToAdAnalyticsInterface;
|
||||
const AdAnalyticsInterfaceExperimentStep = adAnalyticsInterfaceExperimentModule.AdAnalyticsInterfaceExperimentStep;
|
||||
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
||||
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, adAnalyticsInterfaceExperimentModule,
|
||||
[STEP_2_CLICKED_INTERNAL, 'quest_bottom_sheet'])) {
|
||||
value = require(9517) /* metro dependency 9517: captureAdUserAction */;
|
||||
captureAdUserAction = value.captureAdUserAction;
|
||||
object2 = {};
|
||||
object2.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
|
||||
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
||||
object2.adCreativeId = quest.id;
|
||||
object2.questContentCTA = r6;
|
||||
object2.surfaceId = QuestContent.QUEST_BOTTOM_SHEET;
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
object2.impressionId = env0_3;
|
||||
Reflect.apply(captureAdUserAction, value, [object2]);
|
||||
} else {
|
||||
env0_2({questId: quest.id, questContent: QuestContent.QUEST_BOTTOM_SHEET, questContentCTA: r6,
|
||||
sourceQuestContent: sourceQuestContent});
|
||||
}
|
||||
env0_4(a0);
|
||||
}
|
||||
|
||||
function _fun103280() { // fn#103280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:5561, offset: 0x0225fb1c, size: 208 bytes, params: 1, frame: 17
|
||||
var r0;
|
||||
var moduleValue;
|
||||
var isInGameQuest2;
|
||||
var moduleValue2;
|
||||
if (env0_2) {
|
||||
const QuestBottomSheetProgressCardWatchTask = (require(13630) /* metro dependency 13630: QuestBottomSheetProgressCard */).QuestBottomSheetProgressCardWatchTask;
|
||||
r0 = <QuestBottomSheetProgressCardWatchTask quest={quest} sourceQuestContent={sourceQuestContent} />;
|
||||
} else {
|
||||
moduleValue = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
||||
isInGameQuest2 = moduleValue.isInGameQuest(quest);
|
||||
moduleValue2 = require(13630) /* metro dependency 13630: QuestBottomSheetProgressCard */;
|
||||
r0 = isInGameQuest2 ? <moduleValue2.QuestBottomSheetProgressCardInGameTask quest={quest} sourceQuestContent={sourceQuestContent} /> : <moduleValue2.QuestBottomSheetProgressCardPlayStreamTask quest={quest} sourceQuestContent={sourceQuestContent} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun103283(a0, a1) { // fn#103283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:6880, offset: 0x0225fe74, size: 65 bytes, params: 3, frame: 15
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return <Text {...{variant: 'text-sm/normal', children: a0}} key={a1} />;
|
||||
}
|
||||
|
||||
function QuestBottomSheetConnectedChildren() { // fn#103286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:7481, owner: QuestBottomSheetConnected.children, offset: 0x0225ffa3, size: 53 bytes, params: 1, frame: 14
|
||||
return (
|
||||
<QuestBottomSheet
|
||||
quest={quest}
|
||||
initialStep={initialStep}
|
||||
sourceQuestContent={sourceQuestContent}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun103262() { // fn#103262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2464, offset: 0x0225f2e9, size: 64 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = Reflect.apply((require(9520) /* metro dependency 9520: QuestPlatformUtils */).supportedConsoles, value,
|
||||
[quest]);
|
||||
return value.filter(function(a0) {
|
||||
var env0_0 = a0;
|
||||
return xboxAndPlaystationAccounts.find(_fun103264);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun103265() { // fn#103265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2912, offset: 0x0225f34d, size: 29 bytes, params: 1, frame: 12
|
||||
env0_6(false);
|
||||
env0_4(null);
|
||||
}
|
||||
|
||||
function _fun103268() { // fn#103268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3007, offset: 0x0225f38e, size: 36 bytes, params: 1, frame: 2
|
||||
const TASK_STATUS = env2_13.TASK_STATUS;
|
||||
return [{type: TASK_STATUS, shouldShow: true}];
|
||||
}
|
||||
|
||||
function _fun103269() { // fn#103269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3066, offset: 0x0225f3b2, size: 95 bytes, params: 1, frame: 5
|
||||
const value = environment.__proto__.__proto__;
|
||||
const CONSOLE_CONNECT = env2_13.CONSOLE_CONNECT;
|
||||
const TASK_STATUS = env2_13.TASK_STATUS;
|
||||
return [{type: CONSOLE_CONNECT, shouldShow: env0_5, onNext: hideConsoleSelect}, {type: TASK_STATUS,
|
||||
shouldShow: true, onBack: env0_7 ? undefined : showConsoleSelect}];
|
||||
}
|
||||
|
||||
function _fun103270() { // fn#103270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3225, offset: 0x0225f411, size: 249 bytes, params: 1, frame: 17
|
||||
const object2 = {};
|
||||
const TASK_SELECT = env2_13.TASK_SELECT;
|
||||
object2.type = TASK_SELECT;
|
||||
let binding = env0_2;
|
||||
const value3 = undefined;
|
||||
const TaskPlatformScreen = (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen;
|
||||
const SELECT = TaskPlatformScreen.SELECT;
|
||||
object2.shouldShow = binding === SELECT;
|
||||
const CONSOLE_CONNECT = env2_13.CONSOLE_CONNECT;
|
||||
binding = env0_2;
|
||||
const CONSOLE = TaskPlatformScreen.CONSOLE;
|
||||
const TASK_STATUS = env2_13.TASK_STATUS;
|
||||
return [object2, {type: CONSOLE_CONNECT, shouldShow: binding === CONSOLE && env0_5, onBack: env0_8,
|
||||
onNext: hideConsoleSelect}, {type: TASK_STATUS, shouldShow: true,
|
||||
onBack: env0_7 ? value3 : env0_2 === TaskPlatformScreen.CONSOLE ? showConsoleSelect : env0_8}];
|
||||
}
|
||||
|
||||
function _fun103271() { // fn#103271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:3661, offset: 0x0225f50a, size: 174 bytes, params: 1, frame: 14
|
||||
const r2 = env0_3.length === 1 && env0_3.includes(QuestTaskPlatform.DESKTOP) || env0_14 || isMobileActivityQuest ? env0_11 : env0_3.length === 1 && env0_3.includes(QuestTaskPlatform.CONSOLE) ? env0_12 : env0_13;
|
||||
return r2.find(function(a0) {
|
||||
return a0.shouldShow;
|
||||
}) ?? r2.at(-1);
|
||||
}
|
||||
|
||||
function _fun103274() { // fn#103274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:4162, offset: 0x0225f691, size: 116 bytes, params: 1, frame: 14
|
||||
env0_3(true);
|
||||
const questActionCreatorsModule = require(9484) /* metro dependency 9484: QuestActionCreators */;
|
||||
let value = questActionCreatorsModule.manuallyStartConsoleQuest(env0_0.id);
|
||||
value = value.then(_fun103275);
|
||||
value = value.catch(_fun103276);
|
||||
value.finally(_fun103277);
|
||||
}
|
||||
|
||||
function _fun103263(a0) { // fn#103263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:2506, offset: 0x0225f329, size: 36 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return xboxAndPlaystationAccounts.find(_fun103264);
|
||||
}
|
||||
|
||||
function _fun103275({errorHints}) { // fn#103275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:4219, offset: 0x0225f705, size: 25 bytes, params: 2, frame: 11
|
||||
return env1_2(errorHints);
|
||||
}
|
||||
|
||||
function _fun103276(a0) { // fn#103276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13781:4251, offset: 0x0225f71e, size: 161 bytes, params: 2, frame: 19
|
||||
env1_2([]);
|
||||
env1_1.error('Failed to start console quest', a0);
|
||||
const defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
const open = defaultImport.open;
|
||||
const object2 = {key: 'START_DEFIBRILLATOR_ERROR'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const CKsXk3 = (require(1244) /* metro dependency 1244: indexNative */).t.CKsXk3;
|
||||
object2.content = Reflect.apply(string, intl, [CKsXk3]);
|
||||
object2.icon = importDefault(8947) /* metro dependency 8947 */;
|
||||
Reflect.apply(open, defaultImport, [object2]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
/* Metro module 13633; source: modules/quests/native/QuestBottomSheet/QuestBottomSheetConsoleConnect.tsx; dependencies: [31, 27, 661, 33, 697, 4501, 9483, 9949, 9513, 9520, 4080, 7007, 13591, 1962, 9519, 9517, 9518, 7121, 7120, 6531, 9354, 6231, 6238, 10162, 1244, 9986, 2] */
|
||||
function _fun104107(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:6, offset: 0x02285bd7, size: 358 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
(require(27) /* metro dependency 27 */).View;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = value.PlatformTypes;
|
||||
const env0_5 = value.UserSettingsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
value.jsxs;
|
||||
value.Fragment;
|
||||
(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_XBOX;
|
||||
(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_PLAYSTATION;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
Reflect.apply(createStyles, value, [{platformButtonsContainer: {'display': 'flex', 'flexDirection': 'row',
|
||||
'gap': null, 'justifyContent': 'space-between', gap: PX_16}, platformButton: {'flex': 1, 'display': 'flex',
|
||||
'justifyContent': 'center', 'alignItems': 'center'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetConsoleConnect.tsx');
|
||||
exports.default = QuestBottomSheetConsoleConnect;
|
||||
}
|
||||
|
||||
function NonInlineConsoleConnection({consoles, onConsoleSelect}) { // fn#104108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:521, offset: 0x02285d3d, size: 94 bytes, params: 2, frame: 16
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
return (
|
||||
<TableRowGroup hasIcons>
|
||||
{consoles.map(_fun104109)}
|
||||
</TableRowGroup>
|
||||
);
|
||||
}
|
||||
|
||||
function ConsoleRow(a0) { // fn#104110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:695, offset: 0x02285dd5, size: 518 bytes, params: 2, frame: 24
|
||||
var value3;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var value4;
|
||||
const env0_0 = a0.onPress;
|
||||
let value = Object.create(null);
|
||||
value.onPress = 0;
|
||||
value = copyDataProperties({}, a0, value, undefined);
|
||||
const type = value.type;
|
||||
const PLAYSTATION = PlatformTypes.PLAYSTATION;
|
||||
if (PLAYSTATION === type) {
|
||||
value4 = undefined;
|
||||
return (
|
||||
<TableRow
|
||||
arrow
|
||||
icon={((PlaystationNeutralIcon) => <PlaystationNeutralIcon />)((require(10162) /* metro dependency 10162: PlaystationNeutralIcon */).PlaystationNeutralIcon)}
|
||||
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.JafL6p)}
|
||||
subLabel={value.account != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['u30/ut']) : value4}
|
||||
onPress={onPress_104111}
|
||||
/>
|
||||
);
|
||||
}
|
||||
const XBOX = PlatformTypes.XBOX;
|
||||
if (XBOX === type) {
|
||||
value3 = undefined;
|
||||
return (
|
||||
<TableRow
|
||||
arrow
|
||||
icon={((XboxNeutralIcon) => <XboxNeutralIcon />)((require(9986) /* metro dependency 9986: XboxNeutralIcon */).XboxNeutralIcon)}
|
||||
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Nfvo72)}
|
||||
subLabel={value.account != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['u30/ut']) : value3}
|
||||
onPress={onPress_104112}
|
||||
/>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function QuestBottomSheetConsoleConnect({quest, step, sourceQuestContent}) { // fn#104113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1351, offset: 0x02285fdb, size: 212 bytes, params: 2, frame: 18
|
||||
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
|
||||
const useConnectedAccounts = questHooksModule.useConnectedAccounts;
|
||||
const xboxAndPlaystationAccounts = Reflect.apply(useConnectedAccounts, questHooksModule,
|
||||
[]).xboxAndPlaystationAccounts;
|
||||
const env0_3 = xboxAndPlaystationAccounts;
|
||||
const env0_4 = (require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression();
|
||||
const env0_5 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
|
||||
return (
|
||||
<NonInlineConsoleConnection
|
||||
consoles={env0_3.useMemo(_fun104114, [quest, xboxAndPlaystationAccounts])}
|
||||
onConsoleSelect={onConsoleSelect}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104109(a0) { // fn#104109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:650, offset: 0x02285d9b, size: 58 bytes, params: 2, frame: 16
|
||||
return (
|
||||
<ConsoleRow
|
||||
{...a0}
|
||||
{...{['onPress']: onConsoleSelect}}
|
||||
key={a0.type}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104114() { // fn#104114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1594, offset: 0x022860af, size: 64 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = Reflect.apply((require(9520) /* metro dependency 9520: QuestPlatformUtils */).supportedConsoles, value,
|
||||
[quest]);
|
||||
return value.map(function(a0) {
|
||||
var env0_0 = a0;
|
||||
var object = {type: a0};
|
||||
object.account = xboxAndPlaystationAccounts.find(_fun104116);
|
||||
return object;
|
||||
});
|
||||
}
|
||||
|
||||
function openQuestBottomSheet() { // fn#104117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1709, owner: QuestBottomSheetConsoleConnect.openQuestBottomSheet, offset: 0x0228611e, size: 117 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[10]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[13]);
|
||||
value = value(dependencyMap[12], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'QuestBottomSheet', {questId: quest.id, initialStep: step,
|
||||
sourceQuestContent: sourceQuestContent}]);
|
||||
}
|
||||
|
||||
function onConsoleSelect(a0) { // fn#104118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1891, owner: QuestBottomSheetConsoleConnect.onConsoleSelect, offset: 0x02286193, size: 871 bytes, params: 2, frame: 19
|
||||
var value;
|
||||
const AdAnalyticsInterfaceExperimentStep = (require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */).AdAnalyticsInterfaceExperimentStep;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const AdUserActionType = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
var moduleValue3;
|
||||
if (a0.account != null) {
|
||||
value = environment.__proto__;
|
||||
moduleValue3 = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
||||
if (moduleValue3.shouldMigrateToAdAnalyticsInterface(AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL,
|
||||
'quest_bottom_sheet_console_connect')) {
|
||||
(require(9517) /* metro dependency 9517: captureAdUserAction */).captureAdUserAction({type: AdUserActionType.CLICK_INTERNAL,
|
||||
|
||||
|
||||
adCreativeType: AdCreativeType.QUEST, adCreativeId: quest.id,
|
||||
questContentCTA: QuestContentCTA.VIEW_CONSOLE_CONNECTIONS, surfaceId: QuestContent.QUEST_BOTTOM_SHEET,
|
||||
sourceQuestContent: sourceQuestContent, impressionId: env0_5});
|
||||
} else {
|
||||
env0_4({questId: quest.id, questContent: QuestContent.QUEST_BOTTOM_SHEET,
|
||||
questContentCTA: QuestContentCTA.VIEW_CONSOLE_CONNECTIONS, sourceQuestContent: sourceQuestContent});
|
||||
}
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
(require(7007) /* metro dependency 7007: openUserSettings */).openUserSettings({screen: UserSettingsSections.CONNECTIONS});
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
var moduleValue = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
||||
if (moduleValue.shouldMigrateToAdAnalyticsInterface(AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL,
|
||||
'quest_bottom_sheet_console_connect')) {
|
||||
(require(9517) /* metro dependency 9517: captureAdUserAction */).captureAdUserAction({type: AdUserActionType.CLICK_INTERNAL,
|
||||
|
||||
|
||||
adCreativeType: AdCreativeType.QUEST, adCreativeId: quest.id,
|
||||
questContentCTA: QuestContentCTA.CONNECT_CONSOLE,
|
||||
surfaceId: QuestContent.QUEST_BOTTOM_SHEET, sourceQuestContent: sourceQuestContent,
|
||||
impressionId: env0_5});
|
||||
} else {
|
||||
env0_4({questId: quest.id, questContent: QuestContent.QUEST_BOTTOM_SHEET,
|
||||
questContentCTA: QuestContentCTA.CONNECT_CONSOLE, sourceQuestContent: sourceQuestContent});
|
||||
}
|
||||
value = importDefault(9354) /* metro dependency 9354: authorizeConnectionNative */;
|
||||
value({platformType: a0.type, location: 'quests', onClose: openQuestBottomSheet});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun104115(a0) { // fn#104115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13830:1632, offset: 0x022860ef, size: 47 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
const object2 = {type: a0};
|
||||
object2.account = xboxAndPlaystationAccounts.find(_fun104116);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,389 @@
|
||||
/* Metro module 13593; source: modules/quests/native/QuestBottomSheet/QuestBottomSheetFooter.tsx; dependencies: [57, 31, 27, 4502, 1878, 7093, 6276, 33, 697, 4501, 6531, 9483, 9500, 9505, 8461, 566, 3860, 5132, 9480, 13594, 4578, 9523, 9520, 13568, 9950, 13591, 8341, 1244, 5284, 9949, 9513, 13127, 9519, 9517, 9518, 7121, 7120, 1585, 1478, 4017, 4504, 4582, 2] */
|
||||
function _fun103294(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:6, offset: 0x02260909, size: 457 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const closure = useQuestRewardClaimHandler;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
||||
const env0_9 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MINIMUM_BOTTOM_PADDING;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const env0_13 = Reflect.apply(createStyles, value, [{container: {'display': 'flex', 'flexGrow': 1, 'flexShrink': 1,
|
||||
paddingHorizontal: PX_16}}]);
|
||||
object = {code: "function QuestBottomSheetFooterTsx1(){const{animation,H_PADDING_PX}=this.__closure;return{opacity:animation.get(),position:'absolute',top:0,left:0,transform:[{translateX:H_PADDING_PX}]};}"};
|
||||
object = {code: "function QuestBottomSheetFooterTsx2(){const{interpolate,animation,windowWidth,H_PADDING_PX,ICON_SIZE_PX}=this.__closure;return{width:interpolate(animation.get(),[0,1],[windowWidth-H_PADDING_PX*2,windowWidth-H_PADDING_PX*2.5-ICON_SIZE_PX]),alignSelf:'flex-end'};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetFooter.tsx');
|
||||
exports.default = QuestBottomSheetFooter;
|
||||
exports.useQuestRewardClaimHandler = closure;
|
||||
}
|
||||
|
||||
function useQuestRewardClaimHandler({quest, hideActionSheet, questContent, onSuccess, sourceQuestContent}) { // fn#103295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:375, offset: 0x02260ad2, size: 852 bytes, params: 2, frame: 32
|
||||
var r13;
|
||||
var styles;
|
||||
hideActionSheet = hideActionSheet === undefined || hideActionSheet;
|
||||
const r7 = questContent !== undefined ? questContent : (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_BOTTOM_SHEET;
|
||||
const env0_4 = sourceQuestContent;
|
||||
const value5 = (require(9483) /* metro dependency 9483: QuestHooks */).useProgressState(quest);
|
||||
const questRewardUtilsModule = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
||||
const hasCollectiblesQuestReward2 = questRewardUtilsModule.hasCollectiblesQuestReward(quest.config);
|
||||
let binding = env0_4;
|
||||
const useMemo = binding.useMemo;
|
||||
let object = [quest.config];
|
||||
const value6 = Reflect.apply(useMemo, binding, [_fun103296, object]);
|
||||
const useFetchCollectiblesProductModule = require(8461) /* metro dependency 8461: useFetchCollectiblesProduct */;
|
||||
const useFetchCollectiblesProduct = useFetchCollectiblesProductModule.useFetchCollectiblesProduct;
|
||||
const QuestProgressState = (require(9483) /* metro dependency 9483: QuestHooks */).QuestProgressState;
|
||||
const COMPLETED = QuestProgressState.COMPLETED;
|
||||
const {product, isFetching} = Reflect.apply(useFetchCollectiblesProduct, useFetchCollectiblesProductModule,
|
||||
[value5 !== COMPLETED ? null : hasCollectiblesQuestReward2 ? value6 : null]);
|
||||
const {isClaimingReward,
|
||||
isFetchingRewardCode} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([QuestStore],
|
||||
function() {
|
||||
var object = {};
|
||||
var questBinding = quest;
|
||||
object.isFetchingRewardCode = QuestStore.isFetchingRewardCode(questBinding.id);
|
||||
object.isClaimingReward = QuestStore.isClaimingReward(questBinding.id);
|
||||
return object;
|
||||
});
|
||||
const value10 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun103298);
|
||||
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun103299);
|
||||
const value12 = env0_4.useMemo(function() {
|
||||
return isFetching || isFetchingRewardCode;
|
||||
}, [isFetching, isFetchingRewardCode]);
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
const value13 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOWER]);
|
||||
const moduleValue8 = useTokenModule;
|
||||
useToken = moduleValue8.useToken;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
const value14 = Reflect.apply(useToken, moduleValue8, [BACKGROUND_BASE_LOW]);
|
||||
const moduleValue9 = useTokenModule;
|
||||
useToken = moduleValue9.useToken;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
if (product != null) {
|
||||
object = {};
|
||||
styles = product.styles;
|
||||
r13 = styles?.buttonColors ?? [];
|
||||
object.buttonColors = r13;
|
||||
styles = product.styles;
|
||||
r13 = styles?.confettiColors ?? [];
|
||||
object.confettiColors = r13;
|
||||
object.backgroundColors = [(importDefault(5132) /* metro dependency 5132 */)(value14),
|
||||
(importDefault(5132) /* metro dependency 5132 */)(value13),
|
||||
(importDefault(5132) /* metro dependency 5132 */)(Reflect.apply(useToken, moduleValue9,
|
||||
[BACKGROUND_BASE_LOWEST]))];
|
||||
product.styles = object;
|
||||
}
|
||||
binding = env0_4;
|
||||
const useCallback = binding.useCallback;
|
||||
return {isLoading: value12, isClaiming: isClaimingReward, claim: Reflect.apply(useCallback, binding, [_fun103301,
|
||||
[quest, product, value10, value11, hideActionSheet, r7, onSuccess, sourceQuestContent]])};
|
||||
}
|
||||
|
||||
function WatchTaskButton({questId, sourceQuestContent, taskDetails}) { // fn#103302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:1915, offset: 0x02260f6b, size: 143 bytes, params: 2, frame: 19
|
||||
const value2 = (require(13594) /* metro dependency 13594: QuestBottomSheetHooks */).useWatchTaskPressHandler({questId: questId,
|
||||
sourceQuestContent: sourceQuestContent});
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<Button
|
||||
grow
|
||||
size="lg"
|
||||
onPress={value2}
|
||||
text={(require(9523) /* metro dependency 9523: MobileQuestVideoWatchCtaCopy */).getVideoQuestWatchCtaText(taskDetails)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function NextButton({onPress, disabled}) { // fn#103303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:2167, offset: 0x02260ffa, size: 130 bytes, params: 2, frame: 18
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Button
|
||||
grow
|
||||
size="lg"
|
||||
onPress={onPress}
|
||||
disabled={disabled}
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a9OfTN)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function DefibButton({questId, loading, disabled, onPress, sourceQuestContent}) { // fn#103304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:2323, offset: 0x0226107c, size: 269 bytes, params: 2, frame: 19
|
||||
const env0_3 = (require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression();
|
||||
const env0_4 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const buttonProps = {'grow': true, 'size': 'lg', 'variant': 'secondary', loading: loading, disabled: disabled};
|
||||
const RefreshIcon = (require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon;
|
||||
buttonProps.icon = <RefreshIcon />;
|
||||
buttonProps.iconPosition = 'end';
|
||||
buttonProps.onPress = onPress_103305;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nPThNb);
|
||||
return <Button {...buttonProps} />;
|
||||
}
|
||||
|
||||
function ClaimButton({questId, disabled, loading, onPress, sourceQuestContent}) { // fn#103306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:3279, offset: 0x02261300, size: 224 bytes, params: 2, frame: 18
|
||||
const env0_3 = (require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression();
|
||||
const env0_4 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const buttonProps = {'grow': true, 'size': 'lg', disabled: disabled, loading: loading, onPress: onPress_103307};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cfY4PE);
|
||||
return <Button {...buttonProps} />;
|
||||
}
|
||||
|
||||
function AnimatedFooter({onLayout, ctaButton, backButton, style, withSafeArea}) { // fn#103308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:4630, offset: 0x02261549, size: 618 bytes, params: 2, frame: 29
|
||||
var object2;
|
||||
withSafeArea = withSafeArea === undefined || withSafeArea;
|
||||
const r16 = backButton != null && backButton !== false;
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const styles = useStyles();
|
||||
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
|
||||
const value2 = (() => (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
_fun103310))();
|
||||
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r16 ? 1 : 0);
|
||||
env0_4.useEffect(_fun103311, [r16, value2, value5]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = AnimatedFooterY;
|
||||
closure.__closure = {animation: value5, H_PADDING_PX: PX_16};
|
||||
closure.__workletHash = 7564903336036;
|
||||
closure.__initData = env0_14;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue3.useAnimatedStyle;
|
||||
closure = AnimatedFooterB;
|
||||
object2 = {interpolate: reanimatedRexportModule.interpolate, animation: value5, windowWidth: width,
|
||||
H_PADDING_PX: PX_16};
|
||||
const LARGE_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_HEIGHT;
|
||||
object2.ICON_SIZE_PX = LARGE_BUTTON_HEIGHT;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 9095621288509;
|
||||
closure.__initData = env0_15;
|
||||
const value7 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
|
||||
const Math = global.Math;
|
||||
const value8 = Math.max(bottom, ACTION_SHEET_MINIMUM_BOTTOM_PADDING);
|
||||
const items2 = [styles.container];
|
||||
items2[1] = withSafeArea && ({paddingBottom: value8});
|
||||
items2[2] = style;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const view = <View2 style={value6}>{backButton}</View2>;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View style={items2} onLayout={onLayout}>
|
||||
{view}
|
||||
<View3 style={value7}>
|
||||
{ctaButton}
|
||||
</View3>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestBottomSheetFooter({quest, onLayout, step, isDefibrilating, onConnectConsoleNext, onBack, onDefib, style, withSafeArea, sourceQuestContent}) { // fn#103314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:5820, offset: 0x02261934, size: 1145 bytes, params: 2, frame: 40
|
||||
var r7;
|
||||
var r0;
|
||||
var value23;
|
||||
var IconButton;
|
||||
var intl;
|
||||
isDefibrilating = !(isDefibrilating === undefined) && isDefibrilating;
|
||||
const object2 = {quest: quest, sourceQuestContent: sourceQuestContent};
|
||||
const value4 = useQuestRewardClaimHandler(object2);
|
||||
const value5 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const value6 = (require(9483) /* metro dependency 9483: QuestHooks */).useIsQuestProgressing(quest);
|
||||
const property = env0_3((require(9483) /* metro dependency 9483: QuestHooks */).useTaskPlatformScreen(quest,
|
||||
value5), 1)[0];
|
||||
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
|
||||
const useConnectedAccounts = questHooksModule.useConnectedAccounts;
|
||||
const value9 = env0_4.useMemo(_fun103315, [quest, Reflect.apply(useConnectedAccounts, questHooksModule,
|
||||
[]).xboxAndPlaystationAccounts]);
|
||||
const value10 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
|
||||
const {isMobileActivityQuest, launchMobileActivity,
|
||||
questApplication} = (require(13568) /* metro dependency 13568: QuestHooksNative */).useMobileActivityQuest(quest);
|
||||
const value12 = (require(9950) /* metro dependency 9950: QuestCopyHooks */).usePrimaryCtaCopy({quest: quest,
|
||||
application: questApplication});
|
||||
const value13 = (require(13594) /* metro dependency 13594: QuestBottomSheetHooks */).useMobileActivityPressHandler({questId: quest.id,
|
||||
sourceQuestContent: sourceQuestContent, launchMobileActivity: launchMobileActivity});
|
||||
let userStatus = quest.userStatus;
|
||||
const value15 = userStatus?.completedAt != null;
|
||||
userStatus = quest.userStatus;
|
||||
const value16 = userStatus?.claimedAt != null;
|
||||
const QuestBottomSheetStep = (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetStep;
|
||||
const TASK_SELECT = QuestBottomSheetStep.TASK_SELECT;
|
||||
if (step === TASK_SELECT) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var animatedFooterProps = {onLayout: onLayout,
|
||||
ctaButton: (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetStep.CONSOLE_CONNECT === step ? <NextButton onPress={onConnectConsoleNext} disabled={value9.length === 0} /> : (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetStep.TASK_STATUS !== step ? null : value15 ? <ClaimButton questId={quest.id} onPress={value4.claim} disabled={value16} loading={value4.isLoading || value4.isClaiming} sourceQuestContent={sourceQuestContent} /> : value10 ? <WatchTaskButton questId={quest.id} taskDetails={value5} sourceQuestContent={sourceQuestContent} /> : isMobileActivityQuest ? ((Button) => <Button grow size="lg" onPress={value13} text={value12} icon={(require(9480) /* metro dependency 9480: QuestUtilsNative */).getPrimaryCtaIcon(quest)} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button) : property !== (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen.CONSOLE || value6 ? <ClaimButton questId={quest.id} onPress={value4.claim} disabled sourceQuestContent={sourceQuestContent} /> : <DefibButton questId={quest.id} loading={isDefibrilating} disabled={isDefibrilating} onPress={onDefib} sourceQuestContent={sourceQuestContent} />};
|
||||
value23 = onBack != null;
|
||||
if (value23) {
|
||||
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r7 = <IconButton accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])} variant="secondary" icon={((ArrowLargeLeftIcon) => <ArrowLargeLeftIcon />)((require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon)} onPress={onBack} size="lg" />;
|
||||
} else {
|
||||
r7 = value23;
|
||||
}
|
||||
animatedFooterProps.backButton = r7;
|
||||
animatedFooterProps.style = style;
|
||||
animatedFooterProps.withSafeArea = withSafeArea;
|
||||
r0 = <AnimatedFooter {...animatedFooterProps} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun103296() { // fn#103296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:636, offset: 0x02260e26, size: 56 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(9505) /* metro dependency 9505: QuestCopyUtils */;
|
||||
const getDefaultReward = value.getDefaultReward;
|
||||
return Reflect.apply(getDefaultReward, value, [quest.config]).skuId;
|
||||
}
|
||||
|
||||
function _fun103298() { // fn#103298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:1038, offset: 0x02260e9e, size: 39 bytes, params: 1, frame: 10
|
||||
var r0;
|
||||
let value = environment.__proto__;
|
||||
value = UserStore.getCurrentUser();
|
||||
if (value == null) {
|
||||
r0 = undefined;
|
||||
} else {
|
||||
value = value.hasVerifiedEmailOrPhone();
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun103299() { // fn#103299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:1158, offset: 0x02260ec5, size: 35 bytes, params: 1, frame: 10
|
||||
const value = environment.__proto__;
|
||||
return UserStore.getCurrentUser()?.verified;
|
||||
}
|
||||
|
||||
function _fun103301() { // fn#103301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:1701, offset: 0x02260ef8, size: 115 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (require(9480) /* metro dependency 9480: QuestUtilsNative */).handleRewardClaimThenView({quest: quest,
|
||||
product: product, hideActionSheet: hideActionSheet, questContent: env0_2,
|
||||
currentUserHasVerifiedEmailOrPhone: env0_8, currentUserHasVerifiedEmail: env0_9, onSuccess: onSuccess,
|
||||
sourceQuestContent: sourceQuestContent});
|
||||
}
|
||||
|
||||
function DefibButtonOnPress(a0) { // fn#103305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:2646, owner: DefibButton.onPress, offset: 0x02261189, size: 375 bytes, params: 2, frame: 17
|
||||
var object2;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
var captureAdUserAction;
|
||||
let value = environment.__proto__;
|
||||
const adAnalyticsInterfaceExperimentModule = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
||||
const shouldMigrateToAdAnalyticsInterface = adAnalyticsInterfaceExperimentModule.shouldMigrateToAdAnalyticsInterface;
|
||||
const AdAnalyticsInterfaceExperimentStep = adAnalyticsInterfaceExperimentModule.AdAnalyticsInterfaceExperimentStep;
|
||||
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
||||
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, adAnalyticsInterfaceExperimentModule,
|
||||
[STEP_2_CLICKED_INTERNAL, 'quest_bottom_sheet_footer'])) {
|
||||
value = require(9517) /* metro dependency 9517: captureAdUserAction */;
|
||||
captureAdUserAction = value.captureAdUserAction;
|
||||
object2 = {};
|
||||
object2.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
|
||||
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
||||
object2.adCreativeId = questId;
|
||||
object2.questContentCTA = QuestContentCTA.DEFIBRILLATOR;
|
||||
object2.surfaceId = QuestContent.QUEST_BOTTOM_SHEET;
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
object2.impressionId = env0_4;
|
||||
Reflect.apply(captureAdUserAction, value, [object2]);
|
||||
} else {
|
||||
env0_3({questId: questId, questContent: QuestContent.QUEST_BOTTOM_SHEET,
|
||||
questContentCTA: QuestContentCTA.DEFIBRILLATOR, sourceQuestContent: sourceQuestContent});
|
||||
}
|
||||
if (onPress != null) {
|
||||
onPress(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function ClaimButtonOnPress() { // fn#103307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:3531, owner: ClaimButton.onPress, offset: 0x022613e0, size: 361 bytes, params: 1, frame: 17
|
||||
var object2;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
var captureAdUserAction;
|
||||
let value = environment.__proto__;
|
||||
const adAnalyticsInterfaceExperimentModule = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
||||
const shouldMigrateToAdAnalyticsInterface = adAnalyticsInterfaceExperimentModule.shouldMigrateToAdAnalyticsInterface;
|
||||
const AdAnalyticsInterfaceExperimentStep = adAnalyticsInterfaceExperimentModule.AdAnalyticsInterfaceExperimentStep;
|
||||
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
||||
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, adAnalyticsInterfaceExperimentModule,
|
||||
[STEP_2_CLICKED_INTERNAL, 'quest_bottom_sheet_footer'])) {
|
||||
value = require(9517) /* metro dependency 9517: captureAdUserAction */;
|
||||
captureAdUserAction = value.captureAdUserAction;
|
||||
object2 = {};
|
||||
object2.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
|
||||
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
||||
object2.adCreativeId = questId;
|
||||
object2.questContentCTA = QuestContentCTA.CLAIM_REWARD;
|
||||
object2.surfaceId = QuestContent.QUEST_BOTTOM_SHEET;
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
object2.impressionId = env0_4;
|
||||
Reflect.apply(captureAdUserAction, value, [object2]);
|
||||
} else {
|
||||
env0_3({questId: questId, questContent: QuestContent.QUEST_BOTTOM_SHEET,
|
||||
questContentCTA: QuestContentCTA.CLAIM_REWARD, sourceQuestContent: sourceQuestContent});
|
||||
}
|
||||
onPress();
|
||||
}
|
||||
|
||||
function AnimatedFooterUseReducedMotion() { // fn#103309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:4788, owner: AnimatedFooter.useReducedMotion, offset: 0x022617b3, size: 59 bytes, params: 1, frame: 13
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun103311() { // fn#103311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:4930, offset: 0x022617fd, size: 85 bytes, params: 1, frame: 19
|
||||
const binding = env0_3;
|
||||
const set = binding.set;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const value3 = 0;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withTiming, timingModule, [env0_0 ? 1 : value3,
|
||||
{duration: env0_2 ? value3 : 200}])]);
|
||||
}
|
||||
|
||||
function AnimatedFooterY() { // fn#103312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:5039, owner: AnimatedFooter.y, offset: 0x02261852, size: 64 bytes, params: 1, frame: 10
|
||||
const object2 = {'opacity': null, 'position': 'absolute', 'top': 0, 'left': 0};
|
||||
object2.opacity = env0_3.get();
|
||||
object2.transform = [{translateX: PX_16}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function AnimatedFooterB() { // fn#103313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:5244, owner: AnimatedFooter.B, offset: 0x02261892, size: 162 bytes, params: 1, frame: 22
|
||||
let value = environment.__proto__;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = reanimatedRexportModule.interpolate;
|
||||
const value3 = env0_3.get();
|
||||
const items2 = [width - 2 * PX_16];
|
||||
value = width - 2.5 * PX_16;
|
||||
const LARGE_BUTTON_HEIGHT = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_HEIGHT;
|
||||
items2[1] = value - LARGE_BUTTON_HEIGHT;
|
||||
return {width: Reflect.apply(interpolate, reanimatedRexportModule, [value3, [0, 1], items2]), alignSelf: 'flex-end'};
|
||||
}
|
||||
|
||||
function _fun103315() { // fn#103315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:6251, offset: 0x02261dad, size: 64 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = Reflect.apply((require(9520) /* metro dependency 9520: QuestPlatformUtils */).supportedConsoles, value,
|
||||
[quest]);
|
||||
return value.filter(function(a0) {
|
||||
var env0_0 = a0;
|
||||
return xboxAndPlaystationAccounts.find(_fun103317);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun103316(a0) { // fn#103316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13783:6293, offset: 0x02261ded, size: 36 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return xboxAndPlaystationAccounts.find(_fun103317);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
/* Metro module 13592; source: modules/quests/native/QuestBottomSheet/QuestBottomSheetHeader.tsx; dependencies: [57, 31, 27, 1878, 33, 4501, 697, 9483, 7116, 13568, 566, 9500, 7114, 1244, 13591, 6531, 13569, 4559, 4570, 4573, 5278, 8638, 2] */
|
||||
function _fun103287(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:6, offset: 0x0225ffd8, size: 390 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'display': 'flex', 'gap': 6};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingHorizontal = PX_16;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.paddingTop = PX_8;
|
||||
object3.container = object4;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.containerWithActionSheet = {'alignItems': 'center', 'flexDirection': 'row', paddingHorizontal: PX_8};
|
||||
object3.title = {textAlign: 'center'};
|
||||
object3.titleWithActionSheet = {'textAlign': 'left', 'flex': 1};
|
||||
object3.actionSheetButton = {'flexGrow': 0, 'flexShrink': 0};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetHeader.tsx');
|
||||
exports.default = QuestBottomSheetHeader;
|
||||
}
|
||||
|
||||
function QuestBottomSheetHeader({quest, step, withActionSheet, location}) { // fn#103288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:627, offset: 0x0226015e, size: 530 bytes, params: 2, frame: 26
|
||||
var r5;
|
||||
var PressableOpacity;
|
||||
var intl;
|
||||
withActionSheet = !(withActionSheet === undefined) && withActionSheet;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(13569) /* metro dependency 13569: QuestDockHooks */).useActionSheetPressHandler(quest);
|
||||
const value3 = useHeaderCopy({quest: quest, step: step, location: location});
|
||||
const value4 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
|
||||
const binding = env0_4;
|
||||
const value5 = binding.useRef(null);
|
||||
binding.useEffect(_fun103293, [value4]);
|
||||
const items2 = [styles.container];
|
||||
items2[1] = withActionSheet && styles.containerWithActionSheet;
|
||||
const r6 = value3 != null && ((Text) => <Text ref={value5} variant="redesign/heading-18/bold" color="mobile-text-heading-primary" accessibilityRole="header" style={[styles.title,
|
||||
withActionSheet && styles.titleWithActionSheet]}>{value3}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
if (withActionSheet) {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r5 = <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UKOtz+'])} onPress={value2} style={styles.actionSheetButton}>{((MoreHorizontalIcon) => <MoreHorizontalIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon)}</PressableOpacity>;
|
||||
} else {
|
||||
r5 = withActionSheet;
|
||||
}
|
||||
return (
|
||||
<View style={items2}>
|
||||
{r6}
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function useHeaderCopy({quest, step}) { // fn#103289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:762, owner: QuestBottomSheetHeader.useHeaderCopy, offset: 0x02260370, size: 507 bytes, params: 2, frame: 28
|
||||
let value = undefined;
|
||||
const userStatus = quest.userStatus;
|
||||
const value2 = (userStatus == null ? value : userStatus.completedAt) != null;
|
||||
const gameTitle = quest.config.messages.gameTitle;
|
||||
const value4 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const hasWatchVideoTasks2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).hasWatchVideoTasks(quest);
|
||||
const isInGameQuest2 = (require(7116) /* metro dependency 7116: QuestTaskUtils */).isInGameQuest(quest);
|
||||
const property = env1_3((require(9483) /* metro dependency 9483: QuestHooks */).useTaskPlatformScreen(quest,
|
||||
value4), 1)[0];
|
||||
const targetMinutes = value4.targetMinutes;
|
||||
const binding = env1_4;
|
||||
const value7 = binding.useMemo(_fun103290, [quest]);
|
||||
const value8 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const defaultRewardNameWithArticle = (require(9500) /* metro dependency 9500: QuestRewardUtils */).getDefaultRewardNameWithArticle(quest.config,
|
||||
currentUser);
|
||||
value = require(7114) /* metro dependency 7114: QuestUtils */;
|
||||
value = value.isSponsoredPlayQuest(quest);
|
||||
return binding.useMemo(_fun103292, [value2, hasWatchVideoTasks2, step, property, value7, gameTitle,
|
||||
defaultRewardNameWithArticle, targetMinutes, value8, isInGameQuest2, value, quest.config]);
|
||||
}
|
||||
|
||||
function _fun103293() { // fn#103293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:2327, offset: 0x022608b3, size: 86 bytes, params: 1, frame: 12
|
||||
var value3;
|
||||
var moduleValue;
|
||||
if (env0_0 && env0_1.current != null) {
|
||||
value3 = environment.__proto__;
|
||||
moduleValue = require(4570) /* metro dependency 4570: setAccessibilityFocusAndroid */;
|
||||
moduleValue.setAccessibilityFocus({ref: env0_1, delay: 100});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103290() { // fn#103290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:1065, offset: 0x0226056b, size: 52 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(7116) /* metro dependency 7116: QuestTaskUtils */).hasStreamOnDesktopTask({quest: quest});
|
||||
}
|
||||
|
||||
function _fun103292() { // fn#103292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13782:1335, offset: 0x0226059f, size: 788 bytes, params: 1, frame: 19
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var value3;
|
||||
var stepBinding;
|
||||
var value4;
|
||||
var binding;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value5;
|
||||
var value;
|
||||
if (env0_2) {
|
||||
value = environment.__proto__.__proto__;
|
||||
return intl.string(t['ij5E/5']);
|
||||
}
|
||||
if (env0_4) {
|
||||
binding = env0_9;
|
||||
value5 = environment.__proto__.__proto__;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
return binding ? Reflect.apply(formatToPlainString, intl, [t.ttFsLj,
|
||||
{reward: env0_10}]) : Reflect.apply(formatToPlainString, intl, [t.IpoqqA, {questReward: env0_10}]);
|
||||
}
|
||||
if (env0_5) {
|
||||
value2 = environment.__proto__.__proto__;
|
||||
moduleValue = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
||||
value3 = moduleValue.getDefaultInGameTask(quest.config);
|
||||
if (value3 != null) {
|
||||
return value3.messages.taskDescription;
|
||||
}
|
||||
stepBinding = step;
|
||||
value4 = environment.__proto__.__proto__;
|
||||
} else {
|
||||
stepBinding = step;
|
||||
}
|
||||
const QuestBottomSheetStep = (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetStep;
|
||||
const TASK_SELECT = QuestBottomSheetStep.TASK_SELECT;
|
||||
return stepBinding === TASK_SELECT ? intl.string(t.drVw4T) : step === QuestBottomSheetStep.CONSOLE_CONNECT ? intl.string(t.svdwbA) : env0_11 ? intl.formatToPlainString(t['2GJLK2'],
|
||||
{targetMinutes: targetMinutes,
|
||||
rewardNameWithArticle: env0_10}) : env0_6 !== (require(6531) /* metro dependency 6531: QuestTypes */).TaskPlatformScreen.DESKTOP ? intl.formatToPlainString(t.NIimTt,
|
||||
{gameTitle: gameTitle, rewardNameWithArticle: env0_10,
|
||||
targetMinutes: targetMinutes}) : env0_8 ? intl.formatToPlainString(t['hkJ+Gs'], {gameTitle: gameTitle,
|
||||
questReward: env0_10, streamingDurationRequirement: targetMinutes}) : intl.formatToPlainString(t.NIimTt,
|
||||
{gameTitle: gameTitle, rewardNameWithArticle: env0_10, targetMinutes: targetMinutes});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
/* Metro module 13594; source: modules/quests/native/QuestBottomSheet/QuestBottomSheetHooks.tsx; dependencies: [5, 31, 6528, 13576, 13591, 4080, 9513, 13595, 9519, 9517, 9518, 7121, 7120, 6531, 7110, 2] */
|
||||
function _fun103318(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:6, offset: 0x02261e11, size: 183 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(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetHooks.tsx');
|
||||
exports.useWatchTaskPressHandler = useWatchTaskPressHandler;
|
||||
exports.useMobileActivityPressHandler = useMobileActivityPressHandler;
|
||||
}
|
||||
|
||||
function useDismissSheetOrCollapseDock() { // fn#103319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:140, offset: 0x02261ec8, size: 137 bytes, params: 1, frame: 18
|
||||
let binding = env0_4;
|
||||
let useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const setRestingQuestDockMode = Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]).setRestingQuestDockMode;
|
||||
binding = env0_4;
|
||||
useContext = binding.useContext;
|
||||
const QuestBottomSheetContext = (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetContext;
|
||||
return env0_4.useCallback(_fun103320, [Reflect.apply(useContext, binding,
|
||||
[QuestBottomSheetContext]).isInQuestBottomSheet, setRestingQuestDockMode]);
|
||||
}
|
||||
|
||||
function useWatchTaskPressHandler({questId, sourceQuestContent}) { // fn#103321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:562, offset: 0x02261fa0, size: 120 bytes, params: 2, frame: 18
|
||||
return env0_4.useCallback(_fun103322, [questId, useDismissSheetOrCollapseDock(),
|
||||
(require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpression(),
|
||||
sourceQuestContent]);
|
||||
}
|
||||
|
||||
function useMobileActivityPressHandler({questId, sourceQuestContent, launchMobileActivity}) { // fn#103323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:1671, offset: 0x0226224a, size: 143 bytes, params: 2, frame: 19
|
||||
const value2 = useDismissSheetOrCollapseDock();
|
||||
const env0_3 = value2;
|
||||
const value3 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpression();
|
||||
return value3.useCallback(env0_3(_fun103325), [questId, value2, launchMobileActivity, value3, sourceQuestContent]);
|
||||
}
|
||||
|
||||
function _fun103320() { // fn#103320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:361, offset: 0x02261f51, size: 79 bytes, params: 1, frame: 12
|
||||
if (isInQuestBottomSheet) {
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('QuestBottomSheet');
|
||||
} else {
|
||||
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103322() { // fn#103322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:725, offset: 0x02262018, size: 562 bytes, params: 1, frame: 20
|
||||
var r4;
|
||||
var moduleValue2;
|
||||
var trackQuestContentClicked;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
var moduleValue3;
|
||||
var captureAdUserAction;
|
||||
const value2 = undefined;
|
||||
env0_2();
|
||||
const defaultImport = importDefault(13595) /* metro dependency 13595: openVideoQuestModal */;
|
||||
let object2 = {};
|
||||
object2.questId = questId;
|
||||
object2.questContentPosition = env0_3 == null ? value2 : env0_3.getQuestContentPosition();
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
defaultImport(object2);
|
||||
const adAnalyticsInterfaceExperimentModule = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
||||
const shouldMigrateToAdAnalyticsInterface = adAnalyticsInterfaceExperimentModule.shouldMigrateToAdAnalyticsInterface;
|
||||
const AdAnalyticsInterfaceExperimentStep = adAnalyticsInterfaceExperimentModule.AdAnalyticsInterfaceExperimentStep;
|
||||
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
||||
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, adAnalyticsInterfaceExperimentModule,
|
||||
[STEP_2_CLICKED_INTERNAL, 'quest_bottom_sheet_watch_task'])) {
|
||||
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
|
||||
captureAdUserAction = moduleValue3.captureAdUserAction;
|
||||
object2 = {};
|
||||
object2.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
|
||||
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
||||
object2.adCreativeId = questId;
|
||||
object2.questContentCTA = QuestContentCTA.WATCH_VIDEO;
|
||||
object2.surfaceId = QuestContent.QUEST_BOTTOM_SHEET;
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
r4 = env0_3 == null ? value2 : env0_3.getId();
|
||||
object2.impressionId = r4;
|
||||
r4 = env0_3 == null ? value2 : env0_3.getQuestContentPosition();
|
||||
object2.questContentPosition = r4;
|
||||
Reflect.apply(captureAdUserAction, moduleValue3, [object2]);
|
||||
} else {
|
||||
moduleValue2 = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
trackQuestContentClicked = moduleValue2.trackQuestContentClicked;
|
||||
object2 = {};
|
||||
object2.questId = questId;
|
||||
object2.questContent = QuestContent.QUEST_BOTTOM_SHEET;
|
||||
object2.questContentCTA = QuestContentCTA.WATCH_VIDEO;
|
||||
r4 = env0_3 == null ? value2 : env0_3.getQuestContentPosition();
|
||||
object2.questContentPosition = r4;
|
||||
r4 = env0_3 == null ? value2 : env0_3.getId();
|
||||
object2.impressionId = r4;
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
Reflect.apply(trackQuestContentClicked, moduleValue2, [object2]);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function* _fun103325() { // fn#103325, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13784:1866, offset: 0x022622e4, size: 525 bytes, params: 1, frame: 22
|
||||
var r6;
|
||||
var value8;
|
||||
var trackQuestContentClicked;
|
||||
var object2;
|
||||
var value11;
|
||||
var captureAdUserAction;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
const value3 = undefined;
|
||||
env1_3();
|
||||
yield dependencyMap();
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
let binding = env2_0;
|
||||
const binding2 = env2_2;
|
||||
const value7 = binding(binding2[8]);
|
||||
const shouldMigrateToAdAnalyticsInterface = value7.shouldMigrateToAdAnalyticsInterface;
|
||||
const AdAnalyticsInterfaceExperimentStep = binding(binding2[8]).AdAnalyticsInterfaceExperimentStep;
|
||||
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
||||
const shouldMigrateToAdAnalyticsInterface2 = Reflect.apply(shouldMigrateToAdAnalyticsInterface, value7,
|
||||
[STEP_2_CLICKED_INTERNAL, 'quest_bottom_sheet_mobile_activity']);
|
||||
binding = env2_0;
|
||||
const binding3 = env2_2;
|
||||
if (shouldMigrateToAdAnalyticsInterface2) {
|
||||
value11 = binding(binding3[9]);
|
||||
captureAdUserAction = value11.captureAdUserAction;
|
||||
object2 = {};
|
||||
object2.type = binding(binding3[10]).AdUserActionType.CLICK_INTERNAL;
|
||||
object2.adCreativeType = binding(binding3[11]).AdCreativeType.QUEST;
|
||||
object2.adCreativeId = require;
|
||||
object2.questContentCTA = binding(binding3[12]).QuestContentCTA.LAUNCH_MOBILE_ACTIVITY;
|
||||
object2.surfaceId = binding(binding3[13]).QuestContent.QUEST_BOTTOM_SHEET;
|
||||
object2.sourceQuestContent = importDefault;
|
||||
r6 = env1_4 == null ? value3 : env1_4.getId();
|
||||
object2.impressionId = r6;
|
||||
r6 = env1_4 == null ? value3 : env1_4.getQuestContentPosition();
|
||||
object2.questContentPosition = r6;
|
||||
Reflect.apply(captureAdUserAction, value11, [object2]);
|
||||
} else {
|
||||
value8 = binding(binding3[14]);
|
||||
trackQuestContentClicked = value8.trackQuestContentClicked;
|
||||
object2 = {};
|
||||
object2.questId = require;
|
||||
object2.questContent = binding(binding3[13]).QuestContent.QUEST_BOTTOM_SHEET;
|
||||
object2.questContentCTA = binding(binding3[12]).QuestContentCTA.LAUNCH_MOBILE_ACTIVITY;
|
||||
r6 = env1_4 == null ? value3 : env1_4.getQuestContentPosition();
|
||||
object2.questContentPosition = r6;
|
||||
r6 = env1_4 == null ? value3 : env1_4.getId();
|
||||
object2.impressionId = r6;
|
||||
object2.sourceQuestContent = importDefault;
|
||||
Reflect.apply(trackQuestContentClicked, value8, [object2]);
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,285 @@
|
||||
/* Metro module 13630; source: modules/quests/native/QuestBottomSheet/QuestBottomSheetProgressCard.tsx; dependencies: [31, 27, 1878, 33, 4501, 697, 9483, 9520, 566, 9500, 7114, 1244, 4573, 6535, 6239, 13620, 9495, 13594, 9480, 5278, 9543, 4589, 5475, 13631, 9376, 2] */
|
||||
function _fun104088(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:6, offset: 0x02284837, size: 676 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.View;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.card = {padding: 0};
|
||||
object2.cardWatchTask = {'justifyContent': 'flex-end', 'height': 210};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.content = {padding: PX_16};
|
||||
object2.contentWatchTask = {alignItems: 'flex-end'};
|
||||
const object3 = {'padding': 12, 'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'center',
|
||||
'alignItems': 'center'};
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object3.backgroundColor = BACKGROUND_MOD_MUTED;
|
||||
let CARD_DEFAULT_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CARD_DEFAULT_RADIUS;
|
||||
object3.borderBottomLeftRadius = CARD_DEFAULT_RADIUS;
|
||||
CARD_DEFAULT_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CARD_DEFAULT_RADIUS;
|
||||
object3.borderBottomRightRadius = CARD_DEFAULT_RADIUS;
|
||||
object3.borderWidth = 1;
|
||||
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object3.borderColor = BORDER_MUTED;
|
||||
object2.footer = object3;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.instructionsText = {marginTop: PX_12, textAlign: 'center'};
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
|
||||
CARD_DEFAULT_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CARD_DEFAULT_RADIUS;
|
||||
object4['borderRadius'] = CARD_DEFAULT_RADIUS;
|
||||
object4['overflow'] = 'hidden';
|
||||
object2.videoPreviewWrapper = object4;
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
||||
object2.videoPreview = object6;
|
||||
const object10 = {'alignItems': 'center', 'justifyContent': 'center', 'borderRadius': null, 'position': 'absolute',
|
||||
'left': '50%', 'overflow': 'hidden', 'top': '50%', 'width': 60, 'height': 60};
|
||||
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object10.transform = [{translateX: -30}, {translateY: -30}];
|
||||
object2.playVideoIconWrapper = object10;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetProgressCard.tsx');
|
||||
exports.QuestBottomSheetProgressCardPlayStreamTask = QuestBottomSheetProgressCardPlayStreamTask;
|
||||
exports.QuestBottomSheetProgressCardWatchTask = QuestBottomSheetProgressCardWatchTask;
|
||||
exports.QuestBottomSheetProgressCardInGameTask = QuestBottomSheetProgressCardInGameTask;
|
||||
}
|
||||
|
||||
function QuestBottomSheetProgressCardPlayStreamTask({quest}) { // fn#104089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:1292, offset: 0x02284adb, size: 846 bytes, params: 2, frame: 30
|
||||
var r5;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const value4 = (require(9483) /* metro dependency 9483: QuestHooks */).useIsQuestProgressing(quest);
|
||||
let userStatus = quest.userStatus;
|
||||
const value5 = userStatus?.completedAt != null;
|
||||
userStatus = quest.userStatus;
|
||||
const value6 = userStatus?.claimedAt != null;
|
||||
const env0_3 = value6;
|
||||
const value7 = (require(9520) /* metro dependency 9520: QuestPlatformUtils */).supportedTaskPlatforms(quest);
|
||||
const value8 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestFormattedDate(quest.config.rewardsConfig.rewardsExpireAt);
|
||||
const gameTitle = quest.config.messages.gameTitle;
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const value10 = env0_3.useMemo(_fun104091, [value3, value5, value6, gameTitle,
|
||||
(require(9500) /* metro dependency 9500: QuestRewardUtils */).getDefaultRewardName(quest.config, currentUser),
|
||||
value4, value7, value8, (require(7114) /* metro dependency 7114: QuestUtils */).isSponsoredPlayQuest(quest)]);
|
||||
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
|
||||
const view = <View style={styles.content}>{((Component) => <Component quest={quest} size="lg" progress={value3.percentComplete} loading={!(value5 || value4)} hasConfetti />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */)}{value10 != null && <Text style={styles.instructionsText} variant="text-sm/semibold" color="text-subtle">{value10}</Text>}</View>;
|
||||
if (value4) {
|
||||
var viewBindingProps = {style: styles.footer};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r5 = <View {...viewBindingProps}><Text color="text-feedback-positive" variant="text-sm/semibold">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.lIFg6I,
|
||||
|
||||
{gameName: quest.config.messages.gameTitle})}</Text></View>;
|
||||
} else {
|
||||
r5 = value4;
|
||||
}
|
||||
return (
|
||||
<Card style={styles.card} border="subtle">
|
||||
{view}
|
||||
{r5}
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestBottomSheetProgressCardWatchTask({quest, sourceQuestContent}) { // fn#104094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:3305, offset: 0x022851c0, size: 1165 bytes, params: 2, frame: 34
|
||||
var url;
|
||||
var VideoComponent;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const binding = env0_3;
|
||||
const value4 = binding.useMemo(_fun104095, [quest]);
|
||||
const value5 = binding.useMemo(_fun104096, [quest]);
|
||||
const value6 = binding.useMemo(_fun104097, [quest]);
|
||||
const value7 = (require(13594) /* metro dependency 13594: QuestBottomSheetHooks */).useWatchTaskPressHandler({questId: quest.id,
|
||||
sourceQuestContent: sourceQuestContent});
|
||||
let r8 = value4 != null && (require(9480) /* metro dependency 9480: QuestUtilsNative */).isHeroVideoSupported(value4);
|
||||
const userStatus = quest.userStatus;
|
||||
let r10 = userStatus?.completedAt != null ? (require(1244) /* metro dependency 1244: indexNative */).t.YsCuyF : (require(1244) /* metro dependency 1244: indexNative */).t['74KqrR'];
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const pressableOpacityProps = {onPress: value7, accessibilityRole: 'button',
|
||||
accessibilityLabel: (require(1244) /* metro dependency 1244: indexNative */).intl.string(r10)};
|
||||
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
|
||||
const items2 = [styles.card];
|
||||
items2[1] = styles.cardWatchTask;
|
||||
if (r8) {
|
||||
var viewBindingProps = {style: styles.videoPreviewWrapper};
|
||||
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
|
||||
var videoProps = {'style': null, 'poster': null, 'posterResizeMode': 'cover', 'source': null,
|
||||
'resizeMode': 'cover',
|
||||
'muted': true, 'disableFocus': true, 'preventsDisplaySleepDuringVideoPlayback': false,
|
||||
style: styles.videoPreview};
|
||||
url = value5?.url;
|
||||
videoProps.poster = url;
|
||||
url = value4.url;
|
||||
videoProps.source = {uri: url};
|
||||
r10 = <View {...viewBindingProps}><VideoComponent {...videoProps} />{((Component) => <Component start={{'x': 0.5,
|
||||
|
||||
'y': 0.5}} end={{'x': 1, 'y': 1}} style={StyleSheet.absoluteFill} colors={['rgba(0, 0, 0, 0)',
|
||||
'rgba(0, 0, 0, 1)']} />)(importDefault(4589) /* metro dependency 4589 */)}</View>;
|
||||
} else {
|
||||
r10 = r8;
|
||||
}
|
||||
const items3 = [r10];
|
||||
r8 = !r8 && value6 != null && <View style={styles.videoPreviewWrapper}>{((Component) => <Component style={styles.videoPreview} source={{uri: value6.url}} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}{((Component) => <Component start={{'x': 0.5,
|
||||
'y': 0.5}} end={{'x': 1, 'y': 1}} style={StyleSheet.absoluteFill} colors={['rgba(0, 0, 0, 0)',
|
||||
'rgba(0, 0, 0, 1)']} />)(importDefault(4589) /* metro dependency 4589 */)}</View>;
|
||||
items3[1] = r8;
|
||||
const value15 = ((Component) => <Component blurTheme="light" />)(importDefault(13631) /* metro dependency 13631: QuestDockBlurredContentBackground */);
|
||||
const PlayIcon = (require(9376) /* metro dependency 9376: PlayIcon */).PlayIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
items3[2] = <View style={styles.playVideoIconWrapper}>{value15}<PlayIcon color={WHITE} /></View>;
|
||||
items3[3] = <View style={[styles.content,
|
||||
styles.contentWatchTask]}>{((Component) => <Component quest={quest} size="x-sm" progress={value3.percentComplete} hasConfetti />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */)}</View>;
|
||||
return (
|
||||
<PressableOpacity {...pressableOpacityProps}>
|
||||
<Card style={items2} border="subtle">
|
||||
{items3}
|
||||
</Card>
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestBottomSheetProgressCardInGameTask({quest}) { // fn#104098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:5055, offset: 0x0228571e, size: 213 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useThirdPartyTaskDetails(quest);
|
||||
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
|
||||
return (
|
||||
<Card style={styles.card} border="subtle">
|
||||
<View style={styles.content}>
|
||||
{((Component) => <Component quest={quest} size="lg" progress={value3?.percentComplete ?? 0} hasConfetti />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */)}
|
||||
</View>
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104091() { // fn#104091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:1831, offset: 0x02284e29, size: 789 bytes, params: 1, frame: 19
|
||||
var environment;
|
||||
var r1;
|
||||
var value2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const FirstPartyQuestTaskTypes = (require(6535) /* metro dependency 6535: FirstPartyQuestTaskTypes */).FirstPartyQuestTaskTypes;
|
||||
const FirstPartyQuestTaskTypesSets = (require(6535) /* metro dependency 6535: FirstPartyQuestTaskTypes */).FirstPartyQuestTaskTypesSets;
|
||||
var binding;
|
||||
var value7;
|
||||
var value;
|
||||
if (env0_2) {
|
||||
if (env0_3) {
|
||||
if (env0_1) {
|
||||
binding = env0_0;
|
||||
value = binding.targetSeconds - binding.progressSeconds;
|
||||
value = global.Math.ceil(value / 60);
|
||||
value7 = environment.__proto__;
|
||||
return intl.format(t.aFaRso, {minutesLeft: value, minutesHook: minutesHook});
|
||||
}
|
||||
if (env0_8) {
|
||||
value = environment.__proto__;
|
||||
value = intl.string(t['04ateG']);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = env0_4.length > 1 ? intl.formatToPlainString(t.E2R8VX,
|
||||
{gameName: gameTitle}) : env0_0.taskType === FirstPartyQuestTaskTypes.STREAM_ON_DESKTOP ? intl.formatToPlainString(t.boMftC,
|
||||
|
||||
|
||||
|
||||
{gameName: gameTitle}) : env0_0.taskType === FirstPartyQuestTaskTypes.PLAY_ON_DESKTOP ? intl.formatToPlainString(t['9Peldf'],
|
||||
|
||||
|
||||
|
||||
{gameName: gameTitle}) : FirstPartyQuestTaskTypesSets.CONSOLE.has(env0_0.taskType) ? intl.formatToPlainString(t['+8JB6Y'],
|
||||
|
||||
|
||||
|
||||
{gameTitle: gameTitle}) : null;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
value2 = environment.__proto__;
|
||||
return intl.format(t.e3OlfB, {rewardHook: rewardHook, date: env0_5});
|
||||
}
|
||||
if (env0_1) {
|
||||
binding = env0_0;
|
||||
value = binding.targetSeconds - binding.progressSeconds;
|
||||
value = global.Math.ceil(value / 60);
|
||||
value7 = environment.__proto__;
|
||||
return intl.format(t.aFaRso, {minutesLeft: value, minutesHook: minutesHook});
|
||||
}
|
||||
if (env0_8) {
|
||||
value = environment.__proto__;
|
||||
value = intl.string(t['04ateG']);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = env0_4.length > 1 ? intl.formatToPlainString(t.E2R8VX,
|
||||
{gameName: gameTitle}) : env0_0.taskType === FirstPartyQuestTaskTypes.STREAM_ON_DESKTOP ? intl.formatToPlainString(t.boMftC,
|
||||
|
||||
{gameName: gameTitle}) : env0_0.taskType === FirstPartyQuestTaskTypes.PLAY_ON_DESKTOP ? intl.formatToPlainString(t['9Peldf'],
|
||||
|
||||
{gameName: gameTitle}) : FirstPartyQuestTaskTypesSets.CONSOLE.has(env0_0.taskType) ? intl.formatToPlainString(t['+8JB6Y'],
|
||||
|
||||
{gameTitle: gameTitle}) : null;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function _fun104095() { // fn#104095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:3442, offset: 0x0228564d, size: 67 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
const getQuestAsset = value.getQuestAsset;
|
||||
const questBinding = quest;
|
||||
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
|
||||
const QUEST_BAR_HERO_VIDEO = QuestAssetType.QUEST_BAR_HERO_VIDEO;
|
||||
return Reflect.apply(getQuestAsset, value, [questBinding, QUEST_BAR_HERO_VIDEO]);
|
||||
}
|
||||
|
||||
function _fun104096() { // fn#104096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:3536, offset: 0x02285690, size: 75 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
const getQuestAsset = value.getQuestAsset;
|
||||
const questBinding = quest;
|
||||
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
|
||||
const VIDEO_PLAYER_THUMBNAIL = QuestAssetType.VIDEO_PLAYER_THUMBNAIL;
|
||||
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_THUMBNAIL, undefined, true]);
|
||||
}
|
||||
|
||||
function _fun104097() { // fn#104097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:3642, offset: 0x022856db, size: 67 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
const getQuestAsset = value.getQuestAsset;
|
||||
const questBinding = quest;
|
||||
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
|
||||
const QUEST_BAR_HERO_IMAGE = QuestAssetType.QUEST_BAR_HERO_IMAGE;
|
||||
return Reflect.apply(getQuestAsset, value, [questBinding, QUEST_BAR_HERO_IMAGE]);
|
||||
}
|
||||
|
||||
function rewardHook() { // fn#104092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:1903, offset: 0x0228513e, size: 67 bytes, params: 1, frame: 14
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text variant="text-sm/semibold" color="text-strong">
|
||||
{env1_7}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function minutesHook(a0) { // fn#104093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13827:2130, offset: 0x02285181, size: 63 bytes, params: 2, frame: 14
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text variant="text-sm/semibold" color="text-strong">
|
||||
{a0}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/* Metro module 13632; source: modules/quests/native/QuestBottomSheet/QuestBottomSheetTaskSelect.tsx; dependencies: [31, 6528, 33, 6231, 6238, 10160, 1244, 8658, 2] */
|
||||
function _fun104103(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13829:6, offset: 0x02285992, size: 162 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_2 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestTaskPlatform;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestBottomSheet/QuestBottomSheetTaskSelect.tsx');
|
||||
exports.default = QuestBottomSheetTaskSelect;
|
||||
}
|
||||
|
||||
function QuestBottomSheetTaskSelect({onTaskSelect}) { // fn#104104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13829:272, offset: 0x02285a34, size: 331 bytes, params: 2, frame: 25
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object = {arrow: true};
|
||||
const ScreenIcon = (require(10160) /* metro dependency 10160: ScreenIcon */).ScreenIcon;
|
||||
object.icon = <ScreenIcon />;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['QXc01+']);
|
||||
object.onPress = onPress_104105;
|
||||
const tableRow = <TableRow {...object} />;
|
||||
const GameControllerIcon = (require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon;
|
||||
return (
|
||||
<TableRowGroup hasIcons>
|
||||
{tableRow}
|
||||
<TableRow
|
||||
arrow
|
||||
icon={<GameControllerIcon />}
|
||||
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8lAfuB'])}
|
||||
onPress={onPress_104106}
|
||||
/>
|
||||
</TableRowGroup>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestBottomSheetTaskSelectOnPress() { // fn#104105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13829:494, owner: QuestBottomSheetTaskSelect.onPress, offset: 0x02285b7f, size: 44 bytes, params: 1, frame: 12
|
||||
var r0;
|
||||
var value;
|
||||
let onTaskSelectBinding = onTaskSelect;
|
||||
if (onTaskSelectBinding == null) {
|
||||
r0 = undefined;
|
||||
} else {
|
||||
onTaskSelectBinding = onTaskSelect;
|
||||
value = environment.__proto__;
|
||||
value = onTaskSelectBinding(QuestTaskPlatform.DESKTOP);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function QuestBottomSheetTaskSelectOnPress_104106() { // fn#104106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13829:650, owner: QuestBottomSheetTaskSelect.onPress, offset: 0x02285bab, size: 44 bytes, params: 1, frame: 12
|
||||
var r0;
|
||||
var value;
|
||||
let onTaskSelectBinding = onTaskSelect;
|
||||
if (onTaskSelectBinding == null) {
|
||||
r0 = undefined;
|
||||
} else {
|
||||
onTaskSelectBinding = onTaskSelect;
|
||||
value = environment.__proto__;
|
||||
value = onTaskSelectBinding(QuestTaskPlatform.CONSOLE);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,346 @@
|
||||
/* Metro module 10183; source: modules/quests/native/QuestContentImpressionTracker.native.tsx; dependencies: [57, 31, 7030, 9515, 661, 6266, 566, 9513, 9514, 7121, 2] */
|
||||
function _fun79242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:6, offset: 0x01e4a496, size: 260 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_79245 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
|
||||
const env0_6 = (require(9515) /* metro dependency 9515: ContentImpressionTrackerConstants */).MIN_QUEST_CONTENT_VISIBILITY_PERCENTAGE;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).AppStates;
|
||||
const env0_8 = (require(31) /* metro dependency 31 */).createElement;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestContentImpressionTracker.native.tsx');
|
||||
exports.QuestContentImpressionTrackerNative = QuestContentImpressionTrackerNative;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_79243(a0, a1) { // fn#79243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:228, offset: 0x01e4a59a, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun79244;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_79245(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_79245(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_79245(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun79244;
|
||||
}
|
||||
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 useVisibilityData({adContentIds, visibilityRef, overrideVisibility}) { // fn#79246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2034, offset: 0x01e4a70e, size: 175 bytes, params: 2, frame: 20
|
||||
var object2;
|
||||
const [property, property2] = env0_3(env0_4.useState(0), 2);
|
||||
env0_4.useEffect(_fun79247, [adContentIds, property2, visibilityRef]);
|
||||
const r2 = overrideVisibility ?? property >= MIN_QUEST_CONTENT_VISIBILITY_PERCENTAGE;
|
||||
object2 = {visible: r2};
|
||||
object2.visibleChanged = r2 !== (importDefault(6266) /* metro dependency 6266: usePrevious */)(r2);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function calculateVisibilityPercentage({visibilityRef, entityId}) { // fn#79251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:1172, offset: 0x01e4a8ce, size: 650 bytes, params: 2, frame: 19
|
||||
var r3;
|
||||
var r0;
|
||||
var r4;
|
||||
var current;
|
||||
var property;
|
||||
var parent;
|
||||
var items2;
|
||||
var scrollX;
|
||||
var x;
|
||||
var width;
|
||||
var items3;
|
||||
var firstItemOffset;
|
||||
var Math;
|
||||
var max;
|
||||
var min;
|
||||
var value2;
|
||||
let value = undefined;
|
||||
if (visibilityRef == null) {
|
||||
r3 = value;
|
||||
} else {
|
||||
current = visibilityRef.current;
|
||||
r3 = current == null || current.children == null ? value : current.children[entityId];
|
||||
}
|
||||
let layout = r3 == null ? value : r3.layout;
|
||||
if (layout == null) {
|
||||
return 0;
|
||||
}
|
||||
if (visibilityRef == null) {
|
||||
layout = value;
|
||||
} else {
|
||||
parent = visibilityRef.current.parent;
|
||||
layout = parent == null ? value : parent.layout;
|
||||
}
|
||||
if (layout == null) {
|
||||
return 0;
|
||||
}
|
||||
let r2 = visibilityRef.current.axis ?? 'vertical';
|
||||
if (r2 === 'horizontal') {
|
||||
current = visibilityRef.current;
|
||||
parent = current.parent;
|
||||
scrollX = parent.scrollX;
|
||||
if (scrollX == null) {
|
||||
return 0;
|
||||
}
|
||||
layout = r3.layout;
|
||||
x = layout.x;
|
||||
items2 = [x];
|
||||
layout = r3.layout;
|
||||
x = layout.x;
|
||||
layout = r3.layout;
|
||||
width = layout.width;
|
||||
items2[1] = x + width;
|
||||
current = visibilityRef.current;
|
||||
parent = current.parent;
|
||||
scrollX = parent.scrollX;
|
||||
items3 = [scrollX];
|
||||
current = visibilityRef.current;
|
||||
parent = current.parent;
|
||||
scrollX = parent.scrollX;
|
||||
current = visibilityRef.current;
|
||||
parent = current.parent;
|
||||
layout = parent.layout;
|
||||
width = layout.width;
|
||||
items3[1] = scrollX + width;
|
||||
layout = r3.layout;
|
||||
width = layout.width;
|
||||
r0 = items3;
|
||||
r2 = items2;
|
||||
r4 = width;
|
||||
current = visibilityRef.current;
|
||||
parent = current.parent;
|
||||
firstItemOffset = parent.firstItemOffset;
|
||||
if (firstItemOffset != null) {
|
||||
firstItemOffset = visibilityRef.current.parent.firstItemOffset;
|
||||
r2[0] += firstItemOffset;
|
||||
r2[1] += firstItemOffset;
|
||||
}
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
property = r2[0];
|
||||
value = Reflect.apply(max, Math, [property, r0[0]]);
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
property = r2[1];
|
||||
value2 = Reflect.apply(min, Math, [property, r0[1]]);
|
||||
} else {
|
||||
if (visibilityRef.current.parent.scrollY == null) {
|
||||
return 0;
|
||||
}
|
||||
var y = r3.layout.y;
|
||||
items2 = [y];
|
||||
y = r3.layout.y;
|
||||
var height = r3.layout.height;
|
||||
items2[1] = y + height;
|
||||
height = r3.layout.height;
|
||||
r0 = [visibilityRef.current.parent.scrollY,
|
||||
visibilityRef.current.parent.scrollY + visibilityRef.current.parent.layout.height];
|
||||
r2 = items2;
|
||||
r4 = height;
|
||||
firstItemOffset = visibilityRef.current.parent.firstItemOffset;
|
||||
if (firstItemOffset != null) {
|
||||
firstItemOffset = visibilityRef.current.parent.firstItemOffset;
|
||||
r2[0] += firstItemOffset;
|
||||
r2[1] += firstItemOffset;
|
||||
}
|
||||
Math = global.Math;
|
||||
value = Math.max(r2[0], r0[0]);
|
||||
Math = global.Math;
|
||||
value2 = Math.min(r2[1], r0[1]);
|
||||
}
|
||||
Math = global.Math;
|
||||
value = Math.max(0, value2 - value);
|
||||
Math = global.Math;
|
||||
return Math.min(value / r4, 1);
|
||||
}
|
||||
|
||||
function QuestContentImpressionTrackerNative(a0) { // fn#79252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2809, offset: 0x01e4ab58, size: 370 bytes, params: 2, frame: 23
|
||||
var object3;
|
||||
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
|
||||
return AppStateStore.getState();
|
||||
});
|
||||
const ACTIVE = AppStates.ACTIVE;
|
||||
const value2 = state === ACTIVE;
|
||||
const value3 = env0_4.useRef(null);
|
||||
const value4 = (importDefault(6266) /* metro dependency 6266: usePrevious */)(value2);
|
||||
const {key,
|
||||
adContentIds} = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useAdContentImpressionTrackerProps(a0);
|
||||
object3 = {};
|
||||
copyDataProperties(object3, a0, undefined);
|
||||
object3['adContentIds'] = adContentIds;
|
||||
const value6 = useVisibilityData(object3);
|
||||
object3 = {};
|
||||
const value7 = copyDataProperties(object3, a0, undefined);
|
||||
copyDataProperties(object3, value6, value7);
|
||||
object3['focused'] = value2;
|
||||
object3['focusedChanged'] = value2 !== value4;
|
||||
object3['reference'] = value3;
|
||||
object3['isFocused'] = value2;
|
||||
const createElementBinding = createElement;
|
||||
const QuestContentImpressionTracker = (require(9514) /* metro dependency 9514: ContentImpressionTracker */).QuestContentImpressionTracker;
|
||||
const value8 = 'questOrQuests' in a0;
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, object3, value7);
|
||||
object4['key'] = key;
|
||||
object4['adContentIds'] = adContentIds;
|
||||
if (value8) {
|
||||
object4['adCreativeType'] = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
||||
} else {
|
||||
object4['adCreativeType'] = a0.adCreativeType;
|
||||
}
|
||||
return createElementBinding(QuestContentImpressionTracker, object4);
|
||||
}
|
||||
|
||||
function _fun79247() { // fn#79247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2172, offset: 0x01e4a7bd, size: 50 bytes, params: 1, frame: 11
|
||||
initHandlers({adContentIds: adContentIds, setVisibilityPercentage: env0_2, visibilityRef: visibilityRef});
|
||||
}
|
||||
|
||||
function initHandlers({adContentIds, setVisibilityPercentage, visibilityRef}) { // fn#79248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2178, offset: 0x01e4a7ef, size: 99 bytes, params: 2, frame: 14
|
||||
var environment;
|
||||
var r1;
|
||||
var closure;
|
||||
var value;
|
||||
var value2;
|
||||
var done;
|
||||
var value3;
|
||||
var value4;
|
||||
reducibleJoin3: while (true) {
|
||||
if (visibilityRef == null) {
|
||||
break reducibleJoin3;
|
||||
}
|
||||
closure = function(a0) {
|
||||
var env0_0 = a0;
|
||||
var visibilityRefBinding = visibilityRef;
|
||||
var children = visibilityRefBinding.current.children;
|
||||
var object = {};
|
||||
var children2 = visibilityRefBinding.current.children;
|
||||
copyDataProperties(object, children2[a0], children2);
|
||||
object['calculateVisibility'] = _fun79250;
|
||||
children[a0] = object;
|
||||
};
|
||||
value = environment.__proto__.__proto__;
|
||||
value = _createForOfIteratorHelperLoose_79243(adContentIds);
|
||||
value2 = value();
|
||||
done = value2.done;
|
||||
if (done) {
|
||||
break reducibleJoin3;
|
||||
}
|
||||
r1 = value2;
|
||||
reducibleLoop2: while (true) {
|
||||
value3 = r1.value;
|
||||
closure(value3);
|
||||
value4 = value();
|
||||
done = value4.done;
|
||||
if (done) {
|
||||
break reducibleJoin3;
|
||||
}
|
||||
r1 = value4;
|
||||
continue reducibleLoop2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initHandlers_loop(a0) { // fn#79249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2287, owner: initHandlers._loop, offset: 0x01e4a852, size: 73 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
const visibilityRefBinding = visibilityRef;
|
||||
const children = visibilityRefBinding.current.children;
|
||||
const object2 = {};
|
||||
const children2 = visibilityRefBinding.current.children;
|
||||
copyDataProperties(object2, children2[a0], children2);
|
||||
object2['calculateVisibility'] = calculateVisibility;
|
||||
children[a0] = object2;
|
||||
}
|
||||
|
||||
function calculateVisibility() { // fn#79250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10369:2367, owner: initHandlers._loop.calculateVisibility, offset: 0x01e4a89b, size: 51 bytes, params: 1, frame: 12
|
||||
setVisibilityPercentage(calculateVisibilityPercentage({visibilityRef: visibilityRef, entityId: env0_0}));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,291 @@
|
||||
/* Metro module 13623; source: modules/quests/native/QuestContextMenu.tsx; dependencies: [29, 31, 7093, 661, 33, 8341, 8639, 1244, 9483, 566, 6531, 9949, 9513, 9505, 7114, 477, 4093, 9480, 9520, 7120, 3869, 13580, 9484, 6249, 13624, 4060, 7116, 6797, 4064, 9519, 9517, 9518, 7121, 8811, 2] */
|
||||
function _fun104044(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:6, offset: 0x02281fe8, size: 231 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const env0_3 = ['ref'];
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(29) /* metro dependency 29 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).LinkingTypes;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = value.memo(_fun104046);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestContextMenu.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function renderDefaultButton(a0) { // fn#104045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:177, offset: 0x022820cf, size: 229 bytes, params: 2, frame: 19
|
||||
const ref = a0.ref;
|
||||
const value2 = env0_4(a0, env0_3);
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
const iconButtonProps = {ref: ref, ...value2};
|
||||
iconButtonProps['icon'] = importDefault(8639) /* metro dependency 8639 */;
|
||||
iconButtonProps['variant'] = 'secondary';
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const CAgr1w = (require(1244) /* metro dependency 1244: indexNative */).t.CAgr1w;
|
||||
iconButtonProps['accessibilityLabel'] = Reflect.apply(string, intl, [CAgr1w]);
|
||||
iconButtonProps['accessibilityHint'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hd0b7t);
|
||||
return <IconButton {...iconButtonProps} />;
|
||||
}
|
||||
|
||||
function _fun104046({children = renderDefaultButton, quest, showShareLink, additionalItems = [], sourceQuestContent}) { // fn#104046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:432, offset: 0x022821b4, size: 1019 bytes, params: 2, frame: 37
|
||||
var r23;
|
||||
var moduleValue6;
|
||||
showShareLink = !(showShareLink === undefined) && showShareLink;
|
||||
const value5 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestPreviewActions(quest.id);
|
||||
const handleComplete = value5.handleComplete;
|
||||
const handleProgress = value5.handleProgress;
|
||||
const handleResetDismissibilityClick = value5.handleResetDismissibilityClick;
|
||||
const env0_5 = handleResetDismissibilityClick;
|
||||
const handleResetStatusClick = value5.handleResetStatusClick;
|
||||
const handleOverridePreviewClick = value5.handleOverridePreviewClick;
|
||||
const handleResetHasBeenSeenClick = value5.handleResetHasBeenSeenClick;
|
||||
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], function() {
|
||||
return QuestStore.getQuestPreviewOverride(require(dependencyMap[10]).QuestContent.QUEST_BAR_MOBILE);
|
||||
}, []);
|
||||
const value7 = (require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression();
|
||||
const value8 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
|
||||
const externalCtaLabel = (require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest);
|
||||
if (showShareLink) {
|
||||
moduleValue6 = require(7114) /* metro dependency 7114: QuestUtils */;
|
||||
r23 = moduleValue6.isShareableQuest(quest.config);
|
||||
} else {
|
||||
r23 = showShareLink;
|
||||
}
|
||||
let binding = env0_5;
|
||||
const value10 = binding.useCallback(_fun104048, [quest, value8, sourceQuestContent]);
|
||||
const value11 = binding.useCallback(_fun104049, [r23, quest.id, value8, sourceQuestContent]);
|
||||
const value12 = binding.useCallback(_fun104050, [quest, sourceQuestContent]);
|
||||
const value13 = binding.useCallback(_fun104051, [quest.id]);
|
||||
const value14 = binding.useCallback(_fun104052, [quest.id]);
|
||||
const value15 = binding.useMemo(_fun104053, [externalCtaLabel, value10, value12, r23, value11]);
|
||||
const value17 = binding.useMemo(_fun104055, [binding.useMemo(_fun104054, [quest, value13, value14]), handleComplete,
|
||||
handleResetDismissibilityClick, handleProgress, handleResetStatusClick, handleResetHasBeenSeenClick, quest.id]);
|
||||
const value18 = (require(9483) /* metro dependency 9483: QuestHooks */).useShouldShowQuestPreviewOverrides(quest);
|
||||
const value19 = binding.useMemo(_fun104058, [handleOverridePreviewClick, quest.id, value6?.id]);
|
||||
binding = env0_5;
|
||||
const value20 = binding.useMemo(_fun104060, [value15, value17, quest.preview, value18, value19, additionalItems]);
|
||||
const value21 = binding.useCallback(_fun104061, [quest.id, value7, value8, sourceQuestContent]);
|
||||
const ContextMenu = (require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu;
|
||||
return (
|
||||
<ContextMenu
|
||||
items={value20}
|
||||
onOpen={value21}
|
||||
triggerOnTap
|
||||
>
|
||||
{children}
|
||||
</ContextMenu>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104048() { // fn#104048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1040, offset: 0x022825e5, size: 279 bytes, params: 1, frame: 18
|
||||
var r2;
|
||||
var defaultImport;
|
||||
var moduleValue2;
|
||||
let value = environment.__proto__;
|
||||
const isIOS2 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS();
|
||||
if (isIOS2) {
|
||||
defaultImport = importDefault(4093) /* metro dependency 4093: parseURL */;
|
||||
moduleValue2 = require(9505) /* metro dependency 9505: QuestCopyUtils */;
|
||||
r2 = defaultImport(moduleValue2.getCtaLink(quest.config)).payload.type === LinkingTypes.INVITE;
|
||||
} else {
|
||||
r2 = isIOS2;
|
||||
}
|
||||
if (r2) {
|
||||
(require(9480) /* metro dependency 9480: QuestUtilsNative */).dismissOverlayScreens();
|
||||
}
|
||||
value = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
|
||||
const openGameLinkDirectly = value.openGameLinkDirectly;
|
||||
const questBinding = quest;
|
||||
const object2 = {};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QUEST_HOME_MOBILE = QuestContent.QUEST_HOME_MOBILE;
|
||||
object2.content = QUEST_HOME_MOBILE;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const CONTEXT_MENU_OPEN_GAME_LINK = QuestContentCTA.CONTEXT_MENU_OPEN_GAME_LINK;
|
||||
object2.ctaContent = CONTEXT_MENU_OPEN_GAME_LINK;
|
||||
object2.impressionId = env0_11;
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
Reflect.apply(openGameLinkDirectly, value, [questBinding, object2]);
|
||||
}
|
||||
|
||||
function _fun104049() { // fn#104049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1372, offset: 0x022826fc, size: 216 bytes, params: 1, frame: 18
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var copyShareLink;
|
||||
var id;
|
||||
var object2;
|
||||
var AccessibilityAnnouncer;
|
||||
var announce;
|
||||
var intl;
|
||||
if (env0_13) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(9505) /* metro dependency 9505: QuestCopyUtils */;
|
||||
copyShareLink = moduleValue.copyShareLink;
|
||||
id = quest.id;
|
||||
object2 = {};
|
||||
object2.content = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_HOME_MOBILE;
|
||||
object2.ctaContent = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA.CONTEXT_MENU_COPY_LINK;
|
||||
object2.impressionId = env0_11;
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
Reflect.apply(copyShareLink, moduleValue, [id, object2]);
|
||||
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
|
||||
announce = AccessibilityAnnouncer.announce;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
Reflect.apply(announce, AccessibilityAnnouncer,
|
||||
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+5kSoW'])]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun104050() { // fn#104050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1672, offset: 0x022827d4, size: 136 bytes, params: 1, frame: 17
|
||||
const defaultImport = importDefault(13580) /* metro dependency 13580: QuestDisclosureModalActionCreators */;
|
||||
const showModal = defaultImport.showModal;
|
||||
const object3 = {};
|
||||
object3.quest = quest;
|
||||
object3.isTargetedDisclosure = false;
|
||||
const object4 = {};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QUEST_HOME_MOBILE = QuestContent.QUEST_HOME_MOBILE;
|
||||
object4.content = QUEST_HOME_MOBILE;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const CONTEXT_MENU_OPEN_DISCLOSURE = QuestContentCTA.CONTEXT_MENU_OPEN_DISCLOSURE;
|
||||
object4.ctaContent = CONTEXT_MENU_OPEN_DISCLOSURE;
|
||||
object4.sourceQuestContent = sourceQuestContent;
|
||||
object3.trackingCtx = object4;
|
||||
Reflect.apply(showModal, defaultImport, [object3]);
|
||||
}
|
||||
|
||||
function _fun104051() { // fn#104051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1905, offset: 0x0228285c, size: 53 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
value = require(9484) /* metro dependency 9484: QuestActionCreators */;
|
||||
return value.manuallyStartConsoleQuest(quest.id, true);
|
||||
}
|
||||
|
||||
function _fun104052() { // fn#104052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:1979, offset: 0x02282891, size: 50 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(9484) /* metro dependency 9484: QuestActionCreators */;
|
||||
return value.manualStopConsoleQuest(quest.id);
|
||||
}
|
||||
|
||||
function _fun104053() { // fn#104053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2043, offset: 0x022828c3, size: 285 bytes, params: 1, frame: 21
|
||||
var items2;
|
||||
let object2 = {};
|
||||
object2.label = env0_12;
|
||||
const LinkExternalSmallIcon = (require(6249) /* metro dependency 6249: LinkExternalSmallIcon */).LinkExternalSmallIcon;
|
||||
object2.IconComponent = LinkExternalSmallIcon;
|
||||
object2.action = env0_14;
|
||||
object2.accessibilityRole = 'link';
|
||||
const items3 = [object2];
|
||||
object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const GcsZKJ = t.GcsZKJ;
|
||||
object2.label = Reflect.apply(string, intl, [GcsZKJ]);
|
||||
object2.action = env0_16;
|
||||
object2.iconSource = importDefault(13624) /* metro dependency 13624 */;
|
||||
items3[1] = object2;
|
||||
if (env0_13) {
|
||||
object2 = {};
|
||||
object2.label = intl.string(t.WqhZss);
|
||||
object2.IconComponent = (require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon;
|
||||
object2.action = env0_15;
|
||||
items2 = [object2];
|
||||
} else {
|
||||
items2 = [];
|
||||
}
|
||||
arraySpread(items3, items2, 2, require);
|
||||
return items3;
|
||||
}
|
||||
|
||||
function _fun104054() { // fn#104054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2337, offset: 0x022829e0, size: 109 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
value = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
||||
return value.isConsoleQuest(quest) ? [{label: 'Start Console Heartbeat', action: env0_17},
|
||||
{label: 'Stop Console Heartbeat', action: env0_18}] : [];
|
||||
}
|
||||
|
||||
function _fun104055() { // fn#104055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2481, offset: 0x02282a4d, size: 183 bytes, params: 1, frame: 15
|
||||
const items2 = [{label: 'Set Random Quest Progress', action: action_104056}];
|
||||
items2[1] = {label: 'Complete Quest', action: handleComplete};
|
||||
items2[2] = {label: 'Reset Quest', action: handleResetStatusClick};
|
||||
items2[3] = {label: 'Reset Dismissibility', action: handleResetDismissibilityClick};
|
||||
const handleResetHasBeenSeenClickBinding = handleResetHasBeenSeenClick;
|
||||
items2[4] = {label: 'Reset Quest Seen', action: handleResetHasBeenSeenClickBinding};
|
||||
const value = arraySpread(items2, env0_20, 5, handleResetHasBeenSeenClickBinding);
|
||||
items2[value] = {label: 'Copy Quest ID', action: action_104057};
|
||||
value + 1;
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun104058() { // fn#104058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2841, offset: 0x02282b74, size: 104 bytes, params: 1, frame: 14
|
||||
const value2 = undefined;
|
||||
const CheckmarkLargeIcon = (env0_9 == null ? value2 : env0_9.id) !== quest.id ? value2 : (require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon;
|
||||
return {label: 'Show in Quest Bar', action: function() {
|
||||
return handleOverridePreviewClick(require(dependencyMap[10]).QuestContent.QUEST_BAR_MOBILE);
|
||||
}, IconComponent: CheckmarkLargeIcon};
|
||||
}
|
||||
|
||||
function _fun104060() { // fn#104060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:3050, offset: 0x02282c0f, size: 132 bytes, params: 1, frame: 15
|
||||
var r0;
|
||||
var items2;
|
||||
var value2;
|
||||
const r4 = env0_1 != null ? [env0_19, env0_1] : [env0_19];
|
||||
if (env0_22) {
|
||||
r4.push([env0_23]);
|
||||
}
|
||||
if (quest.preview) {
|
||||
items2 = [];
|
||||
value2 = arraySpread(items2, r4, 0, r4);
|
||||
items2[value2] = env0_21;
|
||||
value2 + 1;
|
||||
r0 = items2;
|
||||
} else {
|
||||
r0 = r4;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun104061() { // fn#104061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:3164, offset: 0x02282c93, size: 360 bytes, params: 1, frame: 17
|
||||
var object2;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
var captureAdUserAction;
|
||||
let value = environment.__proto__;
|
||||
const adAnalyticsInterfaceExperimentModule = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
||||
const shouldMigrateToAdAnalyticsInterface = adAnalyticsInterfaceExperimentModule.shouldMigrateToAdAnalyticsInterface;
|
||||
const AdAnalyticsInterfaceExperimentStep = adAnalyticsInterfaceExperimentModule.AdAnalyticsInterfaceExperimentStep;
|
||||
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
||||
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, adAnalyticsInterfaceExperimentModule,
|
||||
[STEP_2_CLICKED_INTERNAL, 'quest_context_menu'])) {
|
||||
value = require(9517) /* metro dependency 9517: captureAdUserAction */;
|
||||
captureAdUserAction = value.captureAdUserAction;
|
||||
object2 = {};
|
||||
object2.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
|
||||
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
||||
object2.adCreativeId = quest.id;
|
||||
object2.questContentCTA = QuestContentCTA.OPEN_CONTEXT_MENU;
|
||||
object2.surfaceId = QuestContent.QUEST_HOME_MOBILE;
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
object2.impressionId = env0_11;
|
||||
Reflect.apply(captureAdUserAction, value, [object2]);
|
||||
} else {
|
||||
env0_10({questId: quest.id, questContent: QuestContent.QUEST_HOME_MOBILE,
|
||||
questContentCTA: QuestContentCTA.OPEN_CONTEXT_MENU, sourceQuestContent: sourceQuestContent});
|
||||
}
|
||||
}
|
||||
|
||||
function action_104056() { // fn#104056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2528, offset: 0x02282b04, size: 62 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
const handleProgressBinding = handleProgress;
|
||||
const Math = global.Math;
|
||||
return handleProgressBinding(0.9 * Math.random() + 0.03);
|
||||
}
|
||||
|
||||
function action_104057() { // fn#104057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13820:2733, offset: 0x02282b42, size: 50 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
return value.copy(quest.id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/* Metro module 13581; source: modules/quests/native/QuestDisclosureModal/QuestDisclosureModal.tsx; dependencies: [33, 5277, 8160, 13580, 1244, 5282, 13582, 5280, 2] */
|
||||
function _fun103223(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:6, offset: 0x0225d5cd, size: 150 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
object = {DISCLOSURE: 'disclosure'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDisclosureModal/QuestDisclosureModal.tsx');
|
||||
exports.default = QuestDisclosureModal;
|
||||
}
|
||||
|
||||
function CloseButton_103224() { // fn#103224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:167, offset: 0x0225d663, size: 129 bytes, params: 1, frame: 18
|
||||
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
|
||||
const headerActionButtonProps = {source: importDefault(8160) /* metro dependency 8160 */, onPress: onPress_103225};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
headerActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
|
||||
return <HeaderActionButton {...headerActionButtonProps} />;
|
||||
}
|
||||
|
||||
function QuestDisclosureModal({isTargetedDisclosure, gamePublisher, gameTitle, cosponsorName, isVideoQuest}) { // fn#103226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:444, offset: 0x0225d709, size: 243 bytes, params: 2, frame: 18
|
||||
const object2 = {};
|
||||
const binding = isVideoQuest;
|
||||
let DISCLOSURE = binding.DISCLOSURE;
|
||||
object2[DISCLOSURE] = {headerLeft: CloseButton_103224, headerRight: function() {
|
||||
return null;
|
||||
}, headerTitle: headerTitle_103229, render: render_103230};
|
||||
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
||||
DISCLOSURE = binding.DISCLOSURE;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Navigator
|
||||
screens={object2}
|
||||
initialRouteName={DISCLOSURE}
|
||||
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function CloseButton_103224OnPress() { // fn#103225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:250, owner: CloseButton_103224.onPress, offset: 0x0225d6e4, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(13580) /* metro dependency 13580: QuestDisclosureModalActionCreators */).hideModal();
|
||||
}
|
||||
|
||||
function QuestDisclosureModalHeaderTitle() { // fn#103229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:670, owner: QuestDisclosureModal.headerTitle, offset: 0x0225d7fc, size: 96 bytes, params: 1, frame: 18
|
||||
const NavigatorHeader = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).NavigatorHeader;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const GcsZKJ = (require(1244) /* metro dependency 1244: indexNative */).t.GcsZKJ;
|
||||
return <NavigatorHeader title={Reflect.apply(string, intl, [GcsZKJ])} />;
|
||||
}
|
||||
|
||||
function QuestDisclosureModalRender() { // fn#103230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13771:754, owner: QuestDisclosureModal.render, offset: 0x0225d85c, size: 96 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component isTargetedDisclosure={isTargetedDisclosure} gamePublisher={gamePublisher} gameTitle={gameTitle} onClose={QuestDisclosureModalOnClose} cosponsorName={cosponsorName} isVideoQuest={isVideoQuest} />)(importDefault(13582) /* metro dependency 13582: QuestDisclosureModalInner */);
|
||||
}
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
/* Metro module 13580; source: modules/quests/native/QuestDisclosureModal/QuestDisclosureModalActionCreators.tsx; dependencies: [7116, 9519, 9517, 9518, 7121, 7110, 5080, 13581, 1962, 2] */
|
||||
function _fun103220(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13770:6, offset: 0x0225d33f, size: 122 bytes, params: 8, frame: 18
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object2 = {showModal: showModal_103221, hideModal: hideModal_103222};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDisclosureModal/QuestDisclosureModalActionCreators.tsx');
|
||||
exports.default = object2;
|
||||
}
|
||||
|
||||
function showModal_103221({quest, isTargetedDisclosure, trackingCtx}) { // fn#103221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13770:126, offset: 0x0225d3b9, size: 488 bytes, params: 2, frame: 24
|
||||
var object2;
|
||||
var moduleValue4;
|
||||
var captureAdUserAction;
|
||||
const {gamePublisher, gameTitle} = quest.config.messages;
|
||||
const hasWatchVideoTasks2 = require(dependencyMap[0]).hasWatchVideoTasks(quest);
|
||||
const moduleValue2 = require(dependencyMap[1]);
|
||||
const shouldMigrateToAdAnalyticsInterface = moduleValue2.shouldMigrateToAdAnalyticsInterface;
|
||||
const AdAnalyticsInterfaceExperimentStep = require(dependencyMap[1]).AdAnalyticsInterfaceExperimentStep;
|
||||
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
||||
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, moduleValue2, [STEP_2_CLICKED_INTERNAL,
|
||||
'quest_disclosure_modal'])) {
|
||||
moduleValue4 = require(dependencyMap[2]);
|
||||
captureAdUserAction = moduleValue4.captureAdUserAction;
|
||||
object2 = {};
|
||||
object2.type = require(dependencyMap[3]).AdUserActionType.CLICK_INTERNAL;
|
||||
object2.adCreativeType = require(dependencyMap[4]).AdCreativeType.QUEST;
|
||||
object2.adCreativeId = quest.id;
|
||||
object2.questContentCTA = trackingCtx.ctaContent;
|
||||
object2.surfaceId = trackingCtx.content;
|
||||
object2.sourceQuestContent = trackingCtx.sourceQuestContent;
|
||||
object2.questContentPosition = trackingCtx.position;
|
||||
Reflect.apply(captureAdUserAction, moduleValue4, [object2]);
|
||||
} else {
|
||||
require(dependencyMap[5]).trackQuestContentClicked({questId: quest.id, questContent: trackingCtx.content,
|
||||
questContentCTA: trackingCtx.ctaContent, questContentPosition: trackingCtx.position,
|
||||
sourceQuestContent: trackingCtx.sourceQuestContent});
|
||||
}
|
||||
const defaultImport = importDefault(dependencyMap[6]);
|
||||
const pushLazy = defaultImport.pushLazy;
|
||||
let value = require(dependencyMap[8]);
|
||||
value = value(dependencyMap[7], dependencyMap.paths);
|
||||
Reflect.apply(pushLazy, defaultImport, [value, {gamePublisher: gamePublisher, gameTitle: gameTitle,
|
||||
isTargetedDisclosure: isTargetedDisclosure, cosponsorName: quest.config.cosponsorMetadata?.name,
|
||||
isVideoQuest: hasWatchVideoTasks2}, 'QUEST_DISCLOSURE_MODAL']);
|
||||
}
|
||||
|
||||
function hideModal_103222() { // fn#103222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13770:1019, offset: 0x0225d5a1, size: 44 bytes, params: 1, frame: 12
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('QUEST_DISCLOSURE_MODAL');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
/* Metro module 13582; source: modules/quests/native/QuestDisclosureModal/QuestDisclosureModalInner.tsx; dependencies: [27, 661, 33, 4501, 697, 3829, 9390, 1244, 9404, 11441, 8658, 5473, 4573, 9505, 6239, 6766, 1948, 4578, 2] */
|
||||
function _fun103231(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13772:6, offset: 0x0225d8bc, size: 534 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object5 = {flex: 1};
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object5.padding = PX_24;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.gap = PX_16;
|
||||
object5.maxWidth = 480;
|
||||
object3.container = object5;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.illustration = {alignSelf: 'center', marginBottom: PX_8};
|
||||
const object7 = {marginTop: 'auto'};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object7.paddingHorizontal = PX_8;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object7.marginBottom = PX_24;
|
||||
object3.closeButton = object7;
|
||||
object3.targetList = {padding: 0};
|
||||
const object9 = {'flexDirection': 'row', 'flexWrap': 'nowrap', 'alignItems': 'center'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object9.paddingLeft = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object9.gap = PX_16;
|
||||
object3.targetItem = object9;
|
||||
object3.lastTargetItem = {borderBottomWidth: 0};
|
||||
const object10 = {'flex': 1, 'paddingVertical': null, 'borderBottomWidth': 1};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object10.paddingVertical = PX_12;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object10.borderBottomColor = BORDER_SUBTLE;
|
||||
object3.disclosureText = object10;
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDisclosureModal/QuestDisclosureModalInner.tsx');
|
||||
exports.default = QuestDisclosureModalInner;
|
||||
}
|
||||
|
||||
function QuestDisclosureModalInner({isTargetedDisclosure, gamePublisher, gameTitle, isVideoQuest, onClose, cosponsorName}) { // fn#103232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13772:873, offset: 0x0225dad2, size: 1061 bytes, params: 2, frame: 31
|
||||
var r14;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const DropsOptedOut = (require(3829) /* metro dependency 3829: UserSettings */).DropsOptedOut;
|
||||
const value2 = DropsOptedOut.useSetting();
|
||||
let object2 = {};
|
||||
if (value2) {
|
||||
object2.icon = ((ServerIcon) => <ServerIcon size="xs" />)((require(9390) /* metro dependency 9390: ServerIcon */).ServerIcon);
|
||||
object2.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2bL0wT']);
|
||||
r14 = [object2];
|
||||
} else {
|
||||
object2.icon = ((GlobeEarthIcon) => <GlobeEarthIcon size="xs" />)((require(9404) /* metro dependency 9404: GlobeEarthIcon */).GlobeEarthIcon);
|
||||
object2.text = intl.string(t.xQSdPv);
|
||||
items2 = [object2];
|
||||
object2 = {};
|
||||
object2.icon = ((UserIcon) => <UserIcon size="xs" />)((require(11441) /* metro dependency 11441: UserIcon */).UserIcon);
|
||||
object2.text = intl.string(t.mYt7hQ);
|
||||
items2[1] = object2;
|
||||
object2 = {};
|
||||
object2.icon = ((GameControllerIcon) => <GameControllerIcon size="xs" />)((require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon);
|
||||
object2.text = intl.string(t.XAsWxQ);
|
||||
items2[2] = object2;
|
||||
r14 = items2;
|
||||
}
|
||||
const WumpusCouchSpotIllustration = (require(5473) /* metro dependency 5473: native */).WumpusCouchSpotIllustration;
|
||||
const items3 = [<View style={styles.illustration}><WumpusCouchSpotIllustration /></View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const questCopyUtilsModule = require(9505) /* metro dependency 9505: QuestCopyUtils */;
|
||||
const getDisclosureText = questCopyUtilsModule.getDisclosureText;
|
||||
items3[1] = <Text variant="text-md/normal" color="mobile-text-heading-primary">{Reflect.apply(getDisclosureText,
|
||||
questCopyUtilsModule, [{gamePublisher: gamePublisher, gameTitle: gameTitle,
|
||||
isTargetedDisclosure: isTargetedDisclosure, isContextualDisclosure: value2, cosponsorName: cosponsorName,
|
||||
isVideoQuest: isVideoQuest}])}</Text>;
|
||||
items3[2] = isTargetedDisclosure && ((Card) => <Card radius={16} style={styles.targetList}>{r14.map(_fun103233)}</Card>)((require(6239) /* metro dependency 6239: CardNative */).Card);
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
const format = intl.format;
|
||||
const tzq9Wa = (require(1244) /* metro dependency 1244: indexNative */).t.tzq9Wa;
|
||||
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
const getArticleURL = defaultImport.getArticleURL;
|
||||
const QUESTS_PRIVACY_CONTROLS = HelpdeskArticles.QUESTS_PRIVACY_CONTROLS;
|
||||
items3[3] = <TextWithIOSLinkWorkaround variant="text-md/medium" color="mobile-text-heading-primary">{Reflect.apply(format,
|
||||
intl, [tzq9Wa, {privacySettingsUrl: Reflect.apply(getArticleURL, defaultImport,
|
||||
[QUESTS_PRIVACY_CONTROLS])}])}</TextWithIOSLinkWorkaround>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items3[4] = <View style={styles.closeButton}><Button variant="primary" grow size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} onPress={onClose} /></View>;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items3}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun103233({icon, text}, a1) { // fn#103233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13772:1819, offset: 0x0225def7, size: 193 bytes, params: 3, frame: 23
|
||||
const stylesBinding = styles;
|
||||
const targetItem = stylesBinding.targetItem;
|
||||
const items2 = [stylesBinding.disclosureText];
|
||||
items2[1] = a1 === env0_1.length - 1 && styles.lastTargetItem;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={targetItem} key={a1}>
|
||||
{icon}
|
||||
<View style={items2}>
|
||||
<Text variant="text-md/semibold">
|
||||
{text}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,771 @@
|
||||
/* Metro module 13651; source: modules/quests/native/QuestDock/QuestDock.tsx; dependencies: [5, 57, 31, 27, 13570, 6528, 13572, 661, 7553, 482, 33, 4501, 697, 13650, 13573, 13576, 13569, 4559, 4017, 8621, 1585, 5176, 3860, 13652, 4577, 13571, 4581, 4556, 13653, 8141, 1244, 13654, 13661, 13664, 13665, 4562, 9483, 6531, 13666, 566, 9479, 13568, 7701, 683, 4826, 4831, 7120, 9484, 10183, 3868, 2] */
|
||||
function _fun104239(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:6, offset: 0x0228b863, size: 979 bytes, params: 8, frame: 33
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const closure = QuestDockWithEntranceAnimation;
|
||||
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 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value2.View;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const env0_7 = value2.Pressable;
|
||||
const env0_8 = value2.Image;
|
||||
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
|
||||
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
|
||||
const env0_10 = questConstantsModule.QuestDockMode;
|
||||
const env0_11 = questConstantsModule.QuestsExperimentLocations;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_12 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
const env0_13 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
const env0_14 = questDockConstantsModule.QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
const env0_15 = questDockConstantsModule.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
const env0_16 = questDockConstantsModule.QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
const env0_17 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_18 = (require(7553) /* metro dependency 7553: YouBarConstants */).useYouBarTotalHeight;
|
||||
const env0_19 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
|
||||
const value5 = require(33) /* metro dependency 33 */;
|
||||
const env0_20 = value5.jsx;
|
||||
const env0_21 = value5.jsxs;
|
||||
const env0_22 = value5.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {wrapper: {'position': 'absolute', 'left': '50%', 'bottom': 0, 'zIndex': 1}};
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
||||
object7['zIndex'] = 1;
|
||||
object3.accessibilityWrapper = object7;
|
||||
const QUEST_DOCK_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.QUEST_DOCK_BORDER_RADIUS;
|
||||
object3.questDockWrapper = {'position': 'absolute', 'bottom': 0, 'left': '50%', 'overflow': 'hidden',
|
||||
'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'borderRadius': null, 'zIndex': 1,
|
||||
borderRadius: QUEST_DOCK_BORDER_RADIUS};
|
||||
const object8 = {};
|
||||
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
|
||||
object8['justifyContent'] = 'flex-end';
|
||||
object8['zIndex'] = 4;
|
||||
object3.questDockContentWrapper = object8;
|
||||
const object9 = {};
|
||||
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
|
||||
object9['bottom'] = undefined;
|
||||
object9['right'] = undefined;
|
||||
object9['borderWidth'] = 1;
|
||||
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object9['borderColor'] = BORDER_MUTED;
|
||||
object9['zIndex'] = 5;
|
||||
object3.questDockHeaderBorder = object9;
|
||||
const object10 = {};
|
||||
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
|
||||
object10['zIndex'] = 6;
|
||||
object3.nestedPressable = object10;
|
||||
const env0_23 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
object3 = {code: 'function QuestDockTsx1(){const{restingQuestDockMode,QuestDockMode}=this.__closure;return restingQuestDockMode.get()===QuestDockMode.EXPANDED;}'};
|
||||
object3 = {code: 'function QuestDockTsx2(){const{appThemedBackgroundColor,withSpring,activeQuestDockMode,QuestDockMode,youBarEnabled,questDockBorderRadius,bottomBorderRadius,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,questDockWrapperSpecs,QUEST_DOCK_MODE_CHANGE_PHYSICS,roundToNearestPixel}=this.__closure;return{backgroundColor:appThemedBackgroundColor,borderBottomRightRadius:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED&&!youBarEnabled?questDockBorderRadius:bottomBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),borderBottomLeftRadius:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED&&!youBarEnabled?questDockBorderRadius:bottomBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),height:questDockWrapperSpecs.get().height,width:questDockWrapperSpecs.get().width,opacity:withSpring(1,QUEST_DOCK_MODE_CHANGE_PHYSICS),transform:[{translateX:withSpring(questDockWrapperSpecs.get().x+roundToNearestPixel(questDockWrapperSpecs.get().width/2)*-1,QUEST_DOCK_MODE_CHANGE_PHYSICS)},{translateY:withSpring(questDockWrapperSpecs.get().y,QUEST_DOCK_MODE_CHANGE_PHYSICS)}]};}'};
|
||||
object3 = {code: 'function QuestDockTsx3(){const{withSpring,interpolate,isPressed,activeQuestDockMode,QuestDockMode,youBarEnabled,springStandard}=this.__closure;return{transform:[{scale:withSpring(interpolate(isPressed.get(),[1,0],[activeQuestDockMode.get()===QuestDockMode.EXPANDED||youBarEnabled?1:0.98,1]),springStandard)}]};}'};
|
||||
object3 = {code: 'function QuestDockTsx4(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS,windowDimensions}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS),height:windowDimensions.get().height};}'};
|
||||
object3 = {code: "function QuestDockTsx5(){const{activeQuestDockMode,QuestDockMode}=this.__closure;return{pointerEvents:activeQuestDockMode.get()===QuestDockMode.EXPANDED?'auto':'none'};}"};
|
||||
object3 = {code: 'function QuestDockTsx6(){const{questDockWrapperSpecs,windowDimensions,safeAreaTop}=this.__closure;const specs=questDockWrapperSpecs.get();const windowHeight=windowDimensions.get().height;return windowHeight-safeAreaTop-specs.height;}'};
|
||||
object3 = {code: 'function QuestDockTsx7(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.CLOSED||activeQuestDockMode.get()===QuestDockMode.SOFT_DISMISSED?0:1,QUEST_DOCK_MODE_CHANGE_PHYSICS)};}'};
|
||||
object3 = {code: 'function QuestDockTsx8(){const{isEnrolled,activeQuestDockMode,QuestDockMode,QUEST_DOCK_CONTENT_BORDER_RADII,questDockBorderRadius,youBarEnabled,bottomBorderRadius,withSpring,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,questDockWrapperSpecs,QUEST_DOCK_COLLAPSED_HEIGHT,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED}=this.__closure;return{borderTopLeftRadius:!isEnrolled&&activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderTopRightRadius:!isEnrolled&&activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderBottomLeftRadius:!isEnrolled&&activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?bottomBorderRadius.get():questDockBorderRadius,borderBottomRightRadius:!isEnrolled&&activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?bottomBorderRadius.get():questDockBorderRadius,opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?0:1,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),height:activeQuestDockMode.get()===QuestDockMode.EXPANDED?isEnrolled?questDockWrapperSpecs.get().height:QUEST_DOCK_COLLAPSED_HEIGHT:questDockWrapperSpecs.get().height,width:activeQuestDockMode.get()===QuestDockMode.EXPANDED&&!isEnrolled?questDockWrapperSpecs.get().width-QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED*2:questDockWrapperSpecs.get().width,transform:[{translateX:isEnrolled?0:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)},{translateY:isEnrolled?0:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)}],borderBottomWidth:youBarEnabled?bottomBorderRadius.get()>0?1:0:1};}'};
|
||||
const env0_32 = createStylesModule.createStyles(function() {
|
||||
return {wrapperAnimated: {'position': 'absolute', 'bottom': 0, 'padding': 0, 'width': '100%'}};
|
||||
});
|
||||
object3 = {};
|
||||
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
|
||||
copyDataProperties(object3, SUBTLE_SPRING, undefined);
|
||||
object3['overshootClamping'] = true;
|
||||
object3['damping'] = 54;
|
||||
object3 = {code: "function QuestDockTsx9(){const{withSpring,isRendered,ENTRANCE_ANIMATION_SPING_CONFIG,componentDimensions}=this.__closure;return{opacity:withSpring(isRendered?1:0,ENTRANCE_ANIMATION_SPING_CONFIG,'animate-always'),transform:[{translateY:withSpring(isRendered?0:componentDimensions.height,ENTRANCE_ANIMATION_SPING_CONFIG)}]};}"};
|
||||
value = value.memo(QuestDockWithQuestContext);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDock.tsx');
|
||||
exports.default = value;
|
||||
exports.QuestDockWithEntranceAnimation = closure;
|
||||
}
|
||||
|
||||
function QuestDockWithGestureAnimation({appThemedBackgroundColor}) { // fn#104240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:5687, offset: 0x0228bc36, size: 2445 bytes, params: 2, frame: 50
|
||||
var object2;
|
||||
let binding = env0_5;
|
||||
let useContext = binding.useContext;
|
||||
const quest = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
||||
const styles = useStyles();
|
||||
binding = env0_5;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {questDockWrapperSpecs, activeQuestDockMode, windowDimensions} = Reflect.apply(useContext, binding,
|
||||
[QuestDockGestureContext]);
|
||||
binding = env0_5;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const {restingQuestDockMode, setRestingQuestDockMode} = Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]);
|
||||
var env0_5 = setRestingQuestDockMode;
|
||||
const value5 = env0_5.useId();
|
||||
const value6 = env0_5.useCallback(function() {
|
||||
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
|
||||
}, [setRestingQuestDockMode]);
|
||||
(require(13569) /* metro dependency 13569: QuestDockHooks */).useQuestDockModeAnimatedReaction();
|
||||
(require(13569) /* metro dependency 13569: QuestDockHooks */).useQuestDockDismissalReset();
|
||||
const value7 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
let closure = QuestDockWithGestureAnimationK;
|
||||
closure.__closure = {restingQuestDockMode: restingQuestDockMode, QuestDockMode: QuestDockMode};
|
||||
closure.__workletHash = 2415817673061;
|
||||
closure.__initData = env0_24;
|
||||
const value9 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(Reflect.apply(useDerivedValue,
|
||||
reanimatedRexportModule, [closure]));
|
||||
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
|
||||
const value10 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDock');
|
||||
const value11 = useYouBarTotalHeight();
|
||||
const userStatus = quest.userStatus;
|
||||
const value12 = userStatus?.enrolledAt != null;
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const QUEST_DOCK_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.QUEST_DOCK_BORDER_RADIUS;
|
||||
const value13 = Reflect.apply(useToken, useTokenModule, [QUEST_DOCK_BORDER_RADIUS]);
|
||||
const value14 = (importDefault(13652) /* metro dependency 13652: useQuestDockAnimatedBorderRadius */)(value13);
|
||||
const moduleValue7 = reanimatedRexportModule;
|
||||
let useAnimatedStyle = moduleValue7.useAnimatedStyle;
|
||||
closure = QuestDockWithGestureAnimationW;
|
||||
object2 = {appThemedBackgroundColor: appThemedBackgroundColor};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.activeQuestDockMode = activeQuestDockMode;
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.youBarEnabled = value10;
|
||||
object2.questDockBorderRadius = value13;
|
||||
object2.bottomBorderRadius = value14;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
object2.questDockWrapperSpecs = questDockWrapperSpecs;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
object2.roundToNearestPixel = (require(13571) /* metro dependency 13571: QuestDockUtils */).roundToNearestPixel;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 8564067641719;
|
||||
closure.__initData = env0_25;
|
||||
const value15 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
|
||||
const value16 = reanimatedRexportModule.useSharedValue(0);
|
||||
const moduleValue9 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue9.useAnimatedStyle;
|
||||
closure = QuestDockWithGestureAnimationX;
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
interpolate: reanimatedRexportModule.interpolate, isPressed: value16, activeQuestDockMode: activeQuestDockMode,
|
||||
QuestDockMode: QuestDockMode, youBarEnabled: value10,
|
||||
springStandard: (require(4581) /* metro dependency 4581: springPresets */).springStandard};
|
||||
closure.__workletHash = 13804511468631;
|
||||
closure.__initData = env0_26;
|
||||
const value17 = Reflect.apply(useAnimatedStyle, moduleValue9, [closure]);
|
||||
const value18 = env0_5.useCallback(function() {
|
||||
setRestingQuestDockMode(QuestDockMode.EXPANDED);
|
||||
}, [setRestingQuestDockMode]);
|
||||
const value19 = env0_5.useCallback(_fun104246, [value16]);
|
||||
const value20 = env0_5.useCallback(_fun104247, [value16]);
|
||||
const moduleValue10 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue10.useAnimatedStyle;
|
||||
closure = function() {
|
||||
var object = {};
|
||||
var moduleValue = require(dependencyMap[24]);
|
||||
object.opacity = moduleValue.withSpring(activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? 0 : 1,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS);
|
||||
object.height = windowDimensions.get().height;
|
||||
return object;
|
||||
};
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS: QUEST_DOCK_MODE_CHANGE_PHYSICS, windowDimensions: windowDimensions};
|
||||
closure.__workletHash = 6178969276321;
|
||||
closure.__initData = env0_27;
|
||||
const value21 = Reflect.apply(useAnimatedStyle, moduleValue10, [closure]);
|
||||
const moduleValue11 = reanimatedRexportModule;
|
||||
const useAnimatedProps = moduleValue11.useAnimatedProps;
|
||||
closure = QuestDockWithGestureAnimationF;
|
||||
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode};
|
||||
closure.__workletHash = 5416180055289;
|
||||
closure.__initData = env0_28;
|
||||
const value22 = Reflect.apply(useAnimatedProps, moduleValue11, [closure]);
|
||||
const moduleValue12 = reanimatedRexportModule;
|
||||
useDerivedValue = moduleValue12.useDerivedValue;
|
||||
closure = QuestDockWithGestureAnimationV;
|
||||
closure.__closure = {questDockWrapperSpecs: questDockWrapperSpecs, windowDimensions: windowDimensions,
|
||||
safeAreaTop: top};
|
||||
closure.__workletHash = 8073454569923;
|
||||
closure.__initData = env0_29;
|
||||
const value24 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(Reflect.apply(useDerivedValue,
|
||||
moduleValue12, [closure]));
|
||||
const moduleValue13 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue13.useAnimatedStyle;
|
||||
closure = function() {
|
||||
var moduleValue = require(dependencyMap[24]);
|
||||
return {opacity: moduleValue.withSpring(activeQuestDockMode.get() === QuestDockMode.CLOSED ? 0 : activeQuestDockMode.get() !== QuestDockMode.SOFT_DISMISSED ? 1 : 0,
|
||||
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS)};
|
||||
};
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS: QUEST_DOCK_MODE_CHANGE_PHYSICS};
|
||||
closure.__workletHash = 6468803634518;
|
||||
closure.__initData = env0_30;
|
||||
const value25 = Reflect.apply(useAnimatedStyle, moduleValue13, [closure]);
|
||||
const moduleValue14 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue14.useAnimatedStyle;
|
||||
closure = QuestDockWithGestureAnimationZ;
|
||||
object2 = {isEnrolled: value12, activeQuestDockMode: activeQuestDockMode};
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.QUEST_DOCK_CONTENT_BORDER_RADII = QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
object2.questDockBorderRadius = value13;
|
||||
object2.youBarEnabled = value10;
|
||||
object2.bottomBorderRadius = value14;
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
object2.questDockWrapperSpecs = questDockWrapperSpecs;
|
||||
object2.QUEST_DOCK_COLLAPSED_HEIGHT = QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
object2.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED = QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 14482794021030;
|
||||
closure.__initData = env0_31;
|
||||
const value26 = Reflect.apply(useAnimatedStyle, moduleValue14, [closure]);
|
||||
const jsxRuntimeEnv0_22Binding = jsxRuntimeEnv0_22;
|
||||
const value27 = 'auto';
|
||||
const AccessibilityViewAnimated = (require(4556) /* metro dependency 4556: AccessibilityViewNative */).AccessibilityViewAnimated;
|
||||
const r5 = value7 ? value9 : !!value7;
|
||||
const QuestDockGestureDetector = importDefault(13653) /* metro dependency 13653: QuestDockGestureDetector */;
|
||||
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
const defaultImport3 = ReanimatedNativeView;
|
||||
const defaultImport3Props = {style: [styles.questDockWrapper, {bottom: value11 - 1}, value15],
|
||||
layout: (require(13571) /* metro dependency 13571: QuestDockUtils */).dimensionsLayoutTransition};
|
||||
const pressableBindingProps = {style: styles.nestedPressable, onPressIn: value19, onPressOut: value20,
|
||||
onPress: value18, pointerEvents: value9 ? 'none' : value27, accessibilityRole: 'button'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
pressableBindingProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rjVPdM);
|
||||
pressableBindingProps.accessibilityHint = value9 ? '' : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n0MlOB);
|
||||
const items2 = [<Pressable {...pressableBindingProps} />];
|
||||
items2[1] = <ReanimatedNativeView style={[styles.questDockHeaderBorder,
|
||||
value26]} layout={(require(13571) /* metro dependency 13571: QuestDockUtils */).dimensionsLayoutTransition} pointerEvents="none" />;
|
||||
items2[2] = <ReanimatedNativeView style={[styles.questDockContentWrapper,
|
||||
value25]}><View style={styles.questDockContentWrapper}>{((Component) => <Component hideOnExpand={value12} />)(importDefault(13654) /* metro dependency 13654: QuestDockContentCollapsed */)}{((Component) => <Component />)(importDefault(13661) /* metro dependency 13661: QuestDockContentExpanded */)}</View>{!value12 && ((Component) => <Component />)(importDefault(13664) /* metro dependency 13664: QuestDockUnenrolledBackground */)}</ReanimatedNativeView>;
|
||||
items2[3] = ((Component) => <Component isExpanded={value9} />)(importDefault(13665) /* metro dependency 13665: QuestDockDragHandle */);
|
||||
const view = <View style={styles.wrapper} pointerEvents={value27}><AccessibilityViewAnimated nativeID={value5} style={styles.accessibilityWrapper} accessibilityViewIsModal={r5} onAccessibilityEscape={value6} pointerEvents="box-none"><QuestDockGestureDetector><ReanimatedNativeView style={value17}>{((Component) => <Component {...defaultImport3Props}>{items2}</Component>)(defaultImport3)}</ReanimatedNativeView></QuestDockGestureDetector></AccessibilityViewAnimated></View>;
|
||||
const defaultImport10 = ReanimatedNativeView;
|
||||
const Backdrop = (require(4562) /* metro dependency 4562: BackdropNative */).Backdrop;
|
||||
return (
|
||||
<>
|
||||
{view}
|
||||
{((Component) => <Component style={value21} animatedProps={value22}><Backdrop onDismiss={value6} accessibleDismissStyle={{height: value24}} /></Component>)(defaultImport10)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestDockModeChangeTracker({mode, questId}) { // fn#104253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:11130, offset: 0x0228ccf8, size: 120 bytes, params: 2, frame: 17
|
||||
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
|
||||
const useQuestBarOrDockModeChangeTracking = questHooksModule.useQuestBarOrDockModeChangeTracking;
|
||||
const object2 = {mode: mode};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.questContent = QUEST_BAR_MOBILE;
|
||||
object2.questId = questId;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
Reflect.apply(useQuestBarOrDockModeChangeTracking, questHooksModule, [object2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
function QuestBarRenderedTriggerPointWrapper() { // fn#104254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:11381, offset: 0x0228cd70, size: 35 bytes, params: 1, frame: 13
|
||||
env0_5.useEffect(function() {
|
||||
var QuestBarRenderedTriggerPoint = require(dependencyMap[38]).QuestBarRenderedTriggerPoint;
|
||||
QuestBarRenderedTriggerPoint.trigger();
|
||||
}, []);
|
||||
return null;
|
||||
}
|
||||
|
||||
function QuestDockWithEntranceAnimation() { // fn#104256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:12018, offset: 0x0228cdbe, size: 969 bytes, params: 1, frame: 30
|
||||
var r0;
|
||||
var View;
|
||||
var QuestContentImpressionTrackerNative;
|
||||
var object;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
var QUEST_BAR_MOBILE;
|
||||
let binding = env0_5;
|
||||
const value2 = undefined;
|
||||
const {isRendered, isVisibleToUser,
|
||||
quest} = binding.useContext(importDefault(13650) /* metro dependency 13650: QuestDockContext */);
|
||||
let env0_2 = env0_4(env0_5.useState(function() {
|
||||
return global.performance.now();
|
||||
}), 1)[0];
|
||||
const env0_3 = env0_5.useRef(false);
|
||||
const styles = useStyles();
|
||||
const value7 = env0_4(env0_5.useState({'width': 0, 'height': 0}), 2);
|
||||
var property = value7[0];
|
||||
var env0_4 = property;
|
||||
var env0_5 = value7[1];
|
||||
const env0_6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestDockStore], function() {
|
||||
return QuestDockStore.prevRestingQuestDockMode;
|
||||
});
|
||||
const isEligibleForQuests = (require(9479) /* metro dependency 9479: QuestsEligibility */).getIsEligibleForQuests();
|
||||
const value9 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestBarImpressionSurvey(quest);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = QuestDockWithEntranceAnimationC;
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
isRendered: isRendered, ENTRANCE_ANIMATION_SPING_CONFIG: env0_33, componentDimensions: property};
|
||||
closure.__workletHash = 15545726338295;
|
||||
closure.__initData = env0_34;
|
||||
const value10 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
binding = env0_5;
|
||||
const value11 = null;
|
||||
var [property, env0_8] = env0_4(binding.useState(value11), 2);
|
||||
const questHooksNativeModule = require(13568) /* metro dependency 13568: QuestHooksNative */;
|
||||
const useQuestDockHeroAsset = questHooksNativeModule.useQuestDockHeroAsset;
|
||||
const staticUrl = Reflect.apply(useQuestDockHeroAsset, questHooksNativeModule, [quest]).staticUrl;
|
||||
const value14 = questHooksNativeModule.useQuestGameLogotypeAssetUrl(quest);
|
||||
const userStatus = quest.userStatus;
|
||||
const result = value11 != (value11 == userStatus ? value2 : userStatus.enrolledAt);
|
||||
const value15 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientBottom();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
const value16 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_SURFACE_HIGH]);
|
||||
const backgroundColor = value11 == value15 ? value2 : value15.backgroundColor;
|
||||
const env0_12 = value11 == backgroundColor ? value16 : backgroundColor;
|
||||
env0_5.useEffect(function() {
|
||||
var env0_0 = _fun104261;
|
||||
var env0_1 = _fun104262;
|
||||
var env0_2 = _fun104265;
|
||||
_fun104269();
|
||||
}, [staticUrl, value14, quest.id]);
|
||||
env0_5.useEffect(_fun104270, [property, quest.id]);
|
||||
let r2 = value11 == quest || !isEligibleForQuests;
|
||||
r2 = !r2 ? !property : r2;
|
||||
env0_5.useEffect(_fun104271, [r2]);
|
||||
if (r2) {
|
||||
r0 = value11;
|
||||
} else {
|
||||
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
var viewProps = {pointerEvents: 'box-none', style: [styles.wrapperAnimated, value10],
|
||||
onLayout: onLayout_104273};
|
||||
QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
||||
object = {overrideVisibility: isVisibleToUser};
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object.questContent = QUEST_BAR_MOBILE;
|
||||
object.questOrQuests = quest;
|
||||
object.onImpression = value9;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
r0 = <View {...viewProps}><QuestContentImpressionTrackerNative {...object}>{children_104274}</QuestContentImpressionTrackerNative></View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function QuestDockWithQuestContext() { // fn#104276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:15188, offset: 0x0228d75e, size: 166 bytes, params: 1, frame: 19
|
||||
const value2 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useMobileQuestDock();
|
||||
const value3 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useIsMobileQuestDockRenderedBase(value2);
|
||||
const value4 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useIsMobileQuestDockVisibleToUser(value2,
|
||||
value3);
|
||||
const value5 = null;
|
||||
if (value5 == value2) {
|
||||
return value5;
|
||||
} else {
|
||||
const Provider = (importDefault(13650) /* metro dependency 13650: QuestDockContext */).Provider;
|
||||
return (
|
||||
<Provider value={{isRendered: value3, isVisibleToUser: value4, quest: value2}}>
|
||||
<QuestDockWithEntranceAnimation />
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function QuestDockWithGestureAnimationK() { // fn#104242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:6263, owner: QuestDockWithGestureAnimation.K, offset: 0x0228c5e0, size: 35 bytes, params: 1, frame: 9
|
||||
const value = restingQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
return value === EXPANDED;
|
||||
}
|
||||
|
||||
function QuestDockWithGestureAnimationW() { // fn#104243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:6644, owner: QuestDockWithGestureAnimation.W, offset: 0x0228c603, size: 446 bytes, params: 1, frame: 24
|
||||
const object2 = {};
|
||||
object2.backgroundColor = appThemedBackgroundColor;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
let withSpring = springModule.withSpring;
|
||||
const activeQuestDockModeBinding = activeQuestDockMode;
|
||||
let get = activeQuestDockModeBinding.get;
|
||||
const value3 = Reflect.apply(get, activeQuestDockModeBinding, []);
|
||||
let COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
object2.borderBottomRightRadius = Reflect.apply(withSpring, springModule,
|
||||
[value3 !== COLLAPSED || env0_7 ? env0_10.get() : env0_9, QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED]);
|
||||
const moduleValue2 = springModule;
|
||||
withSpring = moduleValue2.withSpring;
|
||||
const value5 = activeQuestDockMode.get();
|
||||
COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
object2.borderBottomLeftRadius = Reflect.apply(withSpring, moduleValue2,
|
||||
[value5 !== COLLAPSED || env0_7 ? env0_10.get() : env0_9, QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED]);
|
||||
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.height = Reflect.apply(get, questDockWrapperSpecsBinding, []).height;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.width = Reflect.apply(get, questDockWrapperSpecsBinding, []).width;
|
||||
object2.opacity = springModule.withSpring(1, QUEST_DOCK_MODE_CHANGE_PHYSICS);
|
||||
let value = springModule;
|
||||
withSpring = value.withSpring;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
const x = Reflect.apply(get, questDockWrapperSpecsBinding, []).x;
|
||||
const questDockUtilsModule = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
const roundToNearestPixel = questDockUtilsModule.roundToNearestPixel;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
const items2 = [{translateX: Reflect.apply(withSpring, value, [x + -1 * Reflect.apply(roundToNearestPixel,
|
||||
questDockUtilsModule, [Reflect.apply(get, questDockWrapperSpecsBinding,
|
||||
[]).width / 2]), QUEST_DOCK_MODE_CHANGE_PHYSICS])}];
|
||||
value = springModule;
|
||||
withSpring = value.withSpring;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
items2[1] = {translateY: Reflect.apply(withSpring, value, [Reflect.apply(get, questDockWrapperSpecsBinding, []).y,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS])};
|
||||
object2.transform = items2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function QuestDockWithGestureAnimationX() { // fn#104244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:7499, owner: QuestDockWithGestureAnimation.X, offset: 0x0228c7c1, size: 198 bytes, params: 1, frame: 22
|
||||
const object = {};
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = reanimatedRexportModule.interpolate;
|
||||
const value3 = env0_11.get();
|
||||
const value4 = activeQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
object.scale = Reflect.apply(withSpring, springModule, [Reflect.apply(interpolate, reanimatedRexportModule, [value3,
|
||||
[1, 0], [value4 === EXPANDED || env0_7 ? 1 : 0.98, 1]]),
|
||||
(require(4581) /* metro dependency 4581: springPresets */).springStandard]);
|
||||
return {transform: [object]};
|
||||
}
|
||||
|
||||
function _fun104246() { // fn#104246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:7939, offset: 0x0228c8a4, size: 24 bytes, params: 1, frame: 11
|
||||
env0_11.set(1);
|
||||
}
|
||||
|
||||
function _fun104247() { // fn#104247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:7980, offset: 0x0228c8bc, size: 23 bytes, params: 1, frame: 11
|
||||
env0_11.set(0);
|
||||
}
|
||||
|
||||
function QuestDockWithGestureAnimationF() { // fn#104249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:8338, owner: QuestDockWithGestureAnimation.F, offset: 0x0228c93c, size: 50 bytes, params: 1, frame: 11
|
||||
const value = activeQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
return {pointerEvents: value !== EXPANDED ? 'none' : 'auto'};
|
||||
}
|
||||
|
||||
function QuestDockWithGestureAnimationV() { // fn#104250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:8527, owner: QuestDockWithGestureAnimation.V, offset: 0x0228c96e, size: 53 bytes, params: 1, frame: 11
|
||||
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
let get = questDockWrapperSpecsBinding.get;
|
||||
const value2 = Reflect.apply(get, questDockWrapperSpecsBinding, []);
|
||||
const windowDimensionsBinding = windowDimensions;
|
||||
get = windowDimensionsBinding.get;
|
||||
return Reflect.apply(get, windowDimensionsBinding, []).height - top - value2.height;
|
||||
}
|
||||
|
||||
function QuestDockWithGestureAnimationZ() { // fn#104252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:9043, owner: QuestDockWithGestureAnimation.z, offset: 0x0228ca11, size: 743 bytes, params: 1, frame: 23
|
||||
var r1;
|
||||
var r6;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var value9;
|
||||
var value10;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
const object2 = {};
|
||||
if (result) {
|
||||
r1 = env0_9;
|
||||
} else {
|
||||
value2 = activeQuestDockMode.get();
|
||||
value3 = environment.__proto__;
|
||||
r1 = value2 !== QuestDockMode.EXPANDED ? env0_9 : QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
}
|
||||
object2.borderTopLeftRadius = r1;
|
||||
if (result) {
|
||||
r1 = env0_9;
|
||||
} else {
|
||||
value4 = activeQuestDockMode.get();
|
||||
value5 = environment.__proto__;
|
||||
r1 = value4 !== QuestDockMode.EXPANDED ? env0_9 : QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
}
|
||||
object2.borderTopRightRadius = r1;
|
||||
if (result) {
|
||||
r1 = env0_7 ? env0_10.get() : env0_9;
|
||||
} else {
|
||||
value6 = activeQuestDockMode.get();
|
||||
value7 = environment.__proto__;
|
||||
r1 = value6 !== QuestDockMode.EXPANDED ? env0_7 ? env0_10.get() : env0_9 : QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
}
|
||||
object2.borderBottomLeftRadius = r1;
|
||||
if (result) {
|
||||
r1 = env0_7 ? env0_10.get() : env0_9;
|
||||
} else {
|
||||
value9 = activeQuestDockMode.get();
|
||||
value10 = environment.__proto__;
|
||||
r1 = value9 !== QuestDockMode.EXPANDED ? env0_7 ? env0_10.get() : env0_9 : QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
}
|
||||
object2.borderBottomRightRadius = r1;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const value13 = activeQuestDockMode.get();
|
||||
let EXPANDED = QuestDockMode.EXPANDED;
|
||||
const value14 = 1;
|
||||
object2.opacity = Reflect.apply(withSpring, springModule, [value13 !== EXPANDED ? value14 : 0,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED]);
|
||||
const value16 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.height = value16 === EXPANDED ? result ? questDockWrapperSpecs.get().height : QUEST_DOCK_COLLAPSED_HEIGHT : questDockWrapperSpecs.get().height;
|
||||
const value17 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.width = value17 !== EXPANDED || result ? questDockWrapperSpecs.get().width : questDockWrapperSpecs.get().width - 2 * QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
resultBinding = result;
|
||||
const value19 = 0;
|
||||
if (resultBinding) {
|
||||
r1 = value19;
|
||||
} else {
|
||||
moduleValue2 = springModule;
|
||||
r1 = moduleValue2.withSpring(activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? value19 : QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
|
||||
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
}
|
||||
const items2 = [{translateX: r1}];
|
||||
if (result) {
|
||||
r6 = value19;
|
||||
} else {
|
||||
moduleValue3 = springModule;
|
||||
r6 = moduleValue3.withSpring(activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? value19 : QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
|
||||
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
}
|
||||
items2[1] = {translateY: r6};
|
||||
object2.transform = items2;
|
||||
object2.borderBottomWidth = env0_7 ? env0_10.get() > value19 ? value14 : value19 : value14;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function QuestDockWithEntranceAnimationC() { // fn#104259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:12445, owner: QuestDockWithEntranceAnimation.c, offset: 0x0228d196, size: 139 bytes, params: 1, frame: 21
|
||||
const object2 = {};
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const isRenderedBinding = isRendered;
|
||||
const value3 = 0;
|
||||
object2.opacity = Reflect.apply(withSpring, springModule, [isRenderedBinding ? 1 : value3, env1_33,
|
||||
'animate-always']);
|
||||
const moduleValue2 = springModule;
|
||||
object2.transform = [{translateY: moduleValue2.withSpring(isRendered ? value3 : env0_4.height, env1_33)}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun104260() { // fn#104260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:13068, offset: 0x0228d221, size: 53 bytes, params: 1, frame: 9
|
||||
const prefetchWithErrorReporting = function(a0) {
|
||||
return _prefetchWithErrorReporting.apply(this, arguments);
|
||||
};
|
||||
(function() {
|
||||
return _preloadQuestDockAssets.apply(this, arguments);
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun104270() { // fn#104270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:13818, offset: 0x0228d408, size: 219 bytes, params: 1, frame: 19
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var increment;
|
||||
var object2;
|
||||
var items2;
|
||||
var value;
|
||||
if (env0_7 === false) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
|
||||
increment = defaultImport.increment;
|
||||
object2 = {};
|
||||
object2.name = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.QUEST_CONTENT_RENDERING_FAILURE;
|
||||
value = 'quest_id:' + quest.id;
|
||||
items2 = [value];
|
||||
value = require(7120) /* metro dependency 7120: AnalyticsTypes */;
|
||||
value = value.getQuestContentName((require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_BAR_MOBILE);
|
||||
items2[1] = 'quest_content:' + value;
|
||||
items2[2] = 'reason:asset_loading_error';
|
||||
object2.tags = items2;
|
||||
Reflect.apply(increment, defaultImport, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun104271() { // fn#104271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:14109, offset: 0x0228d4e3, size: 64 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
(require(9484) /* metro dependency 9484: QuestActionCreators */).updateQuestDockVisibilityEligibility({isEligibleToBeVisible: !env0_13});
|
||||
return _fun104272;
|
||||
}
|
||||
|
||||
function QuestDockWithEntranceAnimationOnLayout(a0) { // fn#104273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:14361, owner: QuestDockWithEntranceAnimation.onLayout, offset: 0x0228d552, size: 277 bytes, params: 2, frame: 19
|
||||
var Math;
|
||||
var value4;
|
||||
var value5;
|
||||
var defaultImport;
|
||||
var distribution;
|
||||
const binding = env0_5;
|
||||
let object2 = {};
|
||||
object2.height = a0.nativeEvent.layout.height;
|
||||
object2.width = a0.nativeEvent.layout.width;
|
||||
binding(object2);
|
||||
if (!env0_3.current) {
|
||||
env0_3.current = true;
|
||||
Math = global.Math;
|
||||
if (Math.random() < 0.1) {
|
||||
Math = global.Math;
|
||||
value4 = Math.round(global.performance.now() - env0_2);
|
||||
value5 = environment.__proto__;
|
||||
defaultImport = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
|
||||
distribution = defaultImport.distribution;
|
||||
object2 = {};
|
||||
object2.name = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.QUEST_BAR_MOBILE_TIME_TO_FIRST_PAINT;
|
||||
object2.tags = ['quest_id:' + quest.id];
|
||||
Reflect.apply(distribution, defaultImport, [object2, value4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function QuestDockWithEntranceAnimationChildren() { // fn#104274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:14871, owner: QuestDockWithEntranceAnimation.children, offset: 0x0228d667, size: 224 bytes, params: 1, frame: 24
|
||||
const jsxRuntimeEnv1_22Binding = jsxRuntimeEnv1_22;
|
||||
const id = quest.id;
|
||||
const prevRestingQuestDockModeBinding = prevRestingQuestDockMode;
|
||||
const value3 = undefined;
|
||||
const items2 = [<QuestDockModeChangeTracker questId={id} mode={prevRestingQuestDockModeBinding} />];
|
||||
items2[1] = <QuestBarRenderedTriggerPointWrapper />;
|
||||
const QuestDockGestureContextProvider = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContextProvider;
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
const DARK = result ? value3 : ThemeTypes.DARK;
|
||||
items2[2] = <QuestDockGestureContextProvider><ThemeContextProvider theme={DARK}><QuestDockWithGestureAnimation appThemedBackgroundColor={env0_12} /></ThemeContextProvider></QuestDockGestureContextProvider>;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _prefetchWithErrorReporting() { // fn#104262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:13169, offset: 0x0228d256, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
return env2_3(_fun104264).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _preloadQuestDockAssets() { // fn#104265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:13439, offset: 0x0228d328, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
return env2_3(_fun104267).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _fun104272() { // fn#104272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:14188, offset: 0x0228d523, size: 47 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(9484) /* metro dependency 9484: QuestActionCreators */).updateQuestDockVisibilityEligibility({isEligibleToBeVisible: false});
|
||||
}
|
||||
|
||||
function* _fun104264(a0) { // fn#104264, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:13246, offset: 0x0228d296, size: 146 bytes, params: 2, frame: 16
|
||||
var binding;
|
||||
var prefetch;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var error;
|
||||
var value6;
|
||||
var track;
|
||||
var QUEST_ASSET_LOADING_FAILURE;
|
||||
var QUESTS_BAR_MOBILE;
|
||||
var id;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
try {
|
||||
binding = env4_8;
|
||||
} catch (error) {
|
||||
binding = env4_1;
|
||||
value6 = binding(env4_2[43]);
|
||||
track = value6.track;
|
||||
QUEST_ASSET_LOADING_FAILURE = env4_17.QUEST_ASSET_LOADING_FAILURE;
|
||||
QUESTS_BAR_MOBILE = env4_11.QUESTS_BAR_MOBILE;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
id = importDefault.id;
|
||||
Reflect.apply(track, value6, [QUEST_ASSET_LOADING_FAILURE, {source: QUESTS_BAR_MOBILE, quest_id: id,
|
||||
asset_id: a0}]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
prefetch = binding.prefetch;
|
||||
} catch (error) {
|
||||
binding = env4_1;
|
||||
value6 = binding(env4_2[43]);
|
||||
track = value6.track;
|
||||
QUEST_ASSET_LOADING_FAILURE = env4_17.QUEST_ASSET_LOADING_FAILURE;
|
||||
QUESTS_BAR_MOBILE = env4_11.QUESTS_BAR_MOBILE;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
id = importDefault.id;
|
||||
Reflect.apply(track, value6, [QUEST_ASSET_LOADING_FAILURE, {source: QUESTS_BAR_MOBILE, quest_id: id,
|
||||
asset_id: a0}]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
value3 = Reflect.apply(prefetch, binding, [a0]);
|
||||
} catch (error) {
|
||||
binding = env4_1;
|
||||
value6 = binding(env4_2[43]);
|
||||
track = value6.track;
|
||||
QUEST_ASSET_LOADING_FAILURE = env4_17.QUEST_ASSET_LOADING_FAILURE;
|
||||
QUESTS_BAR_MOBILE = env4_11.QUESTS_BAR_MOBILE;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
id = importDefault.id;
|
||||
Reflect.apply(track, value6, [QUEST_ASSET_LOADING_FAILURE, {source: QUESTS_BAR_MOBILE, quest_id: id,
|
||||
asset_id: a0}]);
|
||||
return false;
|
||||
}
|
||||
yield value3;
|
||||
try {
|
||||
value4 = undefined;
|
||||
value5 = false;
|
||||
} catch (error) {
|
||||
binding = env4_1;
|
||||
value6 = binding(env4_2[43]);
|
||||
track = value6.track;
|
||||
QUEST_ASSET_LOADING_FAILURE = env4_17.QUEST_ASSET_LOADING_FAILURE;
|
||||
QUESTS_BAR_MOBILE = env4_11.QUESTS_BAR_MOBILE;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
id = importDefault.id;
|
||||
Reflect.apply(track, value6, [QUEST_ASSET_LOADING_FAILURE, {source: QUESTS_BAR_MOBILE, quest_id: id,
|
||||
asset_id: a0}]);
|
||||
return false;
|
||||
}
|
||||
if (value5) {
|
||||
return value4;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function* _fun104267() { // fn#104267, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:13508, offset: 0x0228d368, size: 160 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
var push;
|
||||
var value3;
|
||||
var value4;
|
||||
if (true) {
|
||||
var items2 = [];
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
if (QuestDockStore != null) {
|
||||
push = items2.push;
|
||||
value3 = environment.__proto__.__proto__;
|
||||
Reflect.apply(push, items2, [isRendered(QuestDockStore)]);
|
||||
}
|
||||
if (QuestDockMode != null) {
|
||||
push = items2.push;
|
||||
value4 = environment.__proto__.__proto__;
|
||||
Reflect.apply(push, items2, [isRendered(QuestDockMode)]);
|
||||
}
|
||||
var Promise = global.Promise;
|
||||
yield Promise.all(items2);
|
||||
var value5 = undefined;
|
||||
if (false) {
|
||||
return value5;
|
||||
}
|
||||
Image(value5.every(function(a0) {
|
||||
return a0 === true;
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/* Metro module 13631; source: modules/quests/native/QuestDock/QuestDockBlurredContentBackground.tsx; dependencies: [31, 27, 33, 4563, 2] */
|
||||
function _fun104099(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13828:6, offset: 0x022857f3, size: 170 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).StyleSheet;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = value.memo(QuestDockBlurredContentBackground);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockBlurredContentBackground.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function QuestDockBlurredContentBackground({animatedStyle, animatedLayout, blurTheme}) { // fn#104100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13828:155, offset: 0x0228589d, size: 187 bytes, params: 2, frame: 19
|
||||
const r9 = blurTheme === undefined ? 'dark' : blurTheme;
|
||||
const binding = env0_2;
|
||||
return ((Component) => <Component nativeID="quest-dock-blurred-background" blurTintRgba={binding.useMemo(_fun104102,
|
||||
[r9])} blurAmount={0.5} blurTheme="dark" android_fallbackColor={binding.useMemo(_fun104101,
|
||||
[r9])} style={[StyleSheet.absoluteFillObject,
|
||||
animatedStyle]} layout={animatedLayout} />)(importDefault(4563) /* metro dependency 4563: VisualEffectViewAnimated */);
|
||||
}
|
||||
|
||||
function _fun104101() { // fn#104101, offset: 0x02285958, size: 29 bytes, params: 1, frame: 3
|
||||
return env0_0 !== 'dark' ? 'rgba(255, 255, 255, 0.1)' : 'rgba(38, 39, 50, 0.65)';
|
||||
}
|
||||
|
||||
function _fun104102() { // fn#104102, offset: 0x02285975, size: 29 bytes, params: 1, frame: 3
|
||||
return env0_0 !== 'dark' ? 'rgba(255, 255, 255, 0.1)' : 'rgba(38, 39, 50, 0.1)';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
/* Metro module 13656; source: modules/quests/native/QuestDock/QuestDockBlurredHeaderPlaceholder.tsx; dependencies: [31, 27, 6528, 13572, 33, 4501, 13573, 13657, 4017, 2] */
|
||||
function _fun104309(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13853:6, offset: 0x022902c3, size: 373 bytes, params: 8, frame: 25
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const env0_4 = value2.View;
|
||||
const env0_5 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const {QUEST_DOCK_EXPANDED_HEIGHT,
|
||||
QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED} = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value4.jsx;
|
||||
const env0_8 = value4.Fragment;
|
||||
const env0_9 = value4.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {};
|
||||
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
|
||||
object5['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
object5['top'] = -QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
object4.image = object5;
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
||||
object6['backgroundColor'] = 'rgba(38, 39, 50, 0.3)';
|
||||
object6['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
object4.overlay = object6;
|
||||
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object4]);
|
||||
object4 = {code: 'function QuestDockBlurredHeaderPlaceholderTsx1(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,questDockWrapperSpecs}=this.__closure;return{left:activeQuestDockMode.get()===QuestDockMode.EXPANDED?-QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,width:questDockWrapperSpecs.get().width+QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED};}'};
|
||||
value = value.memo(QuestDockBlurredContentBackground_104310);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockBlurredHeaderPlaceholder.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function QuestDockBlurredContentBackground_104310({animatedLayout, animatedStyle, placeholder}) { // fn#104310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13853:843, offset: 0x02290438, size: 341 bytes, params: 2, frame: 23
|
||||
const binding = env0_3;
|
||||
const useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {questDockWrapperSpecs, activeQuestDockMode} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
|
||||
const value3 = binding.useMemo(_fun104311, [placeholder]);
|
||||
const styles = useStyles();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = function() {
|
||||
var object = {};
|
||||
object.left = activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? 0 : -QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
object.width = questDockWrapperSpecs.get().width + QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
return object;
|
||||
};
|
||||
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED: QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
|
||||
questDockWrapperSpecs: questDockWrapperSpecs};
|
||||
closure.__workletHash = 11176778421725;
|
||||
closure.__initData = env0_11;
|
||||
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
||||
const Image = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).Image;
|
||||
return (
|
||||
<>
|
||||
<Image
|
||||
source={value3}
|
||||
style={[styles.image, animatedStyle, value4]}
|
||||
layout={animatedLayout}
|
||||
/>
|
||||
<View style={styles.overlay} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104311() { // fn#104311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13853:1059, offset: 0x0229058d, size: 90 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
value = require(13657) /* metro dependency 13657 */;
|
||||
const thumbHashToDataURL = value.thumbHashToDataURL;
|
||||
const Uint8Array = global.Uint8Array;
|
||||
object2.uri = Reflect.apply(thumbHashToDataURL, value, [Uint8Array.from(global.atob(placeholder), function(a0) {
|
||||
return a0.charCodeAt(0);
|
||||
})]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/* Metro module 13572; source: modules/quests/native/QuestDock/QuestDockConstants.tsx; dependencies: [697, 2] */
|
||||
function _fun103169(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13762:6, offset: 0x0225ac14, size: 450 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3 = {'mass': 0.5, 'damping': 80, 'stiffness': 320};
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, object3, undefined);
|
||||
object4['overshootClamping'] = true;
|
||||
const lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockConstants.tsx');
|
||||
exports.QUEST_DOCK_COLLAPSED_HEIGHT = 56;
|
||||
exports.QUEST_DOCK_CLOSED_HEIGHT = 22;
|
||||
exports.QUEST_DOCK_EXPANDED_HEIGHT = 400;
|
||||
exports.QUEST_DOCK_EXPANDED_PADDING_BOTTOM = PX_16;
|
||||
exports.QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL = PX_12;
|
||||
exports.QUEST_DOCK_EXPANDED_ENROLLED_PADDING_TOP = PX_8;
|
||||
exports.QUEST_DOCK_COLLAPSED_MAX_WIDTH = 600;
|
||||
exports.QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED = 8;
|
||||
exports.QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED = 8;
|
||||
exports.QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED = 0;
|
||||
exports.QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED = 0;
|
||||
exports.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED = 12;
|
||||
exports.QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM = 15;
|
||||
exports.QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM = 15;
|
||||
exports.QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT = 200;
|
||||
exports.QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT = 30;
|
||||
exports.QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY = 200;
|
||||
exports.QUEST_DOCK_GESTURE_TOUCH_MOVE_COUNT_THRESHOLD = 5;
|
||||
exports.QUEST_DOCK_GESTURE_CLOSED_Y_OFFSET_FACTOR = 0.8;
|
||||
exports.QUEST_DOCK_GESTURE_COLLAPSED_Y_OFFSET_FACTOR = 1.5;
|
||||
exports.QUEST_DOCK_GESTURE_EXPANDED_EXCESS_HEIGHT_FACTOR = 0.07;
|
||||
exports.QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD = 4;
|
||||
exports.QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED = 64;
|
||||
exports.QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED_WITH_YOU_BAR = 56;
|
||||
exports.QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED = 64;
|
||||
exports.QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED_WITH_YOU_BAR = 56;
|
||||
exports.QUEST_DOCK_EXTERNAL_OFFSET_CLOSED = 22;
|
||||
exports.QUEST_DOCK_EXPANDED_CONTENT_PADDING_VERTICAL = 16;
|
||||
exports.QUEST_DOCK_MODE_CHANGE_PHYSICS = object3;
|
||||
exports.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = object4;
|
||||
exports.QUEST_DOCK_CONTENT_BORDER_RADII = lg;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/* Metro module 13654; source: modules/quests/native/QuestDock/QuestDockContentCollapsed.tsx; dependencies: [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13655, 13660, 2] */
|
||||
function _fun104291(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:6, offset: 0x0228ecdb, size: 321 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
|
||||
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const env0_5 = (require(13572) /* metro dependency 13572: QuestDockConstants */).QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value2.jsx;
|
||||
const env0_7 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
||||
object3['bottom'] = undefined;
|
||||
object3['zIndex'] = 2;
|
||||
const env0_8 = Reflect.apply(createStyles, createStylesModule, [{questDockContentCollapsed: object3}]);
|
||||
object = {code: 'function QuestDockContentCollapsedTsx1(){const{withSpring,activeQuestDockMode,QuestDockMode,hideOnExpand,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED||!hideOnExpand?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS)};}'};
|
||||
object = {code: "function QuestDockContentCollapsedTsx2(){const{activeQuestDockMode,QuestDockMode,hideOnExpand}=this.__closure;return{pointerEvents:activeQuestDockMode.get()===QuestDockMode.COLLAPSED||!hideOnExpand?'auto':'none'};}"};
|
||||
value = value.memo(QuestDockContentCollapsed);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContentCollapsed.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function QuestDockContentCollapsed({hideOnExpand}) { // fn#104292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:855, offset: 0x0228ee1c, size: 492 bytes, params: 2, frame: 25
|
||||
const r10 = hideOnExpand === undefined || hideOnExpand;
|
||||
let binding = env0_3;
|
||||
let useContext = binding.useContext;
|
||||
const quest = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
||||
const styles = useStyles();
|
||||
const userStatus = quest.userStatus;
|
||||
const value4 = userStatus?.enrolledAt != null;
|
||||
binding = env0_3;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const activeQuestDockMode = Reflect.apply(useContext, binding, [QuestDockGestureContext]).activeQuestDockMode;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = QuestDockContentCollapsedP;
|
||||
const object2 = {};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.activeQuestDockMode = activeQuestDockMode;
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.hideOnExpand = r10;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 13361221764426;
|
||||
closure.__initData = env0_9;
|
||||
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue2 = reanimatedRexportModule;
|
||||
const useAnimatedProps = moduleValue2.useAnimatedProps;
|
||||
closure = QuestDockContentCollapsedS;
|
||||
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode, hideOnExpand: r10};
|
||||
closure.__workletHash = 14339269503421;
|
||||
closure.__initData = env0_10;
|
||||
return ((Component) => <Component style={[styles.questDockContentCollapsed,
|
||||
value5]} animatedProps={Reflect.apply(useAnimatedProps, moduleValue2,
|
||||
[closure])}>{!value4 && ((Component) => <Component />)(importDefault(13655) /* metro dependency 13655: QuestDockUnenrolledHeader */)}{value4 && ((Component) => <Component />)(importDefault(13660) /* metro dependency 13660: QuestDockEnrolledHeader */)}</Component>)(importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */);
|
||||
}
|
||||
|
||||
function QuestDockContentCollapsedP() { // fn#104293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:1124, owner: QuestDockContentCollapsed.p, offset: 0x0228f008, size: 96 bytes, params: 1, frame: 18
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const value3 = activeQuestDockMode.get();
|
||||
const COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
const value4 = 1;
|
||||
return {opacity: Reflect.apply(withSpring, springModule, [value3 === COLLAPSED ? value4 : env0_0 ? 0 : value4,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS])};
|
||||
}
|
||||
|
||||
function QuestDockContentCollapsedS() { // fn#104294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:1400, owner: QuestDockContentCollapsed.S, offset: 0x0228f068, size: 63 bytes, params: 1, frame: 13
|
||||
const value2 = activeQuestDockMode.get();
|
||||
const COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
const value4 = 'auto';
|
||||
return {pointerEvents: value2 === COLLAPSED ? value4 : env0_0 ? 'none' : value4};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
/* Metro module 13661; source: modules/quests/native/QuestDock/QuestDockContentExpanded.tsx; dependencies: [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13662, 13663, 2] */
|
||||
function _fun104327(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13858:6, offset: 0x02291c5a, size: 328 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
|
||||
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_5 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
const env0_6 = questDockConstantsModule.QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value3.jsx;
|
||||
const env0_8 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
||||
object3['bottom'] = undefined;
|
||||
object3['display'] = 'flex';
|
||||
object3['zIndex'] = 1;
|
||||
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{wrapper: object3}]);
|
||||
object = {code: 'function QuestDockContentExpandedTsx1(){const{isEnrolled,QUEST_DOCK_EXPANDED_HEIGHT,windowDimensions,withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS,questDockWrapperSpecs}=this.__closure;return{height:isEnrolled?undefined:QUEST_DOCK_EXPANDED_HEIGHT,width:windowDimensions.get().width,opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS),transform:[{translateX:withSpring((questDockWrapperSpecs.get().width-windowDimensions.get().width)/2,QUEST_DOCK_MODE_CHANGE_PHYSICS)}]};}'};
|
||||
value = value.memo(QuestDockContentExpanded);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContentExpanded.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function QuestDockContentExpanded() { // fn#104328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13858:933, offset: 0x02291da2, size: 436 bytes, params: 1, frame: 24
|
||||
var r5;
|
||||
var value;
|
||||
const binding = env0_3;
|
||||
let useContext = binding.useContext;
|
||||
const value2 = undefined;
|
||||
const quest = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
||||
const styles = useStyles();
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {activeQuestDockMode, questDockWrapperSpecs, windowDimensions} = Reflect.apply(useContext, binding,
|
||||
[QuestDockGestureContext]);
|
||||
const userStatus = quest.userStatus;
|
||||
const value4 = (userStatus == null ? value2 : userStatus.enrolledAt) != null;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = QuestDockContentExpandedN;
|
||||
const object2 = {isEnrolled: value4};
|
||||
object2.QUEST_DOCK_EXPANDED_HEIGHT = QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
object2.windowDimensions = windowDimensions;
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.activeQuestDockMode = activeQuestDockMode;
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
object2.questDockWrapperSpecs = questDockWrapperSpecs;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 17161265612101;
|
||||
closure.__initData = env0_10;
|
||||
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
const items2 = [styles.wrapper, value5];
|
||||
const r7 = !value4 && ((Component) => <Component />)(importDefault(13662) /* metro dependency 13662: QuestDockUnenrolledBody */);
|
||||
if (value4) {
|
||||
value = importDefault(13663) /* metro dependency 13663: QuestDockEnrolledBody */;
|
||||
value = ((Component) => <Component quest={quest} />)(value);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = value4;
|
||||
}
|
||||
return (
|
||||
<ReanimatedNativeView style={items2}>
|
||||
{r7}
|
||||
{r5}
|
||||
</ReanimatedNativeView>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestDockContentExpandedN() { // fn#104329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13858:1216, owner: QuestDockContentExpanded.n, offset: 0x02291f56, size: 219 bytes, params: 1, frame: 19
|
||||
const object2 = {};
|
||||
const QUEST_DOCK_EXPANDED_HEIGHT2 = result ? undefined : QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
object2.height = QUEST_DOCK_EXPANDED_HEIGHT2;
|
||||
let windowDimensionsBinding = windowDimensions;
|
||||
let get = windowDimensionsBinding.get;
|
||||
let width = Reflect.apply(get, windowDimensionsBinding, []).width;
|
||||
object2.width = width;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
let withSpring = springModule.withSpring;
|
||||
const value5 = activeQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.opacity = Reflect.apply(withSpring, springModule, [value5 !== EXPANDED ? 0 : 1,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS]);
|
||||
const moduleValue2 = springModule;
|
||||
withSpring = moduleValue2.withSpring;
|
||||
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
width = Reflect.apply(get, questDockWrapperSpecsBinding, []).width;
|
||||
windowDimensionsBinding = windowDimensions;
|
||||
get = windowDimensionsBinding.get;
|
||||
object2.transform = [{translateX: Reflect.apply(withSpring, moduleValue2, [(width - Reflect.apply(get,
|
||||
windowDimensionsBinding, []).width) / 2, QUEST_DOCK_MODE_CHANGE_PHYSICS])}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Metro module 13650; source: modules/quests/native/QuestDock/QuestDockContext.tsx; dependencies: [31, 2] */
|
||||
function _fun104238(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13847:6, offset: 0x0228b7e7, size: 124 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
value = value.createContext({'quest': null, 'isRendered': false, 'isVisibleToUser': false, quest: undefined});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContext.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,377 @@
|
||||
/* Metro module 13577; source: modules/quests/native/QuestDock/QuestDockContextMenuActionSheet.tsx; dependencies: [5, 31, 661, 33, 7114, 9483, 9505, 6805, 6807, 10638, 7972, 9520, 6531, 7120, 4080, 4060, 1244, 13578, 9519, 9517, 9518, 7121, 7110, 9480, 10139, 13580, 5312, 9484, 13583, 8653, 13584, 13586, 13588, 8999, 7007, 6797, 2] */
|
||||
function _fun103202(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:6, offset: 0x0225bf63, size: 185 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 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContextMenuActionSheet.tsx');
|
||||
exports.default = QuestDockContextMenuActionSheet;
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheet({quest}) { // fn#103203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:180, offset: 0x0225c01c, size: 2479 bytes, params: 2, frame: 35
|
||||
var r8;
|
||||
var r5;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object19;
|
||||
var object;
|
||||
var items4;
|
||||
var object2;
|
||||
var object4;
|
||||
var object5;
|
||||
var object6;
|
||||
const EyeIcon = (require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon;
|
||||
var object7;
|
||||
var object8;
|
||||
var value;
|
||||
const questUtilsModule = require(7114) /* metro dependency 7114: QuestUtils */;
|
||||
const isShareableQuest2 = questUtilsModule.isShareableQuest(quest.config);
|
||||
const value2 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestPreviewActions(quest.id);
|
||||
const env0_1 = value2.handleComplete;
|
||||
const env0_2 = value2.handleProgress;
|
||||
const env0_3 = value2.handleResetDismissibilityClick;
|
||||
const env0_4 = value2.handleResetStatusClick;
|
||||
const externalCtaLabel = (require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest);
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
let Group = ActionSheetRow.Group;
|
||||
const object9 = {};
|
||||
const ActionSheetRow2 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
let Icon = ActionSheetRow2.Icon;
|
||||
const LinkExternalMediumIcon = (require(10638) /* metro dependency 10638: LinkExternalMediumIcon */).LinkExternalMediumIcon;
|
||||
object9.icon = <Icon IconComponent={LinkExternalMediumIcon} />;
|
||||
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
|
||||
object9.label = <FormLabel text={externalCtaLabel} />;
|
||||
object9.onPress = onPress_103204;
|
||||
const actionSheetRow = <ActionSheetRow {...object9} />;
|
||||
if (isShareableQuest2) {
|
||||
r8 = <ActionSheetRow icon={((Icon) => <Icon IconComponent={(require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon)} label={<FormLabel text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WqhZss)} />} onPress={onPress_103205} />;
|
||||
} else {
|
||||
r8 = isShareableQuest2;
|
||||
}
|
||||
const items2 = [<Group hasIcons>{actionSheetRow}{r8}</Group>];
|
||||
Group = ActionSheetRow.Group;
|
||||
const object11 = {};
|
||||
const ActionSheetRow4 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
Icon = ActionSheetRow4.Icon;
|
||||
object11.icon = <Icon IconComponent={importDefault(13578) /* metro dependency 13578: WreathIcon */} />;
|
||||
let string = intl.string;
|
||||
const LLLLPD = (require(1244) /* metro dependency 1244: indexNative */).t.LLLLPD;
|
||||
object11.label = <FormLabel text={Reflect.apply(string, intl, [LLLLPD])} />;
|
||||
object11.onPress = onPress_103206;
|
||||
const items3 = [<ActionSheetRow {...object11} />];
|
||||
const object12 = {};
|
||||
const ActionSheetRow5 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
Icon = ActionSheetRow5.Icon;
|
||||
const CircleQuestionIcon = (require(10139) /* metro dependency 10139: CircleQuestionIcon */).CircleQuestionIcon;
|
||||
object12.icon = <Icon IconComponent={CircleQuestionIcon} />;
|
||||
string = intl.string;
|
||||
const GcsZKJ = (require(1244) /* metro dependency 1244: indexNative */).t.GcsZKJ;
|
||||
object12.label = <FormLabel text={Reflect.apply(string, intl, [GcsZKJ])} />;
|
||||
object12.onPress = onPress_103207;
|
||||
items3[1] = <ActionSheetRow {...object12} />;
|
||||
const object14 = {};
|
||||
const ActionSheetRow6 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
Icon = ActionSheetRow6.Icon;
|
||||
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
|
||||
object14.icon = <Icon IconComponent={XSmallIcon} />;
|
||||
string = intl.string;
|
||||
const NN79E9 = (require(1244) /* metro dependency 1244: indexNative */).t.NN79E9;
|
||||
object14.label = <FormLabel text={Reflect.apply(string, intl, [NN79E9])} />;
|
||||
string = intl.string;
|
||||
const V6htN5 = (require(1244) /* metro dependency 1244: indexNative */).t.V6htN5;
|
||||
object14.subLabel = Reflect.apply(string, intl, [V6htN5]);
|
||||
object14.onPress = env0_3(_fun103209);
|
||||
items3[2] = <ActionSheetRow {...object14} />;
|
||||
items2[1] = <Group hasIcons>{items3}</Group>;
|
||||
const preview = quest.preview;
|
||||
if (preview) {
|
||||
Group = ActionSheetRow.Group;
|
||||
var groupProps = {title: intl.string(t['Ape+mm']), hasIcons: true};
|
||||
object = {};
|
||||
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
|
||||
object.icon = <Icon IconComponent={(require(8653) /* metro dependency 8653: TrophyIcon */).TrophyIcon} />;
|
||||
string = intl.string;
|
||||
object.label = <FormLabel text={Reflect.apply(string, intl, [t.jQEfRT])} />;
|
||||
object.onPress = onPress_103210;
|
||||
value = <ActionSheetRow {...object} />;
|
||||
items4 = [value];
|
||||
object2 = {};
|
||||
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
|
||||
object2.icon = <Icon IconComponent={(require(13584) /* metro dependency 13584: RedoIcon */).RedoIcon} />;
|
||||
string = intl.string;
|
||||
object2.label = <FormLabel text={Reflect.apply(string, intl, [t.cKSLr4])} />;
|
||||
object2.onPress = onPress_103211;
|
||||
items4[1] = <ActionSheetRow {...object2} />;
|
||||
object4 = {};
|
||||
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
|
||||
object4.icon = <Icon IconComponent={(require(13586) /* metro dependency 13586: UndoIcon */).UndoIcon} />;
|
||||
string = intl.string;
|
||||
object4.label = <FormLabel text={Reflect.apply(string, intl, [t.taqkwK])} />;
|
||||
object4.onPress = onPress_103212;
|
||||
items4[2] = <ActionSheetRow {...object4} />;
|
||||
object5 = {};
|
||||
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
|
||||
object5.icon = <Icon IconComponent={(require(13588) /* metro dependency 13588: UnsendIcon */).UnsendIcon} />;
|
||||
string = intl.string;
|
||||
object5.label = <FormLabel text={Reflect.apply(string, intl, [t.JF6W66])} />;
|
||||
object5.onPress = onPress_103213;
|
||||
items4[3] = <ActionSheetRow {...object5} />;
|
||||
object6 = {};
|
||||
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
|
||||
object6.icon = <Icon IconComponent={EyeIcon} />;
|
||||
string = intl.string;
|
||||
object6.label = <FormLabel text={Reflect.apply(string, intl, [t['lL6/zF']])} />;
|
||||
object6.onPress = onPress_103214;
|
||||
items4[4] = <ActionSheetRow {...object6} />;
|
||||
object7 = {};
|
||||
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
|
||||
object7.icon = <Icon IconComponent={EyeIcon} />;
|
||||
string = intl.string;
|
||||
object7.label = <FormLabel text={Reflect.apply(string, intl, [t.tx5Ax5])} />;
|
||||
object7.onPress = onPress_103215;
|
||||
items4[5] = <ActionSheetRow {...object7} />;
|
||||
object8 = {};
|
||||
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
|
||||
object8.icon = <Icon IconComponent={(require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon} />;
|
||||
string = intl.string;
|
||||
object8.label = <FormLabel text={Reflect.apply(string, intl, [t.oisrFi])} />;
|
||||
object8.onPress = onPress_103216;
|
||||
items4[6] = <ActionSheetRow {...object8} />;
|
||||
value = <Group {...groupProps}>{items4}</Group>;
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = preview;
|
||||
}
|
||||
items2[2] = r5;
|
||||
return (
|
||||
<ActionSheet>
|
||||
{items2}
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress() { // fn#103204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:693, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225c9cb, size: 157 bytes, params: 1, frame: 19
|
||||
const value = environment.__proto__;
|
||||
const questPlatformUtilsModule = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
|
||||
const openGameLinkDirectly = questPlatformUtilsModule.openGameLinkDirectly;
|
||||
const questBinding = quest;
|
||||
const object2 = {};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.content = QUEST_BAR_MOBILE;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const CONTEXT_MENU_OPEN_GAME_LINK = QuestContentCTA.CONTEXT_MENU_OPEN_GAME_LINK;
|
||||
object2.ctaContent = CONTEXT_MENU_OPEN_GAME_LINK;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
Reflect.apply(openGameLinkDirectly, questPlatformUtilsModule, [questBinding, object2]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103205() { // fn#103205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:1114, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225ca68, size: 162 bytes, params: 1, frame: 19
|
||||
const value = environment.__proto__;
|
||||
const questCopyUtilsModule = require(9505) /* metro dependency 9505: QuestCopyUtils */;
|
||||
const copyShareLink = questCopyUtilsModule.copyShareLink;
|
||||
const id = quest.id;
|
||||
const object2 = {};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.content = QUEST_BAR_MOBILE;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const CONTEXT_MENU_COPY_LINK = QuestContentCTA.CONTEXT_MENU_COPY_LINK;
|
||||
object2.ctaContent = CONTEXT_MENU_COPY_LINK;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
Reflect.apply(copyShareLink, questCopyUtilsModule, [id, object2]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103206() { // fn#103206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:1570, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225cb0a, size: 499 bytes, params: 1, frame: 18
|
||||
var moduleValue2;
|
||||
var trackQuestContentClicked;
|
||||
var object2;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
var QUEST_BAR_MOBILE;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
var moduleValue3;
|
||||
var captureAdUserAction;
|
||||
const value = environment.__proto__;
|
||||
const adAnalyticsInterfaceExperimentModule = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
||||
const shouldMigrateToAdAnalyticsInterface = adAnalyticsInterfaceExperimentModule.shouldMigrateToAdAnalyticsInterface;
|
||||
const AdAnalyticsInterfaceExperimentStep = adAnalyticsInterfaceExperimentModule.AdAnalyticsInterfaceExperimentStep;
|
||||
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
||||
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, adAnalyticsInterfaceExperimentModule,
|
||||
[STEP_2_CLICKED_INTERNAL, 'quest_dock_context_menu'])) {
|
||||
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
|
||||
captureAdUserAction = moduleValue3.captureAdUserAction;
|
||||
object2 = {};
|
||||
object2.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
|
||||
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
||||
object2.adCreativeId = quest.id;
|
||||
object2.questContentCTA = QuestContentCTA.CONTEXT_MENU_LEARN_MORE;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.surfaceId = QUEST_BAR_MOBILE;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
Reflect.apply(captureAdUserAction, moduleValue3, [object2]);
|
||||
} else {
|
||||
moduleValue2 = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
trackQuestContentClicked = moduleValue2.trackQuestContentClicked;
|
||||
object2 = {};
|
||||
object2.questId = quest.id;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.questContent = QUEST_BAR_MOBILE;
|
||||
object2.questContentCTA = QuestContentCTA.CONTEXT_MENU_LEARN_MORE;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
Reflect.apply(trackQuestContentClicked, moduleValue2, [object2]);
|
||||
}
|
||||
const questUtilsNativeModule = require(9480) /* metro dependency 9480: QuestUtilsNative */;
|
||||
const openQuestHome = questUtilsNativeModule.openQuestHome;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
Reflect.apply(openQuestHome, questUtilsNativeModule, [{scrollToQuestId: quest.id, fromContent: QUEST_BAR_MOBILE}]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103207() { // fn#103207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:2570, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225ccfd, size: 175 bytes, params: 1, frame: 18
|
||||
const value = environment.__proto__;
|
||||
const defaultImport = importDefault(13580) /* metro dependency 13580: QuestDisclosureModalActionCreators */;
|
||||
const showModal = defaultImport.showModal;
|
||||
const object3 = {};
|
||||
object3.quest = quest;
|
||||
object3.isTargetedDisclosure = true;
|
||||
const object4 = {};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object4.content = QUEST_BAR_MOBILE;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const CONTEXT_MENU_OPEN_DISCLOSURE = QuestContentCTA.CONTEXT_MENU_OPEN_DISCLOSURE;
|
||||
object4.ctaContent = CONTEXT_MENU_OPEN_DISCLOSURE;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object4.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
object3.trackingCtx = object4;
|
||||
Reflect.apply(showModal, defaultImport, [object3]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function* _fun103209() { // fn#103209, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:3076, offset: 0x0225cdb7, size: 525 bytes, params: 1, frame: 21
|
||||
var value8;
|
||||
var trackQuestContentClicked;
|
||||
var object2;
|
||||
var value9;
|
||||
var captureAdUserAction;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_0;
|
||||
var binding2 = env2_2;
|
||||
var value3 = binding(binding2[27]);
|
||||
var dismissQuestContent = value3.dismissQuestContent;
|
||||
var id = require.id;
|
||||
var QuestContent = binding(binding2[12]).QuestContent;
|
||||
var QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
var value5 = Reflect.apply(dismissQuestContent, value3, [id, QUEST_BAR_MOBILE]);
|
||||
env2_1(binding2[14]).hideActionSheet();
|
||||
var value7 = binding(binding2[18]);
|
||||
var shouldMigrateToAdAnalyticsInterface = value7.shouldMigrateToAdAnalyticsInterface;
|
||||
var AdAnalyticsInterfaceExperimentStep = binding(binding2[18]).AdAnalyticsInterfaceExperimentStep;
|
||||
var STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
||||
var shouldMigrateToAdAnalyticsInterface2 = Reflect.apply(shouldMigrateToAdAnalyticsInterface, value7,
|
||||
[STEP_2_CLICKED_INTERNAL, 'quest_dock_context_menu']);
|
||||
binding = env2_0;
|
||||
var binding4 = env2_2;
|
||||
if (shouldMigrateToAdAnalyticsInterface2) {
|
||||
value9 = binding(binding4[19]);
|
||||
captureAdUserAction = value9.captureAdUserAction;
|
||||
object2 = {};
|
||||
object2.type = binding(binding4[20]).AdUserActionType.CLICK_INTERNAL;
|
||||
object2.adCreativeType = binding(binding4[21]).AdCreativeType.QUEST;
|
||||
object2.adCreativeId = require.id;
|
||||
object2.questContentCTA = binding(binding4[13]).QuestContentCTA.CONTEXT_MENU_HIDE_CONTENT;
|
||||
QuestContent = binding(binding4[12]).QuestContent;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.surfaceId = QUEST_BAR_MOBILE;
|
||||
QuestContent = binding(binding4[12]).QuestContent;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
Reflect.apply(captureAdUserAction, value9, [object2]);
|
||||
} else {
|
||||
value8 = binding(binding4[22]);
|
||||
trackQuestContentClicked = value8.trackQuestContentClicked;
|
||||
object2 = {};
|
||||
object2.questId = require.id;
|
||||
QuestContent = binding(binding4[12]).QuestContent;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.questContent = QUEST_BAR_MOBILE;
|
||||
object2.questContentCTA = binding(binding4[13]).QuestContentCTA.CONTEXT_MENU_HIDE_CONTENT;
|
||||
QuestContent = binding(binding4[12]).QuestContent;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
Reflect.apply(trackQuestContentClicked, value8, [object2]);
|
||||
}
|
||||
yield value5;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
env2_0(env2_2[28]).displayQuestDismissalToast();
|
||||
}
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103210() { // fn#103210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4226, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225cfc4, size: 48 bytes, params: 1, frame: 12
|
||||
handleComplete();
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103211() { // fn#103211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4444, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225cff4, size: 95 bytes, params: 1, frame: 12
|
||||
const handleProgressBinding = handleProgress;
|
||||
const Math = global.Math;
|
||||
handleProgressBinding(0.9 * Math.random() + 0.03);
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103212() { // fn#103212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4682, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d053, size: 48 bytes, params: 1, frame: 12
|
||||
handleResetStatusClick();
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103213() { // fn#103213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4902, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d083, size: 48 bytes, params: 1, frame: 12
|
||||
handleResetDismissibilityClick();
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103214() { // fn#103214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:5122, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d0b3, size: 109 bytes, params: 1, frame: 17
|
||||
const value = environment.__proto__;
|
||||
const questActionCreatorsModule = require(9484) /* metro dependency 9484: QuestActionCreators */;
|
||||
const markAdContentUnseen = questActionCreatorsModule.markAdContentUnseen;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const QUEST = AdCreativeType.QUEST;
|
||||
Reflect.apply(markAdContentUnseen, questActionCreatorsModule, [QUEST, [quest.id]]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103215() { // fn#103215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:5402, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d120, size: 105 bytes, params: 1, frame: 16
|
||||
const value = environment.__proto__;
|
||||
const openUserSettingsModule = require(7007) /* metro dependency 7007: openUserSettings */;
|
||||
const openUserSettings = openUserSettingsModule.openUserSettings;
|
||||
const QUEST_PREVIEW_TOOL_2 = UserSettingsSections.QUEST_PREVIEW_TOOL_2;
|
||||
Reflect.apply(openUserSettings, openUserSettingsModule, [{screen: QUEST_PREVIEW_TOOL_2,
|
||||
params: {questId: quest.id}}]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103216() { // fn#103216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:5697, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d189, size: 76 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
clipboardUtilsNativeModule.copy(quest.id);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
/* Metro module 13665; source: modules/quests/native/QuestDock/QuestDockDragHandle.tsx; dependencies: [31, 27, 6528, 13572, 7553, 33, 4501, 13650, 13573, 5176, 4017, 4577, 8141, 13571, 6515, 1244, 2] */
|
||||
function _fun104360(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:6, offset: 0x02293cfa, size: 460 bytes, params: 8, frame: 24
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
|
||||
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_5 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
const env0_6 = questDockConstantsModule.QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
|
||||
const env0_7 = questDockConstantsModule.QUEST_DOCK_COLLAPSED_MAX_WIDTH;
|
||||
const env0_8 = (require(7553) /* metro dependency 7553: YouBarConstants */).useYouBarHorizontalMargin;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value3.jsx;
|
||||
const env0_10 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {};
|
||||
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
|
||||
object5['bottom'] = undefined;
|
||||
object5['right'] = undefined;
|
||||
object5['zIndex'] = 4;
|
||||
object4.dragHandleWrapper = object5;
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
||||
object6['bottom'] = undefined;
|
||||
object4.dragHandleOverlay = object6;
|
||||
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object4]);
|
||||
object4 = {code: 'function getDragHandleOffsetLeft_QuestDockDragHandleTsx1(activeQuestDockMode,horizontalEdgeGutter,withYouBar){const{QuestDockMode}=this.__closure;if(withYouBar){switch(activeQuestDockMode){case QuestDockMode.EXPANDED:return 0;default:return horizontalEdgeGutter*-1;}}else{switch(activeQuestDockMode){case QuestDockMode.COLLAPSED:return horizontalEdgeGutter*-1;default:return 0;}}}'};
|
||||
const env0_13 = _fun104361();
|
||||
object4 = {code: 'function QuestDockDragHandleTsx2(){const{windowDimensions,QUEST_DOCK_COLLAPSED_MAX_WIDTH}=this.__closure;return{width:Math.min(windowDimensions.get().width,QUEST_DOCK_COLLAPSED_MAX_WIDTH)};}'};
|
||||
object4 = {code: 'function QuestDockDragHandleTsx3(){const{getDragHandleOffsetLeft,activeQuestDockMode,questDockHorizontalGutterCollapsed,youBarEnabled}=this.__closure;return{left:getDragHandleOffsetLeft(activeQuestDockMode.get(),questDockHorizontalGutterCollapsed,youBarEnabled)};}'};
|
||||
object4 = {code: 'function QuestDockDragHandleTsx4(){const{withSpring,isEnrolled,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{opacity:withSpring(isEnrolled||activeQuestDockMode.get()===QuestDockMode.CLOSED||activeQuestDockMode.get()===QuestDockMode.SOFT_DISMISSED?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS)};}'};
|
||||
object4 = {code: 'function QuestDockDragHandleTsx5(){const{withSpring,isEnrolled,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{opacity:withSpring(!isEnrolled&&activeQuestDockMode.get()!==QuestDockMode.CLOSED&&activeQuestDockMode.get()!==QuestDockMode.SOFT_DISMISSED?0.5:0,QUEST_DOCK_MODE_CHANGE_PHYSICS)};}'};
|
||||
value = value.memo(QuestDockDragHandle);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockDragHandle.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun104361() { // fn#104361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:900, offset: 0x02293ec6, size: 57 bytes, params: 1, frame: 4
|
||||
const closure = getDragHandleOffsetLeft;
|
||||
closure.__closure = {QuestDockMode: QuestDockMode};
|
||||
closure.__workletHash = 3634410156103;
|
||||
closure.__initData = env0_12;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function QuestDockDragHandle({isExpanded}) { // fn#104363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:2358, offset: 0x02293f45, size: 973 bytes, params: 2, frame: 31
|
||||
var object2;
|
||||
const binding = env0_3;
|
||||
let useContext = binding.useContext;
|
||||
const quest = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
||||
const styles = useStyles();
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {activeQuestDockMode, windowDimensions} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
|
||||
const userStatus = quest.userStatus;
|
||||
const value4 = userStatus?.enrolledAt != null;
|
||||
const value5 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockDragHandle');
|
||||
const r15 = value5 ? useYouBarHorizontalMargin() : QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = function() {
|
||||
var object = {};
|
||||
var Math = global.Math;
|
||||
object.width = Math.min(windowDimensions.get().width, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
|
||||
return object;
|
||||
};
|
||||
closure.__closure = {windowDimensions: windowDimensions,
|
||||
QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
|
||||
closure.__workletHash = 13640576219747;
|
||||
closure.__initData = env0_14;
|
||||
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue3.useAnimatedStyle;
|
||||
closure = QuestDockDragHandleH;
|
||||
closure.__closure = {getDragHandleOffsetLeft: env0_13, activeQuestDockMode: activeQuestDockMode,
|
||||
questDockHorizontalGutterCollapsed: r15, youBarEnabled: value5};
|
||||
closure.__workletHash = 14041713732815;
|
||||
closure.__initData = env0_15;
|
||||
const value8 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue4.useAnimatedStyle;
|
||||
closure = function() {
|
||||
var moduleValue = require(dependencyMap[11]);
|
||||
return {opacity: moduleValue.withSpring(result || activeQuestDockMode.get() === QuestDockMode.CLOSED ? 1 : activeQuestDockMode.get() !== QuestDockMode.SOFT_DISMISSED ? 0 : 1,
|
||||
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS)};
|
||||
};
|
||||
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isEnrolled: value4,
|
||||
activeQuestDockMode: activeQuestDockMode};
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 12299455640931;
|
||||
closure.__initData = env0_16;
|
||||
const value9 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue5.useAnimatedStyle;
|
||||
closure = function() {
|
||||
var moduleValue = require(dependencyMap[11]);
|
||||
return {opacity: moduleValue.withSpring(result || activeQuestDockMode.get() === QuestDockMode.CLOSED ? 0 : activeQuestDockMode.get() !== QuestDockMode.SOFT_DISMISSED ? 0.5 : 0,
|
||||
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS)};
|
||||
};
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isEnrolled: value4,
|
||||
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS: QUEST_DOCK_MODE_CHANGE_PHYSICS};
|
||||
closure.__workletHash = 9632835517209;
|
||||
closure.__initData = env0_17;
|
||||
const value10 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
|
||||
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
const items3 = [styles.dragHandleWrapper, value7];
|
||||
const defaultImport2 = ReanimatedNativeView;
|
||||
const dimensionsLayoutTransition = (require(13571) /* metro dependency 13571: QuestDockUtils */).dimensionsLayoutTransition;
|
||||
const defaultImport3 = ReanimatedNativeView;
|
||||
const items2 = [styles.dragHandleOverlay, value10];
|
||||
const ActionSheetHeaderBar = (require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
return (
|
||||
<ReanimatedNativeView style={items3}>
|
||||
{((Component) => <Component style={value8} layout={dimensionsLayoutTransition}>{((Component) => <Component style={items2}><ActionSheetHeaderBar variant="overlay" accessibilityLabel={isExpanded ? Reflect.apply(string,
|
||||
intl, [t['GQ+4bk']]) : Reflect.apply(string, intl,
|
||||
[t.Yplnt6])} /></Component>)(defaultImport3)}<ReanimatedNativeView style={[styles.dragHandleOverlay,
|
||||
value9]} pointerEvents="none" accessibilityElementsHidden importantForAccessibility="no-hide-descendants"><ActionSheetHeaderBar variant="default" /></ReanimatedNativeView></Component>)(defaultImport2)}
|
||||
</ReanimatedNativeView>
|
||||
);
|
||||
}
|
||||
|
||||
function getDragHandleOffsetLeft(a0, a1, a2) { // fn#104362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:939, offset: 0x02293eff, size: 70 bytes, params: 4, frame: 5
|
||||
const value = environment.__proto__;
|
||||
return a2 ? a0 === QuestDockMode.EXPANDED ? 0 : -1 * a1 : a0 !== QuestDockMode.COLLAPSED ? 0 : -1 * a1;
|
||||
}
|
||||
|
||||
function QuestDockDragHandleH() { // fn#104365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:2883, owner: QuestDockDragHandle.H, offset: 0x02294349, size: 48 bytes, params: 1, frame: 16
|
||||
const object2 = {};
|
||||
object2.left = env1_13(activeQuestDockMode.get(), env0_4, env0_3);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
/* Metro module 13663; source: modules/quests/native/QuestDock/QuestDockEnrolledBody.tsx; dependencies: [5, 31, 27, 13570, 6528, 13572, 33, 4501, 697, 13576, 13573, 8621, 13568, 13595, 6531, 13592, 13591, 13593, 1585, 5176, 7116, 2] */
|
||||
function _fun104337(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:6, offset: 0x022929cd, size: 517 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
|
||||
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
|
||||
const env0_7 = questConstantsModule.QuestDockMode;
|
||||
const env0_8 = questConstantsModule.QuestsExperimentLocations;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const QUEST_DOCK_EXPANDED_ENROLLED_PADDING_TOP = questDockConstantsModule.QUEST_DOCK_EXPANDED_ENROLLED_PADDING_TOP;
|
||||
const env0_9 = questDockConstantsModule.QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
const QUEST_DOCK_EXPANDED_PADDING_BOTTOM = questDockConstantsModule.QUEST_DOCK_EXPANDED_PADDING_BOTTOM;
|
||||
const QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL = questDockConstantsModule.QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value4.jsx;
|
||||
const env0_12 = value4.Fragment;
|
||||
const env0_13 = value4.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.wrapper = {'flexGrow': 0, 'flexShrink': 0, paddingBottom: QUEST_DOCK_EXPANDED_PADDING_BOTTOM,
|
||||
paddingTop: QUEST_DOCK_EXPANDED_ENROLLED_PADDING_TOP, paddingHorizontal: QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.headerWrapper = {marginBottom: PX_16};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.contentWrapper = {'display': 'flex', 'gap': null, 'flexGrow': 0, 'flexShrink': 0, gap: PX_16};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.footer = {marginTop: PX_16};
|
||||
object2.footerWrapper = {marginLeft: -1 * QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL,
|
||||
marginRight: -1 * QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL};
|
||||
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(QuestDockEnrolledBody);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockEnrolledBody.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function EnrolledBodyWatchTask({quest}) { // fn#104338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:733, offset: 0x02292bd2, size: 643 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
let binding = env0_4;
|
||||
let useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const {restingQuestDockMode, setRestingQuestDockMode} = Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]);
|
||||
binding = env0_4;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const questDockWrapperSpecs = Reflect.apply(useContext, binding, [QuestDockGestureContext]).questDockWrapperSpecs;
|
||||
const value3 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(restingQuestDockMode);
|
||||
const value4 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
|
||||
var env0_4 = value4;
|
||||
env0_4.useEffect(_fun104339, [value3, questDockWrapperSpecs, quest.id, setRestingQuestDockMode, value4]);
|
||||
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
||||
const QuestBottomSheetHeader = importDefault(13592) /* metro dependency 13592: QuestBottomSheetHeader */;
|
||||
const QuestBottomSheetStep = (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetStep;
|
||||
let TASK_STATUS = QuestBottomSheetStep.TASK_STATUS;
|
||||
let QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
|
||||
const items2 = [<View style={styles.headerWrapper}><QuestBottomSheetHeader quest={quest} step={TASK_STATUS} withActionSheet location={QUESTS_BAR_MOBILE} /></View>];
|
||||
const QuestBottomSheetContent = (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetContent;
|
||||
QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
|
||||
TASK_STATUS = QuestBottomSheetStep.TASK_STATUS;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
items2[1] = <View style={styles.contentWrapper}><QuestBottomSheetContent quest={quest} location={QUESTS_BAR_MOBILE} step={TASK_STATUS} sourceQuestContent={QUEST_BAR_MOBILE} /></View>;
|
||||
const questBottomSheetFooter = importDefault(13593) /* metro dependency 13593: QuestBottomSheetFooter */;
|
||||
TASK_STATUS = QuestBottomSheetStep.TASK_STATUS;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
items2[2] = <View style={styles.footerWrapper}>{((Component) => <Component quest={quest} step={TASK_STATUS} style={styles.footer} withSafeArea={false} sourceQuestContent={QUEST_BAR_MOBILE} />)(questBottomSheetFooter)}</View>;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function EnrolledBodyPlayStreamTask({quest}) { // fn#104344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:2070, offset: 0x02292f93, size: 532 bytes, params: 2, frame: 33
|
||||
const styles = useStyles();
|
||||
const questBottomSheetModule = require(13591) /* metro dependency 13591: QuestBottomSheet */;
|
||||
const useEnrolledQuestContentProps = questBottomSheetModule.useEnrolledQuestContentProps;
|
||||
const object2 = {quest: quest};
|
||||
let QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
|
||||
object2.location = QUESTS_BAR_MOBILE;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
const {step, defibrillator, stepActions, handleTaskSelect,
|
||||
showMicrophone} = Reflect.apply(useEnrolledQuestContentProps, questBottomSheetModule, [object2]);
|
||||
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
||||
const QuestBottomSheetHeader = importDefault(13592) /* metro dependency 13592: QuestBottomSheetHeader */;
|
||||
QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
|
||||
const items2 = [<View style={styles.headerWrapper}><QuestBottomSheetHeader quest={quest} step={step} withActionSheet location={QUESTS_BAR_MOBILE} /></View>];
|
||||
const QuestBottomSheetContent = questBottomSheetModule.QuestBottomSheetContent;
|
||||
QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
items2[1] = <View style={styles.contentWrapper}><QuestBottomSheetContent defibrillator={defibrillator} quest={quest} handleTaskSelect={handleTaskSelect} location={QUESTS_BAR_MOBILE} showMicrophone={showMicrophone} step={step} sourceQuestContent={QUEST_BAR_MOBILE} /></View>;
|
||||
const questBottomSheetFooter = importDefault(13593) /* metro dependency 13593: QuestBottomSheetFooter */;
|
||||
const isActive = defibrillator.isActive;
|
||||
const onBack = stepActions.onBack;
|
||||
const start = defibrillator.start;
|
||||
const onNext = stepActions.onNext;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
items2[2] = <View style={styles.footerWrapper}>{((Component) => <Component quest={quest} step={step} isDefibrilating={isActive} onBack={onBack} onDefib={start} onConnectConsoleNext={onNext} style={styles.footer} withSafeArea={false} sourceQuestContent={QUEST_BAR_MOBILE} />)(questBottomSheetFooter)}</View>;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestDockEnrolledBody({quest}) { // fn#104345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:2980, offset: 0x022931a7, size: 350 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const minExpandedContentHeight = Reflect.apply(useContext, binding,
|
||||
[QuestDockGestureContext]).minExpandedContentHeight;
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const value2 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockEnrolledBody');
|
||||
const value3 = env0_4.useCallback(function(a0) {
|
||||
var height = a0.nativeEvent.layout.height;
|
||||
if (minExpandedContentHeight.get() !== height) {
|
||||
minExpandedContentHeight.set(height);
|
||||
}
|
||||
}, [minExpandedContentHeight]);
|
||||
env0_4.useEffect(function() {
|
||||
return _fun104348;
|
||||
}, [minExpandedContentHeight]);
|
||||
return (
|
||||
<View
|
||||
style={[styles.wrapper, value2 ? {paddingBottom: global.Math.max(bottom,
|
||||
QUEST_DOCK_EXPANDED_PADDING_BOTTOM)} : null]}
|
||||
onLayout={value3}
|
||||
>
|
||||
{(require(7116) /* metro dependency 7116: QuestTaskUtils */).hasWatchVideoTasks(quest) ? <EnrolledBodyWatchTask quest={quest} /> : <EnrolledBodyPlayStreamTask quest={quest} />}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104339() { // fn#104339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:1057, offset: 0x02292e55, size: 40 bytes, params: 1, frame: 9
|
||||
if (env0_4) {
|
||||
(function() {
|
||||
return _maybeOpenVideoQuestModal.apply(this, arguments);
|
||||
})();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun104347() { // fn#104347, offset: 0x0229333f, size: 11 bytes, params: 1, frame: 1
|
||||
return function() {
|
||||
if (minExpandedContentHeight.get() !== QUEST_DOCK_EXPANDED_HEIGHT) {
|
||||
minExpandedContentHeight.set(QUEST_DOCK_EXPANDED_HEIGHT);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function _maybeOpenVideoQuestModal() { // fn#104340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:1062, offset: 0x02292e7d, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
return env2_3(_fun104342).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun104342() { // fn#104342, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:1135, offset: 0x02292ebd, size: 214 bytes, params: 1, frame: 17
|
||||
var r1;
|
||||
var binding;
|
||||
var value4;
|
||||
var value8;
|
||||
var binding2;
|
||||
var value9;
|
||||
var object2;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
var get = dependencyMap.get;
|
||||
var value3 = Reflect.apply(get, dependencyMap, []).prevDeltaY < 0;
|
||||
if (value3) {
|
||||
binding = env3_3;
|
||||
value4 = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
r1 = binding === env4_7.RESET_TO_PREVIOUS;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
r1 = r1 && env4_6.prevRestingQuestDockMode === env4_7.EXPANDED;
|
||||
if (r1) {
|
||||
value8 = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
binding = env4_1;
|
||||
binding2 = env4_2;
|
||||
value9 = binding(binding2[13]);
|
||||
object2 = {};
|
||||
object2.questId = require.id;
|
||||
binding = env4_0;
|
||||
object2.sourceQuestContent = binding(binding2[14]).QuestContent.QUEST_BAR_MOBILE;
|
||||
yield value9(object2);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
importDefault(env4_7.COLLAPSED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* Metro module 13660; source: modules/quests/native/QuestDock/QuestDockEnrolledHeader.tsx; dependencies: [57, 31, 27, 33, 4501, 13650, 9483, 9950, 6531, 13620, 4573, 2] */
|
||||
function _fun104325(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13857:6, offset: 0x0229198a, size: 275 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value2.jsx;
|
||||
const env0_7 = value2.jsxs;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({wrapper: {'alignItems': 'center',
|
||||
'display': 'flex', 'flexDirection': 'row', 'flexGrow': 1, 'flexShrink': 1, 'gap': 8, 'justifyContent': 'center',
|
||||
'padding': 8}, progressIndicatorWrapper: {'flexGrow': 0, 'flexShrink': 0}, copy: {'flexGrow': 1,
|
||||
'flexShrink': 1}});
|
||||
value = value.memo(QuestDockEnrolledHeader);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockEnrolledHeader.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function QuestDockEnrolledHeader() { // fn#104326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13857:409, offset: 0x02291a9d, size: 445 bytes, params: 1, frame: 24
|
||||
const binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const quest = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const property = env0_3((require(9483) /* metro dependency 9483: QuestHooks */).useTaskPlatformScreen(quest,
|
||||
value2), 1)[0];
|
||||
const value5 = (require(9950) /* metro dependency 9950: QuestCopyHooks */).useQuestBarTitle(quest);
|
||||
const questCopyHooksModule = require(9950) /* metro dependency 9950: QuestCopyHooks */;
|
||||
const useQuestBarSubtitle = questCopyHooksModule.useQuestBarSubtitle;
|
||||
const object2 = {quest: quest, isExpanded: false, activeScreen: property};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
const value6 = Reflect.apply(useQuestBarSubtitle, questCopyHooksModule, [object2]);
|
||||
let value = importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */;
|
||||
value = <View style={styles.progressIndicatorWrapper}>{((Component) => <Component quest={quest} size="x-sm" progress={value2.percentComplete} loading={false} hasConfetti />)(value)}</View>;
|
||||
const items2 = [value];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[1] = <View style={styles.copy}><Text variant="heading-md/semibold" color="mobile-text-heading-primary">{value5}</Text><Text variant="text-sm/medium" color="text-muted">{value6}</Text></View>;
|
||||
return (
|
||||
<View style={styles.wrapper}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,369 @@
|
||||
/* Metro module 13576; source: modules/quests/native/QuestDock/QuestDockExternalCoordinationContext.tsx; dependencies: [31, 13570, 6528, 13572, 33, 672, 8142, 4017, 13571, 9484, 477, 2] */
|
||||
function _fun103187(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:6, offset: 0x0225b63c, size: 448 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
|
||||
const QuestDockMode = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const env0_5 = (require(13572) /* metro dependency 13572: QuestDockConstants */).QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const SECOND = Millis.SECOND;
|
||||
const env0_7 = 1 * SECOND;
|
||||
const createContext = value.createContext;
|
||||
object2 = {};
|
||||
const reanimatedHelperTypesModule = require(8142) /* metro dependency 8142: ReanimatedHelperTypes */;
|
||||
const createFakeSharedValue = reanimatedHelperTypesModule.createFakeSharedValue;
|
||||
const COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
object2.restingQuestDockMode = Reflect.apply(createFakeSharedValue, reanimatedHelperTypesModule, [COLLAPSED]);
|
||||
object2.setRestingQuestDockMode = function() {
|
||||
};
|
||||
object2.lastScrollEventSourceId = reanimatedHelperTypesModule.createFakeSharedValue(null);
|
||||
object2.questDockOffset = reanimatedHelperTypesModule.createFakeSharedValue(0);
|
||||
const context = Reflect.apply(createContext, value, [object2]);
|
||||
value = value.memo(QuestDockExternalCoordinationContextProviderInner);
|
||||
const env0_9 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
object2 = {code: 'function QuestDockExternalCoordinationContextTsx1(){const{restingQuestDockMode}=this.__closure;return restingQuestDockMode.get();}'};
|
||||
object2 = {code: 'function QuestDockExternalCoordinationContextTsx2(nextMode,prevMode){const{runOnJS,cancelReopenQuestDock}=this.__closure;if(nextMode!==prevMode){runOnJS(cancelReopenQuestDock)();}}'};
|
||||
object2 = {code: "function QuestDockExternalCoordinationContextTsx3(contentOffsetY,contentHeight,layoutHeight){const{isScrollHandlerEnabled,restingQuestDockMode,QuestDockMode,lastContentOffsetY,lastScrollEventSourceId,id,runOnJS,cancelReopenQuestDock,IS_ANDROID,scheduleReopenQuestDock,setRestingQuestDockMode,QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD}=this.__closure;if(!isScrollHandlerEnabled.get())return;if(restingQuestDockMode.get()===QuestDockMode.SOFT_DISMISSED||restingQuestDockMode.get()===QuestDockMode.EXPANDED){return;}const lastContentOffsetYValue=lastContentOffsetY.get();lastContentOffsetY.set(contentOffsetY);if(lastContentOffsetYValue===contentOffsetY)return;const lastSourceId=lastScrollEventSourceId.get();if(id!=='guilds'){lastScrollEventSourceId.set(id);}const isFirstScrollEvent=id!=='guilds'&&id!==lastSourceId;if(isFirstScrollEvent)return;const isOverscrollingAtTop=contentOffsetY<0&&lastContentOffsetYValue<0;if(isOverscrollingAtTop){runOnJS(cancelReopenQuestDock)();return;}const hasLayoutData=layoutHeight!=null&&contentHeight!=null;const isOverscrollingAtBottom=hasLayoutData&&contentOffsetY+layoutHeight>=contentHeight;if(isOverscrollingAtBottom)return;const isScrolledToTop=contentOffsetY<=0&&(IS_ANDROID||lastContentOffsetYValue<=0);if(isScrolledToTop&&restingQuestDockMode.get()===QuestDockMode.CLOSED){if(IS_ANDROID){runOnJS(scheduleReopenQuestDock)();}else{runOnJS(setRestingQuestDockMode)(QuestDockMode.COLLAPSED);}return;}const isScrollingDown=contentOffsetY>lastContentOffsetYValue&&contentOffsetY>0&&lastContentOffsetYValue>0;const isScrollingUp=contentOffsetY<lastContentOffsetYValue;const scrollDistance=Math.abs(lastContentOffsetYValue-contentOffsetY);if(isScrollingDown&&restingQuestDockMode.get()===QuestDockMode.COLLAPSED){runOnJS(setRestingQuestDockMode)(QuestDockMode.CLOSED);}else if(isScrollingUp&&restingQuestDockMode.get()===QuestDockMode.CLOSED&&scrollDistance>=QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD){runOnJS(scheduleReopenQuestDock)();}}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockExternalCoordinationContext.tsx');
|
||||
exports.QuestDockExternalCoordinationContext = context;
|
||||
exports.QuestDockExternalCoordinationContextProvider = value;
|
||||
exports.useExternalScrollEventHandler = useExternalScrollEventHandler;
|
||||
}
|
||||
|
||||
function QuestDockExternalCoordinationContextProviderInner(a0) { // fn#103189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:472, offset: 0x0225b7fc, size: 264 bytes, params: 2, frame: 19
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useSharedValue = reanimatedRexportModule.useSharedValue;
|
||||
const value2 = Reflect.apply(useSharedValue, reanimatedRexportModule, [null]);
|
||||
const value3 = reanimatedRexportModule.useSharedValue(0);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
useSharedValue = moduleValue3.useSharedValue;
|
||||
const questDockUtilsModule = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
const value4 = Reflect.apply(useSharedValue, moduleValue3,
|
||||
[questDockUtilsModule.isSoftDismissed(QuestDockStore.questDockSoftDismissedAt) ? QuestDockMode.SOFT_DISMISSED : QuestDockMode.COLLAPSED]);
|
||||
const binding = value4;
|
||||
const value6 = binding.useMemo(_fun103191, [value2, value4, binding.useCallback(_fun103190, [value4, value3]),
|
||||
value3]);
|
||||
const Provider = env0_8.Provider;
|
||||
return (
|
||||
<Provider value={value6}>
|
||||
{a0.children}
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function useExternalScrollEventHandler({id}) { // fn#103192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:3587, offset: 0x0225b99a, size: 548 bytes, params: 2, frame: 28
|
||||
const binding = env0_2;
|
||||
const {setRestingQuestDockMode, restingQuestDockMode, lastScrollEventSourceId} = binding.useContext(env0_8);
|
||||
const env0_4 = binding.useRef(-1);
|
||||
let useCallback = binding.useCallback;
|
||||
const value3 = Reflect.apply(useCallback, binding, [_fun103193, [setRestingQuestDockMode, restingQuestDockMode]]);
|
||||
let closure = _fun103195;
|
||||
const value4 = binding.useCallback(closure, []);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
closure = function() {
|
||||
return restingQuestDockMode.get();
|
||||
};
|
||||
closure.__closure = {restingQuestDockMode: restingQuestDockMode};
|
||||
closure.__workletHash = 14040596710288;
|
||||
closure.__initData = env0_10;
|
||||
const closure2 = useExternalScrollEventHandlerC;
|
||||
const runOnJS = reanimatedRexportModule.runOnJS;
|
||||
closure2.__closure = {runOnJS: runOnJS, cancelReopenQuestDock: value4};
|
||||
closure2.__workletHash = 1848909508809;
|
||||
closure2.__initData = env0_11;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
const value5 = reanimatedRexportModule.useSharedValue(0);
|
||||
const value6 = reanimatedRexportModule.useSharedValue(false);
|
||||
binding.useEffect(_fun103198, [value6]);
|
||||
useCallback = binding.useCallback;
|
||||
closure = useExternalScrollEventHandlerT;
|
||||
closure.__closure = {isScrollHandlerEnabled: value6, restingQuestDockMode: restingQuestDockMode,
|
||||
QuestDockMode: QuestDockMode, lastContentOffsetY: value5, lastScrollEventSourceId: lastScrollEventSourceId,
|
||||
id: id, runOnJS: runOnJS, cancelReopenQuestDock: value4, IS_ANDROID: env0_9, scheduleReopenQuestDock: value3,
|
||||
setRestingQuestDockMode: setRestingQuestDockMode,
|
||||
QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD: QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD};
|
||||
closure.__workletHash = 9824540806898;
|
||||
closure.__initData = env0_12;
|
||||
return Reflect.apply(useCallback, binding, [closure, [id, value5, lastScrollEventSourceId, restingQuestDockMode,
|
||||
value3, setRestingQuestDockMode, value4, value6]]);
|
||||
}
|
||||
|
||||
function _fun103190(a0) { // fn#103190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:721, offset: 0x0225b904, size: 107 bytes, params: 2, frame: 13
|
||||
let binding = env0_1;
|
||||
binding.set(0);
|
||||
binding = env0_2;
|
||||
const get = binding.get;
|
||||
if (Reflect.apply(get, binding, []) !== a0) {
|
||||
env0_2.set(a0);
|
||||
}
|
||||
const value = environment.__proto__;
|
||||
const RESET_TO_PREVIOUS = QuestDockMode.RESET_TO_PREVIOUS;
|
||||
if (a0 !== RESET_TO_PREVIOUS) {
|
||||
(require(9484) /* metro dependency 9484: QuestActionCreators */).updatePrevRestingQuestDockMode(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103191() { // fn#103191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:845, offset: 0x0225b96f, size: 43 bytes, params: 1, frame: 3
|
||||
return {lastScrollEventSourceId: env0_0, restingQuestDockMode: env0_2, setRestingQuestDockMode: env0_3,
|
||||
questDockOffset: env0_1};
|
||||
}
|
||||
|
||||
function _fun103193() { // fn#103193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:3773, offset: 0x0225bbbe, size: 98 bytes, params: 1, frame: 14
|
||||
var window;
|
||||
if (env0_4.current !== -1) {
|
||||
window = global.window;
|
||||
window.clearTimeout(env0_4.current);
|
||||
}
|
||||
env0_4.current = global.window.setTimeout(function() {
|
||||
if (restingQuestDockMode.get() !== QuestDockMode.EXPANDED) {
|
||||
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
|
||||
function _fun103195() { // fn#103195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:3929, offset: 0x0225bc5a, size: 54 bytes, params: 1, frame: 11
|
||||
var window;
|
||||
if (env0_4.current !== -1) {
|
||||
window = global.window;
|
||||
window.clearTimeout(env0_4.current);
|
||||
}
|
||||
}
|
||||
|
||||
function useExternalScrollEventHandlerC(a0, a1) { // fn#103197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4119, owner: useExternalScrollEventHandler.c, offset: 0x0225bc90, size: 60 bytes, params: 3, frame: 12
|
||||
var value;
|
||||
if (a0 !== a1) {
|
||||
value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(env0_6)();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103198() { // fn#103198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4355, offset: 0x0225bccc, size: 45 bytes, params: 1, frame: 14
|
||||
const env0_0 = global.setTimeout(_fun103199, env1_7);
|
||||
return _fun103200;
|
||||
}
|
||||
|
||||
function useExternalScrollEventHandlerT(a0, a1, a2) { // fn#103201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4451, owner: useExternalScrollEventHandler.T, offset: 0x0225bd10, size: 595 bytes, params: 4, frame: 19
|
||||
var r2;
|
||||
var restingQuestDockModeBinding;
|
||||
var value2;
|
||||
var value3;
|
||||
var SOFT_DISMISSED;
|
||||
var value4;
|
||||
var EXPANDED;
|
||||
var value5;
|
||||
var set;
|
||||
var lastScrollEventSourceIdBinding;
|
||||
var value6;
|
||||
var value7;
|
||||
var CLOSED;
|
||||
var Math;
|
||||
var abs;
|
||||
var value8;
|
||||
var value9;
|
||||
var COLLAPSED;
|
||||
var value10;
|
||||
var value11;
|
||||
var value12;
|
||||
var value13;
|
||||
var moduleValue;
|
||||
var runOnJS;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
var moduleValue4;
|
||||
let value = environment;
|
||||
let binding = env0_8;
|
||||
let get = binding.get;
|
||||
reducibleJoin32: while (true) {
|
||||
if (Reflect.apply(get, binding, [])) {
|
||||
restingQuestDockModeBinding = restingQuestDockMode;
|
||||
get = restingQuestDockModeBinding.get;
|
||||
value2 = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
value3 = environment.__proto__;
|
||||
SOFT_DISMISSED = QuestDockMode.SOFT_DISMISSED;
|
||||
if (value2 === SOFT_DISMISSED) {
|
||||
break reducibleJoin32;
|
||||
}
|
||||
restingQuestDockModeBinding = restingQuestDockMode;
|
||||
get = restingQuestDockModeBinding.get;
|
||||
value4 = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
if (value4 === EXPANDED) {
|
||||
break reducibleJoin32;
|
||||
}
|
||||
binding = env0_7;
|
||||
get = binding.get;
|
||||
value5 = Reflect.apply(get, binding, []);
|
||||
set = binding.set;
|
||||
Reflect.apply(set, binding, [a0]);
|
||||
if (value5 === a0) {
|
||||
break reducibleJoin32;
|
||||
}
|
||||
lastScrollEventSourceIdBinding = lastScrollEventSourceId;
|
||||
get = lastScrollEventSourceIdBinding.get;
|
||||
value6 = Reflect.apply(get, lastScrollEventSourceIdBinding, []);
|
||||
reducibleJoin6: while (true) {
|
||||
if (id === 'guilds') {
|
||||
break reducibleJoin6;
|
||||
}
|
||||
lastScrollEventSourceIdBinding = lastScrollEventSourceId;
|
||||
set = lastScrollEventSourceIdBinding.set;
|
||||
Reflect.apply(set, lastScrollEventSourceIdBinding, [id]);
|
||||
break reducibleJoin6;
|
||||
}
|
||||
if (id !== 'guilds') {
|
||||
if (id !== value6) {
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
if (a0 < 0) {
|
||||
if (value5 < 0) {
|
||||
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue4.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue4, [env0_6])();
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
if (a2 != null) {
|
||||
if (a1 != null) {
|
||||
if (a0 + a2 >= a1) {
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (a0 <= 0) {
|
||||
if (!env1_9) {
|
||||
if (!(value5 <= 0)) {
|
||||
Math = global.Math;
|
||||
value8 = Math.abs(value5 - a0);
|
||||
if (a0 > value5) {
|
||||
if (a0 > 0) {
|
||||
if (value5 > 0) {
|
||||
restingQuestDockModeBinding = restingQuestDockMode;
|
||||
get = restingQuestDockModeBinding.get;
|
||||
value9 = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
if (value9 === COLLAPSED) {
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue2.runOnJS;
|
||||
value = Reflect.apply(runOnJS, moduleValue2, [setRestingQuestDockMode]);
|
||||
CLOSED = QuestDockMode.CLOSED;
|
||||
value(CLOSED);
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
value10 = a0 < value5;
|
||||
reducibleJoin23: while (true) {
|
||||
if (value10) {
|
||||
restingQuestDockModeBinding = restingQuestDockMode;
|
||||
get = restingQuestDockModeBinding.get;
|
||||
value11 = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
CLOSED = QuestDockMode.CLOSED;
|
||||
value12 = value11 === CLOSED;
|
||||
r2 = value12;
|
||||
break reducibleJoin23;
|
||||
}
|
||||
r2 = value10;
|
||||
break reducibleJoin23;
|
||||
}
|
||||
reducibleJoin25: while (true) {
|
||||
if (r2) {
|
||||
value13 = value8 >= QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD;
|
||||
r2 = value13;
|
||||
break reducibleJoin25;
|
||||
}
|
||||
break reducibleJoin25;
|
||||
}
|
||||
if (r2) {
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue, [env0_5])();
|
||||
break reducibleJoin32;
|
||||
}
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
restingQuestDockModeBinding = restingQuestDockMode;
|
||||
get = restingQuestDockModeBinding.get;
|
||||
value7 = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
CLOSED = QuestDockMode.CLOSED;
|
||||
if (value7 === CLOSED) {
|
||||
binding = env1_9;
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue3.runOnJS;
|
||||
if (binding) {
|
||||
Reflect.apply(runOnJS, moduleValue3, [env0_5])();
|
||||
break reducibleJoin32;
|
||||
}
|
||||
value = Reflect.apply(runOnJS, moduleValue3, [setRestingQuestDockMode]);
|
||||
COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
value(COLLAPSED);
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
Math = global.Math;
|
||||
abs = Math.abs;
|
||||
value8 = Reflect.apply(abs, Math, [value5 - a0]);
|
||||
if (a0 > value5) {
|
||||
if (a0 > 0) {
|
||||
if (value5 > 0) {
|
||||
restingQuestDockModeBinding = restingQuestDockMode;
|
||||
get = restingQuestDockModeBinding.get;
|
||||
value9 = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
if (value9 === COLLAPSED) {
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue2.runOnJS;
|
||||
value = Reflect.apply(runOnJS, moduleValue2, [setRestingQuestDockMode]);
|
||||
CLOSED = QuestDockMode.CLOSED;
|
||||
value(CLOSED);
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
value10 = a0 < value5;
|
||||
reducibleJoin23: while (true) {
|
||||
if (value10) {
|
||||
restingQuestDockModeBinding = restingQuestDockMode;
|
||||
get = restingQuestDockModeBinding.get;
|
||||
value11 = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
CLOSED = QuestDockMode.CLOSED;
|
||||
value12 = value11 === CLOSED;
|
||||
r2 = value12;
|
||||
break reducibleJoin23;
|
||||
}
|
||||
r2 = value10;
|
||||
break reducibleJoin23;
|
||||
}
|
||||
reducibleJoin25: while (true) {
|
||||
if (r2) {
|
||||
value13 = value8 >= QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD;
|
||||
r2 = value13;
|
||||
break reducibleJoin25;
|
||||
}
|
||||
break reducibleJoin25;
|
||||
}
|
||||
if (r2) {
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue, [env0_5])();
|
||||
break reducibleJoin32;
|
||||
}
|
||||
break reducibleJoin32;
|
||||
}
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103199() { // fn#103199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4378, offset: 0x0225bcf9, size: 23 bytes, params: 1, frame: 11
|
||||
env1_8.set(true);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* Metro module 13573; source: modules/quests/native/QuestDock/QuestDockGestureContext.tsx; dependencies: [31, 13570, 6528, 13572, 7553, 33, 8142, 1478, 13574, 4017, 5176, 13571, 1585, 11534, 2] */
|
||||
function _fun103170(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:6, offset: 0x0225add6, size: 404 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
|
||||
const QuestDockMode = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_6 = questDockConstantsModule.QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
const env0_7 = questDockConstantsModule.QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
const env0_8 = (require(7553) /* metro dependency 7553: YouBarConstants */).useYouBarHorizontalMargin;
|
||||
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createContext = value.createContext;
|
||||
object2 = {};
|
||||
const reanimatedHelperTypesModule = require(8142) /* metro dependency 8142: ReanimatedHelperTypes */;
|
||||
let createFakeSharedValue = reanimatedHelperTypesModule.createFakeSharedValue;
|
||||
object2.questDockWrapperSpecs = Reflect.apply(createFakeSharedValue, reanimatedHelperTypesModule, [{'width': 0,
|
||||
'height': 0, 'x': 0, 'y': 0, 'prevDeltaY': 0}]);
|
||||
object2.windowDimensions = reanimatedHelperTypesModule.createFakeSharedValue({'width': 0, 'height': 0,
|
||||
'maxContentHeight': 0, 'landscape': false});
|
||||
const value5 = reanimatedHelperTypesModule;
|
||||
createFakeSharedValue = value5.createFakeSharedValue;
|
||||
const COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
object2.activeQuestDockMode = Reflect.apply(createFakeSharedValue, value5, [COLLAPSED]);
|
||||
object2.minExpandedContentHeight = reanimatedHelperTypesModule.createFakeSharedValue(0);
|
||||
const context = Reflect.apply(createContext, value, [object2]);
|
||||
value = value.memo(QuestDockGestureContextProviderInner);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockGestureContext.tsx');
|
||||
exports.QuestDockGestureContext = context;
|
||||
exports.QuestDockGestureContextProvider = value;
|
||||
}
|
||||
|
||||
function QuestDockGestureContextProviderInner(a0) { // fn#103171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:611, offset: 0x0225af6a, size: 650 bytes, params: 2, frame: 29
|
||||
var r10;
|
||||
var r8;
|
||||
var moduleValue6;
|
||||
var moduleValue7;
|
||||
let binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
const getWindowDimensions = (require(1478) /* metro dependency 1478: useWindowDimensionsNative */).getWindowDimensions;
|
||||
const value2 = Reflect.apply(useMemo, binding, [getWindowDimensions, []]);
|
||||
const value3 = (require(13574) /* metro dependency 13574: useTabsVisible */).useMainTabsHeight({'enabled': true,
|
||||
'ignoreQuestDock': true});
|
||||
const env0_1 = binding.useRef(value3);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useSharedValue = reanimatedRexportModule.useSharedValue;
|
||||
let width = value2.width;
|
||||
const value4 = Reflect.apply(useSharedValue, reanimatedRexportModule, [{width: width, height: value2.height,
|
||||
landscape: value2.width > value2.height, maxContentHeight: value2.height - value3}]);
|
||||
const value5 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockGestureContext');
|
||||
const value6 = useYouBarHorizontalMargin();
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
useSharedValue = moduleValue4.useSharedValue;
|
||||
const questDockUtilsModule = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
const getQuestDockCollapsedWidth = questDockUtilsModule.getQuestDockCollapsedWidth;
|
||||
width = value2.width;
|
||||
if (value5) {
|
||||
r10 = value6;
|
||||
} else {
|
||||
moduleValue6 = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
|
||||
r10 = moduleValue6.getSafeAreaInsets().left;
|
||||
}
|
||||
if (value5) {
|
||||
r8 = value6;
|
||||
} else {
|
||||
moduleValue7 = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
|
||||
r8 = moduleValue7.getSafeAreaInsets().right;
|
||||
}
|
||||
const QUEST_DOCK_COLLAPSED_HEIGHT2 = value5 ? -8 : QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
const value8 = Reflect.apply(useSharedValue, moduleValue4, [{width: Reflect.apply(getQuestDockCollapsedWidth,
|
||||
questDockUtilsModule, [width, r10, r8]), height: QUEST_DOCK_COLLAPSED_HEIGHT, x: 0,
|
||||
y: QUEST_DOCK_COLLAPSED_HEIGHT2, prevDeltaY: 0}]);
|
||||
var env0_3 = value8;
|
||||
const moduleValue8 = reanimatedRexportModule;
|
||||
useSharedValue = moduleValue8.useSharedValue;
|
||||
const moduleValue9 = questDockUtilsModule;
|
||||
const value9 = Reflect.apply(useSharedValue, moduleValue8,
|
||||
[moduleValue9.isSoftDismissed(QuestDockStore.questDockSoftDismissedAt) ? QuestDockMode.SOFT_DISMISSED : QuestDockMode.COLLAPSED]);
|
||||
const value10 = reanimatedRexportModule.useSharedValue(QUEST_DOCK_EXPANDED_HEIGHT);
|
||||
binding = env0_3;
|
||||
binding.useEffect(_fun103172, [value3]);
|
||||
binding.useEffect(_fun103173, [value4]);
|
||||
const value11 = binding.useMemo(_fun103175, [value4, value8, value9, value10]);
|
||||
const Provider = env0_10.Provider;
|
||||
return (
|
||||
<Provider value={value11}>
|
||||
{a0.children}
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun103173() { // fn#103173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1334, offset: 0x0225b1f4, size: 41 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(11534) /* metro dependency 11534: subscribeToWindowDimensionsNative */)(_fun103174);
|
||||
}
|
||||
|
||||
function _fun103175() { // fn#103175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1466, offset: 0x0225b264, size: 43 bytes, params: 1, frame: 3
|
||||
return {windowDimensions: env0_2, questDockWrapperSpecs: env0_3, activeQuestDockMode: env0_4,
|
||||
minExpandedContentHeight: env0_5};
|
||||
}
|
||||
|
||||
function _fun103174({width, height}) { // fn#103174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1348, offset: 0x0225b21d, size: 71 bytes, params: 2, frame: 15
|
||||
env1_2.set({width: width, height: height, landscape: width > height, maxContentHeight: height - env1_1.current});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,522 @@
|
||||
/* Metro module 13653; source: modules/quests/native/QuestDock/QuestDockGestureDetector.tsx; dependencies: [31, 6528, 13572, 7553, 33, 13573, 11281, 13576, 13650, 4017, 5321, 13571, 4081, 2] */
|
||||
function _fun104280(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:6, offset: 0x0228d9c6, size: 453 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const closure = useQuestDockSwipeGesture;
|
||||
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 */).QuestDockMode;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_5 = questDockConstantsModule.QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
const env0_6 = questDockConstantsModule.QUEST_DOCK_CLOSED_HEIGHT;
|
||||
const env0_7 = questDockConstantsModule.QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
|
||||
const env0_8 = questDockConstantsModule.QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM;
|
||||
const env0_9 = questDockConstantsModule.QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM;
|
||||
const env0_10 = questDockConstantsModule.QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT;
|
||||
const env0_11 = questDockConstantsModule.QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT;
|
||||
const env0_12 = questDockConstantsModule.QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY;
|
||||
const env0_13 = questDockConstantsModule.QUEST_DOCK_GESTURE_TOUCH_MOVE_COUNT_THRESHOLD;
|
||||
const env0_14 = questDockConstantsModule.QUEST_DOCK_GESTURE_COLLAPSED_Y_OFFSET_FACTOR;
|
||||
const env0_15 = questDockConstantsModule.QUEST_DOCK_GESTURE_CLOSED_Y_OFFSET_FACTOR;
|
||||
const env0_16 = questDockConstantsModule.QUEST_DOCK_GESTURE_EXPANDED_EXCESS_HEIGHT_FACTOR;
|
||||
const youBarConstantsModule = require(7553) /* metro dependency 7553: YouBarConstants */;
|
||||
const env0_17 = youBarConstantsModule.useYouBarHorizontalMargin;
|
||||
const env0_18 = youBarConstantsModule.useYouBarTotalHeight;
|
||||
const env0_19 = (require(33) /* metro dependency 33 */).jsx;
|
||||
object = {code: 'function QuestDockGestureDetectorTsx1(event){const{QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY,restingQuestDockMode,QuestDockMode,initialGestureOffset,QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT,runOnJS,setRestingQuestDockMode}=this.__closure;const{velocityY:velocityY,y:y}=event;const absoluteVelocityY=Math.abs(velocityY);const absoluteY=Math.abs(y);let resultingDockMode;if(absoluteVelocityY>QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY&&velocityY<0){if(restingQuestDockMode.get()===QuestDockMode.EXPANDED){resultingDockMode=QuestDockMode.RESET_TO_PREVIOUS;}else{resultingDockMode=QuestDockMode.EXPANDED;}}else if(absoluteVelocityY<QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY&&initialGestureOffset.get().isDrawer){if(restingQuestDockMode.get()===QuestDockMode.EXPANDED){resultingDockMode=QuestDockMode.RESET_TO_PREVIOUS;}else{resultingDockMode=QuestDockMode.EXPANDED;}}else if(restingQuestDockMode.get()===QuestDockMode.COLLAPSED&&(velocityY>QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY||y>QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT)){resultingDockMode=QuestDockMode.SOFT_DISMISSED;}else if(velocityY>QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY&&restingQuestDockMode.get()!==QuestDockMode.COLLAPSED){resultingDockMode=QuestDockMode.COLLAPSED;}else if(velocityY<0&&absoluteVelocityY>QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY&&restingQuestDockMode.get()===QuestDockMode.CLOSED){resultingDockMode=QuestDockMode.COLLAPSED;}else{if(restingQuestDockMode.get()===QuestDockMode.COLLAPSED||restingQuestDockMode.get()===QuestDockMode.CLOSED){resultingDockMode=QuestDockMode.RESET_TO_PREVIOUS;}else{resultingDockMode=QuestDockMode.COLLAPSED;}}if(restingQuestDockMode.get()===QuestDockMode.CLOSED&&resultingDockMode!==QuestDockMode.EXPANDED&&y<0&&absoluteY>QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT){resultingDockMode=QuestDockMode.COLLAPSED;}runOnJS(setRestingQuestDockMode)(resultingDockMode);}'};
|
||||
object = {code: 'function QuestDockGestureDetectorTsx2(event){const{initialGestureOffset,minExpandedContentHeight,activeQuestDockMode,QuestDockMode,QUEST_DOCK_GESTURE_EXPANDED_EXCESS_HEIGHT_FACTOR,QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT,questDockWrapperSpecs,youBarHeight,getQuestDockExpandedWidth,windowDimensions,safeArea,QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT,QUEST_DOCK_CLOSED_HEIGHT,QUEST_DOCK_GESTURE_CLOSED_Y_OFFSET_FACTOR,getQuestDockClosedWidth,QUEST_DOCK_COLLAPSED_HEIGHT,QUEST_DOCK_GESTURE_COLLAPSED_Y_OFFSET_FACTOR,questDockOffset,runOnJS,triggerHapticFeedback,HapticFeedbackTypes,QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED,getQuestDockCollapsedWidth,youBarHorizontalMargin}=this.__closure;const deltaY=event.absoluteY-initialGestureOffset.get().absoluteY;const expandedContentHeight=minExpandedContentHeight.get();let nextHeight=initialGestureOffset.get().height-deltaY;if(nextHeight>expandedContentHeight&&activeQuestDockMode.get()===QuestDockMode.EXPANDED){const overage=nextHeight-expandedContentHeight;const additionalHeight=overage*QUEST_DOCK_GESTURE_EXPANDED_EXCESS_HEIGHT_FACTOR;nextHeight=expandedContentHeight+additionalHeight;}const expandedModeTransitionHeight=minExpandedContentHeight.get()>0?Math.min(minExpandedContentHeight.get(),QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT):QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT;if(nextHeight>=expandedModeTransitionHeight){if(!initialGestureOffset.get().isDrawer){initialGestureOffset.set({...initialGestureOffset.get(),isDrawer:true});}questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:youBarHeight>0?youBarHeight:0,width:getQuestDockExpandedWidth(windowDimensions.get().width,safeArea.get().left,safeArea.get().right),height:Math.min(nextHeight,windowDimensions.get().height),prevDeltaY:deltaY});activeQuestDockMode.set(QuestDockMode.EXPANDED);}else if(nextHeight<QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT){if(activeQuestDockMode.get()===QuestDockMode.CLOSED){const progress=1-Math.min(nextHeight,0)/QUEST_DOCK_CLOSED_HEIGHT;const newChange=progress*(QUEST_DOCK_CLOSED_HEIGHT-nextHeight);const nextY=newChange*QUEST_DOCK_GESTURE_CLOSED_Y_OFFSET_FACTOR;const isDraggingDown=newChange>0;questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:isDraggingDown?nextY:0,width:getQuestDockClosedWidth(windowDimensions.get().width,safeArea.get().left,safeArea.get().right),height:isDraggingDown?QUEST_DOCK_CLOSED_HEIGHT:nextHeight,prevDeltaY:deltaY});activeQuestDockMode.set(QuestDockMode.CLOSED);}}else{const progress=nextHeight/QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT;const yOffset=(nextHeight-QUEST_DOCK_COLLAPSED_HEIGHT)*-1;const newChange=yOffset*(1-progress/QUEST_DOCK_GESTURE_COLLAPSED_Y_OFFSET_FACTOR);questDockOffset.set(youBarHeight>0?-Math.min(newChange,0):0);if(initialGestureOffset.get().isDrawer){initialGestureOffset.set({...initialGestureOffset.get(),isDrawer:false});}if(QUEST_DOCK_COLLAPSED_HEIGHT!==questDockWrapperSpecs.get().height&&activeQuestDockMode.get()!==QuestDockMode.EXPANDED){runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.IMPACT_MEDIUM);}questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED*-1+(youBarHeight>0?Math.min(newChange,0):newChange),width:getQuestDockCollapsedWidth(windowDimensions.get().width,youBarHeight>0?youBarHorizontalMargin:safeArea.get().left,youBarHeight>0?youBarHorizontalMargin:safeArea.get().right),height:QUEST_DOCK_COLLAPSED_HEIGHT,prevDeltaY:deltaY});activeQuestDockMode.set(QuestDockMode.COLLAPSED);}}'};
|
||||
object = {code: 'function QuestDockGestureDetectorTsx3(event){const{State,initialGestureOffset,touchMoveCount,QUEST_DOCK_GESTURE_TOUCH_MOVE_COUNT_THRESHOLD,restingQuestDockMode,QuestDockMode,QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM,QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM,questDockWrapperSpecs}=this.__closure;if(event.state!==State.BEGAN||initialGestureOffset.get().active){return;}touchMoveCount.set(touchMoveCount.get()+1);const isDragging=touchMoveCount.get()<=QUEST_DOCK_GESTURE_TOUCH_MOVE_COUNT_THRESHOLD;const{absoluteY:absoluteY,absoluteX:absoluteX}=event.changedTouches[0];const computed=initialGestureOffset.get().absoluteY-absoluteY;const computedAbsolute=Math.abs(computed);if(restingQuestDockMode.get()===QuestDockMode.EXPANDED&&isDragging&&computed>=0){return;}if(restingQuestDockMode.get()===QuestDockMode.COLLAPSED&&computed>QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM||restingQuestDockMode.get()===QuestDockMode.EXPANDED&&(computed<-QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM||computed>QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM)||restingQuestDockMode.get()===QuestDockMode.COLLAPSED&&computed<0&&computedAbsolute>QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM||restingQuestDockMode.get()===QuestDockMode.CLOSED&&computed>0&&computed>QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM||restingQuestDockMode.get()===QuestDockMode.CLOSED&&computed<0&&computedAbsolute>QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM){initialGestureOffset.set({absoluteX:absoluteX,absoluteY:absoluteY,x:questDockWrapperSpecs.get().x,y:questDockWrapperSpecs.get().y,height:questDockWrapperSpecs.get().height,isDrawer:restingQuestDockMode.get()===QuestDockMode.EXPANDED,active:true});}}'};
|
||||
object = {code: 'function QuestDockGestureDetectorTsx4(event){const{touchMoveCount,initialGestureOffset,questDockWrapperSpecs,restingQuestDockMode,QuestDockMode}=this.__closure;touchMoveCount.set(0);initialGestureOffset.set({absoluteX:event.changedTouches[0].absoluteX,absoluteY:event.changedTouches[0].absoluteY,x:questDockWrapperSpecs.get().x,y:questDockWrapperSpecs.get().y,height:questDockWrapperSpecs.get().height,isDrawer:restingQuestDockMode.get()===QuestDockMode.EXPANDED,active:false});}'};
|
||||
object = {code: 'function QuestDockGestureDetectorTsx5(){const{activeQuestDockMode,isVisibleSharedValue}=this.__closure;return{mode:activeQuestDockMode.get(),isVisible:isVisibleSharedValue.get()};}'};
|
||||
object = {code: 'function QuestDockGestureDetectorTsx6(current,previous){const{QuestDockMode,runOnJS,triggerHapticFeedback,HapticFeedbackTypes}=this.__closure;if(current.mode===(previous===null||previous===void 0?void 0:previous.mode)||current.mode===QuestDockMode.CLOSED||(previous===null||previous===void 0?void 0:previous.mode)===QuestDockMode.CLOSED||!current.isVisible){return;}runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.IMPACT_MEDIUM);}'};
|
||||
value = value.memo(QuestDockGestureDetector);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockGestureDetector.tsx');
|
||||
exports.default = value;
|
||||
exports.useQuestDockSwipeGesture = closure;
|
||||
}
|
||||
|
||||
function useQuestDockSwipeGesture() { // fn#104281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:9008, offset: 0x0228db8b, size: 651 bytes, params: 1, frame: 32
|
||||
var object2;
|
||||
let binding = env0_3;
|
||||
let useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {questDockWrapperSpecs, activeQuestDockMode, windowDimensions,
|
||||
minExpandedContentHeight} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
|
||||
var env0_3 = minExpandedContentHeight;
|
||||
const value3 = (importDefault(11281) /* metro dependency 11281: useSafeAreaInsetsSharedValueNative */)();
|
||||
binding = env0_3;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const {restingQuestDockMode, setRestingQuestDockMode, questDockOffset} = Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]);
|
||||
binding = env0_3;
|
||||
useContext = binding.useContext;
|
||||
const isVisibleToUser = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).isVisibleToUser;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useSharedValue = reanimatedRexportModule.useSharedValue;
|
||||
const value5 = restingQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
const value6 = Reflect.apply(useSharedValue, reanimatedRexportModule, [{'absoluteX': 0, 'absoluteY': 0, 'x': 0,
|
||||
'y': 0, 'height': 0, 'isDrawer': null, 'active': false, isDrawer: value5 === EXPANDED}]);
|
||||
const value7 = reanimatedRexportModule.useSharedValue(0);
|
||||
const value8 = reanimatedRexportModule.useSharedValue(isVisibleToUser);
|
||||
const value9 = useYouBarTotalHeight();
|
||||
const value10 = useYouBarHorizontalMargin();
|
||||
env0_3.useEffect(_fun104282, [isVisibleToUser, value8]);
|
||||
const value11 = env0_3.useMemo(_fun104283, [restingQuestDockMode, value6, value3, value7, windowDimensions,
|
||||
questDockWrapperSpecs, setRestingQuestDockMode, activeQuestDockMode, minExpandedContentHeight, value9, value10,
|
||||
questDockOffset]);
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
const useAnimatedReaction = moduleValue4.useAnimatedReaction;
|
||||
const closure = useQuestDockSwipeGestureW;
|
||||
closure.__closure = {activeQuestDockMode: activeQuestDockMode, isVisibleSharedValue: value8};
|
||||
closure.__workletHash = 13629688537260;
|
||||
closure.__initData = env0_24;
|
||||
const closure2 = useQuestDockSwipeGestureX;
|
||||
object2 = {};
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object2.triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
|
||||
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
|
||||
object2.HapticFeedbackTypes = HapticFeedbackTypes;
|
||||
closure2.__closure = object2;
|
||||
closure2.__workletHash = 17417080823410;
|
||||
closure2.__initData = env0_25;
|
||||
Reflect.apply(useAnimatedReaction, moduleValue4, [closure, closure2]);
|
||||
return value11;
|
||||
}
|
||||
|
||||
function QuestDockGestureDetector(a0) { // fn#104290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:14281, offset: 0x0228ec95, size: 70 bytes, params: 2, frame: 15
|
||||
const value2 = useQuestDockSwipeGesture();
|
||||
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
return (
|
||||
<GestureDetector gesture={value2}>
|
||||
{a0.children}
|
||||
</GestureDetector>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104282() { // fn#104282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:9572, offset: 0x0228de16, size: 25 bytes, params: 1, frame: 11
|
||||
const binding = env0_11;
|
||||
binding.set(isVisibleToUser);
|
||||
}
|
||||
|
||||
function _fun104283() { // fn#104283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:9616, offset: 0x0228de2f, size: 760 bytes, params: 1, frame: 24
|
||||
var object2;
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const shouldCancelWhenOutside2 = Gesture.Pan().manualActivation(false).maxPointers(1).shouldCancelWhenOutside(false);
|
||||
const onTouchesDown = shouldCancelWhenOutside2.onTouchesDown;
|
||||
let closure = k_104284;
|
||||
const binding = env0_10;
|
||||
const binding2 = env0_9;
|
||||
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
const restingQuestDockModeBinding = restingQuestDockMode;
|
||||
closure.__closure = {touchMoveCount: binding, initialGestureOffset: binding2,
|
||||
questDockWrapperSpecs: questDockWrapperSpecsBinding, restingQuestDockMode: restingQuestDockModeBinding,
|
||||
QuestDockMode: QuestDockMode};
|
||||
closure.__workletHash = 15649211210155;
|
||||
closure.__initData = env1_23;
|
||||
const value6 = Reflect.apply(onTouchesDown, shouldCancelWhenOutside2, [closure]);
|
||||
const onTouchesMove = value6.onTouchesMove;
|
||||
closure = h_104285;
|
||||
const State = (require(5321) /* metro dependency 5321 */).State;
|
||||
closure.__closure = {State: State, initialGestureOffset: binding2, touchMoveCount: binding,
|
||||
QUEST_DOCK_GESTURE_TOUCH_MOVE_COUNT_THRESHOLD: QUEST_DOCK_GESTURE_TOUCH_MOVE_COUNT_THRESHOLD,
|
||||
restingQuestDockMode: restingQuestDockModeBinding, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM: QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM,
|
||||
QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM: QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM,
|
||||
questDockWrapperSpecs: questDockWrapperSpecsBinding};
|
||||
closure.__workletHash = 16451041821957;
|
||||
closure.__initData = env1_22;
|
||||
const value7 = Reflect.apply(onTouchesMove, value6, [closure]);
|
||||
const onChange = value7.onChange;
|
||||
closure = o_104286;
|
||||
object2 = {initialGestureOffset: binding2};
|
||||
object2.minExpandedContentHeight = minExpandedContentHeight;
|
||||
object2.activeQuestDockMode = activeQuestDockMode;
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.QUEST_DOCK_GESTURE_EXPANDED_EXCESS_HEIGHT_FACTOR = QUEST_DOCK_GESTURE_EXPANDED_EXCESS_HEIGHT_FACTOR;
|
||||
object2.QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT = QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT;
|
||||
object2.questDockWrapperSpecs = questDockWrapperSpecsBinding;
|
||||
object2.youBarHeight = env0_12;
|
||||
const getQuestDockExpandedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockExpandedWidth;
|
||||
object2.getQuestDockExpandedWidth = getQuestDockExpandedWidth;
|
||||
object2.windowDimensions = windowDimensions;
|
||||
object2.safeArea = env0_4;
|
||||
object2.QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT = QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT;
|
||||
object2.QUEST_DOCK_CLOSED_HEIGHT = QUEST_DOCK_CLOSED_HEIGHT;
|
||||
object2.QUEST_DOCK_GESTURE_CLOSED_Y_OFFSET_FACTOR = QUEST_DOCK_GESTURE_CLOSED_Y_OFFSET_FACTOR;
|
||||
const getQuestDockClosedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockClosedWidth;
|
||||
object2.getQuestDockClosedWidth = getQuestDockClosedWidth;
|
||||
object2.QUEST_DOCK_COLLAPSED_HEIGHT = QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
object2.QUEST_DOCK_GESTURE_COLLAPSED_Y_OFFSET_FACTOR = QUEST_DOCK_GESTURE_COLLAPSED_Y_OFFSET_FACTOR;
|
||||
object2.questDockOffset = questDockOffset;
|
||||
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.runOnJS = runOnJS;
|
||||
object2.triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
|
||||
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
|
||||
object2.HapticFeedbackTypes = HapticFeedbackTypes;
|
||||
object2.QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED = QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
|
||||
const getQuestDockCollapsedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockCollapsedWidth;
|
||||
object2.getQuestDockCollapsedWidth = getQuestDockCollapsedWidth;
|
||||
object2.youBarHorizontalMargin = env0_13;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 3375221025411;
|
||||
closure.__initData = env1_21;
|
||||
const value8 = Reflect.apply(onChange, value7, [closure]);
|
||||
const onEnd = value8.onEnd;
|
||||
closure = t_104287;
|
||||
closure.__closure = {QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY: QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY,
|
||||
restingQuestDockMode: restingQuestDockModeBinding, QuestDockMode: QuestDockMode, initialGestureOffset: binding2,
|
||||
QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT: QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT,
|
||||
runOnJS: runOnJS, setRestingQuestDockMode: setRestingQuestDockMode};
|
||||
closure.__workletHash = 10107537449160;
|
||||
closure.__initData = env1_20;
|
||||
return Reflect.apply(onEnd, value8, [closure]);
|
||||
}
|
||||
|
||||
function useQuestDockSwipeGestureW() { // fn#104288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:13703, owner: useQuestDockSwipeGesture.W, offset: 0x0228ebb4, size: 42 bytes, params: 1, frame: 11
|
||||
const object2 = {};
|
||||
object2.mode = activeQuestDockMode.get();
|
||||
object2.isVisible = env0_11.get();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function useQuestDockSwipeGestureX(a0, a1) { // fn#104289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:13852, owner: useQuestDockSwipeGesture.X, offset: 0x0228ebde, size: 183 bytes, params: 3, frame: 15
|
||||
var value7;
|
||||
var moduleValue;
|
||||
const mode2 = a0.mode;
|
||||
const value = undefined;
|
||||
if (mode2 !== (a1 == null ? value : a1.mode) && a0.mode !== QuestDockMode.CLOSED && (a1 == null ? value : a1.mode) !== QuestDockMode.CLOSED && a0.isVisible) {
|
||||
value7 = environment.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS((require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback)((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_MEDIUM);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function k_104284(a0) { // fn#104284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:9732, offset: 0x0228e127, size: 184 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__;
|
||||
let binding = env1_10;
|
||||
let set = binding.set;
|
||||
Reflect.apply(set, binding, [0]);
|
||||
binding = env1_9;
|
||||
set = binding.set;
|
||||
const object2 = {};
|
||||
object2.absoluteX = a0.changedTouches[0].absoluteX;
|
||||
object2.absoluteY = a0.changedTouches[0].absoluteY;
|
||||
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
let get = questDockWrapperSpecsBinding.get;
|
||||
object2.x = Reflect.apply(get, questDockWrapperSpecsBinding, []).x;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.y = Reflect.apply(get, questDockWrapperSpecsBinding, []).y;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.height = Reflect.apply(get, questDockWrapperSpecsBinding, []).height;
|
||||
value = restingQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.isDrawer = value === EXPANDED;
|
||||
object2.active = false;
|
||||
Reflect.apply(set, binding, [object2]);
|
||||
}
|
||||
|
||||
function h_104285(a0) { // fn#104285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:10112, offset: 0x0228e1df, size: 622 bytes, params: 2, frame: 20
|
||||
var r1;
|
||||
var r2;
|
||||
var value2;
|
||||
var binding;
|
||||
var get;
|
||||
var set;
|
||||
var value5;
|
||||
var property;
|
||||
var absoluteY;
|
||||
var absoluteX;
|
||||
var value6;
|
||||
var value7;
|
||||
var object2;
|
||||
var questDockWrapperSpecsBinding;
|
||||
const state = a0.state;
|
||||
const State = (require(5321) /* metro dependency 5321 */).State;
|
||||
const BEGAN = State.BEGAN;
|
||||
if (state === BEGAN) {
|
||||
value2 = environment.__proto__;
|
||||
binding = env1_9;
|
||||
get = binding.get;
|
||||
if (!Reflect.apply(get, binding, []).active) {
|
||||
binding = env1_10;
|
||||
binding.set(binding.get() + 1);
|
||||
value5 = binding.get() <= QUEST_DOCK_GESTURE_TOUCH_MOVE_COUNT_THRESHOLD;
|
||||
property = a0.changedTouches[0];
|
||||
absoluteY = property.absoluteY;
|
||||
absoluteX = property.absoluteX;
|
||||
binding = env1_9;
|
||||
get = binding.get;
|
||||
value6 = Reflect.apply(get, binding, []).absoluteY - absoluteY;
|
||||
value7 = global.Math.abs(value6);
|
||||
r1 = restingQuestDockMode.get() === QuestDockMode.EXPANDED && value5;
|
||||
r1 = r1 && value6 >= 0;
|
||||
if (!r1) {
|
||||
r1 = restingQuestDockMode.get() === QuestDockMode.COLLAPSED && value6 > QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM;
|
||||
r1 = !r1 ? restingQuestDockMode.get() === QuestDockMode.EXPANDED && (value6 < -QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM || value6 > QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM) : r1;
|
||||
if (!r1) {
|
||||
r2 = restingQuestDockMode.get() === QuestDockMode.COLLAPSED && value6 < 0;
|
||||
r2 = r2 && value7 > QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM;
|
||||
r1 = r2;
|
||||
}
|
||||
if (!r1) {
|
||||
r2 = restingQuestDockMode.get() === QuestDockMode.CLOSED && value6 > 0;
|
||||
r2 = r2 && value6 > QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM;
|
||||
r1 = r2;
|
||||
}
|
||||
if (!r1) {
|
||||
r2 = restingQuestDockMode.get() === QuestDockMode.CLOSED && value6 < 0;
|
||||
r2 = r2 && value7 > QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM;
|
||||
r1 = r2;
|
||||
}
|
||||
if (r1) {
|
||||
binding = env1_9;
|
||||
set = binding.set;
|
||||
object2 = {absoluteX: absoluteX, absoluteY: absoluteY};
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.x = Reflect.apply(get, questDockWrapperSpecsBinding, []).x;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.y = Reflect.apply(get, questDockWrapperSpecsBinding, []).y;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.height = Reflect.apply(get, questDockWrapperSpecsBinding, []).height;
|
||||
object2.isDrawer = restingQuestDockMode.get() === QuestDockMode.EXPANDED;
|
||||
object2.active = true;
|
||||
Reflect.apply(set, binding, [object2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function o_104286({absoluteY}) { // fn#104286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:10948, offset: 0x0228e44d, size: 1381 bytes, params: 2, frame: 25
|
||||
var r3;
|
||||
var r0;
|
||||
var r2;
|
||||
var r7;
|
||||
var r8;
|
||||
var value6;
|
||||
var value7;
|
||||
var value14;
|
||||
var Math;
|
||||
var min;
|
||||
var value15;
|
||||
var value16;
|
||||
var value18;
|
||||
var value21;
|
||||
var questDockOffsetBinding;
|
||||
var set;
|
||||
var object2;
|
||||
var questDockWrapperSpecsBinding;
|
||||
var moduleValue;
|
||||
var value27;
|
||||
var moduleValue2;
|
||||
var getQuestDockCollapsedWidth;
|
||||
var windowDimensionsBinding;
|
||||
var width;
|
||||
var left;
|
||||
var value33;
|
||||
var value34;
|
||||
var moduleValue3;
|
||||
var getQuestDockClosedWidth;
|
||||
var value37;
|
||||
var moduleValue4;
|
||||
var getQuestDockExpandedWidth;
|
||||
let binding = env1_9;
|
||||
let get = binding.get;
|
||||
const value2 = absoluteY - Reflect.apply(get, binding, []).absoluteY;
|
||||
const value3 = minExpandedContentHeight.get();
|
||||
get = binding.get;
|
||||
const value4 = Reflect.apply(get, binding, []).height - value2;
|
||||
const value5 = value4 > value3;
|
||||
if (value5) {
|
||||
value6 = activeQuestDockMode.get();
|
||||
value7 = environment.__proto__.__proto__;
|
||||
r3 = value6 === QuestDockMode.EXPANDED;
|
||||
} else {
|
||||
r3 = value5;
|
||||
}
|
||||
const r9 = r3 ? value3 + (value4 - value3) * QUEST_DOCK_GESTURE_EXPANDED_EXCESS_HEIGHT_FACTOR : value4;
|
||||
if (minExpandedContentHeight.get() > 0) {
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
value15 = minExpandedContentHeight.get();
|
||||
value16 = environment.__proto__.__proto__;
|
||||
r0 = Reflect.apply(min, Math, [value15, QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT]);
|
||||
} else {
|
||||
value14 = environment.__proto__.__proto__;
|
||||
r0 = QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT;
|
||||
}
|
||||
if (r9 >= r0) {
|
||||
binding = env1_9;
|
||||
get = binding.get;
|
||||
if (!Reflect.apply(get, binding, []).isDrawer) {
|
||||
binding = env1_9;
|
||||
set = binding.set;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, binding.get(), undefined);
|
||||
object2['isDrawer'] = true;
|
||||
Reflect.apply(set, binding, [object2]);
|
||||
}
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
set = questDockWrapperSpecsBinding.set;
|
||||
object2 = {};
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
copyDataProperties(object2, Reflect.apply(get, questDockWrapperSpecsBinding, []), undefined);
|
||||
object2['x'] = 0;
|
||||
object2['y'] = env1_12 > 0 ? env1_12 : 0;
|
||||
value37 = environment.__proto__.__proto__;
|
||||
moduleValue4 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
getQuestDockExpandedWidth = moduleValue4.getQuestDockExpandedWidth;
|
||||
windowDimensionsBinding = windowDimensions;
|
||||
get = windowDimensionsBinding.get;
|
||||
width = Reflect.apply(get, windowDimensionsBinding, []).width;
|
||||
binding = env1_4;
|
||||
get = binding.get;
|
||||
left = Reflect.apply(get, binding, []).left;
|
||||
get = binding.get;
|
||||
object2['width'] = Reflect.apply(getQuestDockExpandedWidth, moduleValue4, [width, left, Reflect.apply(get,
|
||||
binding,
|
||||
[]).right]);
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
get = windowDimensionsBinding.get;
|
||||
object2['height'] = Reflect.apply(min, Math, [r9, Reflect.apply(get, windowDimensionsBinding, []).height]);
|
||||
object2['prevDeltaY'] = value2;
|
||||
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
|
||||
activeQuestDockMode.set(QuestDockMode.EXPANDED);
|
||||
} else {
|
||||
value18 = environment.__proto__.__proto__;
|
||||
if (r9 < QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT) {
|
||||
if (activeQuestDockMode.get() === QuestDockMode.CLOSED) {
|
||||
value33 = (1 - global.Math.min(r9, 0) / QUEST_DOCK_CLOSED_HEIGHT) * (QUEST_DOCK_CLOSED_HEIGHT - r9);
|
||||
value34 = value33 > 0;
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
set = questDockWrapperSpecsBinding.set;
|
||||
object2 = {};
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
copyDataProperties(object2, Reflect.apply(get, questDockWrapperSpecsBinding, []), undefined);
|
||||
object2['x'] = 0;
|
||||
object2['y'] = value34 ? value33 * QUEST_DOCK_GESTURE_CLOSED_Y_OFFSET_FACTOR : 0;
|
||||
moduleValue3 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
getQuestDockClosedWidth = moduleValue3.getQuestDockClosedWidth;
|
||||
windowDimensionsBinding = windowDimensions;
|
||||
get = windowDimensionsBinding.get;
|
||||
width = Reflect.apply(get, windowDimensionsBinding, []).width;
|
||||
binding = env1_4;
|
||||
get = binding.get;
|
||||
left = Reflect.apply(get, binding, []).left;
|
||||
get = binding.get;
|
||||
object2['width'] = Reflect.apply(getQuestDockClosedWidth, moduleValue3, [width, left, Reflect.apply(get,
|
||||
binding,
|
||||
[]).right]);
|
||||
object2['height'] = value34 ? QUEST_DOCK_CLOSED_HEIGHT : r9;
|
||||
object2['prevDeltaY'] = value2;
|
||||
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
|
||||
activeQuestDockMode.set(QuestDockMode.CLOSED);
|
||||
}
|
||||
} else {
|
||||
value21 = -1 * (r9 - QUEST_DOCK_COLLAPSED_HEIGHT) * (1 - r9 / QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT / QUEST_DOCK_GESTURE_COLLAPSED_Y_OFFSET_FACTOR);
|
||||
questDockOffsetBinding = questDockOffset;
|
||||
set = questDockOffsetBinding.set;
|
||||
r2 = env1_12 > 0 ? -global.Math.min(value21, 0) : 0;
|
||||
Reflect.apply(set, questDockOffsetBinding, [r2]);
|
||||
binding = env1_9;
|
||||
get = binding.get;
|
||||
if (Reflect.apply(get, binding, []).isDrawer) {
|
||||
binding = env1_9;
|
||||
set = binding.set;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, binding.get(), undefined);
|
||||
object2['isDrawer'] = false;
|
||||
Reflect.apply(set, binding, [object2]);
|
||||
}
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
r2 = QUEST_DOCK_COLLAPSED_HEIGHT !== Reflect.apply(get, questDockWrapperSpecsBinding,
|
||||
[]).height && activeQuestDockMode.get() !== QuestDockMode.EXPANDED;
|
||||
if (r2) {
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS((require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback)((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_MEDIUM);
|
||||
}
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
set = questDockWrapperSpecsBinding.set;
|
||||
object2 = {};
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
copyDataProperties(object2, Reflect.apply(get, questDockWrapperSpecsBinding, []), undefined);
|
||||
object2['x'] = 0;
|
||||
value27 = -1 * QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
|
||||
r7 = env1_12 > 0 ? global.Math.min(value21, 0) : value21;
|
||||
object2['y'] = value27 + r7;
|
||||
moduleValue2 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
getQuestDockCollapsedWidth = moduleValue2.getQuestDockCollapsedWidth;
|
||||
windowDimensionsBinding = windowDimensions;
|
||||
get = windowDimensionsBinding.get;
|
||||
width = Reflect.apply(get, windowDimensionsBinding, []).width;
|
||||
r8 = env1_12 > 0 ? env1_13 : env1_4.get().left;
|
||||
r7 = env1_12 > 0 ? env1_13 : env1_4.get().right;
|
||||
object2['width'] = Reflect.apply(getQuestDockCollapsedWidth, moduleValue2, [width, r8, r7]);
|
||||
object2['height'] = QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
object2['prevDeltaY'] = value2;
|
||||
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
|
||||
activeQuestDockMode.set(QuestDockMode.COLLAPSED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function t_104287({velocityY, y}) { // fn#104287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:12921, offset: 0x0228e9b2, size: 514 bytes, params: 2, frame: 16
|
||||
var r2;
|
||||
var value4;
|
||||
var binding;
|
||||
var value5;
|
||||
let Math = global.Math;
|
||||
let value = Math.abs(velocityY);
|
||||
Math = global.Math;
|
||||
const value2 = Math.abs(y);
|
||||
if (value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY) {
|
||||
if (velocityY < 0) {
|
||||
value = environment.__proto__;
|
||||
value = restingQuestDockMode.get();
|
||||
r2 = value === QuestDockMode.EXPANDED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.EXPANDED;
|
||||
} else if (value < QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY) {
|
||||
value4 = environment.__proto__;
|
||||
binding = env1_9;
|
||||
if (binding.get().isDrawer) {
|
||||
value = environment.__proto__;
|
||||
value = restingQuestDockMode.get();
|
||||
r2 = value === QuestDockMode.EXPANDED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.EXPANDED;
|
||||
} else {
|
||||
value5 = environment.__proto__;
|
||||
r2 = restingQuestDockMode.get() !== QuestDockMode.COLLAPSED ? velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY || y > QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT ? QuestDockMode.SOFT_DISMISSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED;
|
||||
}
|
||||
} else {
|
||||
value5 = environment.__proto__;
|
||||
r2 = restingQuestDockMode.get() !== QuestDockMode.COLLAPSED ? velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY || y > QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT ? QuestDockMode.SOFT_DISMISSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED;
|
||||
}
|
||||
} else if (value < QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY) {
|
||||
value4 = environment.__proto__;
|
||||
binding = env1_9;
|
||||
if (binding.get().isDrawer) {
|
||||
value = environment.__proto__;
|
||||
value = restingQuestDockMode.get();
|
||||
r2 = value === QuestDockMode.EXPANDED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.EXPANDED;
|
||||
} else {
|
||||
value5 = environment.__proto__;
|
||||
r2 = restingQuestDockMode.get() !== QuestDockMode.COLLAPSED ? velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY || y > QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT ? QuestDockMode.SOFT_DISMISSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED;
|
||||
}
|
||||
} else {
|
||||
value5 = environment.__proto__;
|
||||
r2 = restingQuestDockMode.get() !== QuestDockMode.COLLAPSED ? velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY || y > QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT ? QuestDockMode.SOFT_DISMISSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
const value8 = restingQuestDockMode.get();
|
||||
const CLOSED = QuestDockMode.CLOSED;
|
||||
r2 = value8 === CLOSED && r2 !== QuestDockMode.EXPANDED && y < 0 && value2 > QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT ? QuestDockMode.COLLAPSED : r2;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
reanimatedRexportModule.runOnJS(setRestingQuestDockMode)(r2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,351 @@
|
||||
/* Metro module 13569; source: modules/quests/native/QuestDock/QuestDockHooks.tsx; dependencies: [57, 31, 13570, 6528, 13572, 7553, 13573, 13576, 11281, 5176, 4017, 7739, 13571, 566, 672, 9949, 9513, 9519, 9517, 9518, 7121, 7120, 6531, 4080, 13577, 1962, 2] */
|
||||
function _fun103128(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6, offset: 0x02259705, size: 390 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
|
||||
const env0_6 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
let value = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_7 = value.QUEST_DOCK_CLOSED_HEIGHT;
|
||||
const env0_8 = value.QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
const env0_9 = value.QUEST_DOCK_EXTERNAL_OFFSET_CLOSED;
|
||||
const env0_10 = value.QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED;
|
||||
const env0_11 = value.QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED_WITH_YOU_BAR;
|
||||
const env0_12 = value.QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED;
|
||||
const env0_13 = value.QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED_WITH_YOU_BAR;
|
||||
const env0_14 = value.QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED;
|
||||
const env0_15 = value.QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED;
|
||||
const env0_16 = value.QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
|
||||
value = require(7553) /* metro dependency 7553: YouBarConstants */;
|
||||
const env0_17 = value.useYouBarHorizontalMargin;
|
||||
const env0_18 = value.useYouBarTotalHeight;
|
||||
object = {code: 'function QuestDockHooksTsx1(){const{restingQuestDockMode,minExpandedContentHeight,windowDimensions,safeArea}=this.__closure;return{restingQuestDockMode:restingQuestDockMode.get(),minExpandedContentHeight:minExpandedContentHeight.get(),windowWidth:windowDimensions.get().width,windowHeight:windowDimensions.get().height,safeArea:safeArea.get()};}'};
|
||||
object = {code: 'function QuestDockHooksTsx2(props,previous){const{cheapWorkletShallowEqual,QuestDockMode,runOnJS,setRestingQuestDockMode,questDockWrapperSpecs,youBarEnabled,QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED,getQuestDockCollapsedWidth,youBarHorizontalMargin,QUEST_DOCK_COLLAPSED_HEIGHT,activeQuestDockMode,QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED,getQuestDockClosedWidth,QUEST_DOCK_CLOSED_HEIGHT,getQuestDockExpandedHeightLimits,youBarHeight,QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED,getQuestDockExpandedWidth}=this.__closure;var _previous$restingQues;if(cheapWorkletShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const{restingQuestDockMode:restingQuestDockMode,minExpandedContentHeight:minExpandedContentHeight,windowWidth:windowWidth,windowHeight:windowHeight,safeArea:safeArea}=props;switch(restingQuestDockMode){case QuestDockMode.RESET_TO_PREVIOUS:runOnJS(setRestingQuestDockMode)((_previous$restingQues=previous===null||previous===void 0?void 0:previous.restingQuestDockMode)!==null&&_previous$restingQues!==void 0?_previous$restingQues:QuestDockMode.COLLAPSED);return;case QuestDockMode.COLLAPSED:questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:youBarEnabled?0:QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED*-1,width:getQuestDockCollapsedWidth(windowWidth,youBarEnabled?youBarHorizontalMargin:safeArea.left,youBarEnabled?youBarHorizontalMargin:safeArea.right),height:QUEST_DOCK_COLLAPSED_HEIGHT});activeQuestDockMode.set(QuestDockMode.COLLAPSED);break;case QuestDockMode.CLOSED:case QuestDockMode.SOFT_DISMISSED:questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:youBarEnabled?0:QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED*-1,width:getQuestDockClosedWidth(windowWidth,youBarEnabled?youBarHorizontalMargin:safeArea.left,youBarEnabled?youBarHorizontalMargin:safeArea.right),height:QUEST_DOCK_CLOSED_HEIGHT});activeQuestDockMode.set(restingQuestDockMode);break;case QuestDockMode.EXPANDED:const minContentHeight=minExpandedContentHeight;const{minHeight:minHeight,maxHeight:maxHeight}=getQuestDockExpandedHeightLimits(windowHeight,safeArea.top,minContentHeight);const heightMidpoint=(maxHeight+minHeight)/2;let height;if(questDockWrapperSpecs.get().height<=QUEST_DOCK_COLLAPSED_HEIGHT){height=maxHeight;}else if(previous!=null&&questDockWrapperSpecs.get().height===getQuestDockExpandedHeightLimits(previous.windowHeight,previous.safeArea.top,minContentHeight).maxHeight){height=maxHeight;}else if(questDockWrapperSpecs.get().height>=heightMidpoint){height=maxHeight;}else{height=maxHeight;}questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:youBarHeight>0?youBarHeight:QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED,width:getQuestDockExpandedWidth(windowWidth,safeArea.left,safeArea.right),height:height});activeQuestDockMode.set(QuestDockMode.EXPANDED);break;}}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockHooks.tsx');
|
||||
exports.useQuestDockModeAnimatedReaction = useQuestDockModeAnimatedReaction;
|
||||
exports.useQuestDockExternalOffset = useQuestDockExternalOffset;
|
||||
exports.useQuestDockDismissalReset = useQuestDockDismissalReset;
|
||||
exports.useActionSheetPressHandler = useActionSheetPressHandler;
|
||||
}
|
||||
|
||||
function useQuestDockModeAnimatedReaction() { // fn#103129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:3948, offset: 0x0225988b, size: 554 bytes, params: 1, frame: 29
|
||||
var object2;
|
||||
const binding = env0_4;
|
||||
let useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {questDockWrapperSpecs, windowDimensions, activeQuestDockMode,
|
||||
minExpandedContentHeight} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
|
||||
useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const {restingQuestDockMode, setRestingQuestDockMode} = Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]);
|
||||
const value4 = (importDefault(11281) /* metro dependency 11281: useSafeAreaInsetsSharedValueNative */)();
|
||||
const value5 = useYouBarHorizontalMargin();
|
||||
const value6 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDock');
|
||||
const value7 = useYouBarTotalHeight();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
const closure = useQuestDockModeAnimatedReactionO;
|
||||
closure.__closure = {restingQuestDockMode: restingQuestDockMode, minExpandedContentHeight: minExpandedContentHeight,
|
||||
windowDimensions: windowDimensions, safeArea: value4};
|
||||
closure.__workletHash = 9502251090521;
|
||||
closure.__initData = env0_19;
|
||||
const closure2 = useQuestDockModeAnimatedReactionT;
|
||||
object2 = {};
|
||||
object2.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object2.setRestingQuestDockMode = setRestingQuestDockMode;
|
||||
object2.questDockWrapperSpecs = questDockWrapperSpecs;
|
||||
object2.youBarEnabled = value6;
|
||||
object2.QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED = QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED;
|
||||
const getQuestDockCollapsedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockCollapsedWidth;
|
||||
object2.getQuestDockCollapsedWidth = getQuestDockCollapsedWidth;
|
||||
object2.youBarHorizontalMargin = value5;
|
||||
object2.QUEST_DOCK_COLLAPSED_HEIGHT = QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
object2.activeQuestDockMode = activeQuestDockMode;
|
||||
object2.QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED = QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED;
|
||||
const getQuestDockClosedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockClosedWidth;
|
||||
object2.getQuestDockClosedWidth = getQuestDockClosedWidth;
|
||||
object2.QUEST_DOCK_CLOSED_HEIGHT = QUEST_DOCK_CLOSED_HEIGHT;
|
||||
const getQuestDockExpandedHeightLimits = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockExpandedHeightLimits;
|
||||
object2.getQuestDockExpandedHeightLimits = getQuestDockExpandedHeightLimits;
|
||||
object2.youBarHeight = value7;
|
||||
object2.QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED = QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
|
||||
const getQuestDockExpandedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockExpandedWidth;
|
||||
object2.getQuestDockExpandedWidth = getQuestDockExpandedWidth;
|
||||
closure2.__closure = object2;
|
||||
closure2.__workletHash = 9030555854984;
|
||||
closure2.__initData = env0_20;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
}
|
||||
|
||||
function useQuestDockExternalOffset() { // fn#103132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6415, offset: 0x02259eef, size: 165 bytes, params: 1, frame: 18
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
|
||||
const value3 = env0_3(Reflect.apply(useStateFromStoresArray, fluxModule, [[QuestDockStore], function() {
|
||||
return [QuestDockStore.prevRestingQuestDockMode, QuestDockStore.isEligibleToBeVisible];
|
||||
}]), 2);
|
||||
return env0_4.useMemo(_fun103134, [value3[1], value3[0],
|
||||
(require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDock')]);
|
||||
}
|
||||
|
||||
function useQuestDockDismissalReset() { // fn#103135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6830, offset: 0x0225a032, size: 129 bytes, params: 1, frame: 17
|
||||
const binding = env0_4;
|
||||
let useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const setRestingQuestDockMode = Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]).setRestingQuestDockMode;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
binding.useEffect(function() {
|
||||
var closure = _fun103137;
|
||||
closure();
|
||||
var setInterval = global.setInterval;
|
||||
var MINUTE = importDefault(dependencyMap[14]).Millis.MINUTE;
|
||||
var env0_0 = setInterval(closure, 5 * MINUTE);
|
||||
return _fun103138;
|
||||
}, [setRestingQuestDockMode, Reflect.apply(useContext, binding, [QuestDockGestureContext]).activeQuestDockMode]);
|
||||
}
|
||||
|
||||
function useActionSheetPressHandler(a0) { // fn#103139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:7337, offset: 0x0225a172, size: 114 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
return env0_4.useCallback(_fun103140, [a0,
|
||||
(require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression(),
|
||||
(require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId()]);
|
||||
}
|
||||
|
||||
function useQuestDockModeAnimatedReactionO() { // fn#103130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:4359, owner: useQuestDockModeAnimatedReaction.o, offset: 0x02259ab5, size: 103 bytes, params: 1, frame: 11
|
||||
const object2 = {};
|
||||
const restingQuestDockModeBinding = restingQuestDockMode;
|
||||
let get = restingQuestDockModeBinding.get;
|
||||
object2.restingQuestDockMode = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
object2.minExpandedContentHeight = minExpandedContentHeight.get();
|
||||
const windowDimensionsBinding = windowDimensions;
|
||||
get = windowDimensionsBinding.get;
|
||||
object2.windowWidth = Reflect.apply(get, windowDimensionsBinding, []).width;
|
||||
get = windowDimensionsBinding.get;
|
||||
object2.windowHeight = Reflect.apply(get, windowDimensionsBinding, []).height;
|
||||
object2.safeArea = env0_6.get();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function useQuestDockModeAnimatedReactionT(a0, a1) { // fn#103131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:4645, owner: useQuestDockModeAnimatedReaction.t, offset: 0x02259b1c, size: 979 bytes, params: 3, frame: 28
|
||||
var r7;
|
||||
var r11;
|
||||
var moduleValue2;
|
||||
var value4;
|
||||
var maxHeight;
|
||||
var questDockWrapperSpecsBinding;
|
||||
var get;
|
||||
var height;
|
||||
var value6;
|
||||
var value7;
|
||||
var moduleValue3;
|
||||
var set;
|
||||
var object2;
|
||||
var value8;
|
||||
var moduleValue4;
|
||||
var getQuestDockClosedWidth;
|
||||
var value11;
|
||||
var moduleValue5;
|
||||
var moduleValue6;
|
||||
let value = a1;
|
||||
const value3 = undefined;
|
||||
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
||||
const cheapWorkletShallowEqual = cheapWorkletShallowEqualModule.cheapWorkletShallowEqual;
|
||||
let r2 = value ?? value3;
|
||||
if (!Reflect.apply(cheapWorkletShallowEqual, cheapWorkletShallowEqualModule, [a0, r2])) {
|
||||
var restingQuestDockMode = a0.restingQuestDockMode;
|
||||
var minExpandedContentHeight = a0.minExpandedContentHeight;
|
||||
var windowWidth = a0.windowWidth;
|
||||
var windowHeight = a0.windowHeight;
|
||||
var safeArea = a0.safeArea;
|
||||
var RESET_TO_PREVIOUS = QuestDockMode.RESET_TO_PREVIOUS;
|
||||
if (RESET_TO_PREVIOUS === restingQuestDockMode) {
|
||||
moduleValue6 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue6.runOnJS(setRestingQuestDockMode)((value == null ? value3 : value.restingQuestDockMode) ?? QuestDockMode.COLLAPSED);
|
||||
return value3;
|
||||
}
|
||||
var COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
if (COLLAPSED === restingQuestDockMode) {
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
set = questDockWrapperSpecsBinding.set;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, questDockWrapperSpecsBinding.get(), undefined);
|
||||
value11 = 0;
|
||||
object2['x'] = value11;
|
||||
object2['y'] = env0_8 ? value11 : -1 * QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED;
|
||||
moduleValue5 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
object2['width'] = moduleValue5.getQuestDockCollapsedWidth(windowWidth, env0_8 ? env0_7 : safeArea.left,
|
||||
env0_8 ? env0_7 : safeArea.right);
|
||||
object2['height'] = QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
|
||||
activeQuestDockMode.set(QuestDockMode.COLLAPSED);
|
||||
} else if (QuestDockMode.CLOSED === restingQuestDockMode) {
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
set = questDockWrapperSpecsBinding.set;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, questDockWrapperSpecsBinding.get(), undefined);
|
||||
value8 = 0;
|
||||
object2['x'] = value8;
|
||||
r11 = env0_8 ? value8 : -1 * QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED;
|
||||
object2['y'] = r11;
|
||||
moduleValue4 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
getQuestDockClosedWidth = moduleValue4.getQuestDockClosedWidth;
|
||||
r11 = env0_8 ? env0_7 : safeArea.left;
|
||||
object2['width'] = Reflect.apply(getQuestDockClosedWidth, moduleValue4, [windowWidth, r11,
|
||||
env0_8 ? env0_7 : safeArea.right]);
|
||||
object2['height'] = QUEST_DOCK_CLOSED_HEIGHT;
|
||||
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
|
||||
activeQuestDockMode.set(restingQuestDockMode);
|
||||
} else if (QuestDockMode.SOFT_DISMISSED === restingQuestDockMode) {
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
set = questDockWrapperSpecsBinding.set;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, questDockWrapperSpecsBinding.get(), undefined);
|
||||
value8 = 0;
|
||||
object2['x'] = value8;
|
||||
r11 = env0_8 ? value8 : -1 * QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED;
|
||||
object2['y'] = r11;
|
||||
moduleValue4 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
getQuestDockClosedWidth = moduleValue4.getQuestDockClosedWidth;
|
||||
r11 = env0_8 ? env0_7 : safeArea.left;
|
||||
object2['width'] = Reflect.apply(getQuestDockClosedWidth, moduleValue4, [windowWidth, r11,
|
||||
env0_8 ? env0_7 : safeArea.right]);
|
||||
object2['height'] = QUEST_DOCK_CLOSED_HEIGHT;
|
||||
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
|
||||
activeQuestDockMode.set(restingQuestDockMode);
|
||||
} else if (QuestDockMode.EXPANDED === restingQuestDockMode) {
|
||||
moduleValue2 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
value4 = moduleValue2.getQuestDockExpandedHeightLimits(windowHeight, safeArea.top,
|
||||
minExpandedContentHeight);
|
||||
value4.minHeight;
|
||||
maxHeight = value4.maxHeight;
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
height = Reflect.apply(get, questDockWrapperSpecsBinding, []).height;
|
||||
value6 = height <= QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
if (value6) {
|
||||
r2 = value6;
|
||||
} else {
|
||||
value7 = value != null;
|
||||
if (value7) {
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
height = questDockWrapperSpecsBinding.get().height;
|
||||
moduleValue3 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
value = height === moduleValue3.getQuestDockExpandedHeightLimits(value.windowHeight,
|
||||
value.safeArea.top,
|
||||
minExpandedContentHeight).maxHeight;
|
||||
r7 = value;
|
||||
} else {
|
||||
r7 = value7;
|
||||
}
|
||||
r2 = r7;
|
||||
}
|
||||
if (!r2) {
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
questDockWrapperSpecsBinding.get().height;
|
||||
}
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
set = questDockWrapperSpecsBinding.set;
|
||||
object2 = {};
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
copyDataProperties(object2, Reflect.apply(get, questDockWrapperSpecsBinding, []), undefined);
|
||||
object2['x'] = 0;
|
||||
object2['y'] = env0_9 > 0 ? env0_9 : QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
|
||||
value = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
value = value.getQuestDockExpandedWidth(windowWidth, safeArea.left, safeArea.right);
|
||||
object2['width'] = value;
|
||||
object2['height'] = maxHeight;
|
||||
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
|
||||
activeQuestDockMode.set(QuestDockMode.EXPANDED);
|
||||
}
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _fun103134() { // fn#103134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6637, offset: 0x02259fb5, size: 125 bytes, params: 1, frame: 4
|
||||
var binding;
|
||||
var value2;
|
||||
if (env0_1) {
|
||||
binding = env0_0;
|
||||
value2 = environment.__proto__;
|
||||
if (QuestDockMode.COLLAPSED === binding) {
|
||||
return env0_2 ? QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED_WITH_YOU_BAR : QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED;
|
||||
}
|
||||
if (QuestDockMode.EXPANDED === binding) {
|
||||
return env0_2 ? QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED_WITH_YOU_BAR : QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED;
|
||||
}
|
||||
if (QuestDockMode.CLOSED === binding) {
|
||||
return QUEST_DOCK_EXTERNAL_OFFSET_CLOSED;
|
||||
}
|
||||
if (QuestDockMode.SOFT_DISMISSED === binding) {
|
||||
return QUEST_DOCK_EXTERNAL_OFFSET_CLOSED;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function _fun103136() { // fn#103136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:7038, offset: 0x0225a0b3, size: 84 bytes, params: 1, frame: 16
|
||||
const closure = function() {
|
||||
if (!(activeQuestDockMode.get() !== QuestDockMode.SOFT_DISMISSED || require(dependencyMap[12]).isSoftDismissed(QuestDockStore.questDockSoftDismissedAt))) {
|
||||
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
|
||||
}
|
||||
};
|
||||
closure();
|
||||
const setInterval = global.setInterval;
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const MINUTE = Millis.MINUTE;
|
||||
const env0_0 = setInterval(closure, 5 * MINUTE);
|
||||
return _fun103138;
|
||||
}
|
||||
|
||||
function _fun103140() { // fn#103140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:7491, offset: 0x0225a1e4, size: 484 bytes, params: 1, frame: 20
|
||||
var binding;
|
||||
var object2;
|
||||
const QuestContent = require(dependencyMap[22]).QuestContent;
|
||||
var QUEST_BAR_MOBILE;
|
||||
const QuestContentCTA = require(dependencyMap[21]).QuestContentCTA;
|
||||
var moduleValue2;
|
||||
var captureAdUserAction;
|
||||
let value = environment.__proto__;
|
||||
const moduleValue = require(dependencyMap[17]);
|
||||
const shouldMigrateToAdAnalyticsInterface = moduleValue.shouldMigrateToAdAnalyticsInterface;
|
||||
const AdAnalyticsInterfaceExperimentStep = require(dependencyMap[17]).AdAnalyticsInterfaceExperimentStep;
|
||||
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
||||
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, moduleValue, [STEP_2_CLICKED_INTERNAL,
|
||||
'quest_dock_action_sheet'])) {
|
||||
moduleValue2 = require(dependencyMap[18]);
|
||||
captureAdUserAction = moduleValue2.captureAdUserAction;
|
||||
object2 = {};
|
||||
object2.type = require(dependencyMap[19]).AdUserActionType.CLICK_INTERNAL;
|
||||
object2.adCreativeType = require(dependencyMap[20]).AdCreativeType.QUEST;
|
||||
object2.adCreativeId = env0_0.id;
|
||||
object2.questContentCTA = QuestContentCTA.OPEN_CONTEXT_MENU;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.surfaceId = QUEST_BAR_MOBILE;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
object2.impressionId = env0_2;
|
||||
Reflect.apply(captureAdUserAction, moduleValue2, [object2]);
|
||||
} else {
|
||||
binding = env0_1;
|
||||
object2 = {};
|
||||
object2.questId = env0_0.id;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.questContent = QUEST_BAR_MOBILE;
|
||||
object2.questContentCTA = QuestContentCTA.OPEN_CONTEXT_MENU;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
binding(object2);
|
||||
}
|
||||
const defaultImport = importDefault(dependencyMap[23]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[25]);
|
||||
value = value(dependencyMap[24], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'QuestDockContextMenuActionSheet', {quest: env0_0}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/* Metro module 13570; source: modules/quests/native/QuestDock/QuestDockStore.tsx; dependencies: [6, 7, 15, 17, 18, 6528, 13571, 566, 694, 2] */
|
||||
function _fun103141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:6, offset: 0x0225a3c8, size: 353 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_6 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_7 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_8 = importDefault(18) /* metro dependency 18 */;
|
||||
const QuestDockMode = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
let env0_2 = QuestDockMode.COLLAPSED;
|
||||
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
|
||||
let value = _fun103145(PersistedStore);
|
||||
value.displayName = 'QuestDockStore';
|
||||
value.persistKey = 'QuestDockStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{QUESTS_PREV_RESTING_QUEST_DOCK_MODE_UPDATE: function(a0) {
|
||||
var value2 = a0.mode !== COLLAPSED;
|
||||
env0_2 = a0.mode;
|
||||
if (value2) {
|
||||
env0_3 = a0.mode !== QuestDockMode.SOFT_DISMISSED ? null : global.Date.now();
|
||||
}
|
||||
return value2;
|
||||
}, QUESTS_DOCK_RESET_SOFT_DISMISSAL: function() {
|
||||
env0_2 = QuestDockMode.COLLAPSED;
|
||||
env0_3 = null;
|
||||
}, QUESTS_DOCK_VISIBILITY_ELIGIBILITY_UPDATE: function(a0) {
|
||||
env0_10 = a0.isEligibleToBeVisible;
|
||||
}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_103142() { // fn#103142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:176, offset: 0x0225a529, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_103142_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun103145(a0) { // fn#103145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:441, offset: 0x0225a58b, size: 172 bytes, params: 2, frame: 16
|
||||
const closure = QuestDockStore;
|
||||
env0_8(closure, a0);
|
||||
return env0_5(closure, [{key: 'initialize', value: value_103147}, {key: 'getState', value: value_103148},
|
||||
{key: 'prevRestingQuestDockMode', get: function() {
|
||||
return COLLAPSED;
|
||||
}}, {key: 'questDockSoftDismissedAt', get: get_103150}, {key: 'isEligibleToBeVisible', get: get_103151}]);
|
||||
}
|
||||
|
||||
function value_103147(a0) { // fn#103147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:741, offset: 0x0225a637, size: 88 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
var questDockSoftDismissedAt;
|
||||
var value;
|
||||
if (a0 != null) {
|
||||
questDockSoftDismissedAt = a0.questDockSoftDismissedAt;
|
||||
value = environment.__proto__;
|
||||
r0 = (require(13571) /* metro dependency 13571: QuestDockUtils */).isSoftDismissed(questDockSoftDismissedAt) ? QuestDockMode.SOFT_DISMISSED : QuestDockMode.COLLAPSED;
|
||||
}
|
||||
}
|
||||
|
||||
function value_103148() { // fn#103148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:875, offset: 0x0225a68f, size: 25 bytes, params: 1, frame: 3
|
||||
return {prevRestingQuestDockMode: COLLAPSED, questDockSoftDismissedAt: env1_3};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
/* Metro module 13664; source: modules/quests/native/QuestDock/QuestDockUnenrolledBackground.tsx; dependencies: [57, 31, 27, 4502, 6528, 13572, 661, 33, 4501, 13650, 13568, 13573, 13576, 8621, 566, 3860, 697, 674, 4017, 4577, 477, 9480, 8141, 9543, 5475, 4589, 2] */
|
||||
function _fun104349(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:6, offset: 0x0229337b, size: 502 bytes, params: 8, frame: 25
|
||||
var object6;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.AppState;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_7 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const QUEST_DOCK_EXPANDED_HEIGHT = questDockConstantsModule.QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
const env0_8 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
const env0_9 = questDockConstantsModule.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).VerticalGradient;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value4.jsx;
|
||||
const env0_12 = value4.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object6 = {};
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
||||
object7['right'] = undefined;
|
||||
object7['bottom'] = undefined;
|
||||
object7['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
object7['zIndex'] = 1;
|
||||
object6.backgroundWrapper = object7;
|
||||
const object8 = {};
|
||||
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
|
||||
object8['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
object8['resizeMode'] = 'cover';
|
||||
object6.backgroundHeroAsset = object8;
|
||||
const object9 = {};
|
||||
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
|
||||
object6.backgroundHeroAssetVideo = object9;
|
||||
const object10 = {};
|
||||
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
|
||||
object10['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
object6.backgroundGradient = object10;
|
||||
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object6]);
|
||||
object6 = {code: 'function QuestDockUnenrolledBackgroundTsx1(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,windowDimensions}=this.__closure;return{transform:[{translateX:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED*-1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)},{translateY:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED*-1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)}],width:windowDimensions.get().width};}'};
|
||||
object6 = {code: 'function QuestDockUnenrolledBackgroundTsx2(){const{withSpring,activeQuestDockMode,QuestDockMode,videoLoaded,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()!==QuestDockMode.EXPANDED||!videoLoaded?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};}'};
|
||||
value = value.memo(QuestDockUnenrolledBackground);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUnenrolledBackground.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledBackground() { // fn#104350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:1604, offset: 0x02293571, size: 1273 bytes, params: 1, frame: 35
|
||||
var moduleValue5;
|
||||
let binding = env0_4;
|
||||
let useContext = binding.useContext;
|
||||
const quest = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
||||
const styles = useStyles();
|
||||
const {staticUrl,
|
||||
videoAsset} = (require(13568) /* metro dependency 13568: QuestHooksNative */).useQuestDockHeroAsset(quest);
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {activeQuestDockMode, windowDimensions} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
|
||||
useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const setRestingQuestDockMode = Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]).setRestingQuestDockMode;
|
||||
const value4 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(activeQuestDockMode);
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
|
||||
const value5 = Reflect.apply(useToken, useTokenModule, [CARD_BACKGROUND_DEFAULT]);
|
||||
const env0_3 = value5;
|
||||
const value6 = binding.useMemo(_fun104352, [value5]);
|
||||
let closure = function() {
|
||||
return [0, 0.33, 0.76, 1];
|
||||
};
|
||||
const value7 = binding.useMemo(closure, []);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
closure = QuestDockUnenrolledBackgroundS;
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED: QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,
|
||||
windowDimensions: windowDimensions};
|
||||
closure.__workletHash = 3565242281634;
|
||||
closure.__initData = env0_14;
|
||||
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const useState = binding.useState;
|
||||
const value10 = env0_3(Reflect.apply(useState, binding, [AppState.currentState !== 'active']), 2);
|
||||
var property = value10[0];
|
||||
var env0_4 = value10[1];
|
||||
binding.useEffect(function() {
|
||||
var env0_0 = AppState.addEventListener('change', _fun104356);
|
||||
return _fun104357;
|
||||
}, [activeQuestDockMode, setRestingQuestDockMode]);
|
||||
useContext = binding.useContext;
|
||||
let r4 = !property && Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).isRendered && !useReducedMotion && videoAsset != null;
|
||||
if (r4) {
|
||||
moduleValue5 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
r4 = !moduleValue5.isAndroid();
|
||||
}
|
||||
r4 = r4 && (require(9480) /* metro dependency 9480: QuestUtilsNative */).isHeroVideoSupported(videoAsset);
|
||||
binding = env0_4;
|
||||
var [property, env0_6] = env0_3(binding.useState(false), 2);
|
||||
const value17 = binding.useCallback(_fun104358, []);
|
||||
const moduleValue7 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue7.useAnimatedStyle;
|
||||
closure = QuestDockUnenrolledBackgroundG;
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode, videoLoaded: property,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED};
|
||||
closure.__workletHash = 13084905891385;
|
||||
closure.__initData = env0_15;
|
||||
const value18 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
|
||||
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
const items2 = [styles.backgroundWrapper, value8];
|
||||
const r5 = r4 ? <env0_4.Fragment>{((VideoComponent) => <VideoComponent style={styles.backgroundHeroAssetVideo} onLoad={value17} source={{uri: videoAsset.url}} paused={value4 !== QuestDockMode.EXPANDED} resizeMode="cover" muted disableFocus preventsDisplaySleepDuringVideoPlayback={false} />)((require(9543) /* metro dependency 9543: Video */).VideoComponent)}<ReanimatedNativeView style={value18}>{((Component) => <Component style={styles.backgroundHeroAsset} source={{uri: staticUrl}} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</ReanimatedNativeView></env0_4.Fragment> : ((Component) => <Component style={styles.backgroundHeroAsset} source={{uri: staticUrl}} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
const defaultImport5 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const {START, END} = VerticalGradient;
|
||||
return (
|
||||
<ReanimatedNativeView style={items2}>
|
||||
{r5}
|
||||
{((Component) => <Component locations={value7} style={styles.backgroundGradient} start={START} end={END} colors={value6} />)(defaultImport5)}
|
||||
</ReanimatedNativeView>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104352() { // fn#104352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2080, offset: 0x02293a6a, size: 168 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(674) /* metro dependency 674 */;
|
||||
value = value(env0_3);
|
||||
const value3 = value.alpha(0);
|
||||
const items2 = [value3.hex()];
|
||||
const value5 = value.alpha(0.1);
|
||||
items2[1] = value5.hex();
|
||||
const value6 = value.alpha(0.8);
|
||||
items2[2] = value6.hex();
|
||||
value = value.alpha(1);
|
||||
items2[3] = value.hex();
|
||||
return items2;
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledBackgroundS() { // fn#104354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2256, owner: QuestDockUnenrolledBackground.s, offset: 0x02293b1e, size: 217 bytes, params: 1, frame: 21
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
let withSpring = springModule.withSpring;
|
||||
const activeQuestDockModeBinding = activeQuestDockMode;
|
||||
let get = activeQuestDockModeBinding.get;
|
||||
const value3 = Reflect.apply(get, activeQuestDockModeBinding, []);
|
||||
let COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
const value4 = 0;
|
||||
const items2 = [{translateX: Reflect.apply(withSpring, springModule,
|
||||
[value3 !== COLLAPSED ? value4 : -1 * QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])}];
|
||||
const moduleValue2 = springModule;
|
||||
withSpring = moduleValue2.withSpring;
|
||||
const value6 = activeQuestDockMode.get();
|
||||
COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
items2[1] = {translateY: Reflect.apply(withSpring, moduleValue2,
|
||||
[value6 !== COLLAPSED ? value4 : -1 * QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])};
|
||||
const windowDimensionsBinding = windowDimensions;
|
||||
get = windowDimensionsBinding.get;
|
||||
return {transform: items2, width: Reflect.apply(get, windowDimensionsBinding, []).width};
|
||||
}
|
||||
|
||||
function _fun104355() { // fn#104355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2739, offset: 0x02293bf7, size: 45 bytes, params: 1, frame: 14
|
||||
const env0_0 = AppState.addEventListener('change', _fun104356);
|
||||
return _fun104357;
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledBackgroundG() { // fn#104359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:3125, owner: QuestDockUnenrolledBackground.G, offset: 0x02293c9a, size: 96 bytes, params: 1, frame: 18
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const value3 = activeQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
const value4 = 1;
|
||||
return {opacity: Reflect.apply(withSpring, springModule, [value3 !== EXPANDED ? value4 : env0_5 ? 0 : value4,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])};
|
||||
}
|
||||
|
||||
function _fun104356(a0) { // fn#104356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2779, offset: 0x02293c24, size: 118 bytes, params: 2, frame: 15
|
||||
let value = a0 !== 'active';
|
||||
env1_4(value);
|
||||
let r3 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS() && value;
|
||||
if (r3) {
|
||||
value = activeQuestDockMode.get();
|
||||
value = value === QuestDockMode.EXPANDED;
|
||||
r3 = value;
|
||||
}
|
||||
if (r3) {
|
||||
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
/* Metro module 13662; source: modules/quests/native/QuestDock/QuestDockUnenrolledBody.tsx; dependencies: [5, 31, 27, 7093, 13570, 6528, 13572, 33, 4501, 697, 13650, 632, 13568, 9483, 1585, 5176, 9502, 9503, 13576, 9484, 7120, 6531, 13595, 9950, 13634, 13631, 9542, 13635, 4573, 1244, 1305, 9480, 2] */
|
||||
function _fun104330(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:6, offset: 0x02292031, size: 642 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
||||
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
|
||||
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
|
||||
const env0_8 = questConstantsModule.QuestDockMode;
|
||||
const env0_9 = questConstantsModule.QuestsExperimentLocations;
|
||||
const {QUEST_DOCK_EXPANDED_PADDING_BOTTOM,
|
||||
QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL} = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value4.jsx;
|
||||
const env0_12 = value4.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.wrapper = {'flexGrow': 1, 'flexShrink': 0, 'justifyContent': 'flex-end',
|
||||
paddingHorizontal: QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL, paddingBottom: QUEST_DOCK_EXPANDED_PADDING_BOTTOM};
|
||||
const QUEST_DOCK_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.QUEST_DOCK_BORDER_RADIUS;
|
||||
object2.rewardContentWrapper = {'borderRadius': null, 'overflow': 'hidden', 'padding': 8, 'paddingRight': 16,
|
||||
borderRadius: QUEST_DOCK_BORDER_RADIUS};
|
||||
object2.rewardContent = {'alignItems': 'center', 'flexDirection': 'row', 'gap': 16};
|
||||
object2.rewardContentCopy = {'flexGrow': 1, 'flexShrink': 1, 'gap': 4};
|
||||
object2.premiumRewardPerkPill = {alignSelf: 'flex-start'};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.titleRow = {'flexDirection': 'row', 'alignItems': 'center', 'gap': null, 'flexWrap': 'wrap', gap: PX_8};
|
||||
const object3 = {};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.questDockRewardTile = object3;
|
||||
object2.questDockCtaWrapper = {'marginTop': 12, 'paddingHorizontal': 4, 'paddingTop': 16, 'position': 'relative'};
|
||||
const object4 = {};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.questDockCta = object4;
|
||||
object2.questDockCtaRow = {alignSelf: 'stretch'};
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object2.questDockCtaSaparator = {'position': 'absolute', 'left': -12, 'right': -12, 'top': 0,
|
||||
'backgroundColor': null, 'height': 1, 'opacity': 1, backgroundColor: BORDER_SUBTLE};
|
||||
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(QuestDockUnenrolledBody);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUnenrolledBody.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledBody() { // fn#104331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:1202, offset: 0x022922b3, size: 1382 bytes, params: 1, frame: 44
|
||||
var object2;
|
||||
let binding = env0_4;
|
||||
let useContext = binding.useContext;
|
||||
const {isRendered, quest} = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]);
|
||||
const styles = useStyles();
|
||||
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([QuestDockStore],
|
||||
function() {
|
||||
return QuestDockStore.prevRestingQuestDockMode === QuestDockMode.EXPANDED;
|
||||
});
|
||||
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([QuestStore],
|
||||
function() {
|
||||
return QuestStore.isEnrolling(quest.id);
|
||||
});
|
||||
const value5 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
|
||||
const value6 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const {isMobileActivityQuest, questApplication,
|
||||
launchMobileActivity} = (require(13568) /* metro dependency 13568: QuestHooksNative */).useMobileActivityQuest(quest);
|
||||
const env0_3 = launchMobileActivity;
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const value8 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockUnenrolledBody');
|
||||
const value9 = (require(9502) /* metro dependency 9502: QuestOrbMultiplierHooks */).useQuestOrbMultiplierEligibility();
|
||||
const value10 = (require(9483) /* metro dependency 9483: QuestHooks */).useShouldShowBonusOrbsUX(quest, value9);
|
||||
const r6 = value10 && value9 === (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType.NITRO;
|
||||
binding = env0_4;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const value13 = binding.useCallback(env0_3(_fun104335), [quest.id, value5, Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]).setRestingQuestDockMode, isMobileActivityQuest, launchMobileActivity]);
|
||||
const value14 = (require(9950) /* metro dependency 9950: QuestCopyHooks */).usePrimaryCtaCopy({quest: quest,
|
||||
application: questApplication, shortText: true});
|
||||
const questCopyHooksModule = require(9950) /* metro dependency 9950: QuestCopyHooks */;
|
||||
const useQuestsInstructionsToWinReward = questCopyHooksModule.useQuestsInstructionsToWinReward;
|
||||
object2 = {quest: quest};
|
||||
const QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
|
||||
object2.location = QUESTS_BAR_MOBILE;
|
||||
object2.taskDetails = value6;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
const value15 = Reflect.apply(useQuestsInstructionsToWinReward, questCopyHooksModule, [object2]);
|
||||
const PremiumRewardGradient = importDefault(13634) /* metro dependency 13634: PremiumRewardGradient */;
|
||||
const premiumRewardGradientProps = {visible: r6, glow: true, style: [styles.wrapper,
|
||||
value8 ? {paddingBottom: global.Math.max(bottom, QUEST_DOCK_EXPANDED_PADDING_BOTTOM)} : null]};
|
||||
const value17 = ((Component) => <Component />)(importDefault(13631) /* metro dependency 13631: QuestDockBlurredContentBackground */);
|
||||
const QuestRewardTile = importDefault(9542) /* metro dependency 9542: QuestRewardTile */;
|
||||
const value18 = !value3;
|
||||
const questRewardTile = <QuestRewardTile paused={value3 ? !isRendered : value18} height={80} width={80} quest={quest} style={styles.questDockRewardTile} withAnimation={value3 && isRendered} />;
|
||||
const items4 = [value10 && <View style={styles.premiumRewardPerkPill}>{((QuestOrbMultiplierPerkPill) => <QuestOrbMultiplierPerkPill questId={quest.config.id} orbMultiplierEligibility={value9} />)((require(13635) /* metro dependency 13635: QuestOrbMultiplierPerkPill */).QuestOrbMultiplierPerkPill)}</View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const EQa7os = (require(1244) /* metro dependency 1244: indexNative */).t.EQa7os;
|
||||
items4[1] = <View style={styles.titleRow}><Text variant="heading-md/medium" color="mobile-text-heading-primary">{Reflect.apply(format,
|
||||
intl, [EQa7os, {questName: quest.config.messages.questName}])}</Text></View>;
|
||||
items4[2] = <Text color="text-default" variant="text-sm/normal">{value15}</Text>;
|
||||
const view2 = <View style={styles.rewardContentWrapper}>{value17}<View style={styles.rewardContent}>{questRewardTile}<View style={styles.rewardContentCopy}>{items4}</View></View></View>;
|
||||
const view = <View style={styles.questDockCtaSaparator} />;
|
||||
const ShinyButton = (require(1305) /* metro dependency 1305: native */).ShinyButton;
|
||||
return (
|
||||
<PremiumRewardGradient {...premiumRewardGradientProps}>
|
||||
{view2}
|
||||
<View style={styles.questDockCtaWrapper}>
|
||||
{view}
|
||||
<View style={styles.questDockCtaRow}>
|
||||
<ShinyButton
|
||||
style={styles.questDockCta}
|
||||
onPress={value13}
|
||||
loading={value4}
|
||||
renderIcon={renderIcon}
|
||||
text={value14}
|
||||
shineDisabled={value18}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</PremiumRewardGradient>
|
||||
);
|
||||
}
|
||||
|
||||
function* _fun104335() { // fn#104335, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:1958, offset: 0x02292861, size: 316 bytes, params: 1, frame: 21
|
||||
var binding3;
|
||||
var value7;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_0;
|
||||
var binding2 = env2_2;
|
||||
var value3 = binding(binding2[19]);
|
||||
var enrollInQuest = value3.enrollInQuest;
|
||||
var id = require.id;
|
||||
var object2 = {};
|
||||
var QuestContentCTA = binding(binding2[20]).QuestContentCTA;
|
||||
var ACCEPT_QUEST = QuestContentCTA.ACCEPT_QUEST;
|
||||
object2.questContentCTA = ACCEPT_QUEST;
|
||||
var QuestContent = binding(binding2[21]).QuestContent;
|
||||
var QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.questContent = QUEST_BAR_MOBILE;
|
||||
QuestContent = binding(binding2[21]).QuestContent;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
yield Reflect.apply(enrollInQuest, value3, [id, object2]);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
if (dependencyMap) {
|
||||
yield env1_3();
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
env1_4(env2_8.COLLAPSED);
|
||||
} else if (importDefault) {
|
||||
binding = env2_1;
|
||||
binding3 = env2_2;
|
||||
value7 = binding(binding3[22]);
|
||||
object2 = {};
|
||||
object2.questId = require.id;
|
||||
binding = env2_0;
|
||||
object2.sourceQuestContent = binding(binding3[21]).QuestContent.QUEST_BAR_MOBILE;
|
||||
value7(object2);
|
||||
binding = env1_4;
|
||||
binding(env2_8.COLLAPSED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledBodyRenderIcon() { // fn#104336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:3507, owner: QuestDockUnenrolledBody.renderIcon, offset: 0x0229299d, size: 48 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (require(9480) /* metro dependency 9480: QuestUtilsNative */).getPrimaryCtaIcon(quest, true);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,378 @@
|
||||
/* Metro module 13655; source: modules/quests/native/QuestDock/QuestDockUnenrolledHeader.tsx; dependencies: [57, 31, 27, 6528, 13572, 482, 33, 4501, 697, 4577, 13650, 13573, 478, 13569, 13580, 6531, 7120, 4048, 4002, 5176, 3860, 13652, 4017, 13568, 8141, 13656, 13631, 5475, 13658, 13659, 13622, 4573, 1244, 5278, 10139, 8638, 2] */
|
||||
function _fun104295(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6, offset: 0x0228f0a7, size: 725 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.AccessibilityInfo;
|
||||
const env0_6 = value2.View;
|
||||
const env0_7 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_8 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
const env0_9 = questDockConstantsModule.QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
const QUEST_DOCK_COLLAPSED_HEIGHT = questDockConstantsModule.QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
const env0_10 = questDockConstantsModule.QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
|
||||
const env0_11 = questDockConstantsModule.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
const env0_12 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_13 = value4.jsx;
|
||||
const env0_14 = value4.jsxs;
|
||||
const env0_15 = value4.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.questDockHeader = {'alignItems': 'center', 'justifyContent': 'space-between', 'flexDirection': 'row',
|
||||
'height': null, 'overflow': 'hidden', 'paddingRight': 16, 'paddingLeft': 8, 'position': 'absolute', 'zIndex': 2,
|
||||
height: QUEST_DOCK_COLLAPSED_HEIGHT};
|
||||
object2.wreathImage = {'height': 35, 'marginRight': 4, 'width': 35};
|
||||
object2.questDockHeaderPrimary = {'alignItems': 'center', 'flexDirection': 'row'};
|
||||
object2.logo = {marginTop: 2};
|
||||
object2.questDockHeaderSecondary = {'flexGrow': 0, 'flexShrink': 0};
|
||||
object2.questDockHeaderContentCollapsed = {'justifyContent': 'center', 'position': 'absolute', 'bottom': 0,
|
||||
'top': 0, 'right': 0};
|
||||
object2.questDockHeaderContentExpanded = {'alignItems': 'center', 'flexDirection': 'row', 'gap': 8};
|
||||
object2.questDockHeaderActionDisclosures = {'alignItems': 'center', 'display': 'flex', 'flexDirection': 'row',
|
||||
'gap': 4};
|
||||
object2.questDockHeaderActionDisclosuresIcon = {'height': 14, 'width': 14};
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object2.questDockHeaderActionSeparator = {'backgroundColor': null, 'opacity': 0.2, 'height': 18, 'width': 1.5,
|
||||
backgroundColor: TEXT_DEFAULT};
|
||||
object2.questDockHeaderTertiaryContent = {opacity: 0.7};
|
||||
const env0_16 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
object2 = {code: 'function questDockHeaderLayoutAnimation_QuestDockUnenrolledHeaderTsx1(values){const{withSpring,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{initialValues:{originX:values.currentOriginX,originY:values.currentOriginY,width:values.currentWidth,height:values.currentHeight},animations:{originX:withSpring(values.targetOriginX,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),originY:withSpring(values.targetOriginY,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),height:withSpring(values.targetHeight,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),width:withSpring(values.targetWidth,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)}};}'};
|
||||
const env0_18 = _fun104296();
|
||||
object2 = {code: 'function QuestDockUnenrolledHeaderTsx2(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_CONTENT_BORDER_RADII,questDockBorderRadius,youBarEnabled,withSpring,questDockAnimatedBorderRadius,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,questDockWrapperSpecs,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED}=this.__closure;return{borderTopLeftRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderTopRightRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderBottomLeftRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,borderBottomRightRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,width:activeQuestDockMode.get()===QuestDockMode.EXPANDED?questDockWrapperSpecs.get().width-QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED*2:questDockWrapperSpecs.get().width,transform:[{translateX:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)},{translateY:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)}]};}'};
|
||||
object2 = {code: 'function QuestDockUnenrolledHeaderTsx3(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?0:1,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};}'};
|
||||
object2 = {code: 'function QuestDockUnenrolledHeaderTsx4(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED}=this.__closure;return{right:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED*-1:0};}'};
|
||||
object2 = {code: 'function QuestDockUnenrolledHeaderTsx5(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};}'};
|
||||
object2 = {code: 'function QuestDockUnenrolledHeaderTsx6(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED}=this.__closure;return{right:activeQuestDockMode.get()===QuestDockMode.EXPANDED?0:QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};}'};
|
||||
object2 = {code: "function QuestDockUnenrolledHeaderTsx7(){const{activeQuestDockMode,QuestDockMode}=this.__closure;return{pointerEvents:activeQuestDockMode.get()===QuestDockMode.EXPANDED?'auto':'none'};}"};
|
||||
object2 = {code: 'function QuestDockUnenrolledHeaderTsx8(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_CONTENT_BORDER_RADII,questDockBorderRadius,youBarEnabled,withSpring,questDockAnimatedBorderRadius,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,questDockWrapperSpecs}=this.__closure;return{borderRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderBottomLeftRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,borderBottomRightRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,width:questDockWrapperSpecs.get().width};}'};
|
||||
value = value.memo(QuestDockUnenrolledHeader);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUnenrolledHeader.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun104296() { // fn#104296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:1958, offset: 0x0228f37c, size: 88 bytes, params: 1, frame: 14
|
||||
const closure = questDockHeaderLayoutAnimation;
|
||||
const object2 = {};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 6787168806966;
|
||||
closure.__initData = env0_17;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledHeader() { // fn#104298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6344, offset: 0x0228f4a1, size: 2221 bytes, params: 1, frame: 42
|
||||
var object2;
|
||||
let binding = env0_4;
|
||||
let useContext = binding.useContext;
|
||||
const quest = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {activeQuestDockMode, questDockWrapperSpecs} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
|
||||
const [property, env0_3] = env0_3Binding(binding.useState(false), 2);
|
||||
let closure = _fun104299;
|
||||
binding.useEffect(closure, []);
|
||||
const value5 = (require(13569) /* metro dependency 13569: QuestDockHooks */).useActionSheetPressHandler(quest);
|
||||
const value6 = binding.useCallback(_fun104301, [quest]);
|
||||
const r19 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)()) ? ThemeTypes.DARK : ThemeTypes.LIGHT;
|
||||
const value8 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockUnenrolledHeader');
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const QUEST_DOCK_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.QUEST_DOCK_BORDER_RADIUS;
|
||||
const value9 = Reflect.apply(useToken, useTokenModule, [QUEST_DOCK_BORDER_RADIUS]);
|
||||
const value10 = (importDefault(13652) /* metro dependency 13652: useQuestDockAnimatedBorderRadius */)(value9);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
closure = QuestDockUnenrolledHeaderB;
|
||||
object2 = {activeQuestDockMode: activeQuestDockMode};
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.QUEST_DOCK_CONTENT_BORDER_RADII = QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
object2.questDockBorderRadius = value9;
|
||||
object2.youBarEnabled = value8;
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.questDockAnimatedBorderRadius = value10;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
object2.questDockWrapperSpecs = questDockWrapperSpecs;
|
||||
object2.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED = QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 961167275812;
|
||||
closure.__initData = env0_19;
|
||||
const value11 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue6.useAnimatedStyle;
|
||||
closure = function() {
|
||||
var moduleValue = require(dependencyMap[9]);
|
||||
return {opacity: moduleValue.withSpring(activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? 1 : 0,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};
|
||||
};
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED};
|
||||
closure.__workletHash = 15527972438968;
|
||||
closure.__initData = env0_20;
|
||||
const value12 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
|
||||
const moduleValue7 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue7.useAnimatedStyle;
|
||||
closure = QuestDockUnenrolledHeaderK;
|
||||
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};
|
||||
closure.__workletHash = 7866036039040;
|
||||
closure.__initData = env0_21;
|
||||
const value13 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
|
||||
const moduleValue8 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue8.useAnimatedStyle;
|
||||
closure = function() {
|
||||
var moduleValue = require(dependencyMap[9]);
|
||||
return {opacity: moduleValue.withSpring(activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? 0 : 1,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};
|
||||
};
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED};
|
||||
closure.__workletHash = 11647269239934;
|
||||
closure.__initData = env0_22;
|
||||
const value14 = Reflect.apply(useAnimatedStyle, moduleValue8, [closure]);
|
||||
const moduleValue9 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue9.useAnimatedStyle;
|
||||
closure = QuestDockUnenrolledHeaderG;
|
||||
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};
|
||||
closure.__workletHash = 14794727045076;
|
||||
closure.__initData = env0_23;
|
||||
const value15 = Reflect.apply(useAnimatedStyle, moduleValue9, [closure]);
|
||||
const moduleValue10 = reanimatedRexportModule;
|
||||
const useAnimatedProps = moduleValue10.useAnimatedProps;
|
||||
closure = QuestDockUnenrolledHeaderF;
|
||||
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode};
|
||||
closure.__workletHash = 6738114933032;
|
||||
closure.__initData = env0_24;
|
||||
const value16 = Reflect.apply(useAnimatedProps, moduleValue10, [closure]);
|
||||
const moduleValue11 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue11.useAnimatedStyle;
|
||||
closure = QuestDockUnenrolledHeaderB_104308;
|
||||
object2 = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_CONTENT_BORDER_RADII: QUEST_DOCK_CONTENT_BORDER_RADII, questDockBorderRadius: value9,
|
||||
youBarEnabled: value8};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.questDockAnimatedBorderRadius = value10;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
object2.questDockWrapperSpecs = questDockWrapperSpecs;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 6128777581416;
|
||||
closure.__initData = env0_25;
|
||||
const value17 = Reflect.apply(useAnimatedStyle, moduleValue11, [closure]);
|
||||
const styles = useStyles();
|
||||
const value18 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useQuestGameLogotypeAssetUrl(quest);
|
||||
const questBarHeroBlurhash = quest.config.assets.questBarHeroBlurhash;
|
||||
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
object2 = {style: [styles.questDockHeader, value11], layout: env0_18};
|
||||
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
|
||||
const items2 = [(platformUtilsModule.isAndroid() || property) && questBarHeroBlurhash != null ? ((Component) => <Component placeholder={questBarHeroBlurhash} animatedStyle={value17} animatedLayout={env0_18} />)(importDefault(13656) /* metro dependency 13656: QuestDockBlurredHeaderPlaceholder */) : ((Component) => <Component animatedStyle={value17} animatedLayout={env0_18} />)(importDefault(13631) /* metro dependency 13631: QuestDockBlurredContentBackground */)];
|
||||
const FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
const DARK = ThemeTypes.DARK;
|
||||
items2[1] = <View style={styles.questDockHeaderPrimary}><FastImage source={r19 === DARK ? importDefault(13658) /* metro dependency 13658 */ : importDefault(13659) /* metro dependency 13659 */} resizeMode="contain" style={styles.wreathImage} />{((Component) => <Component assetUrl={value18} height={36} maxWidth={120} style={styles.logo} />)(importDefault(13622) /* metro dependency 13622: QuestGameLogotype */)}</View>;
|
||||
const defaultImport8 = ReanimatedNativeView;
|
||||
const items4 = [styles.questDockHeaderContentCollapsed, value13];
|
||||
binding = env0_18;
|
||||
const defaultImport9 = ReanimatedNativeView;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
let questDockHeaderTertiaryContent = styles.questDockHeaderTertiaryContent;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const defaultImport82 = ((Component) => <Component style={items4} layout={binding}>{((Component) => <Component style={value12}><Text style={questDockHeaderTertiaryContent} variant="text-sm/medium" color="interactive-text-active">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3mgEQf'])}</Text></Component>)(defaultImport9)}</Component>)(defaultImport8);
|
||||
const defaultImport10 = ReanimatedNativeView;
|
||||
const defaultImport11 = ReanimatedNativeView;
|
||||
const items6 = [styles.questDockHeaderContentExpanded, value14];
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const items7 = [styles.questDockHeaderActionDisclosures];
|
||||
items7[1] = styles.questDockHeaderTertiaryContent;
|
||||
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
|
||||
let value = <Text color="interactive-text-active" variant="text-sm/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.o6FLcF)}</Text>;
|
||||
const CircleQuestionIcon = (require(10139) /* metro dependency 10139: CircleQuestionIcon */).CircleQuestionIcon;
|
||||
let INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
value = <PressableOpacity onPress={value6} accessibilityRole="button" style={items7}><>{value}<CircleQuestionIcon color={INTERACTIVE_TEXT_ACTIVE} style={styles.questDockHeaderActionDisclosuresIcon} /></></PressableOpacity>;
|
||||
const items9 = [value];
|
||||
items9[1] = <View style={styles.questDockHeaderActionSeparator} />;
|
||||
questDockHeaderTertiaryContent = styles.questDockHeaderTertiaryContent;
|
||||
const MoreHorizontalIcon = (require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon;
|
||||
INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
items9[2] = <PressableOpacity accessibilityRole="button" onPress={value5} style={questDockHeaderTertiaryContent}><MoreHorizontalIcon color={INTERACTIVE_TEXT_ACTIVE} /></PressableOpacity>;
|
||||
items2[2] = <View style={styles.questDockHeaderSecondary}>{defaultImport82}{((Component) => <Component animatedProps={value16} style={value15} layout={binding}>{((Component) => <Component style={items6}>{items9}</Component>)(defaultImport11)}</Component>)(defaultImport10)}</View>;
|
||||
return (
|
||||
<ReanimatedNativeView {...object2}>
|
||||
{items2}
|
||||
</ReanimatedNativeView>
|
||||
);
|
||||
}
|
||||
|
||||
function questDockHeaderLayoutAnimation({currentOriginX, currentOriginY, currentWidth, currentHeight, targetOriginX, targetOriginY, targetHeight, targetWidth}) { // fn#104297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:2004, offset: 0x0228f3d4, size: 205 bytes, params: 2, frame: 20
|
||||
const object2 = {};
|
||||
object2.initialValues = {originX: currentOriginX, originY: currentOriginY, width: currentWidth,
|
||||
height: currentHeight};
|
||||
const object4 = {};
|
||||
const value = environment.__proto__;
|
||||
object4.originX = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginX,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
object4.originY = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginY,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
object4.height = (require(4577) /* metro dependency 4577: spring */).withSpring(targetHeight,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
object4.width = (require(4577) /* metro dependency 4577: spring */).withSpring(targetWidth,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
object2.animations = object4;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun104299() { // fn#104299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6568, offset: 0x0228fd4e, size: 104 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
var then;
|
||||
var binding;
|
||||
let value = environment.__proto__;
|
||||
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
|
||||
if (platformUtilsModule.isIOS()) {
|
||||
value = AccessibilityInfo.isReduceTransparencyEnabled();
|
||||
then = value.then;
|
||||
binding = env0_3;
|
||||
Reflect.apply(then, value, [binding]);
|
||||
var env0_0 = AccessibilityInfo.addEventListener('reduceTransparencyChanged', binding);
|
||||
return _fun104300;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun104301() { // fn#104301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6794, offset: 0x0228fdb6, size: 153 bytes, params: 1, frame: 17
|
||||
const defaultImport = importDefault(13580) /* metro dependency 13580: QuestDisclosureModalActionCreators */;
|
||||
const showModal = defaultImport.showModal;
|
||||
const object3 = {};
|
||||
object3.quest = quest;
|
||||
object3.isTargetedDisclosure = true;
|
||||
const object4 = {};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object4.content = QUEST_BAR_MOBILE;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const CONTEXT_MENU_OPEN_DISCLOSURE = QuestContentCTA.CONTEXT_MENU_OPEN_DISCLOSURE;
|
||||
object4.ctaContent = CONTEXT_MENU_OPEN_DISCLOSURE;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object4.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
object3.trackingCtx = object4;
|
||||
Reflect.apply(showModal, defaultImport, [object3]);
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledHeaderB() { // fn#104302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:7270, owner: QuestDockUnenrolledHeader.B, offset: 0x0228fe4f, size: 545 bytes, params: 1, frame: 21
|
||||
var r1;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
const object2 = {};
|
||||
const value2 = activeQuestDockMode.get();
|
||||
let EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.borderTopLeftRadius = value2 === EXPANDED ? QUEST_DOCK_CONTENT_BORDER_RADII : env0_5;
|
||||
const value4 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.borderTopRightRadius = value4 === EXPANDED ? QUEST_DOCK_CONTENT_BORDER_RADII : env0_5;
|
||||
const value5 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
if (value5 === EXPANDED) {
|
||||
r1 = QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
} else if (env0_4) {
|
||||
moduleValue = require(4577) /* metro dependency 4577: spring */;
|
||||
r1 = moduleValue.withSpring(env0_6.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
} else {
|
||||
r1 = env0_5;
|
||||
}
|
||||
object2.borderBottomLeftRadius = r1;
|
||||
const value8 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
if (value8 === EXPANDED) {
|
||||
r1 = QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
} else if (env0_4) {
|
||||
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
|
||||
r1 = moduleValue2.withSpring(env0_6.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
} else {
|
||||
r1 = env0_5;
|
||||
}
|
||||
object2.borderBottomRightRadius = r1;
|
||||
const value11 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.width = value11 === EXPANDED ? questDockWrapperSpecs.get().width - 2 * QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED : questDockWrapperSpecs.get().width;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
let withSpring = springModule.withSpring;
|
||||
const value13 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
const value14 = 0;
|
||||
const QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED2 = value13 !== EXPANDED ? value14 : QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
const items2 = [{translateX: Reflect.apply(withSpring, springModule, [QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED2,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])}];
|
||||
const moduleValue4 = springModule;
|
||||
withSpring = moduleValue4.withSpring;
|
||||
const value = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
const QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED3 = value !== EXPANDED ? value14 : QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
items2[1] = {translateY: Reflect.apply(withSpring, moduleValue4, [QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED3,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])};
|
||||
object2.transform = items2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledHeaderK() { // fn#104304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:8365, owner: QuestDockUnenrolledHeader.K, offset: 0x022900c3, size: 57 bytes, params: 1, frame: 12
|
||||
const value = activeQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
return {right: value !== EXPANDED ? 0 : -1 * QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledHeaderG() { // fn#104306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:8853, owner: QuestDockUnenrolledHeader.G, offset: 0x0229014f, size: 47 bytes, params: 1, frame: 12
|
||||
const value = activeQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
const QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED2 = value === EXPANDED ? 0 : QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
|
||||
return {right: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED2};
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledHeaderF() { // fn#104307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:9071, owner: QuestDockUnenrolledHeader.f, offset: 0x0229017e, size: 50 bytes, params: 1, frame: 11
|
||||
const value = activeQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
return {pointerEvents: value !== EXPANDED ? 'none' : 'auto'};
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledHeaderB_104308() { // fn#104308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:9261, owner: QuestDockUnenrolledHeader.b, offset: 0x022901b0, size: 275 bytes, params: 1, frame: 17
|
||||
var r2;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
const object2 = {};
|
||||
const activeQuestDockModeBinding = activeQuestDockMode;
|
||||
let get = activeQuestDockModeBinding.get;
|
||||
const value2 = Reflect.apply(get, activeQuestDockModeBinding, []);
|
||||
let EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.borderRadius = value2 === EXPANDED ? QUEST_DOCK_CONTENT_BORDER_RADII : env0_5;
|
||||
const value4 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
if (value4 === EXPANDED) {
|
||||
r2 = QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
} else if (env0_4) {
|
||||
moduleValue = require(4577) /* metro dependency 4577: spring */;
|
||||
r2 = moduleValue.withSpring(env0_6.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
} else {
|
||||
r2 = env0_5;
|
||||
}
|
||||
object2.borderBottomLeftRadius = r2;
|
||||
const value7 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
if (value7 === EXPANDED) {
|
||||
r2 = QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
} else if (env0_4) {
|
||||
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
|
||||
r2 = moduleValue2.withSpring(env0_6.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
} else {
|
||||
r2 = env0_5;
|
||||
}
|
||||
object2.borderBottomRightRadius = r2;
|
||||
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.width = Reflect.apply(get, questDockWrapperSpecsBinding, []).width;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
/* Metro module 13571; source: modules/quests/native/QuestDock/QuestDockUtils.tsx; dependencies: [27, 13572, 672, 4577, 2] */
|
||||
function _fun103155(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:6, offset: 0x0225a722, size: 414 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const PixelRatio = (require(27) /* metro dependency 27 */).PixelRatio;
|
||||
let value = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_2 = value.QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
|
||||
const env0_3 = value.QUEST_DOCK_COLLAPSED_MAX_WIDTH;
|
||||
const env0_4 = value.QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
const env0_5 = value.QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
const env0_6 = PixelRatio.get();
|
||||
object = {code: 'function roundToNearestPixel_QuestDockUtilsTsx1(position){const{PIXEL_DENSITY}=this.__closure;return Math.round(position*PIXEL_DENSITY)/PIXEL_DENSITY;}'};
|
||||
value = _fun103156();
|
||||
object = {code: 'function getQuestDockExpandedHeightLimits_QuestDockUtilsTsx2(windowHeight,safeAreaTop,minContentHeight){const{QUEST_DOCK_COLLAPSED_HEIGHT}=this.__closure;return{minHeight:QUEST_DOCK_COLLAPSED_HEIGHT,maxHeight:Math.min(minContentHeight,windowHeight-safeAreaTop)};}'};
|
||||
const value2 = _fun103158();
|
||||
object = {code: 'function getQuestDockCollapsedWidth_QuestDockUtilsTsx3(windowWidth,safeAreaLeft,safeAreaRight){const{QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED,QUEST_DOCK_COLLAPSED_MAX_WIDTH}=this.__closure;safeAreaLeft=Math.max(safeAreaLeft,QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED);safeAreaRight=Math.max(safeAreaRight,QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED);return Math.min(windowWidth-safeAreaLeft-safeAreaRight,QUEST_DOCK_COLLAPSED_MAX_WIDTH);}'};
|
||||
const value3 = _fun103160();
|
||||
object = {code: 'function getQuestDockExpandedWidth_QuestDockUtilsTsx4(windowWidth,safeAreaLeft,safeAreaRight){const{QUEST_DOCK_COLLAPSED_MAX_WIDTH}=this.__closure;return Math.min(windowWidth-safeAreaLeft-safeAreaRight,QUEST_DOCK_COLLAPSED_MAX_WIDTH);}'};
|
||||
const value4 = _fun103162();
|
||||
object = {code: 'function getQuestDockClosedWidth_QuestDockUtilsTsx5(windowWidth,safeAreaLeft,safeAreaRight){const{QUEST_DOCK_COLLAPSED_MAX_WIDTH}=this.__closure;return Math.min(windowWidth-safeAreaLeft-safeAreaRight,QUEST_DOCK_COLLAPSED_MAX_WIDTH);}'};
|
||||
const value5 = _fun103164();
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const HOUR = Millis.HOUR;
|
||||
const env0_12 = 3 * HOUR;
|
||||
object = {code: 'function dimensionsLayoutTransition_QuestDockUtilsTsx6(values){const{withSpring,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{initialValues:{originX:values.currentOriginX,originY:values.currentOriginY,width:values.currentWidth,height:values.currentHeight},animations:{originX:withSpring(values.targetOriginX,QUEST_DOCK_MODE_CHANGE_PHYSICS),originY:withSpring(values.targetOriginY,QUEST_DOCK_MODE_CHANGE_PHYSICS),height:withSpring(values.targetHeight,QUEST_DOCK_MODE_CHANGE_PHYSICS),width:withSpring(values.targetWidth,QUEST_DOCK_MODE_CHANGE_PHYSICS)}};}'};
|
||||
const value6 = _fun103166();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUtils.tsx');
|
||||
exports.roundToNearestPixel = value;
|
||||
exports.getQuestDockExpandedHeightLimits = value2;
|
||||
exports.getQuestDockCollapsedWidth = value3;
|
||||
exports.getQuestDockExpandedWidth = value4;
|
||||
exports.getQuestDockClosedWidth = value5;
|
||||
exports.isSoftDismissed = isSoftDismissed;
|
||||
exports.dimensionsLayoutTransition = value6;
|
||||
}
|
||||
|
||||
function _fun103156() { // fn#103156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:452, offset: 0x0225a8c0, size: 57 bytes, params: 1, frame: 4
|
||||
const closure = roundToNearestPixel;
|
||||
closure.__closure = {PIXEL_DENSITY: env0_6};
|
||||
closure.__workletHash = 9602449563120;
|
||||
closure.__initData = env0_7;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun103158() { // fn#103158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:961, offset: 0x0225a91f, size: 57 bytes, params: 1, frame: 4
|
||||
const closure = function(a0, a1, a2) {
|
||||
var object = {};
|
||||
object.minHeight = QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
var Math = global.Math;
|
||||
object.maxHeight = Math.min(a2, a0 - a1);
|
||||
return object;
|
||||
};
|
||||
closure.__closure = {QUEST_DOCK_COLLAPSED_HEIGHT: QUEST_DOCK_COLLAPSED_HEIGHT};
|
||||
closure.__workletHash = 880847803554;
|
||||
closure.__initData = env0_8;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun103160() { // fn#103160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:1752, offset: 0x0225a98d, size: 66 bytes, params: 1, frame: 4
|
||||
const closure = function(a0, a1, a2) {
|
||||
var Math = global.Math;
|
||||
var value2 = Math.max(a1, QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED);
|
||||
Math = global.Math;
|
||||
var value3 = Math.max(a2, QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED);
|
||||
Math = global.Math;
|
||||
return Math.min(a0 - value2 - value3, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
|
||||
};
|
||||
closure.__closure = {QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED,
|
||||
QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
|
||||
closure.__workletHash = 1119343760780;
|
||||
closure.__initData = env0_9;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun103162() { // fn#103162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:2367, offset: 0x0225aa22, size: 57 bytes, params: 1, frame: 4
|
||||
const closure = function(a0, a1, a2) {
|
||||
var Math = global.Math;
|
||||
return Math.min(a0 - a1 - a2, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
|
||||
};
|
||||
closure.__closure = {QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
|
||||
closure.__workletHash = 6480418564130;
|
||||
closure.__initData = env0_10;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun103164() { // fn#103164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:2897, offset: 0x0225aa88, size: 57 bytes, params: 1, frame: 4
|
||||
const closure = function(a0, a1, a2) {
|
||||
var Math = global.Math;
|
||||
return Math.min(a0 - a1 - a2, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
|
||||
};
|
||||
closure.__closure = {QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
|
||||
closure.__workletHash = 14159592925974;
|
||||
closure.__initData = env0_11;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun103166() { // fn#103166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:3773, offset: 0x0225aac1, size: 88 bytes, params: 1, frame: 14
|
||||
const closure = dimensionsLayoutTransition;
|
||||
const object2 = {};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 4497154070776;
|
||||
closure.__initData = env0_13;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function isSoftDismissed(a0) { // fn#103168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:4623, offset: 0x0225abe6, size: 46 bytes, params: 2, frame: 11
|
||||
var r0;
|
||||
var Date;
|
||||
let value = a0 != null;
|
||||
if (value) {
|
||||
Date = global.Date;
|
||||
value = Date.now() - a0;
|
||||
value = value < env0_12;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function roundToNearestPixel(a0) { // fn#103157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:487, offset: 0x0225a8f9, size: 38 bytes, params: 2, frame: 12
|
||||
const Math = global.Math;
|
||||
const round = Math.round;
|
||||
const binding = env1_6;
|
||||
return Reflect.apply(round, Math, [a0 * binding]) / binding;
|
||||
}
|
||||
|
||||
function dimensionsLayoutTransition({currentOriginX, currentOriginY, currentWidth, currentHeight, targetOriginX, targetOriginY, targetHeight, targetWidth}) { // fn#103167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:3815, offset: 0x0225ab19, size: 205 bytes, params: 2, frame: 20
|
||||
const object2 = {};
|
||||
object2.initialValues = {originX: currentOriginX, originY: currentOriginY, width: currentWidth,
|
||||
height: currentHeight};
|
||||
const object4 = {};
|
||||
const value = environment.__proto__;
|
||||
object4.originX = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginX,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS);
|
||||
object4.originY = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginY,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS);
|
||||
object4.height = (require(4577) /* metro dependency 4577: spring */).withSpring(targetHeight,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS);
|
||||
object4.width = (require(4577) /* metro dependency 4577: spring */).withSpring(targetWidth,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS);
|
||||
object2.animations = object4;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 13578; source: modules/quests/native/QuestDock/WreathIcon.tsx; dependencies: [31, 33, 697, 3859, 13579, 2] */
|
||||
function _fun103217(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13768:6, offset: 0x0225d1d5, size: 138 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;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/WreathIcon.tsx');
|
||||
exports.default = WreathIcon;
|
||||
}
|
||||
|
||||
function WreathIcon(a0) { // fn#103218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13768:208, offset: 0x0225d25f, size: 154 bytes, params: 2, frame: 20
|
||||
const style = a0.style;
|
||||
const color = a0.color;
|
||||
const r6 = color !== undefined ? color : (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
const value = Object.create(null);
|
||||
value.style = 0;
|
||||
value.color = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const BaseIconImage = (require(3859) /* metro dependency 3859: BaseIconImage */).BaseIconImage;
|
||||
return (
|
||||
<BaseIconImage
|
||||
source={require(13579) /* metro dependency 13579 */}
|
||||
color={r6}
|
||||
style={style}
|
||||
{...value2}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/* Metro module 13652; source: modules/quests/native/QuestDock/useQuestDockAnimatedBorderRadius.tsx; dependencies: [31, 13576, 4017, 2] */
|
||||
function _fun104277(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13849:6, offset: 0x0228d804, size: 130 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
object = {code: 'function useQuestDockAnimatedBorderRadiusTsx1(){const{interpolate,questDockOffset,minBorder,maxBorder,Extrapolation}=this.__closure;return interpolate(questDockOffset.get(),[0,50],[minBorder,maxBorder],Extrapolation.CLAMP);}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/useQuestDockAnimatedBorderRadius.tsx');
|
||||
exports.default = useQuestDockAnimatedBorderRadius;
|
||||
}
|
||||
|
||||
function useQuestDockAnimatedBorderRadius(a0) { // fn#104278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13849:454, offset: 0x0228d886, size: 207 bytes, params: 2, frame: 21
|
||||
const value = a1;
|
||||
const env0_0 = a0;
|
||||
const r10 = value !== undefined ? value : 0;
|
||||
const binding = undefined;
|
||||
const useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const questDockOffset = Reflect.apply(useContext, binding, [QuestDockExternalCoordinationContext]).questDockOffset;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
const closure = useQuestDockAnimatedBorderRadiusU;
|
||||
const object2 = {};
|
||||
object2.interpolate = reanimatedRexportModule.interpolate;
|
||||
object2.questDockOffset = questDockOffset;
|
||||
object2.minBorder = r10;
|
||||
object2.maxBorder = a0;
|
||||
const Extrapolation = reanimatedRexportModule.Extrapolation;
|
||||
object2.Extrapolation = Extrapolation;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 17005846780112;
|
||||
closure.__initData = env0_3;
|
||||
return Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
|
||||
}
|
||||
|
||||
function useQuestDockAnimatedBorderRadiusU() { // fn#104279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13849:621, owner: useQuestDockAnimatedBorderRadius.u, offset: 0x0228d955, size: 113 bytes, params: 1, frame: 21
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = value.interpolate;
|
||||
const value3 = questDockOffset.get();
|
||||
const items2 = [env0_1, env0_0];
|
||||
const Extrapolation = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolation;
|
||||
const CLAMP = Extrapolation.CLAMP;
|
||||
return Reflect.apply(interpolate, value, [value3, [0, 50], items2, CLAMP]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/* Metro module 13583; source: modules/quests/native/QuestDockDismissalToast.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 11808, 3857, 7548, 2] */
|
||||
function _fun103234(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13773:6, offset: 0x0225dfb8, size: 213 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.Image;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
|
||||
var object2 = {'opacity': 0.35, 'position': 'absolute', 'top': '50%', 'left': 0, 'height': 16, 'width': 16};
|
||||
object2.tintColor = importDefault(dependencyMap[4]).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object2.transform = [{translateY: -10}];
|
||||
return {toastArrowForwardIconContainer: {'height': 6, 'width': 16}, toastArrowForwardIcon: object2};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDockDismissalToast.tsx');
|
||||
exports.displayQuestDismissalToast = function() {
|
||||
var defaultImport = importDefault(dependencyMap[8]);
|
||||
var object = {key: 'QUEST_BAR_DISMISS_TOAST'};
|
||||
object.content = QuestDockDismissalNotification;
|
||||
object.icon = importDefault(dependencyMap[9]);
|
||||
object.position = 'bottom';
|
||||
defaultImport.open(object);
|
||||
};
|
||||
}
|
||||
|
||||
function QuestDockDismissalNotification() { // fn#103235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13773:402, offset: 0x0225e08d, size: 140 bytes, params: 1, frame: 19
|
||||
const env0_0 = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Text color="mobile-text-heading-primary" variant="text-sm/semibold">
|
||||
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.dYE1px, {arrowHook: arrowHook})}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function arrowHook() { // fn#103236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13773:597, owner: QuestDockDismissalNotification.arrowHook, offset: 0x0225e119, size: 102 bytes, params: 1, frame: 19
|
||||
const stylesBinding = styles;
|
||||
return (
|
||||
<View style={stylesBinding.toastArrowForwardIconContainer}>
|
||||
<Image
|
||||
resizeMode="contain"
|
||||
source={importDefault(11808) /* metro dependency 11808 */}
|
||||
style={stylesBinding.toastArrowForwardIcon}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,282 @@
|
||||
/* Metro module 10574; source: modules/quests/native/QuestEmbed.native.tsx; dependencies: [27, 1310, 7093, 6528, 661, 4118, 477, 1244, 7116, 9950, 6531, 4002, 9495, 1581, 10575, 7091, 7110, 7114, 8189, 2] */
|
||||
function _fun81578(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10760:6, offset: 0x01ed4cb0, size: 265 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).Image;
|
||||
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
|
||||
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
||||
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
|
||||
const env0_6 = questConstantsModule.QuestsExperimentLocations;
|
||||
const env0_7 = questConstantsModule.QuestEmbedFallbackReason;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
|
||||
const env0_9 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestEmbed.native.tsx');
|
||||
exports.createQuestsEmbed = function({questId, theme, currentUser}) {
|
||||
var buildQuestsEmbedPropsBinding = buildQuestsEmbedProps;
|
||||
var object = {questId: questId};
|
||||
object.themeColors = importDefault(dependencyMap[18])(theme);
|
||||
object.currentUser = currentUser;
|
||||
return buildQuestsEmbedPropsBinding(object);
|
||||
};
|
||||
}
|
||||
|
||||
function buildBaseEmbedProps({titleText, bodyText, themeColors, thumbnailUrl}) { // fn#81579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10760:244, offset: 0x01ed4db9, size: 266 bytes, params: 2, frame: 16
|
||||
const baseColors = themeColors.baseColors;
|
||||
const colors = themeColors.colors;
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, baseColors, undefined);
|
||||
const headerColor = colors.headerColor;
|
||||
object3['headerColor'] = headerColor;
|
||||
object3['titleText'] = titleText;
|
||||
object3['titleColor'] = colors.titleColor;
|
||||
object3['subtitleColor'] = colors.bodyTextColor;
|
||||
object3['bodyTextColor'] = colors.bodyTextColor;
|
||||
object3['thumbnailUrl'] = thumbnailUrl;
|
||||
object3['embedCanBeTapped'] = true;
|
||||
object3['canBeAccepted'] = true;
|
||||
const GUILD = InviteTypes.GUILD;
|
||||
object3['type'] = GUILD;
|
||||
let value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isAndroid();
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, object3, headerColor);
|
||||
if (value) {
|
||||
object4['headerText'] = null;
|
||||
object4['subtitle'] = bodyText;
|
||||
} else {
|
||||
object4['headerText'] = undefined;
|
||||
object4['subtitle'] = bodyText;
|
||||
}
|
||||
return object4;
|
||||
}
|
||||
|
||||
function buildSupportedOnMobileEmbedBodyText({quest, currentUser}) { // fn#81580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10760:651, offset: 0x01ed4ec3, size: 327 bytes, params: 2, frame: 21
|
||||
var intl;
|
||||
const expiresAt = quest.config.expiresAt;
|
||||
const Date = global.Date;
|
||||
const date = new Date();
|
||||
if (expiresAt < date.toISOString()) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['ge+AJp'],
|
||||
{questName: quest.config.messages.questName});
|
||||
}
|
||||
const questTaskDetails = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getQuestTaskDetails(quest);
|
||||
const thirdPartyTaskDetails = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getThirdPartyTaskDetails(quest);
|
||||
const questCopyHooksModule = require(9950) /* metro dependency 9950: QuestCopyHooks */;
|
||||
const getQuestsInstructionsToWinReward = questCopyHooksModule.getQuestsInstructionsToWinReward;
|
||||
const object2 = {quest: quest, taskDetails: questTaskDetails};
|
||||
const EMBED_MOBILE = QuestsExperimentLocations.EMBED_MOBILE;
|
||||
object2.location = EMBED_MOBILE;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QUEST_EMBED_MOBILE = QuestContent.QUEST_EMBED_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_EMBED_MOBILE;
|
||||
object2.thirdPartyTaskDetails = thirdPartyTaskDetails ?? undefined;
|
||||
object2.withoutMarkdown = true;
|
||||
object2.currentUser = currentUser;
|
||||
return Reflect.apply(getQuestsInstructionsToWinReward, questCopyHooksModule, [object2]);
|
||||
}
|
||||
|
||||
function buildQuestsEmbedProps({questId, themeColors, currentUser}) { // fn#81581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10760:1173, offset: 0x01ed500a, size: 1769 bytes, params: 2, frame: 36
|
||||
var r19;
|
||||
var r0;
|
||||
var baseEmbedPropsBinding;
|
||||
var moduleValue3;
|
||||
var isShareableQuest;
|
||||
var config;
|
||||
var moduleValue4;
|
||||
var buildBaseEmbedPropsBinding;
|
||||
var object3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var quest;
|
||||
var colors;
|
||||
var value4;
|
||||
var expiresAt;
|
||||
var date;
|
||||
var value7;
|
||||
var value8;
|
||||
var object4;
|
||||
var formatToPlainString;
|
||||
var EAYZAr;
|
||||
var messages;
|
||||
var moduleValue6;
|
||||
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
|
||||
var moduleValue7;
|
||||
var moduleValue8;
|
||||
var object6;
|
||||
const metaQuestUtilsAndroidModule = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
|
||||
if (metaQuestUtilsAndroidModule.isMetaQuest()) {
|
||||
object3 = {};
|
||||
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
|
||||
object6 = {};
|
||||
object6.titleText = intl.string(t['6LxbQM']);
|
||||
object6.bodyText = intl.string(t.CXEb9p);
|
||||
object6.themeColors = themeColors;
|
||||
object6.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
|
||||
copyDataProperties(object3, buildBaseEmbedPropsBinding(object6), undefined);
|
||||
object3['acceptLabelText'] = intl.string(t.hvVgAZ);
|
||||
colors = themeColors.colors;
|
||||
object3['acceptLabelBackgroundColor'] = colors.acceptBlurpleLabelBackgroundColor;
|
||||
colors = themeColors.colors;
|
||||
object3['acceptLabelColor'] = colors.acceptLabelGreenColor;
|
||||
return object3;
|
||||
}
|
||||
const questDataUtilsModule = require(7091) /* metro dependency 7091: QuestDataUtils */;
|
||||
const questOrReplacement = questDataUtilsModule.findQuestOrReplacement(questId, QuestStore.quests,
|
||||
QuestStore.excludedQuests);
|
||||
const value3 = QuestStore.excludedQuests.get(questId);
|
||||
if (questOrReplacement != null) {
|
||||
if (questOrReplacement == null) {
|
||||
if (value3 != null) {
|
||||
moduleValue8 = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
moduleValue8.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.EXCLUDED_QUEST);
|
||||
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
|
||||
object3 = {};
|
||||
object3.titleText = intl.string(t.Dd6Daw);
|
||||
object3.bodyText = intl.string(t.ii4mJo);
|
||||
object3.themeColors = themeColors;
|
||||
object3.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
|
||||
baseEmbedPropsBinding = buildBaseEmbedPropsBinding(object3);
|
||||
} else {
|
||||
moduleValue7 = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
moduleValue7.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.UNKNOWN_QUEST);
|
||||
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
|
||||
object3 = {};
|
||||
object3.titleText = intl.string(t['rxf+nx']);
|
||||
object3.bodyText = intl.string(t.Ow5AQI);
|
||||
object3.themeColors = themeColors;
|
||||
object3.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
|
||||
baseEmbedPropsBinding = buildBaseEmbedPropsBinding(object3);
|
||||
}
|
||||
r0 = baseEmbedPropsBinding;
|
||||
} else {
|
||||
moduleValue3 = require(7114) /* metro dependency 7114: QuestUtils */;
|
||||
isShareableQuest = moduleValue3.isShareableQuest;
|
||||
config = questOrReplacement.config;
|
||||
if (Reflect.apply(isShareableQuest, moduleValue3, [config])) {
|
||||
object3 = {themeColors: themeColors, quest: questOrReplacement, currentUser: currentUser};
|
||||
themeColors = object3.themeColors;
|
||||
quest = object3.quest;
|
||||
currentUser = object3.currentUser;
|
||||
colors = themeColors.colors;
|
||||
value4 = quest.userStatus?.enrolledAt != null;
|
||||
config = quest.config;
|
||||
expiresAt = config.expiresAt;
|
||||
date = new global.Date();
|
||||
value7 = expiresAt < date.toISOString();
|
||||
r19 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(ThemeStore.getState().theme) ? ThemeTypes.DARK : ThemeTypes.LIGHT;
|
||||
value8 = QuestStore.questEnrollmentBlockedUntil != null;
|
||||
object3 = {};
|
||||
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
|
||||
object4 = {};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
EAYZAr = t.EAYZAr;
|
||||
config = quest.config;
|
||||
messages = config.messages;
|
||||
object4.titleText = Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: messages.questName}]);
|
||||
config = quest.config;
|
||||
messages = config.messages;
|
||||
object4.subtitle = messages.gamePublisher;
|
||||
object4.bodyText = buildSupportedOnMobileEmbedBodyText({quest: quest, currentUser: currentUser});
|
||||
object4.themeColors = themeColors;
|
||||
moduleValue6 = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
object4.thumbnailUrl = moduleValue6.getQuestAsset(quest, QuestAssetType.GAME_TILE, r19).url;
|
||||
copyDataProperties(object3, buildBaseEmbedPropsBinding(object4), undefined);
|
||||
object3['acceptLabelText'] = value4 || value7 ? value7 ? intl.string(t.hvVgAZ) : intl.string(t['th2+0j']) : value8 ? intl.string(t['th2+0j']) : intl.string(t.kUQLMJ);
|
||||
object3['acceptLabelBackgroundColor'] = colors.acceptBlurpleLabelBackgroundColor;
|
||||
colors = themeColors.colors;
|
||||
object3['acceptLabelColor'] = colors.acceptLabelGreenColor;
|
||||
object3['thumbnailCornerRadius'] = 8;
|
||||
r0 = object3;
|
||||
} else {
|
||||
moduleValue4 = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
moduleValue4.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.NOT_SHAREABLE_QUEST);
|
||||
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
|
||||
object3 = {};
|
||||
object3.titleText = intl.string(t.Dd6Daw);
|
||||
object3.bodyText = intl.string(t.NXrP3N);
|
||||
object3.themeColors = themeColors;
|
||||
object3.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
|
||||
r0 = buildBaseEmbedPropsBinding(object3);
|
||||
}
|
||||
}
|
||||
} else if (QuestStore.isFetchingCurrentQuests) {
|
||||
r0 = buildBaseEmbedProps({themeColors: themeColors});
|
||||
} else if (questOrReplacement == null) {
|
||||
if (value3 != null) {
|
||||
moduleValue8 = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
moduleValue8.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.EXCLUDED_QUEST);
|
||||
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
|
||||
object3 = {};
|
||||
object3.titleText = intl.string(t.Dd6Daw);
|
||||
object3.bodyText = intl.string(t.ii4mJo);
|
||||
object3.themeColors = themeColors;
|
||||
object3.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
|
||||
baseEmbedPropsBinding = buildBaseEmbedPropsBinding(object3);
|
||||
} else {
|
||||
moduleValue7 = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
moduleValue7.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.UNKNOWN_QUEST);
|
||||
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
|
||||
object3 = {};
|
||||
object3.titleText = intl.string(t['rxf+nx']);
|
||||
object3.bodyText = intl.string(t.Ow5AQI);
|
||||
object3.themeColors = themeColors;
|
||||
object3.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
|
||||
baseEmbedPropsBinding = buildBaseEmbedPropsBinding(object3);
|
||||
}
|
||||
r0 = baseEmbedPropsBinding;
|
||||
} else {
|
||||
moduleValue3 = require(7114) /* metro dependency 7114: QuestUtils */;
|
||||
isShareableQuest = moduleValue3.isShareableQuest;
|
||||
config = questOrReplacement.config;
|
||||
if (Reflect.apply(isShareableQuest, moduleValue3, [config])) {
|
||||
object3 = {themeColors: themeColors, quest: questOrReplacement, currentUser: currentUser};
|
||||
themeColors = object3.themeColors;
|
||||
quest = object3.quest;
|
||||
currentUser = object3.currentUser;
|
||||
colors = themeColors.colors;
|
||||
value4 = quest.userStatus?.enrolledAt != null;
|
||||
config = quest.config;
|
||||
expiresAt = config.expiresAt;
|
||||
date = new global.Date();
|
||||
value7 = expiresAt < date.toISOString();
|
||||
r19 = (require(4002) /* metro dependency 4002: shared */).isThemeDark(ThemeStore.getState().theme) ? ThemeTypes.DARK : ThemeTypes.LIGHT;
|
||||
value8 = QuestStore.questEnrollmentBlockedUntil != null;
|
||||
object3 = {};
|
||||
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
|
||||
object4 = {};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
EAYZAr = t.EAYZAr;
|
||||
config = quest.config;
|
||||
messages = config.messages;
|
||||
object4.titleText = Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: messages.questName}]);
|
||||
config = quest.config;
|
||||
messages = config.messages;
|
||||
object4.subtitle = messages.gamePublisher;
|
||||
object4.bodyText = buildSupportedOnMobileEmbedBodyText({quest: quest, currentUser: currentUser});
|
||||
object4.themeColors = themeColors;
|
||||
moduleValue6 = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
object4.thumbnailUrl = moduleValue6.getQuestAsset(quest, QuestAssetType.GAME_TILE, r19).url;
|
||||
copyDataProperties(object3, buildBaseEmbedPropsBinding(object4), undefined);
|
||||
object3['acceptLabelText'] = value4 || value7 ? value7 ? intl.string(t.hvVgAZ) : intl.string(t['th2+0j']) : value8 ? intl.string(t['th2+0j']) : intl.string(t.kUQLMJ);
|
||||
object3['acceptLabelBackgroundColor'] = colors.acceptBlurpleLabelBackgroundColor;
|
||||
colors = themeColors.colors;
|
||||
object3['acceptLabelColor'] = colors.acceptLabelGreenColor;
|
||||
object3['thumbnailCornerRadius'] = 8;
|
||||
r0 = object3;
|
||||
} else {
|
||||
moduleValue4 = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
moduleValue4.trackQuestEmbedFallbackViewed(questId, QuestEmbedFallbackReason.NOT_SHAREABLE_QUEST);
|
||||
buildBaseEmbedPropsBinding = buildBaseEmbedProps;
|
||||
object3 = {};
|
||||
object3.titleText = intl.string(t.Dd6Daw);
|
||||
object3.bodyText = intl.string(t.NXrP3N);
|
||||
object3.themeColors = themeColors;
|
||||
object3.thumbnailUrl = Image.resolveAssetSource(importDefault(10575) /* metro dependency 10575 */).uri;
|
||||
r0 = buildBaseEmbedPropsBinding(object3);
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
/* Metro module 13638; source: modules/quests/native/QuestEnrollmentBlockedBottomSheet/QuestEnrollmentBlockedBottomSheet.tsx; dependencies: [31, 27, 7093, 33, 4501, 697, 566, 10183, 6531, 7054, 6275, 4573, 1244, 2] */
|
||||
function _fun104141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:6, offset: 0x02287abf, size: 373 bytes, params: 8, frame: 22
|
||||
var object4;
|
||||
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 questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.paddingTop = PX_16;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object5.gap = PX_24;
|
||||
object4.heading = object5;
|
||||
const object6 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingHorizontal = PX_16;
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object6.paddingBottom = PX_32;
|
||||
object4.container = object6;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestEnrollmentBlockedBottomSheet/QuestEnrollmentBlockedBottomSheet.tsx');
|
||||
exports.default = QuestEnrollmentBlockedBottomSheetConnected;
|
||||
}
|
||||
|
||||
function QuestEnrollmentBlockedBottomSheet({questEnrollmentBlockedUntil}) { // fn#104142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:474, offset: 0x02287c34, size: 541 bytes, params: 2, frame: 36
|
||||
var r2;
|
||||
var r0;
|
||||
var date;
|
||||
var BottomSheet;
|
||||
var object;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var formatToPlainString;
|
||||
var property;
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const defaultImport = importDefault(7054) /* metro dependency 7054: useCountdown */;
|
||||
if (questEnrollmentBlockedUntil != null) {
|
||||
r2 = questEnrollmentBlockedUntil;
|
||||
} else {
|
||||
date = new global.Date();
|
||||
}
|
||||
const {hours, minutes, seconds} = defaultImport(r2);
|
||||
let String = global.String;
|
||||
const value7 = String(hours).padStart(2, '0');
|
||||
String = global.String;
|
||||
const value9 = String(minutes).padStart(2, '0');
|
||||
String = global.String;
|
||||
if (questEnrollmentBlockedUntil == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
var bottomSheetProps = {'header': null, 'footer': null, 'startExpanded': true,
|
||||
header: <View style={styles.heading}><Text variant="heading-xl/bold">{intl.string(t['XEHDT/'])}</Text></View>};
|
||||
var viewBindingProps2 = {style: styles.container};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
property = t['+5XVH+'];
|
||||
object2 = {};
|
||||
object2.countdownString = '' + value7 + ':' + value9 + ':' + String(seconds).padStart(2, '0');
|
||||
r0 = <BottomSheet {...bottomSheetProps}><View {...viewBindingProps2}><Text variant="text-md/normal">{Reflect.apply(formatToPlainString,
|
||||
|
||||
intl, [property, object2])}</Text></View></BottomSheet>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function QuestEnrollmentBlockedBottomSheetConnected({questId, questEnrollmentBlockedUntil, questContentPosition, sourceQuestContent}) { // fn#104143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:1244, offset: 0x02287e51, size: 207 bytes, params: 2, frame: 21
|
||||
const quest = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], function() {
|
||||
return QuestStore.getQuest(questId);
|
||||
});
|
||||
if (quest == null) {
|
||||
return null;
|
||||
} else {
|
||||
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
||||
return (
|
||||
<QuestContentImpressionTrackerNative
|
||||
overrideVisibility
|
||||
questOrQuests={quest}
|
||||
questContent={(require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_ENROLLMENT_BLOCKED_BOTTOM_SHEET}
|
||||
questContentPosition={questContentPosition}
|
||||
sourceQuestContent={sourceQuestContent}
|
||||
>
|
||||
{children_104145}
|
||||
</QuestContentImpressionTrackerNative>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function QuestEnrollmentBlockedBottomSheetConnectedChildren() { // fn#104145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13835:1671, owner: QuestEnrollmentBlockedBottomSheetConnected.children, offset: 0x02287f3b, size: 53 bytes, params: 1, frame: 14
|
||||
return (
|
||||
<QuestEnrollmentBlockedBottomSheet
|
||||
questId={questId}
|
||||
questEnrollmentBlockedUntil={questEnrollmentBlockedUntil}
|
||||
sourceQuestContent={sourceQuestContent}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
/* Metro module 13622; source: modules/quests/native/QuestGameLogotype.tsx; dependencies: [57, 31, 27, 33, 4581, 4501, 697, 4017, 4577, 7744, 5475, 2] */
|
||||
function _fun104037(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:6, offset: 0x02281ae4, size: 317 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.View;
|
||||
const env0_6 = value2.Image;
|
||||
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, (require(4581) /* metro dependency 4581: springPresets */).springSlow, undefined);
|
||||
object2['overshootClamping'] = true;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{logo: {marginBottom: PX_4}}]);
|
||||
object2 = {code: "function QuestGameLogotypeTsx1(){const{withSpring,logoDimensionStyles,SPRING_CONFIG}=this.__closure;return{opacity:withSpring(logoDimensionStyles==null?0:1,SPRING_CONFIG,'animate-always')};}"};
|
||||
value = value.memo(_fun104038);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestGameLogotype.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun104038({assetUrl, width, height, maxWidth, maxHeight, style, onError}) { // fn#104038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:483, offset: 0x02281c21, size: 572 bytes, params: 2, frame: 26
|
||||
var r4;
|
||||
width = width === undefined ? 120 : width;
|
||||
const env0_3 = maxWidth;
|
||||
const env0_4 = maxHeight;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
const [property, env0_6] = env0_3(binding.useState(null), 2);
|
||||
const value4 = binding.useMemo(_fun104039, [property, width, height, maxWidth, maxHeight]);
|
||||
binding.useEffect(function() {
|
||||
Image.getSize(assetUrl, _fun104041);
|
||||
}, [assetUrl]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = C_104042;
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
logoDimensionStyles: value4, SPRING_CONFIG: env0_8};
|
||||
closure.__workletHash = 11242802634598;
|
||||
closure.__initData = env0_10;
|
||||
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const value6 = binding.useMemo(function() {
|
||||
return assetUrl.endsWith('.svg');
|
||||
}, [assetUrl]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [value5, style];
|
||||
if (value6) {
|
||||
r4 = <View style={[value4,
|
||||
styles.logo]}>{((SvgUri) => <SvgUri height="100%" width="100%" uri={assetUrl} onError={onError} />)((require(7744) /* metro dependency 7744 */).SvgUri)}</View>;
|
||||
} else {
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component source={{uri: assetUrl}} style={[value4,
|
||||
styles.logo]} onError={onError} />)(value);
|
||||
r4 = value;
|
||||
}
|
||||
return (
|
||||
<View2 style={items2}>
|
||||
{r4}
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104039() { // fn#104039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:633, offset: 0x02281e5d, size: 204 bytes, params: 1, frame: 17
|
||||
var r0;
|
||||
var value2;
|
||||
var Math;
|
||||
if (env0_5 != null) {
|
||||
value2 = env0_5.width / env0_5.height;
|
||||
r0 = height != null ? {height: height, width: height * value2} : {height: width / value2, width: width};
|
||||
if (maxWidth != null) {
|
||||
Math = global.Math;
|
||||
r0.width = Math.min(maxWidth, r0.width);
|
||||
r0.height = r0.width / value2;
|
||||
}
|
||||
if (maxHeight != null) {
|
||||
Math = global.Math;
|
||||
r0.height = Math.min(maxHeight, r0.height);
|
||||
r0.width = r0.height * value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun104040() { // fn#104040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:883, offset: 0x02281f29, size: 39 bytes, params: 1, frame: 13
|
||||
Image.getSize(assetUrl, _fun104041);
|
||||
}
|
||||
|
||||
function C_104042() { // fn#104042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:988, offset: 0x02281f82, size: 76 bytes, params: 1, frame: 16
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
return {opacity: springModule.withSpring(env0_7 == null ? 0 : 1, env1_8, 'animate-always')};
|
||||
}
|
||||
|
||||
function _fun104041(a0, a1) { // fn#104041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13819:901, offset: 0x02281f50, size: 50 bytes, params: 3, frame: 13
|
||||
let value = a0 > 0;
|
||||
if (value && a1 > 0) {
|
||||
value = environment.__proto__;
|
||||
env1_6({width: a0, height: a1});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,703 @@
|
||||
/* Metro module 13514; source: modules/quests/native/QuestHome.tsx; dependencies: [57, 31, 27, 4502, 9481, 7093, 7115, 6528, 661, 33, 4501, 697, 566, 1484, 13515, 694, 9535, 9534, 13555, 4578, 1244, 5080, 7007, 9483, 9530, 4573, 5278, 13557, 4068, 13559, 9479, 1585, 7091, 9484, 7121, 3857, 8947, 683, 8742, 480, 13566, 4127, 9528, 1485, 7114, 8416, 10183, 6531, 13567, 2] */
|
||||
function _fun102639(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:6, offset: 0x022431ad, size: 678 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.View;
|
||||
const env0_6 = value2.ActivityIndicator;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const questHomeNavigationStore = importDefault(9481) /* metro dependency 9481: QuestHomeNavigationStore */;
|
||||
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
||||
const questUtmStore = importDefault(7115) /* metro dependency 7115: QuestUtmStore */;
|
||||
const env0_11 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_12 = constantsModule.AnalyticEvents;
|
||||
const env0_13 = constantsModule.UserSettingsSections;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_14 = value4.jsx;
|
||||
const env0_15 = value4.jsxs;
|
||||
const env0_16 = value4.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.container = {flex: 1};
|
||||
const object5 = {};
|
||||
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
|
||||
object5['justifyContent'] = 'center';
|
||||
object5['alignItems'] = 'center';
|
||||
object2.loadingContainer = object5;
|
||||
const object7 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object7.marginBottom = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object7.paddingHorizontal = PX_16;
|
||||
object2.sectionHeader = object7;
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.sectionHeaderRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_4};
|
||||
const object8 = {};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.marginBottom = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.paddingHorizontal = PX_16;
|
||||
object8.backgroundColor = 'transparent';
|
||||
object2.previewButton = object8;
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.sectionHeaderWithTag = {gap: PX_4};
|
||||
const env0_17 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
const env0_18 = value.memo(_fun102646);
|
||||
value = value.memo(QuestHome);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestHome.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function EmptyStateNoQuestsAvailable() { // fn#102640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:813, offset: 0x02243453, size: 197 bytes, params: 1, frame: 22
|
||||
const value3 = env0_4.useCallback(_fun102641,
|
||||
[(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation()]);
|
||||
const QuestHomeEmptyState = importDefault(13555) /* metro dependency 13555: QuestHomeEmptyState */;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<QuestHomeEmptyState
|
||||
action={<Button variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/g10LC'])} onPress={value3} />}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function EmptyStateFiltered({onClearFilters}) { // fn#102642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:1048, offset: 0x0224352b, size: 251 bytes, params: 2, frame: 23
|
||||
const QuestHomeEmptyState = importDefault(13555) /* metro dependency 13555: QuestHomeEmptyState */;
|
||||
const object2 = {};
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
object2.action = <Button variant="secondary" text={Reflect.apply(string, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t.urZl31])} onPress={onClearFilters} />;
|
||||
string = intl.string;
|
||||
const PBfFnx = (require(1244) /* metro dependency 1244: indexNative */).t.PBfFnx;
|
||||
object2.title = Reflect.apply(string, intl, [PBfFnx]);
|
||||
object2.subtitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nwdKFC);
|
||||
return <QuestHomeEmptyState {...object2} />;
|
||||
}
|
||||
|
||||
function HeaderPreviewButton() { // fn#102643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:1315, offset: 0x02243626, size: 217 bytes, params: 1, frame: 22
|
||||
var r0;
|
||||
var Button;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
if ((require(9483) /* metro dependency 9483: QuestHooks */).useShouldShowPreviewToolTab()) {
|
||||
var viewBindingProps = {style: styles.previewButton};
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var buttonProps = {'grow': true, 'onPress': null, 'variant': 'primary', onPress: env0_4.useCallback(function() {
|
||||
importDefault(dependencyMap[21]).popAll();
|
||||
require(dependencyMap[22]).openUserSettings({screen: UserSettingsSections.QUEST_PREVIEW_TOOL_2});
|
||||
}, [])};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tx5Ax5);
|
||||
r0 = <View {...viewBindingProps}><Button {...buttonProps} /></View>;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function HeaderWithBounties() { // fn#102645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:1652, offset: 0x02243750, size: 662 bytes, params: 1, frame: 31
|
||||
var r5;
|
||||
var object2;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items3;
|
||||
var PressableOpacity;
|
||||
var object4;
|
||||
const styles = useStyles();
|
||||
const BountiesStage1Experiment = (require(9530) /* metro dependency 9530: BountiesStage1Experiment */).BountiesStage1Experiment;
|
||||
const useConfig = BountiesStage1Experiment.useConfig;
|
||||
const QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
|
||||
const verticalScrollEnabled = Reflect.apply(useConfig, BountiesStage1Experiment,
|
||||
[{location: QUEST_HOME_MOBILE}]).verticalScrollEnabled;
|
||||
const jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
|
||||
const items2 = [<HeaderPreviewButton />];
|
||||
if (verticalScrollEnabled) {
|
||||
r5 = !verticalScrollEnabled;
|
||||
} else {
|
||||
var viewProps = {style: [styles.sectionHeader, styles.sectionHeaderRow]};
|
||||
string = intl.string;
|
||||
items3 = [<Text variant="text-lg/bold">{Reflect.apply(string, intl, [t.qetVDw])}</Text>];
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
var pressableOpacityProps = {onPress: importDefault(13557) /* metro dependency 13557: openBountiesNuxPromoSheet */,
|
||||
|
||||
hitSlop: 14};
|
||||
string = intl.string;
|
||||
pressableOpacityProps['aria-label'] = Reflect.apply(string, intl, [t.hvVgAZ]);
|
||||
pressableOpacityProps.accessibilityRole = 'button';
|
||||
items3[1] = <PressableOpacity {...pressableOpacityProps}>{((CircleInformationIcon) => <CircleInformationIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE} />)((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon)}</PressableOpacity>;
|
||||
r5 = <View {...viewProps}>{items3}</View>;
|
||||
}
|
||||
items2[1] = r5;
|
||||
items2[2] = ((Component) => <Component verticalScrollEnabled={verticalScrollEnabled} />)(importDefault(13559) /* metro dependency 13559: QuestHomeBounties */);
|
||||
const items4 = [styles.sectionHeader];
|
||||
items4[1] = styles.sectionHeaderWithTag;
|
||||
string = intl.string;
|
||||
const JALI2K = (require(1244) /* metro dependency 1244: indexNative */).t.JALI2K;
|
||||
items2[3] = <View style={items4}><Text variant="text-lg/semibold" color="white">{Reflect.apply(string, intl,
|
||||
[JALI2K])}</Text></View>;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun102646({shouldShowBounties, onLayout}) { // fn#102646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:2451, offset: 0x022439e6, size: 72 bytes, params: 2, frame: 16
|
||||
return (
|
||||
<View onLayout={onLayout}>
|
||||
{((Component) => <Component />)(shouldShowBounties ? HeaderWithBounties : HeaderPreviewButton)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestHome({containerStyle, isNavigationComplete, scrollToQuestId, filters, sortMethod, onClearFilters}) { // fn#102647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:2593, offset: 0x02243a2e, size: 1507 bytes, params: 2, frame: 38
|
||||
var object4;
|
||||
var r1;
|
||||
var r0;
|
||||
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const isEligibleForQuests = (require(9479) /* metro dependency 9479: QuestsEligibility */).getIsEligibleForQuests();
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
|
||||
const useFilteredQuests = questHooksModule.useFilteredQuests;
|
||||
const QuestTabs = questHooksModule.QuestTabs;
|
||||
let ALL = QuestTabs.ALL;
|
||||
const binding = env0_4;
|
||||
const useMemo = binding.useMemo;
|
||||
const value4 = Reflect.apply(useFilteredQuests, questHooksModule, [ALL, Reflect.apply(useMemo, binding,
|
||||
[function() {
|
||||
return {filters: filters, sortMethod: sortMethod};
|
||||
}, [filters, sortMethod]])]);
|
||||
const quests = value4.quests;
|
||||
var env0_4 = quests;
|
||||
const excludedQuests = value4.excludedQuests;
|
||||
const isFetchingCurrentQuests = value4.isFetchingCurrentQuests;
|
||||
const hasFetched = value4.hasFetched;
|
||||
env0_4.useEffect(_fun102652, [(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([QuestStore],
|
||||
_fun102649, [])]);
|
||||
const env0_9 = env0_4.useRef(null);
|
||||
const value7 = env0_4.useMemo(_fun102653, [scrollToQuestId, quests, excludedQuests]);
|
||||
env0_4.useEffect(_fun102655, [scrollToQuestId, quests, excludedQuests, hasFetched, isFetchingCurrentQuests]);
|
||||
const value8 = _fun102656({scrollToIndex: value7});
|
||||
const scrollViewRef = value8.scrollViewRef;
|
||||
const handleListScroll = value8.handleListScroll;
|
||||
const handleListLayout = value8.handleListLayout;
|
||||
const handleListLoad = value8.handleListLoad;
|
||||
const env0_11 = value8.handleQuestCardLayout;
|
||||
const handleHeaderLayout = value8.handleHeaderLayout;
|
||||
const env0_13 = value8.visibilityRef;
|
||||
const value9 = QuestUtmStore(function(a0) {
|
||||
return a0.getUtmCurrentContext();
|
||||
});
|
||||
const defaultImport = importDefault(8742) /* metro dependency 8742: useTrackImpression */;
|
||||
object4 = {};
|
||||
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
|
||||
const QUEST_HOME = ImpressionNames.QUEST_HOME;
|
||||
object4.name = QUEST_HOME;
|
||||
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
|
||||
const VIEW = ImpressionTypes.VIEW;
|
||||
object4.type = VIEW;
|
||||
ALL = QuestTabs.ALL;
|
||||
object4.properties = {utm_source_current: value9.utmSourceCurrent, utm_medium_current: value9.utmMediumCurrent,
|
||||
utm_campaign_current: value9.utmCampaignCurrent, utm_content_current: value9.utmContentCurrent, tab: ALL};
|
||||
defaultImport(object4);
|
||||
env0_4.useEffect(_fun102667, [isEligibleForQuests]);
|
||||
env0_4.useEffect(function() {
|
||||
if (scrollViewRef.current != null && hasFetched) {
|
||||
scrollViewRef.current.scrollToOffset({'offset': 0, 'animated': false});
|
||||
}
|
||||
}, [filters, sortMethod, hasFetched, scrollViewRef]);
|
||||
questHooksModule.useQuestHomeSortingFilteringAnalytics({selectedSortMethod: sortMethod, selectedFilters: filters,
|
||||
numQuestsVisible: quests.length});
|
||||
const useVirtualCurrencyMobileEnabledModule = require(4127) /* metro dependency 4127: useVirtualCurrencyMobileEnabled */;
|
||||
const useVirtualCurrencyMobileEnabled = useVirtualCurrencyMobileEnabledModule.useVirtualCurrencyMobileEnabled;
|
||||
const enabled = Reflect.apply(useVirtualCurrencyMobileEnabled, useVirtualCurrencyMobileEnabledModule, []).enabled;
|
||||
const QuestHomeBountiesExperiment = (require(9528) /* metro dependency 9528: QuestHomeBountiesExperiment */).QuestHomeBountiesExperiment;
|
||||
const useConfig = QuestHomeBountiesExperiment.useConfig;
|
||||
object4 = {};
|
||||
const QUEST_HOME_MOBILE = QuestsExperimentLocations.QUEST_HOME_MOBILE;
|
||||
object4.location = QUEST_HOME_MOBILE;
|
||||
const enabled2 = Reflect.apply(useConfig, QuestHomeBountiesExperiment, [object4]).enabled;
|
||||
const moduleValue6 = require(1485) /* metro dependency 1485 */;
|
||||
const useRoute = moduleValue6.useRoute;
|
||||
const {isLoading,
|
||||
questHomeBounties} = questHooksModule.useFetchQuestHomeBounties({previewAdCreativeIds: Reflect.apply(useRoute,
|
||||
moduleValue6, []).params?.previewAdCreativeIds});
|
||||
const r4 = enabled && enabled2 && (require(7114) /* metro dependency 7114: QuestUtils */).shouldShowBountiesGivenFilters(filters);
|
||||
useSurveyActions({bountiesAvailable: r4 && !isLoading && questHomeBounties.length > 0});
|
||||
const value13 = env0_4.useCallback(_fun102679, [r4, handleHeaderLayout]);
|
||||
if (isEligibleForQuests) {
|
||||
if (isNavigationComplete) {
|
||||
if (r4) {
|
||||
if (isLoading) {
|
||||
r1 = <View style={[styles.loadingContainer, containerStyle]}><ActivityIndicator animating /></View>;
|
||||
} else if (isFetchingCurrentQuests) {
|
||||
if (quests.length === 0) {
|
||||
r1 = <View style={[styles.loadingContainer,
|
||||
containerStyle]}><ActivityIndicator animating /></View>;
|
||||
} else if (quests.length === 0) {
|
||||
r1 = filters.length === 0 ? <EmptyStateNoQuestsAvailable /> : <EmptyStateFiltered onClearFilters={onClearFilters} />;
|
||||
} else {
|
||||
object4 = {ref: scrollViewRef};
|
||||
object2 = {};
|
||||
object2.paddingTop = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.paddingBottom = bottom;
|
||||
object4.contentContainerStyle = object2;
|
||||
object4.style = [styles.container, containerStyle];
|
||||
object4.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.JALI2K);
|
||||
object4.data = quests;
|
||||
object4.renderItem = renderItem_102680;
|
||||
object4.estimatedItemSize = (require(13567) /* metro dependency 13567: QuestCard */).ESTIMATED_CARD_HEIGHT;
|
||||
object4.showsHorizontalScrollIndicator = false;
|
||||
object4.ListHeaderComponent = value13;
|
||||
object4.CellRendererComponent = CellRendererComponent;
|
||||
object4.onLayout = handleListLayout;
|
||||
object4.onScroll = handleListScroll;
|
||||
object4.onLoad = handleListLoad;
|
||||
object4.scrollEventThrottle = 16;
|
||||
r1 = <FlashList {...object4} />;
|
||||
}
|
||||
} else if (quests.length === 0) {
|
||||
r1 = filters.length === 0 ? <EmptyStateNoQuestsAvailable /> : <EmptyStateFiltered onClearFilters={onClearFilters} />;
|
||||
} else {
|
||||
object4 = {ref: scrollViewRef};
|
||||
object2 = {};
|
||||
object2.paddingTop = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.paddingBottom = bottom;
|
||||
object4.contentContainerStyle = object2;
|
||||
object4.style = [styles.container, containerStyle];
|
||||
object4.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.JALI2K);
|
||||
object4.data = quests;
|
||||
object4.renderItem = renderItem_102680;
|
||||
object4.estimatedItemSize = (require(13567) /* metro dependency 13567: QuestCard */).ESTIMATED_CARD_HEIGHT;
|
||||
object4.showsHorizontalScrollIndicator = false;
|
||||
object4.ListHeaderComponent = value13;
|
||||
object4.CellRendererComponent = CellRendererComponent;
|
||||
object4.onLayout = handleListLayout;
|
||||
object4.onScroll = handleListScroll;
|
||||
object4.onLoad = handleListLoad;
|
||||
object4.scrollEventThrottle = 16;
|
||||
r1 = <FlashList {...object4} />;
|
||||
}
|
||||
} else if (isFetchingCurrentQuests) {
|
||||
if (quests.length === 0) {
|
||||
r1 = <View style={[styles.loadingContainer, containerStyle]}><ActivityIndicator animating /></View>;
|
||||
} else if (quests.length === 0) {
|
||||
r1 = filters.length === 0 ? <EmptyStateNoQuestsAvailable /> : <EmptyStateFiltered onClearFilters={onClearFilters} />;
|
||||
} else {
|
||||
object4 = {ref: scrollViewRef};
|
||||
object2 = {};
|
||||
object2.paddingTop = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.paddingBottom = bottom;
|
||||
object4.contentContainerStyle = object2;
|
||||
object4.style = [styles.container, containerStyle];
|
||||
object4.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.JALI2K);
|
||||
object4.data = quests;
|
||||
object4.renderItem = renderItem_102680;
|
||||
object4.estimatedItemSize = (require(13567) /* metro dependency 13567: QuestCard */).ESTIMATED_CARD_HEIGHT;
|
||||
object4.showsHorizontalScrollIndicator = false;
|
||||
object4.ListHeaderComponent = value13;
|
||||
object4.CellRendererComponent = CellRendererComponent;
|
||||
object4.onLayout = handleListLayout;
|
||||
object4.onScroll = handleListScroll;
|
||||
object4.onLoad = handleListLoad;
|
||||
object4.scrollEventThrottle = 16;
|
||||
r1 = <FlashList {...object4} />;
|
||||
}
|
||||
} else if (quests.length === 0) {
|
||||
r1 = filters.length === 0 ? <EmptyStateNoQuestsAvailable /> : <EmptyStateFiltered onClearFilters={onClearFilters} />;
|
||||
} else {
|
||||
object4 = {ref: scrollViewRef};
|
||||
object2 = {};
|
||||
object2.paddingTop = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.paddingBottom = bottom;
|
||||
object4.contentContainerStyle = object2;
|
||||
object4.style = [styles.container, containerStyle];
|
||||
object4.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.JALI2K);
|
||||
object4.data = quests;
|
||||
object4.renderItem = renderItem_102680;
|
||||
object4.estimatedItemSize = (require(13567) /* metro dependency 13567: QuestCard */).ESTIMATED_CARD_HEIGHT;
|
||||
object4.showsHorizontalScrollIndicator = false;
|
||||
object4.ListHeaderComponent = value13;
|
||||
object4.CellRendererComponent = CellRendererComponent;
|
||||
object4.onLayout = handleListLayout;
|
||||
object4.onScroll = handleListScroll;
|
||||
object4.onLoad = handleListLoad;
|
||||
object4.scrollEventThrottle = 16;
|
||||
r1 = <FlashList {...object4} />;
|
||||
}
|
||||
} else {
|
||||
r1 = <View style={[styles.loadingContainer, containerStyle]}><ActivityIndicator animating /></View>;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun102649() { // fn#102649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:2995, offset: 0x0224402a, size: 88 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const Array = global.Array;
|
||||
const from = Array.from;
|
||||
let value = environment.__proto__;
|
||||
const quests = QuestStore.quests;
|
||||
value = Reflect.apply(from, Array, [quests.values()]);
|
||||
value = value.filter(_fun102650);
|
||||
value = value.map(function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
return value.sort();
|
||||
}
|
||||
|
||||
function _fun102652() { // fn#102652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:3110, offset: 0x022440ae, size: 87 bytes, params: 1, frame: 16
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (env0_8.length > 0) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(9484) /* metro dependency 9484: QuestActionCreators */;
|
||||
moduleValue.markAdContentSeen((require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST,
|
||||
env0_8);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102653() { // fn#102653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:3228, offset: 0x02244105, size: 104 bytes, params: 1, frame: 18
|
||||
const scrollToQuestIdBinding = scrollToQuestId;
|
||||
const value2 = null;
|
||||
if (value2 == scrollToQuestIdBinding) {
|
||||
return value2;
|
||||
}
|
||||
const questDataUtilsModule = require(7091) /* metro dependency 7091: QuestDataUtils */;
|
||||
return value2 == questDataUtilsModule.findQuestOrReplacement(scrollToQuestId, quests,
|
||||
excludedQuests) ? value2 : quests.findIndex(_fun102654);
|
||||
}
|
||||
|
||||
function _fun102655() { // fn#102655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:3375, offset: 0x0224416d, size: 316 bytes, params: 1, frame: 22
|
||||
var value5;
|
||||
var moduleValue;
|
||||
var defaultImport;
|
||||
var open;
|
||||
var object2;
|
||||
var intl;
|
||||
var defaultImport2;
|
||||
var track;
|
||||
var QUEST_HOME_MOBILE_DEEP_LINK_MISSING_QUEST;
|
||||
if (scrollToQuestId != null && scrollToQuestId !== '' && hasFetched && !isFetchingCurrentQuests) {
|
||||
value5 = environment.__proto__;
|
||||
moduleValue = require(7091) /* metro dependency 7091: QuestDataUtils */;
|
||||
if (moduleValue.findQuestOrReplacement(scrollToQuestId, quests,
|
||||
excludedQuests) == null && env0_9.current !== scrollToQuestId) {
|
||||
defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
open = defaultImport.open;
|
||||
object2 = {key: 'QUEST_HOME_MOBILE_DEEP_LINK_QUEST_NOT_FOUND'};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sIyHuY);
|
||||
object2.icon = importDefault(8947) /* metro dependency 8947 */;
|
||||
object2.toastDurationMs = 5000;
|
||||
Reflect.apply(open, defaultImport, [object2]);
|
||||
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport2.track;
|
||||
QUEST_HOME_MOBILE_DEEP_LINK_MISSING_QUEST = AnalyticEvents.QUEST_HOME_MOBILE_DEEP_LINK_MISSING_QUEST;
|
||||
scrollToQuestIdBinding = scrollToQuestId;
|
||||
Reflect.apply(track, defaultImport2, [QUEST_HOME_MOBILE_DEEP_LINK_MISSING_QUEST,
|
||||
{quest_id: scrollToQuestIdBinding}]);
|
||||
env0_9.current = scrollToQuestIdBinding;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102656({scrollToIndex}) { // fn#102656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:3725, offset: 0x022442a9, size: 472 bytes, params: 2, frame: 25
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const value2 = env1_4.useRef(null);
|
||||
const value3 = env1_4.useRef({parent: {scrollY: 0}, children: {}});
|
||||
const value4 = env1_4.useCallback(_fun102658, []);
|
||||
const value5 = env1_4.useCallback(_fun102659, [value4]);
|
||||
const value6 = env1_4.useCallback(_fun102660, [value4]);
|
||||
const [property, env0_6] = env1_3(env1_4.useState(false), 2);
|
||||
const value9 = env1_4.useCallback(_fun102661, []);
|
||||
const value10 = env1_4.useCallback(_fun102662, [value4]);
|
||||
const value11 = env1_4.useCallback(_fun102663, [useReducedMotion]);
|
||||
const value12 = env1_4.useCallback(_fun102664, [value4]);
|
||||
env1_4.useEffect(_fun102665, [property, useReducedMotion, scrollToIndex, value11]);
|
||||
return {scrollViewRef: value2, handleListScroll: value5, handleListLayout: value6, handleListLoad: value9,
|
||||
handleQuestCardLayout: value10, handleHeaderLayout: value12, visibilityRef: value3};
|
||||
}
|
||||
|
||||
function _fun102667() { // fn#102667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:5381, offset: 0x022446db, size: 55 bytes, params: 1, frame: 11
|
||||
if (env0_3) {
|
||||
value = environment.__proto__;
|
||||
(require(13566) /* metro dependency 13566: QuestHomeOpenTriggerPoint */).QuestHomeOpenTriggerPoint.trigger();
|
||||
}
|
||||
}
|
||||
|
||||
function useSurveyActions({bountiesAvailable}) { // fn#102669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:6022, owner: QuestHome.useSurveyActions, offset: 0x02244750, size: 224 bytes, params: 2, frame: 17
|
||||
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const env0_2 = env1_4.useRef(false);
|
||||
const env0_3 = env1_4.useRef(false);
|
||||
const env0_4 = env1_4.useRef(false);
|
||||
env1_4.useEffect(_fun102670, [bountiesAvailable]);
|
||||
env1_4.useEffect(_fun102671, []);
|
||||
env1_4.useEffect(_fun102674, []);
|
||||
env1_4.useEffect(_fun102677, [value2]);
|
||||
}
|
||||
|
||||
function _fun102679() { // fn#102679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:7042, offset: 0x02244a57, size: 44 bytes, params: 1, frame: 14
|
||||
return ((Component) => <Component shouldShowBounties={env0_14} onLayout={handleHeaderLayout} />)(env1_18);
|
||||
}
|
||||
|
||||
function QuestHomeRenderItem({item, index}) { // fn#102680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:7493, owner: QuestHome.renderItem, offset: 0x02244a83, size: 169 bytes, params: 2, frame: 21
|
||||
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
||||
const object2 = {questOrQuests: item};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_HOME_MOBILE = QuestContent.QUEST_HOME_MOBILE;
|
||||
object2.questContent = QUEST_HOME_MOBILE;
|
||||
object2.questContentPosition = index;
|
||||
object2.trackGuildAndChannelMetadata = false;
|
||||
object2.visibilityRef = visibilityRef;
|
||||
QUEST_HOME_MOBILE = QuestContent.QUEST_HOME_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_HOME_MOBILE;
|
||||
return (
|
||||
<QuestContentImpressionTrackerNative {...object2} key={item.id}>
|
||||
{children_102681}
|
||||
</QuestContentImpressionTrackerNative>
|
||||
);
|
||||
}
|
||||
|
||||
function CellRendererComponent(a0) { // fn#102682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:8046, owner: QuestHome.CellRendererComponent, offset: 0x02244b98, size: 80 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
const CellContainer = (require(8416) /* metro dependency 8416: flashList */).CellContainer;
|
||||
return <CellContainer {...a0} {...{['onLayout']: CellRendererComponentOnLayout}} />;
|
||||
}
|
||||
|
||||
function _fun102650(a0) { // fn#102650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:3037, offset: 0x02244082, size: 44 bytes, params: 2, frame: 11
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(7091) /* metro dependency 7091: QuestDataUtils */;
|
||||
return !value.isQuestExpired(a0);
|
||||
}
|
||||
|
||||
function _fun102658(a0) { // fn#102658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:3890, offset: 0x02244490, size: 141 bytes, params: 2, frame: 18
|
||||
var r2;
|
||||
var r4;
|
||||
var r1;
|
||||
var property;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var calculateVisibility;
|
||||
var value8;
|
||||
var value9;
|
||||
const Object = global.Object;
|
||||
const keys = Object.keys;
|
||||
let current = env0_3.current;
|
||||
let children = current.children;
|
||||
const value2 = Reflect.apply(keys, Object, [children]);
|
||||
let length = value2.length;
|
||||
const value3 = 0;
|
||||
const value4 = undefined;
|
||||
if (value3 < length) {
|
||||
r2 = value4;
|
||||
r4 = value3;
|
||||
while (true) {
|
||||
property = value2[r4];
|
||||
value5 = a0 != null;
|
||||
if (value5) {
|
||||
value6 = property !== a0;
|
||||
r1 = value6;
|
||||
} else {
|
||||
r1 = value5;
|
||||
}
|
||||
if (r1) {
|
||||
continue;
|
||||
}
|
||||
current = env0_3.current;
|
||||
children = current.children;
|
||||
property = children[property];
|
||||
value7 = property == null;
|
||||
r1 = value7;
|
||||
r2 = property;
|
||||
if (r1) {
|
||||
continue;
|
||||
}
|
||||
calculateVisibility = r2.calculateVisibility;
|
||||
value8 = calculateVisibility == null;
|
||||
r1 = value8;
|
||||
if (r1) {
|
||||
continue;
|
||||
}
|
||||
r2.calculateVisibility();
|
||||
value9 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
|
||||
length = value2.length;
|
||||
if (value9 < length) {
|
||||
r4 = value9;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return value4;
|
||||
}
|
||||
|
||||
function _fun102659({nativeEvent}) { // fn#102659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:4095, offset: 0x0224451d, size: 55 bytes, params: 2, frame: 10
|
||||
env0_3.current.parent.scrollY = nativeEvent.contentOffset.y;
|
||||
env0_4();
|
||||
}
|
||||
|
||||
function _fun102660({nativeEvent}) { // fn#102660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:4182, offset: 0x02244554, size: 50 bytes, params: 2, frame: 10
|
||||
env0_3.current.parent.layout = nativeEvent.layout;
|
||||
env0_4();
|
||||
}
|
||||
|
||||
function _fun102662({nativeEvent}, a1) { // fn#102662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:4333, offset: 0x02244586, size: 84 bytes, params: 3, frame: 15
|
||||
const binding = env0_3;
|
||||
const children = binding.current.children;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, binding.current.children[a1], undefined);
|
||||
object2['layout'] = nativeEvent.layout;
|
||||
children[a1] = object2;
|
||||
env0_4(a1);
|
||||
}
|
||||
|
||||
function _fun102663(a0) { // fn#102663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:4447, offset: 0x022445da, size: 103 bytes, params: 2, frame: 14
|
||||
var scrollToIndex;
|
||||
var object2;
|
||||
let current = env0_2.current;
|
||||
if (current != null) {
|
||||
current = env0_2.current;
|
||||
scrollToIndex = current.scrollToIndex;
|
||||
object2 = {index: a0};
|
||||
object2.animated = !useReducedMotion;
|
||||
value = environment.__proto__.__proto__;
|
||||
object2.viewOffset = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
Reflect.apply(scrollToIndex, current, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102664({nativeEvent}) { // fn#102664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:4570, offset: 0x02244641, size: 55 bytes, params: 2, frame: 10
|
||||
env0_3.current.parent.firstItemOffset = nativeEvent.layout.height;
|
||||
env0_4();
|
||||
}
|
||||
|
||||
function _fun102665() { // fn#102665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:4666, offset: 0x02244678, size: 84 bytes, params: 1, frame: 13
|
||||
if (scrollToIndex != null && scrollToIndex !== -1 && env0_5) {
|
||||
env0_7(scrollToIndex);
|
||||
value = environment.__proto__.__proto__;
|
||||
QuestHomeNavigationStore.setState({scrollToQuestId: null});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102670() { // fn#102670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:6160, offset: 0x02244830, size: 26 bytes, params: 1, frame: 2
|
||||
if (bountiesAvailable) {
|
||||
env0_2.current = true;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102671() { // fn#102671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:6203, offset: 0x0224484a, size: 65 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
const closure = handleBountiesModalPush;
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('MODAL_PUSH', closure);
|
||||
return _fun102673;
|
||||
}
|
||||
|
||||
function _fun102674() { // fn#102674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:6444, offset: 0x022448fb, size: 65 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
const closure = handleClaimSuccess;
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('BOUNTIES_CLAIM_REWARD_SUCCESS', closure);
|
||||
return _fun102676;
|
||||
}
|
||||
|
||||
function _fun102677() { // fn#102677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:6668, offset: 0x02244983, size: 34 bytes, params: 1, frame: 13
|
||||
return env0_1.addListener('beforeRemove', _fun102678);
|
||||
}
|
||||
|
||||
function renderItemChildren() { // fn#102681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:7769, owner: QuestHome.renderItem.children, offset: 0x02244b2c, size: 108 bytes, params: 1, frame: 19
|
||||
const QuestCard = (require(13567) /* metro dependency 13567: QuestCard */).QuestCard;
|
||||
const itemBinding = item;
|
||||
const indexBinding = index;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QUEST_HOME_MOBILE = QuestContent.QUEST_HOME_MOBILE;
|
||||
return (
|
||||
<QuestCard
|
||||
quest={itemBinding}
|
||||
questContentPosition={indexBinding}
|
||||
containerPadding={0}
|
||||
sourceQuestContent={QUEST_HOME_MOBILE}
|
||||
key={itemBinding.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function CellRendererComponentOnLayout(a0) { // fn#102683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:8089, owner: QuestHome.CellRendererComponent.onLayout, offset: 0x02244be8, size: 68 bytes, params: 2, frame: 14
|
||||
const property = quests[env0_0.index];
|
||||
if (property != null) {
|
||||
handleQuestCardLayout(a0, property.id);
|
||||
}
|
||||
env0_0.onLayout(a0);
|
||||
}
|
||||
|
||||
function handleBountiesModalPush({key}) { // fn#102672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:6208, offset: 0x0224488b, size: 60 bytes, params: 2, frame: 12
|
||||
const BOUNTIES_MODAL_KEY = (require(13515) /* metro dependency 13515: BountiesModalActionCreators */).BOUNTIES_MODAL_KEY;
|
||||
if (key === BOUNTIES_MODAL_KEY) {
|
||||
value = environment.__proto__;
|
||||
env1_3.current = true;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102673() { // fn#102673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:6360, offset: 0x022448c7, size: 52 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.unsubscribe('MODAL_PUSH', handleBountiesModalPush);
|
||||
}
|
||||
|
||||
function handleClaimSuccess() { // fn#102675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:6449, offset: 0x0224493c, size: 19 bytes, params: 1, frame: 2
|
||||
env1_4.current = true;
|
||||
}
|
||||
|
||||
function _fun102676() { // fn#102676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:6570, offset: 0x0224494f, size: 52 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.unsubscribe('BOUNTIES_CLAIM_REWARD_SUCCESS', handleClaimSuccess);
|
||||
}
|
||||
|
||||
function _fun102678() { // fn#102678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13704:6702, offset: 0x022449a5, size: 178 bytes, params: 1, frame: 16
|
||||
var value2;
|
||||
var fireSurveyAction;
|
||||
const SurveyActionTypes = (require(9534) /* metro dependency 9534: SurveyActionTypes */).SurveyActionTypes;
|
||||
let value = environment.__proto__;
|
||||
let current = env1_2.current;
|
||||
if (current) {
|
||||
current = env1_4.current;
|
||||
value2 = environment.__proto__.__proto__.__proto__;
|
||||
if (current) {
|
||||
value = require(9535) /* metro dependency 9535: QualtricsActionCreators */;
|
||||
value.fireSurveyAction(SurveyActionTypes.BOUNTY_SESSION_COMPLETED);
|
||||
} else {
|
||||
current = env1_3.current;
|
||||
value = require(9535) /* metro dependency 9535: QualtricsActionCreators */;
|
||||
fireSurveyAction = value.fireSurveyAction;
|
||||
if (current) {
|
||||
Reflect.apply(fireSurveyAction, value, [SurveyActionTypes.BOUNTY_ABANDONED]);
|
||||
} else {
|
||||
Reflect.apply(fireSurveyAction, value, [SurveyActionTypes.BOUNTY_IMMEDIATE_DISMISSAL]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,559 @@
|
||||
/* Metro module 13559; source: modules/quests/native/QuestHomeBounties.tsx; dependencies: [57, 31, 27, 7092, 6528, 1376, 33, 697, 13560, 4501, 9949, 1244, 5473, 4573, 6766, 13557, 1365, 7013, 694, 4081, 7110, 7120, 6531, 13515, 5459, 7121, 13561, 10183, 8416, 9483, 566, 13562, 2] */
|
||||
function _fun102974(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:6, offset: 0x02252450, size: 421 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const 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 */).BountyCarouselEmptyStateReason;
|
||||
const env0_8 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value2.jsx;
|
||||
const env0_10 = value2.jsxs;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const CARD_WIDTH = (require(13560) /* metro dependency 13560: BountyCard */).CARD_WIDTH;
|
||||
const env0_13 = CARD_WIDTH + PX_16;
|
||||
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun103003);
|
||||
const keyExtractor_103005 = function(a0) {
|
||||
return a0.id;
|
||||
};
|
||||
value = value.memo(QuestHomeBounties);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestHomeBounties.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function EmptyState_102975({reason}) { // fn#102975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:811, offset: 0x022525f5, size: 529 bytes, params: 2, frame: 26
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const styles = useStyles();
|
||||
(require(9949) /* metro dependency 9949: AnalyticsHooks */).useBountyCarouselEmptyStateAnalytics(reason);
|
||||
let COMPLETED = BountyCarouselEmptyStateReason.COMPLETED;
|
||||
const r12 = reason === COMPLETED ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.O2hRaZ) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TKuW8z);
|
||||
COMPLETED = BountyCarouselEmptyStateReason.COMPLETED;
|
||||
const r15 = reason === COMPLETED ? (require(1244) /* metro dependency 1244: indexNative */).t['D/790X'] : (require(1244) /* metro dependency 1244: indexNative */).t.ReqPds;
|
||||
const BountiesPosterIllocon = (require(5473) /* metro dependency 5473: native */).BountiesPosterIllocon;
|
||||
const bountiesPosterIllocon = <BountiesPosterIllocon size={32} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const text = <Text variant="text-sm/semibold" color="text-default">{r12}</Text>;
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
return (
|
||||
<View style={styles.emptyState}>
|
||||
{bountiesPosterIllocon}
|
||||
<View style={styles.emptyStateText}>
|
||||
{text}
|
||||
<TextWithIOSLinkWorkaround variant="text-xs/medium" color="text-muted">
|
||||
{(require(1244) /* metro dependency 1244: indexNative */).intl.format(r15,
|
||||
{onClickLearnMore: function() {
|
||||
importDefault(dependencyMap[15])();
|
||||
}})}
|
||||
</TextWithIOSLinkWorkaround>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function getSnapIndex({nativeEvent}) { // fn#102977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:1423, offset: 0x02252825, size: 51 bytes, params: 2, frame: 12
|
||||
const Math = global.Math;
|
||||
return Math.round(nativeEvent.contentOffset.x / env0_13);
|
||||
}
|
||||
|
||||
function QuestHomeBountiesCarousel({bounties}) { // fn#102978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:1565, offset: 0x02252858, size: 1017 bytes, params: 2, frame: 33
|
||||
const styles = useStyles();
|
||||
const value2 = env0_4.useRef(null);
|
||||
const [property, env0_3] = env0_3Binding(env0_4.useState(0), 2);
|
||||
const value6 = env0_3Binding(env0_4.useState(0), 2);
|
||||
const property2 = value6[0];
|
||||
var env0_4 = property2;
|
||||
const env0_5 = value6[1];
|
||||
const [property3, env0_7] = env0_3Binding(env0_4.useState(false), 2);
|
||||
const env0_8 = env0_4.useRef(null);
|
||||
const env0_9 = env0_4.useRef(false);
|
||||
const env0_10 = env0_4.useRef({parent: {scrollX: 0}, children: {}, axis: 'horizontal'});
|
||||
const value9 = env0_4.useCallback(_fun102979, []);
|
||||
const value10 = env0_4.useCallback(_fun102980, [value9]);
|
||||
const value11 = env0_4.useMemo(_fun102981, [bounties.length]);
|
||||
const value12 = env0_4.useCallback(_fun102983, [property]);
|
||||
const env0_12 = env0_4.useRef(property2);
|
||||
const env0_13 = env0_4.useRef(null);
|
||||
const value13 = env0_4.useCallback(_fun102984, [value9]);
|
||||
const env0_14 = env0_4.useRef(false);
|
||||
const env0_15 = env0_4.useRef(null);
|
||||
const value14 = env0_4.useCallback(_fun102985, []);
|
||||
const value15 = env0_4.useCallback(_fun102986, [property2]);
|
||||
const value16 = env0_4.useCallback(_fun102987, []);
|
||||
env0_4.useEffect(function() {
|
||||
return _fun102990;
|
||||
}, []);
|
||||
env0_4.useEffect(_fun102991, [bounties, property2, value16]);
|
||||
const value17 = env0_4.useCallback(_fun102997, []);
|
||||
const {containerRef, isInView} = (importDefault(13561) /* metro dependency 13561: useIsCarouselInView */)();
|
||||
const value19 = env0_4.useCallback(_fun102998, [property2, value17, isInView, property3]);
|
||||
const value20 = env0_4.useCallback(_fun103000, [bounties, value9]);
|
||||
const value21 = env0_4.useMemo(_fun103002, [isInView, property2, property3]);
|
||||
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
|
||||
return (
|
||||
<View
|
||||
ref={containerRef}
|
||||
style={styles.container}
|
||||
onLayout={value10}
|
||||
>
|
||||
<FlashList
|
||||
ref={value2}
|
||||
horizontal
|
||||
data={bounties}
|
||||
renderItem={value19}
|
||||
keyExtractor={keyExtractor_103005}
|
||||
contentContainerStyle={styles.listContentContainer}
|
||||
estimatedItemSize={env0_13}
|
||||
snapToOffsets={value11}
|
||||
snapToEnd={false}
|
||||
decelerationRate="fast"
|
||||
showsHorizontalScrollIndicator={false}
|
||||
ItemSeparatorComponent={ItemSeparator_103004}
|
||||
ListFooterComponent={value12}
|
||||
onScroll={value13}
|
||||
onScrollBeginDrag={value14}
|
||||
onMomentumScrollEnd={value15}
|
||||
scrollEventThrottle={16}
|
||||
extraData={value21}
|
||||
CellRendererComponent={value20}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun103003() { // fn#103003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:347, offset: 0x022535ed, size: 267 bytes, params: 1, frame: 16
|
||||
const object2 = {};
|
||||
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
|
||||
object2.container = {marginBottom: PX_48};
|
||||
object2.listContentContainer = {paddingLeft: PX_16};
|
||||
const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'gap': null, 'borderWidth': 1};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.gap = PX_12;
|
||||
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object3.borderColor = BORDER_MUTED;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object3.overflow = 'hidden';
|
||||
const PX_162 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.paddingHorizontal = PX_162;
|
||||
object3.paddingVertical = 14;
|
||||
const PX_163 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.marginHorizontal = PX_163;
|
||||
object2.emptyState = object3;
|
||||
object2.emptyStateText = {'flex': 1, 'gap': 2};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function ItemSeparator_103004() { // fn#103004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:1517, offset: 0x022536f8, size: 37 bytes, params: 1, frame: 14
|
||||
return <View style={{width: PX_16}} />;
|
||||
}
|
||||
|
||||
function QuestHomeBounties({verticalScrollEnabled}) { // fn#103006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:5882, offset: 0x0225371d, size: 352 bytes, params: 2, frame: 24
|
||||
var r0;
|
||||
var r5;
|
||||
var value;
|
||||
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
|
||||
const useQuestHomeBounties = questHooksModule.useQuestHomeBounties;
|
||||
const questHomeBounties = Reflect.apply(useQuestHomeBounties, questHooksModule, []).questHomeBounties;
|
||||
const styles = useStyles();
|
||||
useBountiesNux(questHomeBounties.length > 0);
|
||||
const value3 = questHomeBounties.length === 0;
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BountyStore], function() {
|
||||
return BountyStore.areAllBountiesCompleted();
|
||||
});
|
||||
if (value3) {
|
||||
var viewBindingProps = {style: styles.container};
|
||||
if (verticalScrollEnabled) {
|
||||
value = importDefault(13562) /* metro dependency 13562: BountiesCtaHeader */;
|
||||
value = ((Component) => <Component bounties={questHomeBounties} isEmptyOrCompleted={value3 || value4} />)(value);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = <EmptyState_102975 reason={value3 ? BountyCarouselEmptyStateReason.EMPTY : BountyCarouselEmptyStateReason.COMPLETED} />;
|
||||
}
|
||||
value = <View {...viewBindingProps}>{r5}</View>;
|
||||
r0 = value;
|
||||
} else if (value4) {
|
||||
var viewBindingProps = {style: styles.container};
|
||||
if (verticalScrollEnabled) {
|
||||
value = importDefault(13562) /* metro dependency 13562: BountiesCtaHeader */;
|
||||
value = ((Component) => <Component bounties={questHomeBounties} isEmptyOrCompleted={value3 || value4} />)(value);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = <EmptyState_102975 reason={value3 ? BountyCarouselEmptyStateReason.EMPTY : BountyCarouselEmptyStateReason.COMPLETED} />;
|
||||
}
|
||||
value = <View {...viewBindingProps}>{r5}</View>;
|
||||
r0 = value;
|
||||
} else if (verticalScrollEnabled) {
|
||||
var viewBindingProps = {style: styles.container};
|
||||
value = importDefault(13562) /* metro dependency 13562: BountiesCtaHeader */;
|
||||
value = <View {...viewBindingProps}>{((Component) => <Component bounties={questHomeBounties} />)(value)}</View>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = <QuestHomeBountiesCarousel bounties={questHomeBounties} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun102979(a0) { // fn#102979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:1871, offset: 0x02252c51, size: 205 bytes, params: 2, frame: 16
|
||||
var r2;
|
||||
var r0;
|
||||
var Object;
|
||||
var value;
|
||||
var property;
|
||||
var value3;
|
||||
var calculateVisibility;
|
||||
var value4;
|
||||
var value5;
|
||||
if (a0 != null) {
|
||||
Object = global.Object;
|
||||
if (Object.hasOwn(env0_10.current.children, a0)) {
|
||||
property = env0_10.current.children[a0];
|
||||
if (!(property == null || property.calculateVisibility == null)) {
|
||||
property.calculateVisibility();
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
} else {
|
||||
Object = global.Object;
|
||||
value = Object.values(env0_10.current.children);
|
||||
var length = value.length;
|
||||
var value2 = 0;
|
||||
if (value2 < length) {
|
||||
r2 = value2;
|
||||
while (true) {
|
||||
property = value[r2];
|
||||
value3 = property == null;
|
||||
if (value3) {
|
||||
r0 = value3;
|
||||
} else {
|
||||
calculateVisibility = property.calculateVisibility;
|
||||
value4 = calculateVisibility == null;
|
||||
r0 = value4;
|
||||
}
|
||||
if (r0) {
|
||||
continue;
|
||||
}
|
||||
property.calculateVisibility();
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
length = value.length;
|
||||
if (value5 < length) {
|
||||
r2 = value5;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102980(a0) { // fn#102980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:2192, offset: 0x02252d1e, size: 76 bytes, params: 2, frame: 13
|
||||
env0_3(a0.nativeEvent.layout.width);
|
||||
env0_10.current.parent.layout = a0.nativeEvent.layout;
|
||||
env0_11();
|
||||
}
|
||||
|
||||
function _fun102981() { // fn#102981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:2295, offset: 0x02252d6a, size: 74 bytes, params: 1, frame: 11
|
||||
const Array = global.Array;
|
||||
let array = new Array(bounties.length);
|
||||
array = array.fill(0);
|
||||
return array.map(_fun102982);
|
||||
}
|
||||
|
||||
function _fun102983() { // fn#102983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:2375, offset: 0x02252dc4, size: 99 bytes, params: 1, frame: 20
|
||||
const Math = global.Math;
|
||||
const max = Math.max;
|
||||
const binding = env0_2;
|
||||
const CARD_WIDTH = (require(13560) /* metro dependency 13560: BountyCard */).CARD_WIDTH;
|
||||
return <View style={{width: Reflect.apply(max, Math, [0, binding - CARD_WIDTH - PX_16])}} />;
|
||||
}
|
||||
|
||||
function _fun102984(a0) { // fn#102984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:2489, offset: 0x02252e27, size: 213 bytes, params: 2, frame: 16
|
||||
var value4;
|
||||
let value = environment.__proto__;
|
||||
const snapIndex = getSnapIndex(a0);
|
||||
if (snapIndex !== env0_12.current) {
|
||||
env0_12.current = snapIndex;
|
||||
value4 = global.Date.now();
|
||||
if (env0_13.current == null || value4 - env0_13.current >= 50) {
|
||||
env0_13.current = value4;
|
||||
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
value.triggerHapticFeedback((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_LIGHT);
|
||||
}
|
||||
}
|
||||
env0_10.current.parent.scrollX = a0.nativeEvent.contentOffset.x;
|
||||
env0_11();
|
||||
}
|
||||
|
||||
function _fun102986(a0) { // fn#102986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:2900, offset: 0x02252efc, size: 255 bytes, params: 2, frame: 19
|
||||
var r7;
|
||||
var moduleValue;
|
||||
var trackBountyCarouselScroll;
|
||||
var object2;
|
||||
var BountyScrollingType;
|
||||
const HorizontalScrollingDirection = (require(7120) /* metro dependency 7120: AnalyticsTypes */).HorizontalScrollingDirection;
|
||||
const snapIndex = getSnapIndex(a0);
|
||||
const binding = env0_14;
|
||||
const current = binding.current;
|
||||
binding.current = false;
|
||||
if (snapIndex !== env0_4) {
|
||||
moduleValue = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
trackBountyCarouselScroll = moduleValue.trackBountyCarouselScroll;
|
||||
object2 = {};
|
||||
BountyScrollingType = (require(7120) /* metro dependency 7120: AnalyticsTypes */).BountyScrollingType;
|
||||
r7 = current ? BountyScrollingType.AUTO : BountyScrollingType.MANUAL;
|
||||
object2.scrollingType = r7;
|
||||
r7 = snapIndex > env0_4 ? HorizontalScrollingDirection.RIGHT : HorizontalScrollingDirection.LEFT;
|
||||
object2.scrollingDirection = r7;
|
||||
object2.carouselPosition = snapIndex;
|
||||
object2.questContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_HOME_MOBILE_CAROUSEL;
|
||||
Reflect.apply(trackBountyCarouselScroll, moduleValue, [object2]);
|
||||
env0_5(snapIndex);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102987(a0) { // fn#102987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:3304, offset: 0x02252ffb, size: 98 bytes, params: 2, frame: 16
|
||||
var clearTimeout;
|
||||
var binding;
|
||||
const env0_0 = a0;
|
||||
if (env0_15.current != null) {
|
||||
clearTimeout = global.clearTimeout;
|
||||
binding = env0_15;
|
||||
clearTimeout(binding.current);
|
||||
binding.current = null;
|
||||
}
|
||||
env0_15.current = global.setTimeout(_fun102988, 350);
|
||||
}
|
||||
|
||||
function _fun102989() { // fn#102989, offset: 0x022530b2, size: 11 bytes, params: 1, frame: 1
|
||||
return _fun102990;
|
||||
}
|
||||
|
||||
function _fun102991() { // fn#102991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:3603, offset: 0x022530bd, size: 65 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
const closure = handleModalClose;
|
||||
const value = environment.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('MODAL_POP', closure);
|
||||
return _fun102996;
|
||||
}
|
||||
|
||||
function _fun102997(a0, a1) { // fn#102997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:4104, offset: 0x0225328b, size: 298 bytes, params: 3, frame: 19
|
||||
let value = environment.__proto__;
|
||||
const analyticsActionsModule = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
const trackAdContentClicked = analyticsActionsModule.trackAdContentClicked;
|
||||
const object2 = {};
|
||||
object2.adContentId = a0.id;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const BOUNTY = AdCreativeType.BOUNTY;
|
||||
object2.adCreativeType = BOUNTY;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_HOME_MOBILE_CAROUSEL = QuestContent.QUEST_HOME_MOBILE_CAROUSEL;
|
||||
object2.questContent = QUEST_HOME_MOBILE_CAROUSEL;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const START_BOUNTY = QuestContentCTA.START_BOUNTY;
|
||||
object2.questContentCTA = START_BOUNTY;
|
||||
QUEST_HOME_MOBILE_CAROUSEL = QuestContent.QUEST_HOME_MOBILE_CAROUSEL;
|
||||
object2.sourceQuestContent = QUEST_HOME_MOBILE_CAROUSEL;
|
||||
object2.questContentPosition = a1;
|
||||
Reflect.apply(trackAdContentClicked, analyticsActionsModule, [object2]);
|
||||
env0_8.current = a0.id;
|
||||
env0_9.current = BountyStore.isBountyCompleted(a0.id);
|
||||
env0_7(true);
|
||||
value = importDefault(13515) /* metro dependency 13515: BountiesModalActionCreators */;
|
||||
const showModal = value.showModal;
|
||||
QUEST_HOME_MOBILE_CAROUSEL = QuestContent.QUEST_HOME_MOBILE_CAROUSEL;
|
||||
Reflect.apply(showModal, value, [{bountyId: a0.id, sourceQuestContent: QUEST_HOME_MOBILE_CAROUSEL}]);
|
||||
}
|
||||
|
||||
function _fun102998({item, index}) { // fn#102998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:4647, offset: 0x022533b5, size: 223 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
||||
const questContentImpressionTrackerNativeProps = {adContentId: item.id};
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const BOUNTY = AdCreativeType.BOUNTY;
|
||||
questContentImpressionTrackerNativeProps.adCreativeType = BOUNTY;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_HOME_MOBILE_CAROUSEL = QuestContent.QUEST_HOME_MOBILE_CAROUSEL;
|
||||
questContentImpressionTrackerNativeProps.questContent = QUEST_HOME_MOBILE_CAROUSEL;
|
||||
questContentImpressionTrackerNativeProps.questContentPosition = index;
|
||||
questContentImpressionTrackerNativeProps.trackGuildAndChannelMetadata = false;
|
||||
questContentImpressionTrackerNativeProps.visibilityRef = env0_10;
|
||||
QUEST_HOME_MOBILE_CAROUSEL = QuestContent.QUEST_HOME_MOBILE_CAROUSEL;
|
||||
questContentImpressionTrackerNativeProps.sourceQuestContent = QUEST_HOME_MOBILE_CAROUSEL;
|
||||
const isInViewBinding = isInView;
|
||||
questContentImpressionTrackerNativeProps.overrideVisibility = isInViewBinding ? value : !!isInViewBinding;
|
||||
return (
|
||||
<QuestContentImpressionTrackerNative {...questContentImpressionTrackerNativeProps} key={item.id}>
|
||||
{children_102999}
|
||||
</QuestContentImpressionTrackerNative>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun103000(a0) { // fn#103000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:5133, offset: 0x022534f0, size: 80 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
const CellContainer = (require(8416) /* metro dependency 8416: flashList */).CellContainer;
|
||||
return <CellContainer {...a0} {...{['onLayout']: onLayout_103001}} />;
|
||||
}
|
||||
|
||||
function _fun103002() { // fn#103002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:5337, offset: 0x022535cb, size: 34 bytes, params: 1, frame: 3
|
||||
return {isInView: isInView, activeIndex: env0_4, isModalVisible: env0_6};
|
||||
}
|
||||
|
||||
function useBountiesNux(a0) { // fn#103007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:5999, owner: QuestHomeBounties.useBountiesNux, offset: 0x0225387d, size: 218 bytes, params: 2, frame: 18
|
||||
const value3 = env1_3((require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent(a0 ? [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.BOUNTIES_NUX_PROMO_SHEET] : []),
|
||||
2);
|
||||
const property = value3[0];
|
||||
const property2 = value3[1];
|
||||
const env0_2 = env1_4.useRef(false);
|
||||
env1_4.useEffect(_fun103008, [property]);
|
||||
env1_4.useEffect(_fun103009, [property, property2]);
|
||||
}
|
||||
|
||||
function _fun102982(a0, a1) { // fn#102982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:2332, offset: 0x02252db4, size: 16 bytes, params: 3, frame: 2
|
||||
return a1 * env2_13;
|
||||
}
|
||||
|
||||
function _fun102988() { // fn#102988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:3388, offset: 0x0225305d, size: 85 bytes, params: 1, frame: 16
|
||||
var scrollToOffset;
|
||||
var binding;
|
||||
var value3;
|
||||
env1_14.current = true;
|
||||
const current = env1_1.current;
|
||||
if (current != null) {
|
||||
scrollToOffset = current.scrollToOffset;
|
||||
binding = env0_0;
|
||||
value3 = environment.__proto__.__proto__;
|
||||
Reflect.apply(scrollToOffset, current, [{offset: binding * env2_13, animated: true}]);
|
||||
}
|
||||
env1_15.current = null;
|
||||
}
|
||||
|
||||
function handleModalClose({key}) { // fn#102992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:3608, offset: 0x022530fe, size: 260 bytes, params: 2, frame: 17
|
||||
var environment;
|
||||
var r3;
|
||||
var value2;
|
||||
var binding;
|
||||
var current;
|
||||
var index2;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const BOUNTIES_MODAL_KEY = (require(13515) /* metro dependency 13515: BountiesModalActionCreators */).BOUNTIES_MODAL_KEY;
|
||||
if (key === BOUNTIES_MODAL_KEY) {
|
||||
value2 = environment.__proto__;
|
||||
env1_7(false);
|
||||
binding = env1_8;
|
||||
current = binding.current;
|
||||
binding.current = null;
|
||||
if (current != null) {
|
||||
r3 = BountyStore.isBountyCompleted(current) && !env1_9.current;
|
||||
env1_9.current = false;
|
||||
if (bounties.findIndex(function({id}) {
|
||||
return id === current;
|
||||
}) !== -1) {
|
||||
index2 = bounties.findIndex(_fun102994);
|
||||
r3 = r3 && index2 !== -1;
|
||||
r3 = r3 && index2 <= env1_4 + 3;
|
||||
if (r3) {
|
||||
(require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */).runAfterInteractions(_fun102995);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102996() { // fn#102996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:4013, offset: 0x02253257, size: 52 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.unsubscribe('MODAL_POP', handleModalClose);
|
||||
}
|
||||
|
||||
function children_102999() { // fn#102999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:5019, offset: 0x02253494, size: 92 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(13560) /* metro dependency 13560: BountyCard */;
|
||||
const itemBinding = item;
|
||||
const indexBinding = index;
|
||||
return ((Component) => <Component bounty={itemBinding} index={indexBinding} isActive={indexBinding === env1_4} isModalVisible={env1_6} onPress={env1_17} />)(value);
|
||||
}
|
||||
|
||||
function onLayout_103001(a0) { // fn#103001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:5176, offset: 0x02253540, size: 139 bytes, params: 2, frame: 18
|
||||
var binding;
|
||||
var current;
|
||||
var children;
|
||||
var id;
|
||||
var object2;
|
||||
var children2;
|
||||
const property = bounties[env0_0.index];
|
||||
if (property != null) {
|
||||
binding = env1_10;
|
||||
current = binding.current;
|
||||
children = current.children;
|
||||
id = property.id;
|
||||
object2 = {};
|
||||
current = binding.current;
|
||||
children2 = current.children;
|
||||
copyDataProperties(object2, children2[property.id], children2);
|
||||
object2['layout'] = a0.nativeEvent.layout;
|
||||
children[id] = object2;
|
||||
binding = env1_11;
|
||||
id = property.id;
|
||||
binding(id);
|
||||
}
|
||||
env0_0.onLayout(a0);
|
||||
}
|
||||
|
||||
function _fun103008() { // fn#103008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:6187, offset: 0x02253957, size: 101 bytes, params: 1, frame: 14
|
||||
const binding = env0_0;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const BOUNTIES_NUX_PROMO_SHEET = DismissibleContent.BOUNTIES_NUX_PROMO_SHEET;
|
||||
if (!(binding !== BOUNTIES_NUX_PROMO_SHEET || env0_2.current)) {
|
||||
env0_2.current = true;
|
||||
(importDefault(13557) /* metro dependency 13557: openBountiesNuxPromoSheet */)();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103009() { // fn#103009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:6309, offset: 0x022539bc, size: 108 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
const binding = env0_0;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const BOUNTIES_NUX_PROMO_SHEET = DismissibleContent.BOUNTIES_NUX_PROMO_SHEET;
|
||||
if (binding === BOUNTIES_NUX_PROMO_SHEET) {
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('HIDE_ACTION_SHEET', handleHide_103010);
|
||||
return _fun103011;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun102994(a0, a1) { // fn#102994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:3843, offset: 0x02253202, size: 62 bytes, params: 3, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
let r0 = a1 > env2_4 && a1 > env0_1;
|
||||
if (r0) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
value = !BountyStore.isBountyCompleted(a0.id);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun102995() { // fn#102995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:3939, offset: 0x02253240, size: 23 bytes, params: 1, frame: 11
|
||||
env2_16(env0_2);
|
||||
}
|
||||
|
||||
function handleHide_103010({key}) { // fn#103010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:6390, offset: 0x02253a28, size: 67 bytes, params: 2, frame: 13
|
||||
var value2;
|
||||
const PROMO_SHEET_KEY = (require(13557) /* metro dependency 13557: openBountiesNuxPromoSheet */).PROMO_SHEET_KEY;
|
||||
if (key === PROMO_SHEET_KEY) {
|
||||
value2 = environment.__proto__;
|
||||
env1_1(ContentDismissActionType.USER_DISMISS);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103011() { // fn#103011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13749:6507, offset: 0x02253a6b, size: 50 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.unsubscribe('HIDE_ACTION_SHEET', handleHide_103010);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* Metro module 13555; source: modules/quests/native/QuestHomeEmptyState.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1244, 3860, 4010, 6618, 477, 4573, 13556, 4589, 2] */
|
||||
function _fun102966(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13745:6, offset: 0x02251c62, size: 402 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.ImageBackground;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).VerticalGradient;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{container: {flex: 1},
|
||||
emptyStateContainer: {'justifyContent': 'center', 'alignItems': 'center', 'flex': 1},
|
||||
emptyStateContentContainer: {top: -55, paddingHorizontal: PX_32}, emptyStateContentTitle: {textAlign: 'center'},
|
||||
emptyStateContentDescription: {'textAlign': 'center', 'marginTop': 4}, emptyImage: {'flex': 1, 'width': '100%',
|
||||
'aspectRatio': 1.6375545851528384, 'minWidth': '100%', 'position': 'absolute', 'bottom': 0, 'zIndex': -1},
|
||||
gradient: {'height': 22, 'width': '100%', 'position': 'absolute', 'bottom': 0}, actionWrapper: {'marginTop': 16,
|
||||
'alignSelf': 'center'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestHomeEmptyState.tsx');
|
||||
exports.default = QuestHomeEmptyState;
|
||||
}
|
||||
|
||||
function QuestHomeEmptyState({action, title, subtitle}) { // fn#102967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13745:745, offset: 0x02251df4, size: 720 bytes, params: 2, frame: 31
|
||||
var r9;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var jsxRuntimeEnv0_8Binding;
|
||||
var items3;
|
||||
const r20 = title !== undefined ? title : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SdlRnK);
|
||||
const r13 = subtitle !== undefined ? subtitle : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R7mv+G']);
|
||||
const styles = useStyles();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
const value2 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOWER]);
|
||||
const isChatLockedOpen = (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatLockedOpen;
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const safeAreaPaddingViewProps = {bottom: (require(477) /* metro dependency 477: PlatformUtils */).isAndroid()};
|
||||
let container = styles.container;
|
||||
safeAreaPaddingViewProps.style = container;
|
||||
container = styles.container;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const items2 = [<Text variant="heading-xl/bold" color="mobile-text-heading-primary" style={styles.emptyStateContentTitle}>{r20}</Text>];
|
||||
items2[1] = <Text variant="text-md/normal" color="text-default" style={styles.emptyStateContentDescription}>{r13}</Text>;
|
||||
items2[2] = action != null && <View style={styles.actionWrapper}>{action}</View>;
|
||||
const view = <View style={styles.emptyStateContentContainer}>{items2}</View>;
|
||||
if (isChatLockedOpen) {
|
||||
r9 = null;
|
||||
} else {
|
||||
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
||||
items3 = [<ImageBackground style={styles.emptyImage} source={importDefault(13556) /* metro dependency 13556 */} resizeMode="cover" />];
|
||||
items3[1] = ((Component) => <Component style={styles.gradient} end={VerticalGradient.END} start={VerticalGradient.START} colors={['rgba(0, 0, 0, 0)',
|
||||
|
||||
value2]} />)(importDefault(4589) /* metro dependency 4589 */);
|
||||
r9 = <>{items3}</>;
|
||||
}
|
||||
return (
|
||||
<SafeAreaPaddingView {...safeAreaPaddingViewProps}>
|
||||
<View style={container}>
|
||||
<View style={styles.emptyStateContainer}>
|
||||
{view}
|
||||
{r9}
|
||||
</View>
|
||||
</View>
|
||||
</SafeAreaPaddingView>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
/* Metro module 13509; source: modules/quests/native/QuestHomeSetting.tsx; dependencies: [57, 31, 9481, 6528, 33, 4501, 697, 1484, 3769, 7508, 13510, 13514, 2] */
|
||||
function _fun102590(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:6, offset: 0x02241890, size: 297 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const parseSortMethod = function(a0) {
|
||||
var value = a0;
|
||||
return value == null ? QuestHomeSortMethods.SUGGESTED : global.Object.values(QuestHomeSortMethods).includes(value) ? value : QuestHomeSortMethods.SUGGESTED;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const questHomeNavigationStore = importDefault(9481) /* metro dependency 9481: QuestHomeNavigationStore */;
|
||||
let value = require(6528) /* metro dependency 6528: QuestConstants */;
|
||||
const env0_6 = value.QuestHomeSortMethods;
|
||||
const env0_7 = value.getQuestHomeFilterOptionItem;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{container: {backgroundColor: BACKGROUND_BASE_LOWEST}}]);
|
||||
const env0_10 = [];
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestHomeSetting.tsx');
|
||||
exports.default = QuestHomeSetting;
|
||||
}
|
||||
|
||||
function parseFilters(a0) { // fn#102592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:392, offset: 0x022419f7, size: 88 bytes, params: 2, frame: 12
|
||||
if (a0 == null) {
|
||||
return env0_10;
|
||||
}
|
||||
let value = a0.split(',');
|
||||
value = value.map(function(a0) {
|
||||
return getQuestHomeFilterOptionItem(a0);
|
||||
});
|
||||
value = value.filter(function(a0) {
|
||||
return a0 != null;
|
||||
});
|
||||
return value.length > 0 ? value : env0_10;
|
||||
}
|
||||
|
||||
function QuestHomeSetting() { // fn#102595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:520, offset: 0x02241a4f, size: 380 bytes, params: 1, frame: 26
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, [_fun102596]);
|
||||
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, [_fun102597]), 2);
|
||||
const property3 = value4[0];
|
||||
const property4 = value4[1];
|
||||
binding.useEffect(function() {
|
||||
var object = {};
|
||||
object.equalityFn = require(dependencyMap[8]).shallow;
|
||||
object.fireImmediately = true;
|
||||
return QuestHomeNavigationStore.subscribe(_fun102599, _fun102600, object);
|
||||
}, []);
|
||||
const value5 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
useState = binding.useState;
|
||||
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property5 = value6[0];
|
||||
var env0_3 = value6[1];
|
||||
binding.useEffect(_fun102601, [value5]);
|
||||
const value7 = binding.useCallback(_fun102603, []);
|
||||
binding.useEffect(function() {
|
||||
return _fun102605;
|
||||
}, []);
|
||||
const value8 = QuestHomeNavigationStore.useField('scrollToQuestId');
|
||||
(importDefault(13510) /* metro dependency 13510: useQuestHomeHeader */)({setSelectedSortMethod: property2,
|
||||
setSelectedFilters: property4, selectedFilters: property3, selectedSortMethod: property});
|
||||
return ((Component) => <Component containerStyle={styles.container} isNavigationComplete={property5} scrollToQuestId={value8} sortMethod={property} filters={property3} onClearFilters={value7} />)(importDefault(13514) /* metro dependency 13514: QuestHome */);
|
||||
}
|
||||
|
||||
function _fun102596() { // fn#102596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:572, offset: 0x02241bcb, size: 35 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return parseSortMethod(QuestHomeNavigationStore.getField('sort'));
|
||||
}
|
||||
|
||||
function _fun102597() { // fn#102597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:651, offset: 0x02241bee, size: 35 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return parseFilters(QuestHomeNavigationStore.getField('filter'));
|
||||
}
|
||||
|
||||
function _fun102598() { // fn#102598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:728, offset: 0x02241c11, size: 80 bytes, params: 1, frame: 17
|
||||
const subscribe = QuestHomeNavigationStore.subscribe;
|
||||
const object2 = {};
|
||||
object2.equalityFn = (require(3769) /* metro dependency 3769 */).shallow;
|
||||
object2.fireImmediately = true;
|
||||
return Reflect.apply(subscribe, QuestHomeNavigationStore, [function({sort, filter}) {
|
||||
return {sort: sort, filter: filter};
|
||||
}, _fun102600, object2]);
|
||||
}
|
||||
|
||||
function _fun102601() { // fn#102601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:1039, offset: 0x02241ce3, size: 34 bytes, params: 1, frame: 13
|
||||
return env0_2.addListener('transitionEnd', _fun102602);
|
||||
}
|
||||
|
||||
function _fun102603() { // fn#102603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:1112, offset: 0x02241d05, size: 23 bytes, params: 1, frame: 11
|
||||
env0_1(env1_10);
|
||||
}
|
||||
|
||||
function _fun102604() { // fn#102604, offset: 0x02241d1c, size: 11 bytes, params: 1, frame: 1
|
||||
return function() {
|
||||
importDefault(dependencyMap[9]).close();
|
||||
QuestHomeNavigationStore.resetState();
|
||||
};
|
||||
}
|
||||
|
||||
function _fun102600(a0, {sort, filter}) { // fn#102600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13699:788, offset: 0x02241c7c, size: 103 bytes, params: 3, frame: 14
|
||||
var value;
|
||||
var binding;
|
||||
const sort = a0.sort;
|
||||
if (sort !== sort) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_0;
|
||||
value = environment.__proto__.__proto__;
|
||||
binding(parseSortMethod(a0.sort));
|
||||
}
|
||||
const filter = a0.filter;
|
||||
if (filter !== filter) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_1;
|
||||
value = environment.__proto__.__proto__;
|
||||
binding(parseFilters(a0.filter));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,215 @@
|
||||
/* Metro module 13511; source: modules/quests/native/QuestHomeSortingFilteringBottomSheet.tsx; dependencies: [57, 31, 27, 6528, 33, 4501, 697, 6618, 6261, 4578, 1244, 4559, 4002, 4080, 9483, 6275, 6758, 6277, 4572, 7988, 7987, 6231, 8950, 9505, 2] */
|
||||
function _fun102621(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:6, offset: 0x0224273e, size: 393 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_6 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestHomeSortMethods;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.content = {paddingHorizontal: PX_16};
|
||||
object2.bodyContainer = {'flex': 1, 'minHeight': 0};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.footerInline = {paddingTop: PX_16};
|
||||
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.footer = {backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
object2.footerButtonGroup = {paddingBottom: 0};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object2]);
|
||||
const env0_10 = [];
|
||||
const isFilterOptionEqual = function(a0, a1) {
|
||||
return a0.group === a1.group && a0.filter === a1.filter;
|
||||
};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestHomeSortingFilteringBottomSheet.tsx');
|
||||
exports.default = QuestHomeSortingFilteringBottomSheet;
|
||||
}
|
||||
|
||||
function FilterFooter({onConfirm, onReset, onLayout, inline}) { // fn#102622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:523, offset: 0x022428c7, size: 414 bytes, params: 2, frame: 32
|
||||
inline = !(inline === undefined) && inline;
|
||||
const styles = useStyles();
|
||||
const r5 = inline ? styles.footerInline : [styles.footer, styles.content];
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<View style={r5} onLayout={onLayout}>
|
||||
<SafeAreaPaddingView bottom>
|
||||
<ButtonGroup direction="vertical" style={styles.footerButtonGroup}>
|
||||
<Button
|
||||
size="lg"
|
||||
grow
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.i4jeWR)}
|
||||
onPress={onConfirm}
|
||||
/>
|
||||
<Button
|
||||
size="lg"
|
||||
grow
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yBZMsQ)}
|
||||
onPress={onReset}
|
||||
variant="secondary"
|
||||
/>
|
||||
</ButtonGroup>
|
||||
</SafeAreaPaddingView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestHomeSortingFilteringBottomSheet({onSortMethodChange, onFiltersChange, initialSortMethod, initialFilters}) { // fn#102624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1028, offset: 0x02242a8e, size: 886 bytes, params: 2, frame: 36
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value4 = Reflect.apply(useState, binding, [initialSortMethod]);
|
||||
const binding2 = env0_3;
|
||||
const value5 = binding2(value4, 2);
|
||||
const property = value5[0];
|
||||
const property2 = value5[1];
|
||||
useState = binding.useState;
|
||||
const value6 = binding2(Reflect.apply(useState, binding, [initialFilters]), 2);
|
||||
const property3 = value6[0];
|
||||
const env0_5 = value6[1];
|
||||
useState = binding.useState;
|
||||
const value7 = binding2(Reflect.apply(useState, binding, [0]), 2);
|
||||
const property4 = value7[0];
|
||||
const env0_6 = value7[1];
|
||||
const value9 = binding.useRef(null);
|
||||
const value10 = binding.useCallback(_fun102625, []);
|
||||
const env0_8 = binding.useCallback(_fun102626, []);
|
||||
const value11 = binding.useCallback(_fun102629, []);
|
||||
const value12 = binding.useCallback(_fun102630, [onSortMethodChange, onFiltersChange, property, property3]);
|
||||
const value13 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestHomeSortOptions();
|
||||
const value14 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestHomeFilterOptions();
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
object2 = {};
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const UdhTtk = (require(1244) /* metro dependency 1244: indexNative */).t.UdhTtk;
|
||||
object2.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [UdhTtk])} />;
|
||||
object2.footer = value3 ? null : <FilterFooter onConfirm={value12} onReset={value11} onLayout={value10} />;
|
||||
object2.scrollable = true;
|
||||
object2.startExpanded = true;
|
||||
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
|
||||
const r7 = value3 ? undefined : {paddingBottom: property4};
|
||||
const items3 = [styles.content];
|
||||
items3[1] = styles.bodyContainer;
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
|
||||
const items2 = [<TableRadioGroup groupRef={value9} hasIcons={false} defaultValue={property} onChange={property2} title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tZXJIS)}>{value13.map(_fun102631)}</TableRadioGroup>];
|
||||
items2[1] = value14.map(_fun102632);
|
||||
return (
|
||||
<BottomSheet {...object2}>
|
||||
<BottomSheetScrollView contentContainerStyle={r7} style={items3}>
|
||||
<Stack spacing={PX_32}>
|
||||
{items2}
|
||||
</Stack>
|
||||
{value3 && <FilterFooter onConfirm={value12} onReset={value11} inline />}
|
||||
</BottomSheetScrollView>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun102626(a0, a1) { // fn#102626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1418, offset: 0x02242e04, size: 39 bytes, params: 3, frame: 11
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
env0_5(_fun102627);
|
||||
}
|
||||
|
||||
function _fun102629() { // fn#102629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1509, offset: 0x02242e90, size: 164 bytes, params: 1, frame: 16
|
||||
const binding = env0_3;
|
||||
const SUGGESTED = QuestHomeSortMethods.SUGGESTED;
|
||||
binding(SUGGESTED);
|
||||
env0_5(env1_10);
|
||||
const current = env0_7.current;
|
||||
if (current != null) {
|
||||
current.setValue(QuestHomeSortMethods.SUGGESTED);
|
||||
}
|
||||
const AccessibilityAnnouncer = (require(4002) /* metro dependency 4002: shared */).AccessibilityAnnouncer;
|
||||
const announce = AccessibilityAnnouncer.announce;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
Reflect.apply(announce, AccessibilityAnnouncer,
|
||||
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bK5N8u)]);
|
||||
}
|
||||
|
||||
function _fun102630() { // fn#102630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1690, offset: 0x02242f34, size: 73 bytes, params: 1, frame: 12
|
||||
onSortMethodChange(env0_2);
|
||||
onFiltersChange(env0_4);
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('QuestHomeSortingFilteringBottomSheet');
|
||||
}
|
||||
|
||||
function _fun102631(a0, a1) { // fn#102631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2407, offset: 0x02242f7d, size: 70 bytes, params: 3, frame: 16
|
||||
const value = environment.__proto__;
|
||||
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
|
||||
return (
|
||||
<TableRadioRow
|
||||
label={a0.label}
|
||||
value={a0.value}
|
||||
key={a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun102632(a0, a1) { // fn#102632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2483, offset: 0x02242fc3, size: 97 bytes, params: 3, frame: 17
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
return (
|
||||
<TableRowGroup
|
||||
title={a0.heading}
|
||||
hasIcons={false}
|
||||
key={a1}
|
||||
>
|
||||
{a0.options.map(_fun102633)}
|
||||
</TableRowGroup>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun102627(a0) { // fn#102627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1429, offset: 0x02242e2b, size: 71 bytes, params: 2, frame: 15
|
||||
var r0;
|
||||
var items2;
|
||||
var value2;
|
||||
if (require) {
|
||||
items2 = [];
|
||||
value2 = arraySpread(items2, a0, 0, a0);
|
||||
items2[value2] = env0_0;
|
||||
value2 + 1;
|
||||
r0 = items2;
|
||||
} else {
|
||||
r0 = a0.filter(_fun102628);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun102633(a0, a1) { // fn#102633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2568, offset: 0x02243024, size: 131 bytes, params: 3, frame: 19
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
|
||||
const tableCheckboxRowProps = {label: (require(9505) /* metro dependency 9505: QuestCopyUtils */).getFilterTypeText(a0.filter),
|
||||
onPress: onPress_102634};
|
||||
value = environment.__proto__;
|
||||
tableCheckboxRowProps.checked = env1_4.some(_fun102635);
|
||||
return <TableCheckboxRow {...tableCheckboxRowProps} key={a1} />;
|
||||
}
|
||||
|
||||
function _fun102628(a0) { // fn#102628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:1453, offset: 0x02242e72, size: 30 bytes, params: 2, frame: 13
|
||||
return !isFilterOptionEqual(a0, env1_0);
|
||||
}
|
||||
|
||||
function onPress_102634(a0) { // fn#102634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2655, offset: 0x022430a7, size: 27 bytes, params: 2, frame: 13
|
||||
return env2_8(env0_0, a0);
|
||||
}
|
||||
|
||||
function _fun102635(a0) { // fn#102635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13701:2681, offset: 0x022430c2, size: 27 bytes, params: 2, frame: 13
|
||||
return isFilterOptionEqual(a0, env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,296 @@
|
||||
/* Metro module 13568; source: modules/quests/native/QuestHooks.native.tsx; dependencies: [5, 31, 3849, 4234, 7093, 6528, 9488, 482, 13569, 7108, 566, 6531, 7091, 13590, 10915, 4007, 7556, 9483, 9479, 5176, 9495, 7116, 8045, 7114, 8105, 6772, 8087, 9527, 2] */
|
||||
function _fun103102(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:6, offset: 0x02258a64, size: 373 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const closure = useIsMobileQuestDockRenderedBase;
|
||||
const closure2 = useIsMobileQuestDockRendered;
|
||||
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 actionSheetStore = importDefault(3849) /* metro dependency 3849: ActionSheetStore */;
|
||||
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
||||
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
|
||||
const env0_8 = questConstantsModule.QUEST_REWARD_CODE_CLAIM_BOTTOM_SHEET_KEY;
|
||||
const env0_9 = questConstantsModule.QuestVariants;
|
||||
const env0_10 = (require(9488) /* metro dependency 9488: CaptchaConstants */).CAPTCHA_MODAL_KEY;
|
||||
const env0_11 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestHooks.native.tsx');
|
||||
exports.useMobileQuestDockHeight = useMobileQuestDockHeight;
|
||||
exports.useMobileQuestDock = useMobileQuestDock;
|
||||
exports.useIsMobileQuestDockVisibleToUser = useIsMobileQuestDockVisibleToUser;
|
||||
exports.useIsMobileQuestDockRenderedBase = closure;
|
||||
exports.useIsMobileQuestDockRendered = closure2;
|
||||
exports.useQuestGameLogotypeAssetUrl = useQuestGameLogotypeAssetUrl;
|
||||
exports.useQuestDockHeroAsset = useQuestDockHeroAsset;
|
||||
exports.useHasWatchVideoOnMobileTasks = useHasWatchVideoOnMobileTasks;
|
||||
exports.useMobileActivityQuest = useMobileActivityQuest;
|
||||
}
|
||||
|
||||
function useIsMobileQuestDockRenderedBase(a0) { // fn#103103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:268, offset: 0x02258bd9, size: 391 bytes, params: 2, frame: 23
|
||||
var r6;
|
||||
var r0;
|
||||
var r1;
|
||||
var moduleValue2;
|
||||
const value2 = undefined;
|
||||
const value3 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], _fun103104, []);
|
||||
const userStatus = a0 == null ? value2 : a0.userStatus;
|
||||
const value5 = userStatus != null;
|
||||
if (value5) {
|
||||
moduleValue2 = require(7091) /* metro dependency 7091: QuestDataUtils */;
|
||||
r6 = moduleValue2.isDismissed(a0.userStatus,
|
||||
(require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_BAR_MOBILE);
|
||||
} else {
|
||||
r6 = value5;
|
||||
}
|
||||
const value6 = (a0 == null || a0.userStatus == null ? value2 : a0.userStatus.claimedAt) != null;
|
||||
let value = require(9483) /* metro dependency 9483: QuestHooks */;
|
||||
value = value.useIsQuestExpired(a0);
|
||||
const isEligibleForQuests = (require(9479) /* metro dependency 9479: QuestsEligibility */).getIsEligibleForQuests();
|
||||
const YouBarExperiment = (require(5176) /* metro dependency 5176: YouBarExperiment */).YouBarExperiment;
|
||||
const {enabled, questDockEnabled} = YouBarExperiment.useConfig({location: 'QuestDock'});
|
||||
if (value4) {
|
||||
value = a0 == null;
|
||||
r1 = value || value3;
|
||||
r1 = !r1 ? enabled && !questDockEnabled : r1;
|
||||
value = !r1;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = a0 != null && isEligibleForQuests;
|
||||
r0 = r0 && !value;
|
||||
r0 = r0 && !value6;
|
||||
r0 = r0 && !r6;
|
||||
r0 = r0 && !value3;
|
||||
r0 = r0 && !(enabled && !questDockEnabled);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useIsMobileQuestDockRendered() { // fn#103105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:852, offset: 0x02258d9c, size: 263 bytes, params: 1, frame: 23
|
||||
const defaultImport = importDefault(7108) /* metro dependency 7108: NewAdRequestBehaviorExperiment */;
|
||||
const useConfig = defaultImport.useConfig;
|
||||
const enableNewRequestBehavior = Reflect.apply(useConfig, defaultImport,
|
||||
[{location: 'QuestMobileDock'}]).enableNewRequestBehavior;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
const value2 = Reflect.apply(useStateFromStores, fluxModule, [[QuestStore], function() {
|
||||
return QuestStore.getQuestPreviewOverride(require(dependencyMap[11]).QuestContent.QUEST_BAR_MOBILE);
|
||||
}, []]);
|
||||
const value3 = fluxModule.useStateFromStores([QuestStore], _fun103107);
|
||||
const value4 = fluxModule.useStateFromStores([QuestStore], _fun103108);
|
||||
const moduleValue4 = fluxModule;
|
||||
useStateFromStores = moduleValue4.useStateFromStores;
|
||||
return useIsMobileQuestDockRenderedBase(value2 ?? (enableNewRequestBehavior ? Reflect.apply(useStateFromStores,
|
||||
moduleValue4, [[QuestStore], _fun103109, [value4]]) : value3));
|
||||
}
|
||||
|
||||
function useMobileQuestDockHeight() { // fn#103110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1719, offset: 0x02258fd4, size: 53 bytes, params: 1, frame: 13
|
||||
const value2 = useIsMobileQuestDockRendered();
|
||||
let value = require(13569) /* metro dependency 13569: QuestDockHooks */;
|
||||
value = value.useQuestDockExternalOffset();
|
||||
return value2 ? value : 0;
|
||||
}
|
||||
|
||||
function useMobileQuestDock() { // fn#103111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1866, offset: 0x02259009, size: 204 bytes, params: 1, frame: 23
|
||||
const defaultImport = importDefault(7108) /* metro dependency 7108: NewAdRequestBehaviorExperiment */;
|
||||
const useConfig = defaultImport.useConfig;
|
||||
const enableNewRequestBehavior = Reflect.apply(useConfig, defaultImport,
|
||||
[{location: 'QuestMobileDock'}]).enableNewRequestBehavior;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], function() {
|
||||
return QuestStore.getQuestPreviewOverride(require(dependencyMap[11]).QuestContent.QUEST_BAR_MOBILE);
|
||||
}, []);
|
||||
const value = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], _fun103113);
|
||||
const defaultImport2 = importDefault(13590) /* metro dependency 13590: useQuestForPlacement */;
|
||||
const QuestPlacement = (require(6531) /* metro dependency 6531: QuestTypes */).QuestPlacement;
|
||||
const MOBILE_HOME_DOCK_AREA = QuestPlacement.MOBILE_HOME_DOCK_AREA;
|
||||
return value2 ?? (enableNewRequestBehavior ? defaultImport2(MOBILE_HOME_DOCK_AREA) : value);
|
||||
}
|
||||
|
||||
function useIsMobileQuestDockVisibleToUser(a0, a1) { // fn#103114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2391, offset: 0x022590d5, size: 208 bytes, params: 3, frame: 22
|
||||
const value = a1;
|
||||
const env0_0 = a0;
|
||||
const value3 = (require(10915) /* metro dependency 10915: isChannelFocusedNative */).useIsChannelFocused();
|
||||
const value4 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).useCurrentNavigationRouteName();
|
||||
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
return value && !value3 && (navigationRouteUtilsNativeModule.coerceGuildsRoute({name: value4}) != null || (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore],
|
||||
_fun103115) && (require(566) /* metro dependency 566: flux */).useStateFromStores([ActionSheetStore],
|
||||
_fun103116));
|
||||
}
|
||||
|
||||
function useQuestGameLogotypeAssetUrl(a0) { // fn#103117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2903, offset: 0x022591f8, size: 44 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return env0_4.useMemo(_fun103118, [a0]);
|
||||
}
|
||||
|
||||
function useQuestDockHeroAsset(a0) { // fn#103119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3068, offset: 0x02259276, size: 44 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return env0_4.useMemo(_fun103120, [a0]);
|
||||
}
|
||||
|
||||
function useHasWatchVideoOnMobileTasks(a0) { // fn#103121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3439, offset: 0x0225937f, size: 44 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return env0_4.useMemo(_fun103122, [a0]);
|
||||
}
|
||||
|
||||
function useMobileActivityQuest(a0) { // fn#103123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3583, offset: 0x022593df, size: 403 bytes, params: 2, frame: 22
|
||||
const env0_0 = a0;
|
||||
const value2 = undefined;
|
||||
const activityApplicationId = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getActivityApplicationId(a0);
|
||||
const application = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore],
|
||||
_fun103124);
|
||||
const canLaunchFrame2 = (require(8045) /* metro dependency 8045: canLaunchFrame */).canLaunchFrame(application);
|
||||
const env0_3 = canLaunchFrame2;
|
||||
const r3 = (require(7114) /* metro dependency 7114: QuestUtils */).canLaunchActivity(a0) && a0.config.features.includes(QuestVariants.MOBILE_ACTIVITY_QUEST) && (importDefault(8105) /* metro dependency 8105: isActivitySupportedOnClientPlatform */)(application == null || application.embeddedActivityConfig == null ? value2 : application.embeddedActivityConfig.supported_platforms) && (canLaunchFrame2 || (application == null || application.bot == null ? value2 : application.bot.id) != null);
|
||||
const binding = r3;
|
||||
binding.useEffect(_fun103125, [application, activityApplicationId, a0.config.features]);
|
||||
const useCallback = binding.useCallback;
|
||||
let value = env0_3(_fun103127);
|
||||
value = Reflect.apply(useCallback, binding, [value, [canLaunchFrame2, application, r3]]);
|
||||
return {isMobileActivityQuest: r3, questApplication: application, launchMobileActivity: value};
|
||||
}
|
||||
|
||||
function _fun103104() { // fn#103104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:367, offset: 0x02258d60, size: 60 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
const getQuestPreviewOverride = QuestStore.getQuestPreviewOverride;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
return Reflect.apply(getQuestPreviewOverride, QuestStore, [QUEST_BAR_MOBILE]) != null;
|
||||
}
|
||||
|
||||
function _fun103107() { // fn#103107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1116, offset: 0x02258ed9, size: 96 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
const questDataUtilsModule = require(7091) /* metro dependency 7091: QuestDataUtils */;
|
||||
const getQuestForPlacement = questDataUtilsModule.getQuestForPlacement;
|
||||
const quests = QuestStore.quests;
|
||||
const questToDeliverForPlacement = QuestStore.questToDeliverForPlacement;
|
||||
const QuestPlacement = (require(6531) /* metro dependency 6531: QuestTypes */).QuestPlacement;
|
||||
const MOBILE_HOME_DOCK_AREA = QuestPlacement.MOBILE_HOME_DOCK_AREA;
|
||||
value = Reflect.apply(getQuestForPlacement, questDataUtilsModule, [quests, questToDeliverForPlacement,
|
||||
MOBILE_HOME_DOCK_AREA]);
|
||||
const value2 = null;
|
||||
return value2 != value ? value : value2;
|
||||
}
|
||||
|
||||
function _fun103108() { // fn#103108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1304, offset: 0x02258f39, size: 71 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
const questAdDecisionByPlacement = QuestStore.questAdDecisionByPlacement;
|
||||
const get = questAdDecisionByPlacement.get;
|
||||
const QuestPlacement = (require(6531) /* metro dependency 6531: QuestTypes */).QuestPlacement;
|
||||
const MOBILE_HOME_DOCK_AREA = QuestPlacement.MOBILE_HOME_DOCK_AREA;
|
||||
value = Reflect.apply(get, questAdDecisionByPlacement, [MOBILE_HOME_DOCK_AREA]);
|
||||
const value2 = null;
|
||||
return value2 != value ? value : value2;
|
||||
}
|
||||
|
||||
function _fun103109() { // fn#103109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:1457, offset: 0x02258f80, size: 84 bytes, params: 1, frame: 13
|
||||
const value2 = null;
|
||||
return value2 != (value2 == env0_0 ? undefined : env0_0.questId) && value2 != QuestStore.quests.get(env0_0.questId) ? QuestStore.quests.get(env0_0.questId) : value2;
|
||||
}
|
||||
|
||||
function _fun103115() { // fn#103115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2599, offset: 0x022591a5, size: 45 bytes, params: 1, frame: 12
|
||||
return env0_0 != null && QuestStore.isClaimingReward(env0_0.id);
|
||||
}
|
||||
|
||||
function _fun103116() { // fn#103116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2674, offset: 0x022591d2, size: 38 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
const key = ActionSheetStore.getKey();
|
||||
return key === CAPTCHA_MODAL_KEY || key === QUEST_REWARD_CODE_CLAIM_BOTTOM_SHEET_KEY;
|
||||
}
|
||||
|
||||
function _fun103118() { // fn#103118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:2962, offset: 0x02259224, size: 82 bytes, params: 1, frame: 18
|
||||
const assetUtilsModule = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
const getQuestAsset = assetUtilsModule.getQuestAsset;
|
||||
const binding = env0_0;
|
||||
const QuestAssetType = assetUtilsModule.QuestAssetType;
|
||||
const LOGO_TYPE = QuestAssetType.LOGO_TYPE;
|
||||
const DARK = ThemeTypes.DARK;
|
||||
return Reflect.apply(getQuestAsset, assetUtilsModule, [binding, LOGO_TYPE, DARK]).url;
|
||||
}
|
||||
|
||||
function _fun103120() { // fn#103120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3120, offset: 0x022592a2, size: 221 bytes, params: 1, frame: 18
|
||||
var r1;
|
||||
var moduleValue2;
|
||||
var resolveAsset;
|
||||
const value = environment.__proto__;
|
||||
const assetUtilsModule = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
const getQuestAsset = assetUtilsModule.getQuestAsset;
|
||||
let binding = env0_0;
|
||||
const QuestAssetType = assetUtilsModule.QuestAssetType;
|
||||
const QUEST_BAR_HERO = QuestAssetType.QUEST_BAR_HERO;
|
||||
const value3 = Reflect.apply(getQuestAsset, assetUtilsModule, [binding, QUEST_BAR_HERO]);
|
||||
const questBarHeroVideo = binding.config.assets.questBarHeroVideo;
|
||||
const value4 = null;
|
||||
if (value4 != questBarHeroVideo) {
|
||||
moduleValue2 = assetUtilsModule;
|
||||
resolveAsset = moduleValue2.resolveAsset;
|
||||
binding = env0_0;
|
||||
r1 = Reflect.apply(resolveAsset, moduleValue2, [binding.id, binding.config.assets.questBarHeroVideo]);
|
||||
} else {
|
||||
r1 = value4;
|
||||
}
|
||||
const isAnimated = value3.isAnimated;
|
||||
const url = value3.url;
|
||||
return {staticUrl: isAnimated ? url.replace(assetUtilsModule.EXTENSION_RE, '.png') : url, videoAsset: r1};
|
||||
}
|
||||
|
||||
function _fun103122() { // fn#103122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3499, offset: 0x022593ab, size: 52 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return (require(7116) /* metro dependency 7116: QuestTaskUtils */).hasWatchVideoOnMobileTasks({config: env0_0});
|
||||
}
|
||||
|
||||
function _fun103124() { // fn#103124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3700, offset: 0x02259572, size: 27 bytes, params: 1, frame: 11
|
||||
return ApplicationStore.getApplication(env0_1);
|
||||
}
|
||||
|
||||
function _fun103125() { // fn#103125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:3988, offset: 0x0225958d, size: 124 bytes, params: 1, frame: 14
|
||||
var value6;
|
||||
var defaultImport;
|
||||
if (application == null && env0_1 != null && env0_0.config.features.includes(QuestVariants.MOBILE_ACTIVITY_QUEST)) {
|
||||
value6 = environment.__proto__;
|
||||
defaultImport = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
|
||||
defaultImport.fetchApplications([env0_1], false);
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun103127() { // fn#103127, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13758:4149, offset: 0x02259614, size: 241 bytes, params: 1, frame: 15
|
||||
var id;
|
||||
var value4;
|
||||
var value5;
|
||||
var launchActivityInBotDM;
|
||||
var object2;
|
||||
var value7;
|
||||
var value8;
|
||||
if (true) {
|
||||
value = environment.__proto__;
|
||||
if (env1_4) {
|
||||
if (env1_3) {
|
||||
value7 = environment.__proto__.__proto__;
|
||||
value8 = env2_1(env2_2[26]);
|
||||
yield value8.launchFrame({applicationId: dependencyMap.id});
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
id = dependencyMap == null || dependencyMap.bot == null ? undefined : dependencyMap.bot.id;
|
||||
if (id == null) {
|
||||
return undefined;
|
||||
}
|
||||
value4 = environment.__proto__.__proto__;
|
||||
value5 = env2_0(env2_2[27]);
|
||||
launchActivityInBotDM = value5.launchActivityInBotDM;
|
||||
object2 = {};
|
||||
id = dependencyMap.id;
|
||||
object2.appId = id;
|
||||
id = dependencyMap.bot.id;
|
||||
object2.botId = id;
|
||||
object2.analyticsLocations = [];
|
||||
yield Reflect.apply(launchActivityInBotDM, value5, [object2]);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/* Metro module 13598; source: modules/quests/native/QuestModalContentCloudBackground.tsx; dependencies: [31, 27, 33, 4501, 3866, 4048, 4589, 5475, 13599, 13600, 2] */
|
||||
function _fun103347(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13788:6, offset: 0x0226343e, size: 248 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.StyleSheet;
|
||||
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(_fun103348);
|
||||
const env0_9 = ['#292252FF', '#1E1F2200'].slice().reverse();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestModalContentCloudBackground.tsx');
|
||||
exports.default = QuestModalContentCloudBackground;
|
||||
}
|
||||
|
||||
function _fun103348(a0) { // fn#103348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13788:189, offset: 0x02263536, size: 295 bytes, params: 2, frame: 18
|
||||
const object6 = {};
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
||||
const object8 = {};
|
||||
if (a0) {
|
||||
object8.top = undefined;
|
||||
} else {
|
||||
object8.bottom = undefined;
|
||||
}
|
||||
copyDataProperties(object7, object8, undefined);
|
||||
object7['height'] = 380;
|
||||
object7['zIndex'] = 1;
|
||||
object6.wrapper = object7;
|
||||
const object12 = {};
|
||||
copyDataProperties(object12, StyleSheet.absoluteFillObject, undefined);
|
||||
const object13 = {};
|
||||
if (a0) {
|
||||
object13.top = undefined;
|
||||
} else {
|
||||
object13.bottom = undefined;
|
||||
}
|
||||
copyDataProperties(object12, object13, undefined);
|
||||
copyDataProperties(object12, a0 ? {} : {transform: [{rotate: '180deg'}]}, undefined);
|
||||
object12['width'] = '100%';
|
||||
object6.cloudsImage = object12;
|
||||
const object14 = {};
|
||||
copyDataProperties(object14, StyleSheet.absoluteFillObject, undefined);
|
||||
object14['bottom'] = undefined;
|
||||
object14['width'] = '100%';
|
||||
object6.cloudsImageLight = object14;
|
||||
const object15 = {};
|
||||
copyDataProperties(object15, StyleSheet.absoluteFillObject, undefined);
|
||||
object15['opacity'] = 1;
|
||||
object6.gradient = object15;
|
||||
const object16 = {};
|
||||
copyDataProperties(object16, StyleSheet.absoluteFillObject, undefined);
|
||||
object6.solidBackground = object16;
|
||||
return object6;
|
||||
}
|
||||
|
||||
function QuestModalContentCloudBackground({align, style, imgStyle, resizeMode}) { // fn#103349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13788:624, offset: 0x0226365d, size: 373 bytes, params: 2, frame: 24
|
||||
let value = 'bottom';
|
||||
const r14 = align === undefined ? value : align;
|
||||
const r8 = resizeMode === undefined ? 'cover' : resizeMode;
|
||||
const styles = useStyles(value === r14);
|
||||
const isThemeDark = require(dependencyMap[4]).isThemeDark;
|
||||
const moduleValue = require(dependencyMap[5]);
|
||||
const useTheme = moduleValue.useTheme;
|
||||
value = Reflect.apply(isThemeDark, value, [Reflect.apply(useTheme, moduleValue, [])]);
|
||||
return (
|
||||
<View style={[styles.wrapper, style]}>
|
||||
{value ? ((Component) => <Component colors={r14 === 'top' ? env0_8 : env0_9} style={styles.gradient} />)(importDefault(dependencyMap[6])) : <View style={styles.solidBackground} />}
|
||||
{((Component) => <Component style={[value ? styles.cloudsImage : styles.cloudsImageLight,
|
||||
imgStyle]} source={importDefault(value ? dependencyMap[8] : dependencyMap[9])} resizeMode={r8} />)(importDefault(dependencyMap[7]))}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
/* Metro module 13637; source: modules/quests/native/QuestOrbMultiplierPerkInfoActionSheet.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 4080, 7007, 7899, 3853, 1948, 4578, 1244, 1585, 6515, 3868, 4573, 9503, 3066, 6275, 13634, 2] */
|
||||
function _fun104132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:6, offset: 0x02287146, size: 527 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = value.AnalyticsPages;
|
||||
const env0_6 = value.HelpdeskArticles;
|
||||
const env0_7 = value.UserSettingsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = value.Fragment;
|
||||
object2 = {marginBottom: 0};
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.container = {alignItems: 'center', paddingHorizontal: PX_16};
|
||||
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
|
||||
object2.contentContainer = {'alignItems': 'center', 'width': '100%', marginTop: PX_48};
|
||||
const object3 = {textAlign: 'center'};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object3.paddingHorizontal = PX_24;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.paddingBottom = PX_16;
|
||||
object2.text = object3;
|
||||
const object6 = {width: '100%'};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object6.gap = PX_12;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.marginVertical = PX_16;
|
||||
object2.buttonContainer = object6;
|
||||
object2.title = {'textTransform': 'uppercase', 'textAlign': 'center', 'lineHeight': 34, 'paddingHorizontal': 0};
|
||||
object2.riveContainer = {'width': '100%', 'height': 160};
|
||||
const env0_12 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestOrbMultiplierPerkInfoActionSheet.tsx');
|
||||
exports.default = QuestOrbMultiplierPerkInfoActionSheet;
|
||||
}
|
||||
|
||||
function Footer({eligibleToReceivePremiumRewards}) { // fn#104133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:755, offset: 0x02287355, size: 579 bytes, params: 2, frame: 29
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items3;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const binding = env0_3;
|
||||
const value2 = binding.useCallback(function() {
|
||||
importDefault(dependencyMap[6]).hideActionSheet();
|
||||
require(dependencyMap[7]).openUserSettings({screen: UserSettingsSections.PREMIUM});
|
||||
}, []);
|
||||
const defaultImport = importDefault(7899) /* metro dependency 7899: usePremiumFeatureUpsellGetNitro */;
|
||||
const QUEST_ORB_MULTIPLIER_PERK_INFO = AnalyticsPages.QUEST_ORB_MULTIPLIER_PERK_INFO;
|
||||
const {loading, onPress} = defaultImport(false, value2, QUEST_ORB_MULTIPLIER_PERK_INFO);
|
||||
const value4 = binding.useCallback(function() {
|
||||
importDefault(dependencyMap[6]).hideActionSheet();
|
||||
importDefault(dependencyMap[9]).openURL(importDefault(dependencyMap[10]).getArticleURL(HelpdeskArticles.VIRTUAL_CURRENCY_ORB_MULTIPLIER_LEARN_MORE));
|
||||
}, []);
|
||||
const value5 = binding.useCallback(_fun104136, []);
|
||||
const viewBindingProps = {style: styles.buttonContainer};
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
if (eligibleToReceivePremiumRewards) {
|
||||
string = intl.string;
|
||||
items2 = [<Button size="lg" text={Reflect.apply(string, intl,
|
||||
[t.hvVgAZ])} variant="primary" onPress={value4} />];
|
||||
string = intl.string;
|
||||
items2[1] = <Button size="lg" variant="secondary" text={Reflect.apply(string, intl,
|
||||
[t.cpT0Cq])} onPress={value5} />;
|
||||
viewBindingProps.children = items2;
|
||||
} else {
|
||||
string = intl.string;
|
||||
items3 = [<Button size="lg" variant="primary" text={Reflect.apply(string, intl,
|
||||
[t.pj0XBN])} onPress={onPress} loading={loading} />];
|
||||
string = intl.string;
|
||||
items3[1] = <Button size="lg" variant="secondary" text={Reflect.apply(string, intl,
|
||||
[t.PcTCB7])} onPress={value2} />;
|
||||
viewBindingProps.children = items3;
|
||||
}
|
||||
return <View {...viewBindingProps} />;
|
||||
}
|
||||
|
||||
function SheetContent({title, body, eligibleToReceivePremiumRewards}) { // fn#104137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:1703, offset: 0x0228766b, size: 401 bytes, params: 2, frame: 31
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
|
||||
const ActionSheetHeaderBar = (require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar;
|
||||
const actionSheetHeaderBar = <ActionSheetHeaderBar variant="floating" />;
|
||||
const items2 = [styles.container];
|
||||
items2[1] = {marginBottom: bottom};
|
||||
const NitroQuestOrbsMultiplierRive = (require(3868) /* metro dependency 3868: native */).NitroQuestOrbsMultiplierRive;
|
||||
const items3 = [<View style={styles.riveContainer}><NitroQuestOrbsMultiplierRive /></View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items3[1] = <Text style={[styles.text,
|
||||
styles.title]} variant="display-md" color="mobile-text-heading-primary" accessibilityRole="header">{title}</Text>;
|
||||
items3[2] = <Text style={styles.text} variant="text-sm/normal">{body}</Text>;
|
||||
items3[3] = <Footer eligibleToReceivePremiumRewards={eligibleToReceivePremiumRewards} />;
|
||||
return (
|
||||
<>
|
||||
{actionSheetHeaderBar}
|
||||
<View style={items2}>
|
||||
<View style={styles.contentContainer}>
|
||||
{items3}
|
||||
</View>
|
||||
</View>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestOrbMultiplierPerkInfoActionSheet({multiplier, orbMultiplierEligibility}) { // fn#104138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:2405, offset: 0x022877fc, size: 313 bytes, params: 2, frame: 21
|
||||
const shouldReceiveQuestOrbMultiplier2 = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).shouldReceiveQuestOrbMultiplier(orbMultiplierEligibility);
|
||||
const QuestOrbMultiplierEligibilityType = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType;
|
||||
const NITRO = QuestOrbMultiplierEligibilityType.NITRO;
|
||||
const r7 = orbMultiplierEligibility === NITRO || orbMultiplierEligibility === (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType.UPSELL;
|
||||
const binding = env0_3;
|
||||
const value4 = binding.useMemo(_fun104139, [orbMultiplierEligibility]);
|
||||
const value5 = binding.useMemo(_fun104140, [shouldReceiveQuestOrbMultiplier2, orbMultiplierEligibility, multiplier]);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
return (
|
||||
<BottomSheet
|
||||
scrollable={false}
|
||||
handleDisabled
|
||||
startExpanded
|
||||
contentStyles={env0_11}
|
||||
>
|
||||
{((Component) => <Component visible={r7}><SheetContent title={value4} body={value5} eligibleToReceivePremiumRewards={shouldReceiveQuestOrbMultiplier2} /></Component>)(importDefault(13634) /* metro dependency 13634: PremiumRewardGradient */)}
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104136() { // fn#104136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:1134, offset: 0x02287646, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _fun104139() { // fn#104139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:2668, offset: 0x02287935, size: 168 bytes, params: 1, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const orbMultiplierEligibilityBinding = orbMultiplierEligibility;
|
||||
const value = environment.__proto__;
|
||||
const QuestOrbMultiplierEligibilityType = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType;
|
||||
const CREPE = QuestOrbMultiplierEligibilityType.CREPE;
|
||||
return orbMultiplierEligibilityBinding === CREPE ? intl.string((importDefault(3066) /* metro dependency 3066: CrepeMessages */).c5usUr) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Csf5Ol);
|
||||
}
|
||||
|
||||
function _fun104140() { // fn#104140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13834:2822, offset: 0x022879dd, size: 226 bytes, params: 1, frame: 18
|
||||
var r0;
|
||||
var binding;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var format;
|
||||
var t;
|
||||
const orbMultiplierEligibilityBinding = orbMultiplierEligibility;
|
||||
const QuestOrbMultiplierEligibilityType = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType;
|
||||
const CREPE = QuestOrbMultiplierEligibilityType.CREPE;
|
||||
if (orbMultiplierEligibilityBinding === CREPE) {
|
||||
r0 = intl.format((importDefault(3066) /* metro dependency 3066: CrepeMessages */).UkrcSH,
|
||||
{bonusOrbMultiplier: multiplier});
|
||||
} else {
|
||||
binding = env0_2;
|
||||
format = intl.format;
|
||||
t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
r0 = binding ? Reflect.apply(format, intl, [t.NpUfej, {bonusOrbMultiplier: multiplier}]) : Reflect.apply(format,
|
||||
intl, [t['G5k+lZ'], {bonusOrbMultiplier: multiplier}]);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
/* Metro module 13635; source: modules/quests/native/QuestOrbMultiplierPerkPill.tsx; dependencies: [31, 27, 33, 4501, 697, 4048, 3866, 3860, 4000, 9483, 9503, 1244, 7954, 4573, 5278, 13636, 4589, 2] */
|
||||
function _fun104126(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13832:6, offset: 0x02286af6, size: 383 bytes, params: 8, frame: 23
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_4 = value.View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.Fragment;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = {'x': 0, 'y': 0};
|
||||
const env0_9 = {'x': 1, 'y': 0};
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {'borderRadius': null, 'overflow': 'hidden', 'height': 19, 'backgroundColor': 'transparent'};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object4.fullGradientContainer = object5;
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
||||
object6['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object4.fullGradient = object6;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.fullGradientContent = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center',
|
||||
'paddingHorizontal': null, 'gap': 4, 'height': 19, paddingHorizontal: PX_8};
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestOrbMultiplierPerkPill.tsx');
|
||||
exports.QuestOrbMultiplierPerkPill = QuestOrbMultiplierPerkPill;
|
||||
}
|
||||
|
||||
function QuestOrbMultiplierPerkPill({onPress, questId, orbMultiplierEligibility}) { // fn#104127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13832:672, offset: 0x02286c75, size: 938 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
const isThemeDark2 = (require(3866) /* metro dependency 3866: themes */).isThemeDark((require(4048) /* metro dependency 4048: useTheme */).useTheme());
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
let useToken = useTokenModule.useToken;
|
||||
const EXPRESSIVE_GRADIENT_PINK_START = (importDefault(697) /* metro dependency 697: native */).colors.EXPRESSIVE_GRADIENT_PINK_START;
|
||||
const value3 = Reflect.apply(useToken, useTokenModule, [EXPRESSIVE_GRADIENT_PINK_START, 'dark']);
|
||||
const moduleValue4 = useTokenModule;
|
||||
useToken = moduleValue4.useToken;
|
||||
const EXPRESSIVE_GRADIENT_TENURE_BADGE_DIAMOND_END = (importDefault(697) /* metro dependency 697: native */).colors.EXPRESSIVE_GRADIENT_TENURE_BADGE_DIAMOND_END;
|
||||
const value4 = Reflect.apply(useToken, moduleValue4, [EXPRESSIVE_GRADIENT_TENURE_BADGE_DIAMOND_END, 'dark']);
|
||||
const moduleValue5 = useTokenModule;
|
||||
useToken = moduleValue5.useToken;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
const value5 = Reflect.apply(useToken, moduleValue5, [BACKGROUND_BASE_LOWEST, 'dark']);
|
||||
const env0_3 = value5;
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
const items2 = [colorUtilsModule.hexOpacityToRgba(value3, 1)];
|
||||
const moduleValue7 = colorUtilsModule;
|
||||
items2[1] = moduleValue7.hexOpacityToRgba(value4, 0.5);
|
||||
const moduleValue8 = useTokenModule;
|
||||
useToken = moduleValue8.useToken;
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
const value7 = Reflect.apply(useToken, moduleValue8, [BACKGROUND_BRAND]);
|
||||
const value8 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestOrbRewardMultiplier(questId);
|
||||
const shouldReceiveQuestOrbMultiplier2 = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).shouldReceiveQuestOrbMultiplier(orbMultiplierEligibility);
|
||||
const QuestOrbMultiplierEligibilityType = (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType;
|
||||
const CREPE = QuestOrbMultiplierEligibilityType.CREPE;
|
||||
const value9 = orbMultiplierEligibility === CREPE;
|
||||
const value10 = env0_3.useMemo(_fun104128, [value9, value5, value7, isThemeDark2]);
|
||||
if (value8 == null) {
|
||||
return null;
|
||||
}
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r5 = shouldReceiveQuestOrbMultiplier2 ? Reflect.apply(formatToPlainString, intl, [t.l2UfLG,
|
||||
{bonusOrbMultiplier: value8}]) : Reflect.apply(formatToPlainString, intl, [t['G+mKoo'],
|
||||
{bonusOrbMultiplier: value8}]);
|
||||
const jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
|
||||
const value13 = !value9;
|
||||
const r2 = value9 ? value13 : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="white" />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const fragment = <>{r2}<Text variant="text-xs/semibold" color="always-white">{r5}</Text></>;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
return (
|
||||
<PressableOpacity
|
||||
onPress={onPress_104129}
|
||||
activeOpacity={0.8}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={r5}
|
||||
>
|
||||
<View style={[styles.fullGradientContainer, {backgroundColor: value10}]}>
|
||||
{value9 ? value13 : ((Component) => <Component style={styles.fullGradient} colors={items2} start={env0_8} end={env0_9} />)(importDefault(4589) /* metro dependency 4589 */)}
|
||||
<View style={styles.fullGradientContent}>
|
||||
{fragment}
|
||||
</View>
|
||||
</View>
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104128() { // fn#104128, offset: 0x0228701f, size: 33 bytes, params: 1, frame: 3
|
||||
return result ? env0_4 : env0_2 ? 'transparent' : env0_3;
|
||||
}
|
||||
|
||||
function QuestOrbMultiplierPerkPillOnPress() { // fn#104129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13832:1734, owner: QuestOrbMultiplierPerkPill.onPress, offset: 0x02287040, size: 62 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
(importDefault(13636) /* metro dependency 13636: openQuestOrbMultiplierPerkInfoActionSheet */)(env0_5,
|
||||
orbMultiplierEligibility);
|
||||
if (onPress != null) {
|
||||
onPress();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,451 @@
|
||||
/* Metro module 10184; source: modules/quests/native/QuestOrbsRewardModal.native.tsx; dependencies: [57, 5, 31, 27, 4502, 1878, 7030, 6528, 661, 663, 33, 5080, 10184, 1962, 4501, 697, 5287, 5312, 1244, 5475, 7897, 478, 10142, 9543, 10143, 10185, 10186, 10187, 566, 10069, 676, 9500, 7717, 5120, 6789, 9480, 6531, 9511, 6618, 4573, 10076, 4578, 2] */
|
||||
function _fun79254(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:6, offset: 0x01e4acdd, size: 649 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
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 = importDefault(5) /* metro dependency 5 */;
|
||||
const value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value2.ActivityIndicator;
|
||||
const env0_7 = value2.StyleSheet;
|
||||
const env0_8 = value2.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
|
||||
const env0_12 = (require(6528) /* metro dependency 6528: QuestConstants */).RewardFilterTypes;
|
||||
const env0_13 = (require(661) /* metro dependency 661: Constants */).Orientation;
|
||||
const env0_14 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_15 = value3.jsx;
|
||||
const env0_16 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.closeButton = {'alignSelf': 'flex-start', 'marginHorizontal': null, 'zIndex': 999, marginHorizontal: PX_16};
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object2.closeButtonIcon = {tintColor: WHITE};
|
||||
const env0_17 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
const env0_18 = createStylesModule.createStyles(_fun79262);
|
||||
const env0_20 = value.memo(_fun79266);
|
||||
const env0_21 = value.memo(_fun79268);
|
||||
const env0_22 = value.memo(_fun79270);
|
||||
const env0_23 = value.memo(_fun79271);
|
||||
const env0_24 = createStylesModule.createStyles({animatedOrb: {'position': 'absolute', 'height': '130%',
|
||||
'width': '130%', 'left': '-15%', 'top': '-15%', 'pointerEvents': 'none'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestOrbsRewardModal.native.tsx');
|
||||
exports.default = _default_79272;
|
||||
exports.openQuestOrbsRewardModal = openQuestOrbsRewardModal;
|
||||
}
|
||||
|
||||
function StaticOrb() { // fn#79255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2726, offset: 0x01e4af66, size: 124 bytes, params: 1, frame: 21
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View style={{'width': '100%', 'height': '100%'}}>
|
||||
{((Component) => <Component source={{uri: importDefault(10185) /* metro dependency 10185: static_idle_orbPng */}} style={styles.animatedOrb} fade={false} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function AnimatedOrbContainer({isAppActive}) { // fn#79256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2879, offset: 0x01e4afe2, size: 511 bytes, params: 2, frame: 28
|
||||
const styles = useStyles();
|
||||
let binding = env0_5;
|
||||
const [property, env0_1] = env0_3Binding(binding.useState(false), 2);
|
||||
var [property2, env0_3] = env0_3Binding(env0_5.useState(false), 2);
|
||||
const [property3, env0_4] = env0_3Binding(env0_5.useState(true), 2);
|
||||
const value8 = env0_5.useCallback(_fun79257, []);
|
||||
const value9 = env0_5.useCallback(_fun79258, []);
|
||||
env0_5.useEffect(_fun79259, [property, property2]);
|
||||
const items2 = [!property && !property2 && <View style={{height: '100%'}} />];
|
||||
binding = env0_22;
|
||||
items2[1] = ((Component) => <Component uri={importDefault(10186) /* metro dependency 10186: quest_reward_mobile_idle_darkPng */} style={[styles.animatedOrb,
|
||||
(property3 || !property2) && ({opacity: 0})]} onLoad={value9} animate={!property3 && isAppActive} />)(binding);
|
||||
items2[2] = property3 && ((Component) => <Component uri={importDefault(10187) /* metro dependency 10187: quest_reward_mobile_entry_darkPng */} style={[styles.animatedOrb]} onLoad={value8} animate={isAppActive} />)(env0_22);
|
||||
return (
|
||||
<View style={{'width': '100%', 'height': '100%'}}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun79262() { // fn#79262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:542, offset: 0x01e4b234, size: 350 bytes, params: 1, frame: 18
|
||||
const object2 = {};
|
||||
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.root = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
object2.background = StyleSheet.absoluteFillObject;
|
||||
const object4 = {'justifyContent': 'center', 'alignItems': 'center'};
|
||||
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object4.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
copyDataProperties(object4, StyleSheet.absoluteFillObject, BACKGROUND_BASE_LOW);
|
||||
object2.loading = object4;
|
||||
object2.header = {'flexDirection': 'row', 'alignItems': 'flex-end', 'justifyContent': 'flex-end'};
|
||||
object2.main = {flex: 2};
|
||||
object2.animation = {flex: 3};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.body = {'flex': 2, 'flexDirection': 'column', 'justifyContent': 'center', gap: PX_16};
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object2.title = {textAlign: 'center', marginHorizontal: PX_32};
|
||||
const object5 = {};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object5.padding = PX_24;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.gap = PX_16;
|
||||
object2.buttonsContainer = object5;
|
||||
object2.orbsIconAndroid = {transform: [{translateY: 3}]};
|
||||
object2.orbsIconIOS = {'marginTop': 0, 'marginRight': 3};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function CancelButton_79263() { // fn#79263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1212, offset: 0x01e4b392, size: 150 bytes, params: 1, frame: 19
|
||||
const styles = useStyles();
|
||||
const HeaderBackButton = (require(5287) /* metro dependency 5287 */).HeaderBackButton;
|
||||
const object2 = {onPress: onPress_79264, backImage: backImage};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq);
|
||||
object2.labelVisible = false;
|
||||
object2.style = styles.closeButton;
|
||||
return <HeaderBackButton {...object2} />;
|
||||
}
|
||||
|
||||
function _fun79266({uri, onLoad, animate}) { // fn#79266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1483, offset: 0x01e4b4a2, size: 184 bytes, params: 2, frame: 20
|
||||
animate = animate === undefined || animate;
|
||||
env0_5.useEffect(_fun79267, [uri]);
|
||||
return ((Component) => <Component source={{uri: uri}} style={{'width': '100%',
|
||||
'height': '100%'}} resizeMode="cover" enableAnimation={animate} onLoad={onLoad} usesSmallCache={false} fade={false} key={'orb-animate-' + animate} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
}
|
||||
|
||||
function _fun79268({uri, onLoad, animate}) { // fn#79268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1743, offset: 0x01e4b587, size: 193 bytes, params: 2, frame: 23
|
||||
animate = animate === undefined || animate;
|
||||
const value2 = env0_5.useRef(null);
|
||||
env0_5.useEffect(_fun79269, [animate,
|
||||
(require(7897) /* metro dependency 7897: APNGPlayerAndroid */).useAPNGPlayerControls(value2)]);
|
||||
const APNGPlayer = (require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer;
|
||||
return (
|
||||
<APNGPlayer
|
||||
ref={value2}
|
||||
url={uri}
|
||||
autoplay={false}
|
||||
style={{'width': '100%', 'height': '100%'}}
|
||||
onLoad={onLoad}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun79270({uri, style, onLoad, animate}) { // fn#79270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2000, offset: 0x01e4b670, size: 141 bytes, params: 2, frame: 19
|
||||
animate = animate === undefined || animate;
|
||||
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
|
||||
return (
|
||||
<View
|
||||
style={style}
|
||||
renderToHardwareTextureAndroid
|
||||
needsOffscreenAlphaCompositing
|
||||
>
|
||||
{((Component) => <Component uri={uri} onLoad={onLoad} animate={animate} />)(platformUtilsModule.isAndroid() ? env0_21 : env0_20)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun79271({useReducedMotion, style, onStaticBgLoad, onAnimatedBgLoad, isAppActive}) { // fn#79271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:2223, offset: 0x01e4b6fd, size: 250 bytes, params: 2, frame: 26
|
||||
var VideoComponent;
|
||||
var object;
|
||||
const Fragment = env0_5.Fragment;
|
||||
const value2 = ((Component) => <Component source={{uri: importDefault(10142) /* metro dependency 10142: quest_reward_mobile_bg_staticPng */}} style={style} resizeMode="cover" onLoad={onStaticBgLoad} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
let r5 = !useReducedMotion && isAppActive;
|
||||
if (r5) {
|
||||
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
|
||||
object = {};
|
||||
object.uri = importDefault(10143) /* metro dependency 10143: quest_reward_mobile_bgMp4 */;
|
||||
r5 = <VideoComponent source={object} style={style} resizeMode="cover" onLoad={onAnimatedBgLoad} disableFocus playInBackground preventsDisplaySleepDuringVideoPlayback={false} />;
|
||||
}
|
||||
return (
|
||||
<Fragment>
|
||||
{value2}
|
||||
{r5}
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_79272({quest}) { // fn#79272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3484, offset: 0x01e4b7f7, size: 1752 bytes, params: 2, frame: 40
|
||||
var r29;
|
||||
var r14;
|
||||
var moduleValue5;
|
||||
var SafeAreaPaddingView;
|
||||
var items3;
|
||||
var Heading;
|
||||
var title;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var format;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items4;
|
||||
var Text;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var object;
|
||||
var primary;
|
||||
var string;
|
||||
var items5;
|
||||
var secondary;
|
||||
var value28;
|
||||
var object2;
|
||||
const env0_3 = undefined;
|
||||
let env0_5 = undefined;
|
||||
const styles = useStyles();
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const hooksModule = require(10069) /* metro dependency 10069: hooks */;
|
||||
const useFetchVirtualCurrencyBalance = hooksModule.useFetchVirtualCurrencyBalance;
|
||||
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, hooksModule, []).balance;
|
||||
const [property, env0_1] = env0_3(env0_5.useState(false), 2);
|
||||
const [property2, env0_2] = env0_3(env0_5.useState(false), 2);
|
||||
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
|
||||
return AppStateStore.getState();
|
||||
});
|
||||
const AppStates = (require(676) /* metro dependency 676: ConstantsIOS */).AppStates;
|
||||
const ACTIVE = AppStates.ACTIVE;
|
||||
const value8 = state === ACTIVE;
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const userStatus = quest.userStatus;
|
||||
const orbQuantityClaimed = userStatus?.orbQuantityClaimed;
|
||||
if (orbQuantityClaimed != null) {
|
||||
r29 = orbQuantityClaimed;
|
||||
} else {
|
||||
moduleValue5 = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
||||
r29 = moduleValue5.getQuestOrbRewardQuantityForUser(quest.config, currentUser);
|
||||
}
|
||||
env0_5.useEffect(function() {
|
||||
require(dependencyMap[32]).lockOrientation(Orientation.PORTRAIT);
|
||||
return _fun79277;
|
||||
}, []);
|
||||
const value10 = env0_5.useCallback(_fun79278, []);
|
||||
const value11 = env0_5.useCallback(_fun79279, []);
|
||||
const value12 = env0_5.useCallback(_fun79280, []);
|
||||
const value13 = env0_5.useCallback(function() {
|
||||
importDefault(dependencyMap[11]).popWithKey('QuestOrbsRewardModal');
|
||||
var moduleValue = require(dependencyMap[35]);
|
||||
var object = {};
|
||||
object.filter = RewardFilterTypes.VIRTUAL_CURRENCY;
|
||||
object.fromContent = require(dependencyMap[36]).QuestContent.REWARD_MODAL;
|
||||
moduleValue.openQuestHome(object);
|
||||
}, []);
|
||||
const experimentsModule = require(9511) /* metro dependency 9511: experiments */;
|
||||
const useMobileQuestOrbRewardModalCtaPriorityExperiment = experimentsModule.useMobileQuestOrbRewardModalCtaPriorityExperiment;
|
||||
const variant = Reflect.apply(useMobileQuestOrbRewardModalCtaPriorityExperiment, experimentsModule, []).variant;
|
||||
env0_5 = variant;
|
||||
const value14 = (balance ?? 0) >= 4100;
|
||||
const value15 = env0_5.useMemo(_fun79282, [variant, value14, value13, value12]);
|
||||
const env0_8 = (require(478) /* metro dependency 478: PlatformUtils */).isAndroid() ? styles.orbsIconAndroid : styles.orbsIconIOS;
|
||||
const items2 = [<View style={StyleSheet.absoluteFill} accessible={false} accessibilityElementsHidden importantForAccessibility="no-hide-descendants">{((Component) => <Component useReducedMotion={useReducedMotion} style={styles.background} onStaticBgLoad={value10} onAnimatedBgLoad={value11} isAppActive={value8} />)(env0_23)}</View>];
|
||||
items2[1] = !property && (useReducedMotion || !property2) && <View style={styles.loading}><ActivityIndicator animating /></View>;
|
||||
let r5 = property || !useReducedMotion && property2;
|
||||
if (r5) {
|
||||
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
var safeAreaPaddingViewProps = {'style': null, 'top': true, 'bottom': true, 'left': true, 'right': true,
|
||||
style: [styles.main]};
|
||||
items3 = [<View style={styles.header}><CancelButton_79263 /></View>];
|
||||
var viewBinding5Props = {'style': null, 'accessible': false, 'accessibilityElementsHidden': true,
|
||||
'importantForAccessibility': 'no-hide-descendants', style: styles.animation};
|
||||
r14 = useReducedMotion ? <StaticOrb /> : <AnimatedOrbContainer isAppActive={value8} />;
|
||||
items3[1] = <View {...viewBinding5Props}>{r14}</View>;
|
||||
var viewBinding6Props = {style: styles.body};
|
||||
Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
|
||||
title = styles.title;
|
||||
format = intl.format;
|
||||
items4 = [<Heading variant="heading-xl/bold" color="white" style={title}>{Reflect.apply(format, intl, [t.FIilK5,
|
||||
{count: r29 ?? 0}])}</Heading>];
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
title = styles.title;
|
||||
format = intl.format;
|
||||
items4[1] = <Text variant="text-md/normal" color="white" style={title}>{value14 ? Reflect.apply(format, intl,
|
||||
[t['2dz2AL'], {balanceHook: balanceHook_79283, profileDecoHook: profileDecoHook}]) : Reflect.apply(format,
|
||||
intl,
|
||||
[t.rKHvlX, {balanceHook: balanceHook}])}</Text>;
|
||||
items3[2] = <View {...viewBinding6Props}>{items4}</View>;
|
||||
var viewBinding7Props = {style: styles.buttonsContainer};
|
||||
object = {'onPress': null, 'variant': 'primary', 'size': 'lg'};
|
||||
primary = value15.primary;
|
||||
object.onPress = primary.handler;
|
||||
string = intl.string;
|
||||
primary = value15.primary;
|
||||
object.text = Reflect.apply(string, intl, [primary.text]);
|
||||
items5 = [<Button {...object} />];
|
||||
secondary = value15.secondary;
|
||||
value28 = secondary != null;
|
||||
if (value28) {
|
||||
object2 = {'onPress': null, 'variant': 'secondary', 'size': 'lg'};
|
||||
secondary = value15.secondary;
|
||||
object2.onPress = secondary.handler;
|
||||
string = intl.string;
|
||||
secondary = value15.secondary;
|
||||
object2.text = Reflect.apply(string, intl, [secondary.text]);
|
||||
r14 = <Button {...object2} />;
|
||||
} else {
|
||||
r14 = value28;
|
||||
}
|
||||
items5[1] = r14;
|
||||
items3[3] = <View {...viewBinding7Props}>{items5}</View>;
|
||||
r5 = <SafeAreaPaddingView {...safeAreaPaddingViewProps}>{items3}</SafeAreaPaddingView>;
|
||||
}
|
||||
items2[2] = r5;
|
||||
return (
|
||||
<View style={styles.root}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function openQuestOrbsRewardModal({quest}) { // fn#79286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:7109, offset: 0x01e4c31d, size: 80 bytes, params: 2, frame: 16
|
||||
const defaultImport = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
|
||||
defaultImport.pushLazy(env0_4(_fun79288), {quest: quest}, 'QuestOrbsRewardModal');
|
||||
}
|
||||
|
||||
function _fun79259() { // fn#79259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3144, offset: 0x01e4b1f3, size: 65 bytes, params: 1, frame: 14
|
||||
if (env0_0) {
|
||||
if (env0_2) {
|
||||
var env0_0 = global.setTimeout(_fun79260, 1450);
|
||||
return _fun79261;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function CancelButton_79263OnPress() { // fn#79264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1271, owner: CancelButton_79263.onPress, offset: 0x01e4b428, size: 44 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('QuestOrbsRewardModal');
|
||||
}
|
||||
|
||||
function CancelButton_79263BackImage() { // fn#79265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1310, owner: CancelButton_79263.backImage, offset: 0x01e4b454, size: 78 bytes, params: 1, frame: 15
|
||||
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
|
||||
return <XSmallIcon size="lg" style={[styles.closeButtonIcon]} />;
|
||||
}
|
||||
|
||||
function _fun79267() { // fn#79267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1543, offset: 0x01e4b55a, size: 45 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value.preload(uri);
|
||||
}
|
||||
|
||||
function _fun79269() { // fn#79269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:1860, offset: 0x01e4b648, size: 40 bytes, params: 1, frame: 9
|
||||
const animateBinding = animate;
|
||||
const binding = env0_1;
|
||||
if (animateBinding) {
|
||||
binding.play();
|
||||
} else {
|
||||
binding.stop();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun79276() { // fn#79276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:3978, offset: 0x01e4bee2, size: 57 bytes, params: 1, frame: 12
|
||||
const deviceOrientationModule = require(7717) /* metro dependency 7717: DeviceOrientation */;
|
||||
const lockOrientation = deviceOrientationModule.lockOrientation;
|
||||
const PORTRAIT = Orientation.PORTRAIT;
|
||||
Reflect.apply(lockOrientation, deviceOrientationModule, [PORTRAIT]);
|
||||
return _fun79277;
|
||||
}
|
||||
|
||||
function _fun79279() { // fn#79279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4124, offset: 0x01e4bf40, size: 18 bytes, params: 1, frame: 11
|
||||
env0_2(true);
|
||||
}
|
||||
|
||||
function _fun79280() { // fn#79280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4158, offset: 0x01e4bf52, size: 139 bytes, params: 1, frame: 18
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('QuestOrbsRewardModal');
|
||||
const collectiblesActionCreatorsModule = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
|
||||
const openCollectiblesShopMobile = collectiblesActionCreatorsModule.openCollectiblesShopMobile;
|
||||
const object2 = {};
|
||||
let MOBILE_ORBS_REWARD_CLAIM_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).MOBILE_ORBS_REWARD_CLAIM_MODAL;
|
||||
object2.analyticsLocations = [MOBILE_ORBS_REWARD_CLAIM_MODAL];
|
||||
MOBILE_ORBS_REWARD_CLAIM_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).MOBILE_ORBS_REWARD_CLAIM_MODAL;
|
||||
object2.analyticsSource = MOBILE_ORBS_REWARD_CLAIM_MODAL;
|
||||
const ORBS = CollectiblesMobileShopScreen.ORBS;
|
||||
object2.screen = ORBS;
|
||||
Reflect.apply(openCollectiblesShopMobile, collectiblesActionCreatorsModule, [object2]);
|
||||
}
|
||||
|
||||
function _fun79282() { // fn#79282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4618, offset: 0x01e4c051, size: 418 bytes, params: 1, frame: 19
|
||||
var object3;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const variantBinding = variant;
|
||||
const MobileQuestOrbRewardModalCtaPriorityVariant = (require(9511) /* metro dependency 9511: experiments */).MobileQuestOrbRewardModalCtaPriorityVariant;
|
||||
const EARN_ORBS_PRIMARY = MobileQuestOrbRewardModalCtaPriorityVariant.EARN_ORBS_PRIMARY;
|
||||
if (EARN_ORBS_PRIMARY === variantBinding) {
|
||||
object3 = {};
|
||||
object3.primary = {text: t.uJAMFX, handler: env0_4};
|
||||
object3.secondary = {text: t.GPdvqY, handler: env0_3};
|
||||
} else {
|
||||
var EARN_ORBS_ONLY = MobileQuestOrbRewardModalCtaPriorityVariant.EARN_ORBS_ONLY;
|
||||
if (EARN_ORBS_ONLY === variantBinding) {
|
||||
return {primary: {text: t.uJAMFX, handler: env0_4}, secondary: null};
|
||||
}
|
||||
var binding = env0_6;
|
||||
object3 = {};
|
||||
var object4 = {};
|
||||
if (binding) {
|
||||
object4.text = t.GPdvqY;
|
||||
object4.handler = env0_3;
|
||||
object3.primary = object4;
|
||||
object3.secondary = {text: t.uJAMFX, handler: env0_4};
|
||||
} else {
|
||||
object4.text = t.uJAMFX;
|
||||
object4.handler = env0_4;
|
||||
object3.primary = object4;
|
||||
object3.secondary = {text: t.GPdvqY, handler: env0_3};
|
||||
}
|
||||
}
|
||||
return object3;
|
||||
}
|
||||
|
||||
function _default_79272BalanceHook() { // fn#79283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:6186, owner: _default_79272.balanceHook, offset: 0x01e4c1f3, size: 182 bytes, params: 1, frame: 22
|
||||
const value = environment.__proto__;
|
||||
const Fragment = env1_5.Fragment;
|
||||
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
return (
|
||||
<Fragment key="balance">
|
||||
<OrbsIcon
|
||||
size="xs"
|
||||
color={WHITE}
|
||||
style={env0_8}
|
||||
/>
|
||||
{env0_7 && <View style={{width: 2}} />}
|
||||
{balance}
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
function profileDecoHook() { // fn#79284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:6340, owner: _default_79272.profileDecoHook, offset: 0x01e4c2a9, size: 116 bytes, params: 1, frame: 19
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Text
|
||||
variant="text-md/semibold"
|
||||
color="white"
|
||||
key="profileDeco"
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pGDUH9)}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function* _fun79288() { // fn#79288, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:7144, offset: 0x01e4c378, size: 74 bytes, params: 1, frame: 14
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const binding = env2_0;
|
||||
const binding2 = env2_2;
|
||||
yield binding(binding2[13])(binding2[12], binding2.paths);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
return value.default;
|
||||
}
|
||||
|
||||
function _fun79277() { // fn#79277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10370:4020, offset: 0x01e4bf1b, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,265 @@
|
||||
/* Metro module 15387; source: modules/quests/native/QuestProgressBottomSheet.tsx; dependencies: [5, 31, 27, 7093, 6528, 8044, 33, 4501, 697, 566, 10183, 6531, 8341, 8639, 1244, 8750, 6777, 7116, 10718, 9483, 9950, 13593, 8087, 4080, 9480, 9212, 9505, 6275, 5475, 4589, 676, 9542, 9176, 13623, 4572, 4573, 4578, 2] */
|
||||
function _fun117646(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:6, offset: 0x024bc0c6, size: 344 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 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = value.StyleSheet;
|
||||
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
||||
const env0_8 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
|
||||
const env0_9 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun117654);
|
||||
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyleProperties(function() {
|
||||
var object = {};
|
||||
object.gradientEnd = importDefault(dependencyMap[8]).colors.MOBILE_ACTIONSHEET_GRADIENT_BACKGROUND_DEFAULT;
|
||||
return object;
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestProgressBottomSheet.tsx');
|
||||
exports.default = QuestProgressBottomSheetConnected;
|
||||
}
|
||||
|
||||
function contextMenuButton(a0) { // fn#117647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:1370, offset: 0x024bc21e, size: 164 bytes, params: 2, frame: 18
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
const iconButtonProps = {...a0};
|
||||
iconButtonProps['icon'] = importDefault(8639) /* metro dependency 8639 */;
|
||||
iconButtonProps['variant'] = 'secondary-overlay';
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
iconButtonProps['accessibilityLabel'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UKOtz+']);
|
||||
iconButtonProps['size'] = 'sm';
|
||||
return <IconButton {...iconButtonProps} />;
|
||||
}
|
||||
|
||||
function QuestProgressBottomSheet({quest}) { // fn#117648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:1551, offset: 0x024bc2c2, size: 1900 bytes, params: 2, frame: 44
|
||||
var object2;
|
||||
const value3 = (require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).useIsScreenLandscape();
|
||||
const styles = useStyles(value3);
|
||||
const gradientEnd = env0_13().gradientEnd;
|
||||
const useGetOrFetchApplicationsModule = require(6777) /* metro dependency 6777: useGetOrFetchApplications */;
|
||||
const useGetOrFetchApplication = useGetOrFetchApplicationsModule.useGetOrFetchApplication;
|
||||
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
||||
const getActivityApplicationId = questTaskUtilsModule.getActivityApplicationId;
|
||||
const url = (importDefault(10718) /* metro dependency 10718: useEmbeddedActivityBackground */)({applicationId: Reflect.apply(useGetOrFetchApplication,
|
||||
useGetOrFetchApplicationsModule, [Reflect.apply(getActivityApplicationId, questTaskUtilsModule, [quest])])?.id,
|
||||
size: 600, names: ['embedded_cover']}).url;
|
||||
const value5 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const EAYZAr = t.EAYZAr;
|
||||
const value6 = Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: quest.config.messages.questName}]);
|
||||
const questCopyHooksModule = require(9950) /* metro dependency 9950: QuestCopyHooks */;
|
||||
const useQuestsInstructionsToWinReward = questCopyHooksModule.useQuestsInstructionsToWinReward;
|
||||
object2 = {quest: quest, taskDetails: value5};
|
||||
let QUEST_ACTIVITY_BOTTOM_SHEET = QuestsExperimentLocations.QUEST_ACTIVITY_BOTTOM_SHEET;
|
||||
object2.location = QUEST_ACTIVITY_BOTTOM_SHEET;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
|
||||
object2.sourceQuestContent = RUNNING_ACTIVITY;
|
||||
const value7 = Reflect.apply(useQuestsInstructionsToWinReward, questCopyHooksModule, [object2]);
|
||||
const userStatus = quest.userStatus;
|
||||
const r24 = userStatus?.completedAt != null && quest.userStatus?.claimedAt == null;
|
||||
const questBottomSheetFooterModule = require(13593) /* metro dependency 13593: QuestBottomSheetFooter */;
|
||||
const useQuestRewardClaimHandler = questBottomSheetFooterModule.useQuestRewardClaimHandler;
|
||||
object2 = {quest: quest};
|
||||
RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
|
||||
object2.questContent = RUNNING_ACTIVITY;
|
||||
RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
|
||||
object2.sourceQuestContent = RUNNING_ACTIVITY;
|
||||
const {isClaiming, claim, isLoading} = Reflect.apply(useQuestRewardClaimHandler, questBottomSheetFooterModule,
|
||||
[object2]);
|
||||
const value12 = env0_4.useCallback(env0_3(_fun117650), [claim]);
|
||||
const value13 = env0_4.useCallback(_fun117651, [quest.id]);
|
||||
const value14 = env0_4.useCallback(_fun117652, [quest.id]);
|
||||
const value15 = env0_4.useCallback(_fun117653, []);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const items2 = [url != null && ((Component) => <Component source={{uri: url}} style={styles.heroImg} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
|
||||
const defaultImport3 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
|
||||
items2[1] = ((Component) => <Component style={styles.heroGradient} start={START} end={END} colors={['rgba(0, 0, 0, 0)',
|
||||
gradientEnd]} />)(defaultImport3);
|
||||
items2[2] = <View style={styles.gameTileContainer}>{((Component) => <Component quest={quest} height={value3 ? 56 : 80} width={value3 ? 56 : 80} />)(importDefault(9542) /* metro dependency 9542: QuestRewardTile */)}</View>;
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
const iconButtonProps = {icon: importDefault(9176) /* metro dependency 9176 */, onPress: value14,
|
||||
variant: 'secondary-overlay', size: 'sm'};
|
||||
const string = intl.string;
|
||||
const RDE0Sc = (require(1244) /* metro dependency 1244: indexNative */).t.RDE0Sc;
|
||||
iconButtonProps.accessibilityLabel = Reflect.apply(string, intl, [RDE0Sc]);
|
||||
const iconButton = <IconButton {...iconButtonProps} />;
|
||||
const QuestContextMenu = importDefault(13623) /* metro dependency 13623: QuestContextMenu */;
|
||||
QUEST_ACTIVITY_BOTTOM_SHEET = QuestsExperimentLocations.QUEST_ACTIVITY_BOTTOM_SHEET;
|
||||
RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
|
||||
items2[3] = <View style={styles.contextMenuContainer}>{iconButton}<QuestContextMenu quest={quest} showShareLink location={QUEST_ACTIVITY_BOTTOM_SHEET} sourceQuestContent={RUNNING_ACTIVITY}>{contextMenuButton}</QuestContextMenu></View>;
|
||||
const view = <View style={styles.heroContainer}>{items2}</View>;
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const stack = <Stack direction="vertical" spacing={PX_8} style={styles.textContainer}><Text variant={value3 ? 'heading-md/bold' : 'heading-lg/bold'} color="mobile-text-heading-primary">{value6}</Text><Text style={styles.questDescription} variant={value3 ? 'text-sm/normal' : 'text-md/normal'} color="text-muted">{value7}</Text></Stack>;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<BottomSheet handleDisabled startExpanded>
|
||||
{view}
|
||||
<View style={styles.contentContainer}>
|
||||
{stack}
|
||||
<Stack
|
||||
direction="vertical"
|
||||
spacing={PX_12}
|
||||
style={styles.buttonsContainer}
|
||||
>
|
||||
<Button
|
||||
size="lg"
|
||||
text={intl.string(r24 ? t.cfY4PE : t.LLLLPD)}
|
||||
onPress={r24 ? value12 : value13}
|
||||
loading={isClaiming || isLoading}
|
||||
grow
|
||||
/>
|
||||
<Button
|
||||
size="lg"
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
|
||||
onPress={value15}
|
||||
variant="secondary"
|
||||
grow
|
||||
/>
|
||||
</Stack>
|
||||
</View>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun117654(a0) { // fn#117654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:276, offset: 0x024bcbae, size: 654 bytes, params: 2, frame: 21
|
||||
const object6 = {};
|
||||
const object9 = {display: 'flex'};
|
||||
const value2 = undefined;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object9.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object9.paddingBottom = PX_16;
|
||||
object6.contentContainer = object9;
|
||||
const object10 = {};
|
||||
object10.height = a0 ? 125 : 140;
|
||||
object10.position = 'relative';
|
||||
object10.marginBottom = a0 ? 0 : 52 + (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.heroContainer = object10;
|
||||
const object11 = {resizeMode: 'cover'};
|
||||
copyDataProperties(object11, StyleSheet.absoluteFillObject, undefined);
|
||||
let lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object11['borderTopLeftRadius'] = lg;
|
||||
lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object11['borderTopRightRadius'] = lg;
|
||||
object6.heroImg = object11;
|
||||
const object12 = {};
|
||||
copyDataProperties(object12, StyleSheet.absoluteFillObject, lg);
|
||||
object12['borderTopLeftRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object12['borderTopRightRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object6.heroGradient = object12;
|
||||
const PX_12 = a0 ? (importDefault(697) /* metro dependency 697: native */).space.PX_12 : -52;
|
||||
object6.gameTileContainer = {'position': 'absolute', 'bottom': null, 'left': 0, 'right': 0, 'alignItems': 'center',
|
||||
bottom: PX_12};
|
||||
const object13 = {'position': 'absolute', 'top': null, 'right': null, 'display': 'flex', 'flexDirection': 'row',
|
||||
'gap': null, 'alignItems': 'center'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object13.top = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object13.right = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object13.gap = PX_16;
|
||||
object6.contextMenuContainer = object13;
|
||||
const object14 = {alignItems: 'center'};
|
||||
PX_16 = a0 ? value2 : (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object14.paddingTop = PX_16;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object14.gap = PX_8;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object14.marginBottom = PX_16;
|
||||
object14.textAlign = 'center';
|
||||
object6.textContainer = object14;
|
||||
object6.questDescription = {textAlign: 'center'};
|
||||
PX_16 = a0 ? value2 : (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.buttonsContainer = {paddingTop: PX_16};
|
||||
return object6;
|
||||
}
|
||||
|
||||
function QuestProgressBottomSheetConnected({questId}) { // fn#117656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:4466, offset: 0x024bce69, size: 201 bytes, params: 2, frame: 19
|
||||
var r0;
|
||||
var QuestContentImpressionTrackerNative;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
var RUNNING_ACTIVITY;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [QuestStore];
|
||||
const quest = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return QuestStore.getQuest(questId);
|
||||
}]);
|
||||
if (quest == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
||||
object = {overrideVisibility: true, questOrQuests: quest};
|
||||
RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
|
||||
object.questContent = RUNNING_ACTIVITY;
|
||||
RUNNING_ACTIVITY = QuestContent.RUNNING_ACTIVITY;
|
||||
object.sourceQuestContent = RUNNING_ACTIVITY;
|
||||
r0 = <QuestContentImpressionTrackerNative {...object}>{children_117658}</QuestContentImpressionTrackerNative>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function* _fun117650() { // fn#117650, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:2440, offset: 0x024bca39, size: 86 bytes, params: 1, frame: 15
|
||||
var value4;
|
||||
if (true) {
|
||||
__proto__ = environment.__proto__;
|
||||
yield importDefault();
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
if (__proto__) {
|
||||
__proto__ = environment.__proto__.__proto__;
|
||||
value4 = env2_1(env2_2[22]);
|
||||
value4.updateFramePanelMode(env2_9.PIP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun117651() { // fn#117651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:2527, offset: 0x024bca8f, size: 145 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
const defaultImport2 = importDefault(8087) /* metro dependency 8087: FramesActionCreatorsNative */;
|
||||
const updateFramePanelMode = defaultImport2.updateFramePanelMode;
|
||||
const PIP = ActivityPanelModes.PIP;
|
||||
Reflect.apply(updateFramePanelMode, defaultImport2, [PIP]);
|
||||
value = require(9480) /* metro dependency 9480: QuestUtilsNative */;
|
||||
const openQuestHome = value.openQuestHome;
|
||||
const object2 = {};
|
||||
object2.scrollToQuestId = quest.id;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QUEST_BOTTOM_SHEET = QuestContent.QUEST_BOTTOM_SHEET;
|
||||
object2.fromContent = QUEST_BOTTOM_SHEET;
|
||||
Reflect.apply(openQuestHome, value, [object2]);
|
||||
}
|
||||
|
||||
function _fun117652() { // fn#117652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:2723, offset: 0x024bcb20, size: 105 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
value = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
|
||||
const showShareActionSheet = value.showShareActionSheet;
|
||||
const questCopyUtilsModule = require(9505) /* metro dependency 9505: QuestCopyUtils */;
|
||||
const getQuestUrl = questCopyUtilsModule.getQuestUrl;
|
||||
Reflect.apply(showShareActionSheet, value, [{message: Reflect.apply(getQuestUrl, questCopyUtilsModule,
|
||||
[quest.id])}]);
|
||||
}
|
||||
|
||||
function _fun117653() { // fn#117653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:2850, offset: 0x024bcb89, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestProgressBottomSheetConnectedChildren() { // fn#117658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15584:4805, owner: QuestProgressBottomSheetConnected.children, offset: 0x024bcf32, size: 35 bytes, params: 1, frame: 13
|
||||
return <QuestProgressBottomSheet quest={quest} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,243 @@
|
||||
/* Metro module 13620; source: modules/quests/native/QuestProgressIndicator.tsx; dependencies: [31, 27, 4502, 33, 4017, 7744, 4501, 697, 566, 4504, 5278, 1244, 6760, 13621, 9542, 2] */
|
||||
function _fun104023(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:6, offset: 0x0227bf12, size: 371 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(31) /* metro dependency 31 */;
|
||||
const env0_3 = value.useMemo;
|
||||
const env0_4 = value.useEffect;
|
||||
const env0_5 = value.useRef;
|
||||
value = importDefault(31) /* metro dependency 31 */;
|
||||
const env0_7 = (require(27) /* metro dependency 27 */).View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value2.jsx;
|
||||
const env0_10 = value2.jsxs;
|
||||
const env0_11 = ['#666777', '#535564'];
|
||||
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 env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun104024);
|
||||
object = {code: 'function QuestProgressIndicatorTsx1(){const{glowOpacity}=this.__closure;return{shadowOpacity:glowOpacity.get()};}'};
|
||||
object = {code: 'function QuestProgressIndicatorTsx2(){const{circumference,animatedProgress}=this.__closure;return{strokeDashoffset:circumference-circumference*animatedProgress.get()};}'};
|
||||
object = {code: 'function QuestProgressIndicatorTsx3(){const{underlayOpacity,styles}=this.__closure;return{opacity:underlayOpacity.get(),...styles.opacityMask};}'};
|
||||
value = value.memo(QuestProgressIndicator);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestProgressIndicator.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun104024(a0) { // fn#104024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:303, offset: 0x0227c085, size: 291 bytes, params: 2, frame: 15
|
||||
const object2 = {};
|
||||
object2.wrapper = {position: 'relative'};
|
||||
object2.container = {'position': 'relative', 'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center',
|
||||
'zIndex': 1};
|
||||
object2.completionGlow = {'shadowOffset': null, 'shadowRadius': 20, 'shadowOpacity': 0, 'elevation': 4,
|
||||
'shadowColor': '#30C77399', shadowOffset: {'width': 0, 'height': 0}};
|
||||
object2.canvas = {transform: [{rotate: '-90deg'}]};
|
||||
const object3 = {position: 'absolute', height: 0.78 * a0, width: 0.78 * a0};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object3.overflow = 'hidden';
|
||||
object2.imageContainer = object3;
|
||||
const GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300;
|
||||
object2.progressPath = {color: GREEN_300};
|
||||
object2.confetti = {'position': 'absolute', 'pointerEvents': 'none'};
|
||||
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
|
||||
object2.opacityMask = {'backgroundColor': null, 'position': 'absolute', 'top': 0, 'left': 0, 'right': 0,
|
||||
'bottom': 0, 'zIndex': 2, backgroundColor: CARD_BACKGROUND_DEFAULT};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function QuestProgressIndicator({quest, size, progress, loading, hasConfetti, withAnimation, onPress, accessibilityLabel}) { // fn#104025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:1422, offset: 0x0227c1a8, size: 1735 bytes, params: 2, frame: 51
|
||||
var r8;
|
||||
var intl;
|
||||
loading = !(loading === undefined) && loading;
|
||||
hasConfetti = !(hasConfetti === undefined) && hasConfetti;
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const property = ({'x-sm': 3, 'sm': 3, 'md': 3, 'md-lg': 4, 'lg': 6})[size];
|
||||
const property2 = ({'x-sm': 40, 'sm': 64, 'md': 70, 'md-lg': 100, 'lg': 128})[size];
|
||||
const property3 = ({'x-sm': 1.6, 'sm': 1, 'md': 1.4, 'md-lg': 1.5, 'lg': 1.6})[size];
|
||||
const value7 = property2 / 2 - property / 2;
|
||||
let Math = global.Math;
|
||||
const PI = Math.PI;
|
||||
const value8 = 2 * PI * value7;
|
||||
const styles = useStyles(property2);
|
||||
const env0_6 = styles;
|
||||
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(progress);
|
||||
const value12 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(loading ? 0.7 : 0);
|
||||
const userStatus = quest.userStatus;
|
||||
const value14 = userStatus?.completedAt != null;
|
||||
const value15 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(value14 ? 1 : 0);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = QuestProgressIndicatorI;
|
||||
closure.__closure = {glowOpacity: value15};
|
||||
closure.__workletHash = 17183837725505;
|
||||
closure.__initData = env0_14;
|
||||
const value16 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
const useAnimatedProps = moduleValue6.useAnimatedProps;
|
||||
closure = QuestProgressIndicatorG;
|
||||
closure.__closure = {circumference: value8, animatedProgress: value9};
|
||||
closure.__workletHash = 17281152506254;
|
||||
closure.__initData = env0_15;
|
||||
const value17 = Reflect.apply(useAnimatedProps, moduleValue6, [closure]);
|
||||
const moduleValue7 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue7.useAnimatedStyle;
|
||||
closure = QuestProgressIndicatorM;
|
||||
closure.__closure = {underlayOpacity: value12, styles: styles};
|
||||
closure.__workletHash = 4427598698568;
|
||||
closure.__initData = env0_16;
|
||||
const value18 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
|
||||
useEffect(_fun104030, [value9, progress, useReducedMotion]);
|
||||
useEffect(_fun104032, [value12, loading]);
|
||||
const value19 = useRef(null);
|
||||
const env0_11 = value19;
|
||||
const value20 = useMemo(_fun104034, [styles.confetti, property3, property2]);
|
||||
useEffect(_fun104035, [value14, value15, useReducedMotion]);
|
||||
const PressableComponent = onPress == null ? env0_6.Fragment : (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
Math = global.Math;
|
||||
const value21 = Math.round(100 * progress);
|
||||
const r2Props = {...(onPress == null ? {} : {onPress: onPress})};
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.wrapper];
|
||||
items2[1] = styles.completionGlow;
|
||||
items2[2] = value16;
|
||||
if (accessibilityLabel != null) {
|
||||
r8 = accessibilityLabel;
|
||||
} else {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r8 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Gj8Jqn,
|
||||
{percent: value21});
|
||||
}
|
||||
const object = {'min': 0, 'max': 100};
|
||||
object.now = value21;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const view = <View3 style={value18} />;
|
||||
const Svg = (require(7744) /* metro dependency 7744 */).Svg;
|
||||
const Defs = (require(7744) /* metro dependency 7744 */).Defs;
|
||||
const LinearGradient = (require(7744) /* metro dependency 7744 */).LinearGradient;
|
||||
const Stop = (require(7744) /* metro dependency 7744 */).Stop;
|
||||
const binding = env0_11;
|
||||
const items4 = [<Defs><LinearGradient id="underlayGradient" x1="0" y1="0.5" x2="1" y2="0.5"><Stop offset="0" stopColor={binding[0]} /><Stop offset="1" stopColor={binding[1]} /></LinearGradient></Defs>];
|
||||
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
|
||||
items4[1] = <Circle cx={property2 / 2} cy={property2 / 2} r={value7} fill="none" stroke="url(#underlayGradient)" strokeWidth={property} />;
|
||||
items4[2] = ((Component) => <Component cx={property2 / 2} cy={property2 / 2} r={value7} fill="none" stroke={styles.progressPath.color} strokeWidth={property} strokeDasharray={value8} strokeLinecap="round" animatedProps={value17} />)(env0_12);
|
||||
return (
|
||||
<PressableComponent {...r2Props}>
|
||||
<View2
|
||||
style={items2}
|
||||
accessible
|
||||
accessibilityRole="progressbar"
|
||||
accessibilityLabel={r8}
|
||||
accessibilityValue={object}
|
||||
>
|
||||
{view}
|
||||
<View style={styles.container}>
|
||||
<Svg
|
||||
height={property2}
|
||||
width={property2}
|
||||
style={styles.canvas}
|
||||
>
|
||||
{items4}
|
||||
</Svg>
|
||||
{hasConfetti ? ((Component) => <Component ref={value19} style={value20} source={require(13621) /* metro dependency 13621 */} autoPlay={false} loop={false} />)(importDefault(6760) /* metro dependency 6760: LottieAnimationView */) : null}
|
||||
<View style={styles.imageContainer}>
|
||||
{((Component) => <Component quest={quest} height={0.78 * property2} width={0.78 * property2} withAnimation={withAnimation} accessibilityLabelPrefix={accessibilityLabel} />)(importDefault(9542) /* metro dependency 9542: QuestRewardTile */)}
|
||||
</View>
|
||||
</View>
|
||||
</View2>
|
||||
</PressableComponent>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestProgressIndicatorI() { // fn#104027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:1978, owner: QuestProgressIndicator.I, offset: 0x0227c86f, size: 25 bytes, params: 1, frame: 10
|
||||
const object2 = {};
|
||||
object2.shadowOpacity = env0_10.get();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function QuestProgressIndicatorG() { // fn#104028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2115, owner: QuestProgressIndicator.G, offset: 0x0227c888, size: 37 bytes, params: 1, frame: 11
|
||||
const binding = env0_5;
|
||||
const binding2 = env0_7;
|
||||
const get = binding2.get;
|
||||
return {strokeDashoffset: binding - binding * Reflect.apply(get, binding2, [])};
|
||||
}
|
||||
|
||||
function QuestProgressIndicatorM() { // fn#104029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2280, owner: QuestProgressIndicator.M, offset: 0x0227c8ad, size: 41 bytes, params: 1, frame: 13
|
||||
const object2 = {};
|
||||
const binding = env0_8;
|
||||
object2.opacity = binding.get();
|
||||
copyDataProperties(object2, styles.opacityMask, binding);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun104030() { // fn#104030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2413, offset: 0x0227c8d6, size: 89 bytes, params: 1, frame: 17
|
||||
const binding = env0_7;
|
||||
const set = binding.set;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
Reflect.apply(set, binding, [timingModule.withTiming(progress, {duration: useReducedMotion ? 0 : 500})]);
|
||||
return _fun104031;
|
||||
}
|
||||
|
||||
function _fun104032() { // fn#104032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2513, offset: 0x0227c95c, size: 95 bytes, params: 1, frame: 16
|
||||
const binding = env0_8;
|
||||
const set = binding.set;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
Reflect.apply(set, binding, [timingModule.withTiming(loading ? 0.7 : 0, {duration: 500})]);
|
||||
return _fun104033;
|
||||
}
|
||||
|
||||
function _fun104034() { // fn#104034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2628, offset: 0x0227c9e8, size: 78 bytes, params: 1, frame: 13
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, styles.confetti, undefined);
|
||||
object2['width'] = env0_3;
|
||||
object2['height'] = env0_3;
|
||||
object2['transform'] = [{scale: env0_4}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun104035() { // fn#104035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2711, offset: 0x0227ca36, size: 154 bytes, params: 1, frame: 16
|
||||
var binding;
|
||||
var set;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var current;
|
||||
if (useReducedMotion) {
|
||||
env0_10.set(0);
|
||||
current = env0_11.current;
|
||||
if (current != null) {
|
||||
current.reset();
|
||||
}
|
||||
} else if (env0_9) {
|
||||
binding = env0_10;
|
||||
set = binding.set;
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(4504) /* metro dependency 4504: timing */;
|
||||
Reflect.apply(set, binding, [moduleValue.withTiming(1, {duration: 500})]);
|
||||
current = env0_11.current;
|
||||
if (current != null) {
|
||||
current.play();
|
||||
}
|
||||
} else {
|
||||
env0_10.set(0);
|
||||
current = env0_11.current;
|
||||
if (current != null) {
|
||||
current.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun104031() { // fn#104031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2466, offset: 0x0227c92f, size: 45 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(4017) /* metro dependency 4017: ReanimatedRexport */).cancelAnimation(env1_7);
|
||||
}
|
||||
|
||||
function _fun104033() { // fn#104033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2567, offset: 0x0227c9bb, size: 45 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(4017) /* metro dependency 4017: ReanimatedRexport */).cancelAnimation(env1_8);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
/* Metro module 9947; source: modules/quests/native/QuestRewardCodeClaimBottomSheet.native.tsx; dependencies: [31, 27, 7093, 6528, 33, 4501, 697, 1585, 566, 9948, 3857, 1244, 8947, 4080, 9500, 6797, 4060, 9950, 6275, 6758, 4573, 6622, 6231, 6238, 4578, 10183, 2] */
|
||||
function _fun77854(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:6, offset: 0x01e0e463, size: 264 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 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.ActivityIndicator;
|
||||
const env0_5 = value.View;
|
||||
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
||||
const env0_7 = (require(6528) /* metro dependency 6528: QuestConstants */).REWARD_CODE_PLACEHOLDER;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun77863);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestRewardCodeClaimBottomSheet.native.tsx');
|
||||
exports.default = QuestRewardCodeClaimBottomSheetConnected;
|
||||
}
|
||||
|
||||
function QuestRewardCodeClaimBottomSheet({quest, questContent, questContentPosition, sourceQuestContent}) { // fn#77855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:530, offset: 0x01e0e56b, size: 1446 bytes, params: 2, frame: 49
|
||||
var object2;
|
||||
const styles = useStyles((importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom);
|
||||
const {rewardCode, isFetchingRewardCode,
|
||||
isClaimingReward} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([QuestStore],
|
||||
function() {
|
||||
var object = {};
|
||||
var questBinding = quest;
|
||||
object.rewardCode = QuestStore.getRewardCode(questBinding.id);
|
||||
object.isFetchingRewardCode = QuestStore.isFetchingRewardCode(questBinding.id);
|
||||
object.isClaimingReward = QuestStore.isClaimingReward(questBinding.id);
|
||||
return object;
|
||||
});
|
||||
const {claimCode, fetchCode,
|
||||
hasError} = (require(9948) /* metro dependency 9948: RewardCodeClaimHooks */).useClaimOrFetchRewardCode({isClaimingReward: isClaimingReward,
|
||||
isFetchingRewardCode: isFetchingRewardCode, quest: quest, questContent: questContent, rewardCode: rewardCode});
|
||||
let binding = env0_3;
|
||||
binding.useEffect(_fun77857, [hasError]);
|
||||
const questRewardUtilsModule = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
||||
const isTieredRewardCodeQuest2 = questRewardUtilsModule.isTieredRewardCodeQuest({quest: quest});
|
||||
var env0_3 = isTieredRewardCodeQuest2;
|
||||
binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
const value6 = env0_3.useMemo(_fun77859, [Reflect.apply(useMemo, binding, [_fun77858, [isTieredRewardCodeQuest2,
|
||||
quest, rewardCode?.tier]]), rewardCode]);
|
||||
const rewardCodeClaimHooksModule = require(9948) /* metro dependency 9948: RewardCodeClaimHooks */;
|
||||
const useClaimRewardCodePrimaryCtaClickHandler = rewardCodeClaimHooksModule.useClaimRewardCodePrimaryCtaClickHandler;
|
||||
object2 = {claimCode: claimCode, fetchCode: fetchCode, hasError: hasError};
|
||||
object2.onDismiss = (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet;
|
||||
object2.quest = quest;
|
||||
object2.questContent = questContent;
|
||||
object2.questContentPosition = questContentPosition;
|
||||
object2.redemptionLink = value6;
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
const value7 = Reflect.apply(useClaimRewardCodePrimaryCtaClickHandler, rewardCodeClaimHooksModule, [object2]);
|
||||
const value8 = env0_3.useCallback(_fun77860, [rewardCode]);
|
||||
const rewardCodeRedemptionInstructions = (require(9950) /* metro dependency 9950: QuestCopyHooks */).getRewardCodeRedemptionInstructions({quest: quest,
|
||||
rewardCode: rewardCode});
|
||||
let r20 = isFetchingRewardCode || isClaimingReward;
|
||||
r20 = !r20 ? rewardCode?.code == null : r20;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
object2 = {};
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.header = <BottomSheetTitleHeader title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.srzsU2)} />;
|
||||
object2.startExpanded = true;
|
||||
const r12 = rewardCode != null && rewardCodeRedemptionInstructions != null && ((Text) => <Text style={styles.redemptionInstructions} variant="text-md/normal" color="text-default">{(importDefault(6622) /* metro dependency 6622: MarkupUtils */).parse(rewardCodeRedemptionInstructions,
|
||||
true, {allowLinks: true})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
const r25 = rewardCode?.code == null && styles.codeCopyWrapperLoading;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const view = <View>{r12}<View><View style={r25}><TableRowGroup hasIcons={false}><TableRow label={rewardCode?.code} trailing={rewardCode?.code != null && ((Icon) => <Icon IconComponent={(require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} onPress={rewardCode?.code != null ? value8 : undefined} /></TableRowGroup></View>{rewardCode?.code == null && <ActivityIndicator style={styles.claimingIndicator} size={24} />}</View></View>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<BottomSheet {...object2}>
|
||||
<View style={styles.wrapper}>
|
||||
{view}
|
||||
<View style={styles.footer}>
|
||||
<Button
|
||||
disabled={r20}
|
||||
onPress={value7}
|
||||
grow
|
||||
text={value6 == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['23SS+z']) : value6 !== '' ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+zx47d']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['23SS+z'])}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun77863(a0) { // fn#77863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:242, offset: 0x01e0edfb, size: 152 bytes, params: 2, frame: 15
|
||||
const object = {display: 'flex'};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingHorizontal = PX_16;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object.gap = PX_24;
|
||||
return {wrapper: object, footer: {paddingBottom: a0}, claimingIndicator: {'position': 'absolute', 'left': '50%',
|
||||
'top': '50%', 'marginLeft': -12, 'marginTop': -12}, codeCopyWrapperLoading: {opacity: 0.5},
|
||||
redemptionInstructions: {marginBottom: 24}};
|
||||
}
|
||||
|
||||
function QuestRewardCodeClaimBottomSheetConnected({questId, questContent, questContentPosition, sourceQuestContent}) { // fn#77864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:3259, offset: 0x01e0ee93, size: 222 bytes, params: 2, frame: 21
|
||||
var r0;
|
||||
const quest = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestStore], function() {
|
||||
return QuestStore.getQuest(questId);
|
||||
});
|
||||
if (quest == null) {
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
r0 = null;
|
||||
} else {
|
||||
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
||||
r0 = <QuestContentImpressionTrackerNative overrideVisibility questOrQuests={quest} questContent={questContent} questContentPosition={questContentPosition} sourceQuestContent={sourceQuestContent}>{children_77866}</QuestContentImpressionTrackerNative>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun77857() { // fn#77857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1078, offset: 0x01e0eb6c, size: 158 bytes, params: 1, frame: 18
|
||||
var defaultImport;
|
||||
var open;
|
||||
var object2;
|
||||
var intl;
|
||||
var value;
|
||||
if (hasError) {
|
||||
value = environment.__proto__;
|
||||
defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
open = defaultImport.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.CKsXk3);
|
||||
object2.icon = importDefault(8947) /* metro dependency 8947 */;
|
||||
Reflect.apply(open, defaultImport, [object2]);
|
||||
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
value.hideActionSheet();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun77858() { // fn#77858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1295, offset: 0x01e0ec0a, size: 103 bytes, params: 1, frame: 16
|
||||
var r0;
|
||||
const binding = env0_3;
|
||||
const value3 = undefined;
|
||||
const questRewardUtilsModule = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
||||
const getRewardCodeQuestReward = questRewardUtilsModule.getRewardCodeQuestReward;
|
||||
const object2 = {};
|
||||
object2.quest = quest;
|
||||
if (binding) {
|
||||
object2.idx = rewardCode == null ? value3 : rewardCode.tier;
|
||||
r0 = Reflect.apply(getRewardCodeQuestReward, questRewardUtilsModule, [object2]);
|
||||
} else {
|
||||
object2.idx = 0;
|
||||
r0 = Reflect.apply(getRewardCodeQuestReward, questRewardUtilsModule, [object2]);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun77859() { // fn#77859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1466, offset: 0x01e0ec71, size: 157 bytes, params: 1, frame: 16
|
||||
const value2 = undefined;
|
||||
if ((env0_4 == null ? value2 : env0_4.redemptionLink) != null) {
|
||||
if (env0_4.redemptionLink !== '') {
|
||||
return (rewardCode == null ? value2 : rewardCode.code) == null || rewardCode.code === '' ? env0_4.redemptionLink : env0_4.redemptionLink.replace(REWARD_CODE_PLACEHOLDER,
|
||||
|
||||
|
||||
global.encodeURIComponent(rewardCode.code));
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun77860() { // fn#77860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1893, offset: 0x01e0ed0e, size: 72 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (rewardCode != null) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
moduleValue.copy(rewardCode.code, function() {
|
||||
var defaultImport = importDefault(dependencyMap[10]);
|
||||
var object = {key: 'TOAST_QUEST_REWARD_CODE_COPIED'};
|
||||
object.content = require(dependencyMap[11]).intl.string(require(dependencyMap[11]).t.MSaeTe);
|
||||
object.icon = _fun77862;
|
||||
return defaultImport.open(object);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function QuestRewardCodeClaimBottomSheetConnectedChildren() { // fn#77866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:3642, owner: QuestRewardCodeClaimBottomSheetConnected.children, offset: 0x01e0ef8c, size: 62 bytes, params: 1, frame: 14
|
||||
return (
|
||||
<QuestRewardCodeClaimBottomSheet
|
||||
quest={quest}
|
||||
questContent={questContent}
|
||||
questContentPosition={questContentPosition}
|
||||
sourceQuestContent={sourceQuestContent}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun77861() { // fn#77861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:1929, offset: 0x01e0ed56, size: 120 bytes, params: 1, frame: 17
|
||||
const defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
const open = defaultImport.open;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const MSaeTe = (require(1244) /* metro dependency 1244: indexNative */).t.MSaeTe;
|
||||
return Reflect.apply(open, defaultImport, [{key: 'TOAST_QUEST_REWARD_CODE_COPIED', content: Reflect.apply(string,
|
||||
intl, [MSaeTe]), icon: icon_77862}]);
|
||||
}
|
||||
|
||||
function icon_77862() { // fn#77862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10133:2038, offset: 0x01e0edce, size: 45 bytes, params: 1, frame: 13
|
||||
const CopyIcon = (require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon;
|
||||
return <CopyIcon />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
/* Metro module 9482; source: modules/quests/native/QuestRewardDetailsBottomSheet.native.tsx; dependencies: [31, 27, 1878, 33, 4501, 697, 9480, 4080, 9483, 9500, 7098, 1244, 566, 6275, 4572, 9542, 4573, 2] */
|
||||
function _fun73739(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:6, offset: 0x01d7654a, size: 341 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingHorizontal = PX_16;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.paddingBottom = PX_8;
|
||||
object3.wrapper = object4;
|
||||
object3.rewardDetailsCopy = {flexShrink: 1};
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object3.separator = {height: 1, backgroundColor: BORDER_STRONG};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestRewardDetailsBottomSheet.native.tsx');
|
||||
exports.default = QuestRewardDetailsBottomSheetConnected;
|
||||
}
|
||||
|
||||
function QuestRewardDetailsBottomSheet({quest}) { // fn#73740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:377, offset: 0x01d7669f, size: 776 bytes, params: 2, frame: 36
|
||||
const styles = useStyles();
|
||||
const value3 = env0_3.useMemo(_fun73742, [quest, env0_3.useMemo(_fun73741, [quest.config])]);
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const defaultRewardName = (require(9500) /* metro dependency 9500: QuestRewardUtils */).getDefaultRewardName(quest.config,
|
||||
currentUser);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const object = {direction: 'vertical'};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.spacing = PX_16;
|
||||
object.style = styles.wrapper;
|
||||
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const value5 = ((Component) => <Component quest={quest} height={56} width={56} withAnimation />)(importDefault(9542) /* metro dependency 9542: QuestRewardTile */);
|
||||
const Stack3 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<BottomSheet startExpanded>
|
||||
<Stack {...object}>
|
||||
<Stack2
|
||||
align="center"
|
||||
direction="horizontal"
|
||||
spacing={PX_16}
|
||||
>
|
||||
{value5}
|
||||
<Stack3
|
||||
direction="vertical"
|
||||
spacing={PX_4}
|
||||
style={styles.rewardDetailsCopy}
|
||||
>
|
||||
<Text variant="eyebrow" color="text-subtle">
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['jyYgZ+'])}
|
||||
</Text>
|
||||
<Text variant="heading-lg/semibold" color="text-strong">
|
||||
{defaultRewardName}
|
||||
</Text>
|
||||
</Stack3>
|
||||
</Stack2>
|
||||
{value3 != null && <><View style={styles.separator} /><Text variant="text-md/normal" color="text-subtle">{value3}</Text></>}
|
||||
</Stack>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestRewardDetailsBottomSheetConnected({questId}) { // fn#73744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:1772, offset: 0x01d76ada, size: 106 bytes, params: 2, frame: 15
|
||||
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useNonNullableQuest(questId,
|
||||
env0_3.useCallback(_fun73745, []));
|
||||
return value3 == null ? null : <QuestRewardDetailsBottomSheet quest={value3} />;
|
||||
}
|
||||
|
||||
function _fun73741() { // fn#73741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:450, offset: 0x01d769a7, size: 51 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
||||
return value.isCollectibleQuestRewardPremiumExtendable(quest.config);
|
||||
}
|
||||
|
||||
function _fun73742() { // fn#73742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:540, offset: 0x01d769da, size: 256 bytes, params: 1, frame: 16
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const questRewardUtilsModule = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
||||
const getQuestPrimaryReward = questRewardUtilsModule.getQuestPrimaryReward;
|
||||
const type = Reflect.apply(getQuestPrimaryReward, questRewardUtilsModule, [quest]).type;
|
||||
const QuestRewardTypes = (require(7098) /* metro dependency 7098: QuestRewardTypes */).QuestRewardTypes;
|
||||
const COLLECTIBLE = QuestRewardTypes.COLLECTIBLE;
|
||||
if (COLLECTIBLE === type) {
|
||||
return intl.string(env0_1 ? t['66YyBJ'] : t.ABD2CN);
|
||||
}
|
||||
const FRACTIONAL_PREMIUM = QuestRewardTypes.FRACTIONAL_PREMIUM;
|
||||
if (FRACTIONAL_PREMIUM === type) {
|
||||
return intl.string(t.maMtqM);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun73745() { // fn#73745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9668:1854, offset: 0x01d76b44, size: 63 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(require(9480) /* metro dependency 9480: QuestUtilsNative */).showQuestUnavailableAlert();
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
/* Metro module 9542; source: modules/quests/native/QuestRewardTile.tsx; dependencies: [57, 31, 27, 4502, 33, 4501, 697, 477, 566, 9500, 9495, 9543, 5475, 2] */
|
||||
function _fun74440(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:6, offset: 0x01d8d9ce, size: 253 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 = importDefault(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(31) /* metro dependency 31 */).useMemo;
|
||||
const value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.AppState;
|
||||
const env0_7 = value.View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
|
||||
var object2 = {'borderRadius': null, 'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center',
|
||||
'overflow': 'hidden'};
|
||||
object2.borderRadius = importDefault(dependencyMap[6]).radii.sm;
|
||||
return {container: object2, video: {'overflow': 'hidden', 'height': '100%', 'width': '100%'},
|
||||
image: {'height': '100%', 'width': '100%'}};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestRewardTile.tsx');
|
||||
exports.default = QuestRewardTile;
|
||||
}
|
||||
|
||||
function QuestRewardTile({quest, height, width, style, paused, withAnimation, accessibilityLabelPrefix}) { // fn#74442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:517, offset: 0x01d8db31, size: 666 bytes, params: 2, frame: 27
|
||||
var r4;
|
||||
var r9;
|
||||
var value;
|
||||
var VideoComponent;
|
||||
paused = !(paused === undefined) && paused;
|
||||
if (withAnimation !== undefined) {
|
||||
r4 = withAnimation;
|
||||
} else {
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isIOS();
|
||||
r4 = value;
|
||||
}
|
||||
let env0_4 = undefined;
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const value2 = useMemo(_fun74444, [quest]);
|
||||
let name = value2.name;
|
||||
name = name != null ? value2.name : value2.messages.name;
|
||||
const value3 = useMemo(_fun74445, [quest]);
|
||||
const env0_3 = value3;
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const value5 = env0_3(Reflect.apply(useState, binding, [AppState.currentState === 'active']), 2);
|
||||
const property = value5[0];
|
||||
env0_4 = value5[1];
|
||||
binding.useEffect(_fun74446, [value3.isAnimated]);
|
||||
const value6 = binding.useMemo(_fun74449, [value3, width, height]);
|
||||
items3 = [accessibilityLabelPrefix, name];
|
||||
const filter = items3.filter;
|
||||
const Boolean = global.Boolean;
|
||||
const value8 = Reflect.apply(filter, items3, [Boolean]).join(', ');
|
||||
const items2 = [styles.container];
|
||||
items2[1] = {height: height, width: width};
|
||||
items2[2] = style;
|
||||
if (value3.isAnimated) {
|
||||
if (r4) {
|
||||
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
|
||||
value = !property;
|
||||
r9 = property ? paused : value;
|
||||
r9 = !r9 ? useReducedMotion : r9;
|
||||
value = <VideoComponent style={styles.video} source={{uri: value3.url}} disableFocus preventsDisplaySleepDuringVideoPlayback={false} importantForAccessibility="no-hide-descendants" poster={value6} resizeMode="cover" paused={r9} muted />;
|
||||
r4 = value;
|
||||
} else {
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component source={{uri: value6}} style={styles.image} />)(value);
|
||||
r4 = value;
|
||||
}
|
||||
} else {
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component source={{uri: value6}} style={styles.image} />)(value);
|
||||
r4 = value;
|
||||
}
|
||||
return (
|
||||
<View accessibilityLabel={value8} style={items2}>
|
||||
{r4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun74444() { // fn#74444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:717, offset: 0x01d8ddcb, size: 45 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(9500) /* metro dependency 9500: QuestRewardUtils */).getQuestPrimaryReward(quest);
|
||||
}
|
||||
|
||||
function _fun74445() { // fn#74445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:811, offset: 0x01d8ddf8, size: 75 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
const getQuestAsset = value.getQuestAsset;
|
||||
const questBinding = quest;
|
||||
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
|
||||
const REWARD = QuestAssetType.REWARD;
|
||||
return Reflect.apply(getQuestAsset, value, [questBinding, REWARD, undefined, true]);
|
||||
}
|
||||
|
||||
function _fun74446() { // fn#74446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:970, offset: 0x01d8de43, size: 65 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
if (env0_3.isAnimated) {
|
||||
value = environment.__proto__;
|
||||
var env0_0 = AppState.addEventListener('change', _fun74447);
|
||||
return _fun74448;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun74449() { // fn#74449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:1109, offset: 0x01d8de9f, size: 73 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (require(9495) /* metro dependency 9495: AssetUtils */).getScaledImageUrl({assetUrl: env0_3.url,
|
||||
width: width, height: height});
|
||||
}
|
||||
|
||||
function _fun74447(a0) { // fn#74447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:1027, offset: 0x01d8de84, size: 27 bytes, params: 2, frame: 12
|
||||
env1_4(a0 === 'active');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,786 @@
|
||||
/* Metro module 9480; source: modules/quests/native/QuestUtils.native.tsx; dependencies: [5, 31, 9481, 6528, 661, 33, 4080, 9482, 1962, 9947, 9500, 10184, 10188, 7099, 9484, 6531, 3857, 1244, 8947, 8953, 9479, 7114, 8088, 4008, 7007, 477, 3853, 697, 10189, 8658, 4497, 4500, 1485, 2] */
|
||||
function _fun73711(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:6, offset: 0x01d75541, size: 423 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_73714 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const openRewardClaimBottomSheet = function({questId, questContent, questContentPosition, sourceQuestContent}) {
|
||||
return importDefault(dependencyMap[6]).openLazy(require(dependencyMap[8])(dependencyMap[9],
|
||||
dependencyMap.paths),
|
||||
QUEST_REWARD_CODE_CLAIM_BOTTOM_SHEET_KEY, {questId: questId, questContent: questContent,
|
||||
questContentPosition: questContentPosition, sourceQuestContent: sourceQuestContent});
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const questHomeNavigationStore = importDefault(9481) /* metro dependency 9481: QuestHomeNavigationStore */;
|
||||
let value = require(6528) /* metro dependency 6528: QuestConstants */;
|
||||
const env0_5 = value.QuestsExperimentLocations;
|
||||
const env0_6 = value.QUEST_REWARD_CODE_CLAIM_BOTTOM_SHEET_KEY;
|
||||
const env0_7 = value.QUEST_REWARD_DETAILS_BOTTOM_SHEET_KEY;
|
||||
const env0_8 = value.QuestVariants;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.Fragment;
|
||||
const env0_12 = value.jsxs;
|
||||
const closure = viewReward;
|
||||
const env0_14 = _fun73717();
|
||||
value = _fun73721();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestUtils.native.tsx');
|
||||
exports.openRewardDetailsBottomSheet = function({questId}) {
|
||||
return importDefault(dependencyMap[6]).openLazy(require(dependencyMap[8])(dependencyMap[7],
|
||||
dependencyMap.paths),
|
||||
QUEST_REWARD_DETAILS_BOTTOM_SHEET_KEY, {questId: questId});
|
||||
};
|
||||
exports.viewReward = closure;
|
||||
exports.handleRewardClaimThenView = value;
|
||||
exports.openQuestHome = openQuestHome;
|
||||
exports.isHeroVideoSupported = isHeroVideoSupported;
|
||||
exports.openDiscordQuestsFAQ = openDiscordQuestsFAQ;
|
||||
exports.getPrimaryCtaIcon = getPrimaryCtaIcon;
|
||||
exports.showQuestUnavailableAlert = showQuestUnavailableAlert;
|
||||
exports.dismissOverlayScreens = dismissOverlayScreens;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_73712(a0, a1) { // fn#73712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:350, offset: 0x01d756e8, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun73713;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_73714(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_73714(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_73714(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun73713;
|
||||
}
|
||||
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 viewReward({quest, product, questContent, questContentPosition, onSuccess, sourceQuestContent}) { // fn#73716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:1504, offset: 0x01d758db, size: 241 bytes, params: 2, frame: 22
|
||||
var moduleValue2;
|
||||
var value;
|
||||
const questRewardUtilsModule = require(9500) /* metro dependency 9500: QuestRewardUtils */;
|
||||
if (questRewardUtilsModule.hasQuestRewardCode(quest.config)) {
|
||||
openRewardClaimBottomSheet({questId: quest.id, questContent: questContent,
|
||||
questContentPosition: questContentPosition, sourceQuestContent: sourceQuestContent});
|
||||
} else {
|
||||
moduleValue2 = questRewardUtilsModule;
|
||||
if (moduleValue2.hasVirtualCurrencyReward(quest.config)) {
|
||||
value = require(10184) /* metro dependency 10184: QuestOrbsRewardModalNative */;
|
||||
value.openQuestOrbsRewardModal({quest: quest});
|
||||
} else {
|
||||
value = require(10188) /* metro dependency 10188: openQuestCollectibleRewardModal */;
|
||||
value.openQuestCollectibleRewardModal({quest: quest, product: product, onSuccess: onSuccess});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun73717() { // fn#73717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:1909, offset: 0x01d759cc, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env0_3(_fun73719);
|
||||
return _fun73720;
|
||||
}
|
||||
|
||||
function _fun73721() { // fn#73721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:2367, offset: 0x01d75b43, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env0_3(_fun73723);
|
||||
return _fun73724;
|
||||
}
|
||||
|
||||
function openQuestHome({scrollToQuestId, mergeExistingRoutes, sort, filter, fromContent}) { // fn#73726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:3448, offset: 0x01d75dc6, size: 213 bytes, params: 2, frame: 19
|
||||
if (mergeExistingRoutes !== undefined) {
|
||||
}
|
||||
if (sort !== undefined) {
|
||||
}
|
||||
if (filter !== undefined) {
|
||||
}
|
||||
const questsEligibilityModule = require(9479) /* metro dependency 9479: QuestsEligibility */;
|
||||
const getIsEligibleForQuests = questsEligibilityModule.getIsEligibleForQuests;
|
||||
if (Reflect.apply(getIsEligibleForQuests, questsEligibilityModule, [])) {
|
||||
(require(7114) /* metro dependency 7114: QuestUtils */).setQuestHomeUtmContext({questId: scrollToQuestId ?? undefined,
|
||||
|
||||
fromContent: fromContent});
|
||||
(importDefault(8088) /* metro dependency 8088: closeVoicePanels */)();
|
||||
global.setTimeout(_fun73727, 1);
|
||||
}
|
||||
}
|
||||
|
||||
function isHeroVideoSupported(a0) { // fn#73731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:4380, offset: 0x01d76093, size: 86 bytes, params: 2, frame: 12
|
||||
let value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isIOS();
|
||||
const value2 = a0.mimetype === 'video/mp4';
|
||||
return value || value2 ? value2 : a0.mimetype === 'video/webm';
|
||||
}
|
||||
|
||||
function openDiscordQuestsFAQ() { // fn#73732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:4502, offset: 0x01d760e9, size: 44 bytes, params: 1, frame: 12
|
||||
(importDefault(3853) /* metro dependency 3853: Linking */).openURL('https://support.discord.com/hc/en-us/articles/22225719947543-Discord-Quests-FAQ#h_01HVPBZR5FBM7QBFR9KDBASXP5');
|
||||
}
|
||||
|
||||
function getPrimaryCtaIcon(a0) { // fn#73733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:4658, offset: 0x01d76115, size: 320 bytes, params: 2, frame: 19
|
||||
var features;
|
||||
var object2;
|
||||
const value = a1;
|
||||
const r2 = value !== undefined ? value : false;
|
||||
const questUtilsModule = require(7114) /* metro dependency 7114: QuestUtils */;
|
||||
if (questUtilsModule.canLaunchActivity(a0)) {
|
||||
features = a0.config.features;
|
||||
if (features.includes(QuestVariants.MOBILE_ACTIVITY_QUEST)) {
|
||||
object2 = {};
|
||||
object2.marginRight = r2 ? (importDefault(697) /* metro dependency 697: native */).space.PX_4 : 0;
|
||||
features = a0.config.features;
|
||||
if (features.includes(QuestVariants.CLOUD_GAMING_ACTIVITY)) {
|
||||
const CloudIcon = (require(10189) /* metro dependency 10189: CloudIcon */).CloudIcon;
|
||||
return (
|
||||
<CloudIcon
|
||||
size="sm"
|
||||
style={object2}
|
||||
color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
const GameControllerIcon = (require(8658) /* metro dependency 8658: GameControllerIcon */).GameControllerIcon;
|
||||
return (
|
||||
<GameControllerIcon
|
||||
size="sm"
|
||||
style={object2}
|
||||
color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showQuestUnavailableAlert() { // fn#73734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:5066, offset: 0x01d76255, size: 391 bytes, params: 1, frame: 27
|
||||
const useAlertStoreNativeModule = require(4497) /* metro dependency 4497: useAlertStoreNative */;
|
||||
const openAlert = useAlertStoreNativeModule.openAlert;
|
||||
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const Lhpq2P = (require(1244) /* metro dependency 1244: indexNative */).t.Lhpq2P;
|
||||
object2.title = Reflect.apply(string, intl, [Lhpq2P]);
|
||||
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iyF4WB);
|
||||
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
|
||||
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
|
||||
string = intl.string;
|
||||
const H0vjGc = (require(1244) /* metro dependency 1244: indexNative */).t.H0vjGc;
|
||||
object2.actions = <><AlertActionButton text={Reflect.apply(string, intl,
|
||||
[H0vjGc])} onPress={(require(9484) /* metro dependency 9484: QuestActionCreators */).fetchCurrentQuests} /><AlertActionButton text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6XS10x'])} variant="secondary" /></>;
|
||||
Reflect.apply(openAlert, useAlertStoreNativeModule, ['quest-unavailable', <AlertModal {...object2} />]);
|
||||
}
|
||||
|
||||
function dismissOverlayScreens() { // fn#73735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:5540, offset: 0x01d763dc, size: 206 bytes, params: 1, frame: 17
|
||||
var rootState;
|
||||
var routes;
|
||||
var value4;
|
||||
var length;
|
||||
var dispatch;
|
||||
var CommonActions;
|
||||
var reset;
|
||||
var object2;
|
||||
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
|
||||
if (rootNavigationRef != null) {
|
||||
if (rootNavigationRef.isReady()) {
|
||||
rootState = rootNavigationRef.getRootState();
|
||||
routes = rootState.routes;
|
||||
value4 = routes.filter(function(a0) {
|
||||
return a0.name !== 'you' && a0.name !== 'settings';
|
||||
});
|
||||
length = value4.length;
|
||||
routes = rootState.routes;
|
||||
if (length < routes.length) {
|
||||
dispatch = rootNavigationRef.dispatch;
|
||||
CommonActions = (require(1485) /* metro dependency 1485 */).CommonActions;
|
||||
reset = CommonActions.reset;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, rootState, rootState);
|
||||
object2['routes'] = value4;
|
||||
object2['index'] = value4.length - 1;
|
||||
Reflect.apply(dispatch, rootNavigationRef, [Reflect.apply(reset, CommonActions, [object2])]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun73719(a0) { // fn#73719, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:1929, offset: 0x01d759fb, size: 328 bytes, params: 2, frame: 23
|
||||
var binding3;
|
||||
var property;
|
||||
var value7;
|
||||
var claimQuestReward;
|
||||
var id;
|
||||
var value8;
|
||||
var QuestContent;
|
||||
var value9;
|
||||
var value10;
|
||||
var value11;
|
||||
var error;
|
||||
var binding4;
|
||||
var value12;
|
||||
var open;
|
||||
var binding5;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
var CKsXk3;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
let binding = env2_0;
|
||||
const binding2 = env2_2;
|
||||
const value3 = binding(binding2[13]);
|
||||
const getQuestLogger = value3.getQuestLogger;
|
||||
let object2 = {};
|
||||
let QUEST_HOME_MOBILE = env2_5.QUEST_HOME_MOBILE;
|
||||
object2.location = QUEST_HOME_MOBILE;
|
||||
const value4 = Reflect.apply(getQuestLogger, value3, [object2]);
|
||||
const defaultPlatform = binding(binding2[10]).getDefaultPlatform(a0.config);
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
value4.error('Error claiming reward', error);
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value12 = binding(binding4[16]);
|
||||
open = value12.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
binding5 = env2_0;
|
||||
intl = binding5(binding4[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding5(binding4[17]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.content = Reflect.apply(string, intl, [CKsXk3]);
|
||||
object2.icon = binding(binding4[18]);
|
||||
Reflect.apply(open, value12, [object2]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
binding3 = env2_2;
|
||||
} catch (error) {
|
||||
value4.error('Error claiming reward', error);
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value12 = binding(binding4[16]);
|
||||
open = value12.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
binding5 = env2_0;
|
||||
intl = binding5(binding4[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding5(binding4[17]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.content = Reflect.apply(string, intl, [CKsXk3]);
|
||||
object2.icon = binding(binding4[18]);
|
||||
Reflect.apply(open, value12, [object2]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
property = binding3[14];
|
||||
} catch (error) {
|
||||
value4.error('Error claiming reward', error);
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value12 = binding(binding4[16]);
|
||||
open = value12.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
binding5 = env2_0;
|
||||
intl = binding5(binding4[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding5(binding4[17]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.content = Reflect.apply(string, intl, [CKsXk3]);
|
||||
object2.icon = binding(binding4[18]);
|
||||
Reflect.apply(open, value12, [object2]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
value7 = binding(property);
|
||||
} catch (error) {
|
||||
value4.error('Error claiming reward', error);
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value12 = binding(binding4[16]);
|
||||
open = value12.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
binding5 = env2_0;
|
||||
intl = binding5(binding4[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding5(binding4[17]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.content = Reflect.apply(string, intl, [CKsXk3]);
|
||||
object2.icon = binding(binding4[18]);
|
||||
Reflect.apply(open, value12, [object2]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
claimQuestReward = value7.claimQuestReward;
|
||||
} catch (error) {
|
||||
value4.error('Error claiming reward', error);
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value12 = binding(binding4[16]);
|
||||
open = value12.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
binding5 = env2_0;
|
||||
intl = binding5(binding4[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding5(binding4[17]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.content = Reflect.apply(string, intl, [CKsXk3]);
|
||||
object2.icon = binding(binding4[18]);
|
||||
Reflect.apply(open, value12, [object2]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
id = a0.id;
|
||||
} catch (error) {
|
||||
value4.error('Error claiming reward', error);
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value12 = binding(binding4[16]);
|
||||
open = value12.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
binding5 = env2_0;
|
||||
intl = binding5(binding4[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding5(binding4[17]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.content = Reflect.apply(string, intl, [CKsXk3]);
|
||||
object2.icon = binding(binding4[18]);
|
||||
Reflect.apply(open, value12, [object2]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
property = binding3[15];
|
||||
} catch (error) {
|
||||
value4.error('Error claiming reward', error);
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value12 = binding(binding4[16]);
|
||||
open = value12.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
binding5 = env2_0;
|
||||
intl = binding5(binding4[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding5(binding4[17]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.content = Reflect.apply(string, intl, [CKsXk3]);
|
||||
object2.icon = binding(binding4[18]);
|
||||
Reflect.apply(open, value12, [object2]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
value8 = binding(property);
|
||||
} catch (error) {
|
||||
value4.error('Error claiming reward', error);
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value12 = binding(binding4[16]);
|
||||
open = value12.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
binding5 = env2_0;
|
||||
intl = binding5(binding4[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding5(binding4[17]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.content = Reflect.apply(string, intl, [CKsXk3]);
|
||||
object2.icon = binding(binding4[18]);
|
||||
Reflect.apply(open, value12, [object2]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
QuestContent = value8.QuestContent;
|
||||
} catch (error) {
|
||||
value4.error('Error claiming reward', error);
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value12 = binding(binding4[16]);
|
||||
open = value12.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
binding5 = env2_0;
|
||||
intl = binding5(binding4[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding5(binding4[17]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.content = Reflect.apply(string, intl, [CKsXk3]);
|
||||
object2.icon = binding(binding4[18]);
|
||||
Reflect.apply(open, value12, [object2]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
QUEST_HOME_MOBILE = QuestContent.QUEST_HOME_MOBILE;
|
||||
} catch (error) {
|
||||
value4.error('Error claiming reward', error);
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value12 = binding(binding4[16]);
|
||||
open = value12.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
binding5 = env2_0;
|
||||
intl = binding5(binding4[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding5(binding4[17]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.content = Reflect.apply(string, intl, [CKsXk3]);
|
||||
object2.icon = binding(binding4[18]);
|
||||
Reflect.apply(open, value12, [object2]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
value9 = Reflect.apply(claimQuestReward, value7, [id, defaultPlatform, QUEST_HOME_MOBILE]);
|
||||
} catch (error) {
|
||||
value4.error('Error claiming reward', error);
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value12 = binding(binding4[16]);
|
||||
open = value12.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
binding5 = env2_0;
|
||||
intl = binding5(binding4[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding5(binding4[17]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.content = Reflect.apply(string, intl, [CKsXk3]);
|
||||
object2.icon = binding(binding4[18]);
|
||||
Reflect.apply(open, value12, [object2]);
|
||||
return false;
|
||||
}
|
||||
yield value9;
|
||||
try {
|
||||
value10 = undefined;
|
||||
value11 = false;
|
||||
} catch (error) {
|
||||
value4.error('Error claiming reward', error);
|
||||
binding = env2_1;
|
||||
binding4 = env2_2;
|
||||
value12 = binding(binding4[16]);
|
||||
open = value12.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
binding5 = env2_0;
|
||||
intl = binding5(binding4[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding5(binding4[17]).t;
|
||||
CKsXk3 = t.CKsXk3;
|
||||
object2.content = Reflect.apply(string, intl, [CKsXk3]);
|
||||
object2.icon = binding(binding4[18]);
|
||||
Reflect.apply(open, value12, [object2]);
|
||||
return false;
|
||||
}
|
||||
if (value11) {
|
||||
return value10;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
async function _fun73723({quest, questContent, questContentPosition, product, hideActionSheet, currentUserHasVerifiedEmailOrPhone, currentUserHasVerifiedEmail, onSuccess, sourceQuestContent}) { // fn#73723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:2387, offset: 0x01d75b7b, size: 493 bytes, params: 2, frame: 27
|
||||
var binding;
|
||||
var hasVirtualCurrencyReward;
|
||||
var config;
|
||||
var open;
|
||||
var binding2;
|
||||
var value4;
|
||||
var object2;
|
||||
var binding3;
|
||||
var intl;
|
||||
var value5;
|
||||
var hasQuestRewardCode;
|
||||
var value6;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
if (hideActionSheet === true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = env2_1(env2_2[6]);
|
||||
value.hideActionSheet();
|
||||
}
|
||||
if (currentUserHasVerifiedEmailOrPhone) {
|
||||
if (currentUserHasVerifiedEmail) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value5 = env2_0(env2_2[10]);
|
||||
if (value5.hasQuestRewardCode(quest.config)) {
|
||||
env2_17({questId: quest.id, questContent: questContent, questContentPosition: questContentPosition,
|
||||
sourceQuestContent: sourceQuestContent});
|
||||
return true;
|
||||
}
|
||||
await env2_14(quest);
|
||||
value6 = undefined;
|
||||
if (false) {
|
||||
return value6;
|
||||
}
|
||||
if (value6) {
|
||||
env2_13({quest: quest, product: product, questContent: questContent,
|
||||
questContentPosition: questContentPosition,
|
||||
onSuccess: onSuccess, sourceQuestContent: sourceQuestContent});
|
||||
}
|
||||
return value6;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_0;
|
||||
value = binding(env2_2[10]);
|
||||
hasVirtualCurrencyReward = value.hasVirtualCurrencyReward;
|
||||
config = quest.config;
|
||||
if (Reflect.apply(hasVirtualCurrencyReward, value, [config])) {
|
||||
if (!currentUserHasVerifiedEmail) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = env2_1(env2_2[19]);
|
||||
value.open();
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding2 = env2_2;
|
||||
value4 = binding(binding2[16]);
|
||||
open = value4.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
binding3 = env2_0;
|
||||
intl = binding3(binding2[17]).intl;
|
||||
object2.content = intl.string(binding3(binding2[17]).t['HZlu0+']);
|
||||
object2.icon = binding(binding2[18]);
|
||||
Reflect.apply(open, value4, [object2]);
|
||||
return false;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_0;
|
||||
value5 = binding(env2_2[10]);
|
||||
hasQuestRewardCode = value5.hasQuestRewardCode;
|
||||
config = quest.config;
|
||||
if (Reflect.apply(hasQuestRewardCode, value5, [config])) {
|
||||
env2_17({questId: quest.id, questContent: questContent, questContentPosition: questContentPosition,
|
||||
sourceQuestContent: sourceQuestContent});
|
||||
return true;
|
||||
}
|
||||
await env2_14(quest);
|
||||
value6 = undefined;
|
||||
if (false) {
|
||||
return value6;
|
||||
}
|
||||
if (value6) {
|
||||
env2_13({quest: quest, product: product, questContent: questContent,
|
||||
questContentPosition: questContentPosition,
|
||||
onSuccess: onSuccess, sourceQuestContent: sourceQuestContent});
|
||||
}
|
||||
return value6;
|
||||
}
|
||||
if (!currentUserHasVerifiedEmail) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = env2_1(env2_2[19]);
|
||||
value.open();
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding2 = env2_2;
|
||||
value4 = binding(binding2[16]);
|
||||
open = value4.open;
|
||||
object2 = {key: 'CLAIM_QUEST_REWARD_ERROR'};
|
||||
binding3 = env2_0;
|
||||
intl = binding3(binding2[17]).intl;
|
||||
object2.content = intl.string(binding3(binding2[17]).t['HZlu0+']);
|
||||
object2.icon = binding(binding2[18]);
|
||||
Reflect.apply(open, value4, [object2]);
|
||||
return false;
|
||||
}
|
||||
|
||||
function _fun73727() { // fn#73727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:3672, offset: 0x01d75e9b, size: 242 bytes, params: 1, frame: 19
|
||||
var environment;
|
||||
var r5;
|
||||
var object2;
|
||||
let value = environment.__proto__;
|
||||
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
|
||||
const value3 = null;
|
||||
if (value3 != rootNavigationRef) {
|
||||
if (rootNavigationRef.isReady()) {
|
||||
r5 = mergeExistingRoutes ? ((a0) => {
|
||||
var closure;
|
||||
var value = a0.getRootState();
|
||||
if (value != null) {
|
||||
if (value.routes) {
|
||||
var env0_0 = _fun73729;
|
||||
closure = _fun73730;
|
||||
var env0_1 = closure;
|
||||
return closure(value.routes);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
})(rootNavigationRef) : value3;
|
||||
QuestHomeNavigationStore.setState({sort: sort, filter: filter,
|
||||
scrollToQuestId: value3 != scrollToQuestId ? scrollToQuestId : ''});
|
||||
object2 = {};
|
||||
object2.screen = UserSettingsSections.QUESTS;
|
||||
if (mergeExistingRoutes) {
|
||||
if (value3 != r5) {
|
||||
rootNavigationRef.navigate({name: 'settings', key: r5.key, params: object2});
|
||||
} else {
|
||||
(require(7007) /* metro dependency 7007: openUserSettings */).openUserSettings(object2);
|
||||
}
|
||||
} else {
|
||||
(require(7007) /* metro dependency 7007: openUserSettings */).openUserSettings(object2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun73728(a0) { // fn#73728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:3750, offset: 0x01d75f8d, size: 69 bytes, params: 2, frame: 12
|
||||
const rootState = a0.getRootState();
|
||||
if (rootState != null) {
|
||||
if (rootState.routes) {
|
||||
return searchRoutes_73730(rootState.routes);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function isQuestsRoute(a0) { // fn#73729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:3829, offset: 0x01d75fd2, size: 61 bytes, params: 2, frame: 4
|
||||
var screen;
|
||||
var r0;
|
||||
var params;
|
||||
let value = a0.name === 'settings';
|
||||
if (value) {
|
||||
params = a0.params;
|
||||
value = undefined;
|
||||
screen = params == null ? value : params.screen;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
value = screen === UserSettingsSections.QUESTS;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function searchRoutes_73730(a0) { // fn#73730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9666:3928, offset: 0x01d7600f, size: 132 bytes, params: 2, frame: 19
|
||||
var r5;
|
||||
var value4;
|
||||
var state;
|
||||
var routes;
|
||||
var searchRoutes_73730Binding;
|
||||
var value5;
|
||||
var value6;
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = _createForOfIteratorHelperLoose_73712(a0);
|
||||
const value2 = value();
|
||||
let done = value2.done;
|
||||
if (!done) {
|
||||
r5 = value2;
|
||||
reducibleLoop1: while (true) {
|
||||
value4 = r5.value;
|
||||
if (isQuestsRoute(value4)) {
|
||||
return value4;
|
||||
}
|
||||
state = value4.state;
|
||||
if (state != null) {
|
||||
routes = state.routes;
|
||||
reducibleJoin5: while (true) {
|
||||
if (routes) {
|
||||
searchRoutes_73730Binding = searchRoutes_73730;
|
||||
state = value4.state;
|
||||
routes = state.routes;
|
||||
value5 = searchRoutes_73730Binding(routes);
|
||||
if (value5) {
|
||||
return value5;
|
||||
}
|
||||
break reducibleJoin5;
|
||||
}
|
||||
break reducibleJoin5;
|
||||
}
|
||||
}
|
||||
value6 = value();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
return null;
|
||||
}
|
||||
r5 = value6;
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,304 @@
|
||||
/* Metro module 13596; source: modules/quests/native/VideoQuestModal/VideoQuestModal.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 13597, 7717, 7110, 13573, 8621, 4017, 4577, 1585, 8141, 13598, 6618, 13601, 13629, 9480, 9483, 10183, 6531, 10121, 2] */
|
||||
function _fun103329(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:6, offset: 0x0226266f, size: 577 bytes, params: 8, frame: 29
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.View;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value3.jsx;
|
||||
const env0_8 = value3.jsxs;
|
||||
const env0_9 = {'mass': 1.9, 'damping': 18, 'stiffness': 80, 'overshootClamping': true};
|
||||
object3 = {WATCH_VIDEO: 0};
|
||||
object3[0] = 'WATCH_VIDEO';
|
||||
object3.POST_WATCH_VIDEO = 1;
|
||||
object3[1] = 'POST_WATCH_VIDEO';
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object5 = {wrapper: {'flexDirection': 'column', 'flexGrow': 1, 'flexShrink': 1, 'zIndex': 1}};
|
||||
object5.contentWrapper = {flex: 1};
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
||||
object7['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object7['backgroundColor'] = BACKGROUND_BASE_LOWEST;
|
||||
object5.contentBackground = object7;
|
||||
object5.modalContentWrapper = {zIndex: 2};
|
||||
const object8 = {};
|
||||
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
|
||||
object8['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object8['flex'] = 1;
|
||||
object8['overflow'] = 'hidden';
|
||||
object8['pointerEvents'] = 'none';
|
||||
object8['zIndex'] = 1;
|
||||
object5.backgroundWrapper = object8;
|
||||
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object5]);
|
||||
const env0_12 = {code: 'function VideoQuestModalTsx1(){const{withSpring,clamp,postWatchAnimationState,BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG,interpolate,CLOUDS_BACKGROUND_INVISIBLE_OFFSET_Y}=this.__closure;return{opacity:withSpring(clamp(postWatchAnimationState.get(),0,1),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG),transform:[{translateY:withSpring(interpolate(postWatchAnimationState.get(),[0,1],[CLOUDS_BACKGROUND_INVISIBLE_OFFSET_Y,0]),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG)}]};}'};
|
||||
const env0_13 = {code: 'function VideoQuestModalTsx2(){const{withSpring,interpolate,postWatchAnimationState,safeAreaInsets,BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG}=this.__closure;return{transform:[{translateY:withSpring(interpolate(postWatchAnimationState.get(),[0,1],[safeAreaInsets.top,0]),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG)}],opacity:withSpring(postWatchAnimationState.get(),BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG)};}'};
|
||||
const env0_14 = value.memo(_fun103330);
|
||||
value = value.memo(VideoQuestModal);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModal.tsx');
|
||||
exports.default = value;
|
||||
exports.VideoQuestModalSteps = object3;
|
||||
}
|
||||
|
||||
function _fun103330({onClose, initialStep, sourceQuestContent}) { // fn#103330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:1689, offset: 0x022628b0, size: 1314 bytes, params: 2, frame: 38
|
||||
var object2;
|
||||
var r12;
|
||||
var value;
|
||||
const {quest,
|
||||
videoSessionId} = (require(13597) /* metro dependency 13597: VideoQuestModalContext */).useVideoQuestModalContext();
|
||||
const env0_3 = videoSessionId;
|
||||
const userStatus = quest.userStatus;
|
||||
const value4 = userStatus?.completedAt != null;
|
||||
let binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value5 = Reflect.apply(useState, binding,
|
||||
[initialStep ?? (value4 ? env0_10.POST_WATCH_VIDEO : env0_10.WATCH_VIDEO)]);
|
||||
binding = env0_3;
|
||||
const value6 = binding(value5, 2);
|
||||
const property = value6[0];
|
||||
const env0_6 = value6[1];
|
||||
const binding3 = env0_4;
|
||||
useState = binding3.useState;
|
||||
const value9 = binding(Reflect.apply(useState, binding3, [false]), 2);
|
||||
const property2 = value9[0];
|
||||
const env0_7 = value9[1];
|
||||
const value10 = binding3.useCallback(_fun103331, [quest.id, videoSessionId, sourceQuestContent]);
|
||||
const useContext = binding3.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const windowDimensions = Reflect.apply(useContext, binding3, [QuestDockGestureContext]).windowDimensions;
|
||||
const styles = useStyles();
|
||||
const height = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(windowDimensions).height;
|
||||
binding3.useLayoutEffect(_fun103332, [value4, initialStep]);
|
||||
let closure = _fun103333;
|
||||
const value11 = binding3.useCallback(closure, []);
|
||||
const value12 = binding3.useCallback(_fun103334, [value10]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useSharedValue = reanimatedRexportModule.useSharedValue;
|
||||
let POST_WATCH_VIDEO = env0_10.POST_WATCH_VIDEO;
|
||||
const value13 = Reflect.apply(useSharedValue, reanimatedRexportModule, [property !== POST_WATCH_VIDEO ? 0 : 1]);
|
||||
const env0_9 = value13;
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
let useAnimatedStyle = moduleValue3.useAnimatedStyle;
|
||||
closure = M_103335;
|
||||
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
clamp: reanimatedRexportModule.clamp, postWatchAnimationState: value13};
|
||||
binding = env0_9;
|
||||
object2.BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG = binding;
|
||||
object2.interpolate = reanimatedRexportModule.interpolate;
|
||||
object2.CLOUDS_BACKGROUND_INVISIBLE_OFFSET_Y = -100;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 11571705142399;
|
||||
closure.__initData = env0_12;
|
||||
const value14 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
|
||||
const value15 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
var env0_10 = value15;
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue4.useAnimatedStyle;
|
||||
closure = U_103336;
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
interpolate: reanimatedRexportModule.interpolate, postWatchAnimationState: value13, safeAreaInsets: value15,
|
||||
BACKGROUND_ENTRANCE_ANIMATION_SPRING_CONFIG: binding};
|
||||
closure.__workletHash = 9769051401109;
|
||||
closure.__initData = env0_13;
|
||||
const value16 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
|
||||
env0_4.useEffect(_fun103337, [value13, property]);
|
||||
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
const view = <View style={[styles.backgroundWrapper,
|
||||
{height: height}]}><ReanimatedNativeView style={[styles.contentBackground,
|
||||
{top: value15.top}]} /><ReanimatedNativeView style={[styles.contentBackground,
|
||||
value16]} /><ReanimatedNativeView style={value14}>{((Component) => <Component align="top" />)(importDefault(13598) /* metro dependency 13598: QuestModalContentCloudBackground */)}</ReanimatedNativeView></View>;
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const items6 = [styles.wrapper];
|
||||
items6[1] = {height: height};
|
||||
const WATCH_VIDEO = env0_10.WATCH_VIDEO;
|
||||
const items7 = [property === WATCH_VIDEO && ((Component) => <Component isFullscreen={property2} onNavigateToPostWatchVideo={value12} onClose={onClose} onEnd={value12} setIsFullscreen={value10} sourceQuestContent={sourceQuestContent} />)(importDefault(13601) /* metro dependency 13601: VideoQuestModalContentInProgress */)];
|
||||
POST_WATCH_VIDEO = env0_10.POST_WATCH_VIDEO;
|
||||
const value21 = property === POST_WATCH_VIDEO;
|
||||
if (value21) {
|
||||
value = importDefault(13629) /* metro dependency 13629: VideoQuestModalContentCompleted */;
|
||||
value = ((Component) => <Component onClose={onClose} onRestartVideo={value11} sourceQuestContent={sourceQuestContent} />)(value);
|
||||
r12 = value;
|
||||
} else {
|
||||
r12 = value21;
|
||||
}
|
||||
items7[1] = r12;
|
||||
return (
|
||||
<View>
|
||||
<ReanimatedNativeView style={styles.modalContentWrapper}>
|
||||
{view}
|
||||
<SafeAreaPaddingView top style={items6}>
|
||||
<View style={styles.contentWrapper}>
|
||||
{items7}
|
||||
</View>
|
||||
</SafeAreaPaddingView>
|
||||
</ReanimatedNativeView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function VideoQuestModal({questId, questContentPosition, onClose, videoSessionId, initialStep, sourceQuestContent}) { // fn#103338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4201, offset: 0x0226309a, size: 278 bytes, params: 2, frame: 22
|
||||
const binding = sourceQuestContent;
|
||||
const useCallback = binding.useCallback;
|
||||
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useNonNullableQuest(questId,
|
||||
Reflect.apply(useCallback, binding, [_fun103339, [onClose]]));
|
||||
const value4 = binding.useMemo(_fun103340, [onClose, value3, videoSessionId, questContentPosition, initialStep,
|
||||
sourceQuestContent]);
|
||||
binding.useLayoutEffect(_fun103344, []);
|
||||
if (value3 == null || value4 == null) {
|
||||
return null;
|
||||
} else {
|
||||
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
|
||||
return (
|
||||
<Modal
|
||||
hideTitle
|
||||
initialRouteName="watch_mobile_video_quest"
|
||||
screens={value4}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103331(a0) { // fn#103331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2018, offset: 0x02262dd2, size: 175 bytes, params: 2, frame: 17
|
||||
const deviceOrientationModule = require(7717) /* metro dependency 7717: DeviceOrientation */;
|
||||
const lockOrientation = deviceOrientationModule.lockOrientation;
|
||||
if (a0) {
|
||||
Reflect.apply(lockOrientation, deviceOrientationModule, ['LANDSCAPE', true]);
|
||||
} else {
|
||||
Reflect.apply(lockOrientation, deviceOrientationModule, ['PORTRAIT', true]);
|
||||
}
|
||||
env0_7(a0);
|
||||
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestEvent({questId: quest.id,
|
||||
event: a0 ? AnalyticEvents.QUEST_VIDEO_FULLSCREEN_ENTERED : AnalyticEvents.QUEST_VIDEO_FULLSCREEN_EXITED,
|
||||
properties: {video_session_id: videoSessionId}, sourceQuestContent: sourceQuestContent});
|
||||
}
|
||||
|
||||
function _fun103332() { // fn#103332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2400, offset: 0x02262e81, size: 51 bytes, params: 1, frame: 12
|
||||
var binding;
|
||||
if (result && initialStep == null) {
|
||||
binding = env0_6;
|
||||
value = environment.__proto__;
|
||||
binding(env1_10.POST_WATCH_VIDEO);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103333() { // fn#103333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2473, offset: 0x02262eb4, size: 29 bytes, params: 1, frame: 11
|
||||
const binding = env0_6;
|
||||
const WATCH_VIDEO = env1_10.WATCH_VIDEO;
|
||||
binding(WATCH_VIDEO);
|
||||
}
|
||||
|
||||
function _fun103334() { // fn#103334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2518, offset: 0x02262ed1, size: 40 bytes, params: 1, frame: 12
|
||||
env0_8(false);
|
||||
const binding = env0_6;
|
||||
const POST_WATCH_VIDEO = env1_10.POST_WATCH_VIDEO;
|
||||
binding(POST_WATCH_VIDEO);
|
||||
}
|
||||
|
||||
function M_103335() { // fn#103335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:2644, offset: 0x02262ef9, size: 196 bytes, params: 1, frame: 25
|
||||
const object3 = {};
|
||||
let value = environment.__proto__;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
let withSpring = springModule.withSpring;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const clamp = reanimatedRexportModule.clamp;
|
||||
let binding = env0_9;
|
||||
const value4 = Reflect.apply(clamp, reanimatedRexportModule, [binding.get(), 0, 1]);
|
||||
binding = env1_9;
|
||||
object3.opacity = Reflect.apply(withSpring, springModule, [value4, binding]);
|
||||
const object4 = {};
|
||||
value = springModule;
|
||||
withSpring = value.withSpring;
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
object4.translateY = Reflect.apply(withSpring, value, [moduleValue3.interpolate(env0_9.get(), [0, 1], [-100, 0]),
|
||||
binding]);
|
||||
object3.transform = [object4];
|
||||
return object3;
|
||||
}
|
||||
|
||||
function U_103336() { // fn#103336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:3110, offset: 0x02262fbd, size: 174 bytes, params: 1, frame: 25
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
let withSpring = springModule.withSpring;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = reanimatedRexportModule.interpolate;
|
||||
let binding = env0_9;
|
||||
let get = binding.get;
|
||||
const value4 = Reflect.apply(interpolate, reanimatedRexportModule, [Reflect.apply(get, binding, []), [0, 1],
|
||||
[env0_10.top, 0]]);
|
||||
binding = env1_9;
|
||||
object2.transform = [{translateY: Reflect.apply(withSpring, springModule, [value4, binding])}];
|
||||
value = springModule;
|
||||
withSpring = value.withSpring;
|
||||
const binding2 = env0_9;
|
||||
get = binding2.get;
|
||||
object2.opacity = Reflect.apply(withSpring, value, [Reflect.apply(get, binding2, []), binding]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun103337() { // fn#103337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:3486, offset: 0x0226306b, size: 47 bytes, params: 1, frame: 13
|
||||
const binding = env0_9;
|
||||
const set = binding.set;
|
||||
const binding2 = env0_5;
|
||||
const value = environment.__proto__;
|
||||
const POST_WATCH_VIDEO = env1_10.POST_WATCH_VIDEO;
|
||||
Reflect.apply(set, binding, [binding2 !== POST_WATCH_VIDEO ? 0 : 1]);
|
||||
}
|
||||
|
||||
function _fun103339() { // fn#103339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4357, offset: 0x022631b0, size: 48 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
(require(9480) /* metro dependency 9480: QuestUtilsNative */).showQuestUnavailableAlert();
|
||||
onClose();
|
||||
}
|
||||
|
||||
function _fun103340() { // fn#103340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4459, offset: 0x022631e0, size: 69 bytes, params: 1, frame: 5
|
||||
const value = null;
|
||||
return value == env0_5 ? value : {['watch_mobile_video_quest']: {fullscreen: true, headerLeft: function() {
|
||||
return null;
|
||||
}, render: render_103342}};
|
||||
}
|
||||
|
||||
function _fun103344() { // fn#103344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4956, offset: 0x0226332a, size: 60 bytes, params: 1, frame: 17
|
||||
const value = environment.__proto__;
|
||||
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
|
||||
return (require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation;
|
||||
}
|
||||
|
||||
function render_103342() { // fn#103342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4523, offset: 0x02263225, size: 208 bytes, params: 1, frame: 22
|
||||
const Provider = (importDefault(13597) /* metro dependency 13597: VideoQuestModalContext */).Provider;
|
||||
const object = {};
|
||||
const binding = env1_5;
|
||||
object.quest = binding;
|
||||
object.videoSessionId = videoSessionId;
|
||||
const QuestDockGestureContextProvider = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContextProvider;
|
||||
const QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const VIDEO_MODAL_MOBILE = QuestContent.VIDEO_MODAL_MOBILE;
|
||||
return (
|
||||
<Provider value={object}>
|
||||
<QuestDockGestureContextProvider>
|
||||
<QuestContentImpressionTrackerNative
|
||||
overrideVisibility
|
||||
questContent={VIDEO_MODAL_MOBILE}
|
||||
questOrQuests={binding}
|
||||
questContentPosition={questContentPosition}
|
||||
sourceQuestContent={sourceQuestContent}
|
||||
>
|
||||
{children_103343}
|
||||
</QuestContentImpressionTrackerNative>
|
||||
</QuestDockGestureContextProvider>
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function render_103342Children() { // fn#103343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13786:4835, owner: render_103342.children, offset: 0x022632f5, size: 53 bytes, params: 1, frame: 14
|
||||
return ((Component) => <Component initialStep={initialStep} onClose={onClose} sourceQuestContent={sourceQuestContent} />)(env3_14);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 13618; source: modules/quests/native/VideoQuestModal/VideoQuestModalCloseButton.tsx; dependencies: [33, 697, 5278, 1244, 5312, 2] */
|
||||
function _fun104018(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13815:6, offset: 0x0227ba1b, size: 123 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalCloseButton.tsx');
|
||||
exports.default = VideoQuestModalCloseButton;
|
||||
}
|
||||
|
||||
function VideoQuestModalCloseButton({onClose, iconColor = importDefault(dependencyMap[1]).colors.MOBILE_TEXT_HEADING_PRIMARY, style}) { // fn#104019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13815:116, offset: 0x0227ba96, size: 236 bytes, params: 2, frame: 21
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
|
||||
const items2 = [{'flexShrink': 0, 'minWidth': 24, 'minHeight': 24}, style];
|
||||
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
|
||||
return (
|
||||
<PressableOpacity
|
||||
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
|
||||
accessibilityRole="button"
|
||||
hitSlop={12}
|
||||
onPress={onClose}
|
||||
style={items2}
|
||||
>
|
||||
<XSmallIcon color={iconColor} />
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,229 @@
|
||||
/* Metro module 13629; source: modules/quests/native/VideoQuestModal/VideoQuestModalContentCompleted.tsx; dependencies: [31, 27, 33, 4501, 697, 13597, 9495, 9513, 13627, 13593, 7589, 4017, 4577, 7114, 9212, 9505, 7717, 13573, 6618, 4572, 4573, 1244, 13618, 8141, 13619, 1305, 5278, 10234, 5475, 4578, 9798, 2] */
|
||||
function _fun104081(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:6, offset: 0x02283a77, size: 589 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.ActivityIndicator;
|
||||
const env0_5 = value2.View;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value3.jsx;
|
||||
const env0_7 = value3.jsxs;
|
||||
const env0_8 = {'mass': 1.9, 'damping': 18, 'stiffness': 80, 'overshootClamping': false};
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {wrapper: {'flexGrow': 1, 'flexShrink': 1}, headerContentCopy: {'flexGrow': 1, 'flexShrink': 1}};
|
||||
object2.closeButton = {opacity: 0.5};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.content = {padding: PX_16};
|
||||
object2.contentRewardsAnimatedWrapper = {flex: 1};
|
||||
object2.contentRewardsWrapper = {flex: 1};
|
||||
object2.contentRewards = {alignItems: 'center'};
|
||||
object2.contentRewardsCopy = {textAlign: 'center'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.contentEndCardHeader = {marginBottom: PX_16};
|
||||
object2.contentEndCardHeaderCopy = {'flexGrow': 1, 'flexShrink': 1};
|
||||
const object3 = {borderTopWidth: 1};
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object3.borderTopColor = BORDER_STRONG;
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object3.paddingTop = PX_24;
|
||||
object2.contentEndCard = object3;
|
||||
const object4 = {height: 210};
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object4.marginBottom = PX_24;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
||||
object2.image = object4;
|
||||
const object5 = {flexGrow: 0};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.ctaPrimary = object5;
|
||||
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
object2 = {code: 'function VideoQuestModalContentCompletedTsx1(){const{withDelay,ANIMATION_DELAY,withSpring,isComponentMounted,ANIMATED_CONTENT_SPRING_CONFIG,interpolate,ANIMATED_CONTENT_OFFSET_Y}=this.__closure;return{opacity:withDelay(ANIMATION_DELAY,withSpring(isComponentMounted.get(),ANIMATED_CONTENT_SPRING_CONFIG)),transform:[{translateY:withDelay(ANIMATION_DELAY,withSpring(interpolate(isComponentMounted.get(),[0,1],[ANIMATED_CONTENT_OFFSET_Y,0]),ANIMATED_CONTENT_SPRING_CONFIG))}]};}'};
|
||||
value = value.memo(VideoQuestModalContentCompleted);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalContentCompleted.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function VideoQuestModalContentCompleted({onClose, onRestartVideo, sourceQuestContent}) { // fn#104082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:1402, offset: 0x02283cc4, size: 2510 bytes, params: 2, frame: 49
|
||||
var object2;
|
||||
var r14;
|
||||
var r10;
|
||||
var items5;
|
||||
var string;
|
||||
var ShinyButton;
|
||||
var object19;
|
||||
const styles = useStyles();
|
||||
const videoQuestModalContextModule = require(13597) /* metro dependency 13597: VideoQuestModalContext */;
|
||||
const useVideoQuestModalContext = videoQuestModalContextModule.useVideoQuestModalContext;
|
||||
const quest = Reflect.apply(useVideoQuestModalContext, videoQuestModalContextModule, []).quest;
|
||||
let binding = env0_3;
|
||||
const value3 = binding.useMemo(_fun104083, [quest]);
|
||||
const value5 = (require(13627) /* metro dependency 13627: useVideoQuestClickCtaAndMaybeCloseModal */).useVideoQuestClickCtaAndMaybeCloseModal({quest: quest,
|
||||
onClose: onClose, sourceQuestContent: sourceQuestContent,
|
||||
impressionId: (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId()});
|
||||
const questBottomSheetFooterModule = require(13593) /* metro dependency 13593: QuestBottomSheetFooter */;
|
||||
const useQuestRewardClaimHandler = questBottomSheetFooterModule.useQuestRewardClaimHandler;
|
||||
object2 = {quest: quest};
|
||||
object2.onSuccess = (importDefault(7589) /* metro dependency 7589: ProductPurchaseSuccessActionCreators */).close;
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
const {isLoading, isClaiming, claim} = Reflect.apply(useQuestRewardClaimHandler, questBottomSheetFooterModule,
|
||||
[object2]);
|
||||
const userStatus = quest.userStatus;
|
||||
const value7 = userStatus?.claimedAt != null;
|
||||
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = VideoQuestModalContentCompletedT;
|
||||
closure.__closure = {withDelay: reanimatedRexportModule.withDelay, ANIMATION_DELAY: 125,
|
||||
withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isComponentMounted: value8,
|
||||
ANIMATED_CONTENT_SPRING_CONFIG: env0_8, interpolate: reanimatedRexportModule.interpolate,
|
||||
ANIMATED_CONTENT_OFFSET_Y: 75};
|
||||
closure.__workletHash = 2704439293952;
|
||||
closure.__initData = env0_10;
|
||||
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
binding = env0_3;
|
||||
binding.useEffect(_fun104085, [value8]);
|
||||
const questUtilsModule = require(7114) /* metro dependency 7114: QuestUtils */;
|
||||
const isShareableQuest2 = questUtilsModule.isShareableQuest(quest.config);
|
||||
const value10 = binding.useCallback(_fun104086, [isShareableQuest2, quest.id]);
|
||||
binding.useLayoutEffect(_fun104087, []);
|
||||
const useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const windowDimensions = Reflect.apply(useContext, binding, [QuestDockGestureContext]).windowDimensions;
|
||||
let get = windowDimensions.get;
|
||||
const value11 = Reflect.apply(get, windowDimensions, []).height < 800;
|
||||
get = windowDimensions.get;
|
||||
const value12 = Reflect.apply(get, windowDimensions, []).height < 760;
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const EAYZAr = t.EAYZAr;
|
||||
const items2 = [<Stack align="center" direction="horizontal" justify="space-between" style={styles.content}><Text variant="heading-sm/semibold" color="text-subtle" style={styles.headerContentCopy}>{Reflect.apply(formatToPlainString,
|
||||
intl, [EAYZAr,
|
||||
{questName: quest.config.messages.questName}])}</Text>{((Component) => <Component onClose={onClose} style={styles.closeButton} />)(importDefault(13618) /* metro dependency 13618: VideoQuestModalCloseButton */)}</Stack>];
|
||||
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
const items3 = [styles.contentRewardsAnimatedWrapper, value9];
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
const items4 = [styles.content];
|
||||
items4[1] = styles.contentRewardsWrapper;
|
||||
if (isLoading) {
|
||||
if (isClaiming) {
|
||||
var viewBindingProps = {style: styles.contentRewards};
|
||||
items5 = [((Component) => <Component withQuestName={false} withRewardAvailableCopy={false} size={value12 ? 'md' : value11 ? 'md-lg' : 'lg'} withRewardTileAnimation />)(importDefault(13619) /* metro dependency 13619: VideoQuestModalReward */)];
|
||||
string = intl.string;
|
||||
items5[1] = <Text color="text-strong" style={styles.contentRewardsCopy} variant="heading-lg/semibold">{value7 ? Reflect.apply(string,
|
||||
|
||||
|
||||
intl, [t['EMp8/M']]) : Reflect.apply(string, intl, [t.qyKLdg])}</Text>;
|
||||
r14 = <View {...viewBindingProps}>{items5}</View>;
|
||||
} else {
|
||||
r14 = <ActivityIndicator />;
|
||||
}
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.contentRewards};
|
||||
items5 = [((Component) => <Component withQuestName={false} withRewardAvailableCopy={false} size={value12 ? 'md' : value11 ? 'md-lg' : 'lg'} withRewardTileAnimation />)(importDefault(13619) /* metro dependency 13619: VideoQuestModalReward */)];
|
||||
string = intl.string;
|
||||
items5[1] = <Text color="text-strong" style={styles.contentRewardsCopy} variant="heading-lg/semibold">{value7 ? Reflect.apply(string,
|
||||
|
||||
intl, [t['EMp8/M']]) : Reflect.apply(string, intl, [t.qyKLdg])}</Text>;
|
||||
r14 = <View {...viewBindingProps}>{items5}</View>;
|
||||
}
|
||||
const items6 = [r14];
|
||||
if (value7) {
|
||||
r14 = !value7;
|
||||
} else {
|
||||
ShinyButton = (require(1305) /* metro dependency 1305: native */).ShinyButton;
|
||||
r14 = <ShinyButton loading={isClaiming} onPress={claim} style={styles.ctaPrimary} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cfY4PE)} color={(require(1305) /* metro dependency 1305: native */).ButtonColors.GREY} />;
|
||||
}
|
||||
items6[1] = r14;
|
||||
items2[1] = <ReanimatedNativeView style={items3}><Stack align="center" justify="center" spacing={PX_24} style={items4}>{items6}</Stack></ReanimatedNativeView>;
|
||||
const items7 = [styles.content];
|
||||
items7[1] = styles.contentEndCard;
|
||||
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
const stack = <Stack2 spacing={PX_4} style={styles.contentEndCardHeaderCopy}><Text variant="heading-md/semibold" color="mobile-text-heading-primary" accessibilityRole="header">{quest.config.messages.gameTitle}</Text><Text variant="text-sm/medium" color="text-subtle">{quest.config.messages.gamePublisher}</Text></Stack2>;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
string = intl.string;
|
||||
const YsCuyF = (require(1244) /* metro dependency 1244: indexNative */).t.YsCuyF;
|
||||
const RetryIcon = (require(10234) /* metro dependency 10234: RetryIcon */).RetryIcon;
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
const stack2 = <Stack direction="horizontal" justify="space-between" style={styles.contentEndCardHeader}>{stack}<PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(string,
|
||||
intl,
|
||||
[YsCuyF])} onPress={onRestartVideo}><RetryIcon color={INTERACTIVE_TEXT_DEFAULT} /></PressableOpacity></Stack>;
|
||||
const value28 = value3 != null;
|
||||
if (value28) {
|
||||
r10 = <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.r8BzFT,
|
||||
|
||||
{gameTitle: quest.config.messages.gameTitle})} onPress={value5}>{((Component) => <Component style={styles.image} source={{uri: value3.url}} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</PressableOpacity>;
|
||||
} else {
|
||||
r10 = value28;
|
||||
}
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items2[2] = <View style={items7}>{stack2}{r10}<Stack direction="horizontal" spacing={PX_16} align="center"><Button grow onPress={value5} text={(require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest)} />{isShareableQuest2 && <PressableOpacity accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ej3B3Y)} onPress={value10}>{((ShareIcon) => <ShareIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(9798) /* metro dependency 9798: ShareIcon */).ShareIcon)}</PressableOpacity>}</Stack></View>;
|
||||
return (
|
||||
<SafeAreaPaddingView bottom style={styles.wrapper}>
|
||||
{items2}
|
||||
</SafeAreaPaddingView>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104083() { // fn#104083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:1571, offset: 0x02284692, size: 75 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
const getQuestAsset = value.getQuestAsset;
|
||||
const questBinding = quest;
|
||||
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
|
||||
const VIDEO_PLAYER_THUMBNAIL = QuestAssetType.VIDEO_PLAYER_THUMBNAIL;
|
||||
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_THUMBNAIL, undefined, true]);
|
||||
}
|
||||
|
||||
function VideoQuestModalContentCompletedT() { // fn#104084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2048, owner: VideoQuestModalContentCompleted.T, offset: 0x022846dd, size: 206 bytes, params: 1, frame: 24
|
||||
const object3 = {};
|
||||
let value = environment.__proto__;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let withDelay = reanimatedRexportModule.withDelay;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
let withSpring = springModule.withSpring;
|
||||
let binding = env0_1;
|
||||
const value3 = binding.get();
|
||||
binding = env1_8;
|
||||
object3.opacity = Reflect.apply(withDelay, reanimatedRexportModule, [125, Reflect.apply(withSpring, springModule,
|
||||
[value3, binding])]);
|
||||
const object4 = {};
|
||||
value = reanimatedRexportModule;
|
||||
withDelay = value.withDelay;
|
||||
const moduleValue3 = springModule;
|
||||
withSpring = moduleValue3.withSpring;
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
object4.translateY = Reflect.apply(withDelay, value, [125, Reflect.apply(withSpring, moduleValue3,
|
||||
[moduleValue4.interpolate(env0_1.get(), [0, 1], [75, 0]), binding])]);
|
||||
object3.transform = [object4];
|
||||
return object3;
|
||||
}
|
||||
|
||||
function _fun104086() { // fn#104086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2597, offset: 0x022847ab, size: 95 bytes, params: 1, frame: 17
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var showShareActionSheet;
|
||||
var moduleValue2;
|
||||
if (env0_2) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
|
||||
showShareActionSheet = moduleValue.showShareActionSheet;
|
||||
moduleValue2 = require(9505) /* metro dependency 9505: QuestCopyUtils */;
|
||||
Reflect.apply(showShareActionSheet, moduleValue, [{message: moduleValue2.getQuestUrl(quest.id)},
|
||||
'Video Quest Modal']);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun104087() { // fn#104087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13826:2724, offset: 0x0228480a, size: 45 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,608 @@
|
||||
/* Metro module 13601; source: modules/quests/native/VideoQuestModal/VideoQuestModalContentInProgress.tsx; dependencies: [57, 31, 27, 6528, 482, 33, 674, 697, 4501, 477, 9495, 9511, 13602, 13605, 13573, 4017, 4504, 1585, 6618, 3868, 13618, 8141, 13619, 13598, 13622, 4572, 5278, 4573, 13623, 5475, 1305, 9505, 8341, 1244, 9176, 11906, 9483, 9522, 4589, 13625, 13620, 4578, 11905, 13526, 13524, 9798, 8638, 13597, 4080, 13626, 1962, 9513, 7114, 9519, 9517, 9518, 7121, 7120, 6531, 7110, 9212, 13627, 9480, 13628, 6535, 2] */
|
||||
function _fun103352(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:6, offset: 0x0226385e, size: 800 bytes, params: 8, frame: 24
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.View;
|
||||
const env0_6 = value2.StyleSheet;
|
||||
const env0_7 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
|
||||
const env0_8 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value3.jsx;
|
||||
const env0_10 = value3.jsxs;
|
||||
const env0_11 = {'x': 0, 'y': 0};
|
||||
const env0_12 = {'x': 0, 'y': 1};
|
||||
const value4 = importDefault(674) /* metro dependency 674 */;
|
||||
let PLUM_23 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLUM_23;
|
||||
const value6 = value4(PLUM_23).alpha(0.4);
|
||||
object = [value6.hex()];
|
||||
const value8 = value4;
|
||||
PLUM_23 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLUM_23;
|
||||
const value10 = value8(PLUM_23).alpha(0);
|
||||
object[1] = value10.hex();
|
||||
const value11 = value4;
|
||||
PLUM_23 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLUM_23;
|
||||
object = [value11(PLUM_23).alpha(0).hex()];
|
||||
const value15 = value4;
|
||||
PLUM_23 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLUM_23;
|
||||
const value17 = value15(PLUM_23).alpha(0.4);
|
||||
object[1] = value17.hex();
|
||||
const env0_15 = {'bottom': 158, 'top': 64, 'left': 16, 'right': 16};
|
||||
const env0_16 = {'bottom': 16, 'left': 16, 'right': 16};
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
let createStyles = createStylesModule.createStyles;
|
||||
const env0_17 = Reflect.apply(createStyles, createStylesModule, [_fun103353]);
|
||||
object = {code: 'function VideoQuestModalContentInProgressTsx1(){const{withDelay,LOGO_REWARD_TRANSITION_DELAY_MS,withTiming,isComponentMounted,LOGO_REWARD_TRANSITION_DURATION_MS}=this.__closure;return withDelay(LOGO_REWARD_TRANSITION_DELAY_MS,withTiming(isComponentMounted.get(),{duration:LOGO_REWARD_TRANSITION_DURATION_MS}));}'};
|
||||
object = {code: 'function VideoQuestModalContentInProgressTsx2(){const{animation}=this.__closure;return{opacity:animation.get()};}'};
|
||||
object = {code: 'function VideoQuestModalContentInProgressTsx3(){const{animation}=this.__closure;return{opacity:1-animation.get()};}'};
|
||||
object = {code: "function VideoQuestModalContentInProgressTsx4(){const{animation}=this.__closure;return{pointerEvents:animation.get()>0.3?'auto':'none'};}"};
|
||||
const env0_22 = value.memo(_fun103354);
|
||||
const env0_23 = value.memo(_fun103362);
|
||||
const value19 = createStylesModule;
|
||||
createStyles = value19.createStyles;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
const env0_24 = Reflect.apply(createStyles, value19, [{footerButton: {padding: PX_8}}]);
|
||||
const env0_25 = value.forwardRef(FooterButton);
|
||||
value = value.memo(VideoQuestModalContentInProgress);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalContentInProgress.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun103353(a0) { // fn#103353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:590, offset: 0x02263b7e, size: 1081 bytes, params: 2, frame: 20
|
||||
const object2 = {};
|
||||
let BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object2.wrapper = {backgroundColor: BACKGROUND_BASE_LOWEST, flex: 1};
|
||||
const object4 = {};
|
||||
object4.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object4.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const value2 = 'center';
|
||||
object4.justifyContent = a0 ? 'flex-start' : value2;
|
||||
object2.wrapperPortrait = object4;
|
||||
object2.videoLandscape = {'width': '100%', 'position': 'relative'};
|
||||
object2.videoLandscape9by16 = {aspectRatio: 1.7777777777777777};
|
||||
object2.videoLandscapeFullscreen = {'flexGrow': 1, 'flexShrink': 1};
|
||||
const object8 = {'borderRadius': null, 'flexGrow': 0, 'flexShrink': 0, 'overflow': 'hidden'};
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.videoWrapper = object8;
|
||||
const object9 = {flexGrow: 1};
|
||||
object9.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
|
||||
object9.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
|
||||
object2.videoWrapperLandscape = object9;
|
||||
const object12 = {};
|
||||
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
|
||||
object2.videoWrapperFullscreen = object12;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.videoContentWrapper = {'flexDirection': 'column', 'pointerEvents': 'box-none', 'flexGrow': 1,
|
||||
'flexShrink': 0, 'justifyContent': 'space-between', padding: PX_16};
|
||||
object2.videoContentWrapperLandscape = {padding: 0};
|
||||
const object15 = {};
|
||||
copyDataProperties(object15, StyleSheet.absoluteFillObject, PX_16);
|
||||
object2.videoContentWrapperPortrait = object15;
|
||||
object2.rewardContainer = {'justifyContent': 'center', 'flex': 1};
|
||||
const object16 = {};
|
||||
copyDataProperties(object16, StyleSheet.absoluteFillObject, PX_16);
|
||||
object16['alignItems'] = value2;
|
||||
object16['justifyContent'] = value2;
|
||||
object2.rewardContentCentered = object16;
|
||||
BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object2.modalBackground = {backgroundColor: BACKGROUND_BASE_LOWEST};
|
||||
const object20 = {borderTopWidth: 1};
|
||||
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
|
||||
object20.borderColor = BACKGROUND_MOD_STRONG;
|
||||
const PX_162 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object20.paddingHorizontal = PX_162;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object20.paddingTop = PX_24;
|
||||
object2.questDetailsLandscape = object20;
|
||||
object2.questDetailsPrimary = {'flexGrow': 0, 'flexShrink': 1};
|
||||
object2.questDetailsSecondary = {'flexGrow': 0, 'flexShrink': 0};
|
||||
const object22 = {};
|
||||
const PX_163 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object22.paddingHorizontal = PX_163;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object22.paddingVertical = PX_8;
|
||||
object2.footer = object22;
|
||||
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object2.icon = {color: INTERACTIVE_TEXT_ACTIVE};
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object2.iconDisabled = {color: INTERACTIVE_TEXT_DEFAULT};
|
||||
const object24 = {position: 'absolute'};
|
||||
const PX_164 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object24.top = PX_164;
|
||||
const PX_165 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object24.left = PX_165;
|
||||
object2.closeButtonLandscape = object24;
|
||||
const object25 = {};
|
||||
copyDataProperties(object25, StyleSheet.absoluteFillObject, PX_16);
|
||||
object25['bottom'] = undefined;
|
||||
object25['height'] = 70;
|
||||
object2.gradientTop = object25;
|
||||
const object26 = {};
|
||||
copyDataProperties(object26, StyleSheet.absoluteFillObject, PX_16);
|
||||
object26['top'] = undefined;
|
||||
object26['height'] = 150;
|
||||
object2.gradientBottom = object26;
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object2.textShadow = {'margin': -15, 'padding': 15, 'textShadowColor': null, 'textShadowOffset': null,
|
||||
'textShadowRadius': 15, textShadowColor: BLACK, textShadowOffset: {'width': 0, 'height': 0}};
|
||||
const object27 = {'borderRadius': null, 'flexGrow': 1, 'flexShrink': 1};
|
||||
object27.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.ctaPrimary = object27;
|
||||
object2.viewRewardBtn = {marginRight: 'auto'};
|
||||
const object28 = {'borderRadius': null, 'height': 96, 'width': '100%'};
|
||||
object28.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.playerThumbnail = object28;
|
||||
object2.cloudsBackground = {zIndex: -1};
|
||||
object2.questDetailsSubheader = {opacity: 0.6};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun103354({quest, captionsEnabled, handleClose, handlePrimaryCtaPress, handleShareQuest, handleOpenTranscript, handleToggleCaptions, isFullscreen, onNavigateToPostWatchVideo, onEnd, setIsFullscreen, externallyPaused, sourceQuestContent, hasCaptionAsset, hasTranscriptAsset, isShareable}) { // fn#103354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:3442, offset: 0x02263fb7, size: 2692 bytes, params: 2, frame: 53
|
||||
var r8;
|
||||
var object7;
|
||||
var ReanimatedNativeView;
|
||||
var rewardContentCentered;
|
||||
var items8;
|
||||
var ReanimatedNativeView2;
|
||||
var object;
|
||||
var items9;
|
||||
var items10;
|
||||
var QuestGameLogotype;
|
||||
var moduleValue9;
|
||||
var items11;
|
||||
var Stack;
|
||||
var object2;
|
||||
var space;
|
||||
var Stack2;
|
||||
var object3;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var config;
|
||||
var messages;
|
||||
var items12;
|
||||
var items14;
|
||||
var Stack3;
|
||||
var object4;
|
||||
var items15;
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const env0_4 = undefined;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
const styles = useStyles(platformUtilsModule.isAndroid());
|
||||
let binding = env0_4;
|
||||
const value3 = binding.useMemo(_fun103355, [quest]);
|
||||
const userStatus = quest.userStatus;
|
||||
const value4 = userStatus?.completedAt != null;
|
||||
const VideoQuestPlayerRefactorExperiment = (require(9511) /* metro dependency 9511: experiments */).VideoQuestPlayerRefactorExperiment;
|
||||
const useConfig = VideoQuestPlayerRefactorExperiment.useConfig;
|
||||
const VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
|
||||
const VideoQuestPlayer = Reflect.apply(useConfig, VideoQuestPlayerRefactorExperiment,
|
||||
[{location: VIDEO_MODAL_MOBILE}]).enabled ? (require(13602) /* metro dependency 13602: VideoQuestPlayerRefactor */).VideoQuestPlayer : (require(13605) /* metro dependency 13605: VideoQuestPlayer */).VideoQuestPlayer;
|
||||
binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const windowDimensions = Reflect.apply(useContext, binding, [QuestDockGestureContext]).windowDimensions;
|
||||
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
binding.useEffect(_fun103356, [value5]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
let closure = F_103357;
|
||||
closure.__closure = {withDelay: reanimatedRexportModule.withDelay, LOGO_REWARD_TRANSITION_DELAY_MS: 3000,
|
||||
withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, isComponentMounted: value5,
|
||||
LOGO_REWARD_TRANSITION_DURATION_MS: 1000};
|
||||
closure.__workletHash = 12561024953493;
|
||||
closure.__initData = env0_18;
|
||||
const value6 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
let useAnimatedStyle = moduleValue4.useAnimatedStyle;
|
||||
closure = G_103358;
|
||||
closure.__closure = {animation: value6};
|
||||
closure.__workletHash = 17463485679217;
|
||||
closure.__initData = env0_19;
|
||||
const value7 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue5.useAnimatedStyle;
|
||||
closure = j_103359;
|
||||
closure.__closure = {animation: value6};
|
||||
closure.__workletHash = 9103187579788;
|
||||
closure.__initData = env0_20;
|
||||
const value8 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
const useAnimatedProps = moduleValue6.useAnimatedProps;
|
||||
closure = U_103360;
|
||||
closure.__closure = {animation: value6};
|
||||
closure.__workletHash = 11833431315705;
|
||||
closure.__initData = env0_21;
|
||||
const value9 = Reflect.apply(useAnimatedProps, moduleValue6, [closure]);
|
||||
const value10 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const value11 = binding.useCallback(function({orientation}) {
|
||||
setIsFullscreen((isFullscreen || orientation !== 'landscape' ? 'PORTRAIT' : 'LANDSCAPE') === 'LANDSCAPE');
|
||||
}, [isFullscreen, setIsFullscreen]);
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const items2 = [styles.videoWrapper];
|
||||
items2[1] = styles.videoWrapperLandscape;
|
||||
items2[2] = isFullscreen && styles.videoWrapperFullscreen;
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
const DARKER = ThemeTypes.DARKER;
|
||||
const value12 = !isFullscreen;
|
||||
const themeContextProvider = <ThemeContextProvider theme={DARKER}><VideoQuestPlayer captionsEnabled={captionsEnabled} orientation="landscape" style={[styles.videoLandscape,
|
||||
isFullscreen ? value12 : styles.videoLandscape9by16,
|
||||
isFullscreen && styles.videoLandscapeFullscreen]} contentInsets={env0_16} handleOpenTranscript={handleOpenTranscript} handleToggleCaptions={handleToggleCaptions} isFullscreen={isFullscreen} externallyPaused={externallyPaused} onEnd={onEnd} onToggleFullscreen={value11} sourceQuestContent={sourceQuestContent} hasCaptionAsset={hasCaptionAsset} hasTranscriptAsset={hasTranscriptAsset} />{((Component) => <Component onClose={handleClose} style={[styles.closeButtonLandscape,
|
||||
isFullscreen && value10 != null && ({left: value10.left})]} />)(importDefault(13618) /* metro dependency 13618: VideoQuestModalCloseButton */)}</ThemeContextProvider>;
|
||||
if (isFullscreen) {
|
||||
r8 = value12;
|
||||
} else {
|
||||
var viewProps = {style: [styles.videoContentWrapper, styles.videoContentWrapperLandscape]};
|
||||
var viewBinding2Props = {style: styles.rewardContainer};
|
||||
ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
rewardContentCentered = styles.rewardContentCentered;
|
||||
items8 = [<ReanimatedNativeView style={[rewardContentCentered,
|
||||
value7]} animatedProps={value9}>{((Component) => <Component />)(importDefault(13619) /* metro dependency 13619: VideoQuestModalReward */)}</ReanimatedNativeView>];
|
||||
ReanimatedNativeView2 = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
object = {};
|
||||
rewardContentCentered = styles.rewardContentCentered;
|
||||
items9 = [rewardContentCentered];
|
||||
items9[1] = platformUtilsModule.isAndroid() && styles.modalBackground;
|
||||
items9[2] = value8;
|
||||
object.style = items9;
|
||||
object.pointerEvents = 'none';
|
||||
items10 = [(require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && ((Component) => <Component align="top" style={styles.cloudsBackground} />)(importDefault(13598) /* metro dependency 13598: QuestModalContentCloudBackground */)];
|
||||
QuestGameLogotype = importDefault(13622) /* metro dependency 13622: QuestGameLogotype */;
|
||||
moduleValue9 = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
items10[1] = <QuestGameLogotype assetUrl={moduleValue9.getQuestAsset(quest,
|
||||
(require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType.LOGO_TYPE,
|
||||
'dark').url} maxHeight={90} maxWidth={windowDimensions.get().width - 120} />;
|
||||
items8[1] = <ReanimatedNativeView2 {...object}>{items10}</ReanimatedNativeView2>;
|
||||
items11 = [<View {...viewBinding2Props}>{items8}</View>];
|
||||
items11[1] = ((Component) => <Component align="top" style={styles.cloudsBackground} />)(importDefault(13598) /* metro dependency 13598: QuestModalContentCloudBackground */);
|
||||
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
object2 = {direction: 'vertical'};
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
object2.spacing = space.PX_24;
|
||||
object2.style = styles.questDetailsLandscape;
|
||||
Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
object3 = {'direction': 'horizontal', 'justify': 'space-between'};
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
object3.spacing = space.PX_8;
|
||||
var pressableOpacityProps = {style: styles.questDetailsPrimary, onPress: handlePrimaryCtaPress};
|
||||
config = quest.config;
|
||||
messages = config.messages;
|
||||
items12 = [<Text variant="heading-lg/semibold" color="mobile-text-heading-primary" accessibilityRole="header">{messages.gameTitle}</Text>];
|
||||
config = quest.config;
|
||||
messages = config.messages;
|
||||
items12[1] = <Text variant="heading-sm/semibold" color="text-subtle">{messages.gamePublisher}</Text>;
|
||||
items14 = [<Stack2 {...object3}><PressableOpacity {...pressableOpacityProps}>{items12}</PressableOpacity><View style={styles.questDetailsSecondary}>{((Component) => <Component quest={quest} location={QuestsExperimentLocations.VIDEO_MODAL_MOBILE} sourceQuestContent={sourceQuestContent} />)(importDefault(13623) /* metro dependency 13623: QuestContextMenu */)}</View></Stack2>];
|
||||
items14[1] = value3 != null && <PressableOpacity onPress={handlePrimaryCtaPress}>{((Component) => <Component source={{uri: value3.url}} style={styles.playerThumbnail} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</PressableOpacity>;
|
||||
Stack3 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
object4 = {direction: 'horizontal'};
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
object4.spacing = space.PX_16;
|
||||
items15 = [((ShinyButton) => <ShinyButton onPress={handlePrimaryCtaPress} style={styles.ctaPrimary} text={(require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest)} />)((require(1305) /* metro dependency 1305: native */).ShinyButton)];
|
||||
items15[1] = isShareable && <IconButton accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ej3B3Y)} icon={importDefault(9176) /* metro dependency 9176 */} onPress={handleShareQuest} variant="secondary" />;
|
||||
items15[2] = value4 && <IconButton accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cfY4PE)} icon={importDefault(11906) /* metro dependency 11906 */} onPress={onNavigateToPostWatchVideo} variant="secondary" />;
|
||||
items14[2] = <Stack3 {...object4}>{items15}</Stack3>;
|
||||
items11[2] = <Stack {...object2}>{items14}</Stack>;
|
||||
r8 = <View {...viewProps}>{items11}</View>;
|
||||
}
|
||||
return (
|
||||
<SafeAreaPaddingView bottom style={styles.wrapper}>
|
||||
<View style={items2}>
|
||||
{themeContextProvider}
|
||||
{r8}
|
||||
</View>
|
||||
</SafeAreaPaddingView>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun103362({quest, captionsEnabled, handleClose, handlePrimaryCtaPress, handleRewardDetailsPress, handleShareQuest, handleOpenTranscript, handleToggleCaptions, isFullscreen, onNavigateToPostWatchVideo, onEnd, externallyPaused, sourceQuestContent, hasCaptionAsset, hasTranscriptAsset, isShareable}) { // fn#103362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:7534, offset: 0x02264b82, size: 2385 bytes, params: 2, frame: 57
|
||||
var r16;
|
||||
var Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const env0_3 = undefined;
|
||||
var env0_4 = undefined;
|
||||
const value3 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const userStatus = quest.userStatus;
|
||||
const value4 = userStatus?.completedAt != null;
|
||||
const videoQuestProgressRemainingAccessibilityLabel = (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value3,
|
||||
value4);
|
||||
const VideoQuestPlayerRefactorExperiment = (require(9511) /* metro dependency 9511: experiments */).VideoQuestPlayerRefactorExperiment;
|
||||
const useConfig = VideoQuestPlayerRefactorExperiment.useConfig;
|
||||
let VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
|
||||
const VideoQuestPlayer = Reflect.apply(useConfig, VideoQuestPlayerRefactorExperiment,
|
||||
[{location: VIDEO_MODAL_MOBILE}]).enabled ? (require(13602) /* metro dependency 13602: VideoQuestPlayerRefactor */).VideoQuestPlayer : (require(13605) /* metro dependency 13605: VideoQuestPlayer */).VideoQuestPlayer;
|
||||
let binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const windowDimensions = Reflect.apply(useContext, binding, [QuestDockGestureContext]).windowDimensions;
|
||||
const value6 = binding.useMemo(function() {
|
||||
var Math = global.Math;
|
||||
return Math.floor(windowDimensions.get().width / 0.5625);
|
||||
}, [windowDimensions]);
|
||||
const value7 = binding.useCallback(function() {
|
||||
}, []);
|
||||
const value8 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
var [property, env0_4] = env0_3(binding.useState(64), 2);
|
||||
const value11 = binding.useCallback(_fun103365, []);
|
||||
const value12 = binding.useMemo(_fun103366, [value6, property, windowDimensions, value8]);
|
||||
const get = windowDimensions.get;
|
||||
const styles = useStyles(Reflect.apply(get, windowDimensions, []).height - value12 - property < 200);
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const items5 = [styles.wrapper];
|
||||
items5[1] = styles.wrapperPortrait;
|
||||
const items2 = [styles.videoWrapper];
|
||||
items2[1] = value12 == null ? {flexGrow: 1} : {height: value12};
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
const DARKER = ThemeTypes.DARKER;
|
||||
const items3 = [<ThemeContextProvider theme={DARKER}><VideoQuestPlayer captionsEnabled={captionsEnabled} onLoad={value7} externallyPaused={externallyPaused} orientation="portrait" contentInsets={env0_15} handleOpenTranscript={handleOpenTranscript} handleToggleCaptions={handleToggleCaptions} isFullscreen={isFullscreen} onEnd={onEnd} sourceQuestContent={sourceQuestContent} hasCaptionAsset={hasCaptionAsset} hasTranscriptAsset={hasTranscriptAsset} /></ThemeContextProvider>];
|
||||
const defaultImport = importDefault(4589) /* metro dependency 4589 */;
|
||||
binding = env0_11;
|
||||
const binding2 = env0_12;
|
||||
items3[1] = ((Component) => <Component start={binding} end={binding2} style={styles.gradientTop} colors={env0_13} />)(defaultImport);
|
||||
items3[2] = ((Component) => <Component start={binding} end={binding2} style={styles.gradientBottom} colors={env0_14} />)(defaultImport);
|
||||
const items4 = [styles.videoContentWrapper];
|
||||
items4[1] = styles.videoContentWrapperPortrait;
|
||||
const VideoQuestModalHeader = importDefault(13625) /* metro dependency 13625: VideoQuestModalHeader */;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
const videoQuestModalHeader = <VideoQuestModalHeader closeButtonIconColor={WHITE} onClose={handleClose} showCurrentVideoTime withTextShadow />;
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const stack = <Stack2 direction="horizontal" justify="space-between" spacing={PX_8}><PressableOpacity style={styles.questDetailsPrimary} onPress={handlePrimaryCtaPress}><Text variant="heading-lg/semibold" color="white" style={styles.textShadow} accessibilityRole="header">{quest.config.messages.gameTitle}</Text><Text variant="heading-sm/semibold" color="white" style={[styles.textShadow,
|
||||
styles.questDetailsSubheader]}>{quest.config.messages.gamePublisher}</Text></PressableOpacity><View style={styles.questDetailsSecondary}>{((Component) => <Component quest={quest} size="x-sm" progress={value3.percentComplete} hasConfetti onPress={handleRewardDetailsPress} accessibilityLabel={videoQuestProgressRemainingAccessibilityLabel} />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */)}</View></Stack2>;
|
||||
const ShinyButton = (require(1305) /* metro dependency 1305: native */).ShinyButton;
|
||||
items3[3] = <View style={items4}>{videoQuestModalHeader}<Stack direction="vertical" spacing={PX_24}>{stack}<ShinyButton onPress={handlePrimaryCtaPress} style={styles.ctaPrimary} text={(require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest)} /></Stack></View>;
|
||||
const view = <View style={items2}>{items3}</View>;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
if (value4) {
|
||||
var viewBindingProps = {style: styles.viewRewardBtn};
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
r16 = <View {...viewBindingProps}><Button icon={((ArrowSmallRightIcon) => <ArrowSmallRightIcon size="sm" />)((require(11905) /* metro dependency 11905: ArrowSmallRightIcon */).ArrowSmallRightIcon)} iconPosition="end" onPress={onNavigateToPostWatchVideo} variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['jyYgZ+'])} /></View>;
|
||||
} else {
|
||||
r16 = value4;
|
||||
}
|
||||
const r11 = hasTranscriptAsset && ((Component) => <Component accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.KCzjTi)} onPress={handleOpenTranscript}>{((TranscriptOutlineIcon) => <TranscriptOutlineIcon color={styles.iconDisabled.color} />)((require(13526) /* metro dependency 13526: TranscriptOutlineIcon */).TranscriptOutlineIcon)}</Component>)(env0_25);
|
||||
const r10 = hasCaptionAsset && ((Component) => <Component accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bDSZO1)} onPress={handleToggleCaptions}>{((ClosedCaptionsOutlineIcon) => <ClosedCaptionsOutlineIcon color={captionsEnabled ? styles.icon.color : styles.iconDisabled.color} />)((require(13524) /* metro dependency 13524: ClosedCaptionsOutlineIcon */).ClosedCaptionsOutlineIcon)}</Component>)(env0_25);
|
||||
const r9 = isShareable && ((Component) => <Component accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ej3B3Y)} onPress={handleShareQuest}>{((ShareIcon) => <ShareIcon color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT} />)((require(9798) /* metro dependency 9798: ShareIcon */).ShareIcon)}</Component>)(env0_25);
|
||||
const QuestContextMenu = importDefault(13623) /* metro dependency 13623: QuestContextMenu */;
|
||||
VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
|
||||
return (
|
||||
<SafeAreaPaddingView bottom style={items5}>
|
||||
{view}
|
||||
<Stack
|
||||
direction="horizontal"
|
||||
justify="flex-end"
|
||||
align="center"
|
||||
style={styles.footer}
|
||||
spacing={PX_4}
|
||||
onLayout={value11}
|
||||
>
|
||||
{r16}
|
||||
{r11}
|
||||
{r10}
|
||||
{r9}
|
||||
<QuestContextMenu
|
||||
quest={quest}
|
||||
location={VIDEO_MODAL_MOBILE}
|
||||
sourceQuestContent={sourceQuestContent}
|
||||
>
|
||||
{children_103367}
|
||||
</QuestContextMenu>
|
||||
</Stack>
|
||||
</SafeAreaPaddingView>
|
||||
);
|
||||
}
|
||||
|
||||
function FooterButton(a0, a1) { // fn#103368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:11267, offset: 0x0226563d, size: 93 bytes, params: 3, frame: 15
|
||||
const styles = useStyles();
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
return (
|
||||
<PressableOpacity
|
||||
accessibilityRole="button"
|
||||
style={styles.footerButton}
|
||||
{...a0}
|
||||
{...{['ref']: a1}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function VideoQuestModalContentInProgress({isFullscreen, onClose, onNavigateToPostWatchVideo, onEnd, setIsFullscreen, sourceQuestContent}) { // fn#103369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:11414, offset: 0x0226569a, size: 687 bytes, params: 2, frame: 35
|
||||
const videoQuestModalContextModule = require(13597) /* metro dependency 13597: VideoQuestModalContext */;
|
||||
const useVideoQuestModalContext = videoQuestModalContextModule.useVideoQuestModalContext;
|
||||
const quest = Reflect.apply(useVideoQuestModalContext, videoQuestModalContextModule, []).quest;
|
||||
const binding = env0_4;
|
||||
const value2 = binding.useMemo(_fun103370, [quest]);
|
||||
const value3 = binding.useMemo(_fun103371, [quest]);
|
||||
let useState = binding.useState;
|
||||
const value4 = Reflect.apply(useState, binding, [false]);
|
||||
const binding2 = env0_3;
|
||||
const value5 = binding2(value4, 2);
|
||||
const property = value5[0];
|
||||
const env0_2 = value5[1];
|
||||
const value6 = binding.useCallback(_fun103372, []);
|
||||
const value7 = binding.useCallback(_fun103374, [quest]);
|
||||
const value8 = (require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId();
|
||||
useState = binding.useState;
|
||||
const value9 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property2 = value9[0];
|
||||
var env0_4 = value9[1];
|
||||
const questUtilsModule = require(7114) /* metro dependency 7114: QuestUtils */;
|
||||
const isShareableQuest2 = questUtilsModule.isShareableQuest(quest.config);
|
||||
const value10 = binding.useCallback(_fun103375, [isShareableQuest2, quest.id, value8, sourceQuestContent]);
|
||||
const value11 = (require(13627) /* metro dependency 13627: useVideoQuestClickCtaAndMaybeCloseModal */).useVideoQuestClickCtaAndMaybeCloseModal({quest: quest,
|
||||
onClose: onClose, sourceQuestContent: sourceQuestContent, impressionId: value8});
|
||||
const value12 = binding.useCallback(_fun103378, [quest.id]);
|
||||
const value13 = (require(13628) /* metro dependency 13628: useVideoExternallyPaused */).useVideoExternallyPaused(quest.id,
|
||||
property2);
|
||||
const tasks = quest.config.taskConfigV2.tasks;
|
||||
const FirstPartyQuestTaskTypes = (require(6535) /* metro dependency 6535: FirstPartyQuestTaskTypes */).FirstPartyQuestTaskTypes;
|
||||
const WATCH_VIDEO_ON_MOBILE = FirstPartyQuestTaskTypes.WATCH_VIDEO_ON_MOBILE;
|
||||
const property3 = tasks[WATCH_VIDEO_ON_MOBILE];
|
||||
let r1 = property3 == null || (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoOrientation(property3) === 'portrait';
|
||||
r1 = r1 ? env0_23 : env0_22;
|
||||
return ((Component) => <Component quest={quest} captionsEnabled={property} handleClose={onClose} handlePrimaryCtaPress={value11} handleRewardDetailsPress={value12} handleShareQuest={value10} handleOpenTranscript={value7} handleToggleCaptions={value6} isFullscreen={isFullscreen} onNavigateToPostWatchVideo={onNavigateToPostWatchVideo} onEnd={onEnd} setIsFullscreen={setIsFullscreen} externallyPaused={value13} sourceQuestContent={sourceQuestContent} hasCaptionAsset={value2 != null} hasTranscriptAsset={value3 != null} isShareable={isShareableQuest2} />)(r1);
|
||||
}
|
||||
|
||||
function _fun103355() { // fn#103355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:3790, offset: 0x02264a3b, size: 67 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
const getQuestAsset = value.getQuestAsset;
|
||||
const questBinding = quest;
|
||||
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
|
||||
const HERO = QuestAssetType.HERO;
|
||||
return Reflect.apply(getQuestAsset, value, [questBinding, HERO]);
|
||||
}
|
||||
|
||||
function _fun103356() { // fn#103356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:4166, offset: 0x02264a7e, size: 24 bytes, params: 1, frame: 11
|
||||
env0_3.set(1);
|
||||
}
|
||||
|
||||
function F_103357() { // fn#103357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:4230, offset: 0x02264a96, size: 96 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withDelay = value.withDelay;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
return Reflect.apply(withDelay, value, [3000, timingModule.withTiming(env0_3.get(), {duration: 1000})]);
|
||||
}
|
||||
|
||||
function j_103359() { // fn#103359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:4697, offset: 0x02264af6, size: 31 bytes, params: 1, frame: 10
|
||||
const object2 = {};
|
||||
object2.opacity = 1 - env0_4.get();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function U_103360() { // fn#103360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:4829, offset: 0x02264b15, size: 50 bytes, params: 1, frame: 10
|
||||
let value = env0_4.get();
|
||||
value = 'none';
|
||||
return {pointerEvents: value > 0.3 ? 'auto' : value};
|
||||
}
|
||||
|
||||
function _fun103365({nativeEvent}) { // fn#103365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:8375, offset: 0x0226550b, size: 36 bytes, params: 2, frame: 11
|
||||
env0_4(nativeEvent.layout.height);
|
||||
}
|
||||
|
||||
function _fun103366() { // fn#103366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:8429, offset: 0x0226552f, size: 80 bytes, params: 1, frame: 14
|
||||
const Math = global.Math;
|
||||
const min = Math.min;
|
||||
const windowDimensionsBinding = windowDimensions;
|
||||
const get = windowDimensionsBinding.get;
|
||||
return Reflect.apply(min, Math, [Reflect.apply(get, windowDimensionsBinding,
|
||||
[]).height - env0_2.top - env0_2.bottom - env0_3, env0_1]);
|
||||
}
|
||||
|
||||
function children_103367(a0) { // fn#103367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:10980, offset: 0x0226557f, size: 190 bytes, params: 2, frame: 22
|
||||
const ref = a0.ref;
|
||||
const value = Object.create(null);
|
||||
value.ref = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const binding = env1_25;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const PdRCRg = (require(1244) /* metro dependency 1244: indexNative */).t.PdRCRg;
|
||||
object2.accessibilityLabel = Reflect.apply(string, intl, [PdRCRg]);
|
||||
object2.ref = ref;
|
||||
copyDataProperties(object2, value2, value);
|
||||
const MoreHorizontalIcon = (require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon;
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
return ((Component) => <Component {...object2}><MoreHorizontalIcon color={TEXT_DEFAULT} /></Component>)(binding);
|
||||
}
|
||||
|
||||
function _fun103370() { // fn#103370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:11634, offset: 0x02265949, size: 75 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
const getQuestAsset = value.getQuestAsset;
|
||||
const questBinding = quest;
|
||||
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
|
||||
const VIDEO_PLAYER_CAPTION = QuestAssetType.VIDEO_PLAYER_CAPTION;
|
||||
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_CAPTION, undefined, true]);
|
||||
}
|
||||
|
||||
function _fun103371() { // fn#103371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:11738, offset: 0x02265994, size: 75 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
const getQuestAsset = value.getQuestAsset;
|
||||
const questBinding = quest;
|
||||
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
|
||||
const VIDEO_PLAYER_TRANSCRIPT = QuestAssetType.VIDEO_PLAYER_TRANSCRIPT;
|
||||
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_TRANSCRIPT, undefined, true]);
|
||||
}
|
||||
|
||||
function _fun103372() { // fn#103372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:11889, offset: 0x022659df, size: 25 bytes, params: 1, frame: 11
|
||||
return env0_2(function(a0) {
|
||||
return !a0;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun103374() { // fn#103374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:11926, offset: 0x022659f8, size: 117 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[48]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[50]);
|
||||
value = value(dependencyMap[49], dependencyMap.paths);
|
||||
const questBinding = quest;
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'transcript-' + questBinding.id, {quest: questBinding}]);
|
||||
}
|
||||
|
||||
function _fun103375() { // fn#103375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:12141, offset: 0x02265a6d, size: 516 bytes, params: 1, frame: 22
|
||||
var environment;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var object2;
|
||||
var questBinding;
|
||||
var id;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
var moduleValue3;
|
||||
var captureAdUserAction;
|
||||
var moduleValue4;
|
||||
var showShareActionSheet;
|
||||
var moduleValue5;
|
||||
var getQuestUrl;
|
||||
if (env0_5) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
||||
if (moduleValue.shouldMigrateToAdAnalyticsInterface((require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */).AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL,
|
||||
|
||||
'video_quest_modal_in_progress')) {
|
||||
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
|
||||
captureAdUserAction = moduleValue3.captureAdUserAction;
|
||||
object2 = {};
|
||||
object2.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
|
||||
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
||||
object2.adCreativeId = quest.id;
|
||||
object2.questContentCTA = QuestContentCTA.MOBILE_SHARESHEET;
|
||||
object2.surfaceId = QuestContent.VIDEO_MODAL_MOBILE;
|
||||
object2.sourceQuestContent = sourceQuestContent;
|
||||
object2.impressionId = env0_3;
|
||||
Reflect.apply(captureAdUserAction, moduleValue3, [object2]);
|
||||
} else {
|
||||
(require(7110) /* metro dependency 7110: AnalyticsActions */).trackQuestContentClicked({questId: quest.id,
|
||||
questContent: QuestContent.VIDEO_MODAL_MOBILE, questContentCTA: QuestContentCTA.MOBILE_SHARESHEET,
|
||||
impressionId: env0_3, sourceQuestContent: sourceQuestContent});
|
||||
}
|
||||
env0_4(true);
|
||||
moduleValue4 = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
|
||||
showShareActionSheet = moduleValue4.showShareActionSheet;
|
||||
object2 = {};
|
||||
moduleValue5 = require(9505) /* metro dependency 9505: QuestCopyUtils */;
|
||||
getQuestUrl = moduleValue5.getQuestUrl;
|
||||
questBinding = quest;
|
||||
id = questBinding.id;
|
||||
object2.message = Reflect.apply(getQuestUrl, moduleValue5, [id]);
|
||||
id = questBinding.id;
|
||||
Reflect.apply(showShareActionSheet, moduleValue4, [object2, 'Video Quest Modal - ' + id, undefined, _fun103376,
|
||||
_fun103377]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103378() { // fn#103378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13791:13063, offset: 0x02265c71, size: 57 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(require(9480) /* metro dependency 9480: QuestUtilsNative */).openRewardDetailsBottomSheet({questId: quest.id});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* Metro module 13597; source: modules/quests/native/VideoQuestModal/VideoQuestModalContext.tsx; dependencies: [31, 44, 2] */
|
||||
function _fun103345(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13787:6, offset: 0x02263366, size: 152 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
value = value.createContext({'quest': null, 'videoSessionId': ''});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalContext.tsx');
|
||||
exports.default = value;
|
||||
exports.useVideoQuestModalContext = useVideoQuestModalContext;
|
||||
}
|
||||
|
||||
function useVideoQuestModalContext() { // fn#103346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13787:302, offset: 0x022633fe, size: 64 bytes, params: 1, frame: 14
|
||||
const value2 = env0_2.useContext(env0_3);
|
||||
(importDefault(44) /* metro dependency 44 */)(value2 != null,
|
||||
'useVideoQuestModalContext must be used within a VideoQuestModalProvider');
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/* Metro module 13625; source: modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx; dependencies: [31, 27, 7095, 33, 4501, 697, 13597, 9483, 7116, 3769, 9522, 4573, 1244, 13618, 2] */
|
||||
function _fun104063(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:6, offset: 0x02282e41, size: 365 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(7095) /* metro dependency 7095: VideoQuestUIStore */).useVideoQuestUIStore;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {videoContentHeaderWrapper: {'flexDirection': 'row', 'justifyContent': 'space-between',
|
||||
'alignItems': 'flex-start'}};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.videoContentHeading = {'flexDirection': 'column', 'flexShrink': 1, gap: PX_4};
|
||||
object2.subheader = {opacity: 0.6};
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object2.textShadow = {'margin': -15, 'padding': 15, 'textShadowColor': null, 'textShadowOffset': null,
|
||||
'textShadowRadius': 15, textShadowColor: BLACK, textShadowOffset: {'width': 0, 'height': 0}};
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx');
|
||||
exports.default = VideoQuestModalHeader;
|
||||
}
|
||||
|
||||
function VideoQuestModalHeader({closeButtonIconColor, onClose, style, showCurrentVideoTime, withTextShadow}) { // fn#104064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:544, offset: 0x02282fae, size: 625 bytes, params: 2, frame: 35
|
||||
const r14 = showCurrentVideoTime !== undefined && showCurrentVideoTime;
|
||||
let r17 = withTextShadow !== undefined && withTextShadow;
|
||||
const styles = useStyles();
|
||||
const videoQuestModalContextModule = require(13597) /* metro dependency 13597: VideoQuestModalContext */;
|
||||
const useVideoQuestModalContext = videoQuestModalContextModule.useVideoQuestModalContext;
|
||||
const quest = Reflect.apply(useVideoQuestModalContext, videoQuestModalContextModule, []).quest;
|
||||
const value5 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const value6 = useVideoQuestUIStore(_fun104065, (require(3769) /* metro dependency 3769 */).shallow);
|
||||
const userStatus = quest.userStatus;
|
||||
const value7 = userStatus?.completedAt != null;
|
||||
const r12 = value7 ? r14 ? (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value5,
|
||||
value7) : undefined : (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value5,
|
||||
value7);
|
||||
const items2 = [styles.videoContentHeaderWrapper, style];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const r7 = r17 && styles.textShadow;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const EQa7os = (require(1244) /* metro dependency 1244: indexNative */).t.EQa7os;
|
||||
const text = <Text variant="heading-md/semibold" color="white" style={r7}>{Reflect.apply(formatToPlainString, intl,
|
||||
[EQa7os, {questName: quest.config.messages.questName}])}</Text>;
|
||||
r17 = r17 && styles.textShadow;
|
||||
return (
|
||||
<View style={items2}>
|
||||
<View style={styles.videoContentHeading}>
|
||||
{text}
|
||||
<Text
|
||||
variant="heading-sm/semibold"
|
||||
color="white"
|
||||
accessibilityLabel={r12}
|
||||
style={[styles.subheader, r17]}
|
||||
>
|
||||
{value7 ? r14 ? value6 : quest.config.messages.gamePublisher : value6}
|
||||
</Text>
|
||||
</View>
|
||||
{((Component) => <Component iconColor={closeButtonIconColor} onClose={onClose} />)(importDefault(13618) /* metro dependency 13618: VideoQuestModalCloseButton */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104065({videoProgress}) { // fn#104065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:795, offset: 0x0228321f, size: 166 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
var object2;
|
||||
var progressSeconds;
|
||||
const property = videoProgress[quest.id];
|
||||
if (property != null) {
|
||||
r0 = property;
|
||||
} else {
|
||||
object2 = {};
|
||||
progressSeconds = env0_1.progressSeconds;
|
||||
object2.timestampSec = progressSeconds;
|
||||
object2.duration = env0_1.targetSeconds;
|
||||
progressSeconds = env0_1.progressSeconds;
|
||||
object2.maxTimestampSec = progressSeconds;
|
||||
r0 = object2;
|
||||
}
|
||||
let value = environment.__proto__;
|
||||
value = Reflect.apply((require(7116) /* metro dependency 7116: QuestTaskUtils */).parseMinutesAndSecondsFromSeconds,
|
||||
value, [r0.duration - r0.timestampSec]);
|
||||
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
||||
return questTaskUtilsModule.formatWatchTaskTime(value.minutes, value.seconds);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/* Metro module 13619; source: modules/quests/native/VideoQuestModal/VideoQuestModalReward.tsx; dependencies: [31, 33, 4501, 13597, 9483, 9480, 4572, 697, 13620, 4573, 1244, 2] */
|
||||
function _fun104020(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:6, offset: 0x0227bb82, size: 204 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value2.jsx;
|
||||
const env0_5 = value2.jsxs;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({questName: {textAlign: 'center'}});
|
||||
value = value.memo(VideoQuestModalReward);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalReward.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function VideoQuestModalReward({style, withQuestName, withRewardAvailableCopy, size, withRewardTileAnimation}) { // fn#104021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:204, offset: 0x0227bc4e, size: 651 bytes, params: 2, frame: 32
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var object;
|
||||
var questName;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
var EAYZAr;
|
||||
let r10 = withQuestName === undefined || withQuestName;
|
||||
let r8 = withRewardAvailableCopy === undefined || withRewardAvailableCopy;
|
||||
const r21 = size === undefined ? 'lg' : size;
|
||||
const videoQuestModalContextModule = require(13597) /* metro dependency 13597: VideoQuestModalContext */;
|
||||
const useVideoQuestModalContext = videoQuestModalContextModule.useVideoQuestModalContext;
|
||||
const quest = Reflect.apply(useVideoQuestModalContext, videoQuestModalContextModule, []).quest;
|
||||
const value2 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const value3 = env0_3.useCallback(_fun104022, [quest.id]);
|
||||
const styles = useStyles();
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
const value4 = ((Component) => <Component hasConfetti quest={quest} size={r21} progress={value2.percentComplete} onPress={value3} withAnimation={withRewardTileAnimation} />)(importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */);
|
||||
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
if (r10) {
|
||||
object = {'variant': 'heading-lg/semibold', 'color': 'text-strong'};
|
||||
questName = styles.questName;
|
||||
object.style = questName;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
EAYZAr = (require(1244) /* metro dependency 1244: indexNative */).t.EAYZAr;
|
||||
questName = quest.config.messages.questName;
|
||||
r10 = <Text {...object}>{Reflect.apply(formatToPlainString, intl, [EAYZAr, {questName: questName}])}</Text>;
|
||||
}
|
||||
r8 = r8 && <Text variant="heading-sm/medium" color="text-subtle">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1Wvve2'])}</Text>;
|
||||
return (
|
||||
<Stack
|
||||
justify="center"
|
||||
align="center"
|
||||
spacing={PX_24}
|
||||
style={style}
|
||||
>
|
||||
{value4}
|
||||
<Stack2 align="center" spacing={PX_4}>
|
||||
{r10}
|
||||
{r8}
|
||||
</Stack2>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104022() { // fn#104022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13816:481, offset: 0x0227bed9, size: 57 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(require(9480) /* metro dependency 9480: QuestUtilsNative */).openRewardDetailsBottomSheet({questId: quest.id});
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,48 @@
|
||||
/* Metro module 13528; source: modules/quests/native/VideoQuestModal/VideoQuestPlayerControlButton.tsx; dependencies: [31, 33, 4501, 697, 674, 5278, 4564, 2] */
|
||||
function _fun102846(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13718:6, offset: 0x0224b179, size: 330 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.disabled = {opacity: 0.5};
|
||||
const object5 = {};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object5.overflow = 'hidden';
|
||||
object2.container = object5;
|
||||
const object6 = {};
|
||||
const value3 = importDefault(674) /* metro dependency 674 */;
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
|
||||
object6.backgroundColor = value3(BLACK).alpha(0.5).hex();
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object6.padding = PX_12;
|
||||
object2.blur = object6;
|
||||
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(_fun102847);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestPlayerControlButton.tsx');
|
||||
exports.VideoQuestPlayerControlButton = value;
|
||||
}
|
||||
|
||||
function _fun102847(a0) { // fn#102847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13718:348, offset: 0x0224b2c3, size: 210 bytes, params: 2, frame: 22
|
||||
const style = a0.style;
|
||||
const children = a0.children;
|
||||
let value = Object.create(null);
|
||||
value.style = 0;
|
||||
value.children = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const styles = useStyles();
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const pressableOpacityProps = {style: [styles.container, value2.disabled && styles.disabled, style], ...value2};
|
||||
value = importDefault(4564) /* metro dependency 4564: VisualEffectView */;
|
||||
value = ((Component) => <Component style={styles.blur} blurAmount={0.2} blurStyle="default" blurTheme="dark">{children}</Component>)(value);
|
||||
return (
|
||||
<PressableOpacity {...pressableOpacityProps}>
|
||||
{value}
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,466 @@
|
||||
/* Metro module 13602; source: modules/quests/native/VideoQuestModal/VideoQuestPlayerRefactor.tsx; dependencies: [57, 31, 7095, 6528, 33, 13597, 9483, 9495, 3769, 13523, 13603, 7116, 9564, 13606, 1582, 9522, 9484, 13614, 2] */
|
||||
function _fun103379(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:6, offset: 0x02265caa, size: 230 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const videoQuestUIStore = importDefault(7095) /* metro dependency 7095: VideoQuestUIStore */;
|
||||
const env0_6 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestsExperimentLocations;
|
||||
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = value.memo(_fun103380);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestPlayerRefactor.tsx');
|
||||
const PlayerState = (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlayerState;
|
||||
exports.PlayerState = PlayerState;
|
||||
exports.VideoQuestPlayer = value;
|
||||
}
|
||||
|
||||
function _fun103380({style, onLoad, onEnd, onToggleFullscreen, orientation, contentInsets, handleToggleCaptions, handleOpenTranscript, isFullscreen, externallyPaused, captionsEnabled, sourceQuestContent, hasCaptionAsset, hasTranscriptAsset}) { // fn#103380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:186, offset: 0x02265d90, size: 1883 bytes, params: 2, frame: 57
|
||||
const env0_3 = orientation;
|
||||
const env0_4 = contentInsets;
|
||||
captionsEnabled = !(captionsEnabled === undefined) && captionsEnabled;
|
||||
hasCaptionAsset = hasCaptionAsset === undefined || hasCaptionAsset;
|
||||
hasTranscriptAsset = hasTranscriptAsset === undefined || hasTranscriptAsset;
|
||||
const {quest,
|
||||
videoSessionId} = (require(13597) /* metro dependency 13597: VideoQuestModalContext */).useVideoQuestModalContext();
|
||||
const value7 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const userStatus = quest.userStatus;
|
||||
const value8 = userStatus?.completedAt != null;
|
||||
let binding = env0_4;
|
||||
const value9 = binding.useMemo(_fun103381, [quest]);
|
||||
const value10 = binding.useMemo(_fun103382, [quest]);
|
||||
const r17 = value10?.url != null ? (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType.VIDEO_PLAYER_VIDEO_HLS : (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType.VIDEO_PLAYER_VIDEO;
|
||||
binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
let targetSeconds = value7.targetSeconds;
|
||||
const value11 = Reflect.apply(useState, binding, [targetSeconds]);
|
||||
const binding2 = env0_3;
|
||||
const value12 = binding2(value11, 2);
|
||||
const property = value12[0];
|
||||
const env0_11 = value12[1];
|
||||
targetSeconds = value7.targetSeconds;
|
||||
const value13 = VideoQuestUIStore(function(a0) {
|
||||
return a0.setVideoProgress;
|
||||
});
|
||||
const value14 = VideoQuestUIStore(_fun103384, (require(3769) /* metro dependency 3769 */).shallow);
|
||||
const value15 = binding.useRef(null);
|
||||
useState = binding.useState;
|
||||
const PlayerState = (require(13523) /* metro dependency 13523: AdVideoPlayer */).PlayerState;
|
||||
const LOADING = PlayerState.LOADING;
|
||||
const value16 = binding2(Reflect.apply(useState, binding, [LOADING]), 2);
|
||||
const property2 = value16[0];
|
||||
const env0_15 = value16[1];
|
||||
const env0_16 = binding.useRef(value7.progressSeconds);
|
||||
const defaultImport = importDefault(13603) /* metro dependency 13603: useVideoQuestPlayerAnalytics */;
|
||||
let id = quest.id;
|
||||
const {handleBufferAnalytics, handleEndAnalytics, handleErrorAnalytics, handleLoadAnalytics,
|
||||
handleLoadStartAnalytics, handlePausePlaybackAnalytics, handleProgressAnalytics, handleReadyForDisplayAnalytics,
|
||||
handleResumePlaybackAnalytics, handleSeekAnalytics} = defaultImport({duration: property,
|
||||
isQuestCompleted: value8, playerState: property2, questId: id, videoSessionId: videoSessionId,
|
||||
videoAssetId: r17, sourceQuestContent: sourceQuestContent});
|
||||
const env0_27 = binding.useRef(null);
|
||||
id = quest.id;
|
||||
const gameTitle = quest.config.messages.gameTitle;
|
||||
const r45 = value10?.url ?? value9?.url;
|
||||
const defaultWatchVideoTask = (require(7116) /* metro dependency 7116: QuestTaskUtils */).getDefaultWatchVideoTask(quest.config);
|
||||
const videoTitle = defaultWatchVideoTask == null ? undefined : defaultWatchVideoTask.messages.videoTitle;
|
||||
const r18 = value10?.url != null ? 'hls' : 'mp4';
|
||||
const value21 = (require(9564) /* metro dependency 9564: AndroidRNVHttpEngineExperiment */).useRnvHttpEngine();
|
||||
binding = env0_4;
|
||||
binding.useEffect(_fun103385, [id, gameTitle, targetSeconds, r45, videoTitle, r18]);
|
||||
const value22 = binding.useCallback(_fun103387, []);
|
||||
const value23 = binding.useCallback(_fun103388, [handleReadyForDisplayAnalytics]);
|
||||
const value24 = binding.useCallback(_fun103389, [handleLoadAnalytics, onLoad]);
|
||||
const value25 = binding.useCallback(_fun103390, [property, handleSeekAnalytics, quest.id, value13]);
|
||||
const env0_33 = binding.useRef(0);
|
||||
const env0_34 = binding.useRef(0);
|
||||
const value26 = binding.useCallback(_fun103391, [quest, value7.taskType, handleProgressAnalytics, value13]);
|
||||
const value27 = binding.useCallback(_fun103392, [property, quest, handleEndAnalytics, onEnd]);
|
||||
const value28 = binding.useCallback(_fun103393, [handleLoadStartAnalytics]);
|
||||
const value29 = binding.useCallback(_fun103394, [handleErrorAnalytics]);
|
||||
const value30 = binding.useCallback(_fun103395, []);
|
||||
const value31 = binding.useCallback(_fun103396, []);
|
||||
const value32 = binding.useCallback(_fun103397, [handleResumePlaybackAnalytics]);
|
||||
const value33 = binding.useCallback(_fun103398, [handlePausePlaybackAnalytics]);
|
||||
const value34 = binding.useCallback(_fun103399, [handleBufferAnalytics]);
|
||||
const value35 = binding.useCallback(_fun103400, [quest, captionsEnabled, contentInsets]);
|
||||
const value36 = binding.useMemo(_fun103401, [value10, value9]);
|
||||
const value37 = binding.useCallback(function() {
|
||||
if (onToggleFullscreen != null) {
|
||||
onToggleFullscreen({orientation: orientation});
|
||||
}
|
||||
}, [onToggleFullscreen, orientation]);
|
||||
if (value36 == null) {
|
||||
return null;
|
||||
}
|
||||
const value38 = orientation === 'landscape';
|
||||
const AdVideoPlayer = (require(13523) /* metro dependency 13523: AdVideoPlayer */).AdVideoPlayer;
|
||||
return (
|
||||
<AdVideoPlayer
|
||||
source={value36}
|
||||
httpEngine={value21}
|
||||
initialProgress={value14}
|
||||
contentDuration={targetSeconds}
|
||||
allowUnrestrictedSeeking={value8}
|
||||
disableResumeOnLoad={value8}
|
||||
style={style}
|
||||
isFullscreen={isFullscreen}
|
||||
externallyPaused={externallyPaused}
|
||||
contentInsets={contentInsets}
|
||||
renderCaptions={value35}
|
||||
onLoadStart={value28}
|
||||
onLoad={value24}
|
||||
onReadyForDisplay={value23}
|
||||
onSeek={value25}
|
||||
onBuffer={value34}
|
||||
onError={value29}
|
||||
onEnd={value27}
|
||||
onPlayerStateChange={value22}
|
||||
onResumePlayback={value32}
|
||||
onPausePlayback={value33}
|
||||
onProgress={value26}
|
||||
onVideoTracks={value30}
|
||||
onVideoLayout={value31}
|
||||
videoRef={value15}
|
||||
bufferingSpinnerPlacement={value38 ? 'center' : 'top-left'}
|
||||
captionsEnabled={captionsEnabled}
|
||||
showCaptionsButton={value38 && hasCaptionAsset}
|
||||
showTranscriptButton={value38 && hasTranscriptAsset}
|
||||
showFullscreenButton={value38}
|
||||
showProgress={value38}
|
||||
onToggleCaptions={handleToggleCaptions}
|
||||
onOpenTranscript={handleOpenTranscript}
|
||||
onToggleFullscreen={value37}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun103381() { // fn#103381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:616, offset: 0x022664eb, size: 75 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
const getQuestAsset = value.getQuestAsset;
|
||||
const questBinding = quest;
|
||||
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
|
||||
const VIDEO_PLAYER_VIDEO = QuestAssetType.VIDEO_PLAYER_VIDEO;
|
||||
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_VIDEO, undefined, true]);
|
||||
}
|
||||
|
||||
function _fun103382() { // fn#103382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:716, offset: 0x02266536, size: 75 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(9495) /* metro dependency 9495: AssetUtils */;
|
||||
const getQuestAsset = value.getQuestAsset;
|
||||
const questBinding = quest;
|
||||
const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType;
|
||||
const VIDEO_PLAYER_VIDEO_HLS = QuestAssetType.VIDEO_PLAYER_VIDEO_HLS;
|
||||
return Reflect.apply(getQuestAsset, value, [questBinding, VIDEO_PLAYER_VIDEO_HLS, undefined, true]);
|
||||
}
|
||||
|
||||
function _fun103384({videoProgress}) { // fn#103384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:1031, offset: 0x0226658c, size: 76 bytes, params: 2, frame: 4
|
||||
var r0;
|
||||
var object2;
|
||||
var progressSeconds;
|
||||
const property = videoProgress[quest.id];
|
||||
if (property != null) {
|
||||
r0 = property;
|
||||
} else {
|
||||
object2 = {};
|
||||
progressSeconds = env0_7.progressSeconds;
|
||||
object2.timestampSec = progressSeconds;
|
||||
object2.duration = env0_10;
|
||||
progressSeconds = env0_7.progressSeconds;
|
||||
object2.maxTimestampSec = progressSeconds;
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun103385() { // fn#103385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:1993, offset: 0x022665d8, size: 336 bytes, params: 1, frame: 17
|
||||
var constants;
|
||||
var binding;
|
||||
var MobileMuxWrapper;
|
||||
var value4;
|
||||
var mobileMuxWrapper;
|
||||
if (env0_30 != null) {
|
||||
if (env0_30.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
var current = env0_14.current;
|
||||
if (current == null) {
|
||||
return undefined;
|
||||
}
|
||||
var moduleValue = require(13606) /* metro dependency 13606: videoQoe */;
|
||||
var getVideoQoEMetricsConfig = moduleValue.getVideoQoEMetricsConfig;
|
||||
var object2 = {};
|
||||
var VIDEO_MODAL_MOBILE = QuestsExperimentLocations.VIDEO_MODAL_MOBILE;
|
||||
object2.location = VIDEO_MODAL_MOBILE;
|
||||
if (Reflect.apply(getVideoQoEMetricsConfig, moduleValue, [object2]).externalAnalyticsEnabled) {
|
||||
constants = (require(1582) /* metro dependency 1582: ClientInfoUtils */).getConstants();
|
||||
object2 = {};
|
||||
current = env0_14.current;
|
||||
object2.videoRef = current;
|
||||
object2.feature = 'quests';
|
||||
object2.appVersion = constants.Version;
|
||||
object2.releaseChannel = constants.ReleaseChannel;
|
||||
object2.contentMetadata = {contentId: env0_30, videoStreamType: env0_32, contentType: 'quests',
|
||||
durationMs: 1000 * targetSeconds, title: videoTitle, questId: id, gameName: gameTitle};
|
||||
binding = env0_27;
|
||||
MobileMuxWrapper = (require(13606) /* metro dependency 13606: videoQoe */).MobileMuxWrapper;
|
||||
value4 = Object.create(MobileMuxWrapper.prototype, {constructor: {value: MobileMuxWrapper}});
|
||||
mobileMuxWrapper = new MobileMuxWrapper(object2);
|
||||
binding.current = mobileMuxWrapper instanceof Object ? mobileMuxWrapper : value4;
|
||||
current = env0_27.current;
|
||||
current.initialize();
|
||||
return _fun103386;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103387(a0) { // fn#103387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2596, offset: 0x02266778, size: 19 bytes, params: 2, frame: 11
|
||||
env0_15(a0);
|
||||
}
|
||||
|
||||
function _fun103388() { // fn#103388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2629, offset: 0x0226678b, size: 40 bytes, params: 1, frame: 10
|
||||
handleReadyForDisplayAnalytics();
|
||||
const current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.onReadyForDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103389(a0) { // fn#103389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2715, offset: 0x022667b3, size: 199 bytes, params: 2, frame: 19
|
||||
const duration = a0.duration;
|
||||
const videoTracks = a0.videoTracks;
|
||||
const trackId = a0.trackId;
|
||||
const naturalSize = a0.naturalSize;
|
||||
env0_11(duration);
|
||||
handleLoadAnalytics();
|
||||
let current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.onLoad(duration);
|
||||
}
|
||||
if (naturalSize != null) {
|
||||
current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.updateVideoSourceDimensions(naturalSize.width, naturalSize.height);
|
||||
}
|
||||
}
|
||||
if (videoTracks != null && videoTracks.length > 0 && trackId != null && trackId.length > 0) {
|
||||
current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.onVideoTrackChange(trackId, videoTracks);
|
||||
}
|
||||
}
|
||||
if (onLoad != null) {
|
||||
onLoad(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103390(a0) { // fn#103390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3045, offset: 0x0226687a, size: 131 bytes, params: 2, frame: 17
|
||||
env0_16.current = a0.currentTime;
|
||||
if (env0_10 > 0) {
|
||||
env0_13(quest.id, a0.currentTime, env0_10);
|
||||
}
|
||||
handleSeekAnalytics();
|
||||
let current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.updatePlayheadTime(a0.currentTime);
|
||||
}
|
||||
current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.onSeek();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103391(a0) { // fn#103391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3271, offset: 0x022668fd, size: 345 bytes, params: 2, frame: 17
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var sendVideoProgress;
|
||||
var questBinding;
|
||||
var handleProgressAnalyticsBinding;
|
||||
var progress;
|
||||
var seekableDuration;
|
||||
var value5;
|
||||
var moduleValue2;
|
||||
var updateOptimisticProgress;
|
||||
var id;
|
||||
var taskType;
|
||||
let binding = env0_16;
|
||||
let currentTime = a0.currentTime;
|
||||
binding.current = currentTime;
|
||||
currentTime = a0.currentTime;
|
||||
let current = env0_33.current;
|
||||
if (currentTime >= current) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(9522) /* metro dependency 9522: VideoQuestUtils */;
|
||||
sendVideoProgress = moduleValue.sendVideoProgress;
|
||||
questBinding = quest;
|
||||
currentTime = a0.currentTime;
|
||||
Reflect.apply(sendVideoProgress, moduleValue, [questBinding, currentTime]);
|
||||
handleProgressAnalyticsBinding = handleProgressAnalytics;
|
||||
progress = a0.progress;
|
||||
seekableDuration = a0.seekableDuration;
|
||||
currentTime = a0.currentTime;
|
||||
handleProgressAnalyticsBinding(progress, seekableDuration, currentTime);
|
||||
binding = env0_33;
|
||||
currentTime = a0.currentTime;
|
||||
binding.current = currentTime + 6 + 2 * global.Math.random();
|
||||
}
|
||||
currentTime = a0.currentTime;
|
||||
if (currentTime >= env0_34.current) {
|
||||
value5 = environment.__proto__;
|
||||
moduleValue2 = require(9484) /* metro dependency 9484: QuestActionCreators */;
|
||||
updateOptimisticProgress = moduleValue2.updateOptimisticProgress;
|
||||
id = quest.id;
|
||||
taskType = env0_7.taskType;
|
||||
currentTime = a0.currentTime;
|
||||
Reflect.apply(updateOptimisticProgress, moduleValue2, [id, taskType, currentTime]);
|
||||
binding = env0_34;
|
||||
currentTime = a0.currentTime;
|
||||
binding.current = currentTime + 1;
|
||||
}
|
||||
env0_13(quest.id, a0.currentTime, a0.seekableDuration);
|
||||
current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.onProgress(a0.currentTime);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103392() { // fn#103392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3722, offset: 0x02266a56, size: 127 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(9522) /* metro dependency 9522: VideoQuestUtils */;
|
||||
value.sendVideoProgress(quest, env0_10);
|
||||
handleEndAnalytics();
|
||||
let current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.onProgress(env0_10);
|
||||
}
|
||||
current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.onEnd();
|
||||
}
|
||||
if (onEnd != null) {
|
||||
onEnd();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103393() { // fn#103393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:3885, offset: 0x02266ad5, size: 63 bytes, params: 1, frame: 12
|
||||
handleLoadStartAnalytics();
|
||||
let current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.onLoadStart();
|
||||
}
|
||||
current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.onPlay();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103394(a0) { // fn#103394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4000, offset: 0x02266b14, size: 45 bytes, params: 2, frame: 12
|
||||
handleErrorAnalytics(a0);
|
||||
const current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.onError(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103395({videoTracks, selectedVideoTrackId}) { // fn#103395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4075, offset: 0x02266b41, size: 91 bytes, params: 2, frame: 15
|
||||
var current;
|
||||
if (videoTracks != null && videoTracks.length > 0 && selectedVideoTrackId != null && selectedVideoTrackId.length > 0) {
|
||||
current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.onVideoTrackChange(selectedVideoTrackId, videoTracks);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103396(a0) { // fn#103396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4242, offset: 0x02266b9c, size: 103 bytes, params: 2, frame: 15
|
||||
var width;
|
||||
var height;
|
||||
var current;
|
||||
const value = undefined;
|
||||
let layout = a0 == null || a0.nativeEvent == null ? value : a0.nativeEvent.layout;
|
||||
if (layout != null) {
|
||||
layout = a0.nativeEvent.layout;
|
||||
width = layout.width;
|
||||
height = layout.height;
|
||||
if (width > 0) {
|
||||
if (height > 0) {
|
||||
current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.updateVideoDimensions(width, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun103397() { // fn#103397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4451, offset: 0x02266c03, size: 40 bytes, params: 1, frame: 10
|
||||
handleResumePlaybackAnalytics();
|
||||
const current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.onPlay();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103398() { // fn#103398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4526, offset: 0x02266c2b, size: 40 bytes, params: 1, frame: 10
|
||||
handlePausePlaybackAnalytics();
|
||||
const current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.onPause();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103399(a0) { // fn#103399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4602, offset: 0x02266c53, size: 45 bytes, params: 2, frame: 12
|
||||
handleBufferAnalytics(a0);
|
||||
const current = env0_27.current;
|
||||
if (current != null) {
|
||||
current.onBuffer(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103400(a0) { // fn#103400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4678, offset: 0x02266c80, size: 234 bytes, params: 2, frame: 20
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const VideoQuestCaptions = (require(13614) /* metro dependency 13614: VideoQuestCaptions */).VideoQuestCaptions;
|
||||
const questBinding = quest;
|
||||
const captionsEnabledBinding = captionsEnabled;
|
||||
const top = contentInsets == null ? value : contentInsets.top;
|
||||
const value3 = 0;
|
||||
return (
|
||||
<VideoQuestCaptions
|
||||
quest={questBinding}
|
||||
currentTime={a0}
|
||||
visible={captionsEnabledBinding}
|
||||
style={{top: top ?? value3, bottom: (contentInsets == null ? value : contentInsets.bottom) ?? value3,
|
||||
left: (contentInsets == null ? value : contentInsets.left) ?? value3,
|
||||
right: (contentInsets == null ? value : contentInsets.right) ?? value3}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun103401() { // fn#103401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:4967, offset: 0x02266d6a, size: 64 bytes, params: 1, frame: 6
|
||||
var url;
|
||||
var r0;
|
||||
const value2 = null;
|
||||
if (value2 == env0_8) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
url = value2 == env0_9 ? undefined : env0_9.url;
|
||||
url = value2 == url ? env0_8.url : url;
|
||||
r0 = {uri: url};
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun103386() { // fn#103386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13792:2455, offset: 0x02266728, size: 80 bytes, params: 1, frame: 13
|
||||
let current = env1_27.current;
|
||||
if (current != null) {
|
||||
current = env1_27.current;
|
||||
current.onProgress(env1_16.current);
|
||||
current = env1_27.current;
|
||||
current.destroy();
|
||||
env1_27.current = null;
|
||||
}
|
||||
}
|
||||
|
||||
Loaded 100 of 16065 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user