function n(n){return Array.isArray(n)?n:Array.prototype.slice.call(n)}function t(n){return r(n,"dir","ltr")}function r(n,t,r){const u=n.closest(`[${t}]`);return u?u.getAttribute(t):r}function u(n){n&&("function"==typeof n.setFocus?n.setFocus():n.focus())}function o(t,r){const u=t.querySelector("slot");return n(u?u.assignedElements():t.children).filter(n=>n.matches(r))}function c(n){const t=null==n?void 0:n.getAttribute("aria-describedby");return t&&document.getElementById(t)||null}function a(n,t){return n.shadowRoot.contains(t)||n.contains(t)}export{r as a,c as b,o as c,u as f,t as g,a as h,n}