1 | import { aq as o, e as i } from "./mermaid-9f2aa176.js";
|
2 | const l = (s, t) => {
|
3 | const e = s.append("rect");
|
4 | if (e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), t.name && e.attr("name", t.name), t.rx !== void 0 && e.attr("rx", t.rx), t.ry !== void 0 && e.attr("ry", t.ry), t.attrs !== void 0)
|
5 | for (const r in t.attrs)
|
6 | e.attr(r, t.attrs[r]);
|
7 | return t.class !== void 0 && e.attr("class", t.class), e;
|
8 | }, x = (s, t) => {
|
9 | const e = {
|
10 | x: t.startx,
|
11 | y: t.starty,
|
12 | width: t.stopx - t.startx,
|
13 | height: t.stopy - t.starty,
|
14 | fill: t.fill,
|
15 | stroke: t.stroke,
|
16 | class: "rect"
|
17 | };
|
18 | l(s, e).lower();
|
19 | }, d = (s, t) => {
|
20 | const e = t.text.replace(o, " "), r = s.append("text");
|
21 | r.attr("x", t.x), r.attr("y", t.y), r.attr("class", "legend"), r.style("text-anchor", t.anchor), t.class !== void 0 && r.attr("class", t.class);
|
22 | const n = r.append("tspan");
|
23 | return n.attr("x", t.x + t.textMargin * 2), n.text(e), r;
|
24 | }, h = (s, t, e, r) => {
|
25 | const n = s.append("image");
|
26 | n.attr("x", t), n.attr("y", e);
|
27 | const a = i.sanitizeUrl(r);
|
28 | n.attr("xlink:href", a);
|
29 | }, y = (s, t, e, r) => {
|
30 | const n = s.append("use");
|
31 | n.attr("x", t), n.attr("y", e);
|
32 | const a = i.sanitizeUrl(r);
|
33 | n.attr("xlink:href", `#${a}`);
|
34 | }, g = () => ({
|
35 | x: 0,
|
36 | y: 0,
|
37 | width: 100,
|
38 | height: 100,
|
39 | fill: "#EDF2AE",
|
40 | stroke: "#666",
|
41 | anchor: "start",
|
42 | rx: 0,
|
43 | ry: 0
|
44 | }), p = () => ({
|
45 | x: 0,
|
46 | y: 0,
|
47 | width: 100,
|
48 | height: 100,
|
49 | "text-anchor": "start",
|
50 | style: "#666",
|
51 | textMargin: 0,
|
52 | rx: 0,
|
53 | ry: 0,
|
54 | tspan: !0
|
55 | });
|
56 | export {
|
57 | x as a,
|
58 | y as b,
|
59 | h as c,
|
60 | l as d,
|
61 | p as e,
|
62 | d as f,
|
63 | g
|
64 | };
|