import { __read as T } from "../../../../../tslib/tslib.es6.es.js";
import { scalePoint as u } from "./delta-apply.es.js";
import { percent as X } from "../../../../../style-value-types/dist/es/numbers/units.es.js";
import { mix as _ } from "../../../../../popmotion/dist/es/utils/mix.es.js";
function D(m, v, f, d, e) {
  return m -= v, m = u(m, 1 / f, d), e !== void 0 && (m = u(m, 1 / e, d)), m;
}
function Y(m, v, f, d, e, y, i) {
  if (v === void 0 && (v = 0), f === void 0 && (f = 1), d === void 0 && (d = 0.5), y === void 0 && (y = m), i === void 0 && (i = m), X.test(v)) {
    v = parseFloat(v);
    var p = _(i.min, i.max, v / 100);
    v = p - i.min;
  }
  if (typeof v == "number") {
    var K = _(y.min, y.max, d);
    m === y && (K -= v), m.min = D(m.min, v, f, K, e), m.max = D(m.max, v, f, K, e);
  }
}
function P(m, v, f, d, e) {
  var y = T(f, 3), i = y[0], p = y[1], K = y[2];
  Y(m, v[i], v[p], v[K], v.scale, d, e);
}
var k = ["x", "scaleX", "originX"], l = ["y", "scaleY", "originY"];
function q(m, v, f, d) {
  P(m.x, v, k, f == null ? void 0 : f.x, d == null ? void 0 : d.x), P(m.y, v, l, f == null ? void 0 : f.y, d == null ? void 0 : d.y);
}
export {
  Y as removeAxisDelta,
  P as removeAxisTransforms,
  q as removeBoxTransforms,
  D as removePointDelta
};
//# sourceMappingURL=delta-remove.es.js.map
