Files
discord-decomp/sources/modules/icymi/native/CaughtUpRow.tsx
T
2026-07-27 16:20:00 +03:00

314 lines
17 KiB
TypeScript

/* Metro module 14878; source: modules/icymi/native/CaughtUpRow.tsx; dependencies: [5, 57, 31, 27, 33, 4017, 4573, 14815, 697, 9580, 14832, 14828, 4008, 4504, 3860, 10231, 1244, 4578, 14854, 4589, 676, 674, 2] */
function _fun112546(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:6, offset: 0x023d0ee1, size: 330 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;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
const createAnimatedComponent = value.createAnimatedComponent;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const env0_9 = Reflect.apply(createAnimatedComponent, value, [Text]);
const env0_10 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(_fun112547);
object = {code: 'function CaughtUpRowTsx1(){const{visibleSharedValue,withTiming,Easing}=this.__closure;return{transform:[{translateY:visibleSharedValue.get()?withTiming(0,{duration:250,easing:Easing.bezier(0.5,1.8,0.5,1)}):-80}],opacity:visibleSharedValue.get()?withTiming(1,{duration:100,easing:Easing.out(Easing.bezierFn(0.33,1,0.68,1))}):0};}'};
object = {code: 'function CaughtUpRowTsx2(){const{visibleSharedValue,withDelay,withSequence,withTiming,Easing}=this.__closure;return{transform:[{translateY:visibleSharedValue.get()?withDelay(80,withSequence(withTiming(8,{duration:100,easing:Easing.inOut(Easing.ease)}),withTiming(0,{duration:300,easing:Easing.out(Easing.ease)}))):0}]};}'};
object = {code: 'function CaughtUpRowTsx3(){const{visibleSharedValue,withDelay,withSequence,withTiming,Easing}=this.__closure;return{transform:[{translateY:visibleSharedValue.get()?withDelay(115,withSequence(withTiming(8,{duration:150,easing:Easing.inOut(Easing.ease)}),withTiming(0,{duration:300,easing:Easing.out(Easing.ease)}))):0}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/CaughtUpRow.tsx');
exports.default = ExploreServersRow;
}
function _fun112547(a0) { // fn#112547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:245, offset: 0x023d102b, size: 344 bytes, params: 2, frame: 17
const object2 = {};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.container = {'flex': 1, 'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center',
marginVertical: PX_32};
const object4 = {};
object4.marginHorizontal = a0.margin;
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.marginBottom = PX_24;
object2.textContainer = object4;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.recommendedGuildsContainer = {flex: 1, marginBottom: PX_24};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.iconWrapper = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', marginBottom: PX_24};
object2.icon = {'height': 40, 'width': 40};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.headerText = {'alignSelf': 'center', 'marginBottom': null, 'textAlign': 'center', marginBottom: PX_8};
object2.subtitleText = {'alignSelf': 'center', 'textAlign': 'center'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.buttonContainer = {'flex': 1, 'width': '100%', gap: PX_12, paddingHorizontal: a0.margin};
object2.gradient = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': 150};
return object2;
}
function ExploreServersRow({visible}) { // fn#112548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:2017, offset: 0x023d1183, size: 1477 bytes, params: 2, frame: 33
var object2;
const value2 = env0_10();
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
let binding = env0_5;
binding.useEffect(_fun112549, [visible, value3]);
const [property, env0_2] = env0_4(binding.useState(false), 2);
const value7 = binding.useCallback(env0_3(_fun112552), []);
let closure = _fun112555;
const value8 = binding.useCallback(closure, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = ExploreServersRowE;
object2 = {visibleSharedValue: value3};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const Easing = reanimatedRexportModule.Easing;
object2.Easing = Easing;
closure.__closure = object2;
closure.__workletHash = 6575188656069;
closure.__initData = env0_11;
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue3 = reanimatedRexportModule;
useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = ExploreServersRowB;
object2 = {visibleSharedValue: value3};
object2.withDelay = reanimatedRexportModule.withDelay;
object2.withSequence = reanimatedRexportModule.withSequence;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.Easing = Easing;
closure.__closure = object2;
closure.__workletHash = 469742746264;
closure.__initData = env0_12;
const value10 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = ExploreServersRowX;
object2 = {visibleSharedValue: value3};
object2.withDelay = reanimatedRexportModule.withDelay;
object2.withSequence = reanimatedRexportModule.withSequence;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.Easing = Easing;
closure.__closure = object2;
closure.__workletHash = 14933607481025;
closure.__initData = env0_13;
const value11 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
const value12 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BRAND]);
const container = value2.container;
const textContainer = value2.textContainer;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items4 = [value2.iconWrapper, value9];
const FlashIcon = (require(10231) /* metro dependency 10231: FlashIcon */).FlashIcon;
const items2 = [<View2 style={items4}><FlashIcon size="custom" style={value2.icon} color="background-brand" /></View2>];
binding = env0_9;
const items3 = [value2.headerText, value10];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = ((Component) => <Component variant="heading-lg/semibold" color="mobile-text-heading-primary" style={items3}>{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t.xjxffq])}</Component>)(binding);
items2[2] = ((Component) => <Component variant="text-md/normal" color="text-default" style={[value2.subtitleText,
value11]}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sAApb0)}</Component>)(binding);
const items5 = [<View style={textContainer}>{items2}</View>];
const buttonContainer = value2.buttonContainer;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
let value = <Button size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lNJYV8)} grow variant="primary" onPress={value7} loading={property} />;
string = intl.string;
const AGrUbj = (require(1244) /* metro dependency 1244: indexNative */).t.AGrUbj;
items5[1] = <View style={buttonContainer}>{value}<Button size="md" text={Reflect.apply(string, intl,
[AGrUbj])} grow variant="secondary" onPress={value8} /></View>;
const items7 = [<View style={container}>{items5}</View>];
const Separator = (require(14854) /* metro dependency 14854: ICYMIShared */).Separator;
items7[1] = <Separator />;
value = importDefault(4589) /* metro dependency 4589 */;
const gradient = value2.gradient;
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
const value15 = (importDefault(674) /* metro dependency 674 */)(value12).alpha(0.2);
const items8 = [value15.hex()];
const value18 = (importDefault(674) /* metro dependency 674 */)(value12).alpha(0);
items8[1] = value18.hex();
items7[2] = ((Component) => <Component style={gradient} start={START} end={END} colors={items8} pointerEvents="none" />)(value);
return (
<View>
{items7}
</View>
);
}
function _fun112549() { // fn#112549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:2109, offset: 0x023d1748, size: 69 bytes, params: 1, frame: 13
if (visible && env0_1.get() !== visible) {
global.setTimeout(_fun112550, 500);
}
}
function* _fun112552() { // fn#112552, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:2242, offset: 0x023d17af, size: 198 bytes, params: 1, frame: 20
var environment;
if (true) {
value = environment.__proto__;
dependencyMap(true);
value = environment.__proto__.__proto__;
var binding = env2_1;
var binding2 = env2_2;
binding(binding2[9]).itemInteracted('caught_up', 'caught_up', 'press_explore');
binding(binding2[9]).feedItemActioned({'itemId': 'caught_up', 'itemType': 'caught_up',
actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'browse_servers_button',
'actionIntentType': 'open', 'actionDestinationType': null}});
value = env2_0(binding2[10]);
yield value.maybeFetchGuildDiscoveryCategories();
if (false) {
return undefined;
}
global.setTimeout(_fun112553, 100);
}
}
function _fun112555() { // fn#112555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:2728, offset: 0x023d18d8, size: 164 bytes, params: 1, frame: 19
let value = environment.__proto__;
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).itemInteracted('caught_up', 'caught_up',
'press_home');
(importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */).feedItemActioned({'itemId': 'caught_up',
'itemType': 'caught_up', actionParameters: {'actionGestureType': 'press',
'actionTargetElement': 'back_to_home_button', 'actionIntentType': 'navigate',
'actionDestinationType': 'guild_home'}});
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
value = value.getRootNavigationRef();
if (value != null) {
value.navigate('tabs', {screen: 'guilds'});
}
}
function ExploreServersRowE() { // fn#112556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:3133, owner: ExploreServersRow.E, offset: 0x023d197c, size: 321 bytes, params: 1, frame: 23
var r2;
var r1;
var value4;
var moduleValue;
var withTiming;
var object2;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
var out;
var Easing2;
const object4 = {};
if (env0_1.get()) {
value4 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue.withTiming;
object2 = {duration: 250};
object2.easing = Easing.bezier(0.5, 1.8, 0.5, 1);
r2 = Reflect.apply(withTiming, moduleValue, [0, object2]);
} else {
r2 = -80;
}
object4.transform = [{translateY: r2}];
let value = env0_1.get();
if (value) {
value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
withTiming = value.withTiming;
out = Easing.out;
Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
value = Reflect.apply(withTiming, value, [1, {duration: 100, easing: Reflect.apply(out, Easing,
[Easing2.bezierFn(0.33, 1, 0.68, 1)])}]);
r1 = value;
} else {
r1 = 0;
}
object4.opacity = r1;
return object4;
}
function ExploreServersRowB() { // fn#112557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:3557, owner: ExploreServersRow.b, offset: 0x023d1abd, size: 281 bytes, params: 1, frame: 28
var r1;
var withDelay;
var moduleValue;
var withSequence;
var moduleValue2;
var withTiming;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
var inOut;
var ease;
var value3;
var moduleValue3;
var out;
let value = env0_1.get();
const value2 = 0;
if (value) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = value.withDelay;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = moduleValue.withSequence;
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue2.withTiming;
inOut = Easing.inOut;
ease = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease;
value3 = Reflect.apply(withTiming, moduleValue2, [8, {duration: 100, easing: Reflect.apply(inOut, Easing,
[ease])}]);
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
out = Easing.out;
ease = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease;
value = Reflect.apply(withDelay, value, [80, Reflect.apply(withSequence, moduleValue, [value3,
Reflect.apply(withTiming, moduleValue3, [value2, {duration: 300, easing: Reflect.apply(out, Easing,
[ease])}])])]);
r1 = value;
} else {
r1 = value2;
}
return {transform: [{translateY: r1}]};
}
function ExploreServersRowX() { // fn#112558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:4056, owner: ExploreServersRow.x, offset: 0x023d1bd6, size: 281 bytes, params: 1, frame: 28
var r1;
var withDelay;
var moduleValue;
var withSequence;
var moduleValue2;
var withTiming;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
var inOut;
var ease;
var value3;
var moduleValue3;
var out;
let value = env0_1.get();
const value2 = 0;
if (value) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withDelay = value.withDelay;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
withSequence = moduleValue.withSequence;
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue2.withTiming;
inOut = Easing.inOut;
ease = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease;
value3 = Reflect.apply(withTiming, moduleValue2, [8, {duration: 150, easing: Reflect.apply(inOut, Easing,
[ease])}]);
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue3.withTiming;
out = Easing.out;
ease = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease;
value = Reflect.apply(withDelay, value, [115, Reflect.apply(withSequence, moduleValue, [value3,
Reflect.apply(withTiming, moduleValue3, [value2, {duration: 300, easing: Reflect.apply(out, Easing,
[ease])}])])]);
r1 = value;
} else {
r1 = value2;
}
return {transform: [{translateY: r1}]};
}
function _fun112550() { // fn#112550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:2142, offset: 0x023d178d, size: 23 bytes, params: 1, frame: 11
env1_1.set(true);
}
function _fun112553() { // fn#112553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15075:2596, offset: 0x023d1875, size: 81 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__.__proto__;
env3_0(env3_2[11]).pushICYMIInfoModal({'extendedOnboarding': true, 'skipIntro': true});
global.setTimeout(function() {
dependencyMap(false);
}, 500);
}