@blueking/ai-blueking 2.1.4-beta.7 → 2.1.4-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/standalone/_baseFor-DZ1vnh4H.js +393 -0
- package/dist/standalone/arc-WNacHY26.js +80 -0
- package/dist/standalone/architecture-YZFGNWBL-pIa_tKdA.js +3 -0
- package/dist/standalone/architectureDiagram-Q4EWVU46-Bfam8Fg3.js +4057 -0
- package/dist/standalone/array-CWNufkl9.js +6 -0
- package/dist/standalone/blockDiagram-DXYQGD6D-vAb9uyF5.js +3033 -0
- package/dist/standalone/c4Diagram-AHTNJAMY-BWACU0ER.js +2961 -0
- package/dist/standalone/channel-Br5ChI8U.js +5 -0
- package/dist/standalone/chunk-2KRD3SAO-Deh6AASy.js +23 -0
- package/dist/standalone/chunk-336JU56O-CFKWNcxR.js +49 -0
- package/dist/standalone/chunk-426QAEUC-D_wKNd3w.js +9 -0
- package/dist/standalone/chunk-4BX2VUAB-DKC_OBWg.js +8 -0
- package/dist/standalone/chunk-4TB4RGXK-HiVG7T1A.js +3254 -0
- package/dist/standalone/chunk-55IACEB6-DBivnNb2.js +8 -0
- package/dist/standalone/chunk-5FUZZQ4R-tiEjqlP4.js +3638 -0
- package/dist/standalone/chunk-5PVQY5BW-BCjrVrWB.js +1299 -0
- package/dist/standalone/chunk-67CJDMHE-BX09W6oy.js +23 -0
- package/dist/standalone/chunk-7N4EOEYR-G144j5Vc.js +35 -0
- package/dist/standalone/chunk-AA7GKIK3-Dx9YCoJ-.js +30 -0
- package/dist/standalone/chunk-BSJP7CBP-DE8WR0MI.js +82 -0
- package/dist/standalone/chunk-CIAEETIT-Bv86XVLB.js +23 -0
- package/dist/standalone/chunk-EDXVE4YY-DE9KzYM-.js +25 -0
- package/dist/standalone/chunk-ENJZ2VHE-DlxIC-A3.js +560 -0
- package/dist/standalone/chunk-FMBD7UC4-DCkBrKFO.js +5 -0
- package/dist/standalone/chunk-FOC6F5B3-C7hwrEZJ.js +23 -0
- package/dist/standalone/chunk-ICPOFSXX-B9JXAgJU.js +2772 -0
- package/dist/standalone/chunk-K5T4RW27-T6hJxJM0.js +16070 -0
- package/dist/standalone/chunk-KGLVRYIC-C0JPhrjn.js +23 -0
- package/dist/standalone/chunk-LIHQZDEY-CiavnvWh.js +64 -0
- package/dist/standalone/chunk-ORNJ4GCN-BtJ79bik.js +31 -0
- package/dist/standalone/chunk-OYMX7WX6-D2UHnmfD.js +2014 -0
- package/dist/standalone/chunk-QZHKN3VN-DhzThSvb.js +15 -0
- package/dist/standalone/chunk-U2HBQHQK-75Isf1R4.js +1896 -0
- package/dist/standalone/chunk-WQLz0Won.js +20 -0
- package/dist/standalone/chunk-X2U36JSP-DSzducJI.js +67 -0
- package/dist/standalone/chunk-XPW4576I-BFhmu0d4.js +1146 -0
- package/dist/standalone/chunk-YZCP3GAM-90EaSO-2.js +60 -0
- package/dist/standalone/chunk-ZZ45TVLE-DUagTZ9d.js +32 -0
- package/dist/standalone/classDiagram-6PBFFD2Q-Bwt78q4N.js +29 -0
- package/dist/standalone/classDiagram-v2-HSJHXN6E-B2qI9-xf.js +29 -0
- package/dist/standalone/clone-CBw-BHXl.js +8 -0
- package/dist/standalone/cose-bilkent-S5V4N54A-DFJ1nlog.js +2250 -0
- package/dist/standalone/cytoscape.esm-DdhenceR.js +18103 -0
- package/dist/standalone/dagre-KV5264BT-CXTBtAae.js +293 -0
- package/dist/standalone/dagre-kfvGmNUa.js +1606 -0
- package/dist/standalone/defaultLocale-bckJcYh1.js +201 -0
- package/dist/standalone/diagram-5BDNPKRD--gLHDKg-.js +101 -0
- package/dist/standalone/diagram-G4DWMVQ6-BwLE9Hsf.js +524 -0
- package/dist/standalone/diagram-MMDJMWI5-CoilYxa0.js +213 -0
- package/dist/standalone/diagram-TYMM5635-BupwRdr6.js +133 -0
- package/dist/standalone/dist-Dlj1jr8W.js +59 -0
- package/dist/standalone/erDiagram-SMLLAGMA-tIdn6ZCM.js +1700 -0
- package/dist/standalone/flatten-CXxC4cn2.js +40 -0
- package/dist/standalone/flowDiagram-DWJPFMVM-C86bLTAY.js +4146 -0
- package/dist/standalone/ganttDiagram-T4ZO3ILL-BT23lv_X.js +3077 -0
- package/dist/standalone/gitGraph-7Q5UKJZL-C-7nG8PF.js +3 -0
- package/dist/standalone/gitGraphDiagram-UUTBAWPF-DT1BGQsP.js +728 -0
- package/dist/standalone/graphlib-DrXiQBFg.js +373 -0
- package/dist/standalone/index.es.min.js +59705 -0
- package/dist/standalone/index.iife.min.js +3502 -0
- package/dist/standalone/index.umd.min.js +3502 -0
- package/dist/standalone/info-OMHHGYJF-BOS7mrON.js +3 -0
- package/dist/standalone/infoDiagram-42DDH7IO-Dx7LFK0B.js +19 -0
- package/dist/standalone/init-B75p2clj.js +15 -0
- package/dist/standalone/isEmpty-CVG4Bj-P.js +35 -0
- package/dist/standalone/ishikawaDiagram-UXIWVN3A-CX4cX3qb.js +718 -0
- package/dist/standalone/journeyDiagram-VCZTEJTY-BCvxmmFn.js +883 -0
- package/dist/standalone/kanban-definition-6JOO6SKY-SVINWaiM.js +973 -0
- package/dist/standalone/katex-CKrw0rbA.js +22016 -0
- package/dist/standalone/line-BF1XS-Ng.js +34 -0
- package/dist/standalone/linear-DGQDIL28.js +289 -0
- package/dist/standalone/mermaid-parser.core-Blz-Qy2h.js +69 -0
- package/dist/standalone/mermaid.core-CHTh1JGx.js +944 -0
- package/dist/standalone/mindmap-definition-QFDTVHPH-1Trzro3y.js +1009 -0
- package/dist/standalone/ordinal-F3U6aXtP.js +65 -0
- package/dist/standalone/packet-4T2RLAQJ-ai5Omp1h.js +3 -0
- package/dist/standalone/path-Dm3C8WEs.js +85 -0
- package/dist/standalone/pie-ZZUOXDRM-Df1rG6QC.js +3 -0
- package/dist/standalone/pieDiagram-DEJITSTG-D5Omb898.js +165 -0
- package/dist/standalone/purify.es-CZ_RvYUu.js +549 -0
- package/dist/standalone/quadrantDiagram-34T5L4WZ-Ct4g9T4o.js +1974 -0
- package/dist/standalone/radar-PYXPWWZC-B2t6k6Fg.js +3 -0
- package/dist/standalone/reduce-DbMsJ4nx.js +532 -0
- package/dist/standalone/requirementDiagram-MS252O5E-CP0BUgnz.js +2221 -0
- package/dist/standalone/rough.esm-UCEI3PYn.js +1352 -0
- package/dist/standalone/sankeyDiagram-XADWPNL6-D6C7yZ3k.js +920 -0
- package/dist/standalone/sequenceDiagram-FGHM5R23-KeodespT.js +4157 -0
- package/dist/standalone/src-CFVe5TPD.js +2146 -0
- package/dist/standalone/stateDiagram-FHFEXIEX-DAupoS9U.js +217 -0
- package/dist/standalone/stateDiagram-v2-QKLJ7IA2-C1Lw_i_z.js +27 -0
- package/dist/standalone/style.css +1 -0
- package/dist/standalone/timeline-definition-GMOUNBTQ-Cwhj84lX.js +1068 -0
- package/dist/standalone/treeView-SZITEDCU-BnoMeJSb.js +3 -0
- package/dist/standalone/treemap-W4RFUUIX-B38XFBZF.js +3 -0
- package/dist/standalone/vennDiagram-DHZGUBPP-_1PHloeO.js +1858 -0
- package/dist/standalone/wardley-RL74JXVD-bB8BBy_Y.js +3 -0
- package/dist/standalone/wardleyDiagram-NUSXRM2D-DRLCx-qh.js +578 -0
- package/dist/standalone/xychartDiagram-5P7HB3ND-Bz2-4Ufi.js +2044 -0
- package/dist/standalone-mount-core.d.ts +34 -0
- package/dist/standalone-mount-core.d.ts.map +1 -0
- package/dist/standalone-mount.d.ts +14 -0
- package/dist/standalone-mount.d.ts.map +1 -0
- package/dist/standalone.d.ts +8 -0
- package/dist/standalone.d.ts.map +1 -0
- package/package.json +12 -3
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { g as e, h as t } from "./src-CFVe5TPD.js";
|
|
2
|
+
import { B as n, C as r, E as i, V as a, W as o, _ as s, a as c, c as l, d as u, v as d, y as f } from "./chunk-ICPOFSXX-B9JXAgJU.js";
|
|
3
|
+
import { r as p } from "./chunk-5PVQY5BW-BCjrVrWB.js";
|
|
4
|
+
import { t as m } from "./chunk-426QAEUC-D_wKNd3w.js";
|
|
5
|
+
import { t as h } from "./chunk-4BX2VUAB-DKC_OBWg.js";
|
|
6
|
+
import { t as g } from "./mermaid-parser.core-Blz-Qy2h.js";
|
|
7
|
+
//#region ../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-MMDJMWI5.mjs
|
|
8
|
+
var _ = {
|
|
9
|
+
showLegend: !0,
|
|
10
|
+
ticks: 5,
|
|
11
|
+
max: null,
|
|
12
|
+
min: 0,
|
|
13
|
+
graticule: "circle"
|
|
14
|
+
}, v = {
|
|
15
|
+
axes: [],
|
|
16
|
+
curves: [],
|
|
17
|
+
options: _
|
|
18
|
+
}, y = structuredClone(v), b = u.radar, x = /* @__PURE__ */ t(() => p({
|
|
19
|
+
...b,
|
|
20
|
+
...f().radar
|
|
21
|
+
}), "getConfig"), S = /* @__PURE__ */ t(() => y.axes, "getAxes"), C = /* @__PURE__ */ t(() => y.curves, "getCurves"), w = /* @__PURE__ */ t(() => y.options, "getOptions"), T = /* @__PURE__ */ t((e) => {
|
|
22
|
+
y.axes = e.map((e) => ({
|
|
23
|
+
name: e.name,
|
|
24
|
+
label: e.label ?? e.name
|
|
25
|
+
}));
|
|
26
|
+
}, "setAxes"), E = /* @__PURE__ */ t((e) => {
|
|
27
|
+
y.curves = e.map((e) => ({
|
|
28
|
+
name: e.name,
|
|
29
|
+
label: e.label ?? e.name,
|
|
30
|
+
entries: D(e.entries)
|
|
31
|
+
}));
|
|
32
|
+
}, "setCurves"), D = /* @__PURE__ */ t((e) => {
|
|
33
|
+
if (e[0].axis == null) return e.map((e) => e.value);
|
|
34
|
+
let t = S();
|
|
35
|
+
if (t.length === 0) throw Error("Axes must be populated before curves for reference entries");
|
|
36
|
+
return t.map((t) => {
|
|
37
|
+
let n = e.find((e) => e.axis?.$refText === t.name);
|
|
38
|
+
if (n === void 0) throw Error("Missing entry for axis " + t.label);
|
|
39
|
+
return n.value;
|
|
40
|
+
});
|
|
41
|
+
}, "computeCurveEntries"), O = {
|
|
42
|
+
getAxes: S,
|
|
43
|
+
getCurves: C,
|
|
44
|
+
getOptions: w,
|
|
45
|
+
setAxes: T,
|
|
46
|
+
setCurves: E,
|
|
47
|
+
setOptions: /* @__PURE__ */ t((e) => {
|
|
48
|
+
let t = e.reduce((e, t) => (e[t.name] = t, e), {});
|
|
49
|
+
y.options = {
|
|
50
|
+
showLegend: t.showLegend?.value ?? _.showLegend,
|
|
51
|
+
ticks: t.ticks?.value ?? _.ticks,
|
|
52
|
+
max: t.max?.value ?? _.max,
|
|
53
|
+
min: t.min?.value ?? _.min,
|
|
54
|
+
graticule: t.graticule?.value ?? _.graticule
|
|
55
|
+
};
|
|
56
|
+
}, "setOptions"),
|
|
57
|
+
getConfig: x,
|
|
58
|
+
clear: /* @__PURE__ */ t(() => {
|
|
59
|
+
c(), y = structuredClone(v);
|
|
60
|
+
}, "clear"),
|
|
61
|
+
setAccTitle: a,
|
|
62
|
+
getAccTitle: d,
|
|
63
|
+
setDiagramTitle: o,
|
|
64
|
+
getDiagramTitle: r,
|
|
65
|
+
getAccDescription: s,
|
|
66
|
+
setAccDescription: n
|
|
67
|
+
}, k = /* @__PURE__ */ t((e) => {
|
|
68
|
+
h(e, O);
|
|
69
|
+
let { axes: t, curves: n, options: r } = e;
|
|
70
|
+
O.setAxes(t), O.setCurves(n), O.setOptions(r);
|
|
71
|
+
}, "populate"), A = { parse: /* @__PURE__ */ t(async (t) => {
|
|
72
|
+
let n = await g("radar", t);
|
|
73
|
+
e.debug(n), k(n);
|
|
74
|
+
}, "parse") }, j = /* @__PURE__ */ t((e, t, n, r) => {
|
|
75
|
+
let i = r.db, a = i.getAxes(), o = i.getCurves(), s = i.getOptions(), c = i.getConfig(), l = i.getDiagramTitle(), u = M(m(t), c), d = s.max ?? Math.max(...o.map((e) => Math.max(...e.entries))), f = s.min, p = Math.min(c.width, c.height) / 2;
|
|
76
|
+
N(u, a, p, s.ticks, s.graticule), P(u, a, p, c), F(u, a, o, f, d, s.graticule, c), R(u, o, s.showLegend, c), u.append("text").attr("class", "radarTitle").text(l).attr("x", 0).attr("y", -c.height / 2 - c.marginTop);
|
|
77
|
+
}, "draw"), M = /* @__PURE__ */ t((e, t) => {
|
|
78
|
+
let n = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, i = {
|
|
79
|
+
x: t.marginLeft + t.width / 2,
|
|
80
|
+
y: t.marginTop + t.height / 2
|
|
81
|
+
};
|
|
82
|
+
return l(e, r, n, t.useMaxWidth ?? !0), e.attr("viewBox", `0 0 ${n} ${r}`), e.append("g").attr("transform", `translate(${i.x}, ${i.y})`);
|
|
83
|
+
}, "drawFrame"), N = /* @__PURE__ */ t((e, t, n, r, i) => {
|
|
84
|
+
if (i === "circle") for (let t = 0; t < r; t++) {
|
|
85
|
+
let i = n * (t + 1) / r;
|
|
86
|
+
e.append("circle").attr("r", i).attr("class", "radarGraticule");
|
|
87
|
+
}
|
|
88
|
+
else if (i === "polygon") {
|
|
89
|
+
let i = t.length;
|
|
90
|
+
for (let a = 0; a < r; a++) {
|
|
91
|
+
let o = n * (a + 1) / r, s = t.map((e, t) => {
|
|
92
|
+
let n = 2 * t * Math.PI / i - Math.PI / 2;
|
|
93
|
+
return `${o * Math.cos(n)},${o * Math.sin(n)}`;
|
|
94
|
+
}).join(" ");
|
|
95
|
+
e.append("polygon").attr("points", s).attr("class", "radarGraticule");
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}, "drawGraticule"), P = /* @__PURE__ */ t((e, t, n, r) => {
|
|
99
|
+
let i = t.length;
|
|
100
|
+
for (let a = 0; a < i; a++) {
|
|
101
|
+
let o = t[a].label, s = 2 * a * Math.PI / i - Math.PI / 2;
|
|
102
|
+
e.append("line").attr("x1", 0).attr("y1", 0).attr("x2", n * r.axisScaleFactor * Math.cos(s)).attr("y2", n * r.axisScaleFactor * Math.sin(s)).attr("class", "radarAxisLine"), e.append("text").text(o).attr("x", n * r.axisLabelFactor * Math.cos(s)).attr("y", n * r.axisLabelFactor * Math.sin(s)).attr("class", "radarAxisLabel");
|
|
103
|
+
}
|
|
104
|
+
}, "drawAxes");
|
|
105
|
+
function F(e, t, n, r, i, a, o) {
|
|
106
|
+
let s = t.length, c = Math.min(o.width, o.height) / 2;
|
|
107
|
+
n.forEach((t, n) => {
|
|
108
|
+
if (t.entries.length !== s) return;
|
|
109
|
+
let l = t.entries.map((e, t) => {
|
|
110
|
+
let n = 2 * Math.PI * t / s - Math.PI / 2, a = I(e, r, i, c);
|
|
111
|
+
return {
|
|
112
|
+
x: a * Math.cos(n),
|
|
113
|
+
y: a * Math.sin(n)
|
|
114
|
+
};
|
|
115
|
+
});
|
|
116
|
+
a === "circle" ? e.append("path").attr("d", L(l, o.curveTension)).attr("class", `radarCurve-${n}`) : a === "polygon" && e.append("polygon").attr("points", l.map((e) => `${e.x},${e.y}`).join(" ")).attr("class", `radarCurve-${n}`);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
t(F, "drawCurves");
|
|
120
|
+
function I(e, t, n, r) {
|
|
121
|
+
return r * (Math.min(Math.max(e, t), n) - t) / (n - t);
|
|
122
|
+
}
|
|
123
|
+
t(I, "relativeRadius");
|
|
124
|
+
function L(e, t) {
|
|
125
|
+
let n = e.length, r = `M${e[0].x},${e[0].y}`;
|
|
126
|
+
for (let i = 0; i < n; i++) {
|
|
127
|
+
let a = e[(i - 1 + n) % n], o = e[i], s = e[(i + 1) % n], c = e[(i + 2) % n], l = {
|
|
128
|
+
x: o.x + (s.x - a.x) * t,
|
|
129
|
+
y: o.y + (s.y - a.y) * t
|
|
130
|
+
}, u = {
|
|
131
|
+
x: s.x - (c.x - o.x) * t,
|
|
132
|
+
y: s.y - (c.y - o.y) * t
|
|
133
|
+
};
|
|
134
|
+
r += ` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`;
|
|
135
|
+
}
|
|
136
|
+
return `${r} Z`;
|
|
137
|
+
}
|
|
138
|
+
t(L, "closedRoundCurve");
|
|
139
|
+
function R(e, t, n, r) {
|
|
140
|
+
if (!n) return;
|
|
141
|
+
let i = (r.width / 2 + r.marginRight) * 3 / 4, a = -(r.height / 2 + r.marginTop) * 3 / 4;
|
|
142
|
+
t.forEach((t, n) => {
|
|
143
|
+
let r = e.append("g").attr("transform", `translate(${i}, ${a + n * 20})`);
|
|
144
|
+
r.append("rect").attr("width", 12).attr("height", 12).attr("class", `radarLegendBox-${n}`), r.append("text").attr("x", 16).attr("y", 0).attr("class", "radarLegendText").text(t.label);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
t(R, "drawLegend");
|
|
148
|
+
var z = { draw: j }, B = /* @__PURE__ */ t((e, t) => {
|
|
149
|
+
let n = "";
|
|
150
|
+
for (let r = 0; r < e.THEME_COLOR_LIMIT; r++) {
|
|
151
|
+
let i = e[`cScale${r}`];
|
|
152
|
+
n += `
|
|
153
|
+
.radarCurve-${r} {
|
|
154
|
+
color: ${i};
|
|
155
|
+
fill: ${i};
|
|
156
|
+
fill-opacity: ${t.curveOpacity};
|
|
157
|
+
stroke: ${i};
|
|
158
|
+
stroke-width: ${t.curveStrokeWidth};
|
|
159
|
+
}
|
|
160
|
+
.radarLegendBox-${r} {
|
|
161
|
+
fill: ${i};
|
|
162
|
+
fill-opacity: ${t.curveOpacity};
|
|
163
|
+
stroke: ${i};
|
|
164
|
+
}
|
|
165
|
+
`;
|
|
166
|
+
}
|
|
167
|
+
return n;
|
|
168
|
+
}, "genIndexStyles"), V = /* @__PURE__ */ t((e) => {
|
|
169
|
+
let t = p(i(), f().themeVariables);
|
|
170
|
+
return {
|
|
171
|
+
themeVariables: t,
|
|
172
|
+
radarOptions: p(t.radar, e)
|
|
173
|
+
};
|
|
174
|
+
}, "buildRadarStyleOptions"), H = {
|
|
175
|
+
parser: A,
|
|
176
|
+
db: O,
|
|
177
|
+
renderer: z,
|
|
178
|
+
styles: /* @__PURE__ */ t(({ radar: e } = {}) => {
|
|
179
|
+
let { themeVariables: t, radarOptions: n } = V(e);
|
|
180
|
+
return `
|
|
181
|
+
.radarTitle {
|
|
182
|
+
font-size: ${t.fontSize};
|
|
183
|
+
color: ${t.titleColor};
|
|
184
|
+
dominant-baseline: hanging;
|
|
185
|
+
text-anchor: middle;
|
|
186
|
+
}
|
|
187
|
+
.radarAxisLine {
|
|
188
|
+
stroke: ${n.axisColor};
|
|
189
|
+
stroke-width: ${n.axisStrokeWidth};
|
|
190
|
+
}
|
|
191
|
+
.radarAxisLabel {
|
|
192
|
+
dominant-baseline: middle;
|
|
193
|
+
text-anchor: middle;
|
|
194
|
+
font-size: ${n.axisLabelFontSize}px;
|
|
195
|
+
color: ${n.axisColor};
|
|
196
|
+
}
|
|
197
|
+
.radarGraticule {
|
|
198
|
+
fill: ${n.graticuleColor};
|
|
199
|
+
fill-opacity: ${n.graticuleOpacity};
|
|
200
|
+
stroke: ${n.graticuleColor};
|
|
201
|
+
stroke-width: ${n.graticuleStrokeWidth};
|
|
202
|
+
}
|
|
203
|
+
.radarLegendText {
|
|
204
|
+
text-anchor: start;
|
|
205
|
+
font-size: ${n.legendFontSize}px;
|
|
206
|
+
dominant-baseline: hanging;
|
|
207
|
+
}
|
|
208
|
+
${B(t, n)}
|
|
209
|
+
`;
|
|
210
|
+
}, "styles")
|
|
211
|
+
};
|
|
212
|
+
//#endregion
|
|
213
|
+
export { H as diagram };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { g as e, h as t } from "./src-CFVe5TPD.js";
|
|
2
|
+
import { B as n, C as r, V as i, W as a, _ as o, a as s, c, d as l, v as u, y as d } from "./chunk-ICPOFSXX-B9JXAgJU.js";
|
|
3
|
+
import { r as f } from "./chunk-5PVQY5BW-BCjrVrWB.js";
|
|
4
|
+
import { t as p } from "./chunk-426QAEUC-D_wKNd3w.js";
|
|
5
|
+
import { t as m } from "./chunk-4BX2VUAB-DKC_OBWg.js";
|
|
6
|
+
import { t as h } from "./mermaid-parser.core-Blz-Qy2h.js";
|
|
7
|
+
//#region ../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-TYMM5635.mjs
|
|
8
|
+
var g = l.packet, _ = class {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.packet = [], this.setAccTitle = i, this.getAccTitle = u, this.setDiagramTitle = a, this.getDiagramTitle = r, this.getAccDescription = o, this.setAccDescription = n;
|
|
11
|
+
}
|
|
12
|
+
static {
|
|
13
|
+
t(this, "PacketDB");
|
|
14
|
+
}
|
|
15
|
+
getConfig() {
|
|
16
|
+
let e = f({
|
|
17
|
+
...g,
|
|
18
|
+
...d().packet
|
|
19
|
+
});
|
|
20
|
+
return e.showBits && (e.paddingY += 10), e;
|
|
21
|
+
}
|
|
22
|
+
getPacket() {
|
|
23
|
+
return this.packet;
|
|
24
|
+
}
|
|
25
|
+
pushWord(e) {
|
|
26
|
+
e.length > 0 && this.packet.push(e);
|
|
27
|
+
}
|
|
28
|
+
clear() {
|
|
29
|
+
s(), this.packet = [];
|
|
30
|
+
}
|
|
31
|
+
}, v = 1e4, y = /* @__PURE__ */ t((t, n) => {
|
|
32
|
+
m(t, n);
|
|
33
|
+
let r = -1, i = [], a = 1, { bitsPerRow: o } = n.getConfig();
|
|
34
|
+
for (let { start: s, end: c, bits: l, label: u } of t.blocks) {
|
|
35
|
+
if (s !== void 0 && c !== void 0 && c < s) throw Error(`Packet block ${s} - ${c} is invalid. End must be greater than start.`);
|
|
36
|
+
if (s ??= r + 1, s !== r + 1) throw Error(`Packet block ${s} - ${c ?? s} is not contiguous. It should start from ${r + 1}.`);
|
|
37
|
+
if (l === 0) throw Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);
|
|
38
|
+
for (c ??= s + (l ?? 1) - 1, l ??= c - s + 1, r = c, e.debug(`Packet block ${s} - ${r} with label ${u}`); i.length <= o + 1 && n.getPacket().length < v;) {
|
|
39
|
+
let [e, t] = b({
|
|
40
|
+
start: s,
|
|
41
|
+
end: c,
|
|
42
|
+
bits: l,
|
|
43
|
+
label: u
|
|
44
|
+
}, a, o);
|
|
45
|
+
if (i.push(e), e.end + 1 === a * o && (n.pushWord(i), i = [], a++), !t) break;
|
|
46
|
+
({start: s, end: c, bits: l, label: u} = t);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
n.pushWord(i);
|
|
50
|
+
}, "populate"), b = /* @__PURE__ */ t((e, t, n) => {
|
|
51
|
+
if (e.start === void 0) throw Error("start should have been set during first phase");
|
|
52
|
+
if (e.end === void 0) throw Error("end should have been set during first phase");
|
|
53
|
+
if (e.start > e.end) throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);
|
|
54
|
+
if (e.end + 1 <= t * n) return [e, void 0];
|
|
55
|
+
let r = t * n - 1, i = t * n;
|
|
56
|
+
return [{
|
|
57
|
+
start: e.start,
|
|
58
|
+
end: r,
|
|
59
|
+
label: e.label,
|
|
60
|
+
bits: r - e.start
|
|
61
|
+
}, {
|
|
62
|
+
start: i,
|
|
63
|
+
end: e.end,
|
|
64
|
+
label: e.label,
|
|
65
|
+
bits: e.end - i
|
|
66
|
+
}];
|
|
67
|
+
}, "getNextFittingBlock"), x = {
|
|
68
|
+
parser: { yy: void 0 },
|
|
69
|
+
parse: /* @__PURE__ */ t(async (t) => {
|
|
70
|
+
let n = await h("packet", t), r = x.parser?.yy;
|
|
71
|
+
if (!(r instanceof _)) throw Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
|
|
72
|
+
e.debug(n), y(n, r);
|
|
73
|
+
}, "parse")
|
|
74
|
+
}, S = /* @__PURE__ */ t((e, t, n, r) => {
|
|
75
|
+
let i = r.db, a = i.getConfig(), { rowHeight: o, paddingY: s, bitWidth: l, bitsPerRow: u } = a, d = i.getPacket(), f = i.getDiagramTitle(), m = o + s, h = m * (d.length + 1) - (f ? 0 : o), g = l * u + 2, _ = p(t);
|
|
76
|
+
_.attr("viewBox", `0 0 ${g} ${h}`), c(_, h, g, a.useMaxWidth);
|
|
77
|
+
for (let [e, t] of d.entries()) C(_, t, e, a);
|
|
78
|
+
_.append("text").text(f).attr("x", g / 2).attr("y", h - m / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
|
|
79
|
+
}, "draw"), C = /* @__PURE__ */ t((e, t, n, { rowHeight: r, paddingX: i, paddingY: a, bitWidth: o, bitsPerRow: s, showBits: c }) => {
|
|
80
|
+
let l = e.append("g"), u = n * (r + a) + a;
|
|
81
|
+
for (let e of t) {
|
|
82
|
+
let t = e.start % s * o + 1, n = (e.end - e.start + 1) * o - i;
|
|
83
|
+
if (l.append("rect").attr("x", t).attr("y", u).attr("width", n).attr("height", r).attr("class", "packetBlock"), l.append("text").attr("x", t + n / 2).attr("y", u + r / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(e.label), !c) continue;
|
|
84
|
+
let a = e.end === e.start, d = u - 2;
|
|
85
|
+
l.append("text").attr("x", t + (a ? n / 2 : 0)).attr("y", d).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", a ? "middle" : "start").text(e.start), a || l.append("text").attr("x", t + n).attr("y", d).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(e.end);
|
|
86
|
+
}
|
|
87
|
+
}, "drawWord"), w = { draw: S }, T = {
|
|
88
|
+
byteFontSize: "10px",
|
|
89
|
+
startByteColor: "black",
|
|
90
|
+
endByteColor: "black",
|
|
91
|
+
labelColor: "black",
|
|
92
|
+
labelFontSize: "12px",
|
|
93
|
+
titleColor: "black",
|
|
94
|
+
titleFontSize: "14px",
|
|
95
|
+
blockStrokeColor: "black",
|
|
96
|
+
blockStrokeWidth: "1",
|
|
97
|
+
blockFillColor: "#efefef"
|
|
98
|
+
}, E = {
|
|
99
|
+
parser: x,
|
|
100
|
+
get db() {
|
|
101
|
+
return new _();
|
|
102
|
+
},
|
|
103
|
+
renderer: w,
|
|
104
|
+
styles: /* @__PURE__ */ t(({ packet: e } = {}) => {
|
|
105
|
+
let t = f(T, e);
|
|
106
|
+
return `
|
|
107
|
+
.packetByte {
|
|
108
|
+
font-size: ${t.byteFontSize};
|
|
109
|
+
}
|
|
110
|
+
.packetByte.start {
|
|
111
|
+
fill: ${t.startByteColor};
|
|
112
|
+
}
|
|
113
|
+
.packetByte.end {
|
|
114
|
+
fill: ${t.endByteColor};
|
|
115
|
+
}
|
|
116
|
+
.packetLabel {
|
|
117
|
+
fill: ${t.labelColor};
|
|
118
|
+
font-size: ${t.labelFontSize};
|
|
119
|
+
}
|
|
120
|
+
.packetTitle {
|
|
121
|
+
fill: ${t.titleColor};
|
|
122
|
+
font-size: ${t.titleFontSize};
|
|
123
|
+
}
|
|
124
|
+
.packetBlock {
|
|
125
|
+
stroke: ${t.blockStrokeColor};
|
|
126
|
+
stroke-width: ${t.blockStrokeWidth};
|
|
127
|
+
fill: ${t.blockFillColor};
|
|
128
|
+
}
|
|
129
|
+
`;
|
|
130
|
+
}, "styles")
|
|
131
|
+
};
|
|
132
|
+
//#endregion
|
|
133
|
+
export { E as diagram };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { t as e } from "./chunk-WQLz0Won.js";
|
|
2
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/math.js
|
|
3
|
+
var t = Math.abs, n = Math.atan2, r = Math.cos, i = Math.max, a = Math.min, o = Math.sin, s = Math.sqrt, c = 1e-12, l = Math.PI, u = l / 2, d = 2 * l;
|
|
4
|
+
function f(e) {
|
|
5
|
+
return e > 1 ? 0 : e < -1 ? l : Math.acos(e);
|
|
6
|
+
}
|
|
7
|
+
function p(e) {
|
|
8
|
+
return e >= 1 ? u : e <= -1 ? -u : Math.asin(e);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ../../node_modules/.pnpm/@braintree+sanitize-url@7.1.2/node_modules/@braintree/sanitize-url/dist/constants.js
|
|
12
|
+
var m = /* @__PURE__ */ e(((e) => {
|
|
13
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.BLANK_URL = e.relativeFirstCharacters = e.whitespaceEscapeCharsRegex = e.urlSchemeRegex = e.ctrlCharactersRegex = e.htmlCtrlEntityRegex = e.htmlEntitiesRegex = e.invalidProtocolRegex = void 0, e.invalidProtocolRegex = /^([^\w]*)(javascript|data|vbscript)/im, e.htmlEntitiesRegex = /&#(\w+)(^\w|;)?/g, e.htmlCtrlEntityRegex = /&(newline|tab);/gi, e.ctrlCharactersRegex = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim, e.urlSchemeRegex = /^.+(:|:)/gim, e.whitespaceEscapeCharsRegex = /(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g, e.relativeFirstCharacters = [".", "/"], e.BLANK_URL = "about:blank";
|
|
14
|
+
})), h = /* @__PURE__ */ e(((e) => {
|
|
15
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.sanitizeUrl = o;
|
|
16
|
+
var t = m();
|
|
17
|
+
function n(e) {
|
|
18
|
+
return t.relativeFirstCharacters.indexOf(e[0]) > -1;
|
|
19
|
+
}
|
|
20
|
+
function r(e) {
|
|
21
|
+
return e.replace(t.ctrlCharactersRegex, "").replace(t.htmlEntitiesRegex, function(e, t) {
|
|
22
|
+
return String.fromCharCode(t);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function i(e) {
|
|
26
|
+
return URL.canParse(e);
|
|
27
|
+
}
|
|
28
|
+
function a(e) {
|
|
29
|
+
try {
|
|
30
|
+
return decodeURIComponent(e);
|
|
31
|
+
} catch {
|
|
32
|
+
return e;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function o(e) {
|
|
36
|
+
if (!e) return t.BLANK_URL;
|
|
37
|
+
var o, s = a(e.trim());
|
|
38
|
+
do
|
|
39
|
+
s = r(s).replace(t.htmlCtrlEntityRegex, "").replace(t.ctrlCharactersRegex, "").replace(t.whitespaceEscapeCharsRegex, "").trim(), s = a(s), o = s.match(t.ctrlCharactersRegex) || s.match(t.htmlEntitiesRegex) || s.match(t.htmlCtrlEntityRegex) || s.match(t.whitespaceEscapeCharsRegex);
|
|
40
|
+
while (o && o.length > 0);
|
|
41
|
+
var c = s;
|
|
42
|
+
if (!c) return t.BLANK_URL;
|
|
43
|
+
if (n(c)) return c;
|
|
44
|
+
var l = c.trimStart(), u = l.match(t.urlSchemeRegex);
|
|
45
|
+
if (!u) return c;
|
|
46
|
+
var d = u[0].toLowerCase().trim();
|
|
47
|
+
if (t.invalidProtocolRegex.test(d)) return t.BLANK_URL;
|
|
48
|
+
var f = l.replace(/\\/g, "/");
|
|
49
|
+
if (d === "mailto:" || d.includes("://")) return f;
|
|
50
|
+
if (d === "http:" || d === "https:") {
|
|
51
|
+
if (!i(f)) return t.BLANK_URL;
|
|
52
|
+
var p = new URL(f);
|
|
53
|
+
return p.protocol = p.protocol.toLowerCase(), p.hostname = p.hostname.toLowerCase(), p.toString();
|
|
54
|
+
}
|
|
55
|
+
return f;
|
|
56
|
+
}
|
|
57
|
+
}));
|
|
58
|
+
//#endregion
|
|
59
|
+
export { n as a, u as c, l as d, o as f, p as i, i as l, d as m, t as n, r as o, s as p, f as r, c as s, h as t, a as u };
|