/* Metro module 5178; source: modules/collectibles/utils/CollectiblesUtils.tsx; dependencies: [4282, 4406, 5179, 5180, 3826, 2] */ 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}); const env0_3 = (require(4282) /* metro dependency 4282: StreamSettingsConstants */).ApplicationStreamPresets; (require(2) /* metro dependency 2 */).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 object2; const object3 = {}; const PRESET_CUSTOM = ApplicationStreamPresets.PRESET_CUSTOM; object3.qualityOptions = {preset: PRESET_CUSTOM, resolution: a0, frameRate: a1}; const MediaEngineContextTypes = (require(4406) /* metro dependency 4406: mediaEngine */).MediaEngineContextTypes; const STREAM = MediaEngineContextTypes.STREAM; object3.context = STREAM; if (a2 != null) { if (a2.desktopSource != null) { object3.desktopSettings = {sourceId: a2.desktopSource.id, sound: true}; } cameraSource = a2.cameraSource; if (cameraSource != null) { object2 = {}; cameraSource = a2.cameraSource; object2.videoDeviceGuid = cameraSource.videoDeviceGuid; cameraSource = a2.cameraSource; object2.audioDeviceGuid = cameraSource.audioDeviceGuid; object3.cameraSettings = object2; } } return object3; } 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 = (require(5179) /* metro dependency 5179: ShopVariantsReturnStyle */).ShopVariantsReturnStyle; const object2 = {}; if (a1 != null) { object2.tab = a1; } if (a0 != null) { if (a0.noCache === true) { object2.no_cache = true; } if (a0.includeUnpublished === true) { object2.include_unpublished = true; } if (a0.includeBundles === true) { object2.include_bundles = true; } if (a0.includeDynamicBlocks === true) { object2.include_dynamic_blocks = true; } if (a0.countryCode != null && a0.countryCode !== '') { object2.country_code = a0.countryCode; } if (a0.paymentGateway !== null) { object2.payment_gateway = a0.paymentGateway; } if (a0.variantsReturnStyle === ShopVariantsReturnStyle.VARIANTS_GROUP) { object2.variants_return_style = ShopVariantsReturnStyle.VARIANTS_GROUP; } if (a0.shopHomeConfig != null) { object2.shop_home_config = a0.shopHomeConfig; } if (a0.skipNumCategories != null) { object2.skip_num_categories = a0.skipNumCategories; } } return object2; } 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 = (importDefault(5180) /* metro dependency 5180: 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}; }