117 lines
7.8 KiB
TypeScript
117 lines
7.8 KiB
TypeScript
/* Metro module 7324; source: components_native/premium/ShineAnimation.tsx; dependencies: [31, 27, 33, 4501, 697, 4017, 4504, 674, 2] */
|
|
import Module00674 from '../../by-id/module-00674.js'; /* Metro dependency 674 */
|
|
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import ReanimatedRexport from '../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
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 ReanimatedRexportModule from '../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as TimingModule from '../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
|
|
|
|
function _fun59009(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:6, offset: 0x016dded1, size: 410 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
let Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const StyleSheet = ReactNativeModule.StyleSheet;
|
|
Object = global.Object;
|
|
const env0_8 = Object.freeze({'FLASH_TIME_PERCENT': 0.72, 'FLASH_DURATION_PERCENT': 0.08});
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
object = {};
|
|
object.container = {overflow: 'hidden'};
|
|
const object3 = {};
|
|
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
|
object.shineContainer = object3;
|
|
object.shine = {'transform': null, 'width': 56, 'flex': 0, 'height': '300%', 'top': '-10%',
|
|
transform: [{rotate: '30deg'}]};
|
|
const BACKGROUND_MOD_NORMAL = (Native).colors.BACKGROUND_MOD_NORMAL;
|
|
object.shineInner = {backgroundColor: BACKGROUND_MOD_NORMAL, flex: 1};
|
|
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
object = {code: 'function ShineAnimationTsx1(){const{interpolate,progress}=this.__closure;const widthPercent=interpolate(progress.get(),[0,1],[20,160]);return{width:widthPercent+"%"};}'};
|
|
object = {code: 'function ShineAnimationTsx2(){const{ShineAnimationConfig,interpolateColor,progress,flashStartColor,flashEndColor}=this.__closure;const startTime=ShineAnimationConfig.FLASH_TIME_PERCENT;const duration=ShineAnimationConfig.FLASH_DURATION_PERCENT;return{backgroundColor:interpolateColor(progress.get(),[0,startTime,startTime,startTime+duration,1],[flashStartColor,flashStartColor,flashEndColor,flashEndColor,flashStartColor])};}'};
|
|
value = value.memo(ShineAnimation);
|
|
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/ShineAnimation.tsx');
|
|
exports.default = value;
|
|
function ShineAnimation({source, style}) { // fn#59010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1124, offset: 0x016de06b, size: 620 bytes, params: 2, frame: 27
|
|
const styles = useStyles();
|
|
const value2 = (ReanimatedRexportModule).useSharedValue(0);
|
|
env0_3.useEffect(_fun59011, [value2]);
|
|
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
let closure = ShineAnimationA;
|
|
closure.__closure = {interpolate: ReanimatedRexportModule.interpolate, progress: value2};
|
|
closure.__workletHash = 4072719467417;
|
|
closure.__initData = env0_10;
|
|
const value3 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
|
|
const defaultImport = Module00674;
|
|
let BRAND_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_360;
|
|
const value6 = defaultImport(BRAND_360).alpha(0.2).hex();
|
|
const defaultImport2 = defaultImport;
|
|
BRAND_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_360;
|
|
const value9 = defaultImport2(BRAND_360).alpha(1).hex();
|
|
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
closure = ShineAnimationE;
|
|
object = {ShineAnimationConfig: env0_8};
|
|
object.interpolateColor = ReanimatedRexportModule.interpolateColor;
|
|
object.progress = value2;
|
|
object.flashStartColor = value6;
|
|
object.flashEndColor = value9;
|
|
closure.__closure = object;
|
|
closure.__workletHash = 9845866779228;
|
|
closure.__initData = env0_11;
|
|
const value10 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
|
|
const View2 = (ReanimatedRexport).View;
|
|
const items2 = [styles.container, style, value10];
|
|
const View3 = (ReanimatedRexport).View;
|
|
return (
|
|
<View2 style={items2}>
|
|
<View style={styles.shineContainer}>
|
|
<View3 style={value3} />
|
|
<View style={styles.shine}>
|
|
<View style={styles.shineInner} />
|
|
</View>
|
|
</View>
|
|
<Image source={source} />
|
|
</View2>
|
|
);
|
|
function _fun59011() { // fn#59011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1219, offset: 0x016de2d7, size: 130 bytes, params: 1, frame: 21
|
|
const binding = env0_0;
|
|
const set = binding.set;
|
|
let value = environment.__proto__;
|
|
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
const withDelay = value.withDelay;
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [400,
|
|
reanimatedRexportModule.withRepeat((TimingModule).withTiming(1,
|
|
{duration: 1000}), -1, false)])]);
|
|
}
|
|
|
|
function ShineAnimationA() { // fn#59012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1363, owner: ShineAnimation.A, offset: 0x016de359, size: 109 bytes, params: 1, frame: 16
|
|
let value = environment.__proto__;
|
|
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).interpolate, value,
|
|
[env0_0.get(), [0, 1], [20, 160]]);
|
|
return {width: '' + value + '%'};
|
|
}
|
|
|
|
function ShineAnimationE() { // fn#59013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1698, owner: ShineAnimation.E, offset: 0x016de3c6, size: 143 bytes, params: 1, frame: 19
|
|
let value = environment.__proto__;
|
|
let binding = env1_8;
|
|
const FLASH_TIME_PERCENT = binding.FLASH_TIME_PERCENT;
|
|
const FLASH_DURATION_PERCENT = binding.FLASH_DURATION_PERCENT;
|
|
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
const interpolateColor = value.interpolateColor;
|
|
const value3 = env0_0.get();
|
|
binding = env0_1;
|
|
const binding2 = env0_2;
|
|
return {backgroundColor: Reflect.apply(interpolateColor, value, [value3, [0, FLASH_TIME_PERCENT, FLASH_TIME_PERCENT,
|
|
FLASH_TIME_PERCENT + FLASH_DURATION_PERCENT, 1], [binding, binding, binding2, binding2, binding]])};
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun59009, 7324, [31, 27, 33, 4501, 697, 4017, 4504, 674,
|
|
2]) /* metro module 7324, dependencies: [31, 27, 33, 4501, 697, 4017, 4504, 674, 2] */;
|