Files
gradio-webrtc/backend/fastrtc/templates/component/chunk-RZ5BOZE2-C6qYYKQn.js
Freddy Boulton 3abe0a4d8a Fix interactive video (#350)
* n

* remove template

* Add templates

* remove print
2025-06-13 12:22:38 -04:00

25 lines
958 B
JavaScript

import { _ as n, j as r, k as g, l as d } from "./mermaid.core-Cmyps_S7.js";
var u = /* @__PURE__ */ n((t, e) => {
let o;
return e === "sandbox" && (o = r("#i" + t)), (e === "sandbox" ? r(o.nodes()[0].contentDocument.body) : r("body")).select(`[id="${t}"]`);
}, "getDiagramElement"), b = /* @__PURE__ */ n((t, e, o, i) => {
t.attr("class", o);
const { width: a, height: s, x: h, y: x } = l(t, e);
g(t, s, a, i);
const c = w(h, x, a, s, e);
t.attr("viewBox", c), d.debug(`viewBox configured: ${c} with padding: ${e}`);
}, "setupViewPortForSVG"), l = /* @__PURE__ */ n((t, e) => {
var i;
const o = ((i = t.node()) == null ? void 0 : i.getBBox()) || { width: 0, height: 0, x: 0, y: 0 };
return {
width: o.width + e * 2,
height: o.height + e * 2,
x: o.x,
y: o.y
};
}, "calculateDimensionsWithPadding"), w = /* @__PURE__ */ n((t, e, o, i, a) => `${t - a} ${e - a} ${o} ${i}`, "createViewBox");
export {
u as g,
b as s
};