Files
discord-decomp/_bundle/Image_8602.jsx
T
2026-11-01 12:12:55 +02:00

64 lines
2.2 KiB
React

// Metro module 8602 (f8603).
import _classCallCheck from "./_classCallCheck";
import _createClass from "./_createClass";
import _possibleConstructorReturn from "./_possibleConstructorReturn";
import _getPrototypeOf from "./_getPrototypeOf";
import _inherits from "./_inherits";
import * as _Module17 from "react-native";
import { meetOrSliceTypes, alignEnum } from "./extractViewBox";
import Module8603 from "./Module8603";
import { withoutXY } from "./extractProps";
import SVGMatrix from "./SVGMatrix";
let c5567_9;
let SvgImage;
let env5567 = {};
env5567[8] = function _isNativeReflectConstruct() {
let c16665_0;
try {
c16665_0 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
} catch ($e) {}
const _isNativeReflectConstruct2 = function _isNativeReflectConstruct() {
return !!c16665_0;
};
env5567[8] = _isNativeReflectConstruct2;
return _isNativeReflectConstruct2();
};
c5567_9 = /\s+/;
SvgImage = function SvgImage() {
_classCallCheck(this, SvgImage);
const r8 = _getPrototypeOf(SvgImage);
return _possibleConstructorReturn(this, (0, env5567[8])() ? Reflect.construct(r8, arguments, _getPrototypeOf(this).constructor) : r8.apply(this, arguments));
};
_inherits(SvgImage, SVGMatrix);
const r41 = _createClass(SvgImage, [{
key: "render",
value: function render() {
const props = this.props;
const { preserveAspectRatio, x: r13, y: r12, width, height, xlinkHref, href = xlinkHref, onLoad } = props;
const r5 = preserveAspectRatio ? preserveAspectRatio.trim().split(c5567_9) : [];
const r21 = r5[0];
const meetOrSlice = meetOrSliceTypes[r5[1]] || 0;
const align = alignEnum[r21] || "xMidYMid";
let src = null;
if (href) {
let r37 = href;
if (typeof r37 === "string") {
r37 = {
uri: href
};
}
src = _Module17.Image.resolveAssetSource(r37);
}
return <Module8603 ref={(a0) => this.refMethod(a0)} {...withoutXY(this, props)} x={r13} y={r12} width={width} height={height} onLoad={onLoad} meetOrSlice={meetOrSlice} align={align} src={src} />;
}
}]);
r41.displayName = "Image";
r41.defaultProps = {
x: 0,
y: 0,
width: 0,
height: 0,
preserveAspectRatio: "xMidYMid meet"
};
export default r41;