128 lines
7.1 KiB
TypeScript
128 lines
7.1 KiB
TypeScript
/* Metro module 8483; source: modules/collectibles/nameplates/native/Nameplate.tsx; dependencies: [31, 4502, 33, 4501, 566, 4048, 4017, 4504, 1901, 8484, 4589, 477, 7897, 5475, 2] */
|
|
function _fun67328(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:6, offset: 0x01c1e520, size: 227 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 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(_fun67329);
|
|
object = {code: 'function NameplateTsx1(){const{opacity}=this.__closure;return{opacity:opacity.get()};}'};
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/nameplates/native/Nameplate.tsx');
|
|
exports.default = _default_67334;
|
|
}
|
|
|
|
function _fun67329(a0, a1, a2, a3, a4) { // fn#67329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:167, offset: 0x01c1e603, size: 239 bytes, params: 6, frame: 13
|
|
const value = 1;
|
|
return {container: {'position': 'absolute', 'overflow': 'hidden', 'top': 0, 'bottom': 0, 'left': 0, 'right': 0},
|
|
gradient: {'position': 'absolute', 'width': '100%', 'height': '100%',
|
|
opacity: a0 ? value : a3 ? a2 ? a1 ? a4 ? 0.3 : 0.6 : a2 ? 0.8 : 0.4 : 0 : a1 ? a4 ? 0.3 : 0.6 : a2 ? 0.8 : 0.4},
|
|
img: {'position': 'absolute', 'height': '100%', 'right': 0, 'aspectRatio': 5.333333333333333,
|
|
opacity: a0 ? value : a3 ? a2 ? a1 ? a4 ? 0.4 : 0.5 : a2 ? 0.8 : 0.6 : 0.1 : a1 ? a4 ? 0.4 : 0.5 : a2 ? 0.8 : 0.6}};
|
|
}
|
|
|
|
function NameplateInner({nameplate, isPressed, isFocused, isMuted, fullOpacity, isSquarePreview, invertPressOpacity, fadeIn, animate, style}) { // fn#67330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:592, offset: 0x01c1e6f2, size: 807 bytes, params: 2, frame: 31
|
|
var r5;
|
|
var r7;
|
|
var defaultImport;
|
|
var value12;
|
|
isPressed = !(isPressed === undefined) && isPressed;
|
|
isFocused = !(isFocused === undefined) && isFocused;
|
|
isMuted = !(isMuted === undefined) && isMuted;
|
|
fullOpacity = !(fullOpacity === undefined) && fullOpacity;
|
|
isSquarePreview = !(isSquarePreview === undefined) && isSquarePreview;
|
|
invertPressOpacity = !(invertPressOpacity === undefined) && invertPressOpacity;
|
|
fadeIn = !(fadeIn === undefined) && fadeIn;
|
|
animate = !(animate === undefined) && animate;
|
|
var value;
|
|
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
|
function() {
|
|
return AccessibilityStore.useReducedMotion;
|
|
});
|
|
const styles = useStyles(fullOpacity, isPressed, isFocused, isMuted, invertPressOpacity);
|
|
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
|
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(fadeIn ? 0 : 1);
|
|
env0_3.useEffect(_fun67332, [value5, fadeIn]);
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
|
const closure = NameplateInnerJ;
|
|
closure.__closure = {opacity: value5};
|
|
closure.__workletHash = 15588901070870;
|
|
closure.__initData = env0_8;
|
|
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
|
const backgroundGradientColors = (require(1901) /* metro dependency 1901: utils */).getBackgroundGradientColors(nameplate.palette,
|
|
value2);
|
|
const {staticImageUrl,
|
|
animatedImageUrl} = (require(8484) /* metro dependency 8484: NameplateUtils */).getNameplateAssets(nameplate);
|
|
const r10 = (animate && !useReducedMotion ? animatedImageUrl : staticImageUrl) ?? '';
|
|
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
|
const items2 = [styles.container, style, value6];
|
|
if (backgroundGradientColors != null) {
|
|
defaultImport = importDefault(4589) /* metro dependency 4589 */;
|
|
value12 = 0;
|
|
r7 = ((Component) => <Component style={styles.gradient} start={{x: isSquarePreview ? -2 : value12,
|
|
y: value12}} end={{'x': 1, 'y': 0}} colors={[backgroundGradientColors.left,
|
|
backgroundGradientColors.right]} />)(defaultImport);
|
|
} else {
|
|
r7 = null;
|
|
}
|
|
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
|
if (platformUtilsModule.isAndroid()) {
|
|
if (r5) {
|
|
const APNGPlayer = (require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer;
|
|
r5 = <APNGPlayer url={r10} style={styles.img} autoplay />;
|
|
} else {
|
|
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
|
value = ((Component) => <Component source={{uri: r10}} style={styles.img} accessibilityRole="image" />)(value);
|
|
r5 = value;
|
|
}
|
|
} else {
|
|
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
|
value = ((Component) => <Component source={{uri: r10}} style={styles.img} accessibilityRole="image" />)(value);
|
|
r5 = value;
|
|
}
|
|
return (
|
|
<View style={items2}>
|
|
{r7}
|
|
{r5}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function _default_67334(a0) { // fn#67334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:1610, offset: 0x01c1eab4, size: 89 bytes, params: 2, frame: 16
|
|
var r0;
|
|
const nameplate = a0.nameplate;
|
|
const value = null;
|
|
const value2 = Object.create(value);
|
|
value2.nameplate = 0;
|
|
if (value == nameplate) {
|
|
r0 = value;
|
|
} else {
|
|
var nameplateInnerBindingProps = {nameplate: nameplate, ...copyDataProperties({}, a0, value2, nameplate)};
|
|
nameplateInnerBindingProps['aria-hidden'] = true;
|
|
r0 = <NameplateInner {...nameplateInnerBindingProps} />;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun67332() { // fn#67332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:885, offset: 0x01c1ea19, size: 131 bytes, params: 1, frame: 20
|
|
var binding;
|
|
var set;
|
|
var withTiming;
|
|
var object2;
|
|
var value;
|
|
if (fadeIn) {
|
|
binding = env0_1;
|
|
set = binding.set;
|
|
value = environment.__proto__;
|
|
value = require(4504) /* metro dependency 4504: timing */;
|
|
withTiming = value.withTiming;
|
|
object2 = {duration: 100};
|
|
object2.easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.in((require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease);
|
|
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, object2])]);
|
|
}
|
|
}
|
|
|