Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,63 @@
|
||||
/* Metro module 9813; source: modules/gif_picker/FavoriteGIFHooks.tsx; dependencies: [31, 9767, 22, 2] */
|
||||
function _fun76844(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9999:6, offset: 0x01de756e, size: 174 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const closure = useFavoriteGIFs;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = {};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gif_picker/FavoriteGIFHooks.tsx');
|
||||
exports.useFavoriteGIFs = closure;
|
||||
exports.useSortedFavoriteGIFs = useSortedFavoriteGIFs;
|
||||
exports.useShouldShowTooltipOnFavorite = useShouldShowTooltipOnFavorite;
|
||||
exports.useIsFavoriteGIF = useIsFavoriteGIF;
|
||||
}
|
||||
|
||||
function useFavoriteGIFs() { // fn#76845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9999:111, offset: 0x01de761c, size: 66 bytes, params: 1, frame: 13
|
||||
const value2 = undefined;
|
||||
const frecencyUserSettingsHooksModule = require(9767) /* metro dependency 9767: FrecencyUserSettingsHooks */;
|
||||
const useFrecencySettings = frecencyUserSettingsHooksModule.useFrecencySettings;
|
||||
const favoriteGifs = Reflect.apply(useFrecencySettings, frecencyUserSettingsHooksModule, []).favoriteGifs;
|
||||
return (favoriteGifs == null ? value2 : favoriteGifs.gifs) ?? env0_4;
|
||||
}
|
||||
|
||||
function useSortedFavoriteGIFs(a0) { // fn#76846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9999:365, offset: 0x01de765e, size: 62 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
return env0_3.useMemo(_fun76847, [useFavoriteGIFs(), a0]);
|
||||
}
|
||||
|
||||
function useShouldShowTooltipOnFavorite() { // fn#76849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9999:621, offset: 0x01de774c, size: 68 bytes, params: 1, frame: 12
|
||||
const value = undefined;
|
||||
const frecencyUserSettingsHooksModule = require(9767) /* metro dependency 9767: FrecencyUserSettingsHooks */;
|
||||
const useFrecencySettings = frecencyUserSettingsHooksModule.useFrecencySettings;
|
||||
const favoriteGifs = Reflect.apply(useFrecencySettings, frecencyUserSettingsHooksModule, []).favoriteGifs;
|
||||
const hideTooltip = favoriteGifs == null ? value : favoriteGifs.hideTooltip;
|
||||
return hideTooltip != null && hideTooltip;
|
||||
}
|
||||
|
||||
function useIsFavoriteGIF(a0) { // fn#76850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9999:785, offset: 0x01de7790, size: 28 bytes, params: 2, frame: 9
|
||||
return useFavoriteGIFs()[a0] != null;
|
||||
}
|
||||
|
||||
function _fun76847() { // fn#76847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9999:441, offset: 0x01de769c, size: 92 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value = value(env0_1);
|
||||
value = value.map(_fun76848);
|
||||
value = value.sortBy('order');
|
||||
value = value.reverse();
|
||||
return value.value();
|
||||
}
|
||||
|
||||
function _fun76848(a0, a1) { // fn#76848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9999:461, offset: 0x01de76f8, size: 84 bytes, params: 3, frame: 17
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, a1);
|
||||
object2['url'] = a1;
|
||||
const value = environment.__proto__;
|
||||
let r2 = env1_0?.(a0.src, a1);
|
||||
r2 = r2 ?? a0.src;
|
||||
object2['src'] = r2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/* Metro module 11038; source: modules/gif_picker/GifPickerUtils.tsx; dependencies: [1244, 2] */
|
||||
function _fun84498(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11224:6, offset: 0x01f4d205, size: 96 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gif_picker/GifPickerUtils.tsx');
|
||||
exports.getSearchPlaceholder = getSearchPlaceholder_84499;
|
||||
}
|
||||
|
||||
function getSearchPlaceholder_84499(a0) { // fn#84499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11224:186, offset: 0x01f4d265, size: 215 bytes, params: 2, frame: 14
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
if (a0 === 'giphy') {
|
||||
return intl.string(t.DFoK1a);
|
||||
}
|
||||
if (a0 === 'klipy') {
|
||||
return intl.string(t.T1Frnm);
|
||||
}
|
||||
const string = intl.string;
|
||||
const TnYqke = t.TnYqke;
|
||||
return Reflect.apply(string, intl, [TnYqke]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
/* Metro module 9816; source: modules/gif_picker/experiments/GifProviderConfig.tsx; dependencies: [3, 9817, 9818, 2] */
|
||||
function _fun76903(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10002:6, offset: 0x01de8ff7, size: 184 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const closure = getGifProviderConfig;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('GifProviderConfig');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gif_picker/experiments/GifProviderConfig.tsx');
|
||||
exports.getGifProviderConfig = closure;
|
||||
exports.getProviderForAPIRequest = getProviderForAPIRequest;
|
||||
exports.getExperimentContext = getExperimentContext;
|
||||
}
|
||||
|
||||
function getGifProviderConfig() { // fn#76904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10002:142, offset: 0x01de90af, size: 175 bytes, params: 1, frame: 14
|
||||
var value;
|
||||
var property;
|
||||
var moduleValue;
|
||||
var GifProvidersExperiment;
|
||||
var object2;
|
||||
var config;
|
||||
var enableMetrics;
|
||||
var provider;
|
||||
var fallbackProvider;
|
||||
var error;
|
||||
var binding;
|
||||
var DEFAULT_GIF_PROVIDER_CONFIG;
|
||||
try {
|
||||
value = environment;
|
||||
property = dependencyMap[1];
|
||||
moduleValue = require(property);
|
||||
GifProvidersExperiment = moduleValue.GifProvidersExperiment;
|
||||
config = GifProvidersExperiment.getConfig({location: 'gif_picker'});
|
||||
object2 = {};
|
||||
enableMetrics = config.enableMetrics;
|
||||
object2.enabled = enableMetrics;
|
||||
provider = config.provider;
|
||||
object2.userProvider = provider;
|
||||
object2.sendProviderToAPI = true;
|
||||
fallbackProvider = config.fallbackProvider;
|
||||
object2.fallbackProvider = fallbackProvider;
|
||||
} catch (error) {
|
||||
binding = env0_2;
|
||||
binding.warn('Error getting GIF provider experiment config:', error);
|
||||
object2 = {};
|
||||
DEFAULT_GIF_PROVIDER_CONFIG = require(dependencyMap[2]).DEFAULT_GIF_PROVIDER_CONFIG;
|
||||
copyDataProperties(object2, DEFAULT_GIF_PROVIDER_CONFIG, require);
|
||||
object2['userProvider'] = env0_3;
|
||||
return object2;
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getProviderForAPIRequest() { // fn#76905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10002:651, offset: 0x01de915e, size: 94 bytes, params: 1, frame: 14
|
||||
var value;
|
||||
var property;
|
||||
var moduleValue;
|
||||
var GifProvidersExperiment;
|
||||
var config;
|
||||
var provider;
|
||||
var error;
|
||||
var binding;
|
||||
try {
|
||||
value = environment;
|
||||
property = dependencyMap[1];
|
||||
moduleValue = require(property);
|
||||
GifProvidersExperiment = moduleValue.GifProvidersExperiment;
|
||||
config = GifProvidersExperiment.getConfig({location: 'gif_picker'});
|
||||
provider = config.provider;
|
||||
} catch (error) {
|
||||
binding = env0_2;
|
||||
binding.warn('Error getting provider for API request:', error);
|
||||
return env0_3;
|
||||
}
|
||||
return provider;
|
||||
}
|
||||
|
||||
function getExperimentContext() { // fn#76906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10002:868, offset: 0x01de91bc, size: 95 bytes, params: 1, frame: 13
|
||||
var r2;
|
||||
var value;
|
||||
var gifProviderConfig;
|
||||
var object2;
|
||||
var userProvider;
|
||||
var value3;
|
||||
var binding;
|
||||
var enabled;
|
||||
var error;
|
||||
try {
|
||||
value = environment;
|
||||
gifProviderConfig = getGifProviderConfig();
|
||||
object2 = {bucket: null};
|
||||
userProvider = gifProviderConfig.userProvider;
|
||||
value3 = userProvider != null;
|
||||
if (value3) {
|
||||
userProvider = gifProviderConfig.userProvider;
|
||||
r2 = userProvider;
|
||||
} else {
|
||||
binding = env0_3;
|
||||
r2 = binding;
|
||||
}
|
||||
object2.provider = r2;
|
||||
enabled = gifProviderConfig.enabled;
|
||||
object2.enabled = enabled;
|
||||
} catch (error) {
|
||||
return {'bucket': null, 'provider': null, 'enabled': false, provider: env0_3};
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/* Metro module 9817; source: modules/gif_picker/experiments/GifProvidersExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun76907(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10003:6, offset: 0x01de921b, size: 195 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(1854) /* metro dependency 1854: apex */;
|
||||
value = value.createApexExperiment({'name': '2025-10-gif-providers-multi-treatment', 'kind': 'user',
|
||||
defaultConfig: {'provider': 'tenor', 'fallbackProvider': 'tenor', 'enableMetrics': true},
|
||||
variations: {[0]: {'provider': 'tenor', 'fallbackProvider': 'tenor', 'enableMetrics': true},
|
||||
[1]: {'provider': 'giphy', 'fallbackProvider': 'tenor', 'enableMetrics': true}, [2]: {'provider': 'klipy',
|
||||
'fallbackProvider': 'tenor', 'enableMetrics': true}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gif_picker/experiments/GifProvidersExperiment.tsx');
|
||||
exports.GifProvidersExperiment = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
/* Metro module 11034; source: modules/gif_picker/native/GIFPicker.tsx; dependencies: [57, 31, 27, 9815, 661, 33, 4501, 9814, 683, 7556, 1478, 11035, 22, 566, 10748, 11036, 11037, 11041, 11044, 2] */
|
||||
function _fun84472(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11220:6, offset: 0x01f4bcdd, size: 318 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_6 = (require(27) /* metro dependency 27 */).View;
|
||||
const gifPickerViewStore = importDefault(9815) /* metro dependency 9815: GIFPickerViewStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = constantsModule.AnalyticEvents;
|
||||
const env0_9 = constantsModule.ChatInputComponentViewedTypes;
|
||||
const env0_10 = constantsModule.GIF_FETCH_LIMIT_IOS;
|
||||
const env0_11 = constantsModule.GIFPickerResultTypes;
|
||||
const env0_12 = constantsModule.TooltipNames;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_13 = value3.jsx;
|
||||
const env0_14 = value3.jsxs;
|
||||
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flex: 1}});
|
||||
value = value.memo(GIFPicker);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gif_picker/native/GIFPicker.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function GIFPicker({bottomSheetRef, channelId, guildId, hideFavorites, initialQuery, onPressGIF}) { // fn#84473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11220:356, offset: 0x01f4be1b, size: 961 bytes, params: 2, frame: 35
|
||||
var r5;
|
||||
const env0_4 = onPressGIF;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const binding = env0_5;
|
||||
binding.useEffect(_fun84474, [channelId, guildId]);
|
||||
const {columns, columnWidth} = binding.useMemo(_fun84475,
|
||||
[(importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)(),
|
||||
(importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)()]);
|
||||
const value6 = binding.useRef(null);
|
||||
let useState = binding.useState;
|
||||
const value7 = Reflect.apply(useState, binding, [false]);
|
||||
const binding2 = env0_4;
|
||||
const value8 = binding2(value7, 2);
|
||||
const property = value8[0];
|
||||
const env0_8 = value8[1];
|
||||
const env0_9 = binding.useRef('');
|
||||
const env0_10 = binding.useRef(false);
|
||||
useState = binding.useState;
|
||||
const value9 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property2 = value9[0];
|
||||
const env0_11 = value9[1];
|
||||
useState = binding.useState;
|
||||
const SEARCH = GIFPickerResultTypes.SEARCH;
|
||||
const value10 = binding2(Reflect.apply(useState, binding, [SEARCH]), 2);
|
||||
const property3 = value10[0];
|
||||
const env0_13 = value10[1];
|
||||
const value11 = binding.useCallback(_fun84476, [value6]);
|
||||
const value12 = binding.useMemo(function() {
|
||||
return require(dependencyMap[12]).debounce(importAll(dependencyMap[7]).search, 200);
|
||||
}, []);
|
||||
const value13 = (require(11035) /* metro dependency 11035: GIFPickerUtils */).useFavoriteGIFsMobile();
|
||||
const env0_15 = value13.favorites;
|
||||
const favoritesCategory = value13.favoritesCategory;
|
||||
const {resultItems,
|
||||
resultQuery} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GIFPickerViewStore],
|
||||
_fun84478);
|
||||
const value15 = binding.useCallback(_fun84479, [value12, value6, resultQuery]);
|
||||
binding.useEffect(_fun84480, [value15, initialQuery]);
|
||||
binding.useEffect(_fun84481, []);
|
||||
binding.useEffect(_fun84482, [resultQuery, value6]);
|
||||
const value16 = binding.useMemo(_fun84483, [value15]);
|
||||
const value17 = binding.useCallback(_fun84485, [onPressGIF, resultItems.length, resultQuery]);
|
||||
const value18 = binding.useCallback(_fun84486, [bottomSheetRef, value15]);
|
||||
const value19 = ((Component) => <Component categoryType={property3} onQueryClear={value11} onQueryChange={value15} searchInputRef={value6} />)(importDefault(11037) /* metro dependency 11037: GIFPickerHeader */);
|
||||
if (resultItems.length > 0) {
|
||||
value = importDefault(11041) /* metro dependency 11041: GIFPickerResultsList */;
|
||||
value = ((Component) => <Component columns={columns} columnWidth={columnWidth} loading={property2} inActionSheet resultItems={resultItems} onPressGIF={value17} ListFooterComponent={value16} />)(value);
|
||||
r5 = value;
|
||||
} else if (property) {
|
||||
value = importDefault(11041) /* metro dependency 11041: GIFPickerResultsList */;
|
||||
value = ((Component) => <Component columns={columns} columnWidth={columnWidth} loading={property2} inActionSheet resultItems={resultItems} onPressGIF={value17} ListFooterComponent={value16} />)(value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value = importDefault(11044) /* metro dependency 11044: GIFPickerCategoriesPage */;
|
||||
value = ((Component) => <Component columns={columns} onSelectCategory={value18} favoritesCategory={hideFavorites === true ? undefined : favoritesCategory} inActionSheet />)(value);
|
||||
r5 = value;
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{value19}
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun84474() { // fn#84474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11220:484, offset: 0x01f4c1dc, size: 142 bytes, params: 1, frame: 16
|
||||
var defaultImport;
|
||||
(importAll(9814) /* metro dependency 9814: GIFPickerActionCreators */).initializeSearch();
|
||||
(importAll(9814) /* metro dependency 9814: GIFPickerActionCreators */).resetSearch();
|
||||
if (channelId != null) {
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
defaultImport.track(AnalyticEvents.CHAT_INPUT_COMPONENT_VIEWED, {type: ChatInputComponentViewedTypes.GIF,
|
||||
channel_id: channelId, guild_id: guildId});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84475() { // fn#84475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11220:680, offset: 0x01f4c26a, size: 96 bytes, params: 1, frame: 15
|
||||
const value2 = 2;
|
||||
const r4 = env0_5 ? 3 : value2;
|
||||
const object2 = {columns: r4};
|
||||
const value = env0_6.width / r4;
|
||||
const GIF_PICKER_GUTTER_SPACING = (require(11035) /* metro dependency 11035: GIFPickerUtils */).GIF_PICKER_GUTTER_SPACING;
|
||||
object2.columnWidth = value - GIF_PICKER_GUTTER_SPACING / value2 * (r4 - 1);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun84476() { // fn#84476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11220:1007, offset: 0x01f4c2ca, size: 95 bytes, params: 1, frame: 13
|
||||
env0_8(false);
|
||||
const binding = env0_13;
|
||||
const SEARCH = GIFPickerResultTypes.SEARCH;
|
||||
binding(SEARCH);
|
||||
(importAll(9814) /* metro dependency 9814: GIFPickerActionCreators */).resetSearch();
|
||||
const current = env0_7.current;
|
||||
if (current != null) {
|
||||
current.blur();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84478() { // fn#84478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11220:1267, offset: 0x01f4c369, size: 76 bytes, params: 1, frame: 12
|
||||
const object2 = {};
|
||||
const binding = env0_12;
|
||||
const FAVORITES = GIFPickerResultTypes.FAVORITES;
|
||||
object2.resultItems = binding !== FAVORITES ? GIFPickerViewStore.getResultItems() : favorites;
|
||||
object2.resultQuery = GIFPickerViewStore.getResultQuery();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun84479(a0) { // fn#84479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11220:1407, offset: 0x01f4c3b5, size: 229 bytes, params: 2, frame: 21
|
||||
var r7;
|
||||
var SEARCH;
|
||||
var binding;
|
||||
var value2;
|
||||
var value3;
|
||||
var value6;
|
||||
const value = a1;
|
||||
const r4 = !(value !== undefined) || value;
|
||||
let current = env0_9.current;
|
||||
if (current !== a0) {
|
||||
env0_9.current = a0;
|
||||
binding = env0_13;
|
||||
value2 = environment.__proto__;
|
||||
SEARCH = GIFPickerResultTypes.SEARCH;
|
||||
binding(SEARCH);
|
||||
value3 = a0.trim().length > 0;
|
||||
binding = env0_11;
|
||||
binding(value3 ? resultQuery !== a0 : !!value3);
|
||||
env0_8(value3);
|
||||
r7 = r4 ? env0_14 : (importAll(9814) /* metro dependency 9814: GIFPickerActionCreators */).search;
|
||||
value6 = null;
|
||||
SEARCH = a0 === '' ? value6 : GIFPickerResultTypes.SEARCH;
|
||||
r7(a0, SEARCH, !r4, GIF_FETCH_LIMIT_IOS);
|
||||
if (!r4) {
|
||||
current = env0_7.current;
|
||||
if (value6 != current) {
|
||||
current.setText(a0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84480() { // fn#84480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11220:1628, offset: 0x01f4c49a, size: 90 bytes, params: 1, frame: 13
|
||||
if (!env0_10.current) {
|
||||
if (initialQuery != null && initialQuery.trim().length > 0) {
|
||||
env0_10.current = true;
|
||||
env0_18(initialQuery, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84481() { // fn#84481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11220:1719, offset: 0x01f4c4f4, size: 74 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const defaultImport = importDefault(10748) /* metro dependency 10748: TooltipActionCreators */;
|
||||
const acknowledgeTooltip = defaultImport.acknowledgeTooltip;
|
||||
const GIF_PICKER_TOOLTIP = TooltipNames.GIF_PICKER_TOOLTIP;
|
||||
Reflect.apply(acknowledgeTooltip, defaultImport, [GIF_PICKER_TOOLTIP]);
|
||||
(importAll(9814) /* metro dependency 9814: GIFPickerActionCreators */).fetchTrendingSearchTerms();
|
||||
}
|
||||
|
||||
function _fun84482() { // fn#84482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11220:1828, offset: 0x01f4c53e, size: 106 bytes, params: 1, frame: 14
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (resultQuery !== '') {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = importAll(9814) /* metro dependency 9814: GIFPickerActionCreators */;
|
||||
moduleValue.fetchSuggestions(resultQuery);
|
||||
}
|
||||
const binding = env0_11;
|
||||
resultQueryBinding = resultQuery;
|
||||
const current = env0_7.current;
|
||||
const value = undefined;
|
||||
binding(resultQueryBinding !== (current == null ? value : current.getText()));
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun84483() { // fn#84483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11220:1950, offset: 0x01f4c5a8, size: 53 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component onClickSuggestion={onClickSuggestion} />)(importDefault(11036) /* metro dependency 11036: GIFPickerSearchSuggestions */);
|
||||
}
|
||||
|
||||
function _fun84485(a0, a1) { // fn#84485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11220:2023, offset: 0x01f4c5f3, size: 134 bytes, params: 3, frame: 16
|
||||
const gifPickerActionCreatorsModule = importAll(9814) /* metro dependency 9814: GIFPickerActionCreators */;
|
||||
const trackSelectGIF = gifPickerActionCreatorsModule.trackSelectGIF;
|
||||
const SEARCH = GIFPickerResultTypes.SEARCH;
|
||||
const resultItemsBinding = resultItems;
|
||||
Reflect.apply(trackSelectGIF, gifPickerActionCreatorsModule, [{type: SEARCH, index: a1, offset: 0,
|
||||
limit: GIF_FETCH_LIMIT_IOS, results: resultItemsBinding.length, totalResults: resultItemsBinding.length,
|
||||
query: resultQuery, gifId: a0.id}]);
|
||||
onPressGIF(a0);
|
||||
}
|
||||
|
||||
function _fun84486(a0, a1) { // fn#84486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11220:2195, offset: 0x01f4c679, size: 175 bytes, params: 3, frame: 15
|
||||
const TRENDING_GIFS = GIFPickerResultTypes.TRENDING_GIFS;
|
||||
if (a0 === TRENDING_GIFS) {
|
||||
env0_8(false);
|
||||
env0_13(a0);
|
||||
(importAll(9814) /* metro dependency 9814: GIFPickerActionCreators */).fetchTrendingGIFs(GIF_FETCH_LIMIT_IOS);
|
||||
} else if (a0 === GIFPickerResultTypes.FAVORITES) {
|
||||
env0_8(false);
|
||||
env0_13(a0);
|
||||
} else {
|
||||
env0_18(a1, false);
|
||||
}
|
||||
const current = bottomSheetRef.current;
|
||||
if (current != null) {
|
||||
current.expandActionSheet();
|
||||
}
|
||||
}
|
||||
|
||||
function onClickSuggestion(a0) { // fn#84484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11220:1984, offset: 0x01f4c5dd, size: 22 bytes, params: 2, frame: 13
|
||||
return env1_18(a0, false);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
/* Metro module 11044; source: modules/gif_picker/native/GIFPickerCategoriesPage.tsx; dependencies: [31, 27, 9815, 33, 4501, 11035, 697, 11032, 566, 9814, 11045, 7700, 8671, 5466, 1244, 2] */
|
||||
function _fun84529(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11230:6, offset: 0x01f4e457, size: 222 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const gifPickerViewStore = importDefault(9815) /* metro dependency 9815: GIFPickerViewStore */;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun84530);
|
||||
value = value.memo(GIFPickerCategoriesPage);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gif_picker/native/GIFPickerCategoriesPage.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun84530(a0) { // fn#84530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11230:171, offset: 0x01f4e535, size: 172 bytes, params: 2, frame: 18
|
||||
const object2 = {};
|
||||
const GIF_PICKER_GUTTER_SPACING = (require(11035) /* metro dependency 11035: GIFPickerUtils */).GIF_PICKER_GUTTER_SPACING;
|
||||
object2.item = {height: a0, flexDirection: 'row', gap: GIF_PICKER_GUTTER_SPACING,
|
||||
paddingBottom: GIF_PICKER_GUTTER_SPACING};
|
||||
const object4 = {};
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object4.backgroundColor = BORDER_SUBTLE;
|
||||
object4.height = a0 - GIF_PICKER_GUTTER_SPACING;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object4.flex = 1;
|
||||
object2.placeholder = object4;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function GIFPickerCategoriesPage({columns, favoritesCategory, inActionSheet, onSelectCategory}) { // fn#84531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11230:457, offset: 0x01f4e5e1, size: 532 bytes, params: 2, frame: 27
|
||||
var object2;
|
||||
const r9 = columns > 2 ? (require(11035) /* metro dependency 11035: GIFPickerUtils */).GIF_PICKER_ITEM_ESIMTATED_HEIGHT : (require(11035) /* metro dependency 11035: GIFPickerUtils */).GIF_PICKER_ITEM_ESIMTATED_HEIGHT / 2;
|
||||
const env0_3 = r9;
|
||||
const styles = useStyles(r9);
|
||||
const safeAreaBottomKeyboardAware = (importDefault(11032) /* metro dependency 11032: useExpressionPickerInsets */)({hasCategories: false}).safeAreaBottomKeyboardAware;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
|
||||
const trendingCategories = Reflect.apply(useStateFromStoresObject, fluxModule, [[GIFPickerViewStore], function() {
|
||||
var object = {};
|
||||
object.trendingCategories = GIFPickerViewStore.getTrendingCategories();
|
||||
return object;
|
||||
}]).trendingCategories;
|
||||
const binding = env0_3;
|
||||
const {data, sections} = binding.useMemo(_fun84533, [columns, favoritesCategory, trendingCategories]);
|
||||
binding.useEffect(_fun84534, [trendingCategories]);
|
||||
const value3 = binding.useCallback(_fun84535, [columns, data, onSelectCategory, styles]);
|
||||
const value4 = binding.useMemo(_fun84536, [r9, columns, styles]);
|
||||
const fastestListAndroid = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
|
||||
object2 = {estimatedListSize: (require(5466) /* metro dependency 5466: useCustomKeyboardHeight */).getCustomKeyboardHeight(),
|
||||
inActionSheet: inActionSheet, insetEnd: safeAreaBottomKeyboardAware, itemSize: r9, sections: sections,
|
||||
placeholderConfig: value4, renderItem: value3};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ffgJrs);
|
||||
return ((Component) => <Component {...object2} />)(fastestListAndroid);
|
||||
}
|
||||
|
||||
function _fun84533() { // fn#84533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11230:845, offset: 0x01f4e811, size: 223 bytes, params: 1, frame: 23
|
||||
var r2;
|
||||
var unshift;
|
||||
var push;
|
||||
var slice;
|
||||
var columnsBinding;
|
||||
var value4;
|
||||
const trendingCategoriesBinding = trendingCategories;
|
||||
const items2 = [];
|
||||
const value2 = 0;
|
||||
arraySpread(items2, trendingCategoriesBinding, value2, undefined);
|
||||
reducibleJoin2: while (true) {
|
||||
if (favoritesCategory == null) {
|
||||
break reducibleJoin2;
|
||||
}
|
||||
unshift = items2.unshift;
|
||||
Reflect.apply(unshift, items2, [favoritesCategory]);
|
||||
break reducibleJoin2;
|
||||
}
|
||||
const items3 = [];
|
||||
let Math = global.Math;
|
||||
let max = Math.max;
|
||||
let length = items2.length;
|
||||
const DEFAULT_CATEGORY_ROWS = (require(11035) /* metro dependency 11035: GIFPickerUtils */).DEFAULT_CATEGORY_ROWS;
|
||||
if (value2 < Reflect.apply(max, Math, [length, DEFAULT_CATEGORY_ROWS])) {
|
||||
r2 = value2;
|
||||
reducibleLoop3: while (true) {
|
||||
push = items3.push;
|
||||
slice = items2.slice;
|
||||
columnsBinding = columns;
|
||||
Reflect.apply(push, items3, [Reflect.apply(slice, items2, [r2, r2 + columnsBinding])]);
|
||||
value4 = r2 + columnsBinding;
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
length = items2.length;
|
||||
if (value4 < Reflect.apply(max, Math, [length, DEFAULT_CATEGORY_ROWS])) {
|
||||
r2 = value4;
|
||||
continue reducibleLoop3;
|
||||
}
|
||||
break reducibleLoop3;
|
||||
}
|
||||
}
|
||||
return {data: items3, sections: [items3.length]};
|
||||
}
|
||||
|
||||
function _fun84534() { // fn#84534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11230:1062, offset: 0x01f4e8f0, size: 57 bytes, params: 1, frame: 11
|
||||
var value;
|
||||
if (trendingCategories.length === 0) {
|
||||
value = environment.__proto__;
|
||||
value = require(9814) /* metro dependency 9814: GIFPickerActionCreators */;
|
||||
value.fetchTrending();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84535(a0, a1) { // fn#84535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11230:1133, offset: 0x01f4e929, size: 212 bytes, params: 3, frame: 25
|
||||
var r7;
|
||||
var r1;
|
||||
var property2;
|
||||
var push;
|
||||
var jsxRuntimeEnv1_6Binding;
|
||||
var item;
|
||||
var placeholder;
|
||||
var view;
|
||||
var GIFPickerCategoryView;
|
||||
var gIFPickerCategoryView;
|
||||
var value6;
|
||||
const property = data[a1];
|
||||
const items2 = [];
|
||||
const columnsBinding = columns;
|
||||
const value2 = 0;
|
||||
if (value2 < columnsBinding) {
|
||||
r7 = value2;
|
||||
while (true) {
|
||||
property2 = property[r7];
|
||||
push = items2.push;
|
||||
if (property2 != null) {
|
||||
jsxRuntimeEnv1_6Binding = jsxRuntimeEnv1_6;
|
||||
GIFPickerCategoryView = importDefault(11045) /* metro dependency 11045: GIFPickerCategoryView */;
|
||||
gIFPickerCategoryView = <GIFPickerCategoryView item={property2} onSelectCategory={onSelectCategory} key={r7} />;
|
||||
r1 = gIFPickerCategoryView;
|
||||
} else {
|
||||
jsxRuntimeEnv1_6Binding = jsxRuntimeEnv1_6;
|
||||
item = styles.item;
|
||||
placeholder = styles.placeholder;
|
||||
view = <View style={[item, placeholder]} key={r7} />;
|
||||
r1 = view;
|
||||
}
|
||||
Reflect.apply(push, items2, [r1]);
|
||||
value6 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
|
||||
if (value6 < columns) {
|
||||
r7 = value6;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (
|
||||
<View style={styles.item} collapsable={false}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun84536() { // fn#84536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11230:1361, offset: 0x01f4e9fd, size: 171 bytes, params: 1, frame: 16
|
||||
const object = {};
|
||||
const FastestListPropsPlaceholderType = (require(7700) /* metro dependency 7700: FastestListPropsPlaceholder */).FastestListPropsPlaceholderType;
|
||||
const SHAPE = FastestListPropsPlaceholderType.SHAPE;
|
||||
object.type = SHAPE;
|
||||
object.shape = 'rect';
|
||||
object.shapeCount = columns;
|
||||
const GIF_PICKER_GUTTER_SPACING = (require(11035) /* metro dependency 11035: GIFPickerUtils */).GIF_PICKER_GUTTER_SPACING;
|
||||
object.spaceGap = GIF_PICKER_GUTTER_SPACING;
|
||||
object.borderRadius = styles.placeholder.borderRadius;
|
||||
object.colorHex = styles.placeholder.backgroundColor;
|
||||
object.height = env0_3 - GIF_PICKER_GUTTER_SPACING;
|
||||
object.verticalAlignment = 'top';
|
||||
return {sectionItem: object};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/* Metro module 11045; source: modules/gif_picker/native/GIFPickerCategoryView.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 1244, 9104, 5475, 11046, 8633, 4573, 2] */
|
||||
function _fun84537(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11231:6, offset: 0x01f4eaa8, size: 546 bytes, params: 8, frame: 24
|
||||
var object6;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = value.TouchableOpacity;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).GIFPickerResultTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object6 = {};
|
||||
const object7 = {};
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object7.backgroundColor = BORDER_SUBTLE;
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object7.flex = 1;
|
||||
object6.container = object7;
|
||||
const object8 = {};
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object8.flex = 1;
|
||||
object6.gifImage = object8;
|
||||
const object9 = {};
|
||||
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
|
||||
object9['backgroundColor'] = BLACK;
|
||||
object9['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object9['opacity'] = 0.6;
|
||||
object6.gifOverlay = object9;
|
||||
const object10 = {};
|
||||
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object10['margin'] = PX_8;
|
||||
object10['justifyContent'] = 'center';
|
||||
object10['flexDirection'] = 'row';
|
||||
object10['alignItems'] = 'center';
|
||||
object6.categoryName = object10;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object6.categoryNameIcon = {marginRight: PX_4};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object6]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gif_picker/native/GIFPickerCategoryView.tsx');
|
||||
exports.default = GIFPickerCategoryView;
|
||||
}
|
||||
|
||||
function GIFPickerCategoryView({onSelectCategory, item}) { // fn#84538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11231:697, offset: 0x01f4ecca, size: 630 bytes, params: 2, frame: 26
|
||||
const styles = useStyles();
|
||||
const value2 = env0_3.useCallback(function() {
|
||||
var onSelectCategoryBinding = onSelectCategory;
|
||||
var itemBinding = item;
|
||||
onSelectCategoryBinding(itemBinding.type, itemBinding.name);
|
||||
}, [onSelectCategory, item]);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const value3 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['j+63pw'],
|
||||
{categoryName: item.name});
|
||||
const touchableOpacityBindingProps = {style: styles.container, onPress: value2, accessible: true,
|
||||
accessibilityRole: 'button', accessibilityLabel: value3,
|
||||
...(importDefault(9104) /* metro dependency 9104: useAccessibilityPress */)(value2, value3)};
|
||||
const items2 = [((Component) => <Component style={styles.gifImage} source={{uri: item.src}} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
|
||||
items2[1] = <View style={styles.gifOverlay} />;
|
||||
const type = item.type;
|
||||
const TRENDING_GIFS = GIFPickerResultTypes.TRENDING_GIFS;
|
||||
const r9 = type === TRENDING_GIFS ? ((AnalyticsIcon) => <AnalyticsIcon size="sm" style={styles.categoryNameIcon} color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(11046) /* metro dependency 11046: AnalyticsIcon */).AnalyticsIcon) : item.type !== GIFPickerResultTypes.FAVORITES ? null : ((StarIcon) => <StarIcon size="sm" style={styles.categoryNameIcon} color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(8633) /* metro dependency 8633: StarIcon */).StarIcon);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[2] = <View style={styles.categoryName} accessible={false}>{r9}<Text variant="text-sm/semibold" color="always-white" maxFontSizeMultiplier={2} accessible={false}>{item.name}</Text></View>;
|
||||
return (
|
||||
<TouchableOpacity {...touchableOpacityBindingProps}>
|
||||
{items2}
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/* Metro module 11037; source: modules/gif_picker/native/GIFPickerHeader.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 6993, 9816, 11038, 6984, 5278, 1244, 11039, 4573, 2] */
|
||||
function _fun84496(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11223:6, offset: 0x01f4cdcc, size: 385 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).GIFPickerResultTypes;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value2.jsx;
|
||||
const env0_6 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.container = {paddingVertical: PX_8};
|
||||
const object4 = {'borderWidth': 1, 'borderColor': 'transparent', 'paddingHorizontal': null, 'height': null,
|
||||
'flexDirection': 'row', 'alignItems': 'center'};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.paddingHorizontal = PX_8;
|
||||
const InputHeights = (require(6993) /* metro dependency 6993: InputTypesNative */).InputHeights;
|
||||
const MD = InputHeights.MD;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object4.height = MD + PX_4 / 2;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.gap = PX_8;
|
||||
object2.header = object4;
|
||||
const env0_7 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(GIFPickerHeader);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gif_picker/native/GIFPickerHeader.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function GIFPickerHeader({categoryType, onQueryClear, onQueryChange, searchInputRef}) { // fn#84497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11223:467, offset: 0x01f4cf4d, size: 696 bytes, params: 2, frame: 32
|
||||
var r4;
|
||||
var PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var UTypEu;
|
||||
var object;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const searchPlaceholder = (require(11038) /* metro dependency 11038: GifPickerUtils */).getSearchPlaceholder((require(9816) /* metro dependency 9816: GifProviderConfig */).getProviderForAPIRequest());
|
||||
const SEARCH = GIFPickerResultTypes.SEARCH;
|
||||
if (categoryType === SEARCH) {
|
||||
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
|
||||
r4 = <SearchField size="md" onChange={onQueryChange} placeholder={searchPlaceholder} onClear={onQueryClear} ref={searchInputRef} isRound />;
|
||||
} else {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
var pressableOpacityProps = {style: styles.header, accessibilityRole: 'button', onPress: onQueryClear};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
UTypEu = t.UTypEu;
|
||||
object = {};
|
||||
object.destination = (require(1244) /* metro dependency 1244: indexNative */).intl.string(t.ffgJrs);
|
||||
pressableOpacityProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [UTypEu, object]);
|
||||
items2 = [((ChevronLargeLeftIcon) => <ChevronLargeLeftIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE} size="sm" />)((require(11039) /* metro dependency 11039: ChevronLargeLeftIcon */).ChevronLargeLeftIcon)];
|
||||
items2[1] = ((Text) => <Text variant="text-sm/semibold" color="text-default" maxFontSizeMultiplier={2}>{categoryType === GIFPickerResultTypes.TRENDING_GIFS ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TsWCdW) : categoryType === GIFPickerResultTypes.FAVORITES ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.k8fFjp) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
r4 = <PressableOpacity {...pressableOpacityProps}>{items2}</PressableOpacity>;
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{r4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
/* Metro module 11043; source: modules/gif_picker/native/GIFPickerItemActionSheet.tsx; dependencies: [31, 27, 33, 4501, 697, 477, 9813, 9814, 1478, 4080, 3857, 1244, 9820, 4578, 6275, 5475, 2] */
|
||||
function _fun84523(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11229:6, offset: 0x01f4de54, size: 421 bytes, params: 8, frame: 24
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = 0;
|
||||
const env0_3 = importAll(dependencyMap[value]);
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value2.jsx;
|
||||
const env0_6 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object5 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.paddingHorizontal = PX_16;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
PX_16 = platformUtilsModule.isAndroid() ? (importDefault(697) /* metro dependency 697: native */).space.PX_16 : value;
|
||||
object5.paddingBottom = PX_16;
|
||||
object3.contentWrapper = object5;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.gifContainer = {'flexDirection': 'column', 'alignItems': 'center', marginTop: PX_8};
|
||||
const object6 = {};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object6.backgroundColor = BORDER_SUBTLE;
|
||||
object3.gifImage = object6;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.favoriteButtonContainer = {'flex': 1, 'flexDirection': 'row', 'alignItems': 'stretch', 'width': '100%',
|
||||
marginTop: PX_16};
|
||||
const env0_7 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gif_picker/native/GIFPickerItemActionSheet.tsx');
|
||||
exports.default = _default_84524;
|
||||
}
|
||||
|
||||
function _default_84524({item}) { // fn#84524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11229:584, offset: 0x01f4dff9, size: 465 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const favoriteGIFHooksModule = require(9813) /* metro dependency 9813: FavoriteGIFHooks */;
|
||||
const useIsFavoriteGIF = favoriteGIFHooksModule.useIsFavoriteGIF;
|
||||
const gifPickerActionCreatorsModule = require(9814) /* metro dependency 9814: GIFPickerActionCreators */;
|
||||
const value2 = Reflect.apply(useIsFavoriteGIF, favoriteGIFHooksModule,
|
||||
[gifPickerActionCreatorsModule.gifUrlKey(item.url)]);
|
||||
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
|
||||
const binding = height;
|
||||
const value4 = binding.useMemo(_fun84525, [item.width, item.height, width, height]);
|
||||
const value7 = binding.useCallback(_fun84528, [binding.useCallback(_fun84527, [binding.useCallback(_fun84526, []),
|
||||
value2, item]), value2]);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
let value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component style={[styles.gifImage, value4]} source={{uri: item.src}} />)(value);
|
||||
return (
|
||||
<BottomSheet startExpanded>
|
||||
<View style={styles.contentWrapper}>
|
||||
<View style={styles.gifContainer}>
|
||||
{value}
|
||||
<View style={styles.favoriteButtonContainer}>
|
||||
{value7()}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun84525() { // fn#84525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11229:706, offset: 0x01f4e1ca, size: 142 bytes, params: 1, frame: 14
|
||||
const widthBinding = width;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const value3 = widthBinding - 2 * PX_16;
|
||||
const itemBinding = item;
|
||||
const value4 = value3 / itemBinding.width;
|
||||
let value = 0.5 * height;
|
||||
value /= itemBinding.height;
|
||||
const Math = global.Math;
|
||||
value = Math.min(value4, value);
|
||||
return {width: itemBinding.width * value, height: itemBinding.height * value};
|
||||
}
|
||||
|
||||
function _fun84526() { // fn#84526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11229:868, offset: 0x01f4e258, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _fun84527() { // fn#84527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11229:922, offset: 0x01f4e27d, size: 312 bytes, params: 1, frame: 20
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const GifIcon = (require(9820) /* metro dependency 9820: GifIcon */).GifIcon;
|
||||
env0_4();
|
||||
const binding = env0_1;
|
||||
const gifPickerActionCreatorsModule = require(9814) /* metro dependency 9814: GIFPickerActionCreators */;
|
||||
if (binding) {
|
||||
gifPickerActionCreatorsModule.removeFavoriteGIF(item.url);
|
||||
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: 'REMOVED_FROM_FAVORITES',
|
||||
content: intl.string(t.in1rga), IconComponent: GifIcon});
|
||||
} else {
|
||||
gifPickerActionCreatorsModule.addFavoriteGIF(item);
|
||||
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: 'ADDED_TO_FAVORITES',
|
||||
content: intl.string(t.okQonm), IconComponent: GifIcon});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84528() { // fn#84528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11229:1270, offset: 0x01f4e3b5, size: 162 bytes, params: 1, frame: 19
|
||||
const value = environment.__proto__;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const buttonProps = {variant: env0_1 ? 'destructive' : 'primary', onPress: env0_5};
|
||||
const binding = env0_1;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
buttonProps.text = binding ? Reflect.apply(string, intl, [t['5/NS74']]) : Reflect.apply(string, intl, [t.nIH0v8]);
|
||||
buttonProps.grow = true;
|
||||
return <Button {...buttonProps} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
/* Metro module 11042; source: modules/gif_picker/native/GIFPickerItemView.tsx; dependencies: [31, 27, 33, 4501, 11035, 697, 1848, 4080, 11043, 1962, 1244, 5278, 5475, 2] */
|
||||
function _fun84516(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11228:6, offset: 0x01f4d9ad, size: 219 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun84517);
|
||||
value = value.memo(_fun84518);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gif_picker/native/GIFPickerItemView.tsx');
|
||||
exports.default = _default_84519;
|
||||
exports.GIFPickerItemPlaceholder = value;
|
||||
}
|
||||
|
||||
function _fun84517(a0, a1, a2, a3) { // fn#84517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11228:159, offset: 0x01f4da88, size: 255 bytes, params: 5, frame: 18
|
||||
const object4 = {};
|
||||
const object5 = {};
|
||||
const GIF_PICKER_GUTTER_SPACING = (require(11035) /* metro dependency 11035: GIFPickerUtils */).GIF_PICKER_GUTTER_SPACING;
|
||||
object5.paddingBottom = GIF_PICKER_GUTTER_SPACING;
|
||||
const value2 = 0;
|
||||
object5.paddingLeft = value2 === a1 ? value2 : GIF_PICKER_GUTTER_SPACING / 2;
|
||||
object5.paddingRight = a1 === a0 - 1 ? value2 : GIF_PICKER_GUTTER_SPACING / 2;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object5.width = a2;
|
||||
object5.height = a3;
|
||||
object5.flex = 1;
|
||||
object4.container = object5;
|
||||
const object6 = {};
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object6.backgroundColor = BORDER_SUBTLE;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object6.flex = 1;
|
||||
object4.gifImage = object6;
|
||||
return object4;
|
||||
}
|
||||
|
||||
function _fun84518(a0) { // fn#84518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11228:508, offset: 0x01f4db87, size: 89 bytes, params: 2, frame: 18
|
||||
const styles = useStyles(a0.columns, a0.columnIndex, a0.width, a0.height);
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<View style={styles.gifImage} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_84519({onPressGIF, item, index, columns, columnIndex, width, height}) { // fn#84519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11228:655, offset: 0x01f4dbe0, size: 294 bytes, params: 2, frame: 23
|
||||
const styles = useStyles(columns, columnIndex, width, height);
|
||||
const binding = env0_3;
|
||||
const value2 = binding.useCallback(_fun84520, [item, index, onPressGIF]);
|
||||
const value3 = binding.useCallback(_fun84521, [item]);
|
||||
const value4 = binding.useMemo(_fun84522, [index, item.src]);
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
return (
|
||||
<PressableOpacity
|
||||
style={styles.container}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={value4}
|
||||
onPress={value2}
|
||||
onLongPress={value3}
|
||||
>
|
||||
{((Component) => <Component style={styles.gifImage} source={{uri: item.src}} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun84520() { // fn#84520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11228:764, offset: 0x01f4dd06, size: 58 bytes, params: 1, frame: 13
|
||||
onPressGIF(item, index);
|
||||
const value = environment.__proto__;
|
||||
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
|
||||
}
|
||||
|
||||
function _fun84521() { // fn#84521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11228:836, offset: 0x01f4dd40, size: 122 bytes, params: 1, frame: 20
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[7]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[9]);
|
||||
value = value(dependencyMap[8], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'GIFPickerItemActionSheet', {item: item}, 'stack']);
|
||||
require(dependencyMap[6]).dismissGlobalKeyboard();
|
||||
}
|
||||
|
||||
function _fun84522() { // fn#84522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11228:977, offset: 0x01f4ddba, size: 154 bytes, params: 1, frame: 17
|
||||
var value6;
|
||||
var intl;
|
||||
const value3 = item.src.split('/').pop();
|
||||
let r0 = value3 == null ? undefined : value3.split('.')[0];
|
||||
if (r0 == null) {
|
||||
value6 = environment.__proto__;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r0 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['5iIGZI'],
|
||||
{index: index + 1});
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
/* Metro module 11041; source: modules/gif_picker/native/GIFPickerResultsList.tsx; dependencies: [57, 31, 33, 11032, 11042, 8416, 11035, 2] */
|
||||
function _fun84503(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11227:6, offset: 0x01f4d40c, size: 241 bytes, params: 8, frame: 20
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
object2 = {length: 20};
|
||||
let Array = global.Array;
|
||||
const env0_6 = Array.from(object2).map(function() {
|
||||
});
|
||||
Array = global.Array;
|
||||
const env0_7 = Array.from(object2).map(function() {
|
||||
var Math = global.Math;
|
||||
var Math2 = global.Math;
|
||||
var value = Math2.random();
|
||||
value = Math.floor(91 * value);
|
||||
return {width: 100, height: value + 90};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gif_picker/native/GIFPickerResultsList.tsx');
|
||||
exports.default = _default_84506;
|
||||
}
|
||||
|
||||
function _default_84506({columns, columnWidth, resultItems, onPressGIF, inActionSheet, ListFooterComponent, loading}) { // fn#84506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11227:267, offset: 0x01f4d53d, size: 423 bytes, params: 2, frame: 26
|
||||
const safeAreaBottomKeyboardAware = (importDefault(11032) /* metro dependency 11032: useExpressionPickerInsets */)({hasCategories: false}).safeAreaBottomKeyboardAware;
|
||||
const r12 = loading ? env0_6 : resultItems;
|
||||
const binding = env0_4;
|
||||
const value2 = binding.useCallback(function(a0, a1) {
|
||||
var columnWidthBinding = columnWidth;
|
||||
return {width: columnWidthBinding, height: columnWidthBinding / (a0 / a1)};
|
||||
}, [columnWidth]);
|
||||
const value3 = binding.useCallback(function(a0, a1) {
|
||||
var r0;
|
||||
r0 = a0?.src;
|
||||
r0 = r0 ?? a1.toString();
|
||||
return r0;
|
||||
}, []);
|
||||
const {viewedItemIndexes, onViewableItemsChanged} = useViewedItemIndexes();
|
||||
const value5 = binding.useCallback(_fun84514, [columns, onPressGIF, value2]);
|
||||
const value6 = binding.useCallback(_fun84515, [value2]);
|
||||
const flashListModule = require(8416) /* metro dependency 8416: flashList */;
|
||||
const r2 = inActionSheet ? flashListModule.BottomSheetMasonryFlashList : flashListModule.MasonryFlashList;
|
||||
const GIF_PICKER_ITEM_ESIMTATED_HEIGHT = (require(11035) /* metro dependency 11035: GIFPickerUtils */).GIF_PICKER_ITEM_ESIMTATED_HEIGHT;
|
||||
return ((Component) => <Component contentContainerStyle={{paddingBottom: safeAreaBottomKeyboardAware}} data={r12} drawDistance={GIF_PICKER_ITEM_ESIMTATED_HEIGHT} estimatedItemSize={GIF_PICKER_ITEM_ESIMTATED_HEIGHT} extraData={viewedItemIndexes} keyExtractor={value3} keyboardShouldPersistTaps="always" numColumns={columns} ListFooterComponent={ListFooterComponent} optimizeItemArrangement onViewableItemsChanged={onViewableItemsChanged} overrideItemLayout={value6} renderItem={value5} />)(r2);
|
||||
}
|
||||
|
||||
function useViewedItemIndexes() { // fn#84509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11227:591, owner: _default_84506.useViewedItemIndexes, offset: 0x01f4d72b, size: 94 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_4;
|
||||
value = env1_3(binding.useState(function() {
|
||||
var Set = global.Set;
|
||||
var value = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
var value2 = new Set();
|
||||
return value2 instanceof Object ? value2 : value;
|
||||
}), 2);
|
||||
const property = value[0];
|
||||
const env0_0 = value[1];
|
||||
const object2 = {viewedItemIndexes: property};
|
||||
object2.onViewableItemsChanged = binding.useCallback(function({changed}) {
|
||||
changed(_fun84512);
|
||||
}, []);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun84514({item, index, columnIndex, extraData}) { // fn#84514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11227:934, offset: 0x01f4d820, size: 324 bytes, params: 2, frame: 21
|
||||
var value;
|
||||
var property;
|
||||
var value6;
|
||||
if (item == null) {
|
||||
value = environment.__proto__;
|
||||
property = env1_7[index];
|
||||
width = property.width;
|
||||
height = property.height;
|
||||
value6 = env0_3(width, height);
|
||||
width = value6.width;
|
||||
height = value6.height;
|
||||
const GIFPickerItemPlaceholder = (require(11042) /* metro dependency 11042: GIFPickerItemView */).GIFPickerItemPlaceholder;
|
||||
return (
|
||||
<GIFPickerItemPlaceholder
|
||||
width={width}
|
||||
height={height}
|
||||
columns={columns}
|
||||
columnIndex={columnIndex}
|
||||
/>
|
||||
);
|
||||
}
|
||||
var {width, height} = env0_3(item.width, item.height);
|
||||
if (extraData.has(index)) {
|
||||
return ((Component) => <Component width={width} height={height} index={index} columns={columns} columnIndex={columnIndex} item={item} onPressGIF={onPressGIF} />)(importDefault(11042) /* metro dependency 11042: GIFPickerItemView */);
|
||||
} else {
|
||||
const GIFPickerItemPlaceholder2 = (require(11042) /* metro dependency 11042: GIFPickerItemView */).GIFPickerItemPlaceholder;
|
||||
return (
|
||||
<GIFPickerItemPlaceholder2
|
||||
width={width}
|
||||
height={height}
|
||||
columns={columns}
|
||||
columnIndex={columnIndex}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84515(a0, a1, a2) { // fn#84515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11227:1393, offset: 0x01f4d964, size: 73 bytes, params: 4, frame: 13
|
||||
var height;
|
||||
var value;
|
||||
var binding;
|
||||
var width;
|
||||
if (a1 == null) {
|
||||
value = environment.__proto__;
|
||||
height = env1_7[a2].height;
|
||||
} else {
|
||||
binding = env0_3;
|
||||
width = a1.width;
|
||||
height = a1.height;
|
||||
height = binding(width, height).height;
|
||||
}
|
||||
a0.size = height;
|
||||
}
|
||||
|
||||
function _fun84511({changed}) { // fn#84511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11227:743, offset: 0x01f4d789, size: 38 bytes, params: 2, frame: 11
|
||||
changed(function(a0) {
|
||||
var Set = global.Set;
|
||||
var value2 = new Set(a0);
|
||||
var env0_0 = value2;
|
||||
changed.forEach(_fun84513);
|
||||
return value2;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun84512(a0) { // fn#84512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11227:762, offset: 0x01f4d7af, size: 63 bytes, params: 2, frame: 12
|
||||
const Set = global.Set;
|
||||
const set = new Set(a0);
|
||||
changed.forEach(_fun84513);
|
||||
return set;
|
||||
}
|
||||
|
||||
function _fun84513({index, isViewable}) { // fn#84513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11227:801, offset: 0x01f4d7ee, size: 50 bytes, params: 2, frame: 12
|
||||
if (index !== null && isViewable) {
|
||||
env0_0.add(index);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/* Metro module 11036; source: modules/gif_picker/native/GIFPickerSearchSuggestions.tsx; dependencies: [31, 27, 9815, 33, 4501, 697, 566, 4573, 1244, 4578, 2] */
|
||||
function _fun84491(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11222:6, offset: 0x01f4cacb, size: 346 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const gifPickerViewStore = importDefault(9815) /* metro dependency 9815: GIFPickerViewStore */;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value2.jsx;
|
||||
const env0_6 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.suggestionsContainer = {'justifyContent': 'center', 'flexDirection': 'row', 'flexWrap': 'wrap', gap: PX_8};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.footerSuggestionsContainer = {justifyContent: 'flex-start', paddingVertical: PX_16};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.footerSuggestionsTitle = {marginBottom: PX_16, textAlign: 'center'};
|
||||
const env0_7 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(GIFPickerSearchSuggestions);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gif_picker/native/GIFPickerSearchSuggestions.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function GIFPickerSearchSuggestions({onClickSuggestion}) { // fn#84492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11222:474, offset: 0x01f4cc25, size: 292 bytes, params: 2, frame: 25
|
||||
var r0;
|
||||
var Text;
|
||||
var intl;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GIFPickerViewStore],
|
||||
function() {
|
||||
return GIFPickerViewStore.getSuggestions();
|
||||
});
|
||||
if (value2.length === 0) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.footerSuggestionsContainer};
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var textProps = {'style': null, 'variant': 'text-md/medium', 'color': 'text-default',
|
||||
style: styles.footerSuggestionsTitle};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
value = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3JGJo2'])}</Text>;
|
||||
value = <View {...viewBindingProps}>{value}<View style={styles.suggestionsContainer}>{value2.map(_fun84494)}</View></View>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun84494(a0) { // fn#84494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11222:877, offset: 0x01f4cd5c, size: 112 bytes, params: 2, frame: 19
|
||||
const env0_0 = a0;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
return (
|
||||
<Button
|
||||
size="sm"
|
||||
variant="secondary"
|
||||
hitSlop={PX_8}
|
||||
text={a0}
|
||||
onPress={onPress_84495}
|
||||
key={a0}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
/* Metro module 11035; source: modules/gif_picker/native/GIFPickerUtils.tsx; dependencies: [31, 661, 1471, 9598, 9813, 1244, 2] */
|
||||
function _fun84487(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11221:6, offset: 0x01f4c728, size: 246 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).GIFPickerResultTypes;
|
||||
const env0_5 = RegExp('(https?:\\/\\/)(?!media(?:\\d+)?\\.)(?:[^.]+\\.)*giphy\\.com', '');
|
||||
const env0_6 = RegExp('(tenor\\.com)', '');
|
||||
const env0_7 = RegExp('-(?:.(?!-))+$', '');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gif_picker/native/GIFPickerUtils.tsx');
|
||||
exports.GIF_HEADER_HEIGHT = 56;
|
||||
exports.useFavoriteGIFsMobile = useFavoriteGIFsMobile;
|
||||
exports.GIF_PICKER_ITEM_ESIMTATED_HEIGHT = 180;
|
||||
exports.GIF_PICKER_GUTTER_SPACING = 8;
|
||||
exports.DEFAULT_CATEGORY_ROWS = 20;
|
||||
}
|
||||
|
||||
function transformFavoriteGifUrl(a0, a1) { // fn#84488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11221:255, offset: 0x01f4c81e, size: 455 bytes, params: 3, frame: 20
|
||||
var r3;
|
||||
var pathname;
|
||||
var value6;
|
||||
var value8;
|
||||
var value10;
|
||||
var binding;
|
||||
let value = a0;
|
||||
const value3 = undefined;
|
||||
const value4 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(value);
|
||||
if (value4 == null) {
|
||||
binding = env0_5;
|
||||
if (binding.test(a1)) {
|
||||
value = env0_7.exec(a1);
|
||||
value = 'https://media.giphy.com/media/' + (value == null || value[0] == null ? value3 : value[0].slice(1)) + '/giphy.gif';
|
||||
r3 = value;
|
||||
} else {
|
||||
binding = env0_6;
|
||||
r3 = binding.test(a1) ? '' + a1 + '.gif' : value;
|
||||
}
|
||||
} else {
|
||||
var moduleValue = require(9598) /* metro dependency 9598: SignedAttachmentLinkUtils */;
|
||||
if (moduleValue.isExternalProxiedAttachmentUrl(value4)) {
|
||||
pathname = value4.pathname;
|
||||
value6 = pathname.toLowerCase().endsWith('.webp');
|
||||
pathname = value4.pathname;
|
||||
value8 = pathname.toLowerCase().endsWith('.avif');
|
||||
pathname = value4.pathname;
|
||||
value10 = pathname.toLowerCase().endsWith('.gif');
|
||||
if (value6) {
|
||||
if (value8 || value10) {
|
||||
value4.searchParams.set('format', 'webp');
|
||||
}
|
||||
value4.searchParams.set('animated', 'true');
|
||||
return value4.toString();
|
||||
}
|
||||
if (value8) {
|
||||
if (value8 || value10) {
|
||||
value4.searchParams.set('format', 'webp');
|
||||
}
|
||||
value4.searchParams.set('animated', 'true');
|
||||
return value4.toString();
|
||||
}
|
||||
if (value10) {
|
||||
if (value8 || value10) {
|
||||
value4.searchParams.set('format', 'webp');
|
||||
}
|
||||
value4.searchParams.set('animated', 'true');
|
||||
return value4.toString();
|
||||
}
|
||||
binding = env0_5;
|
||||
if (binding.test(a1)) {
|
||||
value = env0_7.exec(a1);
|
||||
value = 'https://media.giphy.com/media/' + (value == null || value[0] == null ? value3 : value[0].slice(1)) + '/giphy.gif';
|
||||
r3 = value;
|
||||
} else {
|
||||
binding = env0_6;
|
||||
r3 = binding.test(a1) ? '' + a1 + '.gif' : value;
|
||||
}
|
||||
return r3;
|
||||
}
|
||||
var moduleValue2 = require(9598) /* metro dependency 9598: SignedAttachmentLinkUtils */;
|
||||
if (moduleValue2.isAttachmentUrl(value4)) {
|
||||
pathname = value4.pathname;
|
||||
value6 = pathname.toLowerCase().endsWith('.webp');
|
||||
pathname = value4.pathname;
|
||||
value8 = pathname.toLowerCase().endsWith('.avif');
|
||||
pathname = value4.pathname;
|
||||
value10 = pathname.toLowerCase().endsWith('.gif');
|
||||
if (value6) {
|
||||
if (value8 || value10) {
|
||||
value4.searchParams.set('format', 'webp');
|
||||
}
|
||||
value4.searchParams.set('animated', 'true');
|
||||
return value4.toString();
|
||||
}
|
||||
if (value8) {
|
||||
if (value8 || value10) {
|
||||
value4.searchParams.set('format', 'webp');
|
||||
}
|
||||
value4.searchParams.set('animated', 'true');
|
||||
return value4.toString();
|
||||
}
|
||||
if (value10) {
|
||||
if (value8 || value10) {
|
||||
value4.searchParams.set('format', 'webp');
|
||||
}
|
||||
value4.searchParams.set('animated', 'true');
|
||||
return value4.toString();
|
||||
}
|
||||
binding = env0_5;
|
||||
if (binding.test(a1)) {
|
||||
value = env0_7.exec(a1);
|
||||
value = 'https://media.giphy.com/media/' + (value == null || value[0] == null ? value3 : value[0].slice(1)) + '/giphy.gif';
|
||||
r3 = value;
|
||||
} else {
|
||||
binding = env0_6;
|
||||
r3 = binding.test(a1) ? '' + a1 + '.gif' : value;
|
||||
}
|
||||
return r3;
|
||||
}
|
||||
if (Reflect.apply(env0_5.test, binding, [a1])) {
|
||||
value = env0_7.exec(a1);
|
||||
value = 'https://media.giphy.com/media/' + (value == null || value[0] == null ? value3 : value[0].slice(1)) + '/giphy.gif';
|
||||
r3 = value;
|
||||
} else {
|
||||
binding = env0_6;
|
||||
r3 = binding.test(a1) ? '' + a1 + '.gif' : value;
|
||||
}
|
||||
}
|
||||
return r3;
|
||||
}
|
||||
|
||||
function useFavoriteGIFsMobile() { // fn#84489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11221:892, offset: 0x01f4c9e5, size: 90 bytes, params: 1, frame: 15
|
||||
const value2 = (require(9813) /* metro dependency 9813: FavoriteGIFHooks */).useSortedFavoriteGIFs(transformFavoriteGifUrl);
|
||||
const binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
let object = [value2];
|
||||
object = {favorites: value2, favoritesCategory: Reflect.apply(useMemo, binding, [_fun84490, object])};
|
||||
return object;
|
||||
}
|
||||
|
||||
function _fun84490() { // fn#84490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11221:999, offset: 0x01f4ca3f, size: 140 bytes, params: 1, frame: 18
|
||||
var r0;
|
||||
var object2;
|
||||
var value3;
|
||||
var intl;
|
||||
var binding;
|
||||
if (env0_0.length > 0) {
|
||||
object2 = {};
|
||||
value3 = environment.__proto__;
|
||||
object2.type = GIFPickerResultTypes.FAVORITES;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.name = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.k8fFjp);
|
||||
binding = env0_0;
|
||||
object2.src = binding[0].src;
|
||||
object2.format = binding[0].format;
|
||||
r0 = object2;
|
||||
} else {
|
||||
r0 = undefined;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user