import { parseValueFromTransform as n } from "../../../render/dom/parse-transform.es.js";
import { transformPropOrder as m } from "../../../render/utils/keys-transform.es.js";
import { number as i } from "../../../value/types/numbers/index.es.js";
import { px as l } from "../../../value/types/numbers/units.es.js";
const h = (r) => r === i || r === l, p = /* @__PURE__ */ new Set(["x", "y", "z"]), f = m.filter((r) => !p.has(r));
function F(r) {
  const o = [];
  return f.forEach((t) => {
    const a = r.getValue(t);
    a !== void 0 && (o.push([t, a.get()]), a.set(t.startsWith("scale") ? 1 : 0));
  }), o;
}
const s = {
  // Dimensions
  width: ({ x: r }, { paddingLeft: o = "0", paddingRight: t = "0", boxSizing: a }) => {
    const e = r.max - r.min;
    return a === "border-box" ? e : e - parseFloat(o) - parseFloat(t);
  },
  height: ({ y: r }, { paddingTop: o = "0", paddingBottom: t = "0", boxSizing: a }) => {
    const e = r.max - r.min;
    return a === "border-box" ? e : e - parseFloat(o) - parseFloat(t);
  },
  top: (r, { top: o }) => parseFloat(o),
  left: (r, { left: o }) => parseFloat(o),
  bottom: ({ y: r }, { top: o }) => parseFloat(o) + (r.max - r.min),
  right: ({ x: r }, { left: o }) => parseFloat(o) + (r.max - r.min),
  // Transform
  x: (r, { transform: o }) => n(o, "x"),
  y: (r, { transform: o }) => n(o, "y")
};
s.translateX = s.x;
s.translateY = s.y;
export {
  h as isNumOrPxType,
  s as positionalValues,
  F as removeNonTranslationalTransform
};
//# sourceMappingURL=unit-conversion.es.js.map
