export function eventsBetween(markers, clipName, fromTime, toTime, duration, looped) {
    const events = [];
    if (duration <= 0) {
        return events;
    }
    if (!looped || toTime >= fromTime) {
        for (const marker of markers) {
            if (marker.time > fromTime && marker.time <= toTime) {
                events.push({ ...marker, clipName });
            }
        }
        return events;
    }
    const lateEvents = [];
    const earlyEvents = [];
    for (const marker of markers) {
        if (marker.time > fromTime && marker.time <= duration) {
            lateEvents.push({ ...marker, clipName });
        }
        else if (marker.time >= 0 && marker.time <= toTime) {
            earlyEvents.push({ ...marker, clipName });
        }
    }
    return [...lateEvents, ...earlyEvents];
}
//# sourceMappingURL=AnimationEvents.js.map