decord/source/7122_asyncGeneratorStep.js

42 lines
1.1 KiB
JavaScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 7122
// Function ID: 7123
2026-07-20 16:05:17 +00:00
// Name: asyncGeneratorStep
// Dependencies: []
2026-08-24 06:08:38 +00:00
// Module 7122 (asyncGeneratorStep)
2026-07-20 16:05:17 +00:00
function asyncGeneratorStep(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
2026-07-29 08:29:29 +00:00
try {
const iter = arg0[arg5](arg6);
const value = iter.value;
if (iter.done) {
arg1(value);
} else {
const resolved = Promise.resolve(value);
resolved.then(arg3, arg4);
}
} catch (tmp13) {
arg2(tmp13);
2026-07-20 16:05:17 +00:00
}
}
export default function _asyncToGenerator(arg0) {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
2026-07-20 16:05:17 +00:00
return function() {
2026-07-23 10:11:24 +00:00
const self = this;
2026-08-24 06:08:38 +00:00
closure_1 = arguments;
2026-07-20 16:05:17 +00:00
return new Promise((arg0, arg1) => {
2026-07-29 08:29:29 +00:00
const _self = arg0;
2026-08-24 06:08:38 +00:00
closure_1 = arg1;
2026-07-20 16:05:17 +00:00
function _next(arg0) {
2026-07-23 10:11:24 +00:00
callback(closure_2, callback, closure_1, _next, _throw, "next", arg0);
2026-07-20 16:05:17 +00:00
}
function _throw(arg0) {
2026-07-23 10:11:24 +00:00
callback(closure_2, callback, closure_1, _next, _throw, "throw", arg0);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const applyResult = self.apply(_self, closure_1);
2026-08-24 06:08:38 +00:00
closure_2 = applyResult;
2026-07-29 08:29:29 +00:00
_self(applyResult, arg0, arg1, _next, _throw, "next", undefined);
2026-07-20 16:05:17 +00:00
});
};
};