Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,159 @@
|
||||
/* Metro module 13200; source: modules/user_profile/native/EditUserProfileAvatar.tsx; dependencies: [31, 4502, 33, 4501, 6771, 6789, 3802, 8398, 8403, 13201, 4080, 13202, 1962, 13203, 13203, 8396, 8402, 566, 4017, 4504, 8417, 5278, 1244, 13204, 1305, 2] */
|
||||
function _fun100732(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:6, offset: 0x021f5a7b, size: 230 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({editIcon: {'position': 'absolute',
|
||||
'right': -3}});
|
||||
object = {code: 'function EditUserProfileAvatarTsx1(){const{rotation}=this.__closure;return{transform:[{rotateZ:rotation.get()+"deg"}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/EditUserProfileAvatar.tsx');
|
||||
exports.default = EditUserProfileAvatar;
|
||||
}
|
||||
|
||||
function EditUserProfileAvatar({user, disabled, statusStyle, style, avatarStyle, editIconStyle, disableStatus, isTryItOut, autoStartEditFlow, size}) { // fn#100733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:439, offset: 0x021f5b61, size: 1012 bytes, params: 2, frame: 37
|
||||
disableStatus = disableStatus === undefined || disableStatus;
|
||||
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
|
||||
autoStartEditFlow = !(autoStartEditFlow === undefined) && autoStartEditFlow;
|
||||
const styles = useStyles();
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const EDIT_AVATAR = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_AVATAR;
|
||||
const analyticsLocations = defaultImport(EDIT_AVATAR).analyticsLocations;
|
||||
const env0_3 = analyticsLocations;
|
||||
const r14 = !(importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseAnimatedAvatar(user) && !isTryItOut;
|
||||
const {pendingAvatar, pendingAvatarDecoration,
|
||||
setPendingAvatar} = (importDefault(8398) /* metro dependency 8398: usePendingAvatarSettings */)({isTryItOut: isTryItOut,
|
||||
analyticsLocations: analyticsLocations});
|
||||
const pendingAvatarSrc = (require(8403) /* metro dependency 8403: RecentAvatarUtils */).getPendingAvatarSrc({userId: user.id,
|
||||
image: pendingAvatar});
|
||||
const r4 = pendingAvatarDecoration !== undefined ? pendingAvatarDecoration : user.avatarDecoration;
|
||||
const value6 = (importDefault(13201) /* metro dependency 13201: useUploadAvatar */)({isTryItOut: isTryItOut,
|
||||
analyticsLocations: analyticsLocations});
|
||||
const env0_8 = value6;
|
||||
const binding = env0_3;
|
||||
const value7 = binding.useCallback(_fun100734, [user, analyticsLocations, pendingAvatar, setPendingAvatar, value6,
|
||||
r14, r4, isTryItOut]);
|
||||
const env0_10 = binding.useRef(false);
|
||||
binding.useEffect(_fun100738, [user, autoStartEditFlow, value7]);
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = EditUserProfileAvatarZ;
|
||||
closure.__closure = {rotation: value8};
|
||||
closure.__workletHash = 13368223692459;
|
||||
closure.__initData = env0_8;
|
||||
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
binding.useEffect(_fun100741, [value8]);
|
||||
const value10 = ((Component) => <Component style={avatarStyle} user={user} pendingAvatarSrc={pendingAvatarSrc} pendingAvatarDecoration={pendingAvatarDecoration} statusStyle={statusStyle} disableStatus={disableStatus} size={size} />)(importDefault(8417) /* metro dependency 8417: HeaderAvatar */);
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const MUgHIN = (require(1244) /* metro dependency 1244: indexNative */).t.MUgHIN;
|
||||
const r5 = isTryItOut ? pendingAvatarDecoration != null || useReducedMotion ? value10 : ((View) => <View style={value9}>{value10}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View) : value10;
|
||||
const EditIcon = importDefault(13204) /* metro dependency 13204: EditIcon */;
|
||||
const items2 = [styles.editIcon, editIconStyle];
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const EDIT_AVATAR_DECORATION = AvatarSizes.EDIT_AVATAR_DECORATION;
|
||||
return (
|
||||
<PressableOpacity
|
||||
style={style}
|
||||
disabled={disabled}
|
||||
onPress={value7}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={Reflect.apply(string, intl, [MUgHIN])}
|
||||
>
|
||||
{r5}
|
||||
<EditIcon style={items2} size={size !== EDIT_AVATAR_DECORATION ? 'xs' : 'sm'} />
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun100734() { // fn#100734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:972, offset: 0x021f5f55, size: 184 bytes, params: 1, frame: 20
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[10]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[12]);
|
||||
value = value(dependencyMap[11], dependencyMap.paths);
|
||||
const object2 = {};
|
||||
object2.showAnimatedAvatarUpsell = env0_4;
|
||||
object2.handleRemoveAvatarSelect = handleRemoveAvatarSelect;
|
||||
object2.handleUploadAvatarSelect = env0_8;
|
||||
object2.handleUploadGIFAvatarSelect = handleUploadGIFAvatarSelect;
|
||||
object2.handleEditAvatarDecorationSelect = handleEditAvatarDecorationSelect;
|
||||
const moduleValue = require(dependencyMap[16]);
|
||||
object2.showRemoveAvatar = moduleValue.showRemoveAvatar(pendingAvatar, user.avatar);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'Change Avatar', object2]);
|
||||
}
|
||||
|
||||
function _fun100738() { // fn#100738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:1684, offset: 0x021f613b, size: 51 bytes, params: 1, frame: 10
|
||||
if (autoStartEditFlow && !env0_10.current) {
|
||||
env0_10.current = true;
|
||||
env0_9();
|
||||
}
|
||||
}
|
||||
|
||||
function EditUserProfileAvatarZ() { // fn#100740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:1861, owner: EditUserProfileAvatar.z, offset: 0x021f616e, size: 68 bytes, params: 1, frame: 15
|
||||
const object = {};
|
||||
object.rotateZ = '' + env0_11.get() + 'deg';
|
||||
return {transform: [object]};
|
||||
}
|
||||
|
||||
function _fun100741() { // fn#100741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:2005, offset: 0x021f61b2, size: 164 bytes, params: 1, frame: 22
|
||||
var environment;
|
||||
const binding = env0_11;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withRepeat = value.withRepeat;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const inOut = Easing.inOut;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withRepeat, value, [Reflect.apply(withTiming, timingModule, [360,
|
||||
{duration: 3000, easing: Reflect.apply(inOut, Easing, [Easing2.quad])}]), -1])]);
|
||||
return _fun100742;
|
||||
}
|
||||
|
||||
function handleRemoveAvatarSelect() { // fn#100735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:1088, offset: 0x021f600d, size: 51 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
value = environment.__proto__;
|
||||
setPendingAvatar(null);
|
||||
}
|
||||
|
||||
function handleUploadGIFAvatarSelect() { // fn#100736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:1184, offset: 0x021f6040, size: 182 bytes, params: 1, frame: 19
|
||||
importDefault(dependencyMap[10]).hideActionSheet();
|
||||
const defaultImport2 = importDefault(dependencyMap[10]);
|
||||
const openLazy = defaultImport2.openLazy;
|
||||
const value2 = require(dependencyMap[12])(dependencyMap[13], dependencyMap.paths);
|
||||
const object2 = {};
|
||||
const ProfileAssetType = require(dependencyMap[14]).ProfileAssetType;
|
||||
const AVATAR = ProfileAssetType.AVATAR;
|
||||
object2.profileAssetType = AVATAR;
|
||||
const isTryItOutBinding = isTryItOut;
|
||||
const GIFSelectionContext = require(dependencyMap[14]).GIFSelectionContext;
|
||||
object2.selectionContext = isTryItOutBinding ? GIFSelectionContext.PROFILE_TRY_IT_OUT : GIFSelectionContext.PROFILE_EDIT;
|
||||
Reflect.apply(openLazy, defaultImport2, [value2, 'Select GIF Avatar', object2]);
|
||||
}
|
||||
|
||||
function handleEditAvatarDecorationSelect() { // fn#100737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:1474, offset: 0x021f60f6, size: 69 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(8396) /* metro dependency 8396: AvatarDecorationUtils */).openAvatarDecorationActionSheet({user: user,
|
||||
currentAvatarDecoration: env1_7, analyticsLocations: analyticsLocations});
|
||||
}
|
||||
|
||||
function _fun100742() { // fn#100742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13390:2132, offset: 0x021f6256, size: 45 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(4017) /* metro dependency 4017: ReanimatedRexport */).cancelAnimation(env1_11);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user