import { u as l } from "./safeReact.js";
function u(e) {
  const t = e.getBoundingClientRect(), i = l(e), o = i.getComputedStyle(e, "::before"), n = i.getComputedStyle(e, "::after");
  if (!(o.content !== "none" || n.content !== "none")) return t;
  const r = parseFloat(o.width) || 0, a = parseFloat(o.height) || 0, c = parseFloat(n.width) || 0, f = parseFloat(n.height) || 0, g = Math.max(t.width, r, c), d = Math.max(t.height, a, f), h = g - t.width, s = d - t.height;
  return {
    left: t.left - h / 2,
    right: t.right + h / 2,
    top: t.top - s / 2,
    bottom: t.bottom + s / 2
  };
}
export {
  u as t
};

//# sourceMappingURL=getPseudoElementBounds.js.map