decord/alpha/source/components_native/common/FastImage.tsx
github-actions 6eea20b8e1 chore: update source for alpha 348.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5014.js (118.4 MB)
2026-09-24 10:59:02 +00:00

104 lines
2.8 KiB
TypeScript

// Module ID: 5892
// Function ID: 5893
// Name: FastImage
// Dependencies: [19, 17, 21, 4829, 5893, 1364, 2]
// Module 5892 (FastImage)
import FastImageNativeComponentDefault from "FastImageNativeComponent" /* 5893 */;
import noop from "module_19" /* 19 */;
class FastImageAndroid {
constructor(arg0) {
obj = {};
merged = Object.assign(global);
obj.defaultSource = global.placeholder;
obj.fadeDuration = 0;
return jsx(Image, obj);
}
}
get_ActivityIndicator = fn(17);
({ Image: c2, NativeModules: c3 } = get_ActivityIndicator);
const jsx = fn(21).jsx;
const createStyles = fn(4829);
let closure_5 = createStyles.createStyles({ base: { overflow: "hidden" } });
let merged = Object.assign(noop.memo((fade) => {
({ placeholder, enableAnimation } = fade);
let tmp2 = undefined === enableAnimation;
({ source, style } = fade);
if (!tmp2) {
tmp2 = enableAnimation;
}
fade = fade.fade;
let tmp3 = undefined === fade;
({ paused, manualPlayback } = fade);
if (!tmp3) {
tmp3 = fade;
}
const usesSmallCache = fade.usesSmallCache;
if (typeof source === "number") {
const obj2 = {};
const merged = Object.assign(fade);
return <React2 />;
} else {
let assetSource = null;
if (null != placeholder) {
assetSource = React2.resolveAssetSource(placeholder);
}
const obj = {};
const merged1 = Object.assign(fade);
const items = [tmp.base, style];
obj.style = items;
let uri;
if (assetSource != null) {
uri = assetSource.uri;
}
obj.placeholder = uri;
obj.enableAnimation = tmp2;
obj.paused = paused;
obj.manualPlayback = manualPlayback;
obj.fade = tmp3;
obj.usesSmallCache = tmp4;
return jsx(FastImageNativeComponentDefault, {});
}
tmp = closure_5();
tmp4 = undefined !== usesSmallCache && usesSmallCache;
}), {
preload(arg0) {
closure_0 = arg0;
const items = [
new Promise((arg0) => {
ImageManager = ImageManager.ImageManager;
ImageManager.preload(closure_0, arg0);
}),
];
const promise = new Promise((arg0) => {
ImageManager = ImageManager.ImageManager;
ImageManager.preload(closure_0, arg0);
});
items[1] = new Promise((arg0) => setTimeout(arg0, num));
return Promise.race(items);
}
});
FastImageAndroid.preload = (arg0, arg1) => {
closure_0 = arg1;
const catchPromise = React2.prefetch(arg0).catch(() => {
});
let racePromise = catchPromise;
if (null != arg1) {
const items = [catchPromise, ];
const promise = new Promise((arg0) => setTimeout(arg0, closure_0));
items[1] = promise;
racePromise = Promise.race(items);
}
return racePromise;
};
const PlatformUtils = fn(1364);
if (PlatformUtils.isAndroid()) {
merged = FastImageAndroid;
}
const size = fn(2);
const result = size.fileFinishedImporting("components_native/common/FastImage.tsx");
export default merged;