/* Metro module 5178; source: modules/collectibles/utils/CollectiblesUtils.tsx; dependencies: [4282, 4406, 5179, 5180, 3826, 2] */ import UseFractionalPremiumInfo from '../../billing/hooks/useFractionalPremiumInfo.tsx'; /* Metro dependency 5180 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as StreamSettingsConstantsModule from '../../go_live/StreamSettingsConstants.tsx'; /* Metro dependency 4282 */ import * as MediaEngineModule from '../../../external/discord_common/js/packages/media-engine/index.tsx'; /* Metro dependency 4406 */ import * as ShopVariantsReturnStyleModule from '../../../external/discord_common/js/shared/shared-constants/ShopVariantsReturnStyle.tsx'; /* Metro dependency 5179 */ function _fun45595(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5356:6, offset: 0x01192c10, size: 159 bytes, params: 8, frame: 18 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/collectibles/utils/CollectiblesUtils.tsx'); exports.constructGoLiveSource = constructGoLiveSource; exports.buildFetchCollectiblesOptionsQuery = buildFetchCollectiblesOptionsQuery; exports.getOptimizedProfileEffectThumbnailUrl = function(a0) { if (a0 != null) { return '' + a0 + '?width=100&height=195'; } }; exports.useFetchFractionalPremiumInfo = useFetchFractionalPremiumInfo; function constructGoLiveSource(a0, a1, a2) { // fn#45596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5356:237, offset: 0x01192caf, size: 185 bytes, params: 4, frame: 13 var cameraSource; var object; const object4 = {}; const PRESET_CUSTOM = ApplicationStreamPresets.PRESET_CUSTOM; object4.qualityOptions = {preset: PRESET_CUSTOM, resolution: a0, frameRate: a1}; const MediaEngineContextTypes = (MediaEngineModule).MediaEngineContextTypes; const STREAM = MediaEngineContextTypes.STREAM; object4.context = STREAM; if (a2 != null) { if (a2.desktopSource != null) { object4.desktopSettings = {sourceId: a2.desktopSource.id, sound: true}; } cameraSource = a2.cameraSource; if (cameraSource != null) { object = {}; cameraSource = a2.cameraSource; object.videoDeviceGuid = cameraSource.videoDeviceGuid; cameraSource = a2.cameraSource; object.audioDeviceGuid = cameraSource.audioDeviceGuid; object4.cameraSettings = object; } } return object4; } function buildFetchCollectiblesOptionsQuery(a0, a1) { // fn#45597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5356:644, offset: 0x01192d68, size: 295 bytes, params: 3, frame: 17 const ShopVariantsReturnStyle = (ShopVariantsReturnStyleModule).ShopVariantsReturnStyle; const object = {}; if (a1 != null) { object.tab = a1; } if (a0 != null) { if (a0.noCache === true) { object.no_cache = true; } if (a0.includeUnpublished === true) { object.include_unpublished = true; } if (a0.includeBundles === true) { object.include_bundles = true; } if (a0.includeDynamicBlocks === true) { object.include_dynamic_blocks = true; } if (a0.countryCode != null && a0.countryCode !== '') { object.country_code = a0.countryCode; } if (a0.paymentGateway !== null) { object.payment_gateway = a0.paymentGateway; } if (a0.variantsReturnStyle === ShopVariantsReturnStyle.VARIANTS_GROUP) { object.variants_return_style = ShopVariantsReturnStyle.VARIANTS_GROUP; } if (a0.shopHomeConfig != null) { object.shop_home_config = a0.shopHomeConfig; } if (a0.skipNumCategories != null) { object.skip_num_categories = a0.skipNumCategories; } } return object; } function useFetchFractionalPremiumInfo() { // fn#45599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5356:1426, offset: 0x01192ebb, size: 111 bytes, params: 1, frame: 15 var value; const value2 = (UseFractionalPremiumInfo)({forceFetch: true}); value = Reflect.apply((require(3826) /* metro dependency 3826: DateUtils */).dateFormat, value, [value2.endsAt, 'L']); return {isLoading: !value2.fetched, isFractionalPremiumActive: value2.isFractionalPremiumActive, expiresAt: value}; } } global.__d(_fun45595, 5178, [4282, 4406, 5179, 5180, 3826, 2]) /* metro module 5178, dependencies: [4282, 4406, 5179, 5180, 3826, 2] */;