_forEachLevelFilter(hookMap, cache, type, items, fn, forceClone) {
		const hooks = this._getAllLevelHooks(hookMap, cache, type);
		if (hooks.length === 0) return forceClone ? items.slice() : items;
		let i = 0;
		return items.filter((item, idx) => {
			for (const hook of hooks) {
				const r = fn(/** @type {H} */ (hook), item, idx, i);
				if (r !== undefined) {
					if (r) i++;
					return r;
				}
			}
			i++;
			return true;
		});
	}
@template {StatsFactoryHooks[keyof StatsFactoryHooks]} T
@template {T extends HookMap<infer H> ? H : never} H
@template {H extends import("tapable").Hook<any, infer R> ? R : never} R
@param {T} hookMap hook map
@param {Caches<H>} cache cache
@param {string} type type
@param {Array<FactoryData>} items items
@param {(hook: H, item: R, idx: number, i: number) => R | undefined} fn fn
@param {boolean} forceClone force clone
@returns {R[]} result for each level
@private