/* Metro module 15356; source: modules/external_pip/ExternalPipViewVideo.android.tsx; dependencies: [57, 31, 27, 1379, 1878, 4299, 33, 4501, 697, 10674, 4068, 4573, 1244, 566, 1305, 10678, 3860, 15357, 10687, 15358, 10684, 2] */ function _fun117377(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15553:6, offset: 0x024b0aae, size: 904 bytes, params: 8, frame: 33 var object5; const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(57) /* metro dependency 57 */; let value = importAll(31) /* metro dependency 31 */; const value2 = require(27) /* metro dependency 27 */; const env0_5 = value2.ActivityIndicator; const StyleSheet = value2.StyleSheet; const env0_6 = value2.View; const env0_7 = value2.PixelRatio; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const env0_10 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes; const value3 = require(33) /* metro dependency 33 */; const env0_11 = value3.jsx; const env0_12 = value3.jsxs; const env0_13 = value3.Fragment; const createStylesModule = require(4501) /* metro dependency 4501: createStyles */; const createStyles = createStylesModule.createStyles; object5 = {}; const object7 = {}; copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined); let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH; object7['backgroundColor'] = BACKGROUND_SURFACE_HIGH; object5.container = object7; const object8 = {}; copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined); object5.video = object8; const object10 = {}; copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined); let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object10['margin'] = PX_16; object10['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.sm; object10['justifyContent'] = 'center'; object10['alignContent'] = 'center'; object10['flexDirection'] = 'row'; object10['alignItems'] = 'center'; object10['flexWrap'] = 'wrap'; object10['flex'] = 1; object5.videoUnavailableWrap = object10; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object5.videoUnavailableSpinner = {marginTop: PX_16}; const object11 = {}; BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH; object11.backgroundColor = BACKGROUND_SURFACE_HIGH; object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object11.padding = PX_8; PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object11.margin = PX_8; object11.justifyContent = 'center'; object11.alignContent = 'center'; object11.alignItems = 'center'; object11.flexDirection = 'row'; object11.flexWrap = 'wrap'; object11.flex = 1; object5.unavailable = object11; const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4; object5.unavailableText = {marginLeft: PX_4, textAlign: 'center'}; PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object5.unavaiableImage = {'marginBottom': null, 'resizeMode': 'contain', 'aspectRatio': 2.5, 'width': '80%', marginBottom: PX_8}; const object12 = {}; copyDataProperties(object12, StyleSheet.absoluteFillObject, undefined); const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST; object12['backgroundColor'] = BACKGROUND_BASE_LOWEST; object12['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.sm; PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object12['margin'] = PX_8; object12['alignItems'] = 'center'; object12['justifyContent'] = 'center'; object5.user = object12; const env0_14 = Reflect.apply(createStyles, createStylesModule, [object5]); value = value.memo(ExternalPipViewVideo); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/external_pip/ExternalPipViewVideo.android.tsx'); exports.default = value; } function ExternalPipViewVideoUnavailable({wasStream}) { // fn#117378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15553:1304, offset: 0x024b0e36, size: 306 bytes, params: 2, frame: 23 const styles = useStyles(); const r5 = wasStream ? ((StreamEnded) => )((require(10674) /* metro dependency 10674: StreamEnded */).StreamEnded) : ((CircleInformationIcon) => )((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon); const Text = (require(4573) /* metro dependency 4573: Text */).Text; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; return ( {r5} {wasStream ? intl.formatToMarkdownString((require(1244) /* metro dependency 1244: indexNative */).t['1Ww0Hi'], {}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Nzo5nz)} ); } function ExternalPipViewVideoUser({userId, channelId, speaking}) { // fn#117379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15553:1698, offset: 0x024b0f68, size: 263 bytes, params: 2, frame: 24 const styles = useStyles(); const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() { return UserStore.getUser(userId); }); return ( {user != null ? ((Avatar) => )((require(1305) /* metro dependency 1305: native */).Avatar) : null} ); } function ExternalPipViewVideoStream({streamId, userId}) { // fn#117382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15553:2109, offset: 0x024b1099, size: 416 bytes, params: 2, frame: 27 const value2 = (require(10678) /* metro dependency 10678: SurfaceDirectRendererExperiment */).useSurfaceDirectRendererExperiment(userId, {location: 'ExternalPipViewVideoStream'}); const {streamReady, streamReadLongTime, streamReadyCallback} = useStreamReady(streamId); const styles = useStyles(); const value4 = env0_4.useMemo(_fun117388, [styles, streamReady]); const useTokenModule = require(3860) /* metro dependency 3860: useToken */; const useToken = useTokenModule.useToken; const TEXT_FEEDBACK_INFO = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_INFO; return ( <> {((Component) => )(importDefault(10687) /* metro dependency 10687: DCDVideoRenderer */)} {streamReady == null && streamReadLongTime ? : null} ); } function ExternalPipViewVideo({onLayout}) { // fn#117390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15553:3169, offset: 0x024b13f2, size: 271 bytes, params: 2, frame: 24 const styles = useStyles(); const {channelId, selectedParticipantStreamId, selectedParticipantUserId, selectedParticipantSpeaking, focusedParticipantType} = (importDefault(15358) /* metro dependency 15358: useExternalPipParticipantAndroid */)(); env0_4.useEffect(_fun117391, [selectedParticipantStreamId, selectedParticipantUserId, focusedParticipantType]); return ( {selectedParticipantStreamId != null ? : selectedParticipantUserId != null ? : } ); } function _fun117381() { // fn#117381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15553:1866, offset: 0x024b106f, size: 42 bytes, params: 1, frame: 11 const value = environment.__proto__; return ChannelStore.getChannel(channelId)?.guild_id; } function useStreamReady(a0) { // fn#117383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15553:2263, owner: ExternalPipViewVideoStream.useStreamReady, offset: 0x024b1239, size: 211 bytes, params: 2, frame: 21 const env0_0 = a0; undefined !== undefined; const [property, env0_3] = env1_3(env1_4.useState(undefined), 2); const [property2, env0_4] = env1_3(env1_4.useState(false), 2); const value6 = env1_4.useCallback(_fun117384, [a0]); env1_4.useEffect(_fun117385, [property, 300]); return {streamReady: property, streamReadLongTime: property2, streamReadyCallback: value6}; } function _fun117388() { // fn#117388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15553:2675, offset: 0x024b1352, size: 51 bytes, params: 1, frame: 4 return [styles.video, {opacity: streamReady == null ? 0 : 1}]; } function _fun117389(a0) { // fn#117389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15553:2801, offset: 0x024b1385, size: 109 bytes, params: 2, frame: 17 var layout; var width; var height; var value2; var moduleValue; var updateVideoSize; var binding; let streamIdBinding = streamId; if (streamIdBinding != null) { layout = a0.nativeEvent.layout; width = layout.width; height = layout.height; value2 = environment.__proto__; moduleValue = require(15357) /* metro dependency 15357: VideoActionCreators */; updateVideoSize = moduleValue.updateVideoSize; streamIdBinding = streamId; binding = env0_3; Reflect.apply(updateVideoSize, moduleValue, [streamIdBinding, {width: width * binding, height: height * binding}, 1]); } } function _fun117391() { // fn#117391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15553:3391, offset: 0x024b1501, size: 37 bytes, params: 1, frame: 11 const value = environment.__proto__; (importDefault(10684) /* metro dependency 10684: ExternalPipAndroid */).refreshPipUi(); } function _fun117385() { // fn#117385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15553:2436, offset: 0x024b130c, size: 70 bytes, params: 1, frame: 14 if (env0_2 == null) { var env0_0 = global.setTimeout(_fun117386, env0_1); return _fun117387; } env0_4(false); }