@peasant-labs/fairtrade 0.0.48 → 0.0.49

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.
Files changed (118) hide show
  1. package/dist/lib/abnfDiagram-WEYOIA3C-D4LMNFIJ.js +89 -0
  2. package/dist/lib/{adapter-DnCl_ddK.js → adapter-CVKibszh.js} +136 -126
  3. package/dist/lib/arc-1xTxsoRi.js +80 -0
  4. package/dist/lib/architecture-WOLXFQ4H-c6RsZuzu.js +3 -0
  5. package/dist/lib/architectureDiagram-ZHVYKT53-DTINqD5R.js +4145 -0
  6. package/dist/lib/array-CApNbSU9.js +6 -0
  7. package/dist/lib/blockDiagram-RJAE7QA3-CUYHoR3g.js +1946 -0
  8. package/dist/lib/c4Diagram-XDPPPE54-Cdx6_DsI.js +2990 -0
  9. package/dist/lib/channel-DagAO2vE.js +5 -0
  10. package/dist/lib/chunk-2E7WHVMD-BzhgXW3b.js +490 -0
  11. package/dist/lib/chunk-2Q5K7J3B-DWNwIK5Y.js +15 -0
  12. package/dist/lib/chunk-4EMNKR2T-DhFrQz9k.js +236 -0
  13. package/dist/lib/chunk-55XCU76K-CI0GXDkJ.js +61 -0
  14. package/dist/lib/chunk-5VM5RSS4-BAQ-46g4.js +5 -0
  15. package/dist/lib/chunk-7S6XSTFO-CMt_p-O6.js +1373 -0
  16. package/dist/lib/chunk-AQDTSKZB-DrZccIQa.js +1847 -0
  17. package/dist/lib/chunk-DSNLSHJZ-CpA9d2CJ.js +4044 -0
  18. package/dist/lib/chunk-DUW6YSOI-C-tN4Kiv.js +10 -0
  19. package/dist/lib/chunk-EJLWFMJV-B30MNYvY.js +75 -0
  20. package/dist/lib/chunk-HAGFOTED-DMU2JNZM.js +4487 -0
  21. package/dist/lib/chunk-HNE4Q36P-BIA0n2gA.js +363 -0
  22. package/dist/lib/chunk-J5ZVWO5B-CA_-jk8G.js +12 -0
  23. package/dist/lib/chunk-JWPE2WC7-KRpHbrIX.js +8 -0
  24. package/dist/lib/chunk-LNGE3PJU-CMGaAEAh.js +1513 -0
  25. package/dist/lib/chunk-NGNAAXSQ-D7Dvct7J.js +19774 -0
  26. package/dist/lib/chunk-NQOKRVIF-MK9F46y3.js +4258 -0
  27. package/dist/lib/chunk-OYAV6JZA-B1yICcbU.js +10 -0
  28. package/dist/lib/chunk-UHW7PFBP-CLrOaA0y.js +67 -0
  29. package/dist/lib/chunk-VQ5W62QI-_ZR3gKe4.js +26 -0
  30. package/dist/lib/chunk-WQQL4CDK-DFtyhYZq.js +693 -0
  31. package/dist/lib/chunk-XXDRQBXY-uzyNBbgx.js +9 -0
  32. package/dist/lib/chunk-Y2CYZVJY-BYzrzvCI.js +12 -0
  33. package/dist/lib/chunk-YZO67HFG-D1jKt78p.js +275 -0
  34. package/dist/lib/chunk-ZAUX2LTX-7XO0Yj1z.js +37 -0
  35. package/dist/lib/chunk-ZCHMQSOR-CxoKltfF.js +349 -0
  36. package/dist/lib/classDiagram-v2-4MYWR3UA-BPvwhZqw.js +3397 -0
  37. package/dist/lib/commons.js +729 -729
  38. package/dist/lib/components.css +1 -1
  39. package/dist/lib/cose-bilkent-JH36ORCC-Oj79uOIQ.js +2250 -0
  40. package/dist/lib/cynefin-EF2NZ3EQ-COX3NRum.js +3 -0
  41. package/dist/lib/cynefinDiagram-WF24UDRP-UzTptNAX.js +349 -0
  42. package/dist/lib/cytoscape.esm-0ojxgO9x.js +18161 -0
  43. package/dist/lib/dagre-NK4GIZVX-DWZr-NGm.js +2356 -0
  44. package/dist/lib/defaultLocale-BbgDuMnp.js +201 -0
  45. package/dist/lib/diagram-CBK3MWTC-CsyKuv-w.js +525 -0
  46. package/dist/lib/diagram-I5XIIV2D-DWY2JSPC.js +134 -0
  47. package/dist/lib/diagram-ODIL2UCW-DUptj0JZ.js +301 -0
  48. package/dist/lib/diagram-PFBEJUXE-N5XnIBqM.js +447 -0
  49. package/dist/lib/diagram-RJA3I4VV-B9XgohYo.js +214 -0
  50. package/dist/lib/diagram-TYUNFSNR-XnsJIeAd.js +5084 -0
  51. package/dist/lib/dist-AMlsjiDX.js +59 -0
  52. package/dist/lib/ebnfDiagram-V4P3TTPT-BssHqFox.js +100 -0
  53. package/dist/lib/elk-QONTBCTQ-DwmwqYgP.js +47944 -0
  54. package/dist/lib/erDiagram-KYQIGQAA-BQiXw1Tw.js +1970 -0
  55. package/dist/lib/eventmodeling-K75KTNOO-DDb--yMc.js +3 -0
  56. package/dist/lib/flowDiagram-IUGLLWBU-BEqqF1y2.js +17 -0
  57. package/dist/lib/ganttDiagram-R7GPNTJY-BWtGXxEF.js +3094 -0
  58. package/dist/lib/gitGraph-VSP46ZUC-BSwOaak_.js +3 -0
  59. package/dist/lib/gitGraphDiagram-PDYL7XHY-CHGNuGbk.js +729 -0
  60. package/dist/lib/graphlib-Dndp26xU.js +1267 -0
  61. package/dist/lib/info-OHQRW6UA-Dk06sZRe.js +3 -0
  62. package/dist/lib/infoDiagram-MVDRKAX5-Cdhxnjmi.js +20 -0
  63. package/dist/lib/init-Bwwdo3M6.js +15 -0
  64. package/dist/lib/ishikawaDiagram-HPEHV2GE-Dzhti-GJ.js +719 -0
  65. package/dist/lib/journeyDiagram-BOSHW7O7-C3_vsSjw.js +884 -0
  66. package/dist/lib/kanban-definition-FNSA4HC5-XsfCEsjn.js +976 -0
  67. package/dist/lib/katex-Dw0PnoPU.js +21850 -0
  68. package/dist/lib/line-C9krU3Sv.js +34 -0
  69. package/dist/lib/linear-Cvilv3OA.js +289 -0
  70. package/dist/lib/mermaid-parser.core-I7qQ_fxz.js +638 -0
  71. package/dist/lib/mermaid.core-UNHMAbBP.js +1126 -0
  72. package/dist/lib/mindmap-definition-6OY57UG3-CAua-JvB.js +1011 -0
  73. package/dist/lib/ordinal-C55HfHHp.js +65 -0
  74. package/dist/lib/packet-JDAUHWVQ-DZ-MKx4I.js +3 -0
  75. package/dist/lib/path-DNvJyUE8.js +85 -0
  76. package/dist/lib/pegDiagram-ECIUJNBX-BCxa_IO0.js +94 -0
  77. package/dist/lib/pie-XZMESJXO-DpCa-Nnq.js +3 -0
  78. package/dist/lib/pieDiagram-GNMPY74T-CE_C3dCB.js +205 -0
  79. package/dist/lib/quadrantDiagram-D57K4MC3-CDgzdMoL.js +2001 -0
  80. package/dist/lib/radar-ABXABTNO-BOVK7L9p.js +3 -0
  81. package/dist/lib/railroad-I3PHUGI6-B6spKM0Z.js +3 -0
  82. package/dist/lib/railroad-abnf-LNEFI6M7-DEWqfByZ.js +3 -0
  83. package/dist/lib/railroad-ebnf-DWYD2UWJ-CWRLtxHB.js +3 -0
  84. package/dist/lib/railroad-peg-JR7BVNR7-C-3NHSsk.js +3 -0
  85. package/dist/lib/railroadDiagram-Y72NRBL7-a8YVk8LT.js +76 -0
  86. package/dist/lib/requirementDiagram-EQYSW5RA-B9HolqxU.js +2228 -0
  87. package/dist/lib/rough.esm-a8mysczE.js +1352 -0
  88. package/dist/lib/sankeyDiagram-SY24JHO5-CLFMtMJG.js +970 -0
  89. package/dist/lib/sequenceDiagram-BLEHNHQU-B5wfSV85.js +4253 -0
  90. package/dist/lib/share.js +1 -1
  91. package/dist/lib/sizeCapture-INFHLROL-BWGCc9aa.js +46 -0
  92. package/dist/lib/src-Dcy0zUZH.js +2153 -0
  93. package/dist/lib/stateDiagram-v2-A6IESKWZ-C92vye4N.js +2143 -0
  94. package/dist/lib/swimlanes-B3ENRKFQ-B6-i-tPc.js +4764 -0
  95. package/dist/lib/swimlanesDiagram-AYQRV4AK-CbkBeql-.js +28 -0
  96. package/dist/lib/timeline-definition-JXYKGLGB-D2Ip4r72.js +1073 -0
  97. package/dist/lib/treeView-D4JQ5SDB-CFaKQ_2T.js +3 -0
  98. package/dist/lib/treemap-SAJKECNS-BQ6z7Z3g.js +3 -0
  99. package/dist/lib/types/AppSidebar.d.ts +14 -1
  100. package/dist/lib/types/transcript/MermaidBlock.d.ts +3 -0
  101. package/dist/lib/types/transcript/TranscriptViewer.d.ts +1 -1
  102. package/dist/lib/types/transcript/UnverifiedPullRequests.d.ts +12 -0
  103. package/dist/lib/types/transcript/index.d.ts +1 -0
  104. package/dist/lib/types/transcript/mermaidSource.d.ts +2 -0
  105. package/dist/lib/types/transcript/mermaidSvg.d.ts +1 -0
  106. package/dist/lib/types/transcript/state-capabilities.d.ts +28 -8
  107. package/dist/lib/types/transcript/tool-state-key.d.ts +2 -0
  108. package/dist/lib/types/transcript/useReaderWidthAnchor.d.ts +20 -0
  109. package/dist/lib/types/transcript/view-model.d.ts +14 -0
  110. package/dist/lib/types/ui/transcript/view-model.d.ts +14 -0
  111. package/dist/lib/{ui-BLiaBlAK.js → ui-Beoq-HpN.js} +4875 -4130
  112. package/dist/lib/ui.js +6 -6
  113. package/dist/lib/usecaseDiagram-WPOLBNNX-BK1Anch1.js +7190 -0
  114. package/dist/lib/vennDiagram-Q3Y3IDCW-B6YTBqTS.js +1880 -0
  115. package/dist/lib/wardley-7MLQ67FV-DChYwu4i.js +3 -0
  116. package/dist/lib/wardleyDiagram-IVAIDKWA-D5I1qLUK.js +645 -0
  117. package/dist/lib/xychartDiagram-4URNHDU4-B6RXyhTO.js +2218 -0
  118. package/package.json +3 -2
@@ -0,0 +1,363 @@
1
+ import { m as e, p as t } from "./src-Dcy0zUZH.js";
2
+ import { n } from "./chunk-Y2CYZVJY-BYzrzvCI.js";
3
+ import { b as r, g as i, w as a } from "./chunk-DSNLSHJZ-CpA9d2CJ.js";
4
+ import { n as o } from "./chunk-AQDTSKZB-DrZccIQa.js";
5
+ import { a as s, i as c, t as l } from "./chunk-UHW7PFBP-CLrOaA0y.js";
6
+ import { s as u } from "./chunk-J5ZVWO5B-CA_-jk8G.js";
7
+ import { t as d } from "./rough.esm-a8mysczE.js";
8
+ import { i as f, n as p, t as m } from "./chunk-HAGFOTED-DMU2JNZM.js";
9
+ import { n as h } from "./chunk-ZAUX2LTX-7XO0Yj1z.js";
10
+ //#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-HNE4Q36P.mjs
11
+ var g = /* @__PURE__ */ n(async (n, a) => {
12
+ let l = r(), { theme: p, themeVariables: m, handDrawnSeed: h } = l, { clusterBkg: g, clusterBorder: _, borderColorArray: v } = m, y = _, { labelStyles: b, nodeStyles: x, borderStyles: S, backgroundStyles: C } = c(a), w = n.insert("g").attr("class", "cluster swimlane " + (a.cssClasses || "")).attr("id", a.domId ?? a.id).attr("data-id", a.id).attr("data-et", "cluster").attr("data-look", a.look);
13
+ u(w, a.colorIndex, p, v);
14
+ let T = i(l.flowchart.htmlLabels), E = a.direction === "LR", D = w.insert("g").attr("class", "cluster-label swimlane-label"), O = await o(D, a.label, {
15
+ style: a.labelStyle,
16
+ useHtmlLabels: T,
17
+ isNode: !0,
18
+ width: a.width
19
+ }), k = O.getBBox();
20
+ if (T) {
21
+ let e = O.children[0], n = t(O);
22
+ k = e.getBoundingClientRect(), n.attr("width", k.width), n.attr("height", k.height);
23
+ }
24
+ let A = a.padding ?? 0, j = a.width <= k.width + A ? k.width + A : a.width;
25
+ a.width <= k.width + A ? a.diff = (j - a.width) / 2 - A : a.diff = -A;
26
+ let M = a.height, N = a.y - M / 2, P = a.y + M / 2, F = a.x - j / 2, I = a.swimlaneContentTop === void 0 ? N + M / 3 : a.swimlaneContentTop, L = E ? 4 : 0, R = k.height + 2 * L, z, B;
27
+ if (E) {
28
+ let e = Math.max(R, k.height + 2 * L), t = F + e, n = Math.max(0, j - e);
29
+ if (a.look === "handDrawn") {
30
+ let r = d.svg(w), i = s(a, {
31
+ roughness: .7,
32
+ fill: g,
33
+ stroke: y,
34
+ seed: h
35
+ }), o = s(a, {
36
+ roughness: .7,
37
+ fill: "none",
38
+ stroke: y,
39
+ seed: h
40
+ }), c = r.rectangle(F, N, e, M, i);
41
+ z = w.insert(() => c, ":first-child").attr("class", "swimlane-title");
42
+ let l = r.rectangle(t, N, n, M, o);
43
+ B = w.insert(() => l, ":first-child").attr("class", "swimlane-body"), z.select("path:nth-child(2)").attr("style", S.join(";")), z.select("path").attr("style", C.join(";").replace("fill", "stroke"));
44
+ } else z = w.insert("rect", ":first-child"), B = w.insert("rect", ":first-child"), z.attr("class", "swimlane-title").attr("style", x).attr("x", F).attr("y", N).attr("width", e).attr("height", M).attr("fill", g).attr("stroke", y), B.attr("class", "swimlane-body").attr("style", x).attr("x", t).attr("y", N).attr("width", n).attr("height", M).attr("fill", "none").attr("stroke", y);
45
+ let r = F + e / 2, i = a.y;
46
+ D.attr("transform", `translate(${r}, ${i}) rotate(-90) translate(${-k.width / 2}, ${-k.height / 2})`);
47
+ } else {
48
+ let e = Math.max(0, I - N), t = Math.min(R, e), n = N + t, r = Math.max(0, P - n), i = a.x - j / 2;
49
+ if (a.look === "handDrawn") {
50
+ let e = d.svg(w), o = s(a, {
51
+ roughness: .7,
52
+ fill: g,
53
+ stroke: y,
54
+ fillWeight: 3,
55
+ seed: h
56
+ }), c = s(a, {
57
+ roughness: .7,
58
+ fill: "none",
59
+ stroke: y,
60
+ seed: h
61
+ }), l = e.rectangle(i, N, j, t, o);
62
+ z = w.insert(() => l, ":first-child").attr("class", "swimlane-title");
63
+ let u = e.rectangle(i, n, j, r, c);
64
+ B = w.insert(() => u, ":first-child").attr("class", "swimlane-body"), z.select("path:nth-child(2)").attr("style", S.join(";")), z.select("path").attr("style", C.join(";").replace("fill", "stroke"));
65
+ } else z = w.insert("rect", ":first-child"), B = w.insert("rect", ":first-child"), z.attr("class", "swimlane-title").attr("style", x).attr("x", i).attr("y", N).attr("width", j).attr("height", t).attr("fill", g).attr("stroke", y), B.attr("class", "swimlane-body").attr("style", x).attr("x", i).attr("y", n).attr("width", j).attr("height", r).attr("fill", "none").attr("stroke", y);
66
+ let o = a.x - k.width / 2, c = N + (t - k.height) / 2;
67
+ D.attr("transform", `translate(${o}, ${c})`);
68
+ }
69
+ if (e.trace("Swimlane data ", a, JSON.stringify(a)), b) {
70
+ let e = D.select("span");
71
+ e && e.attr("style", b);
72
+ }
73
+ return a.offsetX = 0, a.width = j, a.height = M, a.offsetY = k.height - A / 2, a.intersect = function(e) {
74
+ return f(a, e);
75
+ }, {
76
+ cluster: w,
77
+ labelBBox: k
78
+ };
79
+ }, "swimlane"), _ = /* @__PURE__ */ n(async (n, i) => {
80
+ e.info("Creating subgraph rect for ", i.id, i);
81
+ let l = r(), { theme: g, themeVariables: _, handDrawnSeed: v } = l, { clusterBkg: y, clusterBorder: b, borderColorArray: x } = _, { labelStyles: S, nodeStyles: C, borderStyles: w, backgroundStyles: T } = c(i), E = n.insert("g").attr("class", "cluster " + i.cssClasses).attr("id", i.domId).attr("data-look", i.look);
82
+ u(E, i.colorIndex, g, x);
83
+ let D = a(l), O = E.insert("g").attr("class", "cluster-label "), k;
84
+ k = i.labelType === "markdown" ? await o(O, i.label, {
85
+ style: i.labelStyle,
86
+ useHtmlLabels: D,
87
+ isNode: !0,
88
+ width: i.width
89
+ }) : await m(O, i.label, i.labelStyle || "", !1, !0);
90
+ let A = k.getBBox();
91
+ if (a(l)) {
92
+ let e = k.children[0], n = t(k);
93
+ A = e.getBoundingClientRect(), n.attr("width", A.width), n.attr("height", A.height);
94
+ }
95
+ let j = i.width <= A.width + i.padding ? A.width + i.padding : i.width;
96
+ i.width <= A.width + i.padding ? i.diff = (j - i.width) / 2 - i.padding : i.diff = -i.padding;
97
+ let M = i.height, N = i.x - j / 2, P = i.y - M / 2;
98
+ e.trace("Data ", i, JSON.stringify(i));
99
+ let F;
100
+ if (i.look === "handDrawn") {
101
+ let t = d.svg(E), n = s(i, {
102
+ roughness: .7,
103
+ fill: y,
104
+ stroke: b,
105
+ fillWeight: 3,
106
+ seed: v
107
+ }), r = t.path(p(N, P, j, M, 0), n);
108
+ F = E.insert(() => (e.debug("Rough node insert CXC", r), r), ":first-child"), F.select("path:nth-child(2)").attr("style", w.join(";")), F.select("path").attr("style", T.join(";").replace("fill", "stroke"));
109
+ } else F = E.insert("rect", ":first-child"), F.attr("style", C).attr("rx", i.rx).attr("ry", i.ry).attr("x", N).attr("y", P).attr("width", j).attr("height", M);
110
+ let { subGraphTitleTopMargin: I } = h(l);
111
+ if (O.attr("transform", `translate(${i.x - A.width / 2}, ${i.y - i.height / 2 + I})`), S) {
112
+ let e = O.select("span");
113
+ e && e.attr("style", S);
114
+ }
115
+ let L = F.node().getBBox();
116
+ return i.offsetX = 0, i.width = L.width, i.height = L.height, i.offsetY = A.height - i.padding / 2, i.intersect = function(e) {
117
+ return f(i, e);
118
+ }, {
119
+ cluster: E,
120
+ labelBBox: A
121
+ };
122
+ }, "rect"), v = /* @__PURE__ */ n((e, t) => {
123
+ let n = e.insert("g").attr("class", "note-cluster").attr("id", t.domId), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
124
+ r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2 - a).attr("width", t.width + i).attr("height", t.height + i).attr("fill", "none");
125
+ let o = r.node().getBBox();
126
+ return t.width = o.width, t.height = o.height, t.intersect = function(e) {
127
+ return f(t, e);
128
+ }, {
129
+ cluster: n,
130
+ labelBBox: {
131
+ width: 0,
132
+ height: 0
133
+ }
134
+ };
135
+ }, "noteGroup"), y = /* @__PURE__ */ n(async (e, n) => {
136
+ let i = r(), { theme: o, themeVariables: s, handDrawnSeed: c } = i, { altBackground: l, borderColorArray: h, compositeBackground: g, compositeTitleBackground: _, nodeBorder: v } = s, y = e.insert("g").attr("class", n.cssClasses).attr("id", n.domId).attr("data-id", n.id).attr("data-look", n.look);
137
+ u(y, n.colorIndex, o, h);
138
+ let b = y.insert("g", ":first-child"), x = y.insert("g").attr("class", "cluster-label"), S = y.append("rect"), C = await m(x, n.label, n.labelStyle, void 0, !0), w = C.getBBox();
139
+ if (a(i)) {
140
+ let e = C.children[0], n = t(C);
141
+ w = e.getBoundingClientRect(), n.attr("width", w.width), n.attr("height", w.height);
142
+ }
143
+ let T = 0 * n.padding, E = T / 2, D = (n.width <= w.width + n.padding ? w.width + n.padding : n.width) + T;
144
+ n.width <= w.width + n.padding ? n.diff = (D - n.width) / 2 - n.padding : n.diff = -n.padding;
145
+ let O = n.height + T, k = n.height + T - w.height - 6, A = n.x - D / 2, j = n.y - O / 2;
146
+ n.width = D;
147
+ let M = n.y - n.height / 2 - E + w.height + 2, N;
148
+ if (n.look === "handDrawn") {
149
+ let e = n.cssClasses.includes("statediagram-cluster-alt"), t = d.svg(y), r = n.rx || n.ry ? t.path(p(A, j, D, O, 10), {
150
+ roughness: .7,
151
+ fill: _,
152
+ fillStyle: "solid",
153
+ stroke: v,
154
+ seed: c
155
+ }) : t.rectangle(A, j, D, O, { seed: c });
156
+ N = y.insert(() => r, ":first-child");
157
+ let i = t.rectangle(A, M, D, k, {
158
+ fill: e ? l : g,
159
+ fillStyle: e ? "hachure" : "solid",
160
+ stroke: v,
161
+ seed: c
162
+ });
163
+ N = y.insert(() => r, ":first-child"), S = y.insert(() => i), N.attr("class", "outer"), S.attr("class", "inner");
164
+ } else N = b.insert("rect", ":first-child"), N.attr("class", "outer").attr("x", A).attr("y", j).attr("width", D).attr("height", O).attr("data-look", n.look), S.attr("class", "inner").attr("x", A).attr("y", M).attr("width", D).attr("height", k);
165
+ return x.attr("transform", `translate(${n.x - w.width / 2}, ${j + 1 - (a(i) ? 0 : 3)})`), n.height = N.node().getBBox().height, n.offsetX = 0, n.offsetY = w.height - n.padding / 2, n.labelBBox = w, n.intersect = function(e) {
166
+ return f(n, e);
167
+ }, {
168
+ cluster: y,
169
+ labelBBox: w
170
+ };
171
+ }, "roundedWithTitle"), b = /* @__PURE__ */ n(async (n, i) => {
172
+ e.info("Creating subgraph rect for ", i.id, i);
173
+ let l = r(), { themeVariables: u, handDrawnSeed: m } = l, { clusterBkg: g, clusterBorder: _ } = u, { labelStyles: v, nodeStyles: y, borderStyles: b, backgroundStyles: x } = c(i), S = n.insert("g").attr("class", "cluster " + i.cssClasses).attr("id", i.domId).attr("data-look", i.look), C = a(l), w = S.insert("g").attr("class", "cluster-label "), T = await o(w, i.label, {
174
+ style: i.labelStyle,
175
+ useHtmlLabels: C,
176
+ isNode: !0,
177
+ width: i.width
178
+ }), E = T.getBBox();
179
+ if (a(l)) {
180
+ let e = T.children[0], n = t(T);
181
+ E = e.getBoundingClientRect(), n.attr("width", E.width), n.attr("height", E.height);
182
+ }
183
+ let D = i.width <= E.width + i.padding ? E.width + i.padding : i.width;
184
+ i.width <= E.width + i.padding ? i.diff = (D - i.width) / 2 - i.padding : i.diff = -i.padding;
185
+ let O = i.height, k = i.x - D / 2, A = i.y - O / 2;
186
+ e.trace("Data ", i, JSON.stringify(i));
187
+ let j;
188
+ if (i.look === "handDrawn") {
189
+ let t = d.svg(S), n = s(i, {
190
+ roughness: .7,
191
+ fill: g,
192
+ stroke: _,
193
+ fillWeight: 4,
194
+ seed: m
195
+ }), r = t.path(p(k, A, D, O, i.rx), n);
196
+ j = S.insert(() => (e.debug("Rough node insert CXC", r), r), ":first-child"), j.select("path:nth-child(2)").attr("style", b.join(";")), j.select("path").attr("style", x.join(";").replace("fill", "stroke"));
197
+ } else j = S.insert("rect", ":first-child"), j.attr("style", y).attr("rx", i.rx).attr("ry", i.ry).attr("x", k).attr("y", A).attr("width", D).attr("height", O);
198
+ let { subGraphTitleTopMargin: M } = h(l);
199
+ if (w.attr("transform", `translate(${i.x - E.width / 2}, ${i.y - i.height / 2 + M})`), v) {
200
+ let e = w.select("span");
201
+ e && e.attr("style", v);
202
+ }
203
+ let N = j.node().getBBox();
204
+ return i.offsetX = 0, i.width = N.width, i.height = N.height, i.offsetY = E.height - i.padding / 2, i.intersect = function(e) {
205
+ return f(i, e);
206
+ }, {
207
+ cluster: S,
208
+ labelBBox: E
209
+ };
210
+ }, "kanbanSection"), x = /* @__PURE__ */ n((e, t) => {
211
+ let { theme: n, themeVariables: i, handDrawnSeed: a } = r(), { altBackground: o, nodeBorder: s, borderColorArray: c } = i, l = e.insert("g").attr("class", t.cssClasses).attr("id", t.domId).attr("data-look", t.look);
212
+ u(l, t.colorIndex, n, c);
213
+ let p = l.insert("g", ":first-child"), m = 0 * t.padding, h = t.width + m;
214
+ t.diff = -t.padding;
215
+ let g = t.height + m, _ = t.x - h / 2, v = t.y - g / 2;
216
+ t.width = h;
217
+ let y;
218
+ if (t.look === "handDrawn") {
219
+ let e = d.svg(l).rectangle(_, v, h, g, {
220
+ fill: o ?? "#efefef",
221
+ fillStyle: "solid",
222
+ roughness: .5,
223
+ strokeLineDash: [5],
224
+ stroke: s,
225
+ seed: a
226
+ });
227
+ y = l.insert(() => e, ":first-child").attr("class", "divider");
228
+ } else {
229
+ y = p.insert("rect", ":first-child");
230
+ let e = "outer";
231
+ e = (t.look, "divider"), y.attr("class", e).attr("x", _).attr("y", v).attr("width", h).attr("height", g).attr("data-look", t.look);
232
+ }
233
+ return t.height = y.node().getBBox().height, t.offsetX = 0, t.offsetY = 0, t.intersect = function(e) {
234
+ return f(t, e);
235
+ }, {
236
+ cluster: l,
237
+ labelBBox: {}
238
+ };
239
+ }, "divider"), S = /* @__PURE__ */ n(async (n, i, l) => {
240
+ e.info(`Creating ${l.cssClass} for `, i.id, i);
241
+ let g = r(), { theme: _, themeVariables: v, handDrawnSeed: y } = g, { borderColorArray: b } = v, { labelStyles: x, borderStyles: S } = c(i), C = n.insert("g").attr("class", "cluster " + l.cssClass + " " + i.cssClasses).attr("id", i.domId ?? i.id).attr("data-look", i.look);
242
+ u(C, i.colorIndex, _, b);
243
+ let w = a(g), T = C.insert("g").attr("class", "cluster-label"), E = {
244
+ width: 0,
245
+ height: 0
246
+ }, D = i.label?.trim();
247
+ if (D) {
248
+ let e;
249
+ if (e = i.labelType === "markdown" ? await o(T, i.label, {
250
+ style: i.labelStyle,
251
+ useHtmlLabels: w,
252
+ isNode: !0,
253
+ width: i.width
254
+ }) : await m(T, i.label, i.labelStyle || "", !1, !0), E = e.getBBox(), w) {
255
+ let n = e.children[0], r = t(e);
256
+ E = n.getBoundingClientRect(), r.attr("width", E.width), r.attr("height", E.height);
257
+ }
258
+ }
259
+ let O = i.width <= E.width + i.padding ? E.width + i.padding : i.width;
260
+ i.width <= E.width + i.padding ? i.diff = (O - i.width) / 2 - i.padding : i.diff = -i.padding;
261
+ let k = i.height, A = i.x - O / 2, j = i.y - k / 2, M;
262
+ if (i.look === "handDrawn") {
263
+ let e = d.svg(C), t = s(i, {
264
+ roughness: l.roughness,
265
+ fill: l.fill,
266
+ stroke: l.stroke,
267
+ strokeWidth: l.strokeWidth,
268
+ seed: y,
269
+ ...l.fill === "none" ? { fillWeight: 0 } : { fillStyle: "solid" },
270
+ ...l.strokeDash ? { strokeLineDash: l.strokeDash } : {}
271
+ }), n = e.path(p(A, j, O, k, l.rx), t);
272
+ M = C.insert(() => n, ":first-child"), M.select("path:nth-child(2)").attr("style", S.join(";"));
273
+ } else M = C.insert("rect", ":first-child"), M.attr("rx", l.rx).attr("ry", l.rx).attr("x", A).attr("y", j).attr("width", O).attr("height", k).attr("fill", l.fill).attr("stroke", l.stroke).attr("stroke-width", l.strokeWidth + "px"), l.strokeDash && M.attr("stroke-dasharray", l.strokeDash.join(", "));
274
+ if (D) {
275
+ let { subGraphTitleTopMargin: e } = h(g);
276
+ if (T.attr("transform", `translate(${i.x - E.width / 2}, ${i.y - i.height / 2 + e})`), x) {
277
+ let e = T.select("span");
278
+ e && e.attr("style", x);
279
+ }
280
+ }
281
+ let N = M.node().getBBox();
282
+ return i.offsetX = 0, i.width = N.width, i.height = N.height, i.offsetY = E.height - i.padding / 2, i.intersect = function(e) {
283
+ return f(i, e);
284
+ }, {
285
+ cluster: C,
286
+ labelBBox: E
287
+ };
288
+ }, "createContainerGroup"), C = /* @__PURE__ */ n(async (e, t) => {
289
+ let { themeVariables: n } = r();
290
+ return S(e, t, {
291
+ cssClass: "flow-cluster",
292
+ rx: 10,
293
+ fill: "none",
294
+ stroke: n.flowContainerStroke || n.secondaryBorderColor,
295
+ strokeWidth: .75,
296
+ roughness: .7
297
+ });
298
+ }, "flowGroup"), w = /* @__PURE__ */ n((e, t) => {
299
+ let n = e.boundaryType || "rect", r = n === "package" ? 20 : e.padding, i = n === "package" ? t.height + 10 : 0, a = Math.max(e.width, t.width + r), o = n === "package" ? Math.max(e.height, i + e.padding * 2) : e.height, s = e.x - a / 2, c = e.y - o / 2;
300
+ return {
301
+ boundaryType: n,
302
+ width: a,
303
+ height: o,
304
+ x: s,
305
+ y: c,
306
+ bodyY: c + i,
307
+ bodyHeight: o - i,
308
+ tabHeight: i,
309
+ tabWidth: n === "package" ? Math.min(a, Math.max(80, t.width + 20)) : 0
310
+ };
311
+ }, "getUsecaseSystemBoundaryGeometry"), T = {
312
+ rect: _,
313
+ squareRect: _,
314
+ roundedWithTitle: y,
315
+ noteGroup: v,
316
+ divider: x,
317
+ kanbanSection: b,
318
+ flowGroup: C,
319
+ usecaseSystemBoundary: /* @__PURE__ */ n(async (n, i) => {
320
+ e.info("Creating usecase system boundary for ", i.id, i);
321
+ let p = r(), { theme: m, themeVariables: g, handDrawnSeed: _ } = p, { clusterBkg: v, clusterBorder: y, borderColorArray: b } = g, { labelStyles: x, nodeStyles: S } = c(i), { stylesMap: C } = l(i), T = i.boundaryType || "rect", E = n.insert("g").attr("class", `cluster usecase-system-boundary usecase-system-boundary-${T} ${i.cssClasses}`).attr("id", typeof i.domId == "string" ? i.domId : i.id).attr("data-boundary-type", T).attr("data-look", i.look);
322
+ u(E, i.colorIndex, m, b);
323
+ let D = a(p), O = E.insert("g").attr("class", "cluster-label system-boundary-title"), k = await o(O, i.label, {
324
+ style: x,
325
+ useHtmlLabels: D,
326
+ isNode: !0
327
+ }), A = k.getBBox();
328
+ if (D) {
329
+ let e = k.children[0], n = t(k);
330
+ A = e.getBoundingClientRect(), n.attr("width", A.width), n.attr("height", A.height);
331
+ }
332
+ let { width: j, height: M, x: N, y: P, bodyY: F, bodyHeight: I, tabHeight: L, tabWidth: R } = w(i, A);
333
+ i.diff = i.width <= A.width + i.padding ? (j - i.width) / 2 - i.padding : -i.padding;
334
+ let z = s(i, {
335
+ fill: C.get("fill") || v,
336
+ stroke: C.get("stroke") || y,
337
+ strokeWidth: C.get("stroke-width")?.replace("px", "") || 1,
338
+ seed: _
339
+ });
340
+ if (i.look === "handDrawn") {
341
+ let e = d.svg(E), t = e.rectangle(N, F, j, I, z);
342
+ if (E.insert(() => t, ":first-child").attr("class", "boundary-body label-container"), T === "package") {
343
+ let t = e.rectangle(N, P, R, L, z);
344
+ E.insert(() => t, ":first-child").attr("class", "boundary-tab system-boundary-package-tab label-container");
345
+ }
346
+ } else E.insert("rect", ":first-child").attr("class", "boundary-body label-container").attr("style", S).attr("x", N).attr("y", F).attr("width", j).attr("height", I), T === "package" && E.insert("rect", ":first-child").attr("class", "boundary-tab system-boundary-package-tab label-container").attr("style", S).attr("x", N).attr("y", P).attr("width", R).attr("height", L);
347
+ let { subGraphTitleTopMargin: B } = h(p);
348
+ return T === "package" ? O.attr("transform", `translate(${N + (R - A.width) / 2}, ${P + (L - A.height) / 2})`) : O.attr("transform", `translate(${i.x - A.width / 2}, ${P + B})`), x && (O.attr("style", x), O.select("span").attr("style", x)), i.offsetX = 0, i.width = j, i.height = M, i.offsetY = A.height - i.padding / 2, i.labelBBox = A, i.intersect = function(e) {
349
+ return f(i, e);
350
+ }, {
351
+ cluster: E,
352
+ labelBBox: A
353
+ };
354
+ }, "usecaseSystemBoundary"),
355
+ swimlane: g
356
+ }, E = /* @__PURE__ */ new Set(["noteGroup", "divider"]), D = /* @__PURE__ */ n((e) => !E.has(e ?? "rect"), "clusterPaintsTitle"), O = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ n(async (e, t) => {
357
+ let n = await T[t.shape || "rect"](e, t);
358
+ return O.set(t.id, n), n;
359
+ }, "insertCluster"), A = /* @__PURE__ */ n(() => {
360
+ O = /* @__PURE__ */ new Map();
361
+ }, "clear");
362
+ //#endregion
363
+ export { D as n, k as r, A as t };
@@ -0,0 +1,12 @@
1
+ import { n as e } from "./chunk-Y2CYZVJY-BYzrzvCI.js";
2
+ //#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-J5ZVWO5B.mjs
3
+ var t = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), n = 12, r = 64, i = /* @__PURE__ */ e((e) => Array.isArray(e) && e.length > 0, "hasPalette"), a = /* @__PURE__ */ e((e, n) => e != null && t.has(e) && i(n), "isColorTheme"), o = /^[\w-]+$/, s = /* @__PURE__ */ e((e) => {
4
+ let t = typeof e == "string" || typeof e == "number" ? String(e) : "";
5
+ return o.test(t) ? t : "classic";
6
+ }, "safeLook"), c = /* @__PURE__ */ e((e) => i(e) ? e.length : 0, "paletteSlotCount"), l = /* @__PURE__ */ e((e, t) => i(t) ? c(t) : typeof e == "number" && Number.isInteger(e) && e > 0 && e <= r ? e : n, "colorSlotCount"), u = /* @__PURE__ */ e((e, t, n, r) => {
7
+ if (t === void 0 || !a(n, r)) return;
8
+ let i = t % c(r);
9
+ e.attr("data-color-id", `color-${i}`);
10
+ }, "stampColorSlot");
11
+ //#endregion
12
+ export { c as a, a as i, l as n, s as o, i as r, u as s, t };
@@ -0,0 +1,8 @@
1
+ import { n as e } from "./chunk-Y2CYZVJY-BYzrzvCI.js";
2
+ //#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JWPE2WC7.mjs
3
+ function t(e, t) {
4
+ e.accDescr && t.setAccDescription?.(e.accDescr), e.accTitle && t.setAccTitle?.(e.accTitle), e.title && t.setDiagramTitle?.(e.title);
5
+ }
6
+ e(t, "populateCommonDb");
7
+ //#endregion
8
+ export { t };