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

82 lines
2.2 KiB
TypeScript
Raw Permalink Normal View History

2026-10-10 08:08:14 +00:00
// Module ID: 4823
// Function ID: 4824
// Name: mergeProps
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-20 16:05:17 +00:00
// Exports: mergeProps, mergeRefs
2026-10-10 08:08:14 +00:00
// Module 4823 (mergeProps)
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
function chainCallbacks() {
2026-10-03 08:58:59 +00:00
let 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 items1 = [];
2026-10-03 08:58:59 +00:00
let arraySpreadResult = HermesBuiltin.arraySpread(items1, items, 0);
let applyResult = HermesBuiltin.apply(item10008, items1, undefined);
2026-07-29 08:29:29 +00:00
}
continue;
2026-07-20 16:05:17 +00:00
}
};
}
const result = size.fileFinishedImporting("design/utils/native/mergeProps.native.tsx");
2026-07-20 16:05:17 +00:00
export { chainCallbacks };
export const mergeRefs = function mergeRefs() {
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 tmp3Result = tmp3(current);
} else if (null != tmp3) {
tmp3.current = current;
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() {
2026-10-03 08:58:59 +00:00
let num;
2026-07-20 16:05:17 +00:00
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];
for (const key10021 in tmp2) {
2026-10-03 08:58:59 +00:00
let combined;
2026-07-29 08:29:29 +00:00
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) {
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) {
2026-10-03 08:58:59 +00:00
combined = obj2.concat(tmp8);
2026-07-29 08:29:29 +00:00
} 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;
};