function Q(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,o)}return r}function k(t){for(var e=1;e=0&&r.left>=0&&r.bottom>r.top&&r.right>r.left?r:null}function Ut(t,e,r,o){var n=u.clone(t),i={width:e.width,height:e.height};return o.adjustX&&n.left=r.left&&n.left+i.width>r.right&&(i.width-=n.left+i.width-r.right),o.adjustX&&n.left+i.width>r.right&&(n.left=Math.max(r.right-i.width,r.left)),o.adjustY&&n.top=r.top&&n.top+i.height>r.bottom&&(i.height-=n.top+i.height-r.bottom),o.adjustY&&n.top+i.height>r.bottom&&(n.top=Math.max(r.bottom-i.height,r.top)),u.mix(n,i)}function Z(t){var e,r,o;if(!u.isWindow(t)&&t.nodeType!==9)e=u.offset(t),r=u.outerWidth(t),o=u.outerHeight(t);else{var n=u.getWindow(t);e={left:u.getWindowScrollLeft(n),top:u.getWindowScrollTop(n)},r=u.viewportWidth(n),o=u.viewportHeight(n)}return e.width=r,e.height=o,e}function ft(t,e){var r=e.charAt(0),o=e.charAt(1),n=t.width,i=t.height,a=t.left,f=t.top;return r==="c"?f+=i/2:r==="b"&&(f+=i),o==="c"?a+=n/2:o==="r"&&(a+=n),{left:a,top:f}}function X(t,e,r,o,n){var i=ft(e,r[1]),a=ft(t,r[0]),f=[a.left-i.left,a.top-i.top];return{left:Math.round(t.left-f[0]+o[0]-n[0]),top:Math.round(t.top-f[1]+o[1]-n[1])}}function ut(t,e,r){return t.leftr.right}function ct(t,e,r){return t.topr.bottom}function $t(t,e,r){return t.left>r.right||t.left+e.widthr.bottom||t.top+e.height=r.right||o.top>=r.bottom}function bt(t,e,r){var o=r.target||e,n=Z(o),i=!Gt(o,r.overflow&&r.overflow.alwaysByViewport);return mt(t,n,r,i)}bt.__getOffsetParent=$;bt.__getVisibleRectForElement=K;function Kt(t,e,r){var o,n,i=u.getDocument(t),a=i.defaultView||i.parentWindow,f=u.getWindowScrollLeft(a),s=u.getWindowScrollTop(a),l=u.viewportWidth(a),h=u.viewportHeight(a);"pageX"in e?o=e.pageX:o=f+e.clientX,"pageY"in e?n=e.pageY:n=s+e.clientY;var w={left:o,top:n,width:0,height:0},p=o>=0&&o<=f+l&&n>=0&&n<=s+h,c=[r.points[0],"cc"];return mt(t,w,k(k({},r),{},{points:c}),p)}export{bt as a,Kt as b};