decord/source/__polyfill/11xxx/module_11014.js
github-actions 8d58bae3b2 chore: update source for alpha 347.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4907.js (118.4 MB)
2026-09-18 06:58:00 +00:00

40 lines
1.1 KiB
JavaScript

// Module ID: 11014
// Function ID: 11015
// Dependencies: [19]
// Exports: usePropsErrorBoundary
// Module 11014
import noop from "module_19" /* 19 */;
export const usePropsErrorBoundary = function usePropsErrorBoundary(arg0) {
closure_0 = arg0;
const items = [arg0];
const effect = noop.useEffect(() => {
const size = closure_0;
({ defaultIndex, dataLength } = closure_0);
if (typeof defaultIndex === "number") {
if (dataLength > 0) {
const _Error3 = Error;
const error = new Error("DefaultIndex must be in the range of data length.");
throw error;
}
}
if (!size.mode) {
if (!size.vertical) {
if (!size.width) {
const _Error = Error;
const error1 = new Error("`width` must be specified for horizontal carousels.");
throw error1;
}
}
if (size.vertical) {
if (!size.height) {
const _Error2 = Error;
const error2 = new Error("`height` must be specified for vertical carousels.");
throw error2;
}
}
}
}, items);
};