// Module ID: 9738 // Function ID: 9739 // Name: GIFPickerUtils // Dependencies: [1085, 9737, 2] // Exports: calculateAnalyticsMetadata, getGIFThumbnailForFavorite, isKlipyProvider, shouldUseAnimatedWebPThumbnail // Module 9738 (GIFPickerUtils) import Constants from "Constants" /* 1085 */; import GifProvider from "GifProvider" /* 9737 */; import size from "module_2" /* 2 */; const SearchTypes = Constants.SearchTypes; const result = size.fileFinishedImporting("utils/GIFPickerUtils.tsx"); export const isKlipyProvider = function isKlipyProvider(arg0) { return arg0 === GifProvider.GIF_PROVIDER_EMBED_NAME; }; export const shouldUseAnimatedWebPThumbnail = function shouldUseAnimatedWebPThumbnail(arg0) { return arg0 === GifProvider.GIF_PROVIDER_EMBED_NAME; }; export const getGIFThumbnailForFavorite = function getGIFThumbnailForFavorite(providerName) { if (providerName.providerName === GifProvider.GIF_PROVIDER_EMBED_NAME) { const thumbnail = providerName.thumbnail; if (null != thumbnail) { let uri = thumbnail.proxyURL; if (uri == null) { uri = thumbnail.url; } if (uri == null) { uri = thumbnail.uri; } return uri; } } }; export const calculateAnalyticsMetadata = function calculateAnalyticsMetadata(analyticsID, TRENDING_GIFS, arg2) { let limit; let num2; let obj; let offset; let tmp2; let totalResults; if (null != TRENDING_GIFS) { const obj2 = {}; obj2[TRENDING_GIFS] = 1; obj = obj2; } else { obj = {}; } let obj3 = arg2; if (arg2 == null) { obj3 = {}; } ({ offset, limit, results } = obj3); const obj4 = { search_type: SearchTypes.GIF, load_id: analyticsID, limit, offset, page: num2, total_results: totalResults, page_results: tmp2, num_modifiers: Object.keys(obj).length, modifiers: obj }; num2 = 1; totalResults = obj3.totalResults; if (null != limit) { num2 = 1; if (null != offset) { const _Math = Math; num2 = Math.floor(offset / limit) + 1; } } tmp2 = null; if (null != results) { tmp2 = results; } return obj4; };