import{onMounted as d,onBeforeUnmount as i}from"vue";function m(t,s,u){function a(e){let o=e.target;o.shadowRoot&&e.composed&&(o=e.composedPath()[0]||o);const r=[t[0]?.value,t[1]?.value?.getPopupElement()];s.value&&r.every(n=>n&&!n.contains(o)&&n!==o)&&u(!1)}d(()=>{window.addEventListener("mousedown",a)}),i(()=>{window.removeEventListener("mousedown",a)})}export{m as default};
