if (document.documentElement.getAttribute("id") !== "d2-svg") {
return;
}
const svgEl = document.documentElement;
let width = parseInt(svgEl.getAttribute("width"), 10);
let height = parseInt(svgEl.getAttribute("height"), 10);
let ratio;
if (width > height) {
if (width > window.innerWidth) {
ratio = window.innerWidth / width;
}
} else if (height > window.innerHeight) {
ratio = window.innerHeight / height;
}
if (ratio) {
svgEl.setAttribute("width", width * ratio - 16);
svgEl.setAttribute("height", height * ratio - 16);
}
});
]]></script><gid="x"><gclass="shape"><rectx="72"y="12"width="113"height="126"style="fill:#F7F8FE;stroke:#0D32B2;stroke-width:2;"/></g><textclass="text-bold"x="128.500000"y="78.000000"style="text-anchor:middle;font-size:16px;fill:#0A0F25">x</text></g><gid="y"><gclass="shape"><rectx="90"y="238"width="114"height="126"style="fill:#F7F8FE;stroke:#0D32B2;stroke-width:2;"/></g><textclass="text-bold"x="147.000000"y="304.000000"style="text-anchor:middle;font-size:16px;fill:#0A0F25">y</text></g><gid="z"><gclass="shape"><rectx="290"y="12"width="112"height="126"style="fill:#F7F8FE;stroke:#0D32B2;stroke-width:2;"/></g><textclass="text-bold"x="346.000000"y="78.000000"style="text-anchor:middle;font-size:16px;fill:#0A0F25">z</text></g><gid="(x -> x)[0]"><markerid="mk-3990223579"markerWidth="10.000000"markerHeight="12.000000"refX="7.000000"refY="6.000000"viewBox="0.000000 0.000000 10.000000 12.000000"orient="auto"markerUnits="userSpaceOnUse"><polygonclass="connection"fill="#0D32B2"stroke-width="2"points="0.000000,0.000000 10.000000,6.000000 0.000000,12.000000"/></marker><pathd="M 70.000000 62.400000 L 32.000000 62.400000 S 22.000000 62.400000 22.000000 72.400000 L 22.000000 77.600000 S 22.000000 87.600000 32.000000 87.600000 L 68.000000 87.600000"class="connection"style="fill:none;stroke:#0D32B2;stroke-width:2;"marker-end="url(#mk-3990223579)"mask="url(#687632381)"/></g><gid="(x -> x)[1]"><pathd="M 70.000000 37.200000 L 22.000000 37.200000 S 12.000000 37.200000 12.000000 47.200000 L 12.000000 102.800000 S 12.000000 112.800000 22.000000 112.800000 L 68.000000 112.800000"class="connection"style="fill:none;stroke:#0D32B2;stroke-width:2;"marker-end="url(#mk-3990223579)"mask="url(#687632381)"/></g><gid="(x -> y)[0]"><pathd="M 128.500000 140.000000 L 128.500000 234.000000"class="connection"style="fill:none;stroke:#0D32B2;stroke-width:2;"marker-end="url(#mk-3990223579)"mask="url(#687632381)"/></g><gid="(z -> y)[0]"><pathd="M 346.000000 140.000000 L 346.000000 178.000000 S 346.000000 188.000000 336.000000 188.000000 L 176.500000 188.000000 S 166.500000 188.000000 166.500000 198.000000 L 166.500000 234.000000"class="connection"style="fill:none;stroke:#0D32B2;stroke-width:2;"marker-end="url(#mk-3990223579)"mask="url(#687632381)"/></g><gid="(z -> z)[0]"><pathd="M 288.000000 54.000000 L 250.000000 54.000000 S 240.000000 54.000000 240.000000 64.000000 L 240.000000 86.000000 S 240.000000 96.000000 250.000000 96.000000 L 286.000000 96.000000"class="connection"style="fill:none;stroke:#0D32B2;stroke-width:2;"marker-end="url(#mk-3990223579)"mask="url(#687632381)"/><textclass="text-italic"x="240.500000"y="81.000000"style="text-anchor:middle;font-size:16px;fill:#676C7E">hello</text></g><maskid="687632381"maskUnits="userSpaceOnUse"x="-100"y="-100"width="592"height="556">