/* Metro module 13940; source: components_native/ChangeLogModal.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 661, 1933, 33, 4501, 697, 3868, 9544, 683, 13941, 5475, 9543, 1244, 5278, 8792, 11059, 1305, 8336, 1478, 8337, 1485, 5282, 3738, 8338, 4573, 5080, 5280, 2] */ function _fun105809(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:6, offset: 0x022c34d8, size: 831 bytes, params: 8, frame: 25 var object2; const env0_0 = require; const closure = ChangeLogScreen; const hideChangeLog = function() { importDefault(dependencyMap[31]).popWithKey(CHANGELOG_MODAL_KEY); }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(6) /* metro dependency 6 */; const env0_4 = importDefault(7) /* metro dependency 7 */; const env0_5 = importDefault(15) /* metro dependency 15 */; const env0_6 = importDefault(17) /* metro dependency 17 */; const env0_7 = importDefault(18) /* metro dependency 18 */; const value = importAll(31) /* metro dependency 31 */; const env0_9 = (require(27) /* metro dependency 27 */).View; const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents; const env0_11 = (require(1933) /* metro dependency 1933: ChangelogConstants */).CHANGELOG_MODAL_KEY; const value2 = require(33) /* metro dependency 33 */; const env0_12 = value2.jsx; const env0_13 = value2.jsxs; const createStylesModule = require(4501) /* metro dependency 4501: createStyles */; let createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles; object2 = {}; object2.video = {alignSelf: 'center'}; object2.videoWrapper = {marginBottom: 8}; const object3 = {}; object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs; object3.overflow = 'hidden'; object2.videoSpecial = object3; object2.videoOverlay = {'position': 'absolute', 'width': '100%', 'height': '100%'}; const object6 = {'position': 'absolute', 'top': '50%', 'left': '50%', 'marginLeft': -28, 'marginTop': -28, 'borderRadius': null, 'backgroundColor': null, 'width': 56, 'height': 56}; object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round; const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH; object6.backgroundColor = BACKGROUND_SURFACE_HIGH; object2.playButton = object6; object2.playIcon = {'width': 21, 'height': 21}; object2.empty = {'width': '100%', 'height': 240, 'alignItems': 'center', 'paddingTop': 48}; const env0_15 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object2]); const value4 = createStylesModule; createLegacyClassComponentStyles = value4.createLegacyClassComponentStyles; object2 = {}; const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG; object2.bulletPoint = {'width': 7, 'height': 7, 'borderRadius': 3.5, 'marginRight': 13, 'marginTop': 7, backgroundColor: BACKGROUND_MOD_STRONG}; object2.listItem = {'flexDirection': 'row', 'marginLeft': 4, 'marginBottom': 8}; const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT; object2.listText = {'color': null, 'fontSize': 14, 'lineHeight': 18, 'flex': 1, color: TEXT_DEFAULT}; object2.listItemContent = {'flexDirection': 'column', 'flex': 1}; const env0_16 = Reflect.apply(createLegacyClassComponentStyles, value4, [object2]); let PureComponent = value.PureComponent; const value5 = _fun105821(PureComponent); const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext; value5.contextType = ThemeContext; PureComponent = value.PureComponent; _fun105824(PureComponent).contextType = ThemeContext; (require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/ChangeLogModal.tsx'); exports.default = ChangelogModal; exports.ListItem = value5; exports.ChangeLogScreen = closure; } function _callSuper_105810(a0, a1, a2) { // fn#105810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:255, offset: 0x022c3817, size: 100 bytes, params: 4, frame: 20 var r0; var Reflect; let value = a2; const value3 = env0_6(a1); const binding = env0_5; if (_isNativeReflectConstruct_105811()) { Reflect = global.Reflect; value = Reflect.construct(value3, value || [], env0_6(a0).constructor); r0 = value; } else { value = value3.apply(a0, value); r0 = value; } return binding(a0, r0); } function _isNativeReflectConstruct_105811() { // fn#105811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:386, offset: 0x022c387b, size: 98 bytes, params: 1, frame: 18 var Boolean; var prototype; var valueOf; var call; var Reflect; var construct; var closure; var value; var error; try { Boolean = global.Boolean; prototype = Boolean.prototype; valueOf = prototype.valueOf; call = valueOf.call; Reflect = global.Reflect; construct = Reflect.construct; Boolean = global.Boolean; closure = function() { }; value = Reflect.apply(construct, Reflect, [Boolean, [], closure]); value = Reflect.apply(call, valueOf, [value]); var result = !value; } catch (error) { } return (_isNativeReflectConstruct_105811_isNativeReflectConstruct = function() { return !!result; })(); } function ChangeLogScreen({onClose}) { // fn#105814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:4511, offset: 0x022c38dd, size: 666 bytes, params: 2, frame: 25 var r0; const Text = (require(4573) /* metro dependency 4573: Text */).Text; var object3; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var string; var t; const value2 = (require(4501) /* metro dependency 4501: createStyles */).useLegacyClassComponentStyles(env0_15); const {changelog, loaded, clientTooOld} = (require(8337) /* metro dependency 8337: useCurrentChangelog */).useCurrentChangelog(); let {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)(); const value5 = width - 36; const value6 = value5 * env0_14; const value7 = 0.5 * height; const object4 = {}; const Math = global.Math; object4.height = Math.min(value6, value7); object4.width = value6 > value7 ? value7 / env0_14 : value5; width = object4.width; height = object4.height; const value9 = (require(1485) /* metro dependency 1485 */).useNavigation(); const r10 = onClose ?? ChangeLogScreenE; env0_8.useEffect(_fun105816, [changelog, value9]); env0_8.useEffect(function() { if (loaded) { if (changelog != null) { return _fun105819; } } }, [loaded, changelog]); if (clientTooOld) { r0 = {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.V9ospk)}; } else if (changelog == null) { var viewBindingProps = {style: value2.empty}; object3 = {variant: 'text-md/semibold'}; string = intl.string; t = (require(1244) /* metro dependency 1244: indexNative */).t; if (loaded) { viewBindingProps.children = {Reflect.apply(string, intl, [t.O1iRT8])}; } else { viewBindingProps.children = {Reflect.apply(string, intl, [t.ZTNur7])}; } r0 = ; } else { r0 = ((Component) => )(env0_17); } return r0; } function _fun105821(a0) { // fn#105821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1473, offset: 0x022c3d4b, size: 72 bytes, params: 2, frame: 15 const closure = ListItem; env0_7(closure, a0); return env0_4(closure, [{key: 'render', value: value_105823}]); } function _fun105824(a0) { // fn#105824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1884, offset: 0x022c3e60, size: 172 bytes, params: 2, frame: 16 const closure = ChangeLog; env0_7(closure, a0); return env0_4(closure, [{key: 'componentDidMount', value: function() { var Date = global.Date; this.mountedAt = Date.now(); this.track(AnalyticEvents.CHANGE_LOG_OPENED); }}, {key: 'componentWillUnmount', value: function() { this.track(AnalyticEvents.CHANGE_LOG_CLOSED); }}, {key: 'track', value: value_105830}, {key: 'renderVideo', value: value_105831}, {key: 'render', value: value_105834}]); } function ChangelogModal() { // fn#105835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:5855, offset: 0x022c45d0, size: 87 bytes, params: 1, frame: 14 const value2 = env0_8.useMemo(function() { var object2 = {name: 'CHANGELOG'}; object2.headerLeft = require(dependencyMap[27]).getHeaderCloseButton(hideChangeLog); object2.render = _fun105837; return {CHANGELOG: object2}; }, []); const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator; return ; } function ChangeLogScreenE() { // fn#105815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:4877, owner: ChangeLogScreen.e, offset: 0x022c3b77, size: 19 bytes, params: 1, frame: 9 return env0_2.goBack(); } function _fun105816() { // fn#105816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:4906, offset: 0x022c3b8a, size: 48 bytes, params: 1, frame: 12 var binding; if (changelog != null) { binding = env0_2; binding.setOptions({headerTitle: headerTitle_105817}); } } function _fun105818() { // fn#105818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:5180, offset: 0x022c3cc5, size: 35 bytes, params: 1, frame: 2 if (loaded) { if (changelog != null) { return _fun105819; } } } function ListItem() { // fn#105822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1485, offset: 0x022c3d93, size: 42 bytes, params: 1, frame: 16 env1_3(this, ListItem); return _callSuper_105810(this, ListItem, arguments); } function value_105823() { // fn#105823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1618, offset: 0x022c3dbd, size: 163 bytes, params: 1, frame: 22 const children = this.props.children; const value = environment.__proto__; const value2 = env1_16(this.context); return ( {typeof children !== 'function' ? children : children({style: value2.listText})} ); } function ChangeLog(a0) { // fn#105825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:1896, offset: 0x022c3f0c, size: 141 bytes, params: 2, frame: 19 let value = copyRestArgs(0, undefined); env1_3(this, ChangeLog); const _callSuper_105810Binding = _callSuper_105810; const items = []; arraySpread(items, value, 0, value); value = _callSuper_105810Binding(this, ChangeLog, items); value.mountedAt = 0; value.ref = env1_8.createRef(); value.maxScrolledPercentage = 0; value.state = {ytVideoReady: false}; value.handleScroll = handleScroll_105826; value.playVideo = playVideo; return value; } function value_105830(a0) { // fn#105830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:2855, offset: 0x022c4130, size: 267 bytes, params: 2, frame: 22 var r3; var object3; var object4; var Math; let value = a1; const r1 = value !== undefined ? value : {}; const changeLog = this.props.changeLog; if (changeLog != null) { object3 = {}; object3.change_log_id = '' + changeLog.date + ':' + changeLog.revision; copyDataProperties(object3, r1, undefined); value = environment.__proto__; if (a0 !== AnalyticEvents.CHANGE_LOG_CLOSED) { r3 = object3; } else { object4 = {}; Math = global.Math; object4.seconds_open = Math.round((global.Date.now() - this.mountedAt) / 1000); object4.max_scrolled_percentage = 100 * global.parseInt(this.maxScrolledPercentage.toPrecision(4), 10); copyDataProperties(object4, object3, undefined); r3 = object4; } value = importDefault(683) /* metro dependency 683: AnalyticsUtils */; value.track(a0, r3); } } function value_105831() { // fn#105831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14137:3188, offset: 0x022c423b, size: 766 bytes, params: 1, frame: 34 var environment; var r7; var r0; var object; var r8; var items3; var Video; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var items2; const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity; var playVideo; let value = environment.__proto__; const value2 = env1_15(this.context); const {changeLog, width, height, onClose} = this.props; const video = changeLog.video; const image = changeLog.image; const youtube_video_id = changeLog.youtube_video_id; const ytVideoReady = this.state.ytVideoReady; const value3 = null; if (value3 != video) { object = {videoURI: video}; var viewBindingProps = {style: value2.videoWrapper, onAccessibilityEscape: onClose}; var viewBinding2Props = {ref: this.ref, style: value2.videoSpecial}; Video = importDefault(9543) /* metro dependency 9543: Video */; items2 = [