old_contents: import getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';
  import getScroll from './getScroll';
  
  export default function getViewportOffsetRectRelativeToArtbitraryNode(element) {
      const html = window.document.documentElement;
      const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
      const width = Math.max(html.clientWidth, window.innerWidth || 0);
      const height = Math.max(html.clientHeight, window.innerHeight || 0);
  
      const scrollTop = getScroll(html);
      const scrollLeft = getScroll(html, 'left');
  
      console.log(relativeOffset, scrollTop, scrollLeft);
  
      return {
          top: scrollTop - relativeOffset.top ,
          bottom: scrollTop - relativeOffset.top + height,
          left: scrollLeft - relativeOffset.left,
          right: scrollLeft - relativeOffset.left + width,
      };
  }
  
new_contents: import getOffsetRect from './getOffsetRect';
  import getOffsetParent from './getOffsetParent';
  
  export default function getViewportOffsetRectRelativeToArtbitraryNode(element) {
      // Offset relative to offsetParent
      const relativeOffset = getOffsetRect(element);
  
      if (element.nodeName !== 'HTML') {
          const offsetParent = getOffsetParent(element);
          const parentOffset = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent);
          const offset = {
              width: relativeOffset.offsetWidth,
              height: relativeOffset.offsetHeight,
              left: relativeOffset.left + parentOffset.left,
              top: relativeOffset.top + parentOffset.top,
              right: relativeOffset.right - parentOffset.right,
              bottom: relativeOffset.bottom - parentOffset.bottom,
          };
          return offset;
      }
  
      return relativeOffset;
  }
  
subject: Revert silly change