decord/source/68_measure.js

108 lines
3.7 KiB
JavaScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 68
// Function ID: 69
// Name: measure
// Dependencies: [69, 73, 70, 71]
// Module 68 (measure)
2026-08-24 06:08:38 +00:00
import RN$LegacyInterop_UIManager_getConstants from "RN$LegacyInterop_UIManager_getConstants" /* 69 */;
import nullthrowsDefault from "nullthrows" /* 70 */;
import getFabricUIManager from "getFabricUIManager" /* 71 */;
import getConstants from "getConstants" /* 73 */;
2026-07-29 08:29:29 +00:00
if (true === global.RN$Bridgeless) {
2026-08-24 06:08:38 +00:00
let _default = RN$LegacyInterop_UIManager_getConstants.default;
2026-07-29 08:29:29 +00:00
} else {
2026-08-24 06:08:38 +00:00
_default = getConstants.default;
2026-07-29 08:29:29 +00:00
}
let obj = {};
const merged = Object.assign(_default);
obj.measure = function measure(arg0, arg1) {
if (arg0 % 2 === 0) {
2026-08-24 06:08:38 +00:00
const tmp5 = nullthrowsDefault;
const tmp5Result = tmp5(getFabricUIManager.getFabricUIManager());
2026-07-29 08:29:29 +00:00
const result = tmp5Result.findShadowNodeByTag_DEPRECATED(arg0);
if (result) {
tmp5Result.measure(result, arg1);
} else {
const _console = console;
const _HermesInternal = HermesInternal;
console.warn("measure cannot find view with tag #" + arg0);
arg1();
}
2026-08-24 06:08:38 +00:00
const obj = getFabricUIManager;
2026-07-29 08:29:29 +00:00
} else {
_default.measure(arg0, arg1);
}
};
obj.measureInWindow = function measureInWindow(arg0, arg1) {
if (arg0 % 2 === 0) {
2026-08-24 06:08:38 +00:00
const tmp5 = nullthrowsDefault;
const tmp5Result = tmp5(getFabricUIManager.getFabricUIManager());
2026-07-29 08:29:29 +00:00
const result = tmp5Result.findShadowNodeByTag_DEPRECATED(arg0);
if (result) {
tmp5Result.measureInWindow(result, arg1);
} else {
const _console = console;
const _HermesInternal = HermesInternal;
console.warn("measure cannot find view with tag #" + arg0);
arg1();
}
2026-08-24 06:08:38 +00:00
const obj = getFabricUIManager;
2026-07-29 08:29:29 +00:00
} else {
_default.measureInWindow(arg0, arg1);
}
};
obj.measureLayout = function measureLayout(arg0, arg1, arg2, arg3) {
if (arg0 % 2 === 0) {
2026-08-24 06:08:38 +00:00
const tmp10 = nullthrowsDefault;
const tmp10Result = tmp10(getFabricUIManager.getFabricUIManager());
2026-07-29 08:29:29 +00:00
const result = tmp10Result.findShadowNodeByTag_DEPRECATED(arg0);
const result1 = tmp10Result.findShadowNodeByTag_DEPRECATED(arg1);
if (result) {
if (result1) {
tmp10Result.measureLayout(result, result1, arg2, arg3);
}
}
} else {
_default.measureLayout(arg0, arg1, arg2, arg3);
}
};
obj.measureLayoutRelativeToParent = function measureLayoutRelativeToParent(arg0, arg1, arg2) {
const _require = arg2;
if (arg0 % 2 === 0) {
const _console = console;
console.warn("RCTUIManager.measureLayoutRelativeToParent method is deprecated and it will not be implemented in newer versions of RN (Fabric) - T47686450");
2026-08-24 06:08:38 +00:00
const tmp8 = nullthrowsDefault;
2026-07-29 08:29:29 +00:00
const tmp8Result = tmp8(_require(71).getFabricUIManager());
const result = tmp8Result.findShadowNodeByTag_DEPRECATED(arg0);
if (result) {
tmp8Result.measure(result, (arg0, arg1, arg2, arg3, arg4, arg5) => {
callback(arg0, arg1, arg2, arg3);
});
}
const obj = _require(71);
} else {
const result1 = _default.measureLayoutRelativeToParent(arg0, arg1, arg2);
}
};
2026-08-04 21:03:28 +00:00
obj.dispatchViewManagerCommand = function dispatchViewManagerCommand(num) {
if (typeof num !== "number") {
2026-07-29 08:29:29 +00:00
const _Error = Error;
2026-08-24 06:08:38 +00:00
error = new Error("dispatchViewManagerCommand: found null reactTag");
2026-07-29 08:29:29 +00:00
throw error;
2026-08-04 21:03:28 +00:00
} else if (num % 2 === 0) {
2026-08-24 06:08:38 +00:00
const tmp5 = nullthrowsDefault;
const tmp5Result = tmp5(getFabricUIManager.getFabricUIManager());
2026-08-04 21:03:28 +00:00
const result = tmp5Result.findShadowNodeByTag_DEPRECATED(num);
2026-07-29 08:29:29 +00:00
if (result) {
const _HermesInternal = HermesInternal;
tmp5Result.dispatchCommand(result, "" + arg1, arg2);
}
2026-08-24 06:08:38 +00:00
const obj = getFabricUIManager;
2026-07-29 08:29:29 +00:00
} else {
2026-08-04 21:03:28 +00:00
const result1 = _default.dispatchViewManagerCommand(num, arg1, arg2);
2026-07-29 08:29:29 +00:00
}
};
export default obj;