@pi-outpost/embed 0.60.1 → 0.62.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 (153) hide show
  1. package/README.md +4 -0
  2. package/dist/{abnfDiagram-S7VZAUFO-BdOzCXh1.js → abnfDiagram-S7VZAUFO-BvdbTr4n.js} +2 -2
  3. package/dist/{abnfDiagram-S7VZAUFO-zyFnpqZ0.cjs → abnfDiagram-S7VZAUFO-C14iOswH.cjs} +1 -1
  4. package/dist/{architectureDiagram-YGSQEFNW-DiYOcBqo.js → architectureDiagram-YGSQEFNW-CPW5HJ_P.js} +20 -20
  5. package/dist/{architectureDiagram-YGSQEFNW-gEzRb5xY.cjs → architectureDiagram-YGSQEFNW-CfDEcnft.cjs} +3 -3
  6. package/dist/{blockDiagram-APKKGZFW-CIX-8mpK.js → blockDiagram-APKKGZFW-C4ig73DE.js} +5 -5
  7. package/dist/{blockDiagram-APKKGZFW-KL3nQT0s.cjs → blockDiagram-APKKGZFW-DLTDUF2F.cjs} +1 -1
  8. package/dist/{c4Diagram-KJ2TOQU5-BS_M90FN.js → c4Diagram-KJ2TOQU5-BViiS4eZ.js} +4 -4
  9. package/dist/{c4Diagram-KJ2TOQU5-D-dCJWvI.cjs → c4Diagram-KJ2TOQU5-BZrZGJnq.cjs} +1 -1
  10. package/dist/chunk-6MUBBAK2-Do5Y2VaL.js +631 -0
  11. package/dist/chunk-6MUBBAK2-fxSdrddJ.cjs +2 -0
  12. package/dist/{chunk-AXFCVDMN-DrVQa3gP.js → chunk-AXFCVDMN-BTcT9L5T.js} +196 -196
  13. package/dist/{chunk-AXFCVDMN-B6dhmE32.cjs → chunk-AXFCVDMN-DSN0_Pz7.cjs} +7 -7
  14. package/dist/{chunk-DQASFODM-DAaU7yoa.js → chunk-DQASFODM-BjATojAo.js} +30 -30
  15. package/dist/chunk-DQASFODM-GtaZ5zZF.cjs +10 -0
  16. package/dist/{chunk-HFQBQIA3-lOxrhpos.cjs → chunk-HFQBQIA3-Bt4zc3D1.cjs} +1 -1
  17. package/dist/{chunk-HFQBQIA3-DqHSeXIz.js → chunk-HFQBQIA3-l7lNC9FO.js} +1 -1
  18. package/dist/{chunk-KQLB2F66-C7twW9LJ.js → chunk-KQLB2F66-P-DwEW1U.js} +5 -5
  19. package/dist/{chunk-KQLB2F66-Ec2IAtUR.cjs → chunk-KQLB2F66-xBZn8cMv.cjs} +1 -1
  20. package/dist/{chunk-KS47KZWR-OD3AMBe8.js → chunk-KS47KZWR-Ca0eP7K6.js} +1 -1
  21. package/dist/{chunk-KS47KZWR-C7Yv0kfF.cjs → chunk-KS47KZWR-DLYUwvq1.cjs} +1 -1
  22. package/dist/{chunk-LEVMRMFU-BFGXlIAt.cjs → chunk-LEVMRMFU-8QpYqPF4.cjs} +1 -1
  23. package/dist/{chunk-LEVMRMFU-NLMudZfn.js → chunk-LEVMRMFU-DXj_Ks_M.js} +2 -2
  24. package/dist/{chunk-M57EVK23-BSZ7OEGY.cjs → chunk-M57EVK23-Cvl56jvK.cjs} +1 -1
  25. package/dist/{chunk-M57EVK23-C8-Jp43x.js → chunk-M57EVK23-D_qW99As.js} +3 -3
  26. package/dist/{chunk-OY52VR5R-B7NRk2-S.js → chunk-OY52VR5R-DAhIWmSX.js} +1 -1
  27. package/dist/{chunk-OY52VR5R-CvyV3pJF.cjs → chunk-OY52VR5R-DoFojbud.cjs} +1 -1
  28. package/dist/{chunk-QB3YPZ4I-DaIXN7QF.cjs → chunk-QB3YPZ4I-CcobelQp.cjs} +1 -1
  29. package/dist/{chunk-QB3YPZ4I-DPQ26dC9.js → chunk-QB3YPZ4I-DZ4KU0AI.js} +5 -5
  30. package/dist/{chunk-STOXU5M4-0WKKmqbF.js → chunk-STOXU5M4-CcGFpnKt.js} +7 -7
  31. package/dist/{chunk-STOXU5M4-CmoaBap6.cjs → chunk-STOXU5M4-_pvE8f8d.cjs} +2 -2
  32. package/dist/{classDiagram-v2-L25IHNXF-CAts0vNW.js → classDiagram-v2-L25IHNXF-CoK-3RrH.js} +8 -8
  33. package/dist/{classDiagram-v2-L25IHNXF-CAbdJ2_W.cjs → classDiagram-v2-L25IHNXF-DUh5AzbW.cjs} +1 -1
  34. package/dist/{conversationExport-DaPkz-Eh.cjs → conversationExport-DXxmgLoF.cjs} +7 -7
  35. package/dist/{conversationExport-C761zW6H.js → conversationExport-jRLUX0kH.js} +217 -205
  36. package/dist/{conversationHistory-DhOtJoSk.js → conversationHistory-3pDBlkZZ.js} +103 -11
  37. package/dist/{conversationHistory-V6AR3Ga4.cjs → conversationHistory-C6PqGsO9.cjs} +5 -5
  38. package/dist/{cynefinDiagram-L36ESFBY-CrsJmb7x.cjs → cynefinDiagram-L36ESFBY-BLUfdwhj.cjs} +1 -1
  39. package/dist/{cynefinDiagram-L36ESFBY-ByHpHKCc.js → cynefinDiagram-L36ESFBY-COLv504g.js} +7 -7
  40. package/dist/{dagre-SPEB5RXH-C01_UMxx.js → dagre-SPEB5RXH-CohPsDHQ.js} +7 -7
  41. package/dist/{dagre-SPEB5RXH-ExCiSqVu.cjs → dagre-SPEB5RXH-DF8bZfUb.cjs} +1 -1
  42. package/dist/{diagram-3B7GL73J-CRNoSH2i.cjs → diagram-3B7GL73J-CFwrYkyI.cjs} +1 -1
  43. package/dist/{diagram-3B7GL73J-D7i6eGGQ.js → diagram-3B7GL73J-w28Iaq_1.js} +8 -8
  44. package/dist/{diagram-DNEMPZML-CkhkOJo2.cjs → diagram-DNEMPZML-CezYrBHl.cjs} +1 -1
  45. package/dist/{diagram-DNEMPZML-Di5RqN_h.js → diagram-DNEMPZML-HpZqPF1t.js} +6 -6
  46. package/dist/{diagram-L3MUGCDN-BtQkAzOD.js → diagram-L3MUGCDN-Bg9oF9vU.js} +7 -7
  47. package/dist/{diagram-L3MUGCDN-B1vXsDB1.cjs → diagram-L3MUGCDN-FmKU8C82.cjs} +2 -2
  48. package/dist/{diagram-LA4NIPWU-DST6DvSP.cjs → diagram-LA4NIPWU-B4zPp12a.cjs} +2 -2
  49. package/dist/{diagram-LA4NIPWU-Badv-tyU.js → diagram-LA4NIPWU-D5S10Z1M.js} +16 -16
  50. package/dist/{diagram-MHCOC4E2-DmA9ezb9.js → diagram-MHCOC4E2-BMg2Maje.js} +5 -5
  51. package/dist/{diagram-MHCOC4E2-BafwTqOD.cjs → diagram-MHCOC4E2-DcF56W3-.cjs} +2 -2
  52. package/dist/{diagram-XPFHEONP-CZHt29x-.js → diagram-XPFHEONP-COT08Qlw.js} +9 -9
  53. package/dist/{diagram-XPFHEONP-DCm8Rjp8.cjs → diagram-XPFHEONP-GLEfHAAK.cjs} +5 -5
  54. package/dist/dist-BDWJ0PuE.js +1007 -0
  55. package/dist/dist-CeGGIzgU.cjs +1 -0
  56. package/dist/{docxExport-BlPADe6b.cjs → docxExport-D-T3fTj7.cjs} +2 -2
  57. package/dist/{docxExport-Bwi2TlqP.js → docxExport-diU6sv-G.js} +3 -3
  58. package/dist/download-C9gupL_X.js +45 -0
  59. package/dist/download-CVl_k6EM.cjs +1 -0
  60. package/dist/{ebnfDiagram-UZSYDL2S-DVGQga8g.js → ebnfDiagram-UZSYDL2S-Cu5-1sQW.js} +2 -2
  61. package/dist/{ebnfDiagram-UZSYDL2S-fO0plY-B.cjs → ebnfDiagram-UZSYDL2S-ftYbml6-.cjs} +1 -1
  62. package/dist/{elk-XV6XMXQE-CioXUob9.cjs → elk-XV6XMXQE-32eNFZGY.cjs} +2 -2
  63. package/dist/{elk-XV6XMXQE-BkH0WNCd.js → elk-XV6XMXQE-BoimJY8z.js} +9 -8
  64. package/dist/{erDiagram-EYBAPDEH-CUgDxVam.cjs → erDiagram-EYBAPDEH-BCiRLs1y.cjs} +1 -1
  65. package/dist/{erDiagram-EYBAPDEH-Byy0RKKe.js → erDiagram-EYBAPDEH-BxyIjrYb.js} +7 -7
  66. package/dist/flowDiagram-MALGAFMO-BwqIeP0j.js +15 -0
  67. package/dist/flowDiagram-MALGAFMO-DkxE7jK-.cjs +1 -0
  68. package/dist/ganttDiagram-23REXITY-CSCN0suz.cjs +292 -0
  69. package/dist/{ganttDiagram-23REXITY-DAs5LGLL.js → ganttDiagram-23REXITY-uW1Fo-_u.js} +467 -489
  70. package/dist/{gitGraphDiagram-STJD7YCW-B3zcpUUP.cjs → gitGraphDiagram-STJD7YCW-DsKvmxrY.cjs} +3 -3
  71. package/dist/{gitGraphDiagram-STJD7YCW-BVa0DHTU.js → gitGraphDiagram-STJD7YCW-j7-SImA3.js} +57 -57
  72. package/dist/{infoDiagram-KBXO4MBG-DRQkxKbg.cjs → infoDiagram-KBXO4MBG-CYMQGNUj.cjs} +1 -1
  73. package/dist/{infoDiagram-KBXO4MBG-BW7IcSQr.js → infoDiagram-KBXO4MBG-DE6zWbEk.js} +1 -1
  74. package/dist/init-DP9k4ltr.js +151 -0
  75. package/dist/init-UgQs1rm8.cjs +1 -0
  76. package/dist/{ishikawaDiagram-M35NCXHK-DBokYlS8.cjs → ishikawaDiagram-M35NCXHK-DbHbBLzt.cjs} +1 -1
  77. package/dist/{ishikawaDiagram-M35NCXHK-BiLoyI1l.js → ishikawaDiagram-M35NCXHK-zvWEWMyM.js} +2 -2
  78. package/dist/{journeyDiagram-OPLOXDXO-DsyubZVY.js → journeyDiagram-OPLOXDXO-Ckjy-e7g.js} +2 -2
  79. package/dist/{journeyDiagram-OPLOXDXO-CgabMAC2.cjs → journeyDiagram-OPLOXDXO-Df3Isppt.cjs} +2 -2
  80. package/dist/{kanban-definition-BZKZHSQY-DU8sOWQd.js → kanban-definition-BZKZHSQY-BmePUr-s.js} +6 -6
  81. package/dist/{kanban-definition-BZKZHSQY-CLi3J9cI.cjs → kanban-definition-BZKZHSQY-C0592yvk.cjs} +1 -1
  82. package/dist/linear-DgbjLlQ3.cjs +1 -0
  83. package/dist/linear-uoBSwo4a.js +198 -0
  84. package/dist/{loadReferencedImage-D47xCpa7.cjs → loadReferencedImage-N3Qidv7i.cjs} +1 -1
  85. package/dist/{loadReferencedImage-VNYxXIzB.js → loadReferencedImage-u2es0OEX.js} +1 -1
  86. package/dist/{mermaid.core-DPCy8dJO.js → mermaid.core-BlYpILf7.js} +65 -65
  87. package/dist/{mermaid.core-BL4WDqAH.cjs → mermaid.core-uCBIzEBU.cjs} +7 -7
  88. package/dist/{mermaidToImage-CViP9wx2.js → mermaidToImage-CBa4nUvP.js} +1 -1
  89. package/dist/{mermaidToImage-B7I6iJ9s.cjs → mermaidToImage-Gx6dNGEn.cjs} +1 -1
  90. package/dist/{mindmap-definition-I2QAS2VK-GT8_r7or.cjs → mindmap-definition-I2QAS2VK-CRXX7-9C.cjs} +1 -1
  91. package/dist/{mindmap-definition-I2QAS2VK-C2KpoDqG.js → mindmap-definition-I2QAS2VK-DgJirDRS.js} +7 -7
  92. package/dist/ordinal-CeUiYJ7_.cjs +1 -0
  93. package/dist/ordinal-DFWF7eBM.js +28 -0
  94. package/dist/{pegDiagram-FD4XPPHP-D0OZoETj.cjs → pegDiagram-FD4XPPHP-DFmA0OWh.cjs} +1 -1
  95. package/dist/{pegDiagram-FD4XPPHP-CSA4sB83.js → pegDiagram-FD4XPPHP-DpYyVjjQ.js} +2 -2
  96. package/dist/pi-outpost-embed.cjs +44 -44
  97. package/dist/pi-outpost-embed.js +5049 -4128
  98. package/dist/pieDiagram-J4AKIIQI-Cz-UbIk9.cjs +39 -0
  99. package/dist/pieDiagram-J4AKIIQI-DuqHiYUq.js +155 -0
  100. package/dist/{quadrantDiagram-XTYBLID2-BjaZuA3m.js → quadrantDiagram-XTYBLID2-B94UoyXc.js} +1 -1
  101. package/dist/{quadrantDiagram-XTYBLID2-CfdtTmYm.cjs → quadrantDiagram-XTYBLID2-BCN9RHwV.cjs} +1 -1
  102. package/dist/{railroadDiagram-MRQ6NCDL-DDOA_8gY.cjs → railroadDiagram-MRQ6NCDL-BlrwhMUX.cjs} +1 -1
  103. package/dist/{railroadDiagram-MRQ6NCDL-DgAKQKiD.js → railroadDiagram-MRQ6NCDL-Br7PQgSm.js} +2 -2
  104. package/dist/{requirementDiagram-Y7LWUY3S-Bhlk2ueA.js → requirementDiagram-Y7LWUY3S-CT4WIq10.js} +7 -7
  105. package/dist/{requirementDiagram-Y7LWUY3S-nSr_pknl.cjs → requirementDiagram-Y7LWUY3S-CzR9zsNk.cjs} +1 -1
  106. package/dist/{sankeyDiagram-WGJFYUXA-x6J896b3.cjs → sankeyDiagram-WGJFYUXA-D8LLSvqn.cjs} +1 -1
  107. package/dist/{sankeyDiagram-WGJFYUXA-DUYWd4HF.js → sankeyDiagram-WGJFYUXA-DiEth1kw.js} +1 -1
  108. package/dist/{sequenceDiagram-5NDRBG5M-BFgcr8MT.cjs → sequenceDiagram-5NDRBG5M-BATWsrlf.cjs} +1 -1
  109. package/dist/{sequenceDiagram-5NDRBG5M-D1YS8Amk.js → sequenceDiagram-5NDRBG5M-DJ1ruzP_.js} +4 -4
  110. package/dist/{stateDiagram-v2-FJ4FJNEA-6j2vDdvl.js → stateDiagram-v2-FJ4FJNEA-CtEFZimW.js} +8 -8
  111. package/dist/{stateDiagram-v2-FJ4FJNEA-DOTmLAY2.cjs → stateDiagram-v2-FJ4FJNEA-DS0IS9Xt.cjs} +1 -1
  112. package/dist/{swimlanes-UMQ2AFYF-CNb1NF60.js → swimlanes-UMQ2AFYF-B9sFO11Y.js} +8 -8
  113. package/dist/{swimlanes-UMQ2AFYF-BQLQzNLz.cjs → swimlanes-UMQ2AFYF-CNdzpvk7.cjs} +1 -1
  114. package/dist/{swimlanesDiagram-OMPLPG4O-BOl138lS.js → swimlanesDiagram-OMPLPG4O-CEjeo6Pa.js} +9 -9
  115. package/dist/swimlanesDiagram-OMPLPG4O-F8fhW_eR.cjs +8 -0
  116. package/dist/{timeline-definition-SEUHKTQE-B_909Amn.js → timeline-definition-SEUHKTQE-BiPtPmVz.js} +3 -3
  117. package/dist/{timeline-definition-SEUHKTQE-Du5-RSsU.cjs → timeline-definition-SEUHKTQE-CHvbMdoq.cjs} +2 -2
  118. package/dist/{usecaseDiagram-AFA6YXN4-BUs_YsqB.cjs → usecaseDiagram-AFA6YXN4-B_KoFCdb.cjs} +1 -1
  119. package/dist/{usecaseDiagram-AFA6YXN4-CiVGRP5X.js → usecaseDiagram-AFA6YXN4-VzWSjfFU.js} +7 -7
  120. package/dist/{vennDiagram-NNMJR3RB-CKxaec4G.cjs → vennDiagram-NNMJR3RB-BRWZo29n.cjs} +1 -1
  121. package/dist/{vennDiagram-NNMJR3RB-l3A_FZxZ.js → vennDiagram-NNMJR3RB-D5u2Njla.js} +2 -2
  122. package/dist/{wardleyDiagram-S7YFUSEH-Ctqri3T4.cjs → wardleyDiagram-S7YFUSEH-CSq-zmI3.cjs} +2 -2
  123. package/dist/{wardleyDiagram-S7YFUSEH-BMQf5dl9.js → wardleyDiagram-S7YFUSEH-VNmN8A6j.js} +5 -5
  124. package/dist/{xychartDiagram-GGNKY7IX-CuFU4ynf.js → xychartDiagram-GGNKY7IX-D-eT4Gjt.js} +18 -25
  125. package/dist/{xychartDiagram-GGNKY7IX-BUma86Wh.cjs → xychartDiagram-GGNKY7IX-D4bccPOk.cjs} +3 -3
  126. package/package.json +1 -1
  127. package/dist/arc-37kcMiGl.js +0 -82
  128. package/dist/arc-C7P0rHQr.cjs +0 -1
  129. package/dist/array-CApNbSU9.js +0 -6
  130. package/dist/array-DZSRzHA_.cjs +0 -1
  131. package/dist/chunk-6MUBBAK2-BTabKnTR.cjs +0 -2
  132. package/dist/chunk-6MUBBAK2-DlUTxzYh.js +0 -1334
  133. package/dist/chunk-DQASFODM-BBkQ8gE7.cjs +0 -10
  134. package/dist/dist-BB5r6V4R.cjs +0 -1
  135. package/dist/dist-CZhfI1u7.js +0 -59
  136. package/dist/download-DVJ5QY85.js +0 -7
  137. package/dist/download-U7JEZ6c9.cjs +0 -1
  138. package/dist/flowDiagram-MALGAFMO-D2e4rl0I.js +0 -15
  139. package/dist/flowDiagram-MALGAFMO-ZfeGO5tQ.cjs +0 -1
  140. package/dist/ganttDiagram-23REXITY-D82ogzPM.cjs +0 -292
  141. package/dist/init-BJdqMO10.cjs +0 -1
  142. package/dist/init-CuXVI8k2.js +0 -13
  143. package/dist/line-Bf0B129l.cjs +0 -1
  144. package/dist/line-DRq00lCg.js +0 -34
  145. package/dist/linear-Bh2vuvAF.cjs +0 -1
  146. package/dist/linear-CxE0kir0.js +0 -287
  147. package/dist/ordinal-Bm_chml2.cjs +0 -1
  148. package/dist/ordinal-D3SPD7Kk.js +0 -65
  149. package/dist/path-DIS6ck99.cjs +0 -1
  150. package/dist/path-PGqhG0Rz.js +0 -84
  151. package/dist/pieDiagram-J4AKIIQI-CNLlH6kK.js +0 -203
  152. package/dist/pieDiagram-J4AKIIQI-O870G6iX.cjs +0 -39
  153. package/dist/swimlanesDiagram-OMPLPG4O-BNDsO6gw.cjs +0 -8
@@ -1,287 +0,0 @@
1
- import { l as e, n as t, o as n, r, t as i } from "./src-65Lfw03T.js";
2
- import { i as a, n as o, r as s, t as c } from "./defaultLocale-B4ncmkvI.js";
3
- import { t as l } from "./init-CuXVI8k2.js";
4
- //#region ../node_modules/d3-array/src/ascending.js
5
- function u(e, t) {
6
- return e == null || t == null ? NaN : e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
7
- }
8
- //#endregion
9
- //#region ../node_modules/d3-array/src/descending.js
10
- function d(e, t) {
11
- return e == null || t == null ? NaN : t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
12
- }
13
- //#endregion
14
- //#region ../node_modules/d3-array/src/bisector.js
15
- function f(e) {
16
- let t, n, r;
17
- e.length === 2 ? (t = e === u || e === d ? e : p, n = e, r = e) : (t = u, n = (t, n) => u(e(t), n), r = (t, n) => e(t) - n);
18
- function i(e, r, i = 0, a = e.length) {
19
- if (i < a) {
20
- if (t(r, r) !== 0) return a;
21
- do {
22
- let t = i + a >>> 1;
23
- n(e[t], r) < 0 ? i = t + 1 : a = t;
24
- } while (i < a);
25
- }
26
- return i;
27
- }
28
- function a(e, r, i = 0, a = e.length) {
29
- if (i < a) {
30
- if (t(r, r) !== 0) return a;
31
- do {
32
- let t = i + a >>> 1;
33
- n(e[t], r) <= 0 ? i = t + 1 : a = t;
34
- } while (i < a);
35
- }
36
- return i;
37
- }
38
- function o(e, t, n = 0, a = e.length) {
39
- let o = i(e, t, n, a - 1);
40
- return o > n && r(e[o - 1], t) > -r(e[o], t) ? o - 1 : o;
41
- }
42
- return {
43
- left: i,
44
- center: o,
45
- right: a
46
- };
47
- }
48
- function p() {
49
- return 0;
50
- }
51
- //#endregion
52
- //#region ../node_modules/d3-array/src/number.js
53
- function m(e) {
54
- return e === null ? NaN : +e;
55
- }
56
- //#endregion
57
- //#region ../node_modules/d3-array/src/bisect.js
58
- var h = f(u), g = h.right;
59
- h.left, f(m).center;
60
- //#endregion
61
- //#region ../node_modules/d3-array/src/ticks.js
62
- var _ = Math.sqrt(50), v = Math.sqrt(10), y = Math.sqrt(2);
63
- function b(e, t, n) {
64
- let r = (t - e) / Math.max(0, n), i = Math.floor(Math.log10(r)), a = r / 10 ** i, o = a >= _ ? 10 : a >= v ? 5 : a >= y ? 2 : 1, s, c, l;
65
- return i < 0 ? (l = 10 ** -i / o, s = Math.round(e * l), c = Math.round(t * l), s / l < e && ++s, c / l > t && --c, l = -l) : (l = 10 ** i * o, s = Math.round(e / l), c = Math.round(t / l), s * l < e && ++s, c * l > t && --c), c < s && .5 <= n && n < 2 ? b(e, t, n * 2) : [
66
- s,
67
- c,
68
- l
69
- ];
70
- }
71
- function x(e, t, n) {
72
- if (t = +t, e = +e, n = +n, !(n > 0)) return [];
73
- if (e === t) return [e];
74
- let r = t < e, [i, a, o] = r ? b(t, e, n) : b(e, t, n);
75
- if (!(a >= i)) return [];
76
- let s = a - i + 1, c = Array(s);
77
- if (r) {
78
- if (o < 0) for (let e = 0; e < s; ++e) c[e] = (a - e) / -o;
79
- else for (let e = 0; e < s; ++e) c[e] = (a - e) * o;
80
- } else if (o < 0) for (let e = 0; e < s; ++e) c[e] = (i + e) / -o;
81
- else for (let e = 0; e < s; ++e) c[e] = (i + e) * o;
82
- return c;
83
- }
84
- function S(e, t, n) {
85
- return t = +t, e = +e, n = +n, b(e, t, n)[2];
86
- }
87
- function C(e, t, n) {
88
- t = +t, e = +e, n = +n;
89
- let r = t < e, i = r ? S(t, e, n) : S(e, t, n);
90
- return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
91
- }
92
- //#endregion
93
- //#region ../node_modules/d3-interpolate/src/numberArray.js
94
- function w(e, t) {
95
- t ||= [];
96
- var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), i;
97
- return function(a) {
98
- for (i = 0; i < n; ++i) r[i] = e[i] * (1 - a) + t[i] * a;
99
- return r;
100
- };
101
- }
102
- function T(e) {
103
- return ArrayBuffer.isView(e) && !(e instanceof DataView);
104
- }
105
- //#endregion
106
- //#region ../node_modules/d3-interpolate/src/array.js
107
- function E(e, t) {
108
- for (var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, i = Array(r), a = Array(n), o = 0; o < r; ++o) i[o] = k(e[o], t[o]);
109
- for (; o < n; ++o) a[o] = t[o];
110
- return function(e) {
111
- for (o = 0; o < r; ++o) a[o] = i[o](e);
112
- return a;
113
- };
114
- }
115
- //#endregion
116
- //#region ../node_modules/d3-interpolate/src/date.js
117
- function D(e, t) {
118
- var n = /* @__PURE__ */ new Date();
119
- return e = +e, t = +t, function(r) {
120
- return n.setTime(e * (1 - r) + t * r), n;
121
- };
122
- }
123
- //#endregion
124
- //#region ../node_modules/d3-interpolate/src/object.js
125
- function O(e, t) {
126
- var n = {}, r = {}, i;
127
- for (i in (typeof e != "object" || !e) && (e = {}), (typeof t != "object" || !t) && (t = {}), t) i in e ? n[i] = k(e[i], t[i]) : r[i] = t[i];
128
- return function(e) {
129
- for (i in n) r[i] = n[i](e);
130
- return r;
131
- };
132
- }
133
- //#endregion
134
- //#region ../node_modules/d3-interpolate/src/value.js
135
- function k(a, o) {
136
- var s = typeof o, c;
137
- return o == null || s === "boolean" ? n(o) : (s === "number" ? t : s === "string" ? (c = e(o)) ? (o = c, r) : i : o instanceof e ? r : o instanceof Date ? D : T(o) ? w : Array.isArray(o) ? E : typeof o.valueOf != "function" && typeof o.toString != "function" || isNaN(o) ? O : t)(a, o);
138
- }
139
- //#endregion
140
- //#region ../node_modules/d3-interpolate/src/round.js
141
- function A(e, t) {
142
- return e = +e, t = +t, function(n) {
143
- return Math.round(e * (1 - n) + t * n);
144
- };
145
- }
146
- //#endregion
147
- //#region ../node_modules/d3-format/src/precisionFixed.js
148
- function j(e) {
149
- return Math.max(0, -a(Math.abs(e)));
150
- }
151
- //#endregion
152
- //#region ../node_modules/d3-format/src/precisionPrefix.js
153
- function M(e, t) {
154
- return Math.max(0, Math.max(-8, Math.min(8, Math.floor(a(t) / 3))) * 3 - a(Math.abs(e)));
155
- }
156
- //#endregion
157
- //#region ../node_modules/d3-format/src/precisionRound.js
158
- function N(e, t) {
159
- return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, a(t) - a(e)) + 1;
160
- }
161
- //#endregion
162
- //#region ../node_modules/d3-scale/src/constant.js
163
- function P(e) {
164
- return function() {
165
- return e;
166
- };
167
- }
168
- //#endregion
169
- //#region ../node_modules/d3-scale/src/number.js
170
- function F(e) {
171
- return +e;
172
- }
173
- //#endregion
174
- //#region ../node_modules/d3-scale/src/continuous.js
175
- var I = [0, 1];
176
- function L(e) {
177
- return e;
178
- }
179
- function R(e, t) {
180
- return (t -= e = +e) ? function(n) {
181
- return (n - e) / t;
182
- } : P(isNaN(t) ? NaN : .5);
183
- }
184
- function z(e, t) {
185
- var n;
186
- return e > t && (n = e, e = t, t = n), function(n) {
187
- return Math.max(e, Math.min(t, n));
188
- };
189
- }
190
- function B(e, t, n) {
191
- var r = e[0], i = e[1], a = t[0], o = t[1];
192
- return i < r ? (r = R(i, r), a = n(o, a)) : (r = R(r, i), a = n(a, o)), function(e) {
193
- return a(r(e));
194
- };
195
- }
196
- function V(e, t, n) {
197
- var r = Math.min(e.length, t.length) - 1, i = Array(r), a = Array(r), o = -1;
198
- for (e[r] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++o < r;) i[o] = R(e[o], e[o + 1]), a[o] = n(t[o], t[o + 1]);
199
- return function(t) {
200
- var n = g(e, t, 1, r) - 1;
201
- return a[n](i[n](t));
202
- };
203
- }
204
- function H(e, t) {
205
- return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
206
- }
207
- function U() {
208
- var e = I, n = I, r = k, i, a, o, s = L, c, l, u;
209
- function d() {
210
- var t = Math.min(e.length, n.length);
211
- return s !== L && (s = z(e[0], e[t - 1])), c = t > 2 ? V : B, l = u = null, f;
212
- }
213
- function f(t) {
214
- return t == null || isNaN(t = +t) ? o : (l ||= c(e.map(i), n, r))(i(s(t)));
215
- }
216
- return f.invert = function(r) {
217
- return s(a((u ||= c(n, e.map(i), t))(r)));
218
- }, f.domain = function(t) {
219
- return arguments.length ? (e = Array.from(t, F), d()) : e.slice();
220
- }, f.range = function(e) {
221
- return arguments.length ? (n = Array.from(e), d()) : n.slice();
222
- }, f.rangeRound = function(e) {
223
- return n = Array.from(e), r = A, d();
224
- }, f.clamp = function(e) {
225
- return arguments.length ? (s = e ? !0 : L, d()) : s !== L;
226
- }, f.interpolate = function(e) {
227
- return arguments.length ? (r = e, d()) : r;
228
- }, f.unknown = function(e) {
229
- return arguments.length ? (o = e, f) : o;
230
- }, function(e, t) {
231
- return i = e, a = t, d();
232
- };
233
- }
234
- function W() {
235
- return U()(L, L);
236
- }
237
- //#endregion
238
- //#region ../node_modules/d3-scale/src/tickFormat.js
239
- function G(e, t, n, r) {
240
- var i = C(e, t, n), a;
241
- switch (r = s(r ?? ",f"), r.type) {
242
- case "s":
243
- var l = Math.max(Math.abs(e), Math.abs(t));
244
- return r.precision == null && !isNaN(a = M(i, l)) && (r.precision = a), o(r, l);
245
- case "":
246
- case "e":
247
- case "g":
248
- case "p":
249
- case "r":
250
- r.precision == null && !isNaN(a = N(i, Math.max(Math.abs(e), Math.abs(t)))) && (r.precision = a - (r.type === "e"));
251
- break;
252
- case "f":
253
- case "%": r.precision == null && !isNaN(a = j(i)) && (r.precision = a - (r.type === "%") * 2);
254
- }
255
- return c(r);
256
- }
257
- //#endregion
258
- //#region ../node_modules/d3-scale/src/linear.js
259
- function K(e) {
260
- var t = e.domain;
261
- return e.ticks = function(e) {
262
- var n = t();
263
- return x(n[0], n[n.length - 1], e ?? 10);
264
- }, e.tickFormat = function(e, n) {
265
- var r = t();
266
- return G(r[0], r[r.length - 1], e ?? 10, n);
267
- }, e.nice = function(n) {
268
- n ??= 10;
269
- var r = t(), i = 0, a = r.length - 1, o = r[i], s = r[a], c, l, u = 10;
270
- for (s < o && (l = o, o = s, s = l, l = i, i = a, a = l); u-- > 0;) {
271
- if (l = S(o, s, n), l === c) return r[i] = o, r[a] = s, t(r);
272
- if (l > 0) o = Math.floor(o / l) * l, s = Math.ceil(s / l) * l;
273
- else if (l < 0) o = Math.ceil(o * l) / l, s = Math.floor(s * l) / l;
274
- else break;
275
- c = l;
276
- }
277
- return e;
278
- }, e;
279
- }
280
- function q() {
281
- var e = W();
282
- return e.copy = function() {
283
- return H(e, q());
284
- }, l.apply(e, arguments), K(e);
285
- }
286
- //#endregion
287
- export { f as a, C as i, W as n, H as r, q as t };
@@ -1 +0,0 @@
1
- const e=require("./init-BJdqMO10.cjs");var t=class extends Map{constructor(e,t=a){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(n(this,e))}has(e){return super.has(n(this,e))}set(e,t){return super.set(r(this,e),t)}delete(e){return super.delete(i(this,e))}};function n({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function r({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function i({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function a(e){return typeof e==`object`&&e?e.valueOf():e}var o=Symbol(`implicit`);function s(){var n=new t,r=[],i=[],a=o;function c(e){let t=n.get(e);if(t===void 0){if(a!==o)return a;n.set(e,t=r.push(e)-1)}return i[t%i.length]}return c.domain=function(e){if(!arguments.length)return r.slice();r=[],n=new t;for(let t of e)n.has(t)||n.set(t,r.push(t)-1);return c},c.range=function(e){return arguments.length?(i=Array.from(e),c):i.slice()},c.unknown=function(e){return arguments.length?(a=e,c):a},c.copy=function(){return s(r,i).unknown(a)},e.t.apply(c,arguments),c}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
@@ -1,65 +0,0 @@
1
- import { t as e } from "./init-CuXVI8k2.js";
2
- //#region ../node_modules/internmap/src/index.js
3
- var t = class extends Map {
4
- constructor(e, t = a) {
5
- if (super(), Object.defineProperties(this, {
6
- _intern: { value: /* @__PURE__ */ new Map() },
7
- _key: { value: t }
8
- }), e != null) for (let [t, n] of e) this.set(t, n);
9
- }
10
- get(e) {
11
- return super.get(n(this, e));
12
- }
13
- has(e) {
14
- return super.has(n(this, e));
15
- }
16
- set(e, t) {
17
- return super.set(r(this, e), t);
18
- }
19
- delete(e) {
20
- return super.delete(i(this, e));
21
- }
22
- };
23
- function n({ _intern: e, _key: t }, n) {
24
- let r = t(n);
25
- return e.has(r) ? e.get(r) : n;
26
- }
27
- function r({ _intern: e, _key: t }, n) {
28
- let r = t(n);
29
- return e.has(r) ? e.get(r) : (e.set(r, n), n);
30
- }
31
- function i({ _intern: e, _key: t }, n) {
32
- let r = t(n);
33
- return e.has(r) && (n = e.get(r), e.delete(r)), n;
34
- }
35
- function a(e) {
36
- return typeof e == "object" && e ? e.valueOf() : e;
37
- }
38
- //#endregion
39
- //#region ../node_modules/d3-scale/src/ordinal.js
40
- var o = Symbol("implicit");
41
- function s() {
42
- var n = new t(), r = [], i = [], a = o;
43
- function c(e) {
44
- let t = n.get(e);
45
- if (t === void 0) {
46
- if (a !== o) return a;
47
- n.set(e, t = r.push(e) - 1);
48
- }
49
- return i[t % i.length];
50
- }
51
- return c.domain = function(e) {
52
- if (!arguments.length) return r.slice();
53
- r = [], n = new t();
54
- for (let t of e) n.has(t) || n.set(t, r.push(t) - 1);
55
- return c;
56
- }, c.range = function(e) {
57
- return arguments.length ? (i = Array.from(e), c) : i.slice();
58
- }, c.unknown = function(e) {
59
- return arguments.length ? (a = e, c) : a;
60
- }, c.copy = function() {
61
- return s(r, i).unknown(a);
62
- }, e.apply(c, arguments), c;
63
- }
64
- //#endregion
65
- export { s as t };
@@ -1 +0,0 @@
1
- var e=Math.PI,t=2*e,n=1e-6,r=t-n;function i(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function a(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return i;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var o=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?i:a(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,r,i,a,o){if(t=+t,r=+r,i=+i,a=+a,o=+o,o<0)throw Error(`negative radius: ${o}`);let s=this._x1,c=this._y1,l=i-t,u=a-r,d=s-t,f=c-r,p=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>n){if(!(Math.abs(f*l-u*d)>n)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let m=i-s,h=a-c,g=l*l+u*u,_=m*m+h*h,v=Math.sqrt(g),y=Math.sqrt(p),b=o*Math.tan((e-Math.acos((g+p-_)/(2*v*y)))/2),x=b/y,S=b/v;Math.abs(x-1)>n&&this._append`L${t+x*d},${r+x*f}`,this._append`A${o},${o},0,0,${+(f*m>d*h)},${this._x1=t+S*l},${this._y1=r+S*u}`}}}arc(i,a,o,s,c,l){if(i=+i,a=+a,o=+o,l=!!l,o<0)throw Error(`negative radius: ${o}`);let u=o*Math.cos(s),d=o*Math.sin(s),f=i+u,p=a+d,m=1^l,h=l?s-c:c-s;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>n||Math.abs(this._y1-p)>n)&&this._append`L${f},${p}`,o&&(h<0&&(h=h%t+t),h>r?this._append`A${o},${o},0,1,${m},${i-u},${a-d}A${o},${o},0,1,${m},${this._x1=f},${this._y1=p}`:h>n&&this._append`A${o},${o},0,${+(h>=e)},${m},${this._x1=i+o*Math.cos(c)},${this._y1=a+o*Math.sin(c)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};o.prototype;function s(e){return function(){return e}}function c(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new o(t)}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
@@ -1,84 +0,0 @@
1
- //#region ../node_modules/d3-path/src/path.js
2
- var e = Math.PI, t = 2 * e, n = 1e-6, r = t - n;
3
- function i(e) {
4
- this._ += e[0];
5
- for (let t = 1, n = e.length; t < n; ++t) this._ += arguments[t] + e[t];
6
- }
7
- function a(e) {
8
- let t = Math.floor(e);
9
- if (!(t >= 0)) throw Error(`invalid digits: ${e}`);
10
- if (t > 15) return i;
11
- let n = 10 ** t;
12
- return function(e) {
13
- this._ += e[0];
14
- for (let t = 1, r = e.length; t < r; ++t) this._ += Math.round(arguments[t] * n) / n + e[t];
15
- };
16
- }
17
- var o = class {
18
- constructor(e) {
19
- this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "", this._append = e == null ? i : a(e);
20
- }
21
- moveTo(e, t) {
22
- this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}`;
23
- }
24
- closePath() {
25
- this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
26
- }
27
- lineTo(e, t) {
28
- this._append`L${this._x1 = +e},${this._y1 = +t}`;
29
- }
30
- quadraticCurveTo(e, t, n, r) {
31
- this._append`Q${+e},${+t},${this._x1 = +n},${this._y1 = +r}`;
32
- }
33
- bezierCurveTo(e, t, n, r, i, a) {
34
- this._append`C${+e},${+t},${+n},${+r},${this._x1 = +i},${this._y1 = +a}`;
35
- }
36
- arcTo(t, r, i, a, o) {
37
- if (t = +t, r = +r, i = +i, a = +a, o = +o, o < 0) throw Error(`negative radius: ${o}`);
38
- let s = this._x1, c = this._y1, l = i - t, u = a - r, d = s - t, f = c - r, p = d * d + f * f;
39
- if (this._x1 === null) this._append`M${this._x1 = t},${this._y1 = r}`;
40
- else if (p > n) {
41
- if (!(Math.abs(f * l - u * d) > n) || !o) this._append`L${this._x1 = t},${this._y1 = r}`;
42
- else {
43
- let m = i - s, h = a - c, g = l * l + u * u, _ = m * m + h * h, v = Math.sqrt(g), y = Math.sqrt(p), b = o * Math.tan((e - Math.acos((g + p - _) / (2 * v * y))) / 2), x = b / y, S = b / v;
44
- Math.abs(x - 1) > n && this._append`L${t + x * d},${r + x * f}`, this._append`A${o},${o},0,0,${+(f * m > d * h)},${this._x1 = t + S * l},${this._y1 = r + S * u}`;
45
- }
46
- }
47
- }
48
- arc(i, a, o, s, c, l) {
49
- if (i = +i, a = +a, o = +o, l = !!l, o < 0) throw Error(`negative radius: ${o}`);
50
- let u = o * Math.cos(s), d = o * Math.sin(s), f = i + u, p = a + d, m = 1 ^ l, h = l ? s - c : c - s;
51
- this._x1 === null ? this._append`M${f},${p}` : (Math.abs(this._x1 - f) > n || Math.abs(this._y1 - p) > n) && this._append`L${f},${p}`, o && (h < 0 && (h = h % t + t), h > r ? this._append`A${o},${o},0,1,${m},${i - u},${a - d}A${o},${o},0,1,${m},${this._x1 = f},${this._y1 = p}` : h > n && this._append`A${o},${o},0,${+(h >= e)},${m},${this._x1 = i + o * Math.cos(c)},${this._y1 = a + o * Math.sin(c)}`);
52
- }
53
- rect(e, t, n, r) {
54
- this._append`M${this._x0 = this._x1 = +e},${this._y0 = this._y1 = +t}h${n = +n}v${+r}h${-n}Z`;
55
- }
56
- toString() {
57
- return this._;
58
- }
59
- };
60
- o.prototype;
61
- //#endregion
62
- //#region ../node_modules/d3-shape/src/constant.js
63
- function s(e) {
64
- return function() {
65
- return e;
66
- };
67
- }
68
- //#endregion
69
- //#region ../node_modules/d3-shape/src/path.js
70
- function c(e) {
71
- let t = 3;
72
- return e.digits = function(n) {
73
- if (!arguments.length) return t;
74
- if (n == null) t = null;
75
- else {
76
- let e = Math.floor(n);
77
- if (!(e >= 0)) throw RangeError(`invalid digits: ${n}`);
78
- t = e;
79
- }
80
- return e;
81
- }, () => new o(t);
82
- }
83
- //#endregion
84
- export { s as n, c as t };
@@ -1,203 +0,0 @@
1
- import { n as e } from "./mermaid-parser.core-IoY9gmm6.js";
2
- import { n as t } from "./chunk-Y2CYZVJY-CwsV_8W4.js";
3
- import { m as n } from "./src-65Lfw03T.js";
4
- import { C as r, H as i, U as a, _ as o, a as s, b as c, c as l, f as u, q as d, v as f } from "./chunk-BG4553SI-j_gQs8M_.js";
5
- import { t as p } from "./ordinal-D3SPD7Kk.js";
6
- import { n as m } from "./path-PGqhG0Rz.js";
7
- import { m as h } from "./dist-CZhfI1u7.js";
8
- import { t as g } from "./arc-37kcMiGl.js";
9
- import { t as _ } from "./array-CApNbSU9.js";
10
- import { i as v, m as y } from "./chunk-6MUBBAK2-DlUTxzYh.js";
11
- import { t as b } from "./chunk-JWPE2WC7-B_J6qwQL.js";
12
- import { o as x } from "./mermaid.core-DPCy8dJO.js";
13
- //#region ../node_modules/d3-shape/src/descending.js
14
- function S(e, t) {
15
- return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
16
- }
17
- //#endregion
18
- //#region ../node_modules/d3-shape/src/identity.js
19
- function C(e) {
20
- return e;
21
- }
22
- //#endregion
23
- //#region ../node_modules/d3-shape/src/pie.js
24
- function w() {
25
- var e = C, t = S, n = null, r = m(0), i = m(h), a = m(0);
26
- function o(o) {
27
- var s, c = (o = _(o)).length, l, u, d = 0, f = Array(c), p = Array(c), m = +r.apply(this, arguments), g = Math.min(h, Math.max(-h, i.apply(this, arguments) - m)), v, y = Math.min(Math.abs(g) / c, a.apply(this, arguments)), b = y * (g < 0 ? -1 : 1), x;
28
- for (s = 0; s < c; ++s) (x = p[f[s] = s] = +e(o[s], s, o)) > 0 && (d += x);
29
- for (t == null ? n != null && f.sort(function(e, t) {
30
- return n(o[e], o[t]);
31
- }) : f.sort(function(e, n) {
32
- return t(p[e], p[n]);
33
- }), s = 0, u = d ? (g - c * b) / d : 0; s < c; ++s, m = v) l = f[s], x = p[l], v = m + (x > 0 ? x * u : 0) + b, p[l] = {
34
- data: o[l],
35
- index: s,
36
- value: x,
37
- startAngle: m,
38
- endAngle: v,
39
- padAngle: y
40
- };
41
- return p;
42
- }
43
- return o.value = function(t) {
44
- return arguments.length ? (e = typeof t == "function" ? t : m(+t), o) : e;
45
- }, o.sortValues = function(e) {
46
- return arguments.length ? (t = e, n = null, o) : t;
47
- }, o.sort = function(e) {
48
- return arguments.length ? (n = e, t = null, o) : n;
49
- }, o.startAngle = function(e) {
50
- return arguments.length ? (r = typeof e == "function" ? e : m(+e), o) : r;
51
- }, o.endAngle = function(e) {
52
- return arguments.length ? (i = typeof e == "function" ? e : m(+e), o) : i;
53
- }, o.padAngle = function(e) {
54
- return arguments.length ? (a = typeof e == "function" ? e : m(+e), o) : a;
55
- }, o;
56
- }
57
- //#endregion
58
- //#region ../node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-J4AKIIQI.mjs
59
- var T = u.pie, E = {
60
- sections: /* @__PURE__ */ new Map(),
61
- showData: !1,
62
- config: T
63
- }, D = E.sections, O = E.showData, k = structuredClone(T), A = {
64
- getConfig: /* @__PURE__ */ t(() => structuredClone(k), "getConfig"),
65
- clear: /* @__PURE__ */ t(() => {
66
- D = /* @__PURE__ */ new Map(), O = E.showData, s();
67
- }, "clear"),
68
- setDiagramTitle: d,
69
- getDiagramTitle: r,
70
- setAccTitle: a,
71
- getAccTitle: f,
72
- setAccDescription: i,
73
- getAccDescription: o,
74
- addSection: /* @__PURE__ */ t(({ label: e, value: t }) => {
75
- if (t < 0) throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);
76
- D.has(e) || (D.set(e, t), n.debug(`added new section: ${e}, with value: ${t}`));
77
- }, "addSection"),
78
- getSections: /* @__PURE__ */ t(() => D, "getSections"),
79
- setShowData: /* @__PURE__ */ t((e) => {
80
- O = e;
81
- }, "setShowData"),
82
- getShowData: /* @__PURE__ */ t(() => O, "getShowData")
83
- }, j = /* @__PURE__ */ t((e, t) => {
84
- b(e, t), t.setShowData(e.showData), e.sections.map(t.addSection);
85
- }, "populateDb"), M = { parse: /* @__PURE__ */ t(async (t) => {
86
- let r = await e("pie", t);
87
- n.debug(r), j(r, A);
88
- }, "parse") }, N = /* @__PURE__ */ t((e) => `
89
- .pieCircle{
90
- stroke: ${e.pieStrokeColor};
91
- stroke-width : ${e.pieStrokeWidth};
92
- opacity : ${e.pieOpacity};
93
- }
94
- .pieCircle.highlighted{
95
- scale: 1.05;
96
- opacity: 1;
97
- }
98
- .pieCircle.highlightedOnHover:hover{
99
- transition-duration: 250ms;
100
- scale: 1.05;
101
- opacity: 1;
102
- }
103
- .pieOuterCircle{
104
- stroke: ${e.pieOuterStrokeColor};
105
- stroke-width: ${e.pieOuterStrokeWidth};
106
- fill: none;
107
- }
108
- .pieTitleText {
109
- text-anchor: middle;
110
- font-size: ${e.pieTitleTextSize};
111
- fill: ${e.pieTitleTextColor};
112
- font-family: ${e.fontFamily};
113
- }
114
- .slice {
115
- font-family: ${e.fontFamily};
116
- fill: ${e.pieSectionTextColor};
117
- font-size:${e.pieSectionTextSize};
118
- // fill: white;
119
- }
120
- .legend text {
121
- fill: ${e.pieLegendTextColor};
122
- font-family: ${e.fontFamily};
123
- font-size: ${e.pieLegendTextSize};
124
- }
125
- `, "getStyles"), P = /* @__PURE__ */ t((e) => {
126
- let t = [...e.values()].reduce((e, t) => e + t, 0), n = [...e.entries()].map(([e, t]) => ({
127
- label: e,
128
- value: t
129
- })).filter((e) => e.value / t * 100 >= 1);
130
- return w().value((e) => e.value).sort(null)(n);
131
- }, "createPieArcs"), F = {
132
- parser: M,
133
- db: A,
134
- renderer: { draw: /* @__PURE__ */ t((e, t, r, i) => {
135
- n.debug("rendering pie chart\n" + e);
136
- let a = i.db, o = c(), s = v(a.getConfig(), o.pie), u = x(t), d = u.append("g");
137
- d.attr("transform", "translate(225,225)");
138
- let { themeVariables: f } = o, [m] = y(f.pieOuterStrokeWidth);
139
- m ??= 2;
140
- let h = s.legendPosition, _ = s.textPosition, b = s.donutHole > 0 && s.donutHole <= .9 ? s.donutHole : 0, S = g().innerRadius(b * 185).outerRadius(185), C = g().innerRadius(185 * _).outerRadius(185 * _), w = d.append("g");
141
- w.append("circle").attr("cx", 0).attr("cy", 0).attr("r", 185 + m / 2).attr("class", "pieOuterCircle");
142
- let T = a.getSections(), E = P(T), D = [
143
- f.pie1,
144
- f.pie2,
145
- f.pie3,
146
- f.pie4,
147
- f.pie5,
148
- f.pie6,
149
- f.pie7,
150
- f.pie8,
151
- f.pie9,
152
- f.pie10,
153
- f.pie11,
154
- f.pie12
155
- ], O = 0;
156
- T.forEach((e) => {
157
- O += e;
158
- });
159
- let k = E.filter((e) => (e.data.value / O * 100).toFixed(0) !== "0"), A = p(D).domain([...T.keys()]);
160
- w.selectAll("mySlices").data(k).enter().append("path").attr("d", S).attr("fill", (e) => A(e.data.label)).attr("class", (e) => {
161
- let t = "pieCircle";
162
- return s.highlightSlice === "hover" ? t += " highlightedOnHover" : s.highlightSlice === e.data.label && (t += " highlighted"), t;
163
- }), w.selectAll("mySlices").data(k).enter().append("text").text((e) => (e.data.value / O * 100).toFixed(0) + "%").attr("transform", (e) => "translate(" + C.centroid(e) + ")").style("text-anchor", "middle").attr("class", "slice");
164
- let j = d.append("text").text(a.getDiagramTitle()).attr("x", 0).attr("y", -200).attr("class", "pieTitleText"), M = [...T.entries()].map(([e, t]) => ({
165
- label: e,
166
- value: t
167
- })), N = d.selectAll(".legend").data(M).enter().append("g").attr("class", "legend");
168
- N.append("rect").attr("width", 18).attr("height", 18).style("fill", (e) => A(e.label)).style("stroke", (e) => A(e.label)), N.append("text").attr("x", 22).attr("y", 14).text((e) => a.getShowData() ? `${e.label} [${e.value}]` : e.label);
169
- let F = Math.max(...N.selectAll("text").nodes().map((e) => e?.getBoundingClientRect().width ?? 0)), I = 450, L = 490, R = M.length * 22;
170
- switch (h) {
171
- case "center":
172
- N.attr("transform", (e, t) => {
173
- let n = 22 * M.length / 2, r = -F / 2 - 22, i = t * 22 - n;
174
- return "translate(" + r + "," + i + ")";
175
- });
176
- break;
177
- case "top":
178
- I += R, N.attr("transform", (e, t) => `translate(${-F / 2 - 22}, ${t * 22 - 185})`), w.attr("transform", () => `translate(0, ${R + 22})`);
179
- break;
180
- case "bottom":
181
- I += R, N.attr("transform", (e, t) => {
182
- let n = -F / 2 - 22, r = t * 22 - -207;
183
- return "translate(" + n + "," + r + ")";
184
- });
185
- break;
186
- case "left":
187
- L += 22 + F, N.attr("transform", (e, t) => {
188
- let n = 22 * M.length / 2;
189
- return "translate(-207," + (t * 22 - n) + ")";
190
- }), w.attr("transform", () => `translate(${F + 18 + 4}, 0)`);
191
- break;
192
- default: L += 22 + F, N.attr("transform", (e, t) => {
193
- let n = 22 * M.length / 2;
194
- return "translate(216," + (t * 22 - n) + ")";
195
- });
196
- }
197
- let z = j.node()?.getBoundingClientRect().width ?? 0, B = 225 - z / 2, V = 225 + z / 2, H = Math.min(0, B), U = Math.max(L, V) - H;
198
- u.attr("viewBox", `${H} 0 ${U} ${I}`), l(u, I, U, s.useMaxWidth);
199
- }, "draw") },
200
- styles: N
201
- };
202
- //#endregion
203
- export { F as diagram };