import e from"../vc-util/Dom/contains.mjs";import t from"../node_modules/.pnpm/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.mjs";function n(e,t){return e===t?!0:!e||!t?!1:`pageX`in t&&`pageY`in t?e.pageX===t.pageX&&e.pageY===t.pageY:`clientX`in t&&`clientY`in t&&e.clientX===t.clientX&&e.clientY===t.clientY}function r(t,n){t!==document.activeElement&&e(n,t)&&typeof t.focus==`function`&&t.focus()}function i(e,n){let r=null,i=null;function a([{target:e}]){if(!document.documentElement.contains(e))return;let{width:t,height:a}=e.getBoundingClientRect(),o=Math.floor(t),s=Math.floor(a);(r!==o||i!==s)&&Promise.resolve().then(()=>{n({width:o,height:s})}),r=o,i=s}let o=new t(a);return e&&o.observe(e),()=>{o.disconnect()}}export{n as isSamePoint,i as monitorResize,r as restoreFocus};