// This helper function is similar to Element.closest(),
// however it also traverses shadow DOM boundaries.
export const closest = (selector, el) => {
    return (el &&
        (('closest' in el && el.closest(selector)) ||
            closest(selector, el.getRootNode().host)));
};
//# sourceMappingURL=closest.js.map
