/* Metro module 13620; source: modules/quests/native/QuestProgressIndicator.tsx; dependencies: [31, 27, 4502, 33, 4017, 7744, 4501, 697, 566, 4504, 5278, 1244, 6760, 13621, 9542, 2] */ function _fun104023(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:6, offset: 0x0227bf12, size: 371 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = require(31) /* metro dependency 31 */; const env0_3 = value.useMemo; const env0_4 = value.useEffect; const env0_5 = value.useRef; value = importDefault(31) /* metro dependency 31 */; const env0_7 = (require(27) /* metro dependency 27 */).View; const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */; const value2 = require(33) /* metro dependency 33 */; const env0_9 = value2.jsx; const env0_10 = value2.jsxs; const env0_11 = ['#666777', '#535564']; const reanimatedRexport = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */; const createAnimatedComponent = reanimatedRexport.createAnimatedComponent; const Circle = (require(7744) /* metro dependency 7744 */).Circle; const env0_12 = Reflect.apply(createAnimatedComponent, reanimatedRexport, [Circle]); const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun104024); object = {code: 'function QuestProgressIndicatorTsx1(){const{glowOpacity}=this.__closure;return{shadowOpacity:glowOpacity.get()};}'}; object = {code: 'function QuestProgressIndicatorTsx2(){const{circumference,animatedProgress}=this.__closure;return{strokeDashoffset:circumference-circumference*animatedProgress.get()};}'}; object = {code: 'function QuestProgressIndicatorTsx3(){const{underlayOpacity,styles}=this.__closure;return{opacity:underlayOpacity.get(),...styles.opacityMask};}'}; value = value.memo(QuestProgressIndicator); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestProgressIndicator.tsx'); exports.default = value; } function _fun104024(a0) { // fn#104024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:303, offset: 0x0227c085, size: 291 bytes, params: 2, frame: 15 const object2 = {}; object2.wrapper = {position: 'relative'}; object2.container = {'position': 'relative', 'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center', 'zIndex': 1}; object2.completionGlow = {'shadowOffset': null, 'shadowRadius': 20, 'shadowOpacity': 0, 'elevation': 4, 'shadowColor': '#30C77399', shadowOffset: {'width': 0, 'height': 0}}; object2.canvas = {transform: [{rotate: '-90deg'}]}; const object3 = {position: 'absolute', height: 0.78 * a0, width: 0.78 * a0}; object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round; object3.overflow = 'hidden'; object2.imageContainer = object3; const GREEN_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_300; object2.progressPath = {color: GREEN_300}; object2.confetti = {'position': 'absolute', 'pointerEvents': 'none'}; const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT; object2.opacityMask = {'backgroundColor': null, 'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0, 'zIndex': 2, backgroundColor: CARD_BACKGROUND_DEFAULT}; return object2; } function QuestProgressIndicator({quest, size, progress, loading, hasConfetti, withAnimation, onPress, accessibilityLabel}) { // fn#104025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:1422, offset: 0x0227c1a8, size: 1735 bytes, params: 2, frame: 51 var r8; var intl; loading = !(loading === undefined) && loading; hasConfetti = !(hasConfetti === undefined) && hasConfetti; const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() { return AccessibilityStore.useReducedMotion; }); const property = ({'x-sm': 3, 'sm': 3, 'md': 3, 'md-lg': 4, 'lg': 6})[size]; const property2 = ({'x-sm': 40, 'sm': 64, 'md': 70, 'md-lg': 100, 'lg': 128})[size]; const property3 = ({'x-sm': 1.6, 'sm': 1, 'md': 1.4, 'md-lg': 1.5, 'lg': 1.6})[size]; const value7 = property2 / 2 - property / 2; let Math = global.Math; const PI = Math.PI; const value8 = 2 * PI * value7; const styles = useStyles(property2); const env0_6 = styles; const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(progress); const value12 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(loading ? 0.7 : 0); const userStatus = quest.userStatus; const value14 = userStatus?.completedAt != null; const value15 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(value14 ? 1 : 0); const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */; let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle; let closure = QuestProgressIndicatorI; closure.__closure = {glowOpacity: value15}; closure.__workletHash = 17183837725505; closure.__initData = env0_14; const value16 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]); const moduleValue6 = reanimatedRexportModule; const useAnimatedProps = moduleValue6.useAnimatedProps; closure = QuestProgressIndicatorG; closure.__closure = {circumference: value8, animatedProgress: value9}; closure.__workletHash = 17281152506254; closure.__initData = env0_15; const value17 = Reflect.apply(useAnimatedProps, moduleValue6, [closure]); const moduleValue7 = reanimatedRexportModule; useAnimatedStyle = moduleValue7.useAnimatedStyle; closure = QuestProgressIndicatorM; closure.__closure = {underlayOpacity: value12, styles: styles}; closure.__workletHash = 4427598698568; closure.__initData = env0_16; const value18 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]); useEffect(_fun104030, [value9, progress, useReducedMotion]); useEffect(_fun104032, [value12, loading]); const value19 = useRef(null); const env0_11 = value19; const value20 = useMemo(_fun104034, [styles.confetti, property3, property2]); useEffect(_fun104035, [value14, value15, useReducedMotion]); const PressableComponent = onPress == null ? env0_6.Fragment : (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity; Math = global.Math; const value21 = Math.round(100 * progress); const r2Props = {...(onPress == null ? {} : {onPress: onPress})}; const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View; const items2 = [styles.wrapper]; items2[1] = styles.completionGlow; items2[2] = value16; if (accessibilityLabel != null) { r8 = accessibilityLabel; } else { intl = (require(1244) /* metro dependency 1244: indexNative */).intl; r8 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Gj8Jqn, {percent: value21}); } const object = {'min': 0, 'max': 100}; object.now = value21; const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View; const view = ; const Svg = (require(7744) /* metro dependency 7744 */).Svg; const Defs = (require(7744) /* metro dependency 7744 */).Defs; const LinearGradient = (require(7744) /* metro dependency 7744 */).LinearGradient; const Stop = (require(7744) /* metro dependency 7744 */).Stop; const binding = env0_11; const items4 = []; const Circle = (require(7744) /* metro dependency 7744 */).Circle; items4[1] = ; items4[2] = ((Component) => )(env0_12); return ( {view} {items4} {hasConfetti ? ((Component) => )(importDefault(6760) /* metro dependency 6760: LottieAnimationView */) : null} {((Component) => )(importDefault(9542) /* metro dependency 9542: QuestRewardTile */)} ); } function QuestProgressIndicatorI() { // fn#104027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:1978, owner: QuestProgressIndicator.I, offset: 0x0227c86f, size: 25 bytes, params: 1, frame: 10 const object2 = {}; object2.shadowOpacity = env0_10.get(); return object2; } function QuestProgressIndicatorG() { // fn#104028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2115, owner: QuestProgressIndicator.G, offset: 0x0227c888, size: 37 bytes, params: 1, frame: 11 const binding = env0_5; const binding2 = env0_7; const get = binding2.get; return {strokeDashoffset: binding - binding * Reflect.apply(get, binding2, [])}; } function QuestProgressIndicatorM() { // fn#104029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2280, owner: QuestProgressIndicator.M, offset: 0x0227c8ad, size: 41 bytes, params: 1, frame: 13 const object2 = {}; const binding = env0_8; object2.opacity = binding.get(); copyDataProperties(object2, styles.opacityMask, binding); return object2; } function _fun104030() { // fn#104030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2413, offset: 0x0227c8d6, size: 89 bytes, params: 1, frame: 17 const binding = env0_7; const set = binding.set; const timingModule = require(4504) /* metro dependency 4504: timing */; Reflect.apply(set, binding, [timingModule.withTiming(progress, {duration: useReducedMotion ? 0 : 500})]); return _fun104031; } function _fun104032() { // fn#104032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2513, offset: 0x0227c95c, size: 95 bytes, params: 1, frame: 16 const binding = env0_8; const set = binding.set; const timingModule = require(4504) /* metro dependency 4504: timing */; Reflect.apply(set, binding, [timingModule.withTiming(loading ? 0.7 : 0, {duration: 500})]); return _fun104033; } function _fun104034() { // fn#104034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2628, offset: 0x0227c9e8, size: 78 bytes, params: 1, frame: 13 const object2 = {}; copyDataProperties(object2, styles.confetti, undefined); object2['width'] = env0_3; object2['height'] = env0_3; object2['transform'] = [{scale: env0_4}]; return object2; } function _fun104035() { // fn#104035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2711, offset: 0x0227ca36, size: 154 bytes, params: 1, frame: 16 var binding; var set; var value2; var moduleValue; var current; if (useReducedMotion) { env0_10.set(0); current = env0_11.current; if (current != null) { current.reset(); } } else if (env0_9) { binding = env0_10; set = binding.set; value2 = environment.__proto__; moduleValue = require(4504) /* metro dependency 4504: timing */; Reflect.apply(set, binding, [moduleValue.withTiming(1, {duration: 500})]); current = env0_11.current; if (current != null) { current.play(); } } else { env0_10.set(0); current = env0_11.current; if (current != null) { current.reset(); } } } function _fun104031() { // fn#104031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2466, offset: 0x0227c92f, size: 45 bytes, params: 1, frame: 12 const value = environment.__proto__.__proto__; (require(4017) /* metro dependency 4017: ReanimatedRexport */).cancelAnimation(env1_7); } function _fun104033() { // fn#104033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13817:2567, offset: 0x0227c9bb, size: 45 bytes, params: 1, frame: 12 const value = environment.__proto__.__proto__; (require(4017) /* metro dependency 4017: ReanimatedRexport */).cancelAnimation(env1_8); }