151 lines
7.3 KiB
TypeScript
151 lines
7.3 KiB
TypeScript
/* Metro module 8763; source: modules/profile_customization/native/BioText.tsx; dependencies: [31, 27, 661, 1933, 33, 4501, 3853, 683, 4573, 8764, 1932, 1244, 2] */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as ChangelogConstantsModule from '../../changelog/ChangelogConstants.tsx'; /* Metro dependency 1933 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
|
|
function _fun68576(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8948:6, offset: 0x01c54b81, size: 322 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_10 = (CreateStylesModule).createStyles({text: {'alignSelf': 'stretch',
|
|
'textAlignVertical': 'top', 'width': '100%', 'flexGrow': 1, 'paddingTop': 2, 'lineHeight': 24},
|
|
span: {'alignSelf': 'stretch', 'textAlignVertical': 'bottom', 'width': '100%', 'flexGrow': 1, 'display': 'flex',
|
|
'paddingBottom': 2}, link: {'alignSelf': 'stretch', 'textAlignVertical': 'bottom', 'width': '100%',
|
|
'flexGrow': 1, 'bottom': -4, 'position': 'relative'}});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/profile_customization/native/BioText.tsx');
|
|
exports.default = BioText;
|
|
function LinkButton_68577({lineClamp, text}) { // fn#68577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8948:560, offset: 0x01c54cc3, size: 154 bytes, params: 2, frame: 20
|
|
const styles = useStyles();
|
|
const pressableBindingProps = {onPress: function() {
|
|
importDefault(dependencyMap[6]).openURL(CHANGELOG_URL);
|
|
var defaultImport2 = importDefault(dependencyMap[7]);
|
|
var CHANGE_LOG_CTA_CLICKED = AnalyticEvents.CHANGE_LOG_CTA_CLICKED;
|
|
defaultImport2.track(CHANGE_LOG_CTA_CLICKED, {cta_type: 'profile_bio', target: CHANGELOG_URL});
|
|
}, style: styles.link};
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<Pressable {...pressableBindingProps}>
|
|
<Text
|
|
variant="text-md/normal"
|
|
color="text-link"
|
|
lineClamp={lineClamp}
|
|
style={styles.link}
|
|
>
|
|
{'\n'}
|
|
{text}
|
|
</Text>
|
|
</Pressable>
|
|
);
|
|
}
|
|
|
|
function BioText({placeholder, bio, lineClamp, userId, textVariant}) { // fn#68579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8948:952, offset: 0x01c54dbe, size: 605 bytes, params: 2, frame: 31
|
|
var r0;
|
|
var value5;
|
|
const Text = (TextModule).Text;
|
|
var jsxRuntimeEnv0_9Binding;
|
|
var value6;
|
|
const intl = (IndexNativeModule).intl;
|
|
const t = (IndexNativeModule).t;
|
|
var items2;
|
|
textVariant = textVariant === undefined ? 'text-md/normal' : textVariant;
|
|
var value;
|
|
const styles = useStyles();
|
|
const value2 = ReactModule.useMemo(_fun68580, [bio, textVariant]);
|
|
const r15 = bio.length === 0 && !(importDefault(1932) /* metro dependency 1932: isChangelogUser */)(userId);
|
|
if ((importDefault(1932) /* metro dependency 1932: isChangelogUser */)(userId)) {
|
|
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
|
value6 = 'text-default';
|
|
items2 = [
|
|
<Text
|
|
variant={textVariant}
|
|
color={r15 ? 'text-muted' : value6}
|
|
lineClamp={lineClamp}
|
|
style={styles.text}
|
|
key="changelog-bio"
|
|
>
|
|
{intl.string(t.OJmNR9)}
|
|
{'\n'}
|
|
</Text>,
|
|
];
|
|
items2[1] = (
|
|
<Text
|
|
variant={textVariant}
|
|
color={r15 ? 'text-muted' : value6}
|
|
lineClamp={lineClamp}
|
|
style={styles.span}
|
|
key="changelog-cta"
|
|
>
|
|
{intl.format(t.RCYeBL, {blogHook: blogHook})}
|
|
</Text>
|
|
);
|
|
r0 = (
|
|
<>
|
|
{items2}
|
|
</>
|
|
);
|
|
} else if (r15) {
|
|
value5 = null;
|
|
if (value5 == placeholder) {
|
|
r0 = value5;
|
|
} else {
|
|
value = 'text-default';
|
|
value = (
|
|
<Text
|
|
variant={textVariant}
|
|
color={r15 ? 'text-muted' : value}
|
|
lineClamp={lineClamp}
|
|
style={styles.text}
|
|
>
|
|
{r15 ? placeholder : value2}
|
|
</Text>
|
|
);
|
|
r0 = value;
|
|
}
|
|
} else {
|
|
value = 'text-default';
|
|
value = (
|
|
<Text
|
|
variant={textVariant}
|
|
color={r15 ? 'text-muted' : value}
|
|
lineClamp={lineClamp}
|
|
style={styles.text}
|
|
>
|
|
{r15 ? placeholder : value2}
|
|
</Text>
|
|
);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
function _fun68580() { // fn#68580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8948:1067, offset: 0x01c5501b, size: 63 bytes, params: 1, frame: 17
|
|
let value = environment.__proto__;
|
|
value = require(8764) /* metro dependency 8764: BioMarkupUtils */;
|
|
const parseBioReact = value.parseBioReact;
|
|
const bioBinding = bio;
|
|
const textVariantBinding = textVariant;
|
|
return Reflect.apply(parseBioReact, value, [bioBinding, undefined, {linkVariant: textVariantBinding,
|
|
textVariant: textVariantBinding}]);
|
|
}
|
|
|
|
function blogHook(a0, a1) { // fn#68581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8948:1510, owner: BioText.blogHook, offset: 0x01c5505a, size: 46 bytes, params: 3, frame: 15
|
|
return (
|
|
<LinkButton_68577
|
|
lineClamp={lineClamp}
|
|
text={a0}
|
|
key={a1}
|
|
/>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun68576, 8763, [31, 27, 661, 1933, 33, 4501, 3853, 683, 4573, 8764, 1932, 1244,
|
|
2]) /* metro module 8763, dependencies: [31, 27, 661, 1933, 33, 4501, 3853, 683, 4573, 8764, 1932, 1244, 2] */;
|