function getInstanceOrVnodeRect(instance) {
  if (false) {}

  const el = instance.subTree.el;

  if (!shared_utils_1.isBrowser) {
    // @TODO: Find position from instance or a vnode (for functional components).
    return;
  }

  if (!(0, shared_utils_1.inDoc)(el)) {
    return;
  }

  if ((0, util_1.isFragment)(instance)) {
    return addIframePosition(getFragmentRect(instance.subTree), getElWindow(el));
  } else if (el.nodeType === 1) {
    return addIframePosition(el.getBoundingClientRect(), getElWindow(el));
  } else if (instance.subTree.component) {
    return getInstanceOrVnodeRect(instance.subTree.component);
  }
}
Get the client rect for an instance.

@param {Vue|Vnode} instance
@return {Object}