/* Metro module 4673; source: modules/image/native/ImagePicker.tsx; dependencies: [1310, 482, 477, 4674, 4675, 697, 4677, 1244, 2] */ function _fun40449(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#40449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4851:6, offset: 0x01100c6f, size: 195 bytes, params: 8, frame: 21 var object2; let env0_0 = require; const closure = launchImageLibrary; const closure2 = launchCamera; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */; const env0_4 = (require(482) /* metro dependency 482: Constants */).ThemeTypes; object2 = {launchImageLibrary: closure, launchImageLibraryAsync: function(a0) { var env0_0 = a0; var Promise = global.Promise; var value = Object.create(Promise.prototype, {constructor: {value: Promise}}); var value2 = new Promise(_fun40453); return value2 instanceof Object ? value2 : value; }, launchCamera: closure2, launchCameraAsync: function(a0) { var env0_0 = a0; var Promise = global.Promise; var value = Object.create(Promise.prototype, {constructor: {value: Promise}}); var value2 = new Promise(_fun40456); return value2 instanceof Object ? value2 : value; }, launchCropper: launchCropper}; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/image/native/ImagePicker.tsx'); exports.default = object2; } function launchImageLibrary(a0, a1) { // fn#40450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4851:127, offset: 0x01100d32, size: 261 bytes, params: 3, frame: 19 var value; let mediaType = a0.mediaType; if (mediaType !== 'any') { mediaType = a0.mediaType; } else { value = require(477) /* metro dependency 477: PlatformUtils */; value = value.isIOS(); mediaType = value ? 'mixed' : a0.mediaType; } const r7 = a0.selections ?? []; const disableNewIOSPicker = a0.disableNewIOSPicker; const value3 = undefined; const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */; const r8 = platformUtilsModule.isIOS() ? 'pageSheet' : value3; value = !Reflect.apply((require(4674) /* metro dependency 4674: ImagePickerUtils */).isActionPickSupported, value, []); const moduleValue2 = require(4675) /* metro dependency 4675 */; const launchImageLibrary = moduleValue2.launchImageLibrary; const object2 = {}; copyDataProperties(object2, a0, mediaType); object2['mediaType'] = mediaType; object2['presentationStyle'] = r8; object2['selection'] = r7; object2['useNewIOSPicker'] = !disableNewIOSPicker; object2['forceGetContent'] = value; Reflect.apply(launchImageLibrary, moduleValue2, [object2, a1]); return value3; } function launchCamera(a0, a1) { // fn#40451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4851:469, offset: 0x01100e37, size: 45 bytes, params: 3, frame: 14 (require(4675) /* metro dependency 4675 */).launchCamera(a0, a1); } function launchImageLibraryAsync(a0) { // fn#40452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4851:591, offset: 0x01100e64, size: 44 bytes, params: 2, frame: 11 const env0_0 = a0; const Promise = global.Promise; const value = Object.create(Promise.prototype, {constructor: {value: Promise}}); const promise = new Promise(function(a0) { launchImageLibrary(a0, _fun40454); }); return promise instanceof Object ? promise : value; } function launchCameraAsync(a0) { // fn#40455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4851:733, offset: 0x01100eb6, size: 44 bytes, params: 2, frame: 11 const env0_0 = a0; const Promise = global.Promise; const value = Object.create(Promise.prototype, {constructor: {value: Promise}}); const promise = new Promise(function(a0) { launchCamera(a0, _fun40457); }); return promise instanceof Object ? promise : value; } function launchCropper({uri, width, height, includeBase64, mimeType, freeStyleCropEnabled}) { // fn#40458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4851:833, offset: 0x01100f08, size: 821 bytes, params: 2, frame: 29 const theme = ThemeStore.theme; let internal = (importDefault(697) /* metro dependency 697: native */).internal; let resolveSemanticColor = internal.resolveSemanticColor; const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW; const semanticColor = Reflect.apply(resolveSemanticColor, internal, [theme, BACKGROUND_BASE_LOW]); internal = (importDefault(697) /* metro dependency 697: native */).internal; resolveSemanticColor = internal.resolveSemanticColor; const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH; const semanticColor2 = Reflect.apply(resolveSemanticColor, internal, [theme, BACKGROUND_SURFACE_HIGH]); internal = (importDefault(697) /* metro dependency 697: native */).internal; resolveSemanticColor = internal.resolveSemanticColor; const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY; const semanticColor3 = Reflect.apply(resolveSemanticColor, internal, [theme, MOBILE_TEXT_HEADING_PRIMARY]); internal = (importDefault(697) /* metro dependency 697: native */).internal; resolveSemanticColor = internal.resolveSemanticColor; const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED; const semanticColor4 = Reflect.apply(resolveSemanticColor, internal, [theme, TEXT_MUTED]); internal = (importDefault(697) /* metro dependency 697: native */).internal; resolveSemanticColor = internal.resolveSemanticColor; const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND; const semanticColor5 = Reflect.apply(resolveSemanticColor, internal, [theme, TEXT_BRAND]); internal = (importDefault(697) /* metro dependency 697: native */).internal; resolveSemanticColor = internal.resolveSemanticColor; const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT; const semanticColor6 = Reflect.apply(resolveSemanticColor, internal, [theme, TEXT_DEFAULT]); const defaultImport = importDefault(4677) /* metro dependency 4677 */; const openCropper = defaultImport.openCropper; const object2 = {mediaType: 'photo', path: uri, width: width, height: height, includeBase64: includeBase64, mimeType: mimeType, freeStyleCropEnabled: freeStyleCropEnabled}; let LIGHT = ThemeTypes.LIGHT; object2.cropperStatusBarLight = theme === LIGHT; LIGHT = ThemeTypes.LIGHT; object2.cropperNavigationBarLight = theme === LIGHT; object2.cropperActiveWidgetColor = semanticColor3; object2.cropperInactiveWidgetColor = semanticColor4; object2.cropperControlsColor = semanticColor2; object2.cropperControlsBarColor = semanticColor; object2.cropperChooseColor = semanticColor5; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; let string = intl.string; const t = (require(1244) /* metro dependency 1244: indexNative */).t; object2.cropperChooseText = Reflect.apply(string, intl, [t['1Qm822']]); object2.cropperCancelColor = semanticColor6; object2.cropperCancelText = intl.string(t['ETE/oC']); object2.cropperToolbarColor = semanticColor; object2.cropperToolbarWidgetColor = semanticColor3; object2.cropperToolbarTitle = intl.string(t.b0y3DL); string = intl.string; const Izf9u1 = t.Izf9u1; object2.cropperRotateByAngleAccessibilityLabel = Reflect.apply(string, intl, [Izf9u1]); object2.cropperResetRotationAccessibilityLabel = intl.string(t.iz4w1M); string = intl.string; const QHvDTL = t.QHvDTL; object2.cropperClampButtonAccessibilityLabel = Reflect.apply(string, intl, [QHvDTL]); return Reflect.apply(openCropper, defaultImport, [object2]); } function _fun40453(a0) { // fn#40453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4851:647, offset: 0x01100e90, size: 38 bytes, params: 2, frame: 13 launchImageLibrary(a0, _fun40454); } function _fun40456(a0) { // fn#40456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4851:783, offset: 0x01100ee2, size: 38 bytes, params: 2, frame: 13 launchCamera(a0, _fun40457); }