import a from "../../@babel/runtime/helpers/esm/objectSpread2.mjs";
import l from "../../@babel/runtime/helpers/esm/defineProperty.mjs";
import { getClientSize as p } from "../../rc-util/es/Dom/css.mjs";
function m(f, e, o, i) {
  var n = e + o, r = (o - i) / 2;
  if (o > i) {
    if (e > 0)
      return l({}, f, r);
    if (e < 0 && n < i)
      return l({}, f, -r);
  } else if (e < 0 || n > i)
    return l({}, f, e < 0 ? r : -r);
  return {};
}
function v(f, e, o, i) {
  var n = p(), r = n.width, t = n.height, u = null;
  return f <= r && e <= t ? u = {
    x: 0,
    y: 0
  } : (f > r || e > t) && (u = a(a({}, m("x", o, f, r)), m("y", i, e, t))), u;
}
export {
  v as default
};
