122 lines
6.0 KiB
TypeScript
122 lines
6.0 KiB
TypeScript
/* Metro module 11976; source: modules/guild/native/GuildInviteIcon.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 11977, 1244, 1423, 5475, 1861, 1305, 3868, 2] */
|
|
function _fun91939(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12162:6, offset: 0x020773d7, size: 558 bytes, params: 8, frame: 25
|
|
var object4;
|
|
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 = importAll(31) /* metro dependency 31 */;
|
|
const env0_8 = (require(27) /* metro dependency 27 */).View;
|
|
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
|
object4 = {SMALL: 'small', MEDIUM: 'medium', LARGE: 'large'};
|
|
const env0_10 = [16, 16, 14, 14, 12];
|
|
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
|
|
const object5 = {icon: {'justifyContent': 'center', 'alignItems': 'center', 'overflow': 'hidden'},
|
|
iconSmall: {'width': 40, 'height': 40, 'borderRadius': 20}, iconMedium: {'width': 80, 'height': 80,
|
|
'borderRadius': 40}};
|
|
const object6 = {'width': 128, 'height': 128};
|
|
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
|
object5.iconLarge = object6;
|
|
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
|
object5.textContainer = {backgroundColor: BACKGROUND_BRAND};
|
|
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
|
object5.acronym = {color: WHITE};
|
|
const env0_11 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object5]);
|
|
const PureComponent = value.PureComponent;
|
|
value = _fun91943(PureComponent);
|
|
const SMALL = object4.SMALL;
|
|
value.defaultProps = {size: SMALL, textScale: 1};
|
|
value.Sizes = object4;
|
|
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
|
|
value.contextType = ThemeContext;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild/native/GuildInviteIcon.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_91940() { // fn#91940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12162:187, offset: 0x02077605, 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_91940_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun91943(a0) { // fn#91943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12162:873, offset: 0x02077667, size: 72 bytes, params: 2, frame: 15
|
|
const closure = GuildInviteIcon;
|
|
env0_7(closure, a0);
|
|
return env0_4(closure, [{key: 'render', value: value_91945}]);
|
|
}
|
|
|
|
function value_91945() { // fn#91945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12162:1174, offset: 0x020776af, size: 506 bytes, params: 1, frame: 26
|
|
var defaultImport;
|
|
var getGuildIconSource;
|
|
var value8;
|
|
let value = environment.__proto__;
|
|
const value2 = env1_11(this.context);
|
|
const {style, guild, size, textScale} = this.props;
|
|
const value3 = 10;
|
|
const value4 = require(dependencyMap[value3]).getClass(value2, 'icon', size);
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const value5 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.xm6W9D,
|
|
{guildName: guild.name});
|
|
let icon = guild.icon;
|
|
if (icon != null) {
|
|
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
|
getGuildIconSource = defaultImport.getGuildIconSource;
|
|
icon = guild.icon;
|
|
value8 = Reflect.apply(getGuildIconSource, defaultImport, [{id: guild.id, icon: icon, canAnimate: true,
|
|
size: 128}]);
|
|
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
|
icon = value2.icon;
|
|
return ((Component) => <Component accessibilityRole="image" accessibilityLabel={value5} style={[icon, value4,
|
|
style]} source={value8} />)(value);
|
|
}
|
|
const acronym = (require(1861) /* metro dependency 1861: StringUtils */).getAcronym(guild.name);
|
|
const value7 = (env1_10[acronym.length - 1] ?? value3) * textScale;
|
|
const items2 = [value2.textContainer];
|
|
items2[1] = value2.icon;
|
|
items2[2] = value4;
|
|
items2[3] = style;
|
|
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
|
return (
|
|
<View
|
|
accessible
|
|
accessibilityRole="image"
|
|
accessibilityLabel={value5}
|
|
style={items2}
|
|
>
|
|
<LegacyText numberOfLines={1} style={[value2.acronym, {fontSize: value7}]}>
|
|
{acronym}
|
|
</LegacyText>
|
|
</View>
|
|
);
|
|
}
|
|
|