for-humanity 0.11.0 → 0.13.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.
Files changed (226) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +16 -9
  3. package/dist/browser.js +16 -16
  4. package/dist/cli.css +2 -941
  5. package/dist/cli.js +92 -2290
  6. package/dist/config.js +1 -0
  7. package/dist/constant/copy.d.ts +100 -0
  8. package/dist/constant/site.d.ts +20 -0
  9. package/dist/constant/status.d.ts +19 -0
  10. package/dist/copy-C1uzvEnr.js +103 -0
  11. package/dist/group-path-XAThmzvC.js +10 -0
  12. package/dist/load-site-CbpLEhwu.js +2379 -0
  13. package/dist/logger-Dv1i9xSV.js +9 -0
  14. package/dist/mermaid/THIRD-PARTY-NOTICES.txt +3134 -0
  15. package/dist/mermaid/chunk--TN-qHgG.js +2 -0
  16. package/dist/mermaid/chunk-0kM1Lv4D.js +2 -0
  17. package/dist/mermaid/chunk-3FHei3pH.js +2001 -0
  18. package/dist/mermaid/chunk-3_2p2GqN.js +2 -0
  19. package/dist/mermaid/chunk-6HLei9i0.js +84 -0
  20. package/dist/mermaid/chunk-7Sz3kAwl.js +2214 -0
  21. package/dist/mermaid/chunk-7Tarqbpa.js +18047 -0
  22. package/dist/mermaid/chunk-9kkt8lzL.js +10 -0
  23. package/dist/mermaid/chunk-B--pNBQF.js +884 -0
  24. package/dist/mermaid/chunk-B4F-pysn.js +4241 -0
  25. package/dist/mermaid/chunk-B58sEIY_.js +14 -0
  26. package/dist/mermaid/chunk-B9_UWzSH.js +1517 -0
  27. package/dist/mermaid/chunk-BB8uZHwY.js +75 -0
  28. package/dist/mermaid/chunk-BFfk0LEc.js +717 -0
  29. package/dist/mermaid/chunk-BKri0qr7.js +89 -0
  30. package/dist/mermaid/chunk-BL404pH5.js +26 -0
  31. package/dist/mermaid/chunk-BLeiQSWo.js +354 -0
  32. package/dist/mermaid/chunk-BOmH_UFd.js +2 -0
  33. package/dist/mermaid/chunk-BSej9Nhy.js +1361 -0
  34. package/dist/mermaid/chunk-BYzrzvCI.js +12 -0
  35. package/dist/mermaid/chunk-BariMtWr.js +3020 -0
  36. package/dist/mermaid/chunk-BcrBoMwH.js +2352 -0
  37. package/dist/mermaid/chunk-Bok8z-Yo.js +67 -0
  38. package/dist/mermaid/chunk-BpTHLKQM.js +1970 -0
  39. package/dist/mermaid/chunk-BqjuxRsC.js +733 -0
  40. package/dist/mermaid/chunk-BuvPd-s5.js +1073 -0
  41. package/dist/mermaid/chunk-BvVehae3.js +5069 -0
  42. package/dist/mermaid/chunk-C-JABYpd.js +3075 -0
  43. package/dist/mermaid/chunk-C9XlTm4w.js +2 -0
  44. package/dist/mermaid/chunk-CApNbSU9.js +6 -0
  45. package/dist/mermaid/chunk-CCM2AH-C.js +9 -0
  46. package/dist/mermaid/chunk-CD1E0F_N.js +2 -0
  47. package/dist/mermaid/chunk-CDWvKG7D.js +2 -0
  48. package/dist/mermaid/chunk-CEVPpC1F.js +34 -0
  49. package/dist/mermaid/chunk-CLDr12lf.js +47504 -0
  50. package/dist/mermaid/chunk-CLVYqOBI.js +61 -0
  51. package/dist/mermaid/chunk-CLeOkFb5.js +15 -0
  52. package/dist/mermaid/chunk-CLgRAtOz.js +37 -0
  53. package/dist/mermaid/chunk-CMqFNUBl.js +134 -0
  54. package/dist/mermaid/chunk-CTPaBJXB.js +2 -0
  55. package/dist/mermaid/chunk-CVi6IGBL.js +2 -0
  56. package/dist/mermaid/chunk-CWV_EN-4.js +4745 -0
  57. package/dist/mermaid/chunk-CZ0dAs3g.js +2 -0
  58. package/dist/mermaid/chunk-C_YGy4Fn.js +236 -0
  59. package/dist/mermaid/chunk-CcVH22Yt.js +100 -0
  60. package/dist/mermaid/chunk-CgG6CD9_.js +7175 -0
  61. package/dist/mermaid/chunk-CgOP6IDB.js +3397 -0
  62. package/dist/mermaid/chunk-Cgg2UTSf.js +13 -0
  63. package/dist/mermaid/chunk-ChJfJJ1A.js +214 -0
  64. package/dist/mermaid/chunk-Ck5XRA46.js +447 -0
  65. package/dist/mermaid/chunk-Ckuw16cl.js +203 -0
  66. package/dist/mermaid/chunk-CpAbRCbF.js +1880 -0
  67. package/dist/mermaid/chunk-CuYekbSv.js +2 -0
  68. package/dist/mermaid/chunk-CwS4wZ5a.js +2 -0
  69. package/dist/mermaid/chunk-D-bcrBO3.js +82 -0
  70. package/dist/mermaid/chunk-D3IEAkCW.js +76 -0
  71. package/dist/mermaid/chunk-D8XfBJ_K.js +645 -0
  72. package/dist/mermaid/chunk-D9Ddd9y4.js +2228 -0
  73. package/dist/mermaid/chunk-DBh1mIbK.js +12 -0
  74. package/dist/mermaid/chunk-DD6Df6Ic.js +5 -0
  75. package/dist/mermaid/chunk-DGVDaXjx.js +8 -0
  76. package/dist/mermaid/chunk-DK9KqIXj.js +632 -0
  77. package/dist/mermaid/chunk-DORnIAsy.js +4487 -0
  78. package/dist/mermaid/chunk-DU69_VcF.js +363 -0
  79. package/dist/mermaid/chunk-DVNvSFoz.js +2144 -0
  80. package/dist/mermaid/chunk-DZe-4kde.js +20 -0
  81. package/dist/mermaid/chunk-D_a06Rz4.js +287 -0
  82. package/dist/mermaid/chunk-DfyFJJi2.js +972 -0
  83. package/dist/mermaid/chunk-DhKYPp1Z.js +2 -0
  84. package/dist/mermaid/chunk-DjFqgNTG.js +94 -0
  85. package/dist/mermaid/chunk-DmbDDrr-.js +65 -0
  86. package/dist/mermaid/chunk-DpuxlyL_.js +696 -0
  87. package/dist/mermaid/chunk-DqGhppWe.js +2 -0
  88. package/dist/mermaid/chunk-DqPZxHXa.js +5 -0
  89. package/dist/mermaid/chunk-Dt_1Jyif.js +293 -0
  90. package/dist/mermaid/chunk-DyQBE_NW.js +1935 -0
  91. package/dist/mermaid/chunk-JckyC4mW.js +1009 -0
  92. package/dist/mermaid/chunk-K7Myuj2-.js +1334 -0
  93. package/dist/mermaid/chunk-KuPYb48V.js +275 -0
  94. package/dist/mermaid/chunk-MFVRUoO0.js +4020 -0
  95. package/dist/mermaid/chunk-MbInCS_6.js +28 -0
  96. package/dist/mermaid/chunk-MexOLyKV.js +355 -0
  97. package/dist/mermaid/chunk-NnbDtJzg.js +21856 -0
  98. package/dist/mermaid/chunk-SGpOYZbI.js +2139 -0
  99. package/dist/mermaid/chunk-TbxLDlcU.js +198 -0
  100. package/dist/mermaid/chunk-TftHqGLg.js +490 -0
  101. package/dist/mermaid/chunk-UjQ8vA_Z.js +4138 -0
  102. package/dist/mermaid/chunk-YgmVTKqc.js +16 -0
  103. package/dist/mermaid/chunk-_a9EZE1v.js +1798 -0
  104. package/dist/mermaid/chunk-dTb8jqeP.js +2 -0
  105. package/dist/mermaid/chunk-fFdMfF8S.js +2240 -0
  106. package/dist/mermaid/chunk-feYbMzBj.js +1267 -0
  107. package/dist/mermaid/chunk-g3Pn8DkW.js +46 -0
  108. package/dist/mermaid/chunk-hM77LvCb.js +19832 -0
  109. package/dist/mermaid/chunk-hUDb-eAW.js +527 -0
  110. package/dist/mermaid/chunk-tpABtZ-3.js +4252 -0
  111. package/dist/mermaid/chunk-xIbz3oFK.js +59 -0
  112. package/dist/mermaid/chunk-yBz-vst0.js +976 -0
  113. package/dist/mermaid/mermaid-BhtR3wyB.js +1145 -0
  114. package/dist/run-site-command-C80YoNOe.js +129 -0
  115. package/dist/site-config-bllORGpm.js +90 -0
  116. package/dist/site.js +1 -0
  117. package/dist/start-dev-server-C4_Lu1nZ.js +176 -0
  118. package/dist/to-change-queue-DbEnZGNK.js +34 -0
  119. package/dist/to-error-message-pF6_7wGK.js +16 -0
  120. package/dist/type/group-path.d.ts +7 -0
  121. package/dist/type/site-config.d.ts +57 -0
  122. package/package.json +34 -17
  123. package/src/component/widget/cursor-face/_constant/cursor-face.ts +0 -14
  124. package/src/component/widget/cursor-face/wg-cursor-face.css +0 -15
  125. package/src/component/widget/cursor-face/wg-cursor-face.tsx +0 -153
  126. package/src/component/widget/navigation/_constant/locale.ts +0 -9
  127. package/src/component/widget/navigation/_constant/navigation-data-schema.ts +0 -33
  128. package/src/component/widget/navigation/_constant/navigation.ts +0 -9
  129. package/src/component/widget/navigation/_constant/reading-line.ts +0 -4
  130. package/src/component/widget/navigation/_function/restore-navigation-scroll.ts +0 -59
  131. package/src/component/widget/navigation/_function/to-doc-groups/_to-doc-branches.ts +0 -15
  132. package/src/component/widget/navigation/_function/to-doc-groups/_to-doc-group-branches.ts +0 -70
  133. package/src/component/widget/navigation/_function/to-doc-groups/to-doc-groups.ts +0 -15
  134. package/src/component/widget/navigation/_function/to-navigation-data/_to-navigation-document.ts +0 -13
  135. package/src/component/widget/navigation/_function/to-navigation-data/_to-navigation-group.ts +0 -13
  136. package/src/component/widget/navigation/_function/to-navigation-data/to-navigation-data.ts +0 -18
  137. package/src/component/widget/navigation/_function/to-navigation-json.ts +0 -8
  138. package/src/component/widget/navigation/_function/to-toc-groups.ts +0 -38
  139. package/src/component/widget/navigation/_type/doc-branch.ts +0 -11
  140. package/src/component/widget/navigation/_type/doc-group.ts +0 -24
  141. package/src/component/widget/navigation/_type/navigation-data.ts +0 -75
  142. package/src/component/widget/navigation/_type/navigation-focus-snapshot.ts +0 -17
  143. package/src/component/widget/navigation/_type/toc-group.ts +0 -39
  144. package/src/component/widget/navigation/_wg-navigation-nav-list.css +0 -48
  145. package/src/component/widget/navigation/_wg-navigation-nav-list.tsx +0 -61
  146. package/src/component/widget/navigation/_wg-navigation-nav.css +0 -21
  147. package/src/component/widget/navigation/_wg-navigation-nav.tsx +0 -33
  148. package/src/component/widget/navigation/_wg-navigation-scroll.tsx +0 -117
  149. package/src/component/widget/navigation/_wg-navigation-toc.css +0 -91
  150. package/src/component/widget/navigation/_wg-navigation-toc.tsx +0 -114
  151. package/src/component/widget/navigation/wg-navigation.css +0 -282
  152. package/src/component/widget/navigation/wg-navigation.tsx +0 -420
  153. package/src/component/widget/prose/_constant/heading-highlight.ts +0 -4
  154. package/src/component/widget/prose/_constant/section.ts +0 -7
  155. package/src/component/widget/prose/_constant/status.ts +0 -9
  156. package/src/component/widget/prose/_function/has-block-content.ts +0 -30
  157. package/src/component/widget/prose/_function/rehype-head.ts +0 -31
  158. package/src/component/widget/prose/_function/rehype-sections/_to-section-headings.ts +0 -20
  159. package/src/component/widget/prose/_function/rehype-sections/rehype-sections.ts +0 -21
  160. package/src/component/widget/prose/_function/rehype-tables.ts +0 -22
  161. package/src/component/widget/prose/_function/remark-blocks.ts +0 -112
  162. package/src/component/widget/prose/_function/remark-flow.ts +0 -26
  163. package/src/component/widget/prose/_function/remark-links.ts +0 -33
  164. package/src/component/widget/prose/_function/remark-parts.ts +0 -26
  165. package/src/component/widget/prose/_function/remark-status.ts +0 -59
  166. package/src/component/widget/prose/_function/remark-swatch.ts +0 -16
  167. package/src/component/widget/prose/_function/remark-unknown-directives.ts +0 -25
  168. package/src/component/widget/prose/wg-prose.css +0 -454
  169. package/src/component/widget/prose/wg-prose.tsx +0 -43
  170. package/src/component/widget/shell/wg-shell.css +0 -63
  171. package/src/component/widget/shell/wg-shell.tsx +0 -88
  172. package/src/component/widget/shell-controls/wg-shell-controls.css +0 -4
  173. package/src/component/widget/shell-controls/wg-shell-controls.tsx +0 -170
  174. package/src/constant/asset.ts +0 -63
  175. package/src/constant/copy.ts +0 -133
  176. package/src/constant/doc.ts +0 -13
  177. package/src/constant/font.ts +0 -34
  178. package/src/constant/site.ts +0 -24
  179. package/src/constant/status.ts +0 -15
  180. package/src/entry/browser/browser.tsx +0 -22
  181. package/src/entry/cli/_constant/cli.ts +0 -19
  182. package/src/entry/cli/_constant/crawling.ts +0 -14
  183. package/src/entry/cli/_constant/snippet.ts +0 -21
  184. package/src/entry/cli/_function/create-app.tsx +0 -57
  185. package/src/entry/cli/_function/create-dev-app.ts +0 -87
  186. package/src/entry/cli/_function/create-processor/_rehype-assets.ts +0 -70
  187. package/src/entry/cli/_function/create-processor/_rehype-heading-ids.ts +0 -34
  188. package/src/entry/cli/_function/create-processor/_remark-report.ts +0 -15
  189. package/src/entry/cli/_function/create-processor/_remark-snippets.ts +0 -117
  190. package/src/entry/cli/_function/create-processor/_shiki-transformers.ts +0 -55
  191. package/src/entry/cli/_function/create-processor/create-processor.ts +0 -64
  192. package/src/entry/cli/_function/read-docs.ts +0 -128
  193. package/src/entry/cli/_function/read-home.ts +0 -32
  194. package/src/entry/cli/_function/to-crawling-app.ts +0 -42
  195. package/src/entry/cli/cli.test.ts +0 -782
  196. package/src/entry/cli/cli.ts +0 -206
  197. package/src/env.d.ts +0 -6
  198. package/src/page/doc/pg-doc.tsx +0 -35
  199. package/src/page/home/pg-home.tsx +0 -40
  200. package/src/store/navigation/create-navigation-stores.test.ts +0 -74
  201. package/src/store/navigation/create-navigation-stores.ts +0 -59
  202. package/src/store/navigation/navigation-state.ts +0 -36
  203. package/src/store/navigation/navigation-storage.ts +0 -9
  204. package/src/store/navigation/to-navigation-scroll-state.ts +0 -42
  205. package/src/style/base.css +0 -28
  206. package/src/style/token.css +0 -186
  207. package/src/type/doc-content.ts +0 -15
  208. package/src/type/doc-data.ts +0 -38
  209. package/src/type/doc-file-data.ts +0 -21
  210. package/src/type/doc-heading.ts +0 -17
  211. package/src/type/doc-outline.ts +0 -16
  212. package/src/type/doc-section.ts +0 -9
  213. package/src/type/doc.ts +0 -20
  214. package/src/type/group-path.ts +0 -7
  215. package/src/type/site-assets.ts +0 -25
  216. package/src/type/site-config.ts +0 -73
  217. package/src/type/vfile-data.d.ts +0 -10
  218. package/src/util/async/to-change-queue.test.ts +0 -58
  219. package/src/util/async/to-change-queue.ts +0 -43
  220. package/src/util/dom/find-hash-target.ts +0 -18
  221. package/src/util/dom/reveal-hash-target.ts +0 -15
  222. package/src/util/error/to-error-message.ts +0 -10
  223. package/src/util/file/to-asset-path.ts +0 -26
  224. package/src/util/font/to-font-css.test.ts +0 -41
  225. package/src/util/font/to-font-css.ts +0 -28
  226. package/src/util/mermaid/render-flow.js +0 -321
@@ -0,0 +1,527 @@
1
+ import { m as e, p as t } from "./chunk-DVNvSFoz.js";
2
+ import { n } from "./chunk-BYzrzvCI.js";
3
+ import { C as r, E as i, H as a, U as o, _ as s, a as c, c as l, f as u, q as d, v as f, y as p } from "./chunk-MFVRUoO0.js";
4
+ import { t as m } from "./chunk-DmbDDrr-.js";
5
+ import { t as h } from "./chunk-TbxLDlcU.js";
6
+ import { i as g } from "./chunk-K7Myuj2-.js";
7
+ import { t as _ } from "./chunk-B58sEIY_.js";
8
+ import { i as v, n as y } from "./chunk-Bok8z-Yo.js";
9
+ import { n as b } from "./chunk-DK9KqIXj.js";
10
+ import { t as x } from "./chunk-DGVDaXjx.js";
11
+ import { t as S } from "./chunk-BL404pH5.js";
12
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/count.js
13
+ function C(e) {
14
+ var t = 0, n = e.children, r = n && n.length;
15
+ if (!r) t = 1;
16
+ else for (; --r >= 0;) t += n[r].value;
17
+ e.value = t;
18
+ }
19
+ function w() {
20
+ return this.eachAfter(C);
21
+ }
22
+ //#endregion
23
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/each.js
24
+ function T(e, t) {
25
+ let n = -1;
26
+ for (let r of this) e.call(t, r, ++n, this);
27
+ return this;
28
+ }
29
+ //#endregion
30
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js
31
+ function E(e, t) {
32
+ for (var n = this, r = [n], i, a, o = -1; n = r.pop();) if (e.call(t, n, ++o, this), i = n.children) for (a = i.length - 1; a >= 0; --a) r.push(i[a]);
33
+ return this;
34
+ }
35
+ //#endregion
36
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js
37
+ function D(e, t) {
38
+ for (var n = this, r = [n], i = [], a, o, s, c = -1; n = r.pop();) if (i.push(n), a = n.children) for (o = 0, s = a.length; o < s; ++o) r.push(a[o]);
39
+ for (; n = i.pop();) e.call(t, n, ++c, this);
40
+ return this;
41
+ }
42
+ //#endregion
43
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/find.js
44
+ function O(e, t) {
45
+ let n = -1;
46
+ for (let r of this) if (e.call(t, r, ++n, this)) return r;
47
+ }
48
+ //#endregion
49
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/sum.js
50
+ function k(e) {
51
+ return this.eachAfter(function(t) {
52
+ for (var n = +e(t.data) || 0, r = t.children, i = r && r.length; --i >= 0;) n += r[i].value;
53
+ t.value = n;
54
+ });
55
+ }
56
+ //#endregion
57
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/sort.js
58
+ function A(e) {
59
+ return this.eachBefore(function(t) {
60
+ t.children && t.children.sort(e);
61
+ });
62
+ }
63
+ //#endregion
64
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/path.js
65
+ function j(e) {
66
+ for (var t = this, n = M(t, e), r = [t]; t !== n;) t = t.parent, r.push(t);
67
+ for (var i = r.length; e !== n;) r.splice(i, 0, e), e = e.parent;
68
+ return r;
69
+ }
70
+ function M(e, t) {
71
+ if (e === t) return e;
72
+ var n = e.ancestors(), r = t.ancestors(), i = null;
73
+ for (e = n.pop(), t = r.pop(); e === t;) i = e, e = n.pop(), t = r.pop();
74
+ return i;
75
+ }
76
+ //#endregion
77
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/ancestors.js
78
+ function N() {
79
+ for (var e = this, t = [e]; e = e.parent;) t.push(e);
80
+ return t;
81
+ }
82
+ //#endregion
83
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/descendants.js
84
+ function P() {
85
+ return Array.from(this);
86
+ }
87
+ //#endregion
88
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/leaves.js
89
+ function F() {
90
+ var e = [];
91
+ return this.eachBefore(function(t) {
92
+ t.children || e.push(t);
93
+ }), e;
94
+ }
95
+ //#endregion
96
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/links.js
97
+ function I() {
98
+ var e = this, t = [];
99
+ return e.each(function(n) {
100
+ n !== e && t.push({
101
+ source: n.parent,
102
+ target: n
103
+ });
104
+ }), t;
105
+ }
106
+ //#endregion
107
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/iterator.js
108
+ function* L() {
109
+ var e = this, t, n = [e], r, i, a;
110
+ do
111
+ for (t = n.reverse(), n = []; e = t.pop();) if (yield e, r = e.children) for (i = 0, a = r.length; i < a; ++i) n.push(r[i]);
112
+ while (n.length);
113
+ }
114
+ //#endregion
115
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/hierarchy/index.js
116
+ function R(e, t) {
117
+ e instanceof Map ? (e = [void 0, e], t === void 0 && (t = V)) : t === void 0 && (t = B);
118
+ for (var n = new W(e), r, i = [n], a, o, s, c; r = i.pop();) if ((o = t(r.data)) && (c = (o = Array.from(o)).length)) for (r.children = o, s = c - 1; s >= 0; --s) i.push(a = o[s] = new W(o[s])), a.parent = r, a.depth = r.depth + 1;
119
+ return n.eachBefore(U);
120
+ }
121
+ function z() {
122
+ return R(this).eachBefore(H);
123
+ }
124
+ function B(e) {
125
+ return e.children;
126
+ }
127
+ function V(e) {
128
+ return Array.isArray(e) ? e[1] : null;
129
+ }
130
+ function H(e) {
131
+ e.data.value !== void 0 && (e.value = e.data.value), e.data = e.data.data;
132
+ }
133
+ function U(e) {
134
+ var t = 0;
135
+ do
136
+ e.height = t;
137
+ while ((e = e.parent) && e.height < ++t);
138
+ }
139
+ function W(e) {
140
+ this.data = e, this.depth = this.height = 0, this.parent = null;
141
+ }
142
+ W.prototype = R.prototype = {
143
+ constructor: W,
144
+ count: w,
145
+ each: T,
146
+ eachAfter: D,
147
+ eachBefore: E,
148
+ find: O,
149
+ sum: k,
150
+ sort: A,
151
+ path: j,
152
+ ancestors: N,
153
+ descendants: P,
154
+ leaves: F,
155
+ links: I,
156
+ copy: z,
157
+ [Symbol.iterator]: L
158
+ };
159
+ //#endregion
160
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/accessors.js
161
+ function G(e) {
162
+ if (typeof e != "function") throw Error();
163
+ return e;
164
+ }
165
+ //#endregion
166
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/constant.js
167
+ function K() {
168
+ return 0;
169
+ }
170
+ function q(e) {
171
+ return function() {
172
+ return e;
173
+ };
174
+ }
175
+ //#endregion
176
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/treemap/round.js
177
+ function J(e) {
178
+ e.x0 = Math.round(e.x0), e.y0 = Math.round(e.y0), e.x1 = Math.round(e.x1), e.y1 = Math.round(e.y1);
179
+ }
180
+ //#endregion
181
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/treemap/dice.js
182
+ function ee(e, t, n, r, i) {
183
+ for (var a = e.children, o, s = -1, c = a.length, l = e.value && (r - t) / e.value; ++s < c;) o = a[s], o.y0 = n, o.y1 = i, o.x0 = t, o.x1 = t += o.value * l;
184
+ }
185
+ //#endregion
186
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/treemap/slice.js
187
+ function te(e, t, n, r, i) {
188
+ for (var a = e.children, o, s = -1, c = a.length, l = e.value && (i - n) / e.value; ++s < c;) o = a[s], o.x0 = t, o.x1 = r, o.y0 = n, o.y1 = n += o.value * l;
189
+ }
190
+ //#endregion
191
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/treemap/squarify.js
192
+ var ne = (1 + Math.sqrt(5)) / 2;
193
+ function re(e, t, n, r, i, a) {
194
+ for (var o = [], s = t.children, c, l, u = 0, d = 0, f = s.length, p, m, h = t.value, g, _, v, y, b, x, S; u < f;) {
195
+ p = i - n, m = a - r;
196
+ do
197
+ g = s[d++].value;
198
+ while (!g && d < f);
199
+ for (_ = v = g, x = Math.max(m / p, p / m) / (h * e), S = g * g * x, b = Math.max(v / S, S / _); d < f; ++d) {
200
+ if (g += l = s[d].value, l < _ && (_ = l), l > v && (v = l), S = g * g * x, y = Math.max(v / S, S / _), y > b) {
201
+ g -= l;
202
+ break;
203
+ }
204
+ b = y;
205
+ }
206
+ o.push(c = {
207
+ value: g,
208
+ dice: p < m,
209
+ children: s.slice(u, d)
210
+ }), c.dice ? ee(c, n, r, i, h ? r += m * g / h : a) : te(c, n, r, h ? n += p * g / h : i, a), h -= g, u = d;
211
+ }
212
+ return o;
213
+ }
214
+ var ie = (function e(t) {
215
+ function n(e, n, r, i, a) {
216
+ re(t, e, n, r, i, a);
217
+ }
218
+ return n.ratio = function(t) {
219
+ return e((t = +t) > 1 ? t : 1);
220
+ }, n;
221
+ })(ne);
222
+ //#endregion
223
+ //#region node_modules/.pnpm/d3-hierarchy@3.1.2/node_modules/d3-hierarchy/src/treemap/index.js
224
+ function ae() {
225
+ var e = ie, t = !1, n = 1, r = 1, i = [0], a = K, o = K, s = K, c = K, l = K;
226
+ function u(e) {
227
+ return e.x0 = e.y0 = 0, e.x1 = n, e.y1 = r, e.eachBefore(d), i = [0], t && e.eachBefore(J), e;
228
+ }
229
+ function d(t) {
230
+ var n = i[t.depth], r = t.x0 + n, u = t.y0 + n, d = t.x1 - n, f = t.y1 - n;
231
+ d < r && (r = d = (r + d) / 2), f < u && (u = f = (u + f) / 2), t.x0 = r, t.y0 = u, t.x1 = d, t.y1 = f, t.children && (n = i[t.depth + 1] = a(t) / 2, r += l(t) - n, u += o(t) - n, d -= s(t) - n, f -= c(t) - n, d < r && (r = d = (r + d) / 2), f < u && (u = f = (u + f) / 2), e(t, r, u, d, f));
232
+ }
233
+ return u.round = function(e) {
234
+ return arguments.length ? (t = !!e, u) : t;
235
+ }, u.size = function(e) {
236
+ return arguments.length ? (n = +e[0], r = +e[1], u) : [n, r];
237
+ }, u.tile = function(t) {
238
+ return arguments.length ? (e = G(t), u) : e;
239
+ }, u.padding = function(e) {
240
+ return arguments.length ? u.paddingInner(e).paddingOuter(e) : u.paddingInner();
241
+ }, u.paddingInner = function(e) {
242
+ return arguments.length ? (a = typeof e == "function" ? e : q(+e), u) : a;
243
+ }, u.paddingOuter = function(e) {
244
+ return arguments.length ? u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e) : u.paddingTop();
245
+ }, u.paddingTop = function(e) {
246
+ return arguments.length ? (o = typeof e == "function" ? e : q(+e), u) : o;
247
+ }, u.paddingRight = function(e) {
248
+ return arguments.length ? (s = typeof e == "function" ? e : q(+e), u) : s;
249
+ }, u.paddingBottom = function(e) {
250
+ return arguments.length ? (c = typeof e == "function" ? e : q(+e), u) : c;
251
+ }, u.paddingLeft = function(e) {
252
+ return arguments.length ? (l = typeof e == "function" ? e : q(+e), u) : l;
253
+ }, u;
254
+ }
255
+ //#endregion
256
+ //#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-CBK3MWTC.mjs
257
+ var Y = class {
258
+ constructor() {
259
+ this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = o, this.getAccTitle = f, this.setDiagramTitle = d, this.getDiagramTitle = r, this.getAccDescription = s, this.setAccDescription = a;
260
+ }
261
+ static {
262
+ n(this, "TreeMapDB");
263
+ }
264
+ getNodes() {
265
+ return this.nodes;
266
+ }
267
+ getConfig() {
268
+ let e = u, t = p();
269
+ return g({
270
+ ...e.treemap,
271
+ ...t.treemap ?? {}
272
+ });
273
+ }
274
+ addNode(e, t) {
275
+ this.nodes.push(e), this.levels.set(e, t), t === 0 && (this.outerNodes.push(e), this.root ??= e);
276
+ }
277
+ getRoot() {
278
+ return {
279
+ name: "",
280
+ children: this.outerNodes
281
+ };
282
+ }
283
+ addClass(e, t) {
284
+ let n = this.classes.get(e) ?? {
285
+ id: e,
286
+ styles: [],
287
+ textStyles: []
288
+ }, r = t.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
289
+ r && r.forEach((e) => {
290
+ y(e) && (n?.textStyles ? n.textStyles.push(e) : n.textStyles = [e]), n?.styles ? n.styles.push(e) : n.styles = [e];
291
+ }), this.classes.set(e, n);
292
+ }
293
+ getClasses() {
294
+ return this.classes;
295
+ }
296
+ getStylesForClass(e) {
297
+ return this.classes.get(e)?.styles ?? [];
298
+ }
299
+ clear() {
300
+ c(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
301
+ }
302
+ };
303
+ function X(e) {
304
+ if (!e.length) return [];
305
+ let t = [], n = [];
306
+ return e.forEach((e) => {
307
+ let r = {
308
+ name: e.name,
309
+ children: e.type === "Leaf" ? void 0 : []
310
+ };
311
+ for (r.classSelector = e?.classSelector, e?.cssCompiledStyles && (r.cssCompiledStyles = e.cssCompiledStyles), e.type === "Leaf" && e.value !== void 0 && (r.value = e.value); n.length > 0 && n[n.length - 1].level >= e.level;) n.pop();
312
+ if (n.length === 0) t.push(r);
313
+ else {
314
+ let e = n[n.length - 1].node;
315
+ e.children ? e.children.push(r) : e.children = [r];
316
+ }
317
+ e.type !== "Leaf" && n.push({
318
+ node: r,
319
+ level: e.level
320
+ });
321
+ }), t;
322
+ }
323
+ n(X, "buildHierarchy");
324
+ var oe = /* @__PURE__ */ n((e, t) => {
325
+ x(e, t);
326
+ let r = [];
327
+ for (let n of e.TreemapRows ?? []) n.$type === "ClassDefStatement" && t.addClass(n.className ?? "", n.styleText ?? "");
328
+ for (let n of e.TreemapRows ?? []) {
329
+ let e = n.item;
330
+ if (!e) continue;
331
+ let i = n.indent ? parseInt(n.indent) : 0, a = se(e), o = e.classSelector ? t.getStylesForClass(e.classSelector) : [], s = o.length > 0 ? o : void 0, c = {
332
+ level: i,
333
+ name: a,
334
+ type: e.$type,
335
+ value: e.value,
336
+ classSelector: e.classSelector,
337
+ cssCompiledStyles: s
338
+ };
339
+ r.push(c);
340
+ }
341
+ let i = X(r), a = /* @__PURE__ */ n((e, n) => {
342
+ for (let r of e) t.addNode(r, n), r.children && r.children.length > 0 && a(r.children, n + 1);
343
+ }, "addNodesRecursively");
344
+ a(i, 0);
345
+ }, "populate"), se = /* @__PURE__ */ n((e) => e.name ? String(e.name) : "", "getItemName"), Z = {
346
+ parser: { yy: void 0 },
347
+ parse: /* @__PURE__ */ n(async (t) => {
348
+ try {
349
+ let n = await b("treemap", t);
350
+ e.debug("Treemap AST:", n);
351
+ let r = Z.parser?.yy;
352
+ if (!(r instanceof Y)) throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
353
+ oe(n, r);
354
+ } catch (t) {
355
+ throw e.error("Error parsing treemap:", t), t;
356
+ }
357
+ }, "parse")
358
+ }, ce = 10, Q = 10, $ = 25, le = {
359
+ draw: /* @__PURE__ */ n((r, i, a, o) => {
360
+ let s = o.db, c = s.getConfig(), u = c.padding ?? ce, d = s.getDiagramTitle(), f = s.getRoot(), { themeVariables: g } = p();
361
+ if (!f) return;
362
+ let y = d ? 30 : 0, b = _(i), x = c.nodeWidth ? c.nodeWidth * Q : 960, C = c.nodeHeight ? c.nodeHeight * Q : 500, w = x, T = C + y;
363
+ b.attr("viewBox", `0 0 ${w} ${T}`), l(b, T, w, c.useMaxWidth);
364
+ let E;
365
+ try {
366
+ let e = c.valueFormat || ",";
367
+ if (e === "$0,0") E = /* @__PURE__ */ n((e) => "$" + h(",")(e), "valueFormat");
368
+ else if (e.startsWith("$") && e.includes(",")) {
369
+ let t = /\.\d+/.exec(e), r = t ? t[0] : "";
370
+ E = /* @__PURE__ */ n((e) => "$" + h("," + r)(e), "valueFormat");
371
+ } else if (e.startsWith("$")) {
372
+ let t = e.substring(1);
373
+ E = /* @__PURE__ */ n((e) => "$" + h(t || "")(e), "valueFormat");
374
+ } else E = h(e);
375
+ } catch (t) {
376
+ e.error("Error creating format function:", t), E = h(",");
377
+ }
378
+ let D = m().range([
379
+ "transparent",
380
+ g.cScale0,
381
+ g.cScale1,
382
+ g.cScale2,
383
+ g.cScale3,
384
+ g.cScale4,
385
+ g.cScale5,
386
+ g.cScale6,
387
+ g.cScale7,
388
+ g.cScale8,
389
+ g.cScale9,
390
+ g.cScale10,
391
+ g.cScale11
392
+ ]), O = m().range([
393
+ "transparent",
394
+ g.cScalePeer0,
395
+ g.cScalePeer1,
396
+ g.cScalePeer2,
397
+ g.cScalePeer3,
398
+ g.cScalePeer4,
399
+ g.cScalePeer5,
400
+ g.cScalePeer6,
401
+ g.cScalePeer7,
402
+ g.cScalePeer8,
403
+ g.cScalePeer9,
404
+ g.cScalePeer10,
405
+ g.cScalePeer11
406
+ ]), k = m().range([
407
+ g.cScaleLabel0,
408
+ g.cScaleLabel1,
409
+ g.cScaleLabel2,
410
+ g.cScaleLabel3,
411
+ g.cScaleLabel4,
412
+ g.cScaleLabel5,
413
+ g.cScaleLabel6,
414
+ g.cScaleLabel7,
415
+ g.cScaleLabel8,
416
+ g.cScaleLabel9,
417
+ g.cScaleLabel10,
418
+ g.cScaleLabel11
419
+ ]);
420
+ d && b.append("text").attr("x", w / 2).attr("y", y / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(d);
421
+ let A = b.append("g").attr("transform", `translate(0, ${y})`).attr("class", "treemapContainer"), j = R(f).sum((e) => e.value ?? 0).sort((e, t) => (t.value ?? 0) - (e.value ?? 0)), M = ae().size([x, C]).paddingTop((e) => e.children && e.children.length > 0 ? $ + Q : 0).paddingInner(u).paddingLeft((e) => e.children && e.children.length > 0 ? Q : 0).paddingRight((e) => e.children && e.children.length > 0 ? Q : 0).paddingBottom((e) => e.children && e.children.length > 0 ? Q : 0).round(!0)(j), N = M.descendants().filter((e) => e.children && e.children.length > 0), P = A.selectAll(".treemapSection").data(N).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
422
+ P.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", $).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", .6).attr("stroke-width", .6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), P.append("clipPath").attr("id", (e, t) => `clip-section-${i}-${t}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", $), P.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, t) => `treemapSection section${t}`).attr("fill", (e) => D(e.data.name)).attr("fill-opacity", .6).attr("stroke", (e) => O(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", .4).attr("style", (e) => {
423
+ if (e.depth === 0) return "display: none;";
424
+ let t = v({ cssCompiledStyles: e.data.cssCompiledStyles });
425
+ return t.nodeStyles + ";" + t.borderStyles.join(";");
426
+ }), P.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", $ / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("clip-path", (e, t) => `url(#clip-section-${i}-${t})`).attr("style", (e) => e.depth === 0 ? "display: none;" : "dominant-baseline: middle; font-size: 12px; fill:" + k(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" + v({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).each(function(e) {
427
+ if (e.depth === 0) return;
428
+ let n = t(this), r = e.data.name;
429
+ n.text(r);
430
+ let i = e.x1 - e.x0, a;
431
+ a = c.showValues !== !1 && e.value ? i - 10 - 30 - 10 - 6 : i - 6 - 6;
432
+ let o = Math.max(15, a), s = n.node();
433
+ if (s.getComputedTextLength() > o) {
434
+ let e = r;
435
+ for (; e.length > 0;) {
436
+ if (e = r.substring(0, e.length - 1), e.length === 0) {
437
+ n.text("..."), s.getComputedTextLength() > o && n.text("");
438
+ break;
439
+ }
440
+ if (n.text(e + "..."), s.getComputedTextLength() <= o) break;
441
+ }
442
+ }
443
+ }), c.showValues !== !1 && P.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", $ / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? E(e.value) : "").attr("font-style", "italic").attr("style", (e) => e.depth === 0 ? "display: none;" : "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + k(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" + v({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:"));
444
+ let F = M.leaves(), I = F.length > 20, L = I ? 16 : 38, z = I ? 14 : 28, B = I ? 4 : 8, V = I ? 4 : 6, H = I ? 2 : 4, U = I ? 8 : 10, W = I ? 1 : 2, G = A.selectAll(".treemapLeafGroup").data(F).enter().append("g").attr("class", (e, t) => `treemapNode treemapLeafGroup leaf${t}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
445
+ G.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? D(e.parent.data.name) : D(e.data.name)).attr("style", (e) => v({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", .3).attr("stroke", (e) => e.parent ? D(e.parent.data.name) : D(e.data.name)).attr("stroke-width", 3), G.append("clipPath").attr("id", (e, t) => `clip-${i}-${t}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), G.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => `text-anchor: middle; dominant-baseline: middle; font-size: ${L}px;fill:` + k(e.data.name) + ";" + v({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).attr("clip-path", (e, t) => `url(#clip-${i}-${t})`).text((e) => e.data.name).each(function(e) {
446
+ let n = t(this), r = e.x1 - e.x0, i = e.y1 - e.y0, a = n.node(), o = r - 2 * H, s = i - 2 * H;
447
+ if (o < U || s < U) {
448
+ n.style("display", "none");
449
+ return;
450
+ }
451
+ let c = parseInt(n.style("font-size"), 10), l = .6;
452
+ for (; a.getComputedTextLength() > o && c > B;) c--, n.style("font-size", `${c}px`);
453
+ let u = Math.max(V, Math.min(z, Math.round(c * l))), d = c + W + u;
454
+ for (; d > s && c > B && (c--, u = Math.max(V, Math.min(z, Math.round(c * l))), !(u < V && c === B));) n.style("font-size", `${c}px`), d = c + W + u;
455
+ n.style("font-size", `${c}px`), I ? (c < B || s < B) && n.style("display", "none") : (a.getComputedTextLength() > o || c < B || s < c) && n.style("display", "none");
456
+ }), c.showValues !== !1 && G.append("text").attr("class", "treemapValue").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", function(e) {
457
+ return (e.y1 - e.y0) / 2;
458
+ }).attr("style", (e) => `text-anchor: middle; dominant-baseline: hanging; font-size: ${z}px;fill:` + k(e.data.name) + ";" + v({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).attr("clip-path", (e, t) => `url(#clip-${i}-${t})`).text((e) => e.value ? E(e.value) : "").each(function(e) {
459
+ let n = t(this), r = this.parentNode;
460
+ if (!r) {
461
+ n.style("display", "none");
462
+ return;
463
+ }
464
+ let i = t(r).select(".treemapLabel");
465
+ if (i.empty() || i.style("display") === "none") {
466
+ n.style("display", "none");
467
+ return;
468
+ }
469
+ let a = parseFloat(i.style("font-size")), o = Math.max(V, Math.min(z, Math.round(a * .6)));
470
+ n.style("font-size", `${o}px`);
471
+ let s = (e.y1 - e.y0) / 2 + a / 2 + W;
472
+ n.attr("y", s);
473
+ let c = e.x1 - e.x0, l = e.y1 - e.y0 - 4, u = c - 2 * H;
474
+ n.node().getComputedTextLength() > u || s + o > l || o < V ? n.style("display", "none") : n.style("display", null);
475
+ });
476
+ let K = c.diagramPadding ?? 8;
477
+ S(b, K, "flowchart", c?.useMaxWidth || !1);
478
+ }, "draw"),
479
+ getClasses: /* @__PURE__ */ n(function(e, t) {
480
+ return t.db.getClasses();
481
+ }, "getClasses")
482
+ }, ue = {
483
+ sectionStrokeColor: "black",
484
+ sectionStrokeWidth: "1",
485
+ sectionFillColor: "#efefef",
486
+ leafStrokeColor: "black",
487
+ leafStrokeWidth: "1",
488
+ leafFillColor: "#efefef",
489
+ labelFontSize: "12px",
490
+ valueFontSize: "10px",
491
+ titleFontSize: "14px"
492
+ }, de = {
493
+ parser: Z,
494
+ get db() {
495
+ return new Y();
496
+ },
497
+ renderer: le,
498
+ styles: /* @__PURE__ */ n(({ treemap: e } = {}) => {
499
+ let t = i(), n = p(), r = g(t, n.themeVariables), a = g(ue, e), o = a.titleColor ?? r.titleColor, s = a.labelColor ?? r.textColor, c = a.valueColor ?? r.textColor;
500
+ return `
501
+ .treemapNode.section {
502
+ stroke: ${a.sectionStrokeColor};
503
+ stroke-width: ${a.sectionStrokeWidth};
504
+ fill: ${a.sectionFillColor};
505
+ }
506
+ .treemapNode.leaf {
507
+ stroke: ${a.leafStrokeColor};
508
+ stroke-width: ${a.leafStrokeWidth};
509
+ fill: ${a.leafFillColor};
510
+ }
511
+ .treemapLabel {
512
+ fill: ${s};
513
+ font-size: ${a.labelFontSize};
514
+ }
515
+ .treemapValue {
516
+ fill: ${c};
517
+ font-size: ${a.valueFontSize};
518
+ }
519
+ .treemapTitle {
520
+ fill: ${o};
521
+ font-size: ${a.titleFontSize};
522
+ }
523
+ `;
524
+ }, "getStyles")
525
+ };
526
+ //#endregion
527
+ export { de as diagram };