117 lines
5.5 KiB
TypeScript
117 lines
5.5 KiB
TypeScript
/* Metro module 10128; source: design/components/LottieIcon/native/LottieIcon.tsx; dependencies: [31, 27, 33, 697, 6817, 3875, 3860, 6761, 2] */
|
|
function _fun79035(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:6, offset: 0x01e420a3, size: 174 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
|
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
|
value = value.forwardRef(_fun79036);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/LottieIcon/native/LottieIcon.tsx');
|
|
exports.LottieIcon = value;
|
|
}
|
|
|
|
function _fun79036({animation, dotLottie, size, color = importDefault(dependencyMap[3]).colors.INTERACTIVE_TEXT_DEFAULT, opacity, markers, layers, width, height, autoPlay, useLottieDefaultColors}, a1) { // fn#79036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:151, offset: 0x01e42151, size: 730 bytes, params: 3, frame: 33
|
|
size = size === undefined ? 'md' : size;
|
|
opacity = opacity === undefined ? 1 : opacity;
|
|
const ICON_SIZE = (require(6817) /* metro dependency 6817: IconSize */).ICON_SIZE;
|
|
const property = ICON_SIZE[size];
|
|
const value6 = markers.find(function({name}) {
|
|
return name === animation;
|
|
});
|
|
const start2 = value6.start;
|
|
const env0_3 = start2;
|
|
const value7 = start2 + value6.duration;
|
|
const value8 = markers.find(function(a0) {
|
|
return a0.name === 'easteregg';
|
|
});
|
|
const r16 = value8?.start ?? -1;
|
|
const value10 = r16 + (value8?.duration ?? -1);
|
|
let binding = env0_3;
|
|
const value11 = binding.useRef(null);
|
|
const useContext = binding.useContext;
|
|
const AccessibilityPreferencesContext = (require(3875) /* metro dependency 3875: AccessibilityPreferencesContext */).AccessibilityPreferencesContext;
|
|
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
|
|
const value12 = size === 'custom';
|
|
const object2 = {};
|
|
object2.width = value12 ? width : property;
|
|
object2.height = value12 ? height : property;
|
|
const value13 = (require(3860) /* metro dependency 3860: useToken */).useToken(color);
|
|
binding = env0_3;
|
|
const value14 = binding.useMemo(_fun79039, [value13, layers]);
|
|
const value15 = binding.useCallback(_fun79041, [enabled, start2, value7, r16, value10]);
|
|
binding.useImperativeHandle(a1, function() {
|
|
return {play: _fun79043};
|
|
}, [value15]);
|
|
return (
|
|
<View style={object2}>
|
|
{((Component) => <Component ref={value11} source={dotLottie} colorFilters={useLottieDefaultColors ? undefined : value14} hardwareAccelerationAndroid loop={false} onAnimationLoaded={binding.useCallback(_fun79044,
|
|
[start2, autoPlay, value15])} resizeMode="cover" style={[object2,
|
|
{opacity: opacity}]} />)(importDefault(6761) /* metro dependency 6761 */)}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function _fun79039() { // fn#79039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:712, offset: 0x01e4243f, size: 43 bytes, params: 1, frame: 12
|
|
return env0_9 != null ? layers.map(_fun79040) : undefined;
|
|
}
|
|
|
|
function _fun79041() { // fn#79041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:790, offset: 0x01e42483, size: 164 bytes, params: 1, frame: 14
|
|
var current;
|
|
var play;
|
|
var binding;
|
|
const Math = global.Math;
|
|
let value = Math.random();
|
|
value = value < 0.05;
|
|
if (enabled) {
|
|
current = env0_7.current;
|
|
if (current != null) {
|
|
play = current.play;
|
|
binding = env0_4;
|
|
Reflect.apply(play, current, [binding, binding]);
|
|
}
|
|
} else if (value) {
|
|
if (env0_5 >= 0) {
|
|
current = env0_7.current;
|
|
if (current != null) {
|
|
current.play(env0_5, env0_6);
|
|
}
|
|
} else {
|
|
current = env0_7.current;
|
|
if (current != null) {
|
|
current.play(start, env0_4);
|
|
}
|
|
}
|
|
} else {
|
|
current = env0_7.current;
|
|
if (current != null) {
|
|
current.play(start, env0_4);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun79042() { // fn#79042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:1000, offset: 0x01e42527, size: 18 bytes, params: 1, frame: 2
|
|
return {play: play_79043};
|
|
}
|
|
|
|
function _fun79044() { // fn#79044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:1048, offset: 0x01e42548, size: 57 bytes, params: 1, frame: 13
|
|
var current;
|
|
var play;
|
|
var startBinding;
|
|
if (autoPlay) {
|
|
env0_10();
|
|
} else {
|
|
current = env0_7.current;
|
|
if (current != null) {
|
|
play = current.play;
|
|
startBinding = start;
|
|
Reflect.apply(play, current, [startBinding, startBinding]);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun79040(a0) { // fn#79040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:731, offset: 0x01e4246a, size: 25 bytes, params: 2, frame: 2
|
|
return {keypath: a0, color: env1_9};
|
|
}
|
|
|