decord/source/design/utils/native/mergeProps.native.tsx

95 lines
2.6 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 4104
// Function ID: 4105
2026-07-20 16:05:17 +00:00
// Name: chainCallbacks
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-20 16:05:17 +00:00
// Exports: mergeProps, mergeRefs
2026-08-24 06:08:38 +00:00
// Module 4104 (chainCallbacks)
import set from "set" /* 2 */;
2026-07-20 16:05:17 +00:00
function chainCallbacks(arg0, arg1) {
2026-08-24 06:08:38 +00:00
closure_0 = [...arguments];
2026-07-29 08:29:29 +00:00
return () => {
2026-07-20 16:05:17 +00:00
const items = [...arguments];
2026-07-29 08:29:29 +00:00
for (const item10008 of closure_0) {
2026-08-04 21:03:28 +00:00
if (typeof item10008 === "function") {
2026-07-29 08:29:29 +00:00
let tmp2 = item10008;
let items1 = [];
let tmp3 = items1;
let tmp4 = items;
let num = 0;
let arraySpreadResult = HermesBuiltin.arraySpread(items, 0);
let tmp6 = tmp;
let tmp7 = items1;
let applyResult = HermesBuiltin.apply(items1, undefined);
}
continue;
2026-07-20 16:05:17 +00:00
}
};
}
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("design/utils/native/mergeProps.native.tsx");
2026-07-20 16:05:17 +00:00
export { chainCallbacks };
2026-07-29 08:29:29 +00:00
export const mergeRefs = function mergeRefs(ref, ref2) {
2026-07-20 16:05:17 +00:00
const items = [...arguments];
2026-07-23 10:11:24 +00:00
return 1 === items.length ? items[0] : ((current) => {
2026-07-29 08:29:29 +00:00
const iter = items[Symbol.iterator]();
const nextResult = iter.next();
while (iter !== undefined) {
let tmp3 = nextResult;
2026-08-04 21:03:28 +00:00
if (typeof nextResult === "function") {
2026-07-29 08:29:29 +00:00
let tmp5 = nextResult;
let tmp3Result = tmp3(current);
} else {
let tmp7 = nextResult;
if (null != tmp3) {
let tmp4 = nextResult;
tmp3.current = current;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
continue;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
});
2026-07-20 16:05:17 +00:00
};
export const mergeProps = function mergeProps(inputProps, focusProps, arg2) {
const items = [...arguments];
const obj = {};
const merged = Object.assign(items[0]);
for (let num = 1; num < items.length; num = num + 1) {
2026-07-29 08:29:29 +00:00
let tmp2 = items[num];
let tmp3 = tmp2;
let tmp4 = num;
for (const key10021 in tmp2) {
let tmp7 = key10021;
let obj2 = obj[key10021];
let tmp8 = tmp2[key10021];
2026-08-04 21:03:28 +00:00
if (typeof obj2 === "function") {
if (typeof tmp8 === "function") {
2026-07-29 08:29:29 +00:00
if ("o" === key10021[0]) {
if ("n" === key10021[1]) {
if (key10021.charCodeAt(2) >= 65) {
if (key10021.charCodeAt(2) <= 90) {
let tmp6 = chainCallbacks;
obj[key10021] = chainCallbacks(obj2, tmp8);
continue;
2026-07-20 16:05:17 +00:00
}
}
}
}
}
2026-07-29 08:29:29 +00:00
}
if ("style" === key10021) {
let combined = obj2.concat(tmp8);
} else {
combined = obj2;
if (undefined !== tmp8) {
combined = tmp8;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
obj[key10021] = combined;
continue;
2026-07-20 16:05:17 +00:00
}
}
return obj;
};