@blueking/ai-blueking 2.0.0-dev.1 → 2.0.0-dev.3
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/vue2/_baseFor-DAbrc8SN.js +309 -0
- package/dist/vue2/arc-BqlAOiZb.js +78 -0
- package/dist/vue2/architecture-U656AL7Q-Dtuq8BzO.js +7 -0
- package/dist/vue2/architectureDiagram-VXUJARFQ-BQS5Ixrn.js +4052 -0
- package/dist/vue2/array-TB8zN_HT.js +5 -0
- package/dist/vue2/blockDiagram-VD42YOAC-Bp6L6c6e.js +3013 -0
- package/dist/vue2/c4Diagram-YG6GDRKO-B15ZDn3Z.js +2956 -0
- package/dist/vue2/channel-edTl5mpN.js +3 -0
- package/dist/vue2/chunk-4BX2VUAB-eAYYj1bL.js +6 -0
- package/dist/vue2/chunk-55IACEB6-CTzuTcHv.js +6 -0
- package/dist/vue2/chunk-76Q3JFCE-BrJX66ha.js +19 -0
- package/dist/vue2/chunk-ABZYJK2D-gsx40GnJ.js +1971 -0
- package/dist/vue2/chunk-ATLVNIR6-CTTwtx-5.js +65 -0
- package/dist/vue2/chunk-B4BG7PRW-D8o7VxRH.js +3108 -0
- package/dist/vue2/chunk-CVBHYZKI-Cs8lCw3u.js +10 -0
- package/dist/vue2/chunk-DI55MBZ5-Dl59YBtR.js +1994 -0
- package/dist/vue2/chunk-DNh5sLlG.js +18 -0
- package/dist/vue2/chunk-EXTU4WIE-BPc8ye_N.js +7 -0
- package/dist/vue2/chunk-FMBD7UC4-PFlLPz_s.js +3 -0
- package/dist/vue2/chunk-FPAJGGOC-DPvjUKQ8.js +13428 -0
- package/dist/vue2/chunk-FWNWRKHM-BlUTFsPK.js +56 -0
- package/dist/vue2/chunk-HN2XXSSU-DueSY85P.js +74 -0
- package/dist/vue2/chunk-JA3XYJ7Z-CRet4f6a.js +1845 -0
- package/dist/vue2/chunk-JZLCHNYA-Df0-MseJ.js +4861 -0
- package/dist/vue2/chunk-LBM3YZW2-B0-w2HZs.js +19 -0
- package/dist/vue2/chunk-LHMN2FUI-BOH3yE2u.js +19 -0
- package/dist/vue2/chunk-MI3HLSF2-6-T1J0MS.js +1140 -0
- package/dist/vue2/chunk-N4CR4FBY-jNnt5D3v.js +39 -0
- package/dist/vue2/chunk-O7ZBX7Z2-BEP34BEE.js +26 -0
- package/dist/vue2/chunk-QN33PNHL-DsC-XeM9.js +23 -0
- package/dist/vue2/chunk-QXUST7PY-DxFRymyS.js +486 -0
- package/dist/vue2/chunk-QZHKN3VN-D9B5jQvg.js +11 -0
- package/dist/vue2/chunk-S3R3BYOJ-Bs_r55Kk.js +1222 -0
- package/dist/vue2/chunk-S6J4BHB3-XXfWHJvh.js +19 -0
- package/dist/vue2/chunk-T53DSG4Q-CNvqP6Iy.js +24 -0
- package/dist/vue2/chunk-TZMSLE5B-C5ccYWGN.js +55 -0
- package/dist/vue2/chunk-XAJISQIX-XsDvU4jW.js +135 -0
- package/dist/vue2/classDiagram-2ON5EDUG-Cgf9yVXj.js +33 -0
- package/dist/vue2/classDiagram-v2-WZHVMYZB-BtF1_0UK.js +33 -0
- package/dist/vue2/clone-Bbr3WSpg.js +7 -0
- package/dist/vue2/cose-bilkent-S5V4N54A-Cmf6WLkk.js +2250 -0
- package/dist/vue2/cytoscape.esm-nrcriBSO.js +18100 -0
- package/dist/vue2/dagre-6UL2VRFP-CTl_U96l.js +298 -0
- package/dist/vue2/dagre-DUjlMe_B.js +1496 -0
- package/dist/vue2/defaultLocale-BLATqOV5.js +177 -0
- package/dist/vue2/diagram-PSM6KHXK-Bl7brR-1.js +497 -0
- package/dist/vue2/diagram-QEK2KX5R-CAeywSxy.js +226 -0
- package/dist/vue2/diagram-S2PKOQOG-6I6J4WRC.js +144 -0
- package/dist/vue2/dist-xWJvauxf.js +49 -0
- package/dist/vue2/erDiagram-Q2GNP2WA-C8EbfuTj.js +1603 -0
- package/dist/vue2/flatten-CfPhNHUL.js +34 -0
- package/dist/vue2/flowDiagram-NV44I4VS-lFr4G2WN.js +4132 -0
- package/dist/vue2/ganttDiagram-JELNMOA3-Bvtip7yn.js +3010 -0
- package/dist/vue2/gitGraph-F6HP7TQM-OQvD95bN.js +7 -0
- package/dist/vue2/gitGraphDiagram-NY62KEGX-Cjvy4fHM.js +634 -0
- package/dist/vue2/graphlib-KDKEjVHX.js +344 -0
- package/dist/vue2/index.es.min.js +26703 -786
- package/dist/vue2/index.umd.min.js +2796 -9
- package/dist/vue2/info-NVLQJR56-DBsOnIKy.js +7 -0
- package/dist/vue2/infoDiagram-WHAUD3N6-D_isj7oC.js +31 -0
- package/dist/vue2/init-hAkIK9Bd.js +13 -0
- package/dist/vue2/isEmpty-z27q3o-D.js +32 -0
- package/dist/vue2/journeyDiagram-XKPGCS4Q-DlXHMS3v.js +885 -0
- package/dist/vue2/kanban-definition-3W4ZIXB7-CV6572lv.js +971 -0
- package/dist/vue2/katex-CEAw-xiA.js +22097 -0
- package/dist/vue2/katex-D8o5-F7C.js +2 -0
- package/dist/vue2/line-wvheYP7S.js +30 -0
- package/dist/vue2/linear-STTevhnH.js +250 -0
- package/dist/vue2/math-DF_v6dOl.js +8 -0
- package/dist/vue2/mermaid-parser.core-VAa8Vi1g.js +48 -0
- package/dist/vue2/mermaid.core-vqI6KB9k.js +895 -0
- package/dist/vue2/mindmap-definition-VGOIOE7T-gtjvHqQ-.js +960 -0
- package/dist/vue2/ordinal-DOM6Fa9P.js +61 -0
- package/dist/vue2/packet-BFZMPI3H-CG049KmZ.js +7 -0
- package/dist/vue2/path-CW_-_Ti7.js +79 -0
- package/dist/vue2/pie-7BOR55EZ-BHq0KcLP.js +7 -0
- package/dist/vue2/pieDiagram-ADFJNKIX-CTUoM-kp.js +172 -0
- package/dist/vue2/purify.es-Cm_tUMzZ.js +547 -0
- package/dist/vue2/quadrantDiagram-AYHSOK5B-Njl7BMW7.js +1971 -0
- package/dist/vue2/radar-NHE76QYJ-CUoVtrAx.js +7 -0
- package/dist/vue2/reduce-BFKSG9Rs.js +451 -0
- package/dist/vue2/requirementDiagram-UZGBJVZJ-DKjE3cDK.js +2194 -0
- package/dist/vue2/sankeyDiagram-TZEHDZUN-DW2ap3zY.js +885 -0
- package/dist/vue2/sequenceDiagram-WL72ISMW-BjMq4OjH.js +3561 -0
- package/dist/vue2/src-VlKYSsxJ.js +1975 -0
- package/dist/vue2/stateDiagram-FKZM4ZOC-CnvtGM9U.js +224 -0
- package/dist/vue2/stateDiagram-v2-4FDKWEC3-C15xi-04.js +32 -0
- package/dist/vue2/style.css +1 -1
- package/dist/vue2/timeline-definition-IT6M3QCI-C7q6jdLA.js +831 -0
- package/dist/vue2/treemap-KMMF4GRG--FdijCcy.js +7 -0
- package/dist/vue2/xychartDiagram-PRI3JC2R-UcfQmj72.js +2022 -0
- package/dist/vue3/_baseFor-DAbrc8SN.js +309 -0
- package/dist/vue3/arc-BqlAOiZb.js +78 -0
- package/dist/vue3/architecture-U656AL7Q-Dtuq8BzO.js +7 -0
- package/dist/vue3/architectureDiagram-VXUJARFQ-BQS5Ixrn.js +4052 -0
- package/dist/vue3/array-TB8zN_HT.js +5 -0
- package/dist/vue3/blockDiagram-VD42YOAC-Bp6L6c6e.js +3013 -0
- package/dist/vue3/c4Diagram-YG6GDRKO-B15ZDn3Z.js +2956 -0
- package/dist/vue3/channel-edTl5mpN.js +3 -0
- package/dist/vue3/chunk-4BX2VUAB-eAYYj1bL.js +6 -0
- package/dist/vue3/chunk-55IACEB6-CTzuTcHv.js +6 -0
- package/dist/vue3/chunk-76Q3JFCE-BrJX66ha.js +19 -0
- package/dist/vue3/chunk-ABZYJK2D-gsx40GnJ.js +1971 -0
- package/dist/vue3/chunk-ATLVNIR6-CTTwtx-5.js +65 -0
- package/dist/vue3/chunk-B4BG7PRW-D8o7VxRH.js +3108 -0
- package/dist/vue3/chunk-CVBHYZKI-Cs8lCw3u.js +10 -0
- package/dist/vue3/chunk-DI55MBZ5-Dl59YBtR.js +1994 -0
- package/dist/vue3/chunk-DNh5sLlG.js +18 -0
- package/dist/vue3/chunk-EXTU4WIE-BPc8ye_N.js +7 -0
- package/dist/vue3/chunk-FMBD7UC4-PFlLPz_s.js +3 -0
- package/dist/vue3/chunk-FPAJGGOC-DPvjUKQ8.js +13428 -0
- package/dist/vue3/chunk-FWNWRKHM-BlUTFsPK.js +56 -0
- package/dist/vue3/chunk-HN2XXSSU-DueSY85P.js +74 -0
- package/dist/vue3/chunk-JA3XYJ7Z-CRet4f6a.js +1845 -0
- package/dist/vue3/chunk-JZLCHNYA-Df0-MseJ.js +4861 -0
- package/dist/vue3/chunk-LBM3YZW2-B0-w2HZs.js +19 -0
- package/dist/vue3/chunk-LHMN2FUI-BOH3yE2u.js +19 -0
- package/dist/vue3/chunk-MI3HLSF2-6-T1J0MS.js +1140 -0
- package/dist/vue3/chunk-N4CR4FBY-jNnt5D3v.js +39 -0
- package/dist/vue3/chunk-O7ZBX7Z2-BEP34BEE.js +26 -0
- package/dist/vue3/chunk-QN33PNHL-DsC-XeM9.js +23 -0
- package/dist/vue3/chunk-QXUST7PY-DxFRymyS.js +486 -0
- package/dist/vue3/chunk-QZHKN3VN-D9B5jQvg.js +11 -0
- package/dist/vue3/chunk-S3R3BYOJ-Bs_r55Kk.js +1222 -0
- package/dist/vue3/chunk-S6J4BHB3-XXfWHJvh.js +19 -0
- package/dist/vue3/chunk-T53DSG4Q-CNvqP6Iy.js +24 -0
- package/dist/vue3/chunk-TZMSLE5B-C5ccYWGN.js +55 -0
- package/dist/vue3/chunk-XAJISQIX-XsDvU4jW.js +135 -0
- package/dist/vue3/classDiagram-2ON5EDUG-Cgf9yVXj.js +33 -0
- package/dist/vue3/classDiagram-v2-WZHVMYZB-BtF1_0UK.js +33 -0
- package/dist/vue3/clone-Bbr3WSpg.js +7 -0
- package/dist/vue3/cose-bilkent-S5V4N54A-Cmf6WLkk.js +2250 -0
- package/dist/vue3/cytoscape.esm-nrcriBSO.js +18100 -0
- package/dist/vue3/dagre-6UL2VRFP-CTl_U96l.js +298 -0
- package/dist/vue3/dagre-DUjlMe_B.js +1496 -0
- package/dist/vue3/defaultLocale-BLATqOV5.js +177 -0
- package/dist/vue3/diagram-PSM6KHXK-Bl7brR-1.js +497 -0
- package/dist/vue3/diagram-QEK2KX5R-CAeywSxy.js +226 -0
- package/dist/vue3/diagram-S2PKOQOG-6I6J4WRC.js +144 -0
- package/dist/vue3/dist-xWJvauxf.js +49 -0
- package/dist/vue3/erDiagram-Q2GNP2WA-C8EbfuTj.js +1603 -0
- package/dist/vue3/flatten-CfPhNHUL.js +34 -0
- package/dist/vue3/flowDiagram-NV44I4VS-lFr4G2WN.js +4132 -0
- package/dist/vue3/ganttDiagram-JELNMOA3-Bvtip7yn.js +3010 -0
- package/dist/vue3/gitGraph-F6HP7TQM-OQvD95bN.js +7 -0
- package/dist/vue3/gitGraphDiagram-NY62KEGX-Cjvy4fHM.js +634 -0
- package/dist/vue3/graphlib-KDKEjVHX.js +344 -0
- package/dist/vue3/index.es.min.js +26730 -813
- package/dist/vue3/index.umd.min.js +2796 -9
- package/dist/vue3/info-NVLQJR56-DBsOnIKy.js +7 -0
- package/dist/vue3/infoDiagram-WHAUD3N6-D_isj7oC.js +31 -0
- package/dist/vue3/init-hAkIK9Bd.js +13 -0
- package/dist/vue3/isEmpty-z27q3o-D.js +32 -0
- package/dist/vue3/journeyDiagram-XKPGCS4Q-DlXHMS3v.js +885 -0
- package/dist/vue3/kanban-definition-3W4ZIXB7-CV6572lv.js +971 -0
- package/dist/vue3/katex-CEAw-xiA.js +22097 -0
- package/dist/vue3/katex-D8o5-F7C.js +2 -0
- package/dist/vue3/line-wvheYP7S.js +30 -0
- package/dist/vue3/linear-STTevhnH.js +250 -0
- package/dist/vue3/math-DF_v6dOl.js +8 -0
- package/dist/vue3/mermaid-parser.core-VAa8Vi1g.js +48 -0
- package/dist/vue3/mermaid.core-vqI6KB9k.js +895 -0
- package/dist/vue3/mindmap-definition-VGOIOE7T-gtjvHqQ-.js +960 -0
- package/dist/vue3/ordinal-DOM6Fa9P.js +61 -0
- package/dist/vue3/packet-BFZMPI3H-CG049KmZ.js +7 -0
- package/dist/vue3/path-CW_-_Ti7.js +79 -0
- package/dist/vue3/pie-7BOR55EZ-BHq0KcLP.js +7 -0
- package/dist/vue3/pieDiagram-ADFJNKIX-CTUoM-kp.js +172 -0
- package/dist/vue3/purify.es-Cm_tUMzZ.js +547 -0
- package/dist/vue3/quadrantDiagram-AYHSOK5B-Njl7BMW7.js +1971 -0
- package/dist/vue3/radar-NHE76QYJ-CUoVtrAx.js +7 -0
- package/dist/vue3/reduce-BFKSG9Rs.js +451 -0
- package/dist/vue3/requirementDiagram-UZGBJVZJ-DKjE3cDK.js +2194 -0
- package/dist/vue3/sankeyDiagram-TZEHDZUN-DW2ap3zY.js +885 -0
- package/dist/vue3/sequenceDiagram-WL72ISMW-BjMq4OjH.js +3561 -0
- package/dist/vue3/src-VlKYSsxJ.js +1975 -0
- package/dist/vue3/stateDiagram-FKZM4ZOC-CnvtGM9U.js +224 -0
- package/dist/vue3/stateDiagram-v2-4FDKWEC3-C15xi-04.js +32 -0
- package/dist/vue3/style.css +1 -1
- package/dist/vue3/timeline-definition-IT6M3QCI-C7q6jdLA.js +831 -0
- package/dist/vue3/treemap-KMMF4GRG--FdijCcy.js +7 -0
- package/dist/vue3/xychartDiagram-PRI3JC2R-UcfQmj72.js +2022 -0
- package/package.json +3 -3
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { g as log, h as __name } from "./src-VlKYSsxJ.js";
|
|
2
|
+
import { s as common_default, y as getConfig } from "./chunk-ABZYJK2D-gsx40GnJ.js";
|
|
3
|
+
import { d as interpolateToCurve } from "./chunk-S3R3BYOJ-Bs_r55Kk.js";
|
|
4
|
+
import { a as insertNode, i as insertCluster, s as labelHelper } from "./chunk-JZLCHNYA-Df0-MseJ.js";
|
|
5
|
+
import { a as positionEdgeLabel, i as markers_default, n as insertEdge, r as insertEdgeLabel } from "./chunk-QXUST7PY-DxFRymyS.js";
|
|
6
|
+
var internalHelpers = {
|
|
7
|
+
common: common_default,
|
|
8
|
+
getConfig,
|
|
9
|
+
insertCluster,
|
|
10
|
+
insertEdge,
|
|
11
|
+
insertEdgeLabel,
|
|
12
|
+
insertMarkers: markers_default,
|
|
13
|
+
insertNode,
|
|
14
|
+
interpolateToCurve,
|
|
15
|
+
labelHelper,
|
|
16
|
+
log,
|
|
17
|
+
positionEdgeLabel
|
|
18
|
+
}, layoutAlgorithms = {}, registerLayoutLoaders = /* @__PURE__ */ __name((e) => {
|
|
19
|
+
for (let h of e) layoutAlgorithms[h.name] = h;
|
|
20
|
+
}, "registerLayoutLoaders");
|
|
21
|
+
(/* @__PURE__ */ __name(() => {
|
|
22
|
+
registerLayoutLoaders([{
|
|
23
|
+
name: "dagre",
|
|
24
|
+
loader: /* @__PURE__ */ __name(async () => await import("./dagre-6UL2VRFP-CTl_U96l.js"), "loader")
|
|
25
|
+
}, ...[{
|
|
26
|
+
name: "cose-bilkent",
|
|
27
|
+
loader: /* @__PURE__ */ __name(async () => await import("./cose-bilkent-S5V4N54A-Cmf6WLkk.js"), "loader")
|
|
28
|
+
}]]);
|
|
29
|
+
}, "registerDefaultLayoutLoaders"))();
|
|
30
|
+
var render = /* @__PURE__ */ __name(async (e, h) => {
|
|
31
|
+
if (!(e.layoutAlgorithm in layoutAlgorithms)) throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);
|
|
32
|
+
let g = layoutAlgorithms[e.layoutAlgorithm];
|
|
33
|
+
return (await g.loader()).render(e, h, internalHelpers, { algorithm: g.algorithm });
|
|
34
|
+
}, "render"), getRegisteredLayoutAlgorithm = /* @__PURE__ */ __name((h = "", { fallback: g = "dagre" } = {}) => {
|
|
35
|
+
if (h in layoutAlgorithms) return h;
|
|
36
|
+
if (g in layoutAlgorithms) return log.warn(`Layout algorithm ${h} is not registered. Using ${g} as fallback.`), g;
|
|
37
|
+
throw Error(`Both layout algorithms ${h} and ${g} are not registered.`);
|
|
38
|
+
}, "getRegisteredLayoutAlgorithm");
|
|
39
|
+
export { registerLayoutLoaders as n, render as r, getRegisteredLayoutAlgorithm as t };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { f as __name, g as createDefaultSharedCoreModule, h as createDefaultCoreModule, m as inject, n as AbstractMermaidValueConverter, p as EmptyFileSystem, r as ArchitectureGeneratedModule, s as MermaidGeneratedSharedModule, t as AbstractMermaidTokenBuilder } from "./chunk-FPAJGGOC-DPvjUKQ8.js";
|
|
2
|
+
var ArchitectureTokenBuilder = class extends AbstractMermaidTokenBuilder {
|
|
3
|
+
static #e = __name(this, "ArchitectureTokenBuilder");
|
|
4
|
+
constructor() {
|
|
5
|
+
super(["architecture"]);
|
|
6
|
+
}
|
|
7
|
+
}, ArchitectureValueConverter = class extends AbstractMermaidValueConverter {
|
|
8
|
+
static #e = __name(this, "ArchitectureValueConverter");
|
|
9
|
+
runCustomConverter(e, l, u) {
|
|
10
|
+
if (e.name === "ARCH_ICON") return l.replace(/[()]/g, "").trim();
|
|
11
|
+
if (e.name === "ARCH_TEXT_ICON") return l.replace(/["()]/g, "");
|
|
12
|
+
if (e.name === "ARCH_TITLE") return l.replace(/[[\]]/g, "").trim();
|
|
13
|
+
}
|
|
14
|
+
}, ArchitectureModule = { parser: {
|
|
15
|
+
TokenBuilder: /* @__PURE__ */ __name(() => new ArchitectureTokenBuilder(), "TokenBuilder"),
|
|
16
|
+
ValueConverter: /* @__PURE__ */ __name(() => new ArchitectureValueConverter(), "ValueConverter")
|
|
17
|
+
} };
|
|
18
|
+
function createArchitectureServices(e = EmptyFileSystem) {
|
|
19
|
+
let d = inject(createDefaultSharedCoreModule(e), MermaidGeneratedSharedModule), f = inject(createDefaultCoreModule({ shared: d }), ArchitectureGeneratedModule, ArchitectureModule);
|
|
20
|
+
return d.ServiceRegistry.register(f), {
|
|
21
|
+
shared: d,
|
|
22
|
+
Architecture: f
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
__name(createArchitectureServices, "createArchitectureServices");
|
|
26
|
+
export { createArchitectureServices as n, ArchitectureModule as t };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { g as log, h as __name } from "./src-VlKYSsxJ.js";
|
|
2
|
+
import { c as configureSvgSize } from "./chunk-ABZYJK2D-gsx40GnJ.js";
|
|
3
|
+
var setupViewPortForSVG = /* @__PURE__ */ __name((n, i, o, s) => {
|
|
4
|
+
n.attr("class", o);
|
|
5
|
+
let { width: c, height: l, x: u, y: d } = calculateDimensionsWithPadding(n, i);
|
|
6
|
+
configureSvgSize(n, l, c, s);
|
|
7
|
+
let f = createViewBox(u, d, c, l, i);
|
|
8
|
+
n.attr("viewBox", f), log.debug(`viewBox configured: ${f} with padding: ${i}`);
|
|
9
|
+
}, "setupViewPortForSVG"), calculateDimensionsWithPadding = /* @__PURE__ */ __name((e, n) => {
|
|
10
|
+
let r = e.node()?.getBBox() || {
|
|
11
|
+
width: 0,
|
|
12
|
+
height: 0,
|
|
13
|
+
x: 0,
|
|
14
|
+
y: 0
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
width: r.width + n * 2,
|
|
18
|
+
height: r.height + n * 2,
|
|
19
|
+
x: r.x,
|
|
20
|
+
y: r.y
|
|
21
|
+
};
|
|
22
|
+
}, "calculateDimensionsWithPadding"), createViewBox = /* @__PURE__ */ __name((e, n, r, i, a) => `${e - a} ${n - a} ${r} ${i}`, "createViewBox");
|
|
23
|
+
export { setupViewPortForSVG as t };
|
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
import { g as log, h as __name, p as select_default } from "./src-VlKYSsxJ.js";
|
|
2
|
+
import { b as getConfig2, h as evaluate } from "./chunk-ABZYJK2D-gsx40GnJ.js";
|
|
3
|
+
import { B as monotoneY, F as stepAfter, G as bumpY, H as cardinal_default, I as stepBefore, K as linear_default, L as step_default, R as natural_default, U as basis_default, V as catmullRom_default, W as bumpX, g as utils_default, z as monotoneX } from "./chunk-S3R3BYOJ-Bs_r55Kk.js";
|
|
4
|
+
import { t as line_default } from "./line-wvheYP7S.js";
|
|
5
|
+
import { n as createText } from "./chunk-JA3XYJ7Z-CRet4f6a.js";
|
|
6
|
+
import { n as markerOffsets, r as markerOffsets2, t as getLineFunctionsWithOffset } from "./chunk-HN2XXSSU-DueSY85P.js";
|
|
7
|
+
import { t as getSubGraphTitleMargins } from "./chunk-CVBHYZKI-Cs8lCw3u.js";
|
|
8
|
+
import { i as styles2String, n as isLabelStyle } from "./chunk-ATLVNIR6-CTTwtx-5.js";
|
|
9
|
+
import { d as at, r as createLabel_default } from "./chunk-JZLCHNYA-Df0-MseJ.js";
|
|
10
|
+
var addEdgeMarkers = /* @__PURE__ */ __name((t, o, s, c, l, u) => {
|
|
11
|
+
o.arrowTypeStart && addEdgeMarker(t, "start", o.arrowTypeStart, s, c, l, u), o.arrowTypeEnd && addEdgeMarker(t, "end", o.arrowTypeEnd, s, c, l, u);
|
|
12
|
+
}, "addEdgeMarkers"), arrowTypesMap = {
|
|
13
|
+
arrow_cross: {
|
|
14
|
+
type: "cross",
|
|
15
|
+
fill: !1
|
|
16
|
+
},
|
|
17
|
+
arrow_point: {
|
|
18
|
+
type: "point",
|
|
19
|
+
fill: !0
|
|
20
|
+
},
|
|
21
|
+
arrow_barb: {
|
|
22
|
+
type: "barb",
|
|
23
|
+
fill: !0
|
|
24
|
+
},
|
|
25
|
+
arrow_circle: {
|
|
26
|
+
type: "circle",
|
|
27
|
+
fill: !1
|
|
28
|
+
},
|
|
29
|
+
aggregation: {
|
|
30
|
+
type: "aggregation",
|
|
31
|
+
fill: !1
|
|
32
|
+
},
|
|
33
|
+
extension: {
|
|
34
|
+
type: "extension",
|
|
35
|
+
fill: !1
|
|
36
|
+
},
|
|
37
|
+
composition: {
|
|
38
|
+
type: "composition",
|
|
39
|
+
fill: !0
|
|
40
|
+
},
|
|
41
|
+
dependency: {
|
|
42
|
+
type: "dependency",
|
|
43
|
+
fill: !0
|
|
44
|
+
},
|
|
45
|
+
lollipop: {
|
|
46
|
+
type: "lollipop",
|
|
47
|
+
fill: !1
|
|
48
|
+
},
|
|
49
|
+
only_one: {
|
|
50
|
+
type: "onlyOne",
|
|
51
|
+
fill: !1
|
|
52
|
+
},
|
|
53
|
+
zero_or_one: {
|
|
54
|
+
type: "zeroOrOne",
|
|
55
|
+
fill: !1
|
|
56
|
+
},
|
|
57
|
+
one_or_more: {
|
|
58
|
+
type: "oneOrMore",
|
|
59
|
+
fill: !1
|
|
60
|
+
},
|
|
61
|
+
zero_or_more: {
|
|
62
|
+
type: "zeroOrMore",
|
|
63
|
+
fill: !1
|
|
64
|
+
},
|
|
65
|
+
requirement_arrow: {
|
|
66
|
+
type: "requirement_arrow",
|
|
67
|
+
fill: !1
|
|
68
|
+
},
|
|
69
|
+
requirement_contains: {
|
|
70
|
+
type: "requirement_contains",
|
|
71
|
+
fill: !1
|
|
72
|
+
}
|
|
73
|
+
}, addEdgeMarker = /* @__PURE__ */ __name((o, s, c, l, u, d, f) => {
|
|
74
|
+
let p = arrowTypesMap[c];
|
|
75
|
+
if (!p) {
|
|
76
|
+
log.warn(`Unknown arrow type: ${c}`);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
let m = `${u}_${d}-${p.type}${s === "start" ? "Start" : "End"}`;
|
|
80
|
+
if (f && f.trim() !== "") {
|
|
81
|
+
let t = `${m}_${f.replace(/[^\dA-Za-z]/g, "_")}`;
|
|
82
|
+
if (!document.getElementById(t)) {
|
|
83
|
+
let o = document.getElementById(m);
|
|
84
|
+
if (o) {
|
|
85
|
+
let s = o.cloneNode(!0);
|
|
86
|
+
s.id = t, s.querySelectorAll("path, circle, line").forEach((t) => {
|
|
87
|
+
t.setAttribute("stroke", f), p.fill && t.setAttribute("fill", f);
|
|
88
|
+
}), o.parentNode?.appendChild(s);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
o.attr(`marker-${s}`, `url(${l}#${t})`);
|
|
92
|
+
} else o.attr(`marker-${s}`, `url(${l}#${m})`);
|
|
93
|
+
}, "addEdgeMarker"), edgeLabels = /* @__PURE__ */ new Map(), terminalLabels = /* @__PURE__ */ new Map(), clear = /* @__PURE__ */ __name(() => {
|
|
94
|
+
edgeLabels.clear(), terminalLabels.clear();
|
|
95
|
+
}, "clear"), getLabelStyles = /* @__PURE__ */ __name((t) => t ? t.reduce((t, o) => t + ";" + o, "") : "", "getLabelStyles"), insertEdgeLabel = /* @__PURE__ */ __name(async (o, u) => {
|
|
96
|
+
let d = evaluate(getConfig2().flowchart.htmlLabels), { labelStyles: f } = styles2String(u);
|
|
97
|
+
u.labelStyle = f;
|
|
98
|
+
let p = await createText(o, u.label, {
|
|
99
|
+
style: u.labelStyle,
|
|
100
|
+
useHtmlLabels: d,
|
|
101
|
+
addSvgBackground: !0,
|
|
102
|
+
isNode: !1
|
|
103
|
+
});
|
|
104
|
+
log.info("abc82", u, u.labelType);
|
|
105
|
+
let m = o.insert("g").attr("class", "edgeLabel"), h = m.insert("g").attr("class", "label").attr("data-id", u.id);
|
|
106
|
+
h.node().appendChild(p);
|
|
107
|
+
let g = p.getBBox();
|
|
108
|
+
if (d) {
|
|
109
|
+
let t = p.children[0], o = select_default(p);
|
|
110
|
+
g = t.getBoundingClientRect(), o.attr("width", g.width), o.attr("height", g.height);
|
|
111
|
+
}
|
|
112
|
+
h.attr("transform", "translate(" + -g.width / 2 + ", " + -g.height / 2 + ")"), edgeLabels.set(u.id, m), u.width = g.width, u.height = g.height;
|
|
113
|
+
let _;
|
|
114
|
+
if (u.startLabelLeft) {
|
|
115
|
+
let t = await createLabel_default(u.startLabelLeft, getLabelStyles(u.labelStyle)), s = o.insert("g").attr("class", "edgeTerminals"), c = s.insert("g").attr("class", "inner");
|
|
116
|
+
_ = c.node().appendChild(t);
|
|
117
|
+
let l = t.getBBox();
|
|
118
|
+
c.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")"), terminalLabels.get(u.id) || terminalLabels.set(u.id, {}), terminalLabels.get(u.id).startLeft = s, setTerminalWidth(_, u.startLabelLeft);
|
|
119
|
+
}
|
|
120
|
+
if (u.startLabelRight) {
|
|
121
|
+
let t = await createLabel_default(u.startLabelRight, getLabelStyles(u.labelStyle)), s = o.insert("g").attr("class", "edgeTerminals"), c = s.insert("g").attr("class", "inner");
|
|
122
|
+
_ = s.node().appendChild(t), c.node().appendChild(t);
|
|
123
|
+
let l = t.getBBox();
|
|
124
|
+
c.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")"), terminalLabels.get(u.id) || terminalLabels.set(u.id, {}), terminalLabels.get(u.id).startRight = s, setTerminalWidth(_, u.startLabelRight);
|
|
125
|
+
}
|
|
126
|
+
if (u.endLabelLeft) {
|
|
127
|
+
let t = await createLabel_default(u.endLabelLeft, getLabelStyles(u.labelStyle)), s = o.insert("g").attr("class", "edgeTerminals"), c = s.insert("g").attr("class", "inner");
|
|
128
|
+
_ = c.node().appendChild(t);
|
|
129
|
+
let l = t.getBBox();
|
|
130
|
+
c.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")"), s.node().appendChild(t), terminalLabels.get(u.id) || terminalLabels.set(u.id, {}), terminalLabels.get(u.id).endLeft = s, setTerminalWidth(_, u.endLabelLeft);
|
|
131
|
+
}
|
|
132
|
+
if (u.endLabelRight) {
|
|
133
|
+
let t = await createLabel_default(u.endLabelRight, getLabelStyles(u.labelStyle)), s = o.insert("g").attr("class", "edgeTerminals"), c = s.insert("g").attr("class", "inner");
|
|
134
|
+
_ = c.node().appendChild(t);
|
|
135
|
+
let l = t.getBBox();
|
|
136
|
+
c.attr("transform", "translate(" + -l.width / 2 + ", " + -l.height / 2 + ")"), s.node().appendChild(t), terminalLabels.get(u.id) || terminalLabels.set(u.id, {}), terminalLabels.get(u.id).endRight = s, setTerminalWidth(_, u.endLabelRight);
|
|
137
|
+
}
|
|
138
|
+
return p;
|
|
139
|
+
}, "insertEdgeLabel");
|
|
140
|
+
function setTerminalWidth(t, o) {
|
|
141
|
+
getConfig2().flowchart.htmlLabels && t && (t.style.width = o.length * 9 + "px", t.style.height = "12px");
|
|
142
|
+
}
|
|
143
|
+
__name(setTerminalWidth, "setTerminalWidth");
|
|
144
|
+
var positionEdgeLabel = /* @__PURE__ */ __name((o, s) => {
|
|
145
|
+
log.debug("Moving label abc88 ", o.id, o.label, edgeLabels.get(o.id), s);
|
|
146
|
+
let l = s.updatedPath ? s.updatedPath : s.originalPath, { subGraphTitleTotalMargin: u } = getSubGraphTitleMargins(getConfig2());
|
|
147
|
+
if (o.label) {
|
|
148
|
+
let c = edgeLabels.get(o.id), d = o.x, f = o.y;
|
|
149
|
+
if (l) {
|
|
150
|
+
let c = utils_default.calcLabelPosition(l);
|
|
151
|
+
log.debug("Moving label " + o.label + " from (", d, ",", f, ") to (", c.x, ",", c.y, ") abc88"), s.updatedPath && (d = c.x, f = c.y);
|
|
152
|
+
}
|
|
153
|
+
c.attr("transform", `translate(${d}, ${f + u / 2})`);
|
|
154
|
+
}
|
|
155
|
+
if (o.startLabelLeft) {
|
|
156
|
+
let t = terminalLabels.get(o.id).startLeft, s = o.x, c = o.y;
|
|
157
|
+
if (l) {
|
|
158
|
+
let t = utils_default.calcTerminalLabelPosition(o.arrowTypeStart ? 10 : 0, "start_left", l);
|
|
159
|
+
s = t.x, c = t.y;
|
|
160
|
+
}
|
|
161
|
+
t.attr("transform", `translate(${s}, ${c})`);
|
|
162
|
+
}
|
|
163
|
+
if (o.startLabelRight) {
|
|
164
|
+
let t = terminalLabels.get(o.id).startRight, s = o.x, c = o.y;
|
|
165
|
+
if (l) {
|
|
166
|
+
let t = utils_default.calcTerminalLabelPosition(o.arrowTypeStart ? 10 : 0, "start_right", l);
|
|
167
|
+
s = t.x, c = t.y;
|
|
168
|
+
}
|
|
169
|
+
t.attr("transform", `translate(${s}, ${c})`);
|
|
170
|
+
}
|
|
171
|
+
if (o.endLabelLeft) {
|
|
172
|
+
let t = terminalLabels.get(o.id).endLeft, s = o.x, c = o.y;
|
|
173
|
+
if (l) {
|
|
174
|
+
let t = utils_default.calcTerminalLabelPosition(o.arrowTypeEnd ? 10 : 0, "end_left", l);
|
|
175
|
+
s = t.x, c = t.y;
|
|
176
|
+
}
|
|
177
|
+
t.attr("transform", `translate(${s}, ${c})`);
|
|
178
|
+
}
|
|
179
|
+
if (o.endLabelRight) {
|
|
180
|
+
let t = terminalLabels.get(o.id).endRight, s = o.x, c = o.y;
|
|
181
|
+
if (l) {
|
|
182
|
+
let t = utils_default.calcTerminalLabelPosition(o.arrowTypeEnd ? 10 : 0, "end_right", l);
|
|
183
|
+
s = t.x, c = t.y;
|
|
184
|
+
}
|
|
185
|
+
t.attr("transform", `translate(${s}, ${c})`);
|
|
186
|
+
}
|
|
187
|
+
}, "positionEdgeLabel"), outsideNode = /* @__PURE__ */ __name((t, o) => {
|
|
188
|
+
let s = t.x, c = t.y, l = Math.abs(o.x - s), u = Math.abs(o.y - c), d = t.width / 2, f = t.height / 2;
|
|
189
|
+
return l >= d || u >= f;
|
|
190
|
+
}, "outsideNode"), intersection = /* @__PURE__ */ __name((o, s, c) => {
|
|
191
|
+
log.debug(`intersection calc abc89:
|
|
192
|
+
outsidePoint: ${JSON.stringify(s)}
|
|
193
|
+
insidePoint : ${JSON.stringify(c)}
|
|
194
|
+
node : x:${o.x} y:${o.y} w:${o.width} h:${o.height}`);
|
|
195
|
+
let l = o.x, u = o.y, d = Math.abs(l - c.x), f = o.width / 2, p = c.x < s.x ? f - d : f + d, m = o.height / 2, h = Math.abs(s.y - c.y), g = Math.abs(s.x - c.x);
|
|
196
|
+
if (Math.abs(u - s.y) * f > Math.abs(l - s.x) * m) {
|
|
197
|
+
let o = c.y < s.y ? s.y - m - u : u - m - s.y;
|
|
198
|
+
p = g * o / h;
|
|
199
|
+
let l = {
|
|
200
|
+
x: c.x < s.x ? c.x + p : c.x - g + p,
|
|
201
|
+
y: c.y < s.y ? c.y + h - o : c.y - h + o
|
|
202
|
+
};
|
|
203
|
+
return p === 0 && (l.x = s.x, l.y = s.y), g === 0 && (l.x = s.x), h === 0 && (l.y = s.y), log.debug(`abc89 top/bottom calc, Q ${h}, q ${o}, R ${g}, r ${p}`, l), l;
|
|
204
|
+
} else {
|
|
205
|
+
p = c.x < s.x ? s.x - f - l : l - f - s.x;
|
|
206
|
+
let o = h * p / g, u = c.x < s.x ? c.x + g - p : c.x - g + p, d = c.y < s.y ? c.y + o : c.y - o;
|
|
207
|
+
return log.debug(`sides calc abc89, Q ${h}, q ${o}, R ${g}, r ${p}`, {
|
|
208
|
+
_x: u,
|
|
209
|
+
_y: d
|
|
210
|
+
}), p === 0 && (u = s.x, d = s.y), g === 0 && (u = s.x), h === 0 && (d = s.y), {
|
|
211
|
+
x: u,
|
|
212
|
+
y: d
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
}, "intersection"), cutPathAtIntersect = /* @__PURE__ */ __name((o, s) => {
|
|
216
|
+
log.warn("abc88 cutPathAtIntersect", o, s);
|
|
217
|
+
let c = [], l = o[0], u = !1;
|
|
218
|
+
return o.forEach((o) => {
|
|
219
|
+
if (log.info("abc88 checking point", o, s), !outsideNode(s, o) && !u) {
|
|
220
|
+
let d = intersection(s, l, o);
|
|
221
|
+
log.debug("abc88 inside", o, l, d), log.debug("abc88 intersection", d, s);
|
|
222
|
+
let f = !1;
|
|
223
|
+
c.forEach((t) => {
|
|
224
|
+
f ||= t.x === d.x && t.y === d.y;
|
|
225
|
+
}), c.some((t) => t.x === d.x && t.y === d.y) ? log.warn("abc88 no intersect", d, c) : c.push(d), u = !0;
|
|
226
|
+
} else log.warn("abc88 outside", o, l), l = o, u || c.push(o);
|
|
227
|
+
}), log.debug("returning points", c), c;
|
|
228
|
+
}, "cutPathAtIntersect");
|
|
229
|
+
function extractCornerPoints(t) {
|
|
230
|
+
let o = [], s = [];
|
|
231
|
+
for (let c = 1; c < t.length - 1; c++) {
|
|
232
|
+
let l = t[c - 1], u = t[c], d = t[c + 1];
|
|
233
|
+
(l.x === u.x && u.y === d.y && Math.abs(u.x - d.x) > 5 && Math.abs(u.y - l.y) > 5 || l.y === u.y && u.x === d.x && Math.abs(u.x - l.x) > 5 && Math.abs(u.y - d.y) > 5) && (o.push(u), s.push(c));
|
|
234
|
+
}
|
|
235
|
+
return {
|
|
236
|
+
cornerPoints: o,
|
|
237
|
+
cornerPointPositions: s
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
__name(extractCornerPoints, "extractCornerPoints");
|
|
241
|
+
var findAdjacentPoint = /* @__PURE__ */ __name(function(t, o, s) {
|
|
242
|
+
let c = o.x - t.x, l = o.y - t.y, u = s / Math.sqrt(c * c + l * l);
|
|
243
|
+
return {
|
|
244
|
+
x: o.x - u * c,
|
|
245
|
+
y: o.y - u * l
|
|
246
|
+
};
|
|
247
|
+
}, "findAdjacentPoint"), fixCorners = /* @__PURE__ */ __name(function(o) {
|
|
248
|
+
let { cornerPointPositions: s } = extractCornerPoints(o), c = [];
|
|
249
|
+
for (let l = 0; l < o.length; l++) if (s.includes(l)) {
|
|
250
|
+
let s = o[l - 1], u = o[l + 1], d = o[l], f = findAdjacentPoint(s, d, 5), p = findAdjacentPoint(u, d, 5), m = p.x - f.x, h = p.y - f.y;
|
|
251
|
+
c.push(f);
|
|
252
|
+
let g = Math.sqrt(2) * 2, _ = {
|
|
253
|
+
x: d.x,
|
|
254
|
+
y: d.y
|
|
255
|
+
};
|
|
256
|
+
Math.abs(u.x - s.x) > 10 && Math.abs(u.y - s.y) >= 10 ? (log.debug("Corner point fixing", Math.abs(u.x - s.x), Math.abs(u.y - s.y)), _ = d.x === f.x ? {
|
|
257
|
+
x: m < 0 ? f.x - 5 + g : f.x + 5 - g,
|
|
258
|
+
y: h < 0 ? f.y - g : f.y + g
|
|
259
|
+
} : {
|
|
260
|
+
x: m < 0 ? f.x - g : f.x + g,
|
|
261
|
+
y: h < 0 ? f.y - 5 + g : f.y + 5 - g
|
|
262
|
+
}) : log.debug("Corner point skipping fixing", Math.abs(u.x - s.x), Math.abs(u.y - s.y)), c.push(_, p);
|
|
263
|
+
} else c.push(o[l]);
|
|
264
|
+
return c;
|
|
265
|
+
}, "fixCorners"), generateDashArray = /* @__PURE__ */ __name((t, o, s) => {
|
|
266
|
+
let c = t - o - s, l = Math.floor(c / 4);
|
|
267
|
+
return `0 ${o} ${Array(l).fill("2 2").join(" ")} ${s}`;
|
|
268
|
+
}, "generateDashArray"), insertEdge = /* @__PURE__ */ __name(function(o, l, w, T, O, k, A, j = !1) {
|
|
269
|
+
let { handDrawnSeed: M } = getConfig2(), N = l.points, P = !1, F = O;
|
|
270
|
+
var I = k;
|
|
271
|
+
let L = [];
|
|
272
|
+
for (let t in l.cssCompiledStyles) isLabelStyle(t) || L.push(l.cssCompiledStyles[t]);
|
|
273
|
+
log.debug("UIO intersect check", l.points, I.x, F.x), I.intersect && F.intersect && !j && (N = N.slice(1, l.points.length - 1), N.unshift(F.intersect(N[0])), log.debug("Last point UIO", l.start, "-->", l.end, N[N.length - 1], I, I.intersect(N[N.length - 1])), N.push(I.intersect(N[N.length - 1])));
|
|
274
|
+
let R = btoa(JSON.stringify(N));
|
|
275
|
+
l.toCluster && (log.info("to cluster abc88", w.get(l.toCluster)), N = cutPathAtIntersect(l.points, w.get(l.toCluster).node), P = !0), l.fromCluster && (log.debug("from cluster abc88", w.get(l.fromCluster), JSON.stringify(N, null, 2)), N = cutPathAtIntersect(N.reverse(), w.get(l.fromCluster).node).reverse(), P = !0);
|
|
276
|
+
let z = N.filter((t) => !Number.isNaN(t.y));
|
|
277
|
+
z = fixCorners(z);
|
|
278
|
+
let B = basis_default;
|
|
279
|
+
switch (B = linear_default, l.curve) {
|
|
280
|
+
case "linear":
|
|
281
|
+
B = linear_default;
|
|
282
|
+
break;
|
|
283
|
+
case "basis":
|
|
284
|
+
B = basis_default;
|
|
285
|
+
break;
|
|
286
|
+
case "cardinal":
|
|
287
|
+
B = cardinal_default;
|
|
288
|
+
break;
|
|
289
|
+
case "bumpX":
|
|
290
|
+
B = bumpX;
|
|
291
|
+
break;
|
|
292
|
+
case "bumpY":
|
|
293
|
+
B = bumpY;
|
|
294
|
+
break;
|
|
295
|
+
case "catmullRom":
|
|
296
|
+
B = catmullRom_default;
|
|
297
|
+
break;
|
|
298
|
+
case "monotoneX":
|
|
299
|
+
B = monotoneX;
|
|
300
|
+
break;
|
|
301
|
+
case "monotoneY":
|
|
302
|
+
B = monotoneY;
|
|
303
|
+
break;
|
|
304
|
+
case "natural":
|
|
305
|
+
B = natural_default;
|
|
306
|
+
break;
|
|
307
|
+
case "step":
|
|
308
|
+
B = step_default;
|
|
309
|
+
break;
|
|
310
|
+
case "stepAfter":
|
|
311
|
+
B = stepAfter;
|
|
312
|
+
break;
|
|
313
|
+
case "stepBefore":
|
|
314
|
+
B = stepBefore;
|
|
315
|
+
break;
|
|
316
|
+
default: B = basis_default;
|
|
317
|
+
}
|
|
318
|
+
let { x: V, y: H } = getLineFunctionsWithOffset(l), U = line_default().x(V).y(H).curve(B), W;
|
|
319
|
+
switch (l.thickness) {
|
|
320
|
+
case "normal":
|
|
321
|
+
W = "edge-thickness-normal";
|
|
322
|
+
break;
|
|
323
|
+
case "thick":
|
|
324
|
+
W = "edge-thickness-thick";
|
|
325
|
+
break;
|
|
326
|
+
case "invisible":
|
|
327
|
+
W = "edge-thickness-invisible";
|
|
328
|
+
break;
|
|
329
|
+
default: W = "edge-thickness-normal";
|
|
330
|
+
}
|
|
331
|
+
switch (l.pattern) {
|
|
332
|
+
case "solid":
|
|
333
|
+
W += " edge-pattern-solid";
|
|
334
|
+
break;
|
|
335
|
+
case "dotted":
|
|
336
|
+
W += " edge-pattern-dotted";
|
|
337
|
+
break;
|
|
338
|
+
case "dashed":
|
|
339
|
+
W += " edge-pattern-dashed";
|
|
340
|
+
break;
|
|
341
|
+
default: W += " edge-pattern-solid";
|
|
342
|
+
}
|
|
343
|
+
let G, K = l.curve === "rounded" ? generateRoundedPath(applyMarkerOffsetsToPoints(z, l), 5) : U(z), q = Array.isArray(l.style) ? l.style : [l.style], J = q.find((t) => t?.startsWith("stroke:")), Y = !1;
|
|
344
|
+
if (l.look === "handDrawn") {
|
|
345
|
+
let t = at.svg(o);
|
|
346
|
+
Object.assign([], z);
|
|
347
|
+
let c = t.path(K, {
|
|
348
|
+
roughness: .3,
|
|
349
|
+
seed: M
|
|
350
|
+
});
|
|
351
|
+
W += " transition", G = select_default(c).select("path").attr("id", l.id).attr("class", " " + W + (l.classes ? " " + l.classes : "")).attr("style", q ? q.reduce((t, o) => t + ";" + o, "") : "");
|
|
352
|
+
let u = G.attr("d");
|
|
353
|
+
G.attr("d", u), o.node().appendChild(G.node());
|
|
354
|
+
} else {
|
|
355
|
+
let t = L.join(";"), s = q ? q.reduce((t, o) => t + o + ";", "") : "", c = "";
|
|
356
|
+
l.animate && (c = " edge-animation-fast"), l.animation && (c = " edge-animation-" + l.animation);
|
|
357
|
+
let u = (t ? t + ";" + s + ";" : s) + ";" + (q ? q.reduce((t, o) => t + ";" + o, "") : "");
|
|
358
|
+
G = o.append("path").attr("d", K).attr("id", l.id).attr("class", " " + W + (l.classes ? " " + l.classes : "") + (c ?? "")).attr("style", u), J = u.match(/stroke:([^;]+)/)?.[1], Y = l.animate === !0 || !!l.animation || t.includes("animation");
|
|
359
|
+
let d = G.node(), f = typeof d.getTotalLength == "function" ? d.getTotalLength() : 0, p = markerOffsets2[l.arrowTypeStart] || 0, m = markerOffsets2[l.arrowTypeEnd] || 0;
|
|
360
|
+
if (l.look === "neo" && !Y) {
|
|
361
|
+
let t = `stroke-dasharray: ${l.pattern === "dotted" || l.pattern === "dashed" ? generateDashArray(f, p, m) : `0 ${p} ${f - p - m} ${m}`}; stroke-dashoffset: 0;`;
|
|
362
|
+
G.attr("style", t + G.attr("style"));
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
G.attr("data-edge", !0), G.attr("data-et", "edge"), G.attr("data-id", l.id), G.attr("data-points", R), l.showPoints && z.forEach((t) => {
|
|
366
|
+
o.append("circle").style("stroke", "red").style("fill", "red").attr("r", 1).attr("cx", t.x).attr("cy", t.y);
|
|
367
|
+
});
|
|
368
|
+
let X = "";
|
|
369
|
+
(getConfig2().flowchart.arrowMarkerAbsolute || getConfig2().state.arrowMarkerAbsolute) && (X = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, X = X.replace(/\(/g, "\\(").replace(/\)/g, "\\)")), log.info("arrowTypeStart", l.arrowTypeStart), log.info("arrowTypeEnd", l.arrowTypeEnd), addEdgeMarkers(G, l, X, A, T, J);
|
|
370
|
+
let Z = Math.floor(N.length / 2), Q = N[Z];
|
|
371
|
+
utils_default.isLabelCoordinateInPath(Q, G.attr("d")) || (P = !0);
|
|
372
|
+
let $ = {};
|
|
373
|
+
return P && ($.updatedPath = N), $.originalPath = l.points, $;
|
|
374
|
+
}, "insertEdge");
|
|
375
|
+
function generateRoundedPath(t, o) {
|
|
376
|
+
if (t.length < 2) return "";
|
|
377
|
+
let s = "", c = t.length, l = 1e-5;
|
|
378
|
+
for (let u = 0; u < c; u++) {
|
|
379
|
+
let d = t[u], f = t[u - 1], p = t[u + 1];
|
|
380
|
+
if (u === 0) s += `M${d.x},${d.y}`;
|
|
381
|
+
else if (u === c - 1) s += `L${d.x},${d.y}`;
|
|
382
|
+
else {
|
|
383
|
+
let t = d.x - f.x, c = d.y - f.y, u = p.x - d.x, m = p.y - d.y, h = Math.hypot(t, c), g = Math.hypot(u, m);
|
|
384
|
+
if (h < l || g < l) {
|
|
385
|
+
s += `L${d.x},${d.y}`;
|
|
386
|
+
continue;
|
|
387
|
+
}
|
|
388
|
+
let _ = t / h, v = c / h, y = u / g, b = m / g, x = _ * y + v * b, S = Math.max(-1, Math.min(1, x)), C = Math.acos(S);
|
|
389
|
+
if (C < l || Math.abs(Math.PI - C) < l) {
|
|
390
|
+
s += `L${d.x},${d.y}`;
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
393
|
+
let w = Math.min(o / Math.sin(C / 2), h / 2, g / 2), T = d.x - _ * w, E = d.y - v * w, D = d.x + y * w, O = d.y + b * w;
|
|
394
|
+
s += `L${T},${E}`, s += `Q${d.x},${d.y} ${D},${O}`;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
return s;
|
|
398
|
+
}
|
|
399
|
+
__name(generateRoundedPath, "generateRoundedPath");
|
|
400
|
+
function calculateDeltaAndAngle(t, o) {
|
|
401
|
+
if (!t || !o) return {
|
|
402
|
+
angle: 0,
|
|
403
|
+
deltaX: 0,
|
|
404
|
+
deltaY: 0
|
|
405
|
+
};
|
|
406
|
+
let s = o.x - t.x, c = o.y - t.y;
|
|
407
|
+
return {
|
|
408
|
+
angle: Math.atan2(c, s),
|
|
409
|
+
deltaX: s,
|
|
410
|
+
deltaY: c
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
__name(calculateDeltaAndAngle, "calculateDeltaAndAngle");
|
|
414
|
+
function applyMarkerOffsetsToPoints(t, o) {
|
|
415
|
+
let s = t.map((t) => ({ ...t }));
|
|
416
|
+
if (t.length >= 2 && markerOffsets[o.arrowTypeStart]) {
|
|
417
|
+
let c = markerOffsets[o.arrowTypeStart], l = t[0], u = t[1], { angle: d } = calculateDeltaAndAngle(l, u), f = c * Math.cos(d), p = c * Math.sin(d);
|
|
418
|
+
s[0].x = l.x + f, s[0].y = l.y + p;
|
|
419
|
+
}
|
|
420
|
+
let c = t.length;
|
|
421
|
+
if (c >= 2 && markerOffsets[o.arrowTypeEnd]) {
|
|
422
|
+
let l = markerOffsets[o.arrowTypeEnd], u = t[c - 1], d = t[c - 2], { angle: f } = calculateDeltaAndAngle(d, u), p = l * Math.cos(f), m = l * Math.sin(f);
|
|
423
|
+
s[c - 1].x = u.x - p, s[c - 1].y = u.y - m;
|
|
424
|
+
}
|
|
425
|
+
return s;
|
|
426
|
+
}
|
|
427
|
+
__name(applyMarkerOffsetsToPoints, "applyMarkerOffsetsToPoints");
|
|
428
|
+
var insertMarkers = /* @__PURE__ */ __name((t, o, s, c) => {
|
|
429
|
+
o.forEach((o) => {
|
|
430
|
+
markers[o](t, s, c);
|
|
431
|
+
});
|
|
432
|
+
}, "insertMarkers"), markers = {
|
|
433
|
+
extension: /* @__PURE__ */ __name((o, s, c) => {
|
|
434
|
+
log.trace("Making markers for ", c), o.append("defs").append("marker").attr("id", c + "_" + s + "-extensionStart").attr("class", "marker extension " + s).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), o.append("defs").append("marker").attr("id", c + "_" + s + "-extensionEnd").attr("class", "marker extension " + s).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
435
|
+
}, "extension"),
|
|
436
|
+
composition: /* @__PURE__ */ __name((t, o, s) => {
|
|
437
|
+
t.append("defs").append("marker").attr("id", s + "_" + o + "-compositionStart").attr("class", "marker composition " + o).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", s + "_" + o + "-compositionEnd").attr("class", "marker composition " + o).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
438
|
+
}, "composition"),
|
|
439
|
+
aggregation: /* @__PURE__ */ __name((t, o, s) => {
|
|
440
|
+
t.append("defs").append("marker").attr("id", s + "_" + o + "-aggregationStart").attr("class", "marker aggregation " + o).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", s + "_" + o + "-aggregationEnd").attr("class", "marker aggregation " + o).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
441
|
+
}, "aggregation"),
|
|
442
|
+
dependency: /* @__PURE__ */ __name((t, o, s) => {
|
|
443
|
+
t.append("defs").append("marker").attr("id", s + "_" + o + "-dependencyStart").attr("class", "marker dependency " + o).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), t.append("defs").append("marker").attr("id", s + "_" + o + "-dependencyEnd").attr("class", "marker dependency " + o).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
444
|
+
}, "dependency"),
|
|
445
|
+
lollipop: /* @__PURE__ */ __name((t, o, s) => {
|
|
446
|
+
t.append("defs").append("marker").attr("id", s + "_" + o + "-lollipopStart").attr("class", "marker lollipop " + o).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), t.append("defs").append("marker").attr("id", s + "_" + o + "-lollipopEnd").attr("class", "marker lollipop " + o).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
447
|
+
}, "lollipop"),
|
|
448
|
+
point: /* @__PURE__ */ __name((t, o, s) => {
|
|
449
|
+
t.append("marker").attr("id", s + "_" + o + "-pointEnd").attr("class", "marker " + o).attr("viewBox", "0 0 10 10").attr("refX", 5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), t.append("marker").attr("id", s + "_" + o + "-pointStart").attr("class", "marker " + o).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
450
|
+
}, "point"),
|
|
451
|
+
circle: /* @__PURE__ */ __name((t, o, s) => {
|
|
452
|
+
t.append("marker").attr("id", s + "_" + o + "-circleEnd").attr("class", "marker " + o).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), t.append("marker").attr("id", s + "_" + o + "-circleStart").attr("class", "marker " + o).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
453
|
+
}, "circle"),
|
|
454
|
+
cross: /* @__PURE__ */ __name((t, o, s) => {
|
|
455
|
+
t.append("marker").attr("id", s + "_" + o + "-crossEnd").attr("class", "marker cross " + o).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), t.append("marker").attr("id", s + "_" + o + "-crossStart").attr("class", "marker cross " + o).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
456
|
+
}, "cross"),
|
|
457
|
+
barb: /* @__PURE__ */ __name((t, o, s) => {
|
|
458
|
+
t.append("defs").append("marker").attr("id", s + "_" + o + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
459
|
+
}, "barb"),
|
|
460
|
+
only_one: /* @__PURE__ */ __name((t, o, s) => {
|
|
461
|
+
t.append("defs").append("marker").attr("id", s + "_" + o + "-onlyOneStart").attr("class", "marker onlyOne " + o).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M9,0 L9,18 M15,0 L15,18"), t.append("defs").append("marker").attr("id", s + "_" + o + "-onlyOneEnd").attr("class", "marker onlyOne " + o).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M3,0 L3,18 M9,0 L9,18");
|
|
462
|
+
}, "only_one"),
|
|
463
|
+
zero_or_one: /* @__PURE__ */ __name((t, o, s) => {
|
|
464
|
+
let c = t.append("defs").append("marker").attr("id", s + "_" + o + "-zeroOrOneStart").attr("class", "marker zeroOrOne " + o).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
|
|
465
|
+
c.append("circle").attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6), c.append("path").attr("d", "M9,0 L9,18");
|
|
466
|
+
let l = t.append("defs").append("marker").attr("id", s + "_" + o + "-zeroOrOneEnd").attr("class", "marker zeroOrOne " + o).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
|
|
467
|
+
l.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6), l.append("path").attr("d", "M21,0 L21,18");
|
|
468
|
+
}, "zero_or_one"),
|
|
469
|
+
one_or_more: /* @__PURE__ */ __name((t, o, s) => {
|
|
470
|
+
t.append("defs").append("marker").attr("id", s + "_" + o + "-oneOrMoreStart").attr("class", "marker oneOrMore " + o).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"), t.append("defs").append("marker").attr("id", s + "_" + o + "-oneOrMoreEnd").attr("class", "marker oneOrMore " + o).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18");
|
|
471
|
+
}, "one_or_more"),
|
|
472
|
+
zero_or_more: /* @__PURE__ */ __name((t, o, s) => {
|
|
473
|
+
let c = t.append("defs").append("marker").attr("id", s + "_" + o + "-zeroOrMoreStart").attr("class", "marker zeroOrMore " + o).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
|
|
474
|
+
c.append("circle").attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6), c.append("path").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18");
|
|
475
|
+
let l = t.append("defs").append("marker").attr("id", s + "_" + o + "-zeroOrMoreEnd").attr("class", "marker zeroOrMore " + o).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
|
|
476
|
+
l.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6), l.append("path").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
|
|
477
|
+
}, "zero_or_more"),
|
|
478
|
+
requirement_arrow: /* @__PURE__ */ __name((t, o, s) => {
|
|
479
|
+
t.append("defs").append("marker").attr("id", s + "_" + o + "-requirement_arrowEnd").attr("refX", 20).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("path").attr("d", "M0,0\n L20,10\n M20,10\n L0,20");
|
|
480
|
+
}, "requirement_arrow"),
|
|
481
|
+
requirement_contains: /* @__PURE__ */ __name((t, o, s) => {
|
|
482
|
+
let c = t.append("defs").append("marker").attr("id", s + "_" + o + "-requirement_containsStart").attr("refX", 0).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("g");
|
|
483
|
+
c.append("circle").attr("cx", 10).attr("cy", 10).attr("r", 9).attr("fill", "none"), c.append("line").attr("x1", 1).attr("x2", 19).attr("y1", 10).attr("y2", 10), c.append("line").attr("y1", 1).attr("y2", 19).attr("x1", 10).attr("x2", 10);
|
|
484
|
+
}, "requirement_contains")
|
|
485
|
+
}, markers_default = insertMarkers;
|
|
486
|
+
export { positionEdgeLabel as a, markers_default as i, insertEdge as n, insertEdgeLabel as r, clear as t };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { h as __name } from "./src-VlKYSsxJ.js";
|
|
2
|
+
var ImperativeState = class {
|
|
3
|
+
constructor(e) {
|
|
4
|
+
this.init = e, this.records = this.init();
|
|
5
|
+
}
|
|
6
|
+
static #e = __name(this, "ImperativeState");
|
|
7
|
+
reset() {
|
|
8
|
+
this.records = this.init();
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
export { ImperativeState as t };
|