decord/source/modules/chat_input/native/GiftIconTrinketsAnimation.tsx

70 lines
3.4 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 11818
// Function ID: 11819
2026-07-20 16:05:17 +00:00
// Name: GiftIconTrinketsAnimation
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 17, 4372, 21, 4380, 4819, 1367, 4101, 712, 589, 1903, 500, 9533, 5374, 2]
2026-07-20 16:05:17 +00:00
2026-08-25 06:04:03 +00:00
// Module 11818 (GiftIconTrinketsAnimation)
2026-08-24 06:08:38 +00:00
import set from "set" /* 500 */;
import initialize from "initialize" /* 589 */;
import ThemesDefault from "Themes" /* 712 */;
import useIsMobileVisualRefreshExperimentEnabled from "useIsMobileVisualRefreshExperimentEnabled" /* 1367 */;
2026-08-25 06:04:03 +00:00
import map from "map" /* 4101 */;
import MINIMUM_HIT_AREA from "MINIMUM_HIT_AREA" /* 4819 */;
import preloadDefault from "preload" /* 5374 */;
import useAPNGPlayerControls from "useAPNGPlayerControls" /* 9533 */;
2026-08-24 06:08:38 +00:00
import { View } from "get ActivityIndicator" /* 17 */;
2026-08-25 06:04:03 +00:00
import closure_4 from "maybeApplyNoTextColorForLightCustomTheme" /* 4372 */;
2026-08-24 06:08:38 +00:00
import { jsx } from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-08-24 06:08:38 +00:00
import importAllResult from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-29 08:29:29 +00:00
let closure_6 = createCacheKey.createStyles((width) => {
2026-08-24 06:08:38 +00:00
width = MINIMUM_HIT_AREA.SMALL_BUTTON_HEIGHT + MINIMUM_HIT_AREA.SMALL_BUTTON_PADDING + 2;
2026-07-23 10:11:24 +00:00
const containerRefresh = { position: "absolute", top: 0, left: 0, width, height: width, overflow: "visible", marginLeft: 0, zIndex: 0 };
2026-07-29 08:29:29 +00:00
return { container: { position: "absolute", top: 0, left: 0, width, height: width, overflow: "visible", marginLeft: 4, zIndex: 0 }, containerRefresh, trinkets: { zIndex: 4, position: "absolute", pointerEvents: "none", width: "100%", height: "100%", top: 0, left: 0 }, trinketsRefresh: { zIndex: 4, position: "absolute", pointerEvents: "none", width: "175%", height: "175%", top: "-37.5%", left: "-37.5%" } };
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
const memoResult = importAllResult.memo((trinketsAnimationUrl) => {
2026-07-20 16:05:17 +00:00
trinketsAnimationUrl = trinketsAnimationUrl.trinketsAnimationUrl;
2026-07-29 08:29:29 +00:00
let APNGPlayer = require;
let obj = dependencyMap;
2026-08-24 06:08:38 +00:00
obj1 = useIsMobileVisualRefreshExperimentEnabled;
2026-07-29 08:29:29 +00:00
const enabled = obj1.useMobileVisualRefreshConfig({ location: "GiftIconTrinketsAnimation" }).enabled;
2026-08-24 06:08:38 +00:00
const tmp2 = callback(map.useToken(ThemesDefault.modules.mobile.CHAT_INPUT_ACTION_BUTTON_SIZE));
const obj3 = map;
2026-07-29 08:29:29 +00:00
const tmp = importDefault;
2026-08-24 06:08:38 +00:00
const items = [closure_4];
const stateFromStores = initialize.useStateFromStores(items, () => useReducedMotion.useReducedMotion);
2026-07-29 08:29:29 +00:00
const tmp4 = enabled ? tmp2.trinketsRefresh : tmp2.trinkets;
2026-08-24 06:08:38 +00:00
const obj4 = initialize;
2026-07-29 08:29:29 +00:00
if (APNGPlayerResult.isNullOrEmpty(trinketsAnimationUrl)) {
2026-07-20 16:05:17 +00:00
return null;
} else {
2026-07-29 08:29:29 +00:00
obj = { style: null, pointerEvents: "none", children: null };
obj[0] = enabled ? tmp2.containerRefresh : tmp2.container;
if (APNGPlayerResult1.isAndroid()) {
2026-08-24 06:08:38 +00:00
APNGPlayer = useAPNGPlayerControls.APNGPlayer;
2026-07-29 08:29:29 +00:00
obj = { url: null, autoplay: null, style: null };
obj[0] = trinketsAnimationUrl;
obj[1] = !stateFromStores;
obj[2] = tmp4;
let tmp5Result = tmp5(APNGPlayer, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj = { source: null, style: null, resizeMode: "contain", enableAnimation: null };
obj1 = { uri: null };
obj1[0] = trinketsAnimationUrl;
obj[0] = obj1;
obj[1] = tmp4;
obj[3] = !stateFromStores;
2026-08-24 06:08:38 +00:00
tmp5Result = tmp5(preloadDefault, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[2] = tmp5Result;
tmp5Result = tmp5(View, obj);
2026-08-24 06:08:38 +00:00
APNGPlayerResult1 = set;
2026-07-29 08:29:29 +00:00
const tmp6 = View;
2026-07-20 16:05:17 +00:00
}
});
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/chat_input/native/GiftIconTrinketsAnimation.tsx");
2026-07-20 16:05:17 +00:00
export const GiftIconTrinketsAnimation = memoResult;