@readme/markdown 9.3.0 → 9.3.1
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/10.node.js +20064 -19229
- package/dist/10.node.js.map +1 -1
- package/dist/122.node.js +23 -0
- package/dist/122.node.js.map +1 -0
- package/dist/{17.node.js → 135.node.js} +109 -110
- package/dist/135.node.js.map +1 -0
- package/dist/136.node.js +23 -0
- package/dist/136.node.js.map +1 -0
- package/dist/{52.node.js → 188.node.js} +211 -196
- package/dist/188.node.js.map +1 -0
- package/dist/214.node.js +1280 -0
- package/dist/214.node.js.map +1 -0
- package/dist/23.node.js +2563 -0
- package/dist/23.node.js.map +1 -0
- package/dist/{867.node.js → 311.node.js} +95 -95
- package/dist/{867.node.js.map → 311.node.js.map} +1 -1
- package/dist/{940.node.js → 339.node.js} +3 -75
- package/dist/339.node.js.map +1 -0
- package/dist/354.node.js +23 -0
- package/dist/354.node.js.map +1 -0
- package/dist/359.node.js +2001 -0
- package/dist/359.node.js.map +1 -0
- package/dist/364.node.js +4435 -0
- package/dist/364.node.js.map +1 -0
- package/dist/{429.node.js → 371.node.js} +196 -139
- package/dist/371.node.js.map +1 -0
- package/dist/{687.node.js → 38.node.js} +761 -761
- package/dist/38.node.js.map +1 -0
- package/dist/391.node.js +522 -0
- package/dist/391.node.js.map +1 -0
- package/dist/462.node.js +23 -0
- package/dist/462.node.js.map +1 -0
- package/dist/48.node.js +57 -0
- package/dist/48.node.js.map +1 -0
- package/dist/486.node.js +16267 -14851
- package/dist/486.node.js.map +1 -1
- package/dist/537.node.js +59 -0
- package/dist/537.node.js.map +1 -0
- package/dist/550.node.js +201 -1408
- package/dist/550.node.js.map +1 -1
- package/dist/{403.node.js → 572.node.js} +118 -118
- package/dist/572.node.js.map +1 -0
- package/dist/580.node.js +1324 -0
- package/dist/580.node.js.map +1 -0
- package/dist/{952.node.js → 649.node.js} +39 -39
- package/dist/{952.node.js.map → 649.node.js.map} +1 -1
- package/dist/740.node.js +23 -0
- package/dist/740.node.js.map +1 -0
- package/dist/741.node.js +23 -0
- package/dist/741.node.js.map +1 -0
- package/dist/779.node.js +57 -0
- package/dist/779.node.js.map +1 -0
- package/dist/805.node.js +1355 -0
- package/dist/805.node.js.map +1 -0
- package/dist/{246.node.js → 855.node.js} +671 -495
- package/dist/855.node.js.map +1 -0
- package/dist/{11.node.js → 870.node.js} +70 -63
- package/dist/870.node.js.map +1 -0
- package/dist/874.node.js +57 -0
- package/dist/874.node.js.map +1 -0
- package/dist/881.node.js +1344 -720
- package/dist/881.node.js.map +1 -1
- package/dist/{906.node.js → 890.node.js} +147 -147
- package/dist/{906.node.js.map → 890.node.js.map} +1 -1
- package/dist/898.node.js +361 -0
- package/dist/898.node.js.map +1 -0
- package/dist/{551.node.js → 912.node.js} +133 -133
- package/dist/{551.node.js.map → 912.node.js.map} +1 -1
- package/dist/{745.node.js → 915.node.js} +86 -85
- package/dist/915.node.js.map +1 -0
- package/dist/982.node.js +1132 -0
- package/dist/982.node.js.map +1 -0
- package/dist/995.node.js +189 -159
- package/dist/995.node.js.map +1 -1
- package/dist/lib/plain.d.ts +1 -1
- package/dist/main.js +1881 -331
- package/dist/main.node.js +1872 -332
- package/dist/main.node.js.map +1 -1
- package/package.json +1 -2
- package/dist/11.node.js.map +0 -1
- package/dist/120.node.js +0 -23
- package/dist/120.node.js.map +0 -1
- package/dist/134.node.js +0 -23
- package/dist/134.node.js.map +0 -1
- package/dist/150.node.js +0 -1892
- package/dist/150.node.js.map +0 -1
- package/dist/17.node.js.map +0 -1
- package/dist/246.node.js.map +0 -1
- package/dist/351.node.js +0 -2404
- package/dist/351.node.js.map +0 -1
- package/dist/366.node.js +0 -1185
- package/dist/366.node.js.map +0 -1
- package/dist/403.node.js.map +0 -1
- package/dist/429.node.js.map +0 -1
- package/dist/485.node.js +0 -518
- package/dist/485.node.js.map +0 -1
- package/dist/488.node.js +0 -59
- package/dist/488.node.js.map +0 -1
- package/dist/510.node.js +0 -250
- package/dist/510.node.js.map +0 -1
- package/dist/52.node.js.map +0 -1
- package/dist/617.node.js +0 -23
- package/dist/617.node.js.map +0 -1
- package/dist/687.node.js.map +0 -1
- package/dist/745.node.js.map +0 -1
- package/dist/775.node.js +0 -1904
- package/dist/775.node.js.map +0 -1
- package/dist/788.node.js +0 -1025
- package/dist/788.node.js.map +0 -1
- package/dist/81.node.js +0 -386
- package/dist/81.node.js.map +0 -1
- package/dist/849.node.js +0 -2590
- package/dist/849.node.js.map +0 -1
- package/dist/863.node.js +0 -23
- package/dist/863.node.js.map +0 -1
- package/dist/885.node.js +0 -52
- package/dist/885.node.js.map +0 -1
- package/dist/896.node.js +0 -1617
- package/dist/896.node.js.map +0 -1
- package/dist/91.node.js +0 -23
- package/dist/91.node.js.map +0 -1
- package/dist/940.node.js.map +0 -1
package/dist/488.node.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"488.node.js","mappings":";;;;;;;;;;;;;;;AAE8B;AAGA;AAKA;;AAE9B;AAC2C;AAC3C;AACA,yBAAyB,qEAAM;AAC/B,sBAAsB,mEAAK;AAC3B,IAAI,8DAAG;AACP,GAAG;AACH;;AAEA;AACA,wBAAwB,OAAO;AAC/B,iCAAiC,qEAAM;AACvC;AACA;AACA;;AAEA;AACA,2BAA2B,qEAAM;AACjC,EAAE,8DAAG;AACL,cAAc,8EAAgB;AAC9B,EAAE,+EAAgB;AAClB;AACA,2IAA2I,SAAS;AACpJ,CAAC;AACD,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AAGE","sources":["webpack://@readme/markdown/./node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-RZZSJVI2.mjs"],"sourcesContent":["import {\n version\n} from \"./chunk-CZA7E4UB.mjs\";\nimport {\n selectSvgElement\n} from \"./chunk-OBAELV6Q.mjs\";\nimport {\n __name,\n configureSvgSize,\n log\n} from \"./chunk-S24QXQKS.mjs\";\n\n// src/diagrams/info/infoParser.ts\nimport { parse } from \"@mermaid-js/parser\";\nvar parser = {\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"info\", input);\n log.debug(ast);\n }, \"parse\")\n};\n\n// src/diagrams/info/infoDb.ts\nvar DEFAULT_INFO_DB = { version };\nvar getVersion = /* @__PURE__ */ __name(() => DEFAULT_INFO_DB.version, \"getVersion\");\nvar db = {\n getVersion\n};\n\n// src/diagrams/info/infoRenderer.ts\nvar draw = /* @__PURE__ */ __name((text, id, version2) => {\n log.debug(\"rendering info diagram\\n\" + text);\n const svg = selectSvgElement(id);\n configureSvgSize(svg, 100, 400, true);\n const group = svg.append(\"g\");\n group.append(\"text\").attr(\"x\", 100).attr(\"y\", 40).attr(\"class\", \"version\").attr(\"font-size\", 32).style(\"text-anchor\", \"middle\").text(`v${version2}`);\n}, \"draw\");\nvar renderer = { draw };\n\n// src/diagrams/info/infoDiagram.ts\nvar diagram = {\n parser,\n db,\n renderer\n};\nexport {\n diagram\n};\n"],"names":[],"sourceRoot":""}
|
package/dist/510.node.js
DELETED
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.id = 510;
|
|
3
|
-
exports.ids = [510];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 9314:
|
|
7
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
-
|
|
9
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
-
/* harmony export */ S: () => (/* binding */ populateCommonDb)
|
|
11
|
-
/* harmony export */ });
|
|
12
|
-
/* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6322);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// src/diagrams/common/populateCommonDb.ts
|
|
16
|
-
function populateCommonDb(ast, db) {
|
|
17
|
-
if (ast.accDescr) {
|
|
18
|
-
db.setAccDescription?.(ast.accDescr);
|
|
19
|
-
}
|
|
20
|
-
if (ast.accTitle) {
|
|
21
|
-
db.setAccTitle?.(ast.accTitle);
|
|
22
|
-
}
|
|
23
|
-
if (ast.title) {
|
|
24
|
-
db.setDiagramTitle?.(ast.title);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(populateCommonDb, "populateCommonDb");
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/***/ }),
|
|
33
|
-
|
|
34
|
-
/***/ 3510:
|
|
35
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
36
|
-
|
|
37
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38
|
-
/* harmony export */ diagram: () => (/* binding */ diagram)
|
|
39
|
-
/* harmony export */ });
|
|
40
|
-
/* harmony import */ var _chunk_RYO7GUH3_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9314);
|
|
41
|
-
/* harmony import */ var _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2843);
|
|
42
|
-
/* harmony import */ var _chunk_OBAELV6Q_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4196);
|
|
43
|
-
/* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6322);
|
|
44
|
-
/* harmony import */ var _mermaid_js_parser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4010);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
// src/diagrams/packet/db.ts
|
|
51
|
-
var defaultPacketData = {
|
|
52
|
-
packet: []
|
|
53
|
-
};
|
|
54
|
-
var data = structuredClone(defaultPacketData);
|
|
55
|
-
var DEFAULT_PACKET_CONFIG = _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .defaultConfig_default */ .UI.packet;
|
|
56
|
-
var getConfig2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
|
|
57
|
-
const config = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .cleanAndMerge */ .$t)({
|
|
58
|
-
...DEFAULT_PACKET_CONFIG,
|
|
59
|
-
...(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig */ .zj)().packet
|
|
60
|
-
});
|
|
61
|
-
if (config.showBits) {
|
|
62
|
-
config.paddingY += 10;
|
|
63
|
-
}
|
|
64
|
-
return config;
|
|
65
|
-
}, "getConfig");
|
|
66
|
-
var getPacket = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => data.packet, "getPacket");
|
|
67
|
-
var pushWord = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((word) => {
|
|
68
|
-
if (word.length > 0) {
|
|
69
|
-
data.packet.push(word);
|
|
70
|
-
}
|
|
71
|
-
}, "pushWord");
|
|
72
|
-
var clear2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
|
|
73
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .clear */ .IU)();
|
|
74
|
-
data = structuredClone(defaultPacketData);
|
|
75
|
-
}, "clear");
|
|
76
|
-
var db = {
|
|
77
|
-
pushWord,
|
|
78
|
-
getPacket,
|
|
79
|
-
getConfig: getConfig2,
|
|
80
|
-
clear: clear2,
|
|
81
|
-
setAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setAccTitle */ .SV,
|
|
82
|
-
getAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getAccTitle */ .iN,
|
|
83
|
-
setDiagramTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setDiagramTitle */ .ke,
|
|
84
|
-
getDiagramTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getDiagramTitle */ .ab,
|
|
85
|
-
getAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getAccDescription */ .m7,
|
|
86
|
-
setAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setAccDescription */ .EI
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
// src/diagrams/packet/parser.ts
|
|
90
|
-
|
|
91
|
-
var maxPacketSize = 1e4;
|
|
92
|
-
var populate = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((ast) => {
|
|
93
|
-
(0,_chunk_RYO7GUH3_mjs__WEBPACK_IMPORTED_MODULE_0__/* .populateCommonDb */ .S)(ast, db);
|
|
94
|
-
let lastByte = -1;
|
|
95
|
-
let word = [];
|
|
96
|
-
let row = 1;
|
|
97
|
-
const { bitsPerRow } = db.getConfig();
|
|
98
|
-
for (let { start, end, label } of ast.blocks) {
|
|
99
|
-
if (end && end < start) {
|
|
100
|
-
throw new Error(`Packet block ${start} - ${end} is invalid. End must be greater than start.`);
|
|
101
|
-
}
|
|
102
|
-
if (start !== lastByte + 1) {
|
|
103
|
-
throw new Error(
|
|
104
|
-
`Packet block ${start} - ${end ?? start} is not contiguous. It should start from ${lastByte + 1}.`
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
lastByte = end ?? start;
|
|
108
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.debug(`Packet block ${start} - ${lastByte} with label ${label}`);
|
|
109
|
-
while (word.length <= bitsPerRow + 1 && db.getPacket().length < maxPacketSize) {
|
|
110
|
-
const [block, nextBlock] = getNextFittingBlock({ start, end, label }, row, bitsPerRow);
|
|
111
|
-
word.push(block);
|
|
112
|
-
if (block.end + 1 === row * bitsPerRow) {
|
|
113
|
-
db.pushWord(word);
|
|
114
|
-
word = [];
|
|
115
|
-
row++;
|
|
116
|
-
}
|
|
117
|
-
if (!nextBlock) {
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
120
|
-
({ start, end, label } = nextBlock);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
db.pushWord(word);
|
|
124
|
-
}, "populate");
|
|
125
|
-
var getNextFittingBlock = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((block, row, bitsPerRow) => {
|
|
126
|
-
if (block.end === void 0) {
|
|
127
|
-
block.end = block.start;
|
|
128
|
-
}
|
|
129
|
-
if (block.start > block.end) {
|
|
130
|
-
throw new Error(`Block start ${block.start} is greater than block end ${block.end}.`);
|
|
131
|
-
}
|
|
132
|
-
if (block.end + 1 <= row * bitsPerRow) {
|
|
133
|
-
return [block, void 0];
|
|
134
|
-
}
|
|
135
|
-
return [
|
|
136
|
-
{
|
|
137
|
-
start: block.start,
|
|
138
|
-
end: row * bitsPerRow - 1,
|
|
139
|
-
label: block.label
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
start: row * bitsPerRow,
|
|
143
|
-
end: block.end,
|
|
144
|
-
label: block.label
|
|
145
|
-
}
|
|
146
|
-
];
|
|
147
|
-
}, "getNextFittingBlock");
|
|
148
|
-
var parser = {
|
|
149
|
-
parse: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(async (input) => {
|
|
150
|
-
const ast = await (0,_mermaid_js_parser__WEBPACK_IMPORTED_MODULE_4__/* .parse */ .qg)("packet", input);
|
|
151
|
-
_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.debug(ast);
|
|
152
|
-
populate(ast);
|
|
153
|
-
}, "parse")
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
// src/diagrams/packet/renderer.ts
|
|
157
|
-
var draw = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((_text, id, _version, diagram2) => {
|
|
158
|
-
const db2 = diagram2.db;
|
|
159
|
-
const config = db2.getConfig();
|
|
160
|
-
const { rowHeight, paddingY, bitWidth, bitsPerRow } = config;
|
|
161
|
-
const words = db2.getPacket();
|
|
162
|
-
const title = db2.getDiagramTitle();
|
|
163
|
-
const totalRowHeight = rowHeight + paddingY;
|
|
164
|
-
const svgHeight = totalRowHeight * (words.length + 1) - (title ? 0 : rowHeight);
|
|
165
|
-
const svgWidth = bitWidth * bitsPerRow + 2;
|
|
166
|
-
const svg = (0,_chunk_OBAELV6Q_mjs__WEBPACK_IMPORTED_MODULE_2__/* .selectSvgElement */ .D)(id);
|
|
167
|
-
svg.attr("viewbox", `0 0 ${svgWidth} ${svgHeight}`);
|
|
168
|
-
(0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .configureSvgSize */ .a$)(svg, svgHeight, svgWidth, config.useMaxWidth);
|
|
169
|
-
for (const [word, packet] of words.entries()) {
|
|
170
|
-
drawWord(svg, packet, word, config);
|
|
171
|
-
}
|
|
172
|
-
svg.append("text").text(title).attr("x", svgWidth / 2).attr("y", svgHeight - totalRowHeight / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
|
|
173
|
-
}, "draw");
|
|
174
|
-
var drawWord = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((svg, word, rowNumber, { rowHeight, paddingX, paddingY, bitWidth, bitsPerRow, showBits }) => {
|
|
175
|
-
const group = svg.append("g");
|
|
176
|
-
const wordY = rowNumber * (rowHeight + paddingY) + paddingY;
|
|
177
|
-
for (const block of word) {
|
|
178
|
-
const blockX = block.start % bitsPerRow * bitWidth + 1;
|
|
179
|
-
const width = (block.end - block.start + 1) * bitWidth - paddingX;
|
|
180
|
-
group.append("rect").attr("x", blockX).attr("y", wordY).attr("width", width).attr("height", rowHeight).attr("class", "packetBlock");
|
|
181
|
-
group.append("text").attr("x", blockX + width / 2).attr("y", wordY + rowHeight / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(block.label);
|
|
182
|
-
if (!showBits) {
|
|
183
|
-
continue;
|
|
184
|
-
}
|
|
185
|
-
const isSingleBlock = block.end === block.start;
|
|
186
|
-
const bitNumberY = wordY - 2;
|
|
187
|
-
group.append("text").attr("x", blockX + (isSingleBlock ? width / 2 : 0)).attr("y", bitNumberY).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", isSingleBlock ? "middle" : "start").text(block.start);
|
|
188
|
-
if (!isSingleBlock) {
|
|
189
|
-
group.append("text").attr("x", blockX + width).attr("y", bitNumberY).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(block.end);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}, "drawWord");
|
|
193
|
-
var renderer = { draw };
|
|
194
|
-
|
|
195
|
-
// src/diagrams/packet/styles.ts
|
|
196
|
-
var defaultPacketStyleOptions = {
|
|
197
|
-
byteFontSize: "10px",
|
|
198
|
-
startByteColor: "black",
|
|
199
|
-
endByteColor: "black",
|
|
200
|
-
labelColor: "black",
|
|
201
|
-
labelFontSize: "12px",
|
|
202
|
-
titleColor: "black",
|
|
203
|
-
titleFontSize: "14px",
|
|
204
|
-
blockStrokeColor: "black",
|
|
205
|
-
blockStrokeWidth: "1",
|
|
206
|
-
blockFillColor: "#efefef"
|
|
207
|
-
};
|
|
208
|
-
var styles = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(({ packet } = {}) => {
|
|
209
|
-
const options = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .cleanAndMerge */ .$t)(defaultPacketStyleOptions, packet);
|
|
210
|
-
return `
|
|
211
|
-
.packetByte {
|
|
212
|
-
font-size: ${options.byteFontSize};
|
|
213
|
-
}
|
|
214
|
-
.packetByte.start {
|
|
215
|
-
fill: ${options.startByteColor};
|
|
216
|
-
}
|
|
217
|
-
.packetByte.end {
|
|
218
|
-
fill: ${options.endByteColor};
|
|
219
|
-
}
|
|
220
|
-
.packetLabel {
|
|
221
|
-
fill: ${options.labelColor};
|
|
222
|
-
font-size: ${options.labelFontSize};
|
|
223
|
-
}
|
|
224
|
-
.packetTitle {
|
|
225
|
-
fill: ${options.titleColor};
|
|
226
|
-
font-size: ${options.titleFontSize};
|
|
227
|
-
}
|
|
228
|
-
.packetBlock {
|
|
229
|
-
stroke: ${options.blockStrokeColor};
|
|
230
|
-
stroke-width: ${options.blockStrokeWidth};
|
|
231
|
-
fill: ${options.blockFillColor};
|
|
232
|
-
}
|
|
233
|
-
`;
|
|
234
|
-
}, "styles");
|
|
235
|
-
|
|
236
|
-
// src/diagrams/packet/diagram.ts
|
|
237
|
-
var diagram = {
|
|
238
|
-
parser,
|
|
239
|
-
db,
|
|
240
|
-
renderer,
|
|
241
|
-
styles
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
/***/ })
|
|
247
|
-
|
|
248
|
-
};
|
|
249
|
-
;
|
|
250
|
-
//# sourceMappingURL=510.node.js.map
|
package/dist/510.node.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"510.node.js","mappings":";;;;;;;;;;;;AAE8B;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAM;;AAIJ;;;;;;;;;;;;;;;;AClB4B;AAGA;AAGA;AAcA;;AAE9B;AACA;AACA;AACA;AACA;AACA,4BAA4B,gFAAqB;AACjD,iCAAiC,qEAAM;AACvC,iBAAiB,4EAAa;AAC9B;AACA,OAAO,wEAAS;AAChB,GAAG;AACH;AACA;AACA;AACA;AACA,CAAC;AACD,gCAAgC,qEAAM;AACtC,+BAA+B,qEAAM;AACrC;AACA;AACA;AACA,CAAC;AACD,6BAA6B,qEAAM;AACnC,EAAE,oEAAK;AACP;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,aAAa;AACb,iBAAiB;AACjB,iBAAiB;AACjB,mBAAmB;AACnB,mBAAmB;AACnB;;AAEA;AAC2C;AAC3C;AACA,+BAA+B,qEAAM;AACrC,EAAE,8EAAgB;AAClB;AACA;AACA;AACA,UAAU,aAAa;AACvB,aAAa,oBAAoB;AACjC;AACA,sCAAsC,OAAO,IAAI,KAAK;AACtD;AACA;AACA;AACA,wBAAwB,OAAO,IAAI,cAAc,0CAA0C,aAAa;AACxG;AACA;AACA;AACA,IAAI,8DAAG,uBAAuB,OAAO,IAAI,UAAU,aAAa,MAAM;AACtE;AACA,uDAAuD,mBAAmB;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,oBAAoB;AAC7B;AACA;AACA;AACA,CAAC;AACD,0CAA0C,qEAAM;AAChD;AACA;AACA;AACA;AACA,mCAAmC,aAAa,4BAA4B,UAAU;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yBAAyB,qEAAM;AAC/B,sBAAsB,mEAAK;AAC3B,IAAI,8DAAG;AACP;AACA,GAAG;AACH;;AAEA;AACA,2BAA2B,qEAAM;AACjC;AACA;AACA,UAAU,4CAA4C;AACtD;AACA;AACA;AACA;AACA;AACA,cAAc,8EAAgB;AAC9B,6BAA6B,UAAU,EAAE,UAAU;AACnD,EAAE,+EAAgB;AAClB;AACA;AACA;AACA;AACA,CAAC;AACD,+BAA+B,qEAAM,0BAA0B,+DAA+D;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,qEAAM,IAAI,SAAS,IAAI;AACpD,kBAAkB,4EAAa;AAC/B;AACA;AACA,eAAe;AACf;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV,eAAe;AACf;AACA;AACA,UAAU;AACV,eAAe;AACf;AACA;AACA,YAAY;AACZ,kBAAkB;AAClB,UAAU;AACV;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AAGE","sources":["webpack://@readme/markdown/./node_modules/mermaid/dist/chunks/mermaid.core/chunk-RYO7GUH3.mjs","webpack://@readme/markdown/./node_modules/mermaid/dist/chunks/mermaid.core/diagram-AVGMFHF7.mjs"],"sourcesContent":["import {\n __name\n} from \"./chunk-S24QXQKS.mjs\";\n\n// src/diagrams/common/populateCommonDb.ts\nfunction populateCommonDb(ast, db) {\n if (ast.accDescr) {\n db.setAccDescription?.(ast.accDescr);\n }\n if (ast.accTitle) {\n db.setAccTitle?.(ast.accTitle);\n }\n if (ast.title) {\n db.setDiagramTitle?.(ast.title);\n }\n}\n__name(populateCommonDb, \"populateCommonDb\");\n\nexport {\n populateCommonDb\n};\n","import {\n populateCommonDb\n} from \"./chunk-RYO7GUH3.mjs\";\nimport {\n cleanAndMerge\n} from \"./chunk-TLUHKHBO.mjs\";\nimport {\n selectSvgElement\n} from \"./chunk-OBAELV6Q.mjs\";\nimport {\n __name,\n clear,\n configureSvgSize,\n defaultConfig_default,\n getAccDescription,\n getAccTitle,\n getConfig,\n getDiagramTitle,\n log,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n} from \"./chunk-S24QXQKS.mjs\";\n\n// src/diagrams/packet/db.ts\nvar defaultPacketData = {\n packet: []\n};\nvar data = structuredClone(defaultPacketData);\nvar DEFAULT_PACKET_CONFIG = defaultConfig_default.packet;\nvar getConfig2 = /* @__PURE__ */ __name(() => {\n const config = cleanAndMerge({\n ...DEFAULT_PACKET_CONFIG,\n ...getConfig().packet\n });\n if (config.showBits) {\n config.paddingY += 10;\n }\n return config;\n}, \"getConfig\");\nvar getPacket = /* @__PURE__ */ __name(() => data.packet, \"getPacket\");\nvar pushWord = /* @__PURE__ */ __name((word) => {\n if (word.length > 0) {\n data.packet.push(word);\n }\n}, \"pushWord\");\nvar clear2 = /* @__PURE__ */ __name(() => {\n clear();\n data = structuredClone(defaultPacketData);\n}, \"clear\");\nvar db = {\n pushWord,\n getPacket,\n getConfig: getConfig2,\n clear: clear2,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription\n};\n\n// src/diagrams/packet/parser.ts\nimport { parse } from \"@mermaid-js/parser\";\nvar maxPacketSize = 1e4;\nvar populate = /* @__PURE__ */ __name((ast) => {\n populateCommonDb(ast, db);\n let lastByte = -1;\n let word = [];\n let row = 1;\n const { bitsPerRow } = db.getConfig();\n for (let { start, end, label } of ast.blocks) {\n if (end && end < start) {\n throw new Error(`Packet block ${start} - ${end} is invalid. End must be greater than start.`);\n }\n if (start !== lastByte + 1) {\n throw new Error(\n `Packet block ${start} - ${end ?? start} is not contiguous. It should start from ${lastByte + 1}.`\n );\n }\n lastByte = end ?? start;\n log.debug(`Packet block ${start} - ${lastByte} with label ${label}`);\n while (word.length <= bitsPerRow + 1 && db.getPacket().length < maxPacketSize) {\n const [block, nextBlock] = getNextFittingBlock({ start, end, label }, row, bitsPerRow);\n word.push(block);\n if (block.end + 1 === row * bitsPerRow) {\n db.pushWord(word);\n word = [];\n row++;\n }\n if (!nextBlock) {\n break;\n }\n ({ start, end, label } = nextBlock);\n }\n }\n db.pushWord(word);\n}, \"populate\");\nvar getNextFittingBlock = /* @__PURE__ */ __name((block, row, bitsPerRow) => {\n if (block.end === void 0) {\n block.end = block.start;\n }\n if (block.start > block.end) {\n throw new Error(`Block start ${block.start} is greater than block end ${block.end}.`);\n }\n if (block.end + 1 <= row * bitsPerRow) {\n return [block, void 0];\n }\n return [\n {\n start: block.start,\n end: row * bitsPerRow - 1,\n label: block.label\n },\n {\n start: row * bitsPerRow,\n end: block.end,\n label: block.label\n }\n ];\n}, \"getNextFittingBlock\");\nvar parser = {\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"packet\", input);\n log.debug(ast);\n populate(ast);\n }, \"parse\")\n};\n\n// src/diagrams/packet/renderer.ts\nvar draw = /* @__PURE__ */ __name((_text, id, _version, diagram2) => {\n const db2 = diagram2.db;\n const config = db2.getConfig();\n const { rowHeight, paddingY, bitWidth, bitsPerRow } = config;\n const words = db2.getPacket();\n const title = db2.getDiagramTitle();\n const totalRowHeight = rowHeight + paddingY;\n const svgHeight = totalRowHeight * (words.length + 1) - (title ? 0 : rowHeight);\n const svgWidth = bitWidth * bitsPerRow + 2;\n const svg = selectSvgElement(id);\n svg.attr(\"viewbox\", `0 0 ${svgWidth} ${svgHeight}`);\n configureSvgSize(svg, svgHeight, svgWidth, config.useMaxWidth);\n for (const [word, packet] of words.entries()) {\n drawWord(svg, packet, word, config);\n }\n svg.append(\"text\").text(title).attr(\"x\", svgWidth / 2).attr(\"y\", svgHeight - totalRowHeight / 2).attr(\"dominant-baseline\", \"middle\").attr(\"text-anchor\", \"middle\").attr(\"class\", \"packetTitle\");\n}, \"draw\");\nvar drawWord = /* @__PURE__ */ __name((svg, word, rowNumber, { rowHeight, paddingX, paddingY, bitWidth, bitsPerRow, showBits }) => {\n const group = svg.append(\"g\");\n const wordY = rowNumber * (rowHeight + paddingY) + paddingY;\n for (const block of word) {\n const blockX = block.start % bitsPerRow * bitWidth + 1;\n const width = (block.end - block.start + 1) * bitWidth - paddingX;\n group.append(\"rect\").attr(\"x\", blockX).attr(\"y\", wordY).attr(\"width\", width).attr(\"height\", rowHeight).attr(\"class\", \"packetBlock\");\n group.append(\"text\").attr(\"x\", blockX + width / 2).attr(\"y\", wordY + rowHeight / 2).attr(\"class\", \"packetLabel\").attr(\"dominant-baseline\", \"middle\").attr(\"text-anchor\", \"middle\").text(block.label);\n if (!showBits) {\n continue;\n }\n const isSingleBlock = block.end === block.start;\n const bitNumberY = wordY - 2;\n group.append(\"text\").attr(\"x\", blockX + (isSingleBlock ? width / 2 : 0)).attr(\"y\", bitNumberY).attr(\"class\", \"packetByte start\").attr(\"dominant-baseline\", \"auto\").attr(\"text-anchor\", isSingleBlock ? \"middle\" : \"start\").text(block.start);\n if (!isSingleBlock) {\n group.append(\"text\").attr(\"x\", blockX + width).attr(\"y\", bitNumberY).attr(\"class\", \"packetByte end\").attr(\"dominant-baseline\", \"auto\").attr(\"text-anchor\", \"end\").text(block.end);\n }\n }\n}, \"drawWord\");\nvar renderer = { draw };\n\n// src/diagrams/packet/styles.ts\nvar defaultPacketStyleOptions = {\n byteFontSize: \"10px\",\n startByteColor: \"black\",\n endByteColor: \"black\",\n labelColor: \"black\",\n labelFontSize: \"12px\",\n titleColor: \"black\",\n titleFontSize: \"14px\",\n blockStrokeColor: \"black\",\n blockStrokeWidth: \"1\",\n blockFillColor: \"#efefef\"\n};\nvar styles = /* @__PURE__ */ __name(({ packet } = {}) => {\n const options = cleanAndMerge(defaultPacketStyleOptions, packet);\n return `\n\t.packetByte {\n\t\tfont-size: ${options.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${options.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${options.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${options.labelColor};\n\t\tfont-size: ${options.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${options.titleColor};\n\t\tfont-size: ${options.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${options.blockStrokeColor};\n\t\tstroke-width: ${options.blockStrokeWidth};\n\t\tfill: ${options.blockFillColor};\n\t}\n\t`;\n}, \"styles\");\n\n// src/diagrams/packet/diagram.ts\nvar diagram = {\n parser,\n db,\n renderer,\n styles\n};\nexport {\n diagram\n};\n"],"names":[],"sourceRoot":""}
|
package/dist/52.node.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"52.node.js","mappings":";;;;;;;;;;;;;;;;AAA+B;AACI;;AAEZ;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO,0DAAa;AACpB,iBAAiB,0DAAO;AACxB;AACA;AACA;;AAEA;AACA,SAAS,0DAAK;AACd;AACA;AACA,iBAAiB;AACjB,SAAS,0DAAa;AACtB;AACA;AACA,SAAS,0DAAa;AACtB;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA,SAAS,0DAAK;AACd;AACA,iBAAiB;AACjB,SAAS,0DAAa;AACtB;AACA;AACA,SAAS,0DAAa;AACtB;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,gBAAgB,0CAA0C;AAC1D,GAAG;AACH;AACA;;;;;;;;;;;;AC9DwC;;AAExC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,GAAG;AAChB;AACA;AACA;AACA,oBAAoB,QAAQ,IAAI,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,kEAAS;AAClB;;AAEA,iEAAe,KAAK,EAAC;;;;;;;;;;;;;;;;;;;;;ACtBS;AACA;AAGA;AACA;AACA;AAKA;;AAE9B;AACuE;AACL;AACH;;AAE/D;AAC8D;AACG;AACjE;AACA;AACA;AACA,6BAA6B,qEAAM;AACnC;AACA;AACA;AACA,CAAC;AACD,mCAAmC,qEAAM;AACzC;AACA,EAAE,8DAAG;AACL;AACA,CAAC;AACD,oCAAoC,qEAAM;AAC1C;AACA,EAAE,8DAAG;AACL,EAAE,8DAAG;AACL;AACA;AACA;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA,CAAC;AACD,2BAA2B,qEAAM;AACjC,EAAE,8DAAG;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,8DAAG;AACL;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM,8DAAG;AACT;AACA;AACA,QAAQ,8DAAG;AACX;AACA;AACA;AACA,QAAQ,8DAAG;AACX;AACA,QAAQ;AACR,QAAQ,8DAAG;AACX,QAAQ,8DAAG;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA,QAAQ,8DAAG;AACX;AACA,QAAQ,8DAAG;AACX;AACA;AACA,YAAY,8DAAG;AACf;AACA,YAAY,8DAAG;AACf,YAAY;AACZ,YAAY,8DAAG;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,UAAU,8DAAG;AACb;AACA,OAAO;AACP;AACA,IAAI,8DAAG;AACP;AACA,GAAG;AACH,CAAC;AACD,yCAAyC,qEAAM;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,sCAAsC,qEAAM;AAC5C;AACA;AACA;AACA,aAAa;AACb,GAAG;AACH;AACA,aAAa;AACb,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD,0CAA0C,qEAAM;AAChD;AACA,EAAE,8DAAG;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kCAAkC,qEAAM;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,6CAA6C,qEAAM;AACnD;AACA,IAAI,8DAAG;AACP;AACA,IAAI;AACJ,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qEAAqE;AAC/F;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA;AACA;AACA;AACA,UAAU,8DAAG;AACb,UAAU,8DAAG;AACb;AACA;AACA,OAAO;AACP,MAAM;AACN,MAAM,8DAAG;AACT;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8DAAG;AACP,IAAI,8DAAG;AACP;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA;AACA,GAAG;AACH,EAAE,8DAAG,wBAAwB,4EAAkB;AAC/C;AACA,EAAE,8DAAG;AACL,CAAC;AACD,gCAAgC,qEAAM;AACtC,EAAE,8DAAG,6BAA6B,4EAAkB;AACpD;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA,EAAE,8DAAG;AACL;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT,MAAM;AACN,MAAM,8DAAG;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8DAAG;AACX;AACA,+BAA+B,6EAAc;AAC7C;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,MAAM,8DAAG,+BAA+B,4EAAkB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM,8DAAG,iDAAiD,4EAAkB;AAC5E,MAAM,8DAAG,+BAA+B,4EAAkB;AAC1D,MAAM;AACN,MAAM,8DAAG;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA;AACA;AACA,EAAE,8DAAG;AACL;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA,CAAC;AACD,6BAA6B,qEAAM;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,CAAC;AACD,2CAA2C,qEAAM;;AAEjD;AACA,sCAAsC,qEAAM;AAC5C,EAAE,8DAAG,uCAAuC,4EAAmB;AAC/D;AACA,EAAE,8DAAG;AACL;AACA;AACA,IAAI,8DAAG;AACP,IAAI;AACJ,IAAI,8DAAG;AACP;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8DAAG;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,8DAAG;AACb;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA,QAAQ,8DAAG;AACX,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,+EAAgB;AACxB;AACA,QAAQ,8DAAG;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,0EAAW;AACnB,QAAQ;AACR;AACA,UAAU,8DAAG;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,8DAAG;AACb,mCAAmC,+CAA+C;AAClF,UAAU;AACV,UAAU,8DAAG;AACb,gBAAgB,yEAAU,yBAAyB,yBAAyB;AAC5E;AACA;AACA,KAAK;AACL;AACA,uCAAuC,qEAAM;AAC7C;AACA;AACA,MAAM,8DAAG;AACT,MAAM,8DAAG;AACT,MAAM,8DAAG;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8EAAe;AAC3B,KAAK;AACL;AACA,GAAG;AACH;AACA,EAAE,8DAAG,6CAA6C,4EAAmB;AACrE,EAAE,8DAAG;AACL,EAAE,8DAAG;AACL,EAAE,8DAAG;AACL,EAAE,gFAAW;AACb,EAAE,8DAAG,4CAA4C,4EAAmB;AACpE;AACA,QAAQ,2BAA2B,EAAE,qFAAuB;AAC5D;AACA;AACA;AACA,MAAM,8DAAG;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8DAAG;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,2EAAY;AACpB,QAAQ;AACR;AACA,UAAU,8DAAG;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,8DAAG;AACb,gBAAgB,2EAAa;AAC7B;AACA,UAAU;AACV;AACA;AACA,UAAU,8DAAG;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,2EAAY;AACtB;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA,kBAAkB,yEAAU;AAC5B,IAAI,gFAAiB;AACrB,GAAG;AACH;AACA;AACA,IAAI,8DAAG;AACP;AACA;AACA;AACA,GAAG;AACH,EAAE,8DAAG;AACL,WAAW;AACX,CAAC;AACD,6BAA6B,qEAAM;AACnC,oBAAoB,6EAAe;AACnC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,EAAE,8EAAe;AACjB,EAAE,qEAAM;AACR,EAAE,qEAAM;AACR,EAAE,oEAAK;AACP;AACA;AACA,6BAA6B,SAAS;AACtC;AACA;AACA;AACA,GAAG;AACH,EAAE,8DAAG;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,4CAA4C,SAAS;AACrD;AACA,GAAG;AACH,EAAE,8DAAG,wCAAwC,4EAAmB;AAChE;AACA,EAAE,8DAAG,yCAAyC,4EAAmB;AACjE,qBAAqB,yEAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAGC","sources":["webpack://@readme/markdown/./node_modules/dagre-d3-es/src/graphlib/json.js","webpack://@readme/markdown/./node_modules/lodash-es/clone.js","webpack://@readme/markdown/./node_modules/mermaid/dist/chunks/mermaid.core/dagre-7KT5K2WU.mjs"],"sourcesContent":["import * as _ from 'lodash-es';\nimport { Graph } from './graph.js';\n\nexport { write, read };\n\nfunction write(g) {\n var json = {\n options: {\n directed: g.isDirected(),\n multigraph: g.isMultigraph(),\n compound: g.isCompound(),\n },\n nodes: writeNodes(g),\n edges: writeEdges(g),\n };\n if (!_.isUndefined(g.graph())) {\n json.value = _.clone(g.graph());\n }\n return json;\n}\n\nfunction writeNodes(g) {\n return _.map(g.nodes(), function (v) {\n var nodeValue = g.node(v);\n var parent = g.parent(v);\n var node = { v: v };\n if (!_.isUndefined(nodeValue)) {\n node.value = nodeValue;\n }\n if (!_.isUndefined(parent)) {\n node.parent = parent;\n }\n return node;\n });\n}\n\nfunction writeEdges(g) {\n return _.map(g.edges(), function (e) {\n var edgeValue = g.edge(e);\n var edge = { v: e.v, w: e.w };\n if (!_.isUndefined(e.name)) {\n edge.name = e.name;\n }\n if (!_.isUndefined(edgeValue)) {\n edge.value = edgeValue;\n }\n return edge;\n });\n}\n\nfunction read(json) {\n var g = new Graph(json.options).setGraph(json.value);\n _.each(json.nodes, function (entry) {\n g.setNode(entry.v, entry.value);\n if (entry.parent) {\n g.setParent(entry.v, entry.parent);\n }\n });\n _.each(json.edges, function (entry) {\n g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value);\n });\n return g;\n}\n","import baseClone from './_baseClone.js';\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * Creates a shallow clone of `value`.\n *\n * **Note:** This method is loosely based on the\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n * arrays. The own enumerable properties of `arguments` objects are cloned\n * as plain objects. An empty object is returned for uncloneable values such\n * as error objects, functions, DOM nodes, and WeakMaps.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to clone.\n * @returns {*} Returns the cloned value.\n * @see _.cloneDeep\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var shallow = _.clone(objects);\n * console.log(shallow[0] === objects[0]);\n * // => true\n */\nfunction clone(value) {\n return baseClone(value, CLONE_SYMBOLS_FLAG);\n}\n\nexport default clone;\n","import {\n clear,\n clear2,\n clear3,\n insertCluster,\n insertEdge,\n insertEdgeLabel,\n insertNode,\n markers_default,\n positionEdgeLabel,\n positionNode,\n setNodeElem,\n updateNodeBounds\n} from \"./chunk-O5FTX4FK.mjs\";\nimport \"./chunk-CTJGIJSU.mjs\";\nimport {\n getSubGraphTitleMargins\n} from \"./chunk-I3FGKTZ5.mjs\";\nimport \"./chunk-U7L4IQIU.mjs\";\nimport \"./chunk-TLUHKHBO.mjs\";\nimport {\n __name,\n getConfig2 as getConfig,\n log\n} from \"./chunk-S24QXQKS.mjs\";\n\n// src/rendering-util/layout-algorithms/dagre/index.js\nimport { layout as dagreLayout } from \"dagre-d3-es/src/dagre/index.js\";\nimport * as graphlibJson2 from \"dagre-d3-es/src/graphlib/json.js\";\nimport * as graphlib2 from \"dagre-d3-es/src/graphlib/index.js\";\n\n// src/rendering-util/layout-algorithms/dagre/mermaid-graphlib.js\nimport * as graphlib from \"dagre-d3-es/src/graphlib/index.js\";\nimport * as graphlibJson from \"dagre-d3-es/src/graphlib/json.js\";\nvar clusterDb = /* @__PURE__ */ new Map();\nvar descendants = /* @__PURE__ */ new Map();\nvar parents = /* @__PURE__ */ new Map();\nvar clear4 = /* @__PURE__ */ __name(() => {\n descendants.clear();\n parents.clear();\n clusterDb.clear();\n}, \"clear\");\nvar isDescendant = /* @__PURE__ */ __name((id, ancestorId) => {\n const ancestorDescendants = descendants.get(ancestorId) || [];\n log.trace(\"In isDescendant\", ancestorId, \" \", id, \" = \", ancestorDescendants.includes(id));\n return ancestorDescendants.includes(id);\n}, \"isDescendant\");\nvar edgeInCluster = /* @__PURE__ */ __name((edge, clusterId) => {\n const clusterDescendants = descendants.get(clusterId) || [];\n log.info(\"Descendants of \", clusterId, \" is \", clusterDescendants);\n log.info(\"Edge is \", edge);\n if (edge.v === clusterId || edge.w === clusterId) {\n return false;\n }\n if (!clusterDescendants) {\n log.debug(\"Tilt, \", clusterId, \",not in descendants\");\n return false;\n }\n return clusterDescendants.includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || clusterDescendants.includes(edge.w);\n}, \"edgeInCluster\");\nvar copy = /* @__PURE__ */ __name((clusterId, graph, newGraph, rootId) => {\n log.warn(\n \"Copying children of \",\n clusterId,\n \"root\",\n rootId,\n \"data\",\n graph.node(clusterId),\n rootId\n );\n const nodes = graph.children(clusterId) || [];\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n log.warn(\"Copying (nodes) clusterId\", clusterId, \"nodes\", nodes);\n nodes.forEach((node) => {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n const data = graph.node(node);\n log.info(\"cp \", node, \" to \", rootId, \" with parent \", clusterId);\n newGraph.setNode(node, data);\n if (rootId !== graph.parent(node)) {\n log.warn(\"Setting parent\", node, graph.parent(node));\n newGraph.setParent(node, graph.parent(node));\n }\n if (clusterId !== rootId && node !== clusterId) {\n log.debug(\"Setting parent\", node, clusterId);\n newGraph.setParent(node, clusterId);\n } else {\n log.info(\"In copy \", clusterId, \"root\", rootId, \"data\", graph.node(clusterId), rootId);\n log.debug(\n \"Not Setting parent for node=\",\n node,\n \"cluster!==rootId\",\n clusterId !== rootId,\n \"node!==clusterId\",\n node !== clusterId\n );\n }\n const edges = graph.edges(node);\n log.debug(\"Copying Edges\", edges);\n edges.forEach((edge) => {\n log.info(\"Edge\", edge);\n const data2 = graph.edge(edge.v, edge.w, edge.name);\n log.info(\"Edge data\", data2, rootId);\n try {\n if (edgeInCluster(edge, rootId)) {\n log.info(\"Copying as \", edge.v, edge.w, data2, edge.name);\n newGraph.setEdge(edge.v, edge.w, data2, edge.name);\n log.info(\"newGraph edges \", newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n log.info(\n \"Skipping copy of edge \",\n edge.v,\n \"-->\",\n edge.w,\n \" rootId: \",\n rootId,\n \" clusterId:\",\n clusterId\n );\n }\n } catch (e) {\n log.error(e);\n }\n });\n }\n log.debug(\"Removing node\", node);\n graph.removeNode(node);\n });\n}, \"copy\");\nvar extractDescendants = /* @__PURE__ */ __name((id, graph) => {\n const children = graph.children(id);\n let res = [...children];\n for (const child of children) {\n parents.set(child, id);\n res = [...res, ...extractDescendants(child, graph)];\n }\n return res;\n}, \"extractDescendants\");\nvar findCommonEdges = /* @__PURE__ */ __name((graph, id1, id2) => {\n const edges1 = graph.edges().filter((edge) => edge.v === id1 || edge.w === id1);\n const edges2 = graph.edges().filter((edge) => edge.v === id2 || edge.w === id2);\n const edges1Prim = edges1.map((edge) => {\n return { v: edge.v === id1 ? id2 : edge.v, w: edge.w === id1 ? id1 : edge.w };\n });\n const edges2Prim = edges2.map((edge) => {\n return { v: edge.v, w: edge.w };\n });\n const result = edges1Prim.filter((edgeIn1) => {\n return edges2Prim.some((edge) => edgeIn1.v === edge.v && edgeIn1.w === edge.w);\n });\n return result;\n}, \"findCommonEdges\");\nvar findNonClusterChild = /* @__PURE__ */ __name((id, graph, clusterId) => {\n const children = graph.children(id);\n log.trace(\"Searching children of id \", id, children);\n if (children.length < 1) {\n return id;\n }\n let reserve;\n for (const child of children) {\n const _id = findNonClusterChild(child, graph, clusterId);\n const commonEdges = findCommonEdges(graph, clusterId, _id);\n if (_id) {\n if (commonEdges.length > 0) {\n reserve = _id;\n } else {\n return _id;\n }\n }\n }\n return reserve;\n}, \"findNonClusterChild\");\nvar getAnchorId = /* @__PURE__ */ __name((id) => {\n if (!clusterDb.has(id)) {\n return id;\n }\n if (!clusterDb.get(id).externalConnections) {\n return id;\n }\n if (clusterDb.has(id)) {\n return clusterDb.get(id).id;\n }\n return id;\n}, \"getAnchorId\");\nvar adjustClustersAndEdges = /* @__PURE__ */ __name((graph, depth) => {\n if (!graph || depth > 10) {\n log.debug(\"Opting out, no graph \");\n return;\n } else {\n log.debug(\"Opting in, graph \");\n }\n graph.nodes().forEach(function(id) {\n const children = graph.children(id);\n if (children.length > 0) {\n log.warn(\n \"Cluster identified\",\n id,\n \" Replacement id in edges: \",\n findNonClusterChild(id, graph, id)\n );\n descendants.set(id, extractDescendants(id, graph));\n clusterDb.set(id, { id: findNonClusterChild(id, graph, id), clusterData: graph.node(id) });\n }\n });\n graph.nodes().forEach(function(id) {\n const children = graph.children(id);\n const edges = graph.edges();\n if (children.length > 0) {\n log.debug(\"Cluster identified\", id, descendants);\n edges.forEach((edge) => {\n const d1 = isDescendant(edge.v, id);\n const d2 = isDescendant(edge.w, id);\n if (d1 ^ d2) {\n log.warn(\"Edge: \", edge, \" leaves cluster \", id);\n log.warn(\"Descendants of XXX \", id, \": \", descendants.get(id));\n clusterDb.get(id).externalConnections = true;\n }\n });\n } else {\n log.debug(\"Not a cluster \", id, descendants);\n }\n });\n for (let id of clusterDb.keys()) {\n const nonClusterChild = clusterDb.get(id).id;\n const parent = graph.parent(nonClusterChild);\n if (parent !== id && clusterDb.has(parent) && !clusterDb.get(parent).externalConnections) {\n clusterDb.get(id).id = parent;\n }\n }\n graph.edges().forEach(function(e) {\n const edge = graph.edge(e);\n log.warn(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n log.warn(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(graph.edge(e)));\n let v = e.v;\n let w = e.w;\n log.warn(\n \"Fix XXX\",\n clusterDb,\n \"ids:\",\n e.v,\n e.w,\n \"Translating: \",\n clusterDb.get(e.v),\n \" --- \",\n clusterDb.get(e.w)\n );\n if (clusterDb.get(e.v) || clusterDb.get(e.w)) {\n log.warn(\"Fixing and trying - removing XXX\", e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) {\n const parent = graph.parent(v);\n clusterDb.get(parent).externalConnections = true;\n edge.fromCluster = e.v;\n }\n if (w !== e.w) {\n const parent = graph.parent(w);\n clusterDb.get(parent).externalConnections = true;\n edge.toCluster = e.w;\n }\n log.warn(\"Fix Replacing with XXX\", v, w, e.name);\n graph.setEdge(v, w, edge, e.name);\n }\n });\n log.warn(\"Adjusted Graph\", graphlibJson.write(graph));\n extractor(graph, 0);\n log.trace(clusterDb);\n}, \"adjustClustersAndEdges\");\nvar extractor = /* @__PURE__ */ __name((graph, depth) => {\n log.warn(\"extractor - \", depth, graphlibJson.write(graph), graph.children(\"D\"));\n if (depth > 10) {\n log.error(\"Bailing out\");\n return;\n }\n let nodes = graph.nodes();\n let hasChildren = false;\n for (const node of nodes) {\n const children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n if (!hasChildren) {\n log.debug(\"Done, no node has children\", graph.nodes());\n return;\n }\n log.debug(\"Nodes = \", nodes, depth);\n for (const node of nodes) {\n log.debug(\n \"Extracting node\",\n node,\n clusterDb,\n clusterDb.has(node) && !clusterDb.get(node).externalConnections,\n !graph.parent(node),\n graph.node(node),\n graph.children(\"D\"),\n \" Depth \",\n depth\n );\n if (!clusterDb.has(node)) {\n log.debug(\"Not a cluster\", node, depth);\n } else if (!clusterDb.get(node).externalConnections && graph.children(node) && graph.children(node).length > 0) {\n log.warn(\n \"Cluster without external connections, without a parent and with children\",\n node,\n depth\n );\n const graphSettings = graph.graph();\n let dir = graphSettings.rankdir === \"TB\" ? \"LR\" : \"TB\";\n if (clusterDb.get(node)?.clusterData?.dir) {\n dir = clusterDb.get(node).clusterData.dir;\n log.warn(\"Fixing dir\", clusterDb.get(node).clusterData.dir, dir);\n }\n const clusterGraph = new graphlib.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: dir,\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n log.warn(\"Old graph before copy\", graphlibJson.write(graph));\n copy(node, graph, clusterGraph, node);\n graph.setNode(node, {\n clusterNode: true,\n id: node,\n clusterData: clusterDb.get(node).clusterData,\n label: clusterDb.get(node).label,\n graph: clusterGraph\n });\n log.warn(\"New graph after copy node: (\", node, \")\", graphlibJson.write(clusterGraph));\n log.debug(\"Old graph after copy\", graphlibJson.write(graph));\n } else {\n log.warn(\n \"Cluster ** \",\n node,\n \" **not meeting the criteria !externalConnections:\",\n !clusterDb.get(node).externalConnections,\n \" no parent: \",\n !graph.parent(node),\n \" children \",\n graph.children(node) && graph.children(node).length > 0,\n graph.children(\"D\"),\n depth\n );\n log.debug(clusterDb);\n }\n }\n nodes = graph.nodes();\n log.warn(\"New list of nodes\", nodes);\n for (const node of nodes) {\n const data = graph.node(node);\n log.warn(\" Now next level\", node, data);\n if (data?.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n}, \"extractor\");\nvar sorter = /* @__PURE__ */ __name((graph, nodes) => {\n if (nodes.length === 0) {\n return [];\n }\n let result = Object.assign([], nodes);\n nodes.forEach((node) => {\n const children = graph.children(node);\n const sorted = sorter(graph, children);\n result = [...result, ...sorted];\n });\n return result;\n}, \"sorter\");\nvar sortNodesByHierarchy = /* @__PURE__ */ __name((graph) => sorter(graph, graph.children()), \"sortNodesByHierarchy\");\n\n// src/rendering-util/layout-algorithms/dagre/index.js\nvar recursiveRender = /* @__PURE__ */ __name(async (_elem, graph, diagramType, id, parentCluster, siteConfig) => {\n log.warn(\"Graph in recursive render:XAX\", graphlibJson2.write(graph), parentCluster);\n const dir = graph.graph().rankdir;\n log.trace(\"Dir in recursive render - dir:\", dir);\n const elem = _elem.insert(\"g\").attr(\"class\", \"root\");\n if (!graph.nodes()) {\n log.info(\"No nodes found for\", graph);\n } else {\n log.info(\"Recursive render XXX\", graph.nodes());\n }\n if (graph.edges().length > 0) {\n log.info(\"Recursive edges\", graph.edge(graph.edges()[0]));\n }\n const clusters = elem.insert(\"g\").attr(\"class\", \"clusters\");\n const edgePaths = elem.insert(\"g\").attr(\"class\", \"edgePaths\");\n const edgeLabels = elem.insert(\"g\").attr(\"class\", \"edgeLabels\");\n const nodes = elem.insert(\"g\").attr(\"class\", \"nodes\");\n await Promise.all(\n graph.nodes().map(async function(v) {\n const node = graph.node(v);\n if (parentCluster !== void 0) {\n const data = JSON.parse(JSON.stringify(parentCluster.clusterData));\n log.trace(\n \"Setting data for parent cluster XXX\\n Node.id = \",\n v,\n \"\\n data=\",\n data.height,\n \"\\nParent cluster\",\n parentCluster.height\n );\n graph.setNode(parentCluster.id, data);\n if (!graph.parent(v)) {\n log.trace(\"Setting parent\", v, parentCluster.id);\n graph.setParent(v, parentCluster.id, data);\n }\n }\n log.info(\"(Insert) Node XXX\" + v + \": \" + JSON.stringify(graph.node(v)));\n if (node?.clusterNode) {\n log.info(\"Cluster identified XBX\", v, node.width, graph.node(v));\n const { ranksep, nodesep } = graph.graph();\n node.graph.setGraph({\n ...node.graph.graph(),\n ranksep: ranksep + 25,\n nodesep\n });\n const o = await recursiveRender(\n nodes,\n node.graph,\n diagramType,\n id,\n graph.node(v),\n siteConfig\n );\n const newEl = o.elem;\n updateNodeBounds(node, newEl);\n node.diff = o.diff || 0;\n log.info(\n \"New compound node after recursive render XAX\",\n v,\n \"width\",\n // node,\n node.width,\n \"height\",\n node.height\n // node.x,\n // node.y\n );\n setNodeElem(newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n log.trace(\n \"Cluster - the non recursive path XBX\",\n v,\n node.id,\n node,\n node.width,\n \"Graph:\",\n graph\n );\n log.trace(findNonClusterChild(node.id, graph));\n clusterDb.set(node.id, { id: findNonClusterChild(node.id, graph), node });\n } else {\n log.trace(\"Node - the non recursive path XAX\", v, nodes, graph.node(v), dir);\n await insertNode(nodes, graph.node(v), { config: siteConfig, dir });\n }\n }\n })\n );\n const processEdges = /* @__PURE__ */ __name(async () => {\n const edgePromises = graph.edges().map(async function(e) {\n const edge = graph.edge(e.v, e.w, e.name);\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(e));\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \", e, \" \", JSON.stringify(graph.edge(e)));\n log.info(\n \"Fix\",\n clusterDb,\n \"ids:\",\n e.v,\n e.w,\n \"Translating: \",\n clusterDb.get(e.v),\n clusterDb.get(e.w)\n );\n await insertEdgeLabel(edgeLabels, edge);\n });\n await Promise.all(edgePromises);\n }, \"processEdges\");\n await processEdges();\n log.info(\"Graph before layout:\", JSON.stringify(graphlibJson2.write(graph)));\n log.info(\"############################################# XXX\");\n log.info(\"### Layout ### XXX\");\n log.info(\"############################################# XXX\");\n dagreLayout(graph);\n log.info(\"Graph after layout:\", JSON.stringify(graphlibJson2.write(graph)));\n let diff = 0;\n let { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n await Promise.all(\n sortNodesByHierarchy(graph).map(async function(v) {\n const node = graph.node(v);\n log.info(\n \"Position XBX => \" + v + \": (\" + node.x,\n \",\" + node.y,\n \") width: \",\n node.width,\n \" height: \",\n node.height\n );\n if (node?.clusterNode) {\n node.y += subGraphTitleTotalMargin;\n log.info(\n \"A tainted cluster node XBX1\",\n v,\n node.id,\n node.width,\n node.height,\n node.x,\n node.y,\n graph.parent(v)\n );\n clusterDb.get(node.id).node = node;\n positionNode(node);\n } else {\n if (graph.children(v).length > 0) {\n log.info(\n \"A pure cluster node XBX1\",\n v,\n node.id,\n node.x,\n node.y,\n node.width,\n node.height,\n graph.parent(v)\n );\n node.height += subGraphTitleTotalMargin;\n graph.node(node.parentId);\n const halfPadding = node?.padding / 2 || 0;\n const labelHeight = node?.labelBBox?.height || 0;\n const offsetY = labelHeight - halfPadding || 0;\n log.debug(\"OffsetY\", offsetY, \"labelHeight\", labelHeight, \"halfPadding\", halfPadding);\n await insertCluster(clusters, node);\n clusterDb.get(node.id).node = node;\n } else {\n const parent = graph.node(node.parentId);\n node.y += subGraphTitleTotalMargin / 2;\n log.info(\n \"A regular node XBX1 - using the padding\",\n node.id,\n \"parent\",\n node.parentId,\n node.width,\n node.height,\n node.x,\n node.y,\n \"offsetY\",\n node.offsetY,\n \"parent\",\n parent,\n parent?.offsetY,\n node\n );\n positionNode(node);\n }\n }\n })\n );\n graph.edges().forEach(function(e) {\n const edge = graph.edge(e);\n log.info(\"Edge \" + e.v + \" -> \" + e.w + \": \" + JSON.stringify(edge), edge);\n edge.points.forEach((point) => point.y += subGraphTitleTotalMargin / 2);\n const startNode = graph.node(e.v);\n var endNode = graph.node(e.w);\n const paths = insertEdge(edgePaths, edge, clusterDb, diagramType, startNode, endNode, id);\n positionEdgeLabel(edge, paths);\n });\n graph.nodes().forEach(function(v) {\n const n = graph.node(v);\n log.info(v, n.type, n.diff);\n if (n.isGroup) {\n diff = n.diff;\n }\n });\n log.warn(\"Returning from recursive render XAX\", elem, diff);\n return { elem, diff };\n}, \"recursiveRender\");\nvar render = /* @__PURE__ */ __name(async (data4Layout, svg) => {\n const graph = new graphlib2.Graph({\n multigraph: true,\n compound: true\n }).setGraph({\n rankdir: data4Layout.direction,\n nodesep: data4Layout.config?.nodeSpacing || data4Layout.config?.flowchart?.nodeSpacing || data4Layout.nodeSpacing,\n ranksep: data4Layout.config?.rankSpacing || data4Layout.config?.flowchart?.rankSpacing || data4Layout.rankSpacing,\n marginx: 8,\n marginy: 8\n }).setDefaultEdgeLabel(function() {\n return {};\n });\n const element = svg.select(\"g\");\n markers_default(element, data4Layout.markers, data4Layout.type, data4Layout.diagramId);\n clear3();\n clear2();\n clear();\n clear4();\n data4Layout.nodes.forEach((node) => {\n graph.setNode(node.id, { ...node });\n if (node.parentId) {\n graph.setParent(node.id, node.parentId);\n }\n });\n log.debug(\"Edges:\", data4Layout.edges);\n data4Layout.edges.forEach((edge) => {\n if (edge.start === edge.end) {\n const nodeId = edge.start;\n const specialId1 = nodeId + \"---\" + nodeId + \"---1\";\n const specialId2 = nodeId + \"---\" + nodeId + \"---2\";\n const node = graph.node(nodeId);\n graph.setNode(specialId1, {\n domId: specialId1,\n id: specialId1,\n parentId: node.parentId,\n labelStyle: \"\",\n label: \"\",\n padding: 0,\n shape: \"labelRect\",\n // shape: 'rect',\n style: \"\",\n width: 10,\n height: 10\n });\n graph.setParent(specialId1, node.parentId);\n graph.setNode(specialId2, {\n domId: specialId2,\n id: specialId2,\n parentId: node.parentId,\n labelStyle: \"\",\n padding: 0,\n // shape: 'rect',\n shape: \"labelRect\",\n label: \"\",\n style: \"\",\n width: 10,\n height: 10\n });\n graph.setParent(specialId2, node.parentId);\n const edge1 = structuredClone(edge);\n const edgeMid = structuredClone(edge);\n const edge2 = structuredClone(edge);\n edge1.label = \"\";\n edge1.arrowTypeEnd = \"none\";\n edge1.id = nodeId + \"-cyclic-special-1\";\n edgeMid.arrowTypeEnd = \"none\";\n edgeMid.id = nodeId + \"-cyclic-special-mid\";\n edge2.label = \"\";\n if (node.isGroup) {\n edge1.fromCluster = nodeId;\n edge2.toCluster = nodeId;\n }\n edge2.id = nodeId + \"-cyclic-special-2\";\n graph.setEdge(nodeId, specialId1, edge1, nodeId + \"-cyclic-special-0\");\n graph.setEdge(specialId1, specialId2, edgeMid, nodeId + \"-cyclic-special-1\");\n graph.setEdge(specialId2, nodeId, edge2, nodeId + \"-cyc<lic-special-2\");\n } else {\n graph.setEdge(edge.start, edge.end, { ...edge }, edge.id);\n }\n });\n log.warn(\"Graph at first:\", JSON.stringify(graphlibJson2.write(graph)));\n adjustClustersAndEdges(graph);\n log.warn(\"Graph after XAX:\", JSON.stringify(graphlibJson2.write(graph)));\n const siteConfig = getConfig();\n await recursiveRender(\n element,\n graph,\n data4Layout.type,\n data4Layout.diagramId,\n void 0,\n siteConfig\n );\n}, \"render\");\nexport {\n render\n};\n"],"names":[],"sourceRoot":""}
|
package/dist/617.node.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.id = 617;
|
|
3
|
-
exports.ids = [617];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 4617:
|
|
7
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
-
|
|
9
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
-
/* harmony export */ createInfoServices: () => (/* reexport safe */ _chunk_4YFB5VUC_mjs__WEBPACK_IMPORTED_MODULE_0__.v)
|
|
11
|
-
/* harmony export */ });
|
|
12
|
-
/* harmony import */ var _chunk_4YFB5VUC_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4496);
|
|
13
|
-
/* harmony import */ var _chunk_Y27MQZ3U_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5472);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/***/ })
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
;
|
|
23
|
-
//# sourceMappingURL=617.node.js.map
|
package/dist/617.node.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"617.node.js","mappings":";;;;;;;;;;;;;AAG8B;AACA;AAI5B","sources":["webpack://@readme/markdown/./node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-46DW6VJ7.mjs"],"sourcesContent":["import {\n InfoModule,\n createInfoServices\n} from \"./chunk-4YFB5VUC.mjs\";\nimport \"./chunk-Y27MQZ3U.mjs\";\nexport {\n InfoModule,\n createInfoServices\n};\n"],"names":[],"sourceRoot":""}
|