import { n as a, r as w } from "./chunk-AGHRB4JF.js";
import { c as x } from "./chunk-ICPOFSXX.js";
var g = /* @__PURE__ */ a((t, e, i, r) => {
  t.attr("class", i);
  const { width: o, height: h, x: c, y: s } = u(t, e);
  x(t, h, o, r);
  const n = m(c, s, o, h, e);
  t.attr("viewBox", n), w.debug(`viewBox configured: ${n} with padding: ${e}`);
}, "setupViewPortForSVG"), u = /* @__PURE__ */ a((t, e) => {
  const i = t.node()?.getBBox() || {
    width: 0,
    height: 0,
    x: 0,
    y: 0
  };
  return {
    width: i.width + e * 2,
    height: i.height + e * 2,
    x: i.x,
    y: i.y
  };
}, "calculateDimensionsWithPadding"), m = /* @__PURE__ */ a((t, e, i, r, o) => `${t - o} ${e - o} ${i} ${r}`, "createViewBox");
export {
  g as t
};

//# sourceMappingURL=chunk-EDXVE4YY.js.map