"use strict";/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */const l=t=>t.nodeType===Node.ELEMENT_NODE;function u(t){return{addClass:e=>{t.classList.add(e)},removeClass:e=>{t.classList.remove(e)},hasClass:e=>t.classList.contains(e)}}let c=!1;const a=()=>{},v={get passive(){return c=!0,!1}};document.addEventListener("x",a,v);document.removeEventListener("x",a);const E=c,d=(t=window.document)=>{let e=t.activeElement;const s=[];if(!e)return s;for(;e&&(s.push(e),e.shadowRoot);)e=e.shadowRoot.activeElement;return s},m=t=>{const e=d();if(!e.length)return!1;const s=e[e.length-1],i=new Event("check-if-focused",{bubbles:!0,composed:!0});let n=[];const o=r=>{n=r.composedPath()};return document.body.addEventListener("check-if-focused",o),s.dispatchEvent(i),document.body.removeEventListener("check-if-focused",o),n.indexOf(t)!==-1};exports.addHasRemoveClass=u;exports.deepActiveElementPath=d;exports.doesElementContainFocus=m;exports.isNodeElement=l;exports.supportsPassiveEventListener=E;
