"use strict";var t=require("react");module.exports=function(e,n,r){void 0===r&&(r=[".MuiPopover-root",".MuiDialog-container",".ReactModalPortal"]);var o=r.filter((function(t){return"string"==typeof t})),u=r.filter((function(t){return!!t&&"string"!=typeof t})),i=function(t){var r=o.some((function(e){return t.target.closest(e)}))||u.some((function(e){return e.contains(t.target)}));!e.current||e.current.contains(t.target)||r||n(t)};t.useEffect((function(){return document.addEventListener("mousedown",i),function(){document.removeEventListener("mousedown",i)}}))};
