Files
2026-07-28 01:06:53 +03:00

147 lines
8.7 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] */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as UtilsModule from '../utils.tsx'; /* Metro dependency 1901 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NameplateUtilsModule from './NameplateUtils.tsx'; /* Metro dependency 8484 */
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_7 = (CreateStylesModule).createStyles(_fun67329);
object = {code: 'function NameplateTsx1(){const{opacity}=this.__closure;return{opacity:opacity.get()};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/nameplates/native/Nameplate.tsx');
exports.default = _default_67334;
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 = (UseTheme)();
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(fadeIn ? 0 : 1);
ReactModule.useEffect(_fun67332, [value5, fadeIn]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const NameplateInnerJ2 = NameplateInnerJ;
NameplateInnerJ2.__closure = {opacity: value5};
NameplateInnerJ2.__workletHash = 15588901070870;
NameplateInnerJ2.__initData = env0_8;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [NameplateInnerJ2]);
const backgroundGradientColors = (UtilsModule).getBackgroundGradientColors(nameplate.palette,
value2);
const {staticImageUrl,
animatedImageUrl} = (NameplateUtilsModule).getNameplateAssets(nameplate);
const r10 = (animate && !useReducedMotion ? animatedImageUrl : staticImageUrl) ?? '';
const View = (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;
}
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 _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 object;
var value;
if (fadeIn) {
binding = env0_1;
set = binding.set;
value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
withTiming = value.withTiming;
object = {duration: 100};
object.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, object])]);
}
}
function NameplateInnerJ() { // fn#67333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:1029, owner: NameplateInner.j, offset: 0x01c1ea9c, size: 24 bytes, params: 1, frame: 10
const object = {};
object.opacity = env0_1.get();
return object;
}
}
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 _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}};
}
global.__d(_fun67328, 8483, [31, 4502, 33, 4501, 566, 4048, 4017, 4504, 1901, 8484, 4589, 477, 7897, 5475,
2]) /* metro module 8483, dependencies: [31, 4502, 33, 4501, 566, 4048, 4017, 4504, 1901, 8484, 4589, 477, 7897, 5475, 2] */;