export const resolveHighlightTargetForBoundary = (args) => {
    if (!args.boundary)
        return args.alignment.fallbackTarget;
    const segment = args.alignment.segments.find((candidate) => candidate.speechTokenIds.includes(args.boundary.token.id));
    return segment?.target || args.alignment.fallbackTarget;
};
export const resolveMatchedHighlightTargetForBoundary = (args) => {
    if (!args.boundary)
        return null;
    const segment = args.alignment.segments.find((candidate) => candidate.speechTokenIds.includes(args.boundary.token.id));
    return segment?.target || null;
};
//# sourceMappingURL=range-resolver.js.map