@pi-outpost/embed 0.1.0
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/LICENSE +21 -0
- package/README.md +63 -0
- package/dist/abnfDiagram-VRR7QNED-BPTALLb_.cjs +1 -0
- package/dist/abnfDiagram-VRR7QNED-DlAvVtuC.js +89 -0
- package/dist/arc-BBnpgwVQ.js +80 -0
- package/dist/arc-DcUn9_NX.cjs +1 -0
- package/dist/architecture-TIHT7OUA-D-35jO9Y.cjs +1 -0
- package/dist/architecture-TIHT7OUA-DDyMqjR1.js +3 -0
- package/dist/architectureDiagram-ZJ3FMSHR-Bh5-VPPg.cjs +36 -0
- package/dist/architectureDiagram-ZJ3FMSHR-D7UsY5ua.js +4120 -0
- package/dist/array-CApNbSU9.js +6 -0
- package/dist/array-DZSRzHA_.cjs +1 -0
- package/dist/bash-BLBHkRa_.js +169 -0
- package/dist/bash-DHJu-DNv.cjs +1 -0
- package/dist/blockDiagram-677ZJIJ3-BrXgigdO.cjs +132 -0
- package/dist/blockDiagram-677ZJIJ3-s-fanRPN.js +3160 -0
- package/dist/c-4QgYfi8K.cjs +1 -0
- package/dist/c-Cw4FsAeJ.js +176 -0
- package/dist/c4Diagram-LMCZKHZV-BbZFAi_K.js +2962 -0
- package/dist/c4Diagram-LMCZKHZV-DFBVQ9Uo.cjs +10 -0
- package/dist/channel-DV0ST12Z.js +5 -0
- package/dist/channel-DkMGzfUR.cjs +1 -0
- package/dist/chunk-2Q5K7J3B-B8v9mTdK.cjs +1 -0
- package/dist/chunk-2Q5K7J3B-DqJF2oYF.js +15 -0
- package/dist/chunk-32BRIVSS-Byu3FrKX.js +61 -0
- package/dist/chunk-32BRIVSS-oWSJWk-u.cjs +1 -0
- package/dist/chunk-52WLFC77-C9zQbcGs.js +590 -0
- package/dist/chunk-52WLFC77-D9PTsiCj.cjs +10 -0
- package/dist/chunk-5VM5RSS4-BMfgdMFU.js +5 -0
- package/dist/chunk-5VM5RSS4-CwDmQ9T_.cjs +15 -0
- package/dist/chunk-7BUUIJ7U-BFUeQBoS.js +82 -0
- package/dist/chunk-7BUUIJ7U-MzS1pW_S.cjs +1 -0
- package/dist/chunk-C7G6YPKG-CDjkH_UW.cjs +1 -0
- package/dist/chunk-C7G6YPKG-GTlyrFFt.js +67 -0
- package/dist/chunk-EX3LRPZG-BBldDxGh.js +2046 -0
- package/dist/chunk-EX3LRPZG-u-BKCEWO.cjs +231 -0
- package/dist/chunk-FWX5IMBZ-h3GfgkP2.js +57 -0
- package/dist/chunk-FWX5IMBZ-nqBth1J9.cjs +1 -0
- package/dist/chunk-HOUHSVGY-CgfXy94u.cjs +1 -0
- package/dist/chunk-HOUHSVGY-CtRCnz1G.js +277 -0
- package/dist/chunk-ICXQ74PX-BmEfYj-r.cjs +2 -0
- package/dist/chunk-ICXQ74PX-CC59NQmW.js +1366 -0
- package/dist/chunk-JWPE2WC7-B_J6qwQL.js +8 -0
- package/dist/chunk-JWPE2WC7-Cs1kjq8S.cjs +1 -0
- package/dist/chunk-KEIR6QF5-BVnxrdHo.js +21388 -0
- package/dist/chunk-KEIR6QF5-Cy_QBNG6.cjs +161 -0
- package/dist/chunk-MOJQB5TN-D6YxvkUY.js +490 -0
- package/dist/chunk-MOJQB5TN-H2vwz-oQ.cjs +88 -0
- package/dist/chunk-OGEWGWER-BGdqgMza.js +32 -0
- package/dist/chunk-OGEWGWER-BP4o8A-v.cjs +1 -0
- package/dist/chunk-PUDLZKDR-C8jMDFq6.js +4142 -0
- package/dist/chunk-PUDLZKDR-DtzwSdxX.cjs +156 -0
- package/dist/chunk-Q4XR5HBZ-Bk18cMuk.js +1628 -0
- package/dist/chunk-Q4XR5HBZ-COrrWZzi.cjs +70 -0
- package/dist/chunk-RYQCIY6F-27FDzaaE.cjs +1 -0
- package/dist/chunk-RYQCIY6F-C-YC3QS_.js +239 -0
- package/dist/chunk-V7JOEXUC-BROsdKzY.js +3357 -0
- package/dist/chunk-V7JOEXUC-Cfrm5GQn.cjs +206 -0
- package/dist/chunk-VAUOI2AC-05FwamOA.js +10 -0
- package/dist/chunk-VAUOI2AC-CBXi4Di2.cjs +1 -0
- package/dist/chunk-VR4S4FIN-CSU_1xTZ.cjs +1 -0
- package/dist/chunk-VR4S4FIN-Ci491c8N.js +26 -0
- package/dist/chunk-WYO6CB5R-BTvDzbWd.cjs +127 -0
- package/dist/chunk-WYO6CB5R-Y9HJHB3Q.js +3739 -0
- package/dist/chunk-XXDRQBXY-DsVp5qjg.js +9 -0
- package/dist/chunk-XXDRQBXY-gWcN0uCZ.cjs +1 -0
- package/dist/chunk-Y2CYZVJY-CnmLqFtv.cjs +1 -0
- package/dist/chunk-Y2CYZVJY-CwsV_8W4.js +12 -0
- package/dist/chunk-ZGVPDNZ5-CDTkXY1G.js +3736 -0
- package/dist/chunk-ZGVPDNZ5-COEQX4AZ.cjs +62 -0
- package/dist/chunk-ZIRB5QZD-BU6XQUGC.cjs +32 -0
- package/dist/chunk-ZIRB5QZD-Cj-y77rH.js +1146 -0
- package/dist/classDiagram-OUVF2IWQ-Avsu6OKn.cjs +1 -0
- package/dist/classDiagram-OUVF2IWQ-eC72Wwol.js +30 -0
- package/dist/classDiagram-v2-EOCWNBFH-Avsu6OKn.cjs +1 -0
- package/dist/classDiagram-v2-EOCWNBFH-DsRoQgCt.js +30 -0
- package/dist/core-2nR1zkKb.cjs +3 -0
- package/dist/core-BO2hTFeF.js +845 -0
- package/dist/cose-bilkent-JH36ORCC-AyWV1dUo.cjs +1 -0
- package/dist/cose-bilkent-JH36ORCC-BFo5zomD.js +2251 -0
- package/dist/cpp-BUtp-HE2.cjs +1 -0
- package/dist/cpp-CeyO6lBG.js +225 -0
- package/dist/csharp-BJu4kEpt.cjs +1 -0
- package/dist/csharp-Ck6Fet_o.js +260 -0
- package/dist/css-ClSGJRju.js +140 -0
- package/dist/css-DeFr0lev.cjs +1 -0
- package/dist/cynefin-VYW2F7L2-DHhUPDgc.cjs +1 -0
- package/dist/cynefin-VYW2F7L2-DwiVqvhg.js +3 -0
- package/dist/cynefinDiagram-TSTJHNR4-BRUl09PN.js +349 -0
- package/dist/cynefinDiagram-TSTJHNR4-rKPqxFde.cjs +62 -0
- package/dist/cytoscape.esm-ByjvpCPI.cjs +321 -0
- package/dist/cytoscape.esm-asYnbYTy.js +18148 -0
- package/dist/dagre-BBlCxSvR.cjs +1 -0
- package/dist/dagre-BpqwxFKp.js +1701 -0
- package/dist/dagre-VKFMJZFB-BsfMZfPu.cjs +4 -0
- package/dist/dagre-VKFMJZFB-ChTkS14y.js +328 -0
- package/dist/defaultLocale-u9yUoUmE.cjs +1 -0
- package/dist/defaultLocale-up9-vqhM.js +201 -0
- package/dist/diagram-FQU43EPY-BnAYoLDy.js +432 -0
- package/dist/diagram-FQU43EPY-CdbwLZpm.cjs +3 -0
- package/dist/diagram-G47NLZAW-C1ZiELQG.js +525 -0
- package/dist/diagram-G47NLZAW-CtWKuxkf.cjs +24 -0
- package/dist/diagram-NH7WQ7WH-Be0KXo6w.js +134 -0
- package/dist/diagram-NH7WQ7WH-CG6VWVza.cjs +24 -0
- package/dist/diagram-OA4YK3LP-B7avlqjG.js +300 -0
- package/dist/diagram-OA4YK3LP-Drq_GA6o.cjs +30 -0
- package/dist/diagram-WEI45ONY-CoPX6-sx.js +214 -0
- package/dist/diagram-WEI45ONY-SJmgVL59.cjs +41 -0
- package/dist/dist-D6LMt8nW.js +59 -0
- package/dist/dist-DNGlMOWd.cjs +1 -0
- package/dist/dockerfile-O4rAswfG.js +34 -0
- package/dist/dockerfile-YBgAWga3.cjs +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-B-T4_JnX.js +100 -0
- package/dist/ebnfDiagram-CCIWWBDH-BY7L3HVQ.cjs +1 -0
- package/dist/erDiagram-Q63AITRT-DPgZpeaH.js +1727 -0
- package/dist/erDiagram-Q63AITRT-w4C1PxYd.cjs +85 -0
- package/dist/eventmodeling-45OFAUF4-COTtdYDJ.js +3 -0
- package/dist/eventmodeling-45OFAUF4-CPEyr9kU.cjs +1 -0
- package/dist/flowDiagram-23GEKE2U-CQxPdUX4.cjs +1 -0
- package/dist/flowDiagram-23GEKE2U-ClCSBl2p.js +17 -0
- package/dist/ganttDiagram-NO4QXBWP-BcBp028S.cjs +292 -0
- package/dist/ganttDiagram-NO4QXBWP-Cf12fLfa.js +3083 -0
- package/dist/gitGraph-TEB2WS4Q-C3qBT0GM.js +3 -0
- package/dist/gitGraph-TEB2WS4Q-a8KsoPmR.cjs +1 -0
- package/dist/gitGraphDiagram-IHSO6WYX-13ahKewT.js +729 -0
- package/dist/gitGraphDiagram-IHSO6WYX-BTtNkGkN.cjs +106 -0
- package/dist/go-D-pz-dmd.cjs +1 -0
- package/dist/go-rg7jg1mu.js +140 -0
- package/dist/graphlib-B0GbLif1.js +1267 -0
- package/dist/graphlib-CkkG5MuS.cjs +1 -0
- package/dist/info-DKCQHKI2-BEYhR6ip.cjs +1 -0
- package/dist/info-DKCQHKI2-BPF6-pOb.js +3 -0
- package/dist/infoDiagram-FWYZ7A6U-20rh0VNL.cjs +2 -0
- package/dist/infoDiagram-FWYZ7A6U-DcV-eSsb.js +20 -0
- package/dist/ini-C1q3_1-Q.js +88 -0
- package/dist/ini-nVcUEghj.cjs +1 -0
- package/dist/init-07zIhv_j.cjs +1 -0
- package/dist/init-CirqLVcp.js +15 -0
- package/dist/ishikawaDiagram-FXEZZL3T-BTaBCHIG.js +719 -0
- package/dist/ishikawaDiagram-FXEZZL3T-BUq5kcFI.cjs +70 -0
- package/dist/java-CUN_usaq.cjs +1 -0
- package/dist/java-HguKEfA2.js +169 -0
- package/dist/javascript-C8NCH8DE.js +436 -0
- package/dist/javascript-UZXSyUuu.cjs +1 -0
- package/dist/journeyDiagram-5HDEW3XC-Cl9Z4b58.js +884 -0
- package/dist/journeyDiagram-5HDEW3XC-XQa-rhY_.cjs +139 -0
- package/dist/json-Cp01TR_B.js +36 -0
- package/dist/json-usH_MUzR.cjs +1 -0
- package/dist/kanban-definition-HUTT4EX6-CtWnZ0nS.js +975 -0
- package/dist/kanban-definition-HUTT4EX6-DVHXUPOt.cjs +89 -0
- package/dist/line-Ca8dE_lT.cjs +1 -0
- package/dist/line-O2xx2vVQ.js +34 -0
- package/dist/linear-CVhyaVzf.js +289 -0
- package/dist/linear-Cl2-QuPP.cjs +1 -0
- package/dist/map-CwPlMWPw.cjs +1 -0
- package/dist/map-DU12fF3s.js +241 -0
- package/dist/markdown-CzgRofaE.js +181 -0
- package/dist/markdown-qeo95R0i.cjs +1 -0
- package/dist/mermaid-parser.core-B8DQcCaz.js +638 -0
- package/dist/mermaid-parser.core-Cgsz0CdK.cjs +6 -0
- package/dist/mermaid.core-BR-iKb2Q.js +1064 -0
- package/dist/mermaid.core-DQrbAA--.cjs +10 -0
- package/dist/mindmap-definition-LN4V7U3C-C0I9iWmq.cjs +96 -0
- package/dist/mindmap-definition-LN4V7U3C-lkSmRsIC.js +1008 -0
- package/dist/mount.d.ts +31 -0
- package/dist/ordinal-CCTD6_le.js +65 -0
- package/dist/ordinal-CUPR-p0T.cjs +1 -0
- package/dist/packet-7NZHBO7P-DqvBYJTR.js +3 -0
- package/dist/packet-7NZHBO7P-Dz0O2bgq.cjs +1 -0
- package/dist/path-Kklx0M1v.cjs +1 -0
- package/dist/path-mKa7UESy.js +85 -0
- package/dist/pegDiagram-2B236MQR-BgRCQTZd.js +94 -0
- package/dist/pegDiagram-2B236MQR-hlmRl_PA.cjs +1 -0
- package/dist/php-C9FOMGEA.js +294 -0
- package/dist/php-j6EhDZDE.cjs +2 -0
- package/dist/pi-outpost-embed.cjs +305 -0
- package/dist/pi-outpost-embed.js +40942 -0
- package/dist/pie-RZYD4A2V-Hi9UdoE3.cjs +1 -0
- package/dist/pie-RZYD4A2V-qnruo9sH.js +3 -0
- package/dist/pieDiagram-ENE6RG2P-BVi7ck2I.js +205 -0
- package/dist/pieDiagram-ENE6RG2P-Buuvrs-h.cjs +39 -0
- package/dist/plaintext-BYYAHR3Z.js +10 -0
- package/dist/plaintext-DmnjizxG.cjs +1 -0
- package/dist/python-BYJzTRkK.cjs +1 -0
- package/dist/python-DKAazMIE.js +238 -0
- package/dist/quadrantDiagram-ABIIQ3AL-DeU97c2B.js +2001 -0
- package/dist/quadrantDiagram-ABIIQ3AL-LCbC0LEt.cjs +7 -0
- package/dist/radar-I7S5WNFK-Dqdssa34.cjs +1 -0
- package/dist/radar-I7S5WNFK-np_pJCO-.js +3 -0
- package/dist/railroad-3IZDKUUU-NILjDQft.cjs +1 -0
- package/dist/railroad-3IZDKUUU-sjKBeXxB.js +3 -0
- package/dist/railroad-abnf-AHOZXSZD-BojH9sxV.cjs +1 -0
- package/dist/railroad-abnf-AHOZXSZD-x5cC_e_R.js +3 -0
- package/dist/railroad-ebnf-EBAXGLYW-2mlWpz38.js +3 -0
- package/dist/railroad-ebnf-EBAXGLYW-BKCSut1M.cjs +1 -0
- package/dist/railroad-peg-LSFZ7HO6-CsH-gnsp.cjs +1 -0
- package/dist/railroad-peg-LSFZ7HO6-D5vguo03.js +3 -0
- package/dist/railroadDiagram-RFXS5EU6-CMTDNjsw.cjs +1 -0
- package/dist/railroadDiagram-RFXS5EU6-DNSNpLmQ.js +76 -0
- package/dist/requirementDiagram-TGXJPOKE-CdspXMgv.js +2223 -0
- package/dist/requirementDiagram-TGXJPOKE-irImpO8w.cjs +84 -0
- package/dist/rolldown-runtime-Dqa2HsxW.js +20 -0
- package/dist/rolldown-runtime-mLOUI7ql.cjs +1 -0
- package/dist/rough.esm-C5XyeDCN.js +1352 -0
- package/dist/rough.esm-r0QOSzHM.cjs +1 -0
- package/dist/ruby-BAUeZQKZ.js +262 -0
- package/dist/ruby-ClR4zp-1.cjs +1 -0
- package/dist/rust-DiTjMjP5.js +169 -0
- package/dist/rust-ghVvEWhm.cjs +1 -0
- package/dist/sankeyDiagram-HTMAVEWB-B0ZJBVpN.cjs +40 -0
- package/dist/sankeyDiagram-HTMAVEWB-BQcvUCMA.js +970 -0
- package/dist/scss-CKxh5HRg.cjs +1 -0
- package/dist/scss-CckAvQOx.js +150 -0
- package/dist/sequenceDiagram-DBY2YBRQ-BQFP2DGs.js +4168 -0
- package/dist/sequenceDiagram-DBY2YBRQ-C5WukkcA.cjs +162 -0
- package/dist/sizeCapture-X5ZJPWSS-DKbHZNyz.js +46 -0
- package/dist/sizeCapture-X5ZJPWSS-bJ2ZX4Du.cjs +1 -0
- package/dist/sql-B-Rnc2C3.js +118 -0
- package/dist/sql-B7syKcd8.cjs +1 -0
- package/dist/src-CR--T_NF.cjs +1 -0
- package/dist/src-DJ4x3y2O.js +2142 -0
- package/dist/stateDiagram-2N3HPSRC-4aBQt5dk.js +220 -0
- package/dist/stateDiagram-2N3HPSRC-YbRd67eD.cjs +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-D-c6D5za.js +30 -0
- package/dist/stateDiagram-v2-6OUMAXLB-ciXN_270.cjs +1 -0
- package/dist/swimlanes-5IMT3BWC-C8zkS7yx.cjs +1 -0
- package/dist/swimlanes-5IMT3BWC-aKH3Xgob.js +5066 -0
- package/dist/swimlanesDiagram-G3AALYLV-BcgsG1in.js +31 -0
- package/dist/swimlanesDiagram-G3AALYLV-CBjVJdH0.cjs +8 -0
- package/dist/timeline-definition-FHXFAJF6-DS-X0FCl.cjs +120 -0
- package/dist/timeline-definition-FHXFAJF6-Lnag6wiw.js +1069 -0
- package/dist/treeView-QDETBFTQ-Cpg_YeQ4.cjs +1 -0
- package/dist/treeView-QDETBFTQ-DdpEhzZX.js +3 -0
- package/dist/treemap-6X3UGDF4-BeCuRpkA.js +3 -0
- package/dist/treemap-6X3UGDF4-CFAmnKaf.cjs +1 -0
- package/dist/typescript-clWeqIBY.cjs +1 -0
- package/dist/typescript-mdYq8uqf.js +521 -0
- package/dist/vennDiagram-L72KCM5P-CF7lC7jn.js +1880 -0
- package/dist/vennDiagram-L72KCM5P-DYZP8jT_.cjs +34 -0
- package/dist/wardley-OPB4EBWU-B0jnKd8x.cjs +1 -0
- package/dist/wardley-OPB4EBWU-DlIk2K0J.js +3 -0
- package/dist/wardleyDiagram-EHGQE667-CbtWlMOa.js +645 -0
- package/dist/wardleyDiagram-EHGQE667-Dxewrpeh.cjs +78 -0
- package/dist/xml-BamqaQOf.cjs +1 -0
- package/dist/xml-DVYfB8uY.js +166 -0
- package/dist/xychartDiagram-FW5EYKEG-BAnVfMdN.cjs +7 -0
- package/dist/xychartDiagram-FW5EYKEG-DmdGPSi6.js +2102 -0
- package/dist/yaml-_1BORZTQ.js +144 -0
- package/dist/yaml-bAgWofBg.cjs +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { n as e } from "./mermaid-parser.core-B8DQcCaz.js";
|
|
2
|
+
import { n as t } from "./chunk-Y2CYZVJY-CwsV_8W4.js";
|
|
3
|
+
import { m as n } from "./src-DJ4x3y2O.js";
|
|
4
|
+
import { H as r, K as i, U as a, a as o, b as s, c, f as l, v as u, w as d, y as f } from "./chunk-WYO6CB5R-Y9HJHB3Q.js";
|
|
5
|
+
import { i as p } from "./chunk-ICXQ74PX-CC59NQmW.js";
|
|
6
|
+
import { t as m } from "./chunk-VAUOI2AC-05FwamOA.js";
|
|
7
|
+
import { t as h } from "./chunk-JWPE2WC7-B_J6qwQL.js";
|
|
8
|
+
//#region ../node_modules/mermaid/dist/chunks/mermaid.core/diagram-NH7WQ7WH.mjs
|
|
9
|
+
var g = l.packet, _ = class {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.packet = [], this.setAccTitle = a, this.getAccTitle = f, this.setDiagramTitle = i, this.getDiagramTitle = d, this.getAccDescription = u, this.setAccDescription = r;
|
|
12
|
+
}
|
|
13
|
+
static {
|
|
14
|
+
t(this, "PacketDB");
|
|
15
|
+
}
|
|
16
|
+
getConfig() {
|
|
17
|
+
let e = p({
|
|
18
|
+
...g,
|
|
19
|
+
...s().packet
|
|
20
|
+
});
|
|
21
|
+
return e.showBits && (e.paddingY += 10), e;
|
|
22
|
+
}
|
|
23
|
+
getPacket() {
|
|
24
|
+
return this.packet;
|
|
25
|
+
}
|
|
26
|
+
pushWord(e) {
|
|
27
|
+
e.length > 0 && this.packet.push(e);
|
|
28
|
+
}
|
|
29
|
+
clear() {
|
|
30
|
+
o(), this.packet = [];
|
|
31
|
+
}
|
|
32
|
+
}, v = 1e4, y = /* @__PURE__ */ t((e, t) => {
|
|
33
|
+
h(e, t);
|
|
34
|
+
let r = -1, i = [], a = 1, { bitsPerRow: o } = t.getConfig();
|
|
35
|
+
for (let { start: s, end: c, bits: l, label: u } of e.blocks) {
|
|
36
|
+
if (s !== void 0 && c !== void 0 && c < s) throw Error(`Packet block ${s} - ${c} is invalid. End must be greater than start.`);
|
|
37
|
+
if (s ??= r + 1, s !== r + 1) throw Error(`Packet block ${s} - ${c ?? s} is not contiguous. It should start from ${r + 1}.`);
|
|
38
|
+
if (l === 0) throw Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);
|
|
39
|
+
for (c ??= s + (l ?? 1) - 1, l ??= c - s + 1, r = c, n.debug(`Packet block ${s} - ${r} with label ${u}`); i.length <= o + 1 && t.getPacket().length < v;) {
|
|
40
|
+
let [e, n] = b({
|
|
41
|
+
start: s,
|
|
42
|
+
end: c,
|
|
43
|
+
bits: l,
|
|
44
|
+
label: u
|
|
45
|
+
}, a, o);
|
|
46
|
+
if (i.push(e), e.end + 1 === a * o && (t.pushWord(i), i = [], a++), !n) break;
|
|
47
|
+
({start: s, end: c, bits: l, label: u} = n);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
t.pushWord(i);
|
|
51
|
+
}, "populate"), b = /* @__PURE__ */ t((e, t, n) => {
|
|
52
|
+
if (e.start === void 0) throw Error("start should have been set during first phase");
|
|
53
|
+
if (e.end === void 0) throw Error("end should have been set during first phase");
|
|
54
|
+
if (e.start > e.end) throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);
|
|
55
|
+
if (e.end + 1 <= t * n) return [e, void 0];
|
|
56
|
+
let r = t * n - 1, i = t * n;
|
|
57
|
+
return [{
|
|
58
|
+
start: e.start,
|
|
59
|
+
end: r,
|
|
60
|
+
label: e.label,
|
|
61
|
+
bits: r - e.start
|
|
62
|
+
}, {
|
|
63
|
+
start: i,
|
|
64
|
+
end: e.end,
|
|
65
|
+
label: e.label,
|
|
66
|
+
bits: e.end - i
|
|
67
|
+
}];
|
|
68
|
+
}, "getNextFittingBlock"), x = {
|
|
69
|
+
parser: { yy: void 0 },
|
|
70
|
+
parse: /* @__PURE__ */ t(async (t) => {
|
|
71
|
+
let r = await e("packet", t), i = x.parser?.yy;
|
|
72
|
+
if (!(i 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.");
|
|
73
|
+
n.debug(r), y(r, i);
|
|
74
|
+
}, "parse")
|
|
75
|
+
}, S = /* @__PURE__ */ t((e, t, n, r) => {
|
|
76
|
+
let i = r.db, a = i.getConfig(), { rowHeight: o, paddingY: s, bitWidth: l, bitsPerRow: u } = a, d = i.getPacket(), f = i.getDiagramTitle(), p = o + s, h = p * (d.length + 1) - (f ? 0 : o), g = l * u + 2, _ = m(t);
|
|
77
|
+
_.attr("viewBox", `0 0 ${g} ${h}`), c(_, h, g, a.useMaxWidth);
|
|
78
|
+
for (let [e, t] of d.entries()) C(_, t, e, a);
|
|
79
|
+
_.append("text").text(f).attr("x", g / 2).attr("y", h - p / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
|
|
80
|
+
}, "draw"), C = /* @__PURE__ */ t((e, t, n, { rowHeight: r, paddingX: i, paddingY: a, bitWidth: o, bitsPerRow: s, showBits: c }) => {
|
|
81
|
+
let l = e.append("g"), u = n * (r + a) + a;
|
|
82
|
+
for (let e of t) {
|
|
83
|
+
let t = e.start % s * o + 1, n = (e.end - e.start + 1) * o - i;
|
|
84
|
+
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;
|
|
85
|
+
let a = e.end === e.start, d = u - 2;
|
|
86
|
+
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);
|
|
87
|
+
}
|
|
88
|
+
}, "drawWord"), w = { draw: S }, T = {
|
|
89
|
+
byteFontSize: "10px",
|
|
90
|
+
startByteColor: "black",
|
|
91
|
+
endByteColor: "black",
|
|
92
|
+
labelColor: "black",
|
|
93
|
+
labelFontSize: "12px",
|
|
94
|
+
titleColor: "black",
|
|
95
|
+
titleFontSize: "14px",
|
|
96
|
+
blockStrokeColor: "black",
|
|
97
|
+
blockStrokeWidth: "1",
|
|
98
|
+
blockFillColor: "#efefef"
|
|
99
|
+
}, E = {
|
|
100
|
+
parser: x,
|
|
101
|
+
get db() {
|
|
102
|
+
return new _();
|
|
103
|
+
},
|
|
104
|
+
renderer: w,
|
|
105
|
+
styles: /* @__PURE__ */ t(({ packet: e } = {}) => {
|
|
106
|
+
let t = p(T, e);
|
|
107
|
+
return `
|
|
108
|
+
.packetByte {
|
|
109
|
+
font-size: ${t.byteFontSize};
|
|
110
|
+
}
|
|
111
|
+
.packetByte.start {
|
|
112
|
+
fill: ${t.startByteColor};
|
|
113
|
+
}
|
|
114
|
+
.packetByte.end {
|
|
115
|
+
fill: ${t.endByteColor};
|
|
116
|
+
}
|
|
117
|
+
.packetLabel {
|
|
118
|
+
fill: ${t.labelColor};
|
|
119
|
+
font-size: ${t.labelFontSize};
|
|
120
|
+
}
|
|
121
|
+
.packetTitle {
|
|
122
|
+
fill: ${t.titleColor};
|
|
123
|
+
font-size: ${t.titleFontSize};
|
|
124
|
+
}
|
|
125
|
+
.packetBlock {
|
|
126
|
+
stroke: ${t.blockStrokeColor};
|
|
127
|
+
stroke-width: ${t.blockStrokeWidth};
|
|
128
|
+
fill: ${t.blockFillColor};
|
|
129
|
+
}
|
|
130
|
+
`;
|
|
131
|
+
}, "styles")
|
|
132
|
+
};
|
|
133
|
+
//#endregion
|
|
134
|
+
export { E as diagram };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const e=require("./mermaid-parser.core-Cgsz0CdK.cjs"),t=require("./chunk-Y2CYZVJY-CnmLqFtv.cjs"),n=require("./src-CR--T_NF.cjs"),r=require("./chunk-WYO6CB5R-BTvDzbWd.cjs"),i=require("./chunk-ICXQ74PX-BmEfYj-r.cjs"),a=require("./chunk-VAUOI2AC-CBXi4Di2.cjs"),o=require("./chunk-JWPE2WC7-Cs1kjq8S.cjs");var s=r.f.packet,c=class{constructor(){this.packet=[],this.setAccTitle=r.U,this.getAccTitle=r.y,this.setDiagramTitle=r.K,this.getDiagramTitle=r.w,this.getAccDescription=r.v,this.setAccDescription=r.H}static{t.n(this,`PacketDB`)}getConfig(){let e=i.i({...s,...r.b().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){r.a(),this.packet=[]}},l=1e4,u=t.n((e,t)=>{o.t(e,t);let r=-1,i=[],a=1,{bitsPerRow:s}=t.getConfig();for(let{start:o,end:c,bits:u,label:f}of e.blocks){if(o!==void 0&&c!==void 0&&c<o)throw Error(`Packet block ${o} - ${c} is invalid. End must be greater than start.`);if(o??=r+1,o!==r+1)throw Error(`Packet block ${o} - ${c??o} is not contiguous. It should start from ${r+1}.`);if(u===0)throw Error(`Packet block ${o} is invalid. Cannot have a zero bit field.`);for(c??=o+(u??1)-1,u??=c-o+1,r=c,n.m.debug(`Packet block ${o} - ${r} with label ${f}`);i.length<=s+1&&t.getPacket().length<l;){let[e,n]=d({start:o,end:c,bits:u,label:f},a,s);if(i.push(e),e.end+1===a*s&&(t.pushWord(i),i=[],a++),!n)break;({start:o,end:c,bits:u,label:f}=n)}}t.pushWord(i)},`populate`),d=t.n((e,t,n)=>{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),f={parser:{yy:void 0},parse:t.n(async t=>{let r=await e.n(`packet`,t),i=f.parser?.yy;if(!(i instanceof c))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.`);n.m.debug(r),u(r,i)},`parse`)},p=t.n((e,t,n,i)=>{let o=i.db,s=o.getConfig(),{rowHeight:c,paddingY:l,bitWidth:u,bitsPerRow:d}=s,f=o.getPacket(),p=o.getDiagramTitle(),h=c+l,g=h*(f.length+1)-(p?0:c),_=u*d+2,v=a.t(t);v.attr(`viewBox`,`0 0 ${_} ${g}`),r.c(v,g,_,s.useMaxWidth);for(let[e,t]of f.entries())m(v,t,e,s);v.append(`text`).text(p).attr(`x`,_/2).attr(`y`,g-h/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),m=t.n((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;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;let a=e.end===e.start,d=u-2;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)}},`drawWord`),h={draw:p},g={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},_={parser:f,get db(){return new c},renderer:h,styles:t.n(({packet:e}={})=>{let t=i.i(g,e);return`
|
|
2
|
+
.packetByte {
|
|
3
|
+
font-size: ${t.byteFontSize};
|
|
4
|
+
}
|
|
5
|
+
.packetByte.start {
|
|
6
|
+
fill: ${t.startByteColor};
|
|
7
|
+
}
|
|
8
|
+
.packetByte.end {
|
|
9
|
+
fill: ${t.endByteColor};
|
|
10
|
+
}
|
|
11
|
+
.packetLabel {
|
|
12
|
+
fill: ${t.labelColor};
|
|
13
|
+
font-size: ${t.labelFontSize};
|
|
14
|
+
}
|
|
15
|
+
.packetTitle {
|
|
16
|
+
fill: ${t.titleColor};
|
|
17
|
+
font-size: ${t.titleFontSize};
|
|
18
|
+
}
|
|
19
|
+
.packetBlock {
|
|
20
|
+
stroke: ${t.blockStrokeColor};
|
|
21
|
+
stroke-width: ${t.blockStrokeWidth};
|
|
22
|
+
fill: ${t.blockFillColor};
|
|
23
|
+
}
|
|
24
|
+
`},`styles`)};exports.diagram=_;
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { n as e } from "./mermaid-parser.core-B8DQcCaz.js";
|
|
2
|
+
import { n as t } from "./chunk-Y2CYZVJY-CwsV_8W4.js";
|
|
3
|
+
import { m as n } from "./src-DJ4x3y2O.js";
|
|
4
|
+
import { H as r, K as i, U as a, a as o, b as s, c, f as l, v as u, w as d, y as f, z as p } from "./chunk-WYO6CB5R-Y9HJHB3Q.js";
|
|
5
|
+
import { i as m } from "./chunk-ICXQ74PX-CC59NQmW.js";
|
|
6
|
+
import { t as h } from "./chunk-VAUOI2AC-05FwamOA.js";
|
|
7
|
+
import { t as g } from "./chunk-JWPE2WC7-B_J6qwQL.js";
|
|
8
|
+
import { r as _, t as v } from "./chunk-HOUHSVGY-CtRCnz1G.js";
|
|
9
|
+
import { t as y } from "./chunk-2Q5K7J3B-DqJF2oYF.js";
|
|
10
|
+
//#region ../node_modules/mermaid/dist/chunks/mermaid.core/diagram-OA4YK3LP.mjs
|
|
11
|
+
var b = /[─━│┃└┗├┣]/, x = /[└┗├┣]/, S = /[─━]/, C = /^[\s│┃]+$/, w = /^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/, T = /^\s*%%/, E = " ";
|
|
12
|
+
function D(e) {
|
|
13
|
+
return e.some((e) => b.test(e));
|
|
14
|
+
}
|
|
15
|
+
t(D, "isBoxDrawingFormat");
|
|
16
|
+
function O(e) {
|
|
17
|
+
for (let t of e) {
|
|
18
|
+
let e = x.exec(t);
|
|
19
|
+
if (e?.index && e.index > 0) return e.index;
|
|
20
|
+
}
|
|
21
|
+
return 4;
|
|
22
|
+
}
|
|
23
|
+
t(O, "inferSegmentWidth");
|
|
24
|
+
function k(e, t) {
|
|
25
|
+
return e.replace(/\bline\s+(\d+)\b/gi, (e, n) => {
|
|
26
|
+
let r = parseInt(n, 10), i = t.get(r);
|
|
27
|
+
return i ? `line ${i}` : e;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
t(k, "remapErrorLines");
|
|
31
|
+
function A(e) {
|
|
32
|
+
let t = e.split("\n"), n = /* @__PURE__ */ new Map(), r = -1;
|
|
33
|
+
for (let [e, n] of t.entries()) if (n.trim() === "treeView-beta") {
|
|
34
|
+
r = e;
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
if (r === -1) return {
|
|
38
|
+
text: e,
|
|
39
|
+
lineMap: n
|
|
40
|
+
};
|
|
41
|
+
let i = [];
|
|
42
|
+
for (let e = r + 1; e < t.length; e++) {
|
|
43
|
+
let n = t[e];
|
|
44
|
+
n.trim() === "" || T.test(n) || w.test(n) || C.test(n) || i.push(n.replace(/\t/g, " "));
|
|
45
|
+
}
|
|
46
|
+
if (!D(i)) return {
|
|
47
|
+
text: e,
|
|
48
|
+
lineMap: n
|
|
49
|
+
};
|
|
50
|
+
let a = O(i), o = [], s = 0;
|
|
51
|
+
for (let e = 0; e <= r; e++) o.push(t[e]), s++, n.set(s, e + 1);
|
|
52
|
+
for (let e = r + 1; e < t.length; e++) {
|
|
53
|
+
let r = t[e], i = r.trim(), c = e + 1;
|
|
54
|
+
if (i === "") {
|
|
55
|
+
o.push(r), s++, n.set(s, c);
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
if (T.test(r)) {
|
|
59
|
+
o.push(r), s++, n.set(s, c);
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
if (w.test(r)) {
|
|
63
|
+
o.push(r), s++, n.set(s, c);
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (C.test(r)) continue;
|
|
67
|
+
let l = r.replace(/\t/g, " "), u = x.exec(l);
|
|
68
|
+
if (u?.index !== void 0) {
|
|
69
|
+
let e = u.index, t = Math.round(e / a) + 1, r = e + 1;
|
|
70
|
+
for (; r < l.length && S.test(l[r]);) r++;
|
|
71
|
+
for (; r < l.length && l[r] === " ";) r++;
|
|
72
|
+
let i = l.slice(r).trimEnd();
|
|
73
|
+
if (!i) throw Error(`Line ${c}: Empty node \u2014 expected a filename or directory name after the box-drawing prefix`);
|
|
74
|
+
let d = E.repeat(t);
|
|
75
|
+
o.push(d + i), s++, n.set(s, c);
|
|
76
|
+
} else if (/^[\s─━│┃└┗├┣]+$/.test(l)) continue;
|
|
77
|
+
else if (b.test(l)) o.push(r), s++, n.set(s, c);
|
|
78
|
+
else if (/^\s+/.test(l)) throw Error(`Line ${c}: Unexpected indentation without box-drawing characters. In box-drawing format, use \u251C\u2500\u2500 or \u2514\u2500\u2500 prefixes for indented nodes.`);
|
|
79
|
+
else o.push(r), s++, n.set(s, c);
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
text: o.join("\n"),
|
|
83
|
+
lineMap: n
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
t(A, "preprocessBoxDrawing");
|
|
87
|
+
var j = new y(() => ({
|
|
88
|
+
cnt: 1,
|
|
89
|
+
stack: [{
|
|
90
|
+
id: 0,
|
|
91
|
+
level: -1,
|
|
92
|
+
name: "/",
|
|
93
|
+
nodeType: "directory",
|
|
94
|
+
children: []
|
|
95
|
+
}]
|
|
96
|
+
})), M = /* @__PURE__ */ t(() => {
|
|
97
|
+
j.reset(), o();
|
|
98
|
+
}, "clear"), N = /* @__PURE__ */ t(() => j.records.stack[0], "getRoot"), P = /* @__PURE__ */ t(() => j.records.cnt, "getCount"), F = l.treeView, I = {
|
|
99
|
+
clear: M,
|
|
100
|
+
addNode: /* @__PURE__ */ t((e, t, n, r, i, a) => {
|
|
101
|
+
for (; e <= j.records.stack[j.records.stack.length - 1].level;) j.records.stack.pop();
|
|
102
|
+
let o = {
|
|
103
|
+
id: j.records.cnt++,
|
|
104
|
+
level: e,
|
|
105
|
+
name: t,
|
|
106
|
+
nodeType: n,
|
|
107
|
+
icon: i,
|
|
108
|
+
cssClass: r,
|
|
109
|
+
description: a,
|
|
110
|
+
children: []
|
|
111
|
+
};
|
|
112
|
+
j.records.stack[j.records.stack.length - 1].children.push(o), j.records.stack.push(o);
|
|
113
|
+
}, "addNode"),
|
|
114
|
+
getRoot: N,
|
|
115
|
+
getCount: P,
|
|
116
|
+
getConfig: /* @__PURE__ */ t(() => m(F, s().treeView), "getConfig"),
|
|
117
|
+
getAccTitle: f,
|
|
118
|
+
getAccDescription: u,
|
|
119
|
+
getDiagramTitle: d,
|
|
120
|
+
setAccDescription: r,
|
|
121
|
+
setAccTitle: a,
|
|
122
|
+
setDiagramTitle: i
|
|
123
|
+
}, L = /* @__PURE__ */ t((e) => {
|
|
124
|
+
g(e, I);
|
|
125
|
+
for (let t of e.nodes) {
|
|
126
|
+
let e = typeof t.indent == "number" ? t.indent : 0, n = t.name, r = n.endsWith("/");
|
|
127
|
+
r && (n = n.slice(0, -1));
|
|
128
|
+
let i = r ? "directory" : "file", a = t.classAnnotation || void 0, o = t.iconAnnotation, c = o === void 0 ? void 0 : o || "none", l = t.descAnnotation || void 0, u = l ? p(l, s()) : void 0;
|
|
129
|
+
I.addNode(e, n, i, a, c, u);
|
|
130
|
+
}
|
|
131
|
+
}, "populate"), R = { parse: /* @__PURE__ */ t(async (t) => {
|
|
132
|
+
let { text: r, lineMap: i } = A(t);
|
|
133
|
+
try {
|
|
134
|
+
let t = await e("treeView", r);
|
|
135
|
+
n.debug(t), L(t);
|
|
136
|
+
} catch (e) {
|
|
137
|
+
throw i.size > 0 && e instanceof Error && (e.message = k(e.message, i)), e;
|
|
138
|
+
}
|
|
139
|
+
}, "parse") }, z = {
|
|
140
|
+
prefix: "mermaid-treeview",
|
|
141
|
+
height: 24,
|
|
142
|
+
width: 24,
|
|
143
|
+
icons: {
|
|
144
|
+
folder: { body: "<path fill=\"currentColor\" d=\"M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z\"/>" },
|
|
145
|
+
file: { body: "<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z\" clip-rule=\"evenodd\"/>" }
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
function B(e, t) {
|
|
149
|
+
let n = t?.filenameIcons?.[e];
|
|
150
|
+
if (n) return n;
|
|
151
|
+
let r = e.lastIndexOf(".");
|
|
152
|
+
if (r > 0) {
|
|
153
|
+
let n = e.substring(r).toLowerCase(), i = t?.extensionIcons;
|
|
154
|
+
return i?.[n] ?? i?.[n.slice(1)];
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
t(B, "detectIcon");
|
|
158
|
+
function V(e, t) {
|
|
159
|
+
return e.includes(":") ? e : e in z.icons || !t ? `${z.prefix}:${e}` : `${t}:${e}`;
|
|
160
|
+
}
|
|
161
|
+
t(V, "qualifyIcon");
|
|
162
|
+
function H(e, t) {
|
|
163
|
+
if (e.icon !== "none") {
|
|
164
|
+
if (e.icon) return V(e.icon, t.defaultIconPack);
|
|
165
|
+
if (t.showIcons) {
|
|
166
|
+
if (e.nodeType === "file") {
|
|
167
|
+
let n = B(e.name, t);
|
|
168
|
+
if (n === "none") return;
|
|
169
|
+
if (n) return V(n, t.defaultIconPack);
|
|
170
|
+
}
|
|
171
|
+
return `${z.prefix}:${e.nodeType === "directory" ? "folder" : "file"}`;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
t(H, "getNodeIcon"), _([{
|
|
176
|
+
name: z.prefix,
|
|
177
|
+
icons: z
|
|
178
|
+
}]);
|
|
179
|
+
var U = 14, W = 4, G = 16, K = /* @__PURE__ */ t((e, t) => `tv-icon-${e}-${t.replace(/[^\w-]/g, "-")}`, "iconSymbolId"), q = /* @__PURE__ */ t(async (e, n, r, i) => {
|
|
180
|
+
let a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ t((e) => {
|
|
181
|
+
let t = H(e, r);
|
|
182
|
+
t && a.add(t), e.children.forEach(o);
|
|
183
|
+
}, "collect");
|
|
184
|
+
if (o(n), a.size === 0) return;
|
|
185
|
+
let s = await Promise.all([...a].map(async (e) => ({
|
|
186
|
+
icon: e,
|
|
187
|
+
svg: await v(e, {
|
|
188
|
+
height: U,
|
|
189
|
+
width: U
|
|
190
|
+
})
|
|
191
|
+
}))), c = e.append("defs");
|
|
192
|
+
for (let { icon: e, svg: t } of s) c.append("g").attr("id", K(i, e)).html(t);
|
|
193
|
+
}, "injectIconDefs"), J = /* @__PURE__ */ t((e, t, n, r, i, a) => {
|
|
194
|
+
let o = r.append("g"), s = "treeView-node-label";
|
|
195
|
+
n.nodeType === "directory" && (s += " treeView-node-dir"), n.cssClass && (s += ` ${n.cssClass}`);
|
|
196
|
+
let c = U + W, l = H(n, i), u = l !== void 0;
|
|
197
|
+
l && o.append("use").attr("xlink:href", `#${K(a, l)}`).attr("x", e + i.paddingX).attr("y", t + i.paddingY).attr("class", "treeView-node-icon");
|
|
198
|
+
let d = o.append("text").text(n.name).attr("dominant-baseline", "middle").attr("class", s), { height: f, width: p } = d.node().getBBox(), m = f + i.paddingY * 2, h = e + i.paddingX + (u ? c : 0);
|
|
199
|
+
d.attr("x", h), d.attr("y", t + m / 2);
|
|
200
|
+
let g = h + p;
|
|
201
|
+
return n.BBox = {
|
|
202
|
+
x: e,
|
|
203
|
+
y: t,
|
|
204
|
+
width: p + i.paddingX * 2 + (u ? c : 0),
|
|
205
|
+
height: m
|
|
206
|
+
}, n.cssClass?.split(/\s+/).includes("highlight") && o.insert("rect", ":first-child").attr("x", e).attr("y", t + 1).attr("width", 0).attr("height", m - 2).attr("rx", 3).attr("class", "treeView-highlight-bg"), {
|
|
207
|
+
node: n,
|
|
208
|
+
nodeGroup: o,
|
|
209
|
+
labelRightEdge: g,
|
|
210
|
+
centerY: t + m / 2
|
|
211
|
+
};
|
|
212
|
+
}, "positionLabel"), Y = /* @__PURE__ */ t((e, t, n, r, i, a) => e.append("line").attr("x1", t).attr("y1", n).attr("x2", r).attr("y2", i).attr("stroke-width", a).attr("class", "treeView-node-line"), "positionLine"), X = /* @__PURE__ */ t((e, n, r, i) => {
|
|
213
|
+
let a = 0, o = 0, s = [], c = /* @__PURE__ */ t((e, t, n, r) => {
|
|
214
|
+
let c = r * (n.rowIndent + n.paddingX), l = J(c, a, t, e, n, i);
|
|
215
|
+
s.push(l);
|
|
216
|
+
let { height: u, width: d } = t.BBox;
|
|
217
|
+
Y(e, c - n.rowIndent, a + u / 2, c, a + u / 2, n.lineThickness), o = Math.max(o, c + d), a += u;
|
|
218
|
+
}, "drawNode"), l = /* @__PURE__ */ t((t, n = 0) => {
|
|
219
|
+
c(e, t, r, n), t.children.forEach((e) => {
|
|
220
|
+
l(e, n + 1);
|
|
221
|
+
});
|
|
222
|
+
let { x: i, y: a, height: o } = t.BBox;
|
|
223
|
+
if (t.children.length) {
|
|
224
|
+
let { y: n, height: s } = t.children[t.children.length - 1].BBox;
|
|
225
|
+
Y(e, i + r.paddingX, a + o, i + r.paddingX, n + s / 2 + r.lineThickness / 2, r.lineThickness);
|
|
226
|
+
}
|
|
227
|
+
}, "processNode");
|
|
228
|
+
l(n);
|
|
229
|
+
let u = s.filter((e) => e.node.description);
|
|
230
|
+
if (u.length > 0) {
|
|
231
|
+
let e = Math.max(...s.map((e) => e.labelRightEdge)) + G;
|
|
232
|
+
for (let t of u) {
|
|
233
|
+
let n = t.nodeGroup.append("text").text(t.node.description).attr("dominant-baseline", "middle").attr("class", "treeView-node-description").attr("x", e).attr("y", t.centerY).node().getBBox();
|
|
234
|
+
o = Math.max(o, e + n.width + r.paddingX);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
for (let e of s) if (e.node.cssClass?.split(/\s+/).includes("highlight")) {
|
|
238
|
+
let t = e.nodeGroup.select(".treeView-highlight-bg");
|
|
239
|
+
if (!t.empty()) {
|
|
240
|
+
let n = o - e.node.BBox.x + 8;
|
|
241
|
+
t.attr("width", n), o = Math.max(o, e.node.BBox.x + n + 2);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return {
|
|
245
|
+
totalHeight: a,
|
|
246
|
+
totalWidth: o
|
|
247
|
+
};
|
|
248
|
+
}, "drawTree"), Z = { draw: /* @__PURE__ */ t(async (e, t, r, i) => {
|
|
249
|
+
n.debug("Rendering treeView diagram\n" + e);
|
|
250
|
+
let a = i.db, o = a.getRoot(), s = a.getConfig(), l = h(t);
|
|
251
|
+
await q(l, o, s, t);
|
|
252
|
+
let u = l.append("g");
|
|
253
|
+
u.attr("class", "tree-view");
|
|
254
|
+
let { totalHeight: d, totalWidth: f } = X(u, o, s, t);
|
|
255
|
+
l.attr("viewBox", `-${s.lineThickness / 2} 0 ${f} ${d}`), c(l, d, f, s.useMaxWidth);
|
|
256
|
+
}, "draw") }, Q = {
|
|
257
|
+
labelFontSize: "16px",
|
|
258
|
+
labelColor: "black",
|
|
259
|
+
lineColor: "black",
|
|
260
|
+
iconColor: "#546e7a",
|
|
261
|
+
descriptionColor: "#6a9955",
|
|
262
|
+
highlightBg: "rgba(255, 193, 7, 0.15)",
|
|
263
|
+
highlightStroke: "#ffc107"
|
|
264
|
+
}, $ = {
|
|
265
|
+
db: I,
|
|
266
|
+
renderer: Z,
|
|
267
|
+
parser: R,
|
|
268
|
+
styles: /* @__PURE__ */ t(({ treeView: e }) => {
|
|
269
|
+
let { labelFontSize: t, labelColor: n, lineColor: r, iconColor: i, descriptionColor: a, highlightBg: o, highlightStroke: s } = m(Q, e);
|
|
270
|
+
return `
|
|
271
|
+
.treeView-node-label {
|
|
272
|
+
font-size: ${t};
|
|
273
|
+
fill: ${n};
|
|
274
|
+
white-space: pre;
|
|
275
|
+
}
|
|
276
|
+
.treeView-node-dir {
|
|
277
|
+
font-weight: bold;
|
|
278
|
+
}
|
|
279
|
+
.treeView-node-line {
|
|
280
|
+
stroke: ${r};
|
|
281
|
+
}
|
|
282
|
+
.treeView-node-icon {
|
|
283
|
+
color: ${i};
|
|
284
|
+
}
|
|
285
|
+
.treeView-node-description {
|
|
286
|
+
font-size: ${t};
|
|
287
|
+
fill: ${a};
|
|
288
|
+
font-style: italic;
|
|
289
|
+
white-space: pre;
|
|
290
|
+
}
|
|
291
|
+
.treeView-highlight-bg {
|
|
292
|
+
fill: ${o};
|
|
293
|
+
stroke: ${s};
|
|
294
|
+
stroke-width: 1;
|
|
295
|
+
}
|
|
296
|
+
`;
|
|
297
|
+
}, "styles")
|
|
298
|
+
};
|
|
299
|
+
//#endregion
|
|
300
|
+
export { $ as diagram };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const e=require("./mermaid-parser.core-Cgsz0CdK.cjs"),t=require("./chunk-Y2CYZVJY-CnmLqFtv.cjs"),n=require("./src-CR--T_NF.cjs"),r=require("./chunk-WYO6CB5R-BTvDzbWd.cjs"),i=require("./chunk-ICXQ74PX-BmEfYj-r.cjs"),a=require("./chunk-VAUOI2AC-CBXi4Di2.cjs"),o=require("./chunk-JWPE2WC7-Cs1kjq8S.cjs"),s=require("./chunk-HOUHSVGY-CgfXy94u.cjs"),c=require("./chunk-2Q5K7J3B-B8v9mTdK.cjs");var l=/[─━│┃└┗├┣]/,u=/[└┗├┣]/,d=/[─━]/,f=/^[\s│┃]+$/,p=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,m=/^\s*%%/,h=` `;function g(e){return e.some(e=>l.test(e))}t.n(g,`isBoxDrawingFormat`);function _(e){for(let t of e){let e=u.exec(t);if(e?.index&&e.index>0)return e.index}return 4}t.n(_,`inferSegmentWidth`);function v(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}t.n(v,`remapErrorLines`);function y(e){let t=e.split(`
|
|
2
|
+
`),n=new Map,r=-1;for(let[e,n]of t.entries())if(n.trim()===`treeView-beta`){r=e;break}if(r===-1)return{text:e,lineMap:n};let i=[];for(let e=r+1;e<t.length;e++){let n=t[e];n.trim()===``||m.test(n)||p.test(n)||f.test(n)||i.push(n.replace(/\t/g,` `))}if(!g(i))return{text:e,lineMap:n};let a=_(i),o=[],s=0;for(let e=0;e<=r;e++)o.push(t[e]),s++,n.set(s,e+1);for(let e=r+1;e<t.length;e++){let r=t[e],i=r.trim(),c=e+1;if(i===``){o.push(r),s++,n.set(s,c);continue}if(m.test(r)){o.push(r),s++,n.set(s,c);continue}if(p.test(r)){o.push(r),s++,n.set(s,c);continue}if(f.test(r))continue;let g=r.replace(/\t/g,` `),_=u.exec(g);if(_?.index!==void 0){let e=_.index,t=Math.round(e/a)+1,r=e+1;for(;r<g.length&&d.test(g[r]);)r++;for(;r<g.length&&g[r]===` `;)r++;let i=g.slice(r).trimEnd();if(!i)throw Error(`Line ${c}: Empty node \u2014 expected a filename or directory name after the box-drawing prefix`);let l=h.repeat(t);o.push(l+i),s++,n.set(s,c)}else if(/^[\s─━│┃└┗├┣]+$/.test(g))continue;else if(l.test(g))o.push(r),s++,n.set(s,c);else if(/^\s+/.test(g))throw Error(`Line ${c}: Unexpected indentation without box-drawing characters. In box-drawing format, use \u251C\u2500\u2500 or \u2514\u2500\u2500 prefixes for indented nodes.`);else o.push(r),s++,n.set(s,c)}return{text:o.join(`
|
|
3
|
+
`),lineMap:n}}t.n(y,`preprocessBoxDrawing`);var b=new c.t(()=>({cnt:1,stack:[{id:0,level:-1,name:`/`,nodeType:`directory`,children:[]}]})),x=t.n(()=>{b.reset(),r.a()},`clear`),S=t.n(()=>b.records.stack[0],`getRoot`),C=t.n(()=>b.records.cnt,`getCount`),w=r.f.treeView,T={clear:x,addNode:t.n((e,t,n,r,i,a)=>{for(;e<=b.records.stack[b.records.stack.length-1].level;)b.records.stack.pop();let o={id:b.records.cnt++,level:e,name:t,nodeType:n,icon:i,cssClass:r,description:a,children:[]};b.records.stack[b.records.stack.length-1].children.push(o),b.records.stack.push(o)},`addNode`),getRoot:S,getCount:C,getConfig:t.n(()=>i.i(w,r.b().treeView),`getConfig`),getAccTitle:r.y,getAccDescription:r.v,getDiagramTitle:r.w,setAccDescription:r.H,setAccTitle:r.U,setDiagramTitle:r.K},E=t.n(e=>{o.t(e,T);for(let t of e.nodes){let e=typeof t.indent==`number`?t.indent:0,n=t.name,i=n.endsWith(`/`);i&&(n=n.slice(0,-1));let a=i?`directory`:`file`,o=t.classAnnotation||void 0,s=t.iconAnnotation,c=s===void 0?void 0:s||`none`,l=t.descAnnotation||void 0,u=l?r.z(l,r.b()):void 0;T.addNode(e,n,a,o,c,u)}},`populate`),D={parse:t.n(async t=>{let{text:r,lineMap:i}=y(t);try{let t=await e.n(`treeView`,r);n.m.debug(t),E(t)}catch(e){throw i.size>0&&e instanceof Error&&(e.message=v(e.message,i)),e}},`parse`)},O={prefix:`mermaid-treeview`,height:24,width:24,icons:{folder:{body:`<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>`},file:{body:`<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>`}}};function k(e,t){let n=t?.filenameIcons?.[e];if(n)return n;let r=e.lastIndexOf(`.`);if(r>0){let n=e.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[n]??i?.[n.slice(1)]}}t.n(k,`detectIcon`);function A(e,t){return e.includes(`:`)?e:e in O.icons||!t?`${O.prefix}:${e}`:`${t}:${e}`}t.n(A,`qualifyIcon`);function j(e,t){if(e.icon!==`none`){if(e.icon)return A(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType===`file`){let n=k(e.name,t);if(n===`none`)return;if(n)return A(n,t.defaultIconPack)}return`${O.prefix}:${e.nodeType===`directory`?`folder`:`file`}`}}}t.n(j,`getNodeIcon`),s.r([{name:O.prefix,icons:O}]);var M=14,N=4,P=16,F=t.n((e,t)=>`tv-icon-${e}-${t.replace(/[^\w-]/g,`-`)}`,`iconSymbolId`),I=t.n(async(e,n,r,i)=>{let a=new Set,o=t.n(e=>{let t=j(e,r);t&&a.add(t),e.children.forEach(o)},`collect`);if(o(n),a.size===0)return;let c=await Promise.all([...a].map(async e=>({icon:e,svg:await s.t(e,{height:M,width:M})}))),l=e.append(`defs`);for(let{icon:e,svg:t}of c)l.append(`g`).attr(`id`,F(i,e)).html(t)},`injectIconDefs`),L=t.n((e,t,n,r,i,a)=>{let o=r.append(`g`),s=`treeView-node-label`;n.nodeType===`directory`&&(s+=` treeView-node-dir`),n.cssClass&&(s+=` ${n.cssClass}`);let c=M+N,l=j(n,i),u=l!==void 0;l&&o.append(`use`).attr(`xlink:href`,`#${F(a,l)}`).attr(`x`,e+i.paddingX).attr(`y`,t+i.paddingY).attr(`class`,`treeView-node-icon`);let d=o.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,s),{height:f,width:p}=d.node().getBBox(),m=f+i.paddingY*2,h=e+i.paddingX+(u?c:0);d.attr(`x`,h),d.attr(`y`,t+m/2);let g=h+p;return n.BBox={x:e,y:t,width:p+i.paddingX*2+(u?c:0),height:m},n.cssClass?.split(/\s+/).includes(`highlight`)&&o.insert(`rect`,`:first-child`).attr(`x`,e).attr(`y`,t+1).attr(`width`,0).attr(`height`,m-2).attr(`rx`,3).attr(`class`,`treeView-highlight-bg`),{node:n,nodeGroup:o,labelRightEdge:g,centerY:t+m/2}},`positionLabel`),R=t.n((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),z=t.n((e,n,r,i)=>{let a=0,o=0,s=[],c=t.n((e,t,n,r)=>{let c=r*(n.rowIndent+n.paddingX),l=L(c,a,t,e,n,i);s.push(l);let{height:u,width:d}=t.BBox;R(e,c-n.rowIndent,a+u/2,c,a+u/2,n.lineThickness),o=Math.max(o,c+d),a+=u},`drawNode`),l=t.n((t,n=0)=>{c(e,t,r,n),t.children.forEach(e=>{l(e,n+1)});let{x:i,y:a,height:o}=t.BBox;if(t.children.length){let{y:n,height:s}=t.children[t.children.length-1].BBox;R(e,i+r.paddingX,a+o,i+r.paddingX,n+s/2+r.lineThickness/2,r.lineThickness)}},`processNode`);l(n);let u=s.filter(e=>e.node.description);if(u.length>0){let e=Math.max(...s.map(e=>e.labelRightEdge))+P;for(let t of u){let n=t.nodeGroup.append(`text`).text(t.node.description).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-description`).attr(`x`,e).attr(`y`,t.centerY).node().getBBox();o=Math.max(o,e+n.width+r.paddingX)}}for(let e of s)if(e.node.cssClass?.split(/\s+/).includes(`highlight`)){let t=e.nodeGroup.select(`.treeView-highlight-bg`);if(!t.empty()){let n=o-e.node.BBox.x+8;t.attr(`width`,n),o=Math.max(o,e.node.BBox.x+n+2)}}return{totalHeight:a,totalWidth:o}},`drawTree`),B={draw:t.n(async(e,t,i,o)=>{n.m.debug(`Rendering treeView diagram
|
|
4
|
+
`+e);let s=o.db,c=s.getRoot(),l=s.getConfig(),u=a.t(t);await I(u,c,l,t);let d=u.append(`g`);d.attr(`class`,`tree-view`);let{totalHeight:f,totalWidth:p}=z(d,c,l,t);u.attr(`viewBox`,`-${l.lineThickness/2} 0 ${p} ${f}`),r.c(u,f,p,l.useMaxWidth)},`draw`)},V={labelFontSize:`16px`,labelColor:`black`,lineColor:`black`,iconColor:`#546e7a`,descriptionColor:`#6a9955`,highlightBg:`rgba(255, 193, 7, 0.15)`,highlightStroke:`#ffc107`},H={db:T,renderer:B,parser:D,styles:t.n(({treeView:e})=>{let{labelFontSize:t,labelColor:n,lineColor:r,iconColor:a,descriptionColor:o,highlightBg:s,highlightStroke:c}=i.i(V,e);return`
|
|
5
|
+
.treeView-node-label {
|
|
6
|
+
font-size: ${t};
|
|
7
|
+
fill: ${n};
|
|
8
|
+
white-space: pre;
|
|
9
|
+
}
|
|
10
|
+
.treeView-node-dir {
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
}
|
|
13
|
+
.treeView-node-line {
|
|
14
|
+
stroke: ${r};
|
|
15
|
+
}
|
|
16
|
+
.treeView-node-icon {
|
|
17
|
+
color: ${a};
|
|
18
|
+
}
|
|
19
|
+
.treeView-node-description {
|
|
20
|
+
font-size: ${t};
|
|
21
|
+
fill: ${o};
|
|
22
|
+
font-style: italic;
|
|
23
|
+
white-space: pre;
|
|
24
|
+
}
|
|
25
|
+
.treeView-highlight-bg {
|
|
26
|
+
fill: ${s};
|
|
27
|
+
stroke: ${c};
|
|
28
|
+
stroke-width: 1;
|
|
29
|
+
}
|
|
30
|
+
`},`styles`)};exports.diagram=H;
|