/**
 * tdesign v0.41.7
 * (c) 2022 tdesign
 * @license MIT
 */

var ANCHOR_SHARP_REGEXP = /#(\S+)$/;
function getOffsetTop(target, container) {
  var _target$getBoundingCl = target.getBoundingClientRect(),
      top = _target$getBoundingCl.top;

  if (container === window) {
    return top - document.documentElement.clientTop;
  }

  return top - container.getBoundingClientRect().top;
}

export { ANCHOR_SHARP_REGEXP, getOffsetTop };
//# sourceMappingURL=utils.js.map
