import{getOwnerDocument as t}from"./dom.js";var e=t=>t.hasAttribute("tabindex"),n=t=>e(t)&&-1===t.tabIndex;function r(t){return!0===Boolean(t.getAttribute("disabled"))||!0===Boolean(t.getAttribute("aria-disabled"))}function i(t){return u(t)&&"input"===t.tagName.toLowerCase()&&"select"in t}function a(e){return(e instanceof HTMLElement?t(e):document).activeElement===e}function u(t){return t instanceof HTMLElement}function o(t){return!(!t.parentElement||!o(t.parentElement))||t.hidden}function l(t){var e=t.getAttribute("contenteditable");return"false"!==e&&null!=e}function c(t){if(!u(t)||o(t)||r(t))return!1;var{localName:n}=t;if(["input","select","textarea","button"].indexOf(n)>=0)return!0;var i={a:()=>t.hasAttribute("href"),audio:()=>t.hasAttribute("controls"),video:()=>t.hasAttribute("controls")};return n in i?i[n]():!!l(t)||e(t)}function f(t){return!!t&&(u(t)&&c(t)&&!n(t))}export{n as hasNegativeTabIndex,e as hasTabIndex,a as isActiveElement,l as isContentEditable,r as isDisabled,c as isFocusable,u as isHTMLElement,o as isHidden,i as isInputElement,f as isTabbable};
//# sourceMappingURL=tabbable.js.map
