mio-previewer 0.1.6 → 0.1.8

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 (176) hide show
  1. package/README.md +12 -2
  2. package/README.zh-CN.md +26 -1
  3. package/dist/{_basePickBy-m5_T47yz.js → _basePickBy-CFTZygnR.js} +30 -30
  4. package/dist/_basePickBy-tPOC0EMH.cjs +1 -0
  5. package/dist/{_baseUniq-BnywwJBY.js → _baseUniq-COpRdEZm.js} +52 -52
  6. package/dist/_baseUniq-DqpG5gxq.cjs +1 -0
  7. package/dist/{arc-BDHD79aE.js → arc-CA-zaVHH.js} +15 -15
  8. package/dist/arc-D6SpLjCN.cjs +1 -0
  9. package/dist/{architecture-O4VJ6CD3-B3mtkY33.cjs → architecture-O4VJ6CD3-CpYFg8kG.cjs} +1 -1
  10. package/dist/{architecture-O4VJ6CD3-DXA5X_yx.js → architecture-O4VJ6CD3-DhXiEYF9.js} +1 -1
  11. package/dist/architectureDiagram-VXUJARFQ-C-ZDGP3T.cjs +36 -0
  12. package/dist/{architectureDiagram-VXUJARFQ-WrHvlvqz.js → architectureDiagram-VXUJARFQ-CMDGkfwW.js} +132 -132
  13. package/dist/{blockDiagram-VD42YOAC-B8yzpSUt.js → blockDiagram-VD42YOAC-B6yyyBoP.js} +45 -45
  14. package/dist/{blockDiagram-VD42YOAC-iGUQhHOa.cjs → blockDiagram-VD42YOAC-BboMD6jZ.cjs} +4 -4
  15. package/dist/{c4Diagram-YG6GDRKO-r1vmxT4H.js → c4Diagram-YG6GDRKO-Bk3UfYds.js} +2 -2
  16. package/dist/{c4Diagram-YG6GDRKO-BC0oVCkM.cjs → c4Diagram-YG6GDRKO-CAnMUU5Q.cjs} +1 -1
  17. package/dist/channel-By4yEUpY.cjs +1 -0
  18. package/dist/{channel-BlCmYLjm.js → channel-CGHeB_wL.js} +1 -1
  19. package/dist/{chunk-4BX2VUAB-BvRfkHhg.js → chunk-4BX2VUAB-DQLiny3u.js} +1 -1
  20. package/dist/chunk-4BX2VUAB-r3h9zqZy.cjs +1 -0
  21. package/dist/{chunk-55IACEB6-B6RNQ_Dl.js → chunk-55IACEB6-BvzkNW0T.js} +3 -3
  22. package/dist/chunk-55IACEB6-F8U2tzR2.cjs +1 -0
  23. package/dist/{chunk-B4BG7PRW-B2nNYsy_.cjs → chunk-B4BG7PRW-DNWDyosT.cjs} +3 -3
  24. package/dist/{chunk-B4BG7PRW-DlrKAjak.js → chunk-B4BG7PRW-XH3xle9g.js} +10 -10
  25. package/dist/{chunk-DI55MBZ5-CZnuDYt1.js → chunk-DI55MBZ5-7cI7r4vk.js} +3 -3
  26. package/dist/{chunk-DI55MBZ5-BUn8iSqn.cjs → chunk-DI55MBZ5-DBabq0PW.cjs} +1 -1
  27. package/dist/{chunk-FMBD7UC4-QZu7cQhg.cjs → chunk-FMBD7UC4-BSSIfQJH.cjs} +1 -1
  28. package/dist/{chunk-FMBD7UC4-Kiqgsjq0.js → chunk-FMBD7UC4-Z_IXsR9N.js} +1 -1
  29. package/dist/chunk-QN33PNHL-Cb-RTcJE.cjs +1 -0
  30. package/dist/{chunk-QN33PNHL-CN23wkk5.js → chunk-QN33PNHL-dvg-wDdg.js} +1 -1
  31. package/dist/{chunk-QZHKN3VN-DRwz5CXr.js → chunk-QZHKN3VN-Chg9twhX.js} +1 -1
  32. package/dist/chunk-QZHKN3VN-DR2ed2kF.cjs +1 -0
  33. package/dist/{chunk-TZMSLE5B-Bwr0045t.js → chunk-TZMSLE5B-CIgbKyu_.js} +1 -1
  34. package/dist/chunk-TZMSLE5B-D3CSz4N0.cjs +1 -0
  35. package/dist/{classDiagram-v2-WZHVMYZB-DxjNGm48.js → classDiagram-2ON5EDUG-CC9xOx_t.js} +2 -2
  36. package/dist/classDiagram-2ON5EDUG-De8Dohf7.cjs +1 -0
  37. package/dist/{classDiagram-2ON5EDUG-DxjNGm48.js → classDiagram-v2-WZHVMYZB-CC9xOx_t.js} +2 -2
  38. package/dist/classDiagram-v2-WZHVMYZB-De8Dohf7.cjs +1 -0
  39. package/dist/{clone-xXnwx9JX.js → clone-BrZZgHT6.js} +1 -1
  40. package/dist/clone-CXoO9ncp.cjs +1 -0
  41. package/dist/cose-bilkent-S5V4N54A-0DFD6rcw.cjs +1 -0
  42. package/dist/{cose-bilkent-S5V4N54A-DwACfiOr.js → cose-bilkent-S5V4N54A-CDs3BBYp.js} +1 -1
  43. package/dist/{custom-C1QhDj-y.js → cursorPlugin-CLM_tkck.js} +2677 -2611
  44. package/dist/{custom-BB9B2BL2.cjs → cursorPlugin-vB5SgZWZ.cjs} +42 -42
  45. package/dist/{dagre-6UL2VRFP-D8jgPXZB.js → dagre-6UL2VRFP-BlMhpFnF.js} +119 -119
  46. package/dist/dagre-6UL2VRFP-DuUBkSw0.cjs +4 -0
  47. package/dist/diagram-PSM6KHXK-CmQ4F2JN.cjs +24 -0
  48. package/dist/{diagram-PSM6KHXK-CVislPq4.js → diagram-PSM6KHXK-CoqSYWPX.js} +53 -53
  49. package/dist/diagram-QEK2KX5R-DqSiNmiR.cjs +43 -0
  50. package/dist/{diagram-QEK2KX5R-JH3FlTXl.js → diagram-QEK2KX5R-FqbXBaqH.js} +20 -20
  51. package/dist/diagram-S2PKOQOG-DYEcRvla.cjs +24 -0
  52. package/dist/{diagram-S2PKOQOG-BgorvXyP.js → diagram-S2PKOQOG-u-4zOtyY.js} +23 -23
  53. package/dist/{erDiagram-Q2GNP2WA-DyFoT35Q.js → erDiagram-Q2GNP2WA-CXn9GtvJ.js} +4 -4
  54. package/dist/{erDiagram-Q2GNP2WA-DjGQSNEd.cjs → erDiagram-Q2GNP2WA-DWDeWLTL.cjs} +1 -1
  55. package/dist/{flowDiagram-NV44I4VS-C5_i8vKb.cjs → flowDiagram-NV44I4VS-C60QhUiz.cjs} +3 -3
  56. package/dist/{flowDiagram-NV44I4VS-Bp-q8kkE.js → flowDiagram-NV44I4VS-CvRJQSEg.js} +14 -14
  57. package/dist/ganttDiagram-LVOFAZNH-DuTD48a9.cjs +267 -0
  58. package/dist/{ganttDiagram-LVOFAZNH-D5BjYh4O.js → ganttDiagram-LVOFAZNH-bsx5CB5d.js} +2 -2
  59. package/dist/{gitGraph-ZV4HHKMB-CMC3ZF2n.js → gitGraph-ZV4HHKMB-BjAayPSR.js} +1 -1
  60. package/dist/{gitGraph-ZV4HHKMB-6xujjpfY.cjs → gitGraph-ZV4HHKMB-kRwxNQnW.cjs} +1 -1
  61. package/dist/{gitGraphDiagram-NY62KEGX-DYmh2kRW.js → gitGraphDiagram-NY62KEGX-DPM59sAG.js} +45 -45
  62. package/dist/gitGraphDiagram-NY62KEGX-DsyQIiCo.cjs +65 -0
  63. package/dist/{graph-D3gnYK1X.js → graph-CilVg985.js} +8 -8
  64. package/dist/graph-T55iHwif.cjs +1 -0
  65. package/dist/{info-63CPKGFF-CEKaKKTJ.cjs → info-63CPKGFF-BKQtOsLZ.cjs} +1 -1
  66. package/dist/info-63CPKGFF-D-_lE7q9.js +5 -0
  67. package/dist/{infoDiagram-F6ZHWCRC-CvuN8Xe0.js → infoDiagram-F6ZHWCRC-B6bTTLIe.js} +2 -2
  68. package/dist/infoDiagram-F6ZHWCRC-Dfs9venE.cjs +2 -0
  69. package/dist/{journeyDiagram-XKPGCS4Q-CMD1dNlA.js → journeyDiagram-XKPGCS4Q-BKPpLUXu.js} +4 -4
  70. package/dist/{journeyDiagram-XKPGCS4Q-NZ7Zwwno.cjs → journeyDiagram-XKPGCS4Q-CkWQvbbC.cjs} +1 -1
  71. package/dist/{kanban-definition-3W4ZIXB7-DdiLRhLn.js → kanban-definition-3W4ZIXB7-CLac2PpK.js} +44 -44
  72. package/dist/{kanban-definition-3W4ZIXB7-DKjyogIQ.cjs → kanban-definition-3W4ZIXB7-DzI_mEvf.cjs} +1 -1
  73. package/dist/{layout-D4zQO2o2.js → layout-DOxjVt30.js} +42 -42
  74. package/dist/layout-LjH1X4pD.cjs +1 -0
  75. package/dist/linear-BZdfTIw6.cjs +1 -0
  76. package/dist/{linear-DsHZ7VTP.js → linear-nITCRSwN.js} +29 -29
  77. package/dist/{mermaid-parser.core-scIqCLhe.js → mermaid-parser.core-BvyFzRhX.js} +205 -205
  78. package/dist/{mermaid-parser.core-DilcMT1B.cjs → mermaid-parser.core-YAHoRfr_.cjs} +2 -2
  79. package/dist/{mindmap-definition-VGOIOE7T-Ei8sTs44.cjs → mindmap-definition-VGOIOE7T-8Pk45I0T.cjs} +2 -2
  80. package/dist/{mindmap-definition-VGOIOE7T-tfBKngxr.js → mindmap-definition-VGOIOE7T-BTlAV786.js} +18 -18
  81. package/dist/mio-previewer.cjs.js +16 -3
  82. package/dist/mio-previewer.css +1 -1
  83. package/dist/mio-previewer.es.js +4524 -27
  84. package/dist/{packet-HUATNLJX-DJA8At21.cjs → packet-HUATNLJX-CNiEJWxQ.cjs} +1 -1
  85. package/dist/{packet-HUATNLJX-Dj4GcjQR.js → packet-HUATNLJX-Cn2d6cbh.js} +1 -1
  86. package/dist/{pie-WTHONI2E-B79PEY8l.cjs → pie-WTHONI2E-CEUZL-GO.cjs} +1 -1
  87. package/dist/pie-WTHONI2E-COsOPmmh.js +5 -0
  88. package/dist/pieDiagram-ADFJNKIX-8mFQx_vI.cjs +30 -0
  89. package/dist/{pieDiagram-ADFJNKIX-CJrJzhlE.js → pieDiagram-ADFJNKIX-CgDIBKwo.js} +39 -39
  90. package/dist/plugins/custom.cjs.js +1 -1
  91. package/dist/plugins/custom.es.js +4 -3
  92. package/dist/plugins/markdown-it.cjs.js +3 -1
  93. package/dist/plugins/markdown-it.es.js +128 -66
  94. package/dist/{quadrantDiagram-AYHSOK5B-UCGi708D.cjs → quadrantDiagram-AYHSOK5B-CExSZwWH.cjs} +1 -1
  95. package/dist/{quadrantDiagram-AYHSOK5B-42v2tFCR.js → quadrantDiagram-AYHSOK5B-TlBxKPiG.js} +2 -2
  96. package/dist/{radar-NJJJXTRR-PPOjSXgX.cjs → radar-NJJJXTRR-D3p36qrE.cjs} +1 -1
  97. package/dist/radar-NJJJXTRR-hKx4VhDB.js +5 -0
  98. package/dist/{requirementDiagram-UZGBJVZJ-CCCu9RXm.cjs → requirementDiagram-UZGBJVZJ-BEcIIQ5C.cjs} +1 -1
  99. package/dist/{requirementDiagram-UZGBJVZJ-m_gma9iH.js → requirementDiagram-UZGBJVZJ-Dl5ijlU7.js} +27 -27
  100. package/dist/sankeyDiagram-TZEHDZUN-_AuPE8rx.cjs +10 -0
  101. package/dist/{sankeyDiagram-TZEHDZUN-eY44cJlE.js → sankeyDiagram-TZEHDZUN-bIR5yy8v.js} +56 -56
  102. package/dist/{sequenceDiagram-WL72ISMW-CBoGDk3g.cjs → sequenceDiagram-WL72ISMW-BG5OjhGw.cjs} +9 -9
  103. package/dist/{sequenceDiagram-WL72ISMW-Chw20cva.js → sequenceDiagram-WL72ISMW-DT79Xx9V.js} +3 -3
  104. package/dist/{stateDiagram-FKZM4ZOC-3yy_Kvnk.js → stateDiagram-FKZM4ZOC-CDfDuz0s.js} +16 -16
  105. package/dist/stateDiagram-FKZM4ZOC-CaZkY5ch.cjs +1 -0
  106. package/dist/{stateDiagram-v2-4FDKWEC3-DELyMBBc.js → stateDiagram-v2-4FDKWEC3-DroYR31A.js} +2 -2
  107. package/dist/stateDiagram-v2-4FDKWEC3-GfIoqgb_.cjs +1 -0
  108. package/dist/{timeline-definition-IT6M3QCI-imDDAjaW.cjs → timeline-definition-IT6M3QCI-BxCHgT34.cjs} +14 -14
  109. package/dist/{timeline-definition-IT6M3QCI-DSbrx1um.js → timeline-definition-IT6M3QCI-CzA493Rr.js} +24 -24
  110. package/dist/{treemap-75Q7IDZK-Bwj_esWs.js → treemap-75Q7IDZK-B7s32RV1.js} +1 -1
  111. package/dist/{treemap-75Q7IDZK-DaCs42wt.cjs → treemap-75Q7IDZK-hLeVdex4.cjs} +1 -1
  112. package/dist/types/entries/plugin-alert.d.ts +1 -1
  113. package/dist/types/entries/plugin-codeblock.d.ts +1 -1
  114. package/dist/types/entries/plugin-emoji.d.ts +1 -1
  115. package/dist/types/entries/plugin-katex.d.ts +1 -1
  116. package/dist/types/entries/plugin-mermaid.d.ts +1 -1
  117. package/dist/types/index.d.ts +4 -2
  118. package/dist/types/plugins/custom/codeBlockPlugin.d.ts +42 -0
  119. package/dist/types/plugins/custom/cursorPlugin.d.ts +42 -0
  120. package/dist/types/plugins/custom/emojiPlugin.d.ts +46 -0
  121. package/dist/types/plugins/custom/index.d.ts +8 -0
  122. package/dist/types/plugins/custom/mermaidPlugin.d.ts +45 -0
  123. package/dist/types/plugins/{AlertPlugin.d.ts → markdown-it/alertPlugin.d.ts} +4 -4
  124. package/dist/types/plugins/markdown-it/index.d.ts +2 -0
  125. package/dist/types/types.d.ts +23 -2
  126. package/dist/{xychartDiagram-PRI3JC2R-CpYE-5EP.js → xychartDiagram-PRI3JC2R-Bb_Kt4vj.js} +29 -29
  127. package/dist/{xychartDiagram-PRI3JC2R-CBaFcd4q.cjs → xychartDiagram-PRI3JC2R-DQLU-dCp.cjs} +1 -1
  128. package/package.json +8 -5
  129. package/dist/AlertPlugin-B74_-nlo.cjs +0 -3
  130. package/dist/AlertPlugin-DUG0ldg_.js +0 -66
  131. package/dist/MdRenderer.vue_vue_type_style_index_0_lang-B26E5SLd.js +0 -4562
  132. package/dist/MdRenderer.vue_vue_type_style_index_0_lang-CT8VuqF6.cjs +0 -16
  133. package/dist/_basePickBy-CWzy8CIJ.cjs +0 -1
  134. package/dist/_baseUniq-DzAGUMoa.cjs +0 -1
  135. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +0 -1
  136. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  137. package/dist/arc-BAZxwgoG.cjs +0 -1
  138. package/dist/architectureDiagram-VXUJARFQ-CBEmF4c4.cjs +0 -36
  139. package/dist/channel-CybseUM2.cjs +0 -1
  140. package/dist/chunk-4BX2VUAB-6PxxKRiV.cjs +0 -1
  141. package/dist/chunk-55IACEB6-BaqZa58T.cjs +0 -1
  142. package/dist/chunk-QN33PNHL-NFeQwU1C.cjs +0 -1
  143. package/dist/chunk-QZHKN3VN-Bq63ipAz.cjs +0 -1
  144. package/dist/chunk-TZMSLE5B-Dp8UhykY.cjs +0 -1
  145. package/dist/classDiagram-2ON5EDUG-CWAjzXtp.cjs +0 -1
  146. package/dist/classDiagram-v2-WZHVMYZB-CWAjzXtp.cjs +0 -1
  147. package/dist/clone-W1VAscty.cjs +0 -1
  148. package/dist/cose-bilkent-S5V4N54A-DGtDnCf_.cjs +0 -1
  149. package/dist/dagre-6UL2VRFP-B7OkXNwm.cjs +0 -4
  150. package/dist/diagram-PSM6KHXK-DSJu8JZ6.cjs +0 -24
  151. package/dist/diagram-QEK2KX5R-CoE4joH1.cjs +0 -43
  152. package/dist/diagram-S2PKOQOG-CtcEZ9xO.cjs +0 -24
  153. package/dist/entries/md.cjs.js +0 -1
  154. package/dist/entries/md.es.js +0 -5
  155. package/dist/ganttDiagram-LVOFAZNH-CWj5yJz4.cjs +0 -267
  156. package/dist/gitGraphDiagram-NY62KEGX-Bijj3zxW.cjs +0 -65
  157. package/dist/graph-DFTHBY71.cjs +0 -1
  158. package/dist/info-63CPKGFF-BLYzhYAj.js +0 -5
  159. package/dist/infoDiagram-F6ZHWCRC-CGakmtht.cjs +0 -2
  160. package/dist/layout-BKa4J6c-.cjs +0 -1
  161. package/dist/linear-DZQR44UC.cjs +0 -1
  162. package/dist/pie-WTHONI2E-L2ei45O-.js +0 -5
  163. package/dist/pieDiagram-ADFJNKIX-BIV_iyZL.cjs +0 -30
  164. package/dist/radar-NJJJXTRR-BF1JzV5Y.js +0 -5
  165. package/dist/sankeyDiagram-TZEHDZUN-Dt6lrgnr.cjs +0 -10
  166. package/dist/stateDiagram-FKZM4ZOC-t7WnWKbx.cjs +0 -1
  167. package/dist/stateDiagram-v2-4FDKWEC3-Ct9Imkjc.cjs +0 -1
  168. package/dist/types/entries/md.d.ts +0 -3
  169. package/dist/types/entries/plugins/custom.d.ts +0 -3
  170. package/dist/types/entries/plugins/markdown-it.d.ts +0 -2
  171. package/dist/types/helpers/containerHelpers.d.ts +0 -58
  172. package/dist/types/helpers/index.d.ts +0 -4
  173. package/dist/types/plugins/CodeBlockPlugin.d.ts +0 -9
  174. package/dist/types/plugins/EmojiPlugin.d.ts +0 -11
  175. package/dist/types/plugins/mermaidPlugin.d.ts +0 -13
  176. /package/dist/types/plugins/{katexPlugin.d.ts → markdown-it/katexPlugin.d.ts} +0 -0
@@ -1 +0,0 @@
1
- "use strict";const m=require("./custom-BB9B2BL2.cjs"),x=require("./init-CHZsXQcr.cjs"),g=require("./defaultLocale-DIVzfLaQ.cjs");function p(n,r){return n==null||r==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function D(n,r){return n==null||r==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function d(n){let r,t,e;n.length!==2?(r=p,t=(a,f)=>p(n(a),f),e=(a,f)=>n(a)-f):(r=n===p||n===D?n:F,t=n,e=n);function u(a,f,i=0,s=a.length){if(i<s){if(r(f,f)!==0)return s;do{const l=i+s>>>1;t(a[l],f)<0?i=l+1:s=l}while(i<s)}return i}function c(a,f,i=0,s=a.length){if(i<s){if(r(f,f)!==0)return s;do{const l=i+s>>>1;t(a[l],f)<=0?i=l+1:s=l}while(i<s)}return i}function o(a,f,i=0,s=a.length){const l=u(a,f,i,s-1);return l>i&&e(a[l-1],f)>-e(a[l],f)?l-1:l}return{left:u,center:o,right:c}}function F(){return 0}function $(n){return n===null?NaN:+n}const z=d(p),B=z.right;d($).center;const I=Math.sqrt(50),P=Math.sqrt(10),V=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),c=e/Math.pow(10,u),o=c>=I?10:c>=P?5:c>=V?2:1;let a,f,i;return u<0?(i=Math.pow(10,-u)/o,a=Math.round(n*i),f=Math.round(r*i),a/i<n&&++a,f/i>r&&--f,i=-i):(i=Math.pow(10,u)*o,a=Math.round(n/i),f=Math.round(r/i),a*i<n&&++a,f*i>r&&--f),f<a&&.5<=t&&t<2?v(n,r,t*2):[a,f,i]}function L(n,r,t){if(r=+r,n=+n,t=+t,!(t>0))return[];if(n===r)return[n];const e=r<n,[u,c,o]=e?v(r,n,t):v(n,r,t);if(!(c>=u))return[];const a=c-u+1,f=new Array(a);if(e)if(o<0)for(let i=0;i<a;++i)f[i]=(c-i)/-o;else for(let i=0;i<a;++i)f[i]=(c-i)*o;else if(o<0)for(let i=0;i<a;++i)f[i]=(u+i)/-o;else for(let i=0;i<a;++i)f[i]=(u+i)*o;return f}function y(n,r,t){return r=+r,n=+n,t=+t,v(n,r,t)[2]}function A(n,r,t){r=+r,n=+n,t=+t;const e=r<n,u=e?y(r,n,t):y(n,r,t);return(e?-1:1)*(u<0?1/-u:u)}function O(n,r){r||(r=[]);var t=n?Math.min(r.length,n.length):0,e=r.slice(),u;return function(c){for(u=0;u<t;++u)e[u]=n[u]*(1-c)+r[u]*c;return e}}function T(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function _(n,r){var t=r?r.length:0,e=n?Math.min(t,n.length):0,u=new Array(e),c=new Array(t),o;for(o=0;o<e;++o)u[o]=w(n[o],r[o]);for(;o<t;++o)c[o]=r[o];return function(a){for(o=0;o<e;++o)c[o]=u[o](a);return c}}function C(n,r){var t=new Date;return n=+n,r=+r,function(e){return t.setTime(n*(1-e)+r*e),t}}function E(n,r){var t={},e={},u;(n===null||typeof n!="object")&&(n={}),(r===null||typeof r!="object")&&(r={});for(u in r)u in n?t[u]=w(n[u],r[u]):e[u]=r[u];return function(c){for(u in t)e[u]=t[u](c);return e}}function w(n,r){var t=typeof r,e;return r==null||t==="boolean"?m.constant$2(r):(t==="number"?m.interpolateNumber:t==="string"?(e=m.color(r))?(r=e,m.interpolateRgb):m.interpolateString:r instanceof m.color?m.interpolateRgb:r instanceof Date?C:T(r)?O:Array.isArray(r)?_:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?E:m.interpolateNumber)(n,r)}function G(n,r){return n=+n,r=+r,function(t){return Math.round(n*(1-t)+r*t)}}function H(n){return Math.max(0,-g.exponent(Math.abs(n)))}function J(n,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g.exponent(r)/3)))*3-g.exponent(Math.abs(n)))}function K(n,r){return n=Math.abs(n),r=Math.abs(r)-n,Math.max(0,g.exponent(r)-g.exponent(n))+1}function Q(n){return function(){return n}}function U(n){return+n}var k=[0,1];function M(n){return n}function N(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:Q(isNaN(r)?NaN:.5)}function W(n,r){var t;return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function X(n,r,t){var e=n[0],u=n[1],c=r[0],o=r[1];return u<e?(e=N(u,e),c=t(o,c)):(e=N(e,u),c=t(c,o)),function(a){return c(e(a))}}function Y(n,r,t){var e=Math.min(n.length,r.length)-1,u=new Array(e),c=new Array(e),o=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++o<e;)u[o]=N(n[o],n[o+1]),c[o]=t(r[o],r[o+1]);return function(a){var f=B(n,a,1,e)-1;return c[f](u[f](a))}}function R(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function Z(){var n=k,r=k,t=w,e,u,c,o=M,a,f,i;function s(){var h=Math.min(n.length,r.length);return o!==M&&(o=W(n[0],n[h-1])),a=h>2?Y:X,f=i=null,l}function l(h){return h==null||isNaN(h=+h)?c:(f||(f=a(n.map(e),r,t)))(e(o(h)))}return l.invert=function(h){return o(u((i||(i=a(r,n.map(e),m.interpolateNumber)))(h)))},l.domain=function(h){return arguments.length?(n=Array.from(h,U),s()):n.slice()},l.range=function(h){return arguments.length?(r=Array.from(h),s()):r.slice()},l.rangeRound=function(h){return r=Array.from(h),t=G,s()},l.clamp=function(h){return arguments.length?(o=h?!0:M,s()):o!==M},l.interpolate=function(h){return arguments.length?(t=h,s()):t},l.unknown=function(h){return arguments.length?(c=h,l):c},function(h,j){return e=h,u=j,s()}}function q(){return Z()(M,M)}function b(n,r,t,e){var u=A(n,r,t),c;switch(e=g.formatSpecifier(e??",f"),e.type){case"s":{var o=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(c=J(u,o))&&(e.precision=c),g.formatPrefix(e,o)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(c=K(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=c-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(c=H(u))&&(e.precision=c-(e.type==="%")*2);break}}return g.format(e)}function nn(n){var r=n.domain;return n.ticks=function(t){var e=r();return L(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return b(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,c=e.length-1,o=e[u],a=e[c],f,i,s=10;for(a<o&&(i=o,o=a,a=i,i=u,u=c,c=i);s-- >0;){if(i=y(o,a,t),i===f)return e[u]=o,e[c]=a,r(e);if(i>0)o=Math.floor(o/i)*i,a=Math.ceil(a/i)*i;else if(i<0)o=Math.ceil(o*i)/i,a=Math.floor(a*i)/i;else break;f=i}return n},n}function S(){var n=q();return n.copy=function(){return R(n,S())},x.initRange.apply(n,arguments),nn(n)}exports.bisector=d;exports.continuous=q;exports.copy=R;exports.linear=S;exports.tickStep=A;
@@ -1,5 +0,0 @@
1
- import { b as a, d as i } from "./mermaid-parser.core-scIqCLhe.js";
2
- export {
3
- a as PieModule,
4
- i as createPieServices
5
- };
@@ -1,30 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./custom-BB9B2BL2.cjs"),q=require("./chunk-4BX2VUAB-6PxxKRiV.cjs"),B=require("./mermaid-parser.core-DilcMT1B.cjs"),N=require("./arc-BAZxwgoG.cjs"),V=require("./ordinal-CagbB1m8.cjs");function U(e,n){return n<e?-1:n>e?1:n>=e?0:NaN}function j(e){return e}function X(){var e=j,n=U,f=null,S=t.constant(0),s=t.constant(t.tau),c=t.constant(0);function o(a){var i,u=(a=t.array(a)).length,d,y,h=0,g=new Array(u),l=new Array(u),v=+S.apply(this,arguments),A=Math.min(t.tau,Math.max(-t.tau,s.apply(this,arguments)-v)),m,w=Math.min(Math.abs(A)/u,c.apply(this,arguments)),_=w*(A<0?-1:1),p;for(i=0;i<u;++i)(p=l[g[i]=i]=+e(a[i],i,a))>0&&(h+=p);for(n!=null?g.sort(function(x,D){return n(l[x],l[D])}):f!=null&&g.sort(function(x,D){return f(a[x],a[D])}),i=0,y=h?(A-u*_)/h:0;i<u;++i,v=m)d=g[i],p=l[d],m=v+(p>0?p*y:0)+_,l[d]={data:a[d],index:i,value:p,startAngle:v,endAngle:m,padAngle:w};return l}return o.value=function(a){return arguments.length?(e=typeof a=="function"?a:t.constant(+a),o):e},o.sortValues=function(a){return arguments.length?(n=a,f=null,o):n},o.sort=function(a){return arguments.length?(f=a,n=null,o):f},o.startAngle=function(a){return arguments.length?(S=typeof a=="function"?a:t.constant(+a),o):S},o.endAngle=function(a){return arguments.length?(s=typeof a=="function"?a:t.constant(+a),o):s},o.padAngle=function(a){return arguments.length?(c=typeof a=="function"?a:t.constant(+a),o):c},o}var Z=t.defaultConfig_default.pie,E={sections:new Map,showData:!1},T=E.sections,M=E.showData,H=structuredClone(Z),J=t.__name(()=>structuredClone(H),"getConfig"),K=t.__name(()=>{T=new Map,M=E.showData,t.clear()},"clear"),Q=t.__name(({label:e,value:n})=>{if(n<0)throw new Error(`"${e}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(e)||(T.set(e,n),t.log.debug(`added new section: ${e}, with value: ${n}`))},"addSection"),Y=t.__name(()=>T,"getSections"),ee=t.__name(e=>{M=e},"setShowData"),te=t.__name(()=>M,"getShowData"),O={getConfig:J,clear:K,setDiagramTitle:t.setDiagramTitle,getDiagramTitle:t.getDiagramTitle,setAccTitle:t.setAccTitle,getAccTitle:t.getAccTitle,setAccDescription:t.setAccDescription,getAccDescription:t.getAccDescription,addSection:Q,getSections:Y,setShowData:ee,getShowData:te},ae=t.__name((e,n)=>{q.populateCommonDb(e,n),n.setShowData(e.showData),e.sections.map(n.addSection)},"populateDb"),ne={parse:t.__name(async e=>{const n=await B.parse("pie",e);t.log.debug(n),ae(n,O)},"parse")},re=t.__name(e=>`
2
- .pieCircle{
3
- stroke: ${e.pieStrokeColor};
4
- stroke-width : ${e.pieStrokeWidth};
5
- opacity : ${e.pieOpacity};
6
- }
7
- .pieOuterCircle{
8
- stroke: ${e.pieOuterStrokeColor};
9
- stroke-width: ${e.pieOuterStrokeWidth};
10
- fill: none;
11
- }
12
- .pieTitleText {
13
- text-anchor: middle;
14
- font-size: ${e.pieTitleTextSize};
15
- fill: ${e.pieTitleTextColor};
16
- font-family: ${e.fontFamily};
17
- }
18
- .slice {
19
- font-family: ${e.fontFamily};
20
- fill: ${e.pieSectionTextColor};
21
- font-size:${e.pieSectionTextSize};
22
- // fill: white;
23
- }
24
- .legend text {
25
- fill: ${e.pieLegendTextColor};
26
- font-family: ${e.fontFamily};
27
- font-size: ${e.pieLegendTextSize};
28
- }
29
- `,"getStyles"),ie=re,le=t.__name(e=>{const n=[...e.values()].reduce((s,c)=>s+c,0),f=[...e.entries()].map(([s,c])=>({label:s,value:c})).filter(s=>s.value/n*100>=1).sort((s,c)=>c.value-s.value);return X().value(s=>s.value)(f)},"createPieArcs"),se=t.__name((e,n,f,S)=>{t.log.debug(`rendering pie chart
30
- `+e);const s=S.db,c=t.getConfig2(),o=t.cleanAndMerge(s.getConfig(),c.pie),a=40,i=18,u=4,d=450,y=d,h=t.selectSvgElement(n),g=h.append("g");g.attr("transform","translate("+y/2+","+d/2+")");const{themeVariables:l}=c;let[v]=t.parseFontSize(l.pieOuterStrokeWidth);v??=2;const A=o.textPosition,m=Math.min(y,d)/2-a,w=N.d3arc().innerRadius(0).outerRadius(m),_=N.d3arc().innerRadius(m*A).outerRadius(m*A);g.append("circle").attr("cx",0).attr("cy",0).attr("r",m+v/2).attr("class","pieOuterCircle");const p=s.getSections(),x=le(p),D=[l.pie1,l.pie2,l.pie3,l.pie4,l.pie5,l.pie6,l.pie7,l.pie8,l.pie9,l.pie10,l.pie11,l.pie12];let C=0;p.forEach(r=>{C+=r});const z=x.filter(r=>(r.data.value/C*100).toFixed(0)!=="0"),$=V.ordinal(D);g.selectAll("mySlices").data(z).enter().append("path").attr("d",w).attr("fill",r=>$(r.data.label)).attr("class","pieCircle"),g.selectAll("mySlices").data(z).enter().append("text").text(r=>(r.data.value/C*100).toFixed(0)+"%").attr("transform",r=>"translate("+_.centroid(r)+")").style("text-anchor","middle").attr("class","slice"),g.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const F=[...p.entries()].map(([r,k])=>({label:r,value:k})),b=g.selectAll(".legend").data(F).enter().append("g").attr("class","legend").attr("transform",(r,k)=>{const G=i+u,R=G*F.length/2,I=12*i,L=k*G-R;return"translate("+I+","+L+")"});b.append("rect").attr("width",i).attr("height",i).style("fill",r=>$(r.label)).style("stroke",r=>$(r.label)),b.append("text").attr("x",i+u).attr("y",i-u).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);const W=Math.max(...b.selectAll("text").nodes().map(r=>r?.getBoundingClientRect().width??0)),P=y+a+i+u+W;h.attr("viewBox",`0 0 ${P} ${d}`),t.configureSvgSize(h,d,P,o.useMaxWidth)},"draw"),oe={draw:se},ce={parser:ne,db:O,renderer:oe,styles:ie};exports.diagram=ce;
@@ -1,5 +0,0 @@
1
- import { R as r, g as d } from "./mermaid-parser.core-scIqCLhe.js";
2
- export {
3
- r as RadarModule,
4
- d as createRadarServices
5
- };
@@ -1,10 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./custom-BB9B2BL2.cjs"),_t=require("./ordinal-CagbB1m8.cjs");function mt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a<e;)i[a]="#"+t.slice(a*6,++a*6);return i}const kt=mt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function at(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i<a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i<h||i===void 0&&h>=h)&&(i=h)}return i}function dt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function et(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function xt(t){return t.target.depth}function vt(t){return t.depth}function bt(t,e){return e-1-t.height}function gt(t,e){return t.sourceLinks.length?t.depth:e-1}function St(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,xt)-1:0}function H(t){return function(){return t}}function lt(t,e){return X(t.source,e.source)||t.index-e.index}function ct(t,e){return X(t.target,e.target)||t.index-e.index}function X(t,e){return t.y0-e.y0}function nt(t){return t.value}function wt(t){return t.index}function Lt(t){return t.nodes}function Et(t){return t.links}function ut(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function ht({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function At(){let t=0,e=0,i=1,a=1,h=24,b=8,p,m=wt,s=gt,o,l,k=Lt,x=Et,d=6;function v(){const n={nodes:k.apply(null,arguments),links:x.apply(null,arguments)};return M(n),T(n),N(n),I(n),w(n),ht(n),n}v.update=function(n){return ht(n),n},v.nodeId=function(n){return arguments.length?(m=typeof n=="function"?n:H(n),v):m},v.nodeAlign=function(n){return arguments.length?(s=typeof n=="function"?n:H(n),v):s},v.nodeSort=function(n){return arguments.length?(o=n,v):o},v.nodeWidth=function(n){return arguments.length?(h=+n,v):h},v.nodePadding=function(n){return arguments.length?(b=p=+n,v):b},v.nodes=function(n){return arguments.length?(k=typeof n=="function"?n:H(n),v):k},v.links=function(n){return arguments.length?(x=typeof n=="function"?n:H(n),v):x},v.linkSort=function(n){return arguments.length?(l=n,v):l},v.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],v):[i-t,a-e]},v.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],v):[[t,e],[i,a]]},v.iterations=function(n){return arguments.length?(d=+n,v):d};function M({nodes:n,links:y}){for(const[c,r]of n.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(n.map((c,r)=>[m(c,r,n),c]));for(const[c,r]of y.entries()){r.index=c;let{source:_,target:S}=r;typeof _!="object"&&(_=r.source=ut(u,_)),typeof S!="object"&&(S=r.target=ut(u,S)),_.sourceLinks.push(r),S.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of n)c.sort(l),r.sort(l)}function T({nodes:n}){for(const y of n)y.value=y.fixedValue===void 0?Math.max(et(y.sourceLinks,nt),et(y.targetLinks,nt)):y.fixedValue}function N({nodes:n}){const y=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const _ of u){_.depth=r;for(const{target:S}of _.sourceLinks)c.add(S)}if(++r>y)throw new Error("circular link");u=c,c=new Set}}function I({nodes:n}){const y=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const _ of u){_.height=r;for(const{source:S}of _.targetLinks)c.add(S)}if(++r>y)throw new Error("circular link");u=c,c=new Set}}function $({nodes:n}){const y=at(n,r=>r.depth)+1,u=(i-t-h)/(y-1),c=new Array(y);for(const r of n){const _=Math.max(0,Math.min(y-1,Math.floor(s.call(null,r,y))));r.layer=_,r.x0=t+_*u,r.x1=r.x0+h,c[_]?c[_].push(r):c[_]=[r]}if(o)for(const r of c)r.sort(o);return c}function R(n){const y=dt(n,u=>(a-e-(u.length-1)*p)/et(u,nt));for(const u of n){let c=e;for(const r of u){r.y0=c,r.y1=c+r.value*y,c=r.y1+p;for(const _ of r.sourceLinks)_.width=_.value*y}c=(a-c+p)/(u.length+1);for(let r=0;r<u.length;++r){const _=u[r];_.y0+=c*(r+1),_.y1+=c*(r+1)}A(u)}}function w(n){const y=$(n);p=Math.min(b,(a-e)/(at(y,u=>u.length)-1)),R(y);for(let u=0;u<d;++u){const c=Math.pow(.99,u),r=Math.max(1-c,(u+1)/d);B(y,c,r),C(y,c,r)}}function C(n,y,u){for(let c=1,r=n.length;c<r;++c){const _=n[c];for(const S of _){let L=0,F=0;for(const{source:q,value:tt}of S.targetLinks){let Y=tt*(S.layer-q.layer);L+=j(q,S)*Y,F+=Y}if(!(F>0))continue;let G=(L/F-S.y0)*y;S.y0+=G,S.y1+=G,E(S)}o===void 0&&_.sort(X),O(_,u)}}function B(n,y,u){for(let c=n.length,r=c-2;r>=0;--r){const _=n[r];for(const S of _){let L=0,F=0;for(const{target:q,value:tt}of S.sourceLinks){let Y=tt*(q.layer-S.layer);L+=P(S,q)*Y,F+=Y}if(!(F>0))continue;let G=(L/F-S.y0)*y;S.y0+=G,S.y1+=G,E(S)}o===void 0&&_.sort(X),O(_,u)}}function O(n,y){const u=n.length>>1,c=n[u];g(n,c.y0-p,u-1,y),D(n,c.y1+p,u+1,y),g(n,a,n.length-1,y),D(n,e,0,y)}function D(n,y,u,c){for(;u<n.length;++u){const r=n[u],_=(y-r.y0)*c;_>1e-6&&(r.y0+=_,r.y1+=_),y=r.y1+p}}function g(n,y,u,c){for(;u>=0;--u){const r=n[u],_=(r.y1-y)*c;_>1e-6&&(r.y0-=_,r.y1-=_),y=r.y0-p}}function E({sourceLinks:n,targetLinks:y}){if(l===void 0){for(const{source:{sourceLinks:u}}of y)u.sort(ct);for(const{target:{targetLinks:u}}of n)u.sort(lt)}}function A(n){if(l===void 0)for(const{sourceLinks:y,targetLinks:u}of n)y.sort(ct),u.sort(lt)}function j(n,y){let u=n.y0-(n.sourceLinks.length-1)*p/2;for(const{target:c,width:r}of n.sourceLinks){if(c===y)break;u+=r+p}for(const{source:c,width:r}of y.targetLinks){if(c===n)break;u-=r}return u}function P(n,y){let u=y.y0-(y.targetLinks.length-1)*p/2;for(const{source:c,width:r}of y.targetLinks){if(c===n)break;u+=r+p}for(const{target:c,width:r}of n.sourceLinks){if(c===y)break;u-=r}return u}return v}var it=Math.PI,st=2*it,V=1e-6,Tt=st-V;function rt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new rt}rt.prototype=pt.prototype={constructor:rt,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,b){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+b)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var b=this._x1,p=this._y1,m=i-t,s=a-e,o=b-t,l=p-e,k=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(k>V)if(!(Math.abs(l*m-s*o)>V)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var x=i-b,d=a-p,v=m*m+s*s,M=x*x+d*d,T=Math.sqrt(v),N=Math.sqrt(k),I=h*Math.tan((it-Math.acos((v+k-M)/(2*T*N)))/2),$=I/N,R=I/T;Math.abs($-1)>V&&(this._+="L"+(t+$*o)+","+(e+$*l)),this._+="A"+h+","+h+",0,0,"+ +(l*x>o*d)+","+(this._x1=t+R*m)+","+(this._y1=e+R*s)}},arc:function(t,e,i,a,h,b){t=+t,e=+e,i=+i,b=!!b;var p=i*Math.cos(a),m=i*Math.sin(a),s=t+p,o=e+m,l=1^b,k=b?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>V||Math.abs(this._y1-o)>V)&&(this._+="L"+s+","+o),i&&(k<0&&(k=k%st+st),k>Tt?this._+="A"+i+","+i+",0,1,"+l+","+(t-p)+","+(e-m)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):k>V&&(this._+="A"+i+","+i+",0,"+ +(k>=it)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Mt(t){return t[0]}function Nt(t){return t[1]}var Pt=Array.prototype.slice;function Ct(t){return t.source}function It(t){return t.target}function Ot(t){var e=Ct,i=It,a=Mt,h=Nt,b=null;function p(){var m,s=Pt.call(arguments),o=e.apply(this,s),l=i.apply(this,s);if(b||(b=m=pt()),t(b,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),m)return b=null,m+""||null}return p.source=function(m){return arguments.length?(e=m,p):e},p.target=function(m){return arguments.length?(i=m,p):i},p.x=function(m){return arguments.length?(a=typeof m=="function"?m:ft(+m),p):a},p.y=function(m){return arguments.length?(h=typeof m=="function"?m:ft(+m),p):h},p.context=function(m){return arguments.length?(b=m??null,p):b},p}function Dt(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}function $t(){return Ot(Dt)}function jt(t){return[t.source.x1,t.y0]}function zt(t){return[t.target.x0,t.y1]}function Bt(){return $t().source(jt).target(zt)}var ot=(function(){var t=f.__name(function(m,s,o,l){for(o=o||{},l=m.length;l--;o[m[l]]=s);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:f.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:f.__name(function(s,o,l,k,x,d,v){var M=d.length-1;switch(x){case 7:const T=k.findOrCreateNode(d[M-4].trim().replaceAll('""','"')),N=k.findOrCreateNode(d[M-2].trim().replaceAll('""','"')),I=parseFloat(d[M].trim());k.addLink(T,N,I);break;case 8:case 9:case 11:this.$=d[M];break;case 10:this.$=d[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:f.__name(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:f.__name(function(s){var o=this,l=[0],k=[],x=[null],d=[],v=this.table,M="",T=0,N=0,I=2,$=1,R=d.slice.call(arguments,1),w=Object.create(this.lexer),C={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(C.yy[B]=this.yy[B]);w.setInput(s,C.yy),C.yy.lexer=w,C.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var O=w.yylloc;d.push(O);var D=w.options&&w.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function g(L){l.length=l.length-2*L,x.length=x.length-L,d.length=d.length-L}f.__name(g,"popStack");function E(){var L;return L=k.pop()||w.lex()||$,typeof L!="number"&&(L instanceof Array&&(k=L,L=k.pop()),L=o.symbols_[L]||L),L}f.__name(E,"lex");for(var A,j,P,n,y={},u,c,r,_;;){if(j=l[l.length-1],this.defaultActions[j]?P=this.defaultActions[j]:((A===null||typeof A>"u")&&(A=E()),P=v[j]&&v[j][A]),typeof P>"u"||!P.length||!P[0]){var S="";_=[];for(u in v[j])this.terminals_[u]&&u>I&&_.push("'"+this.terminals_[u]+"'");w.showPosition?S="Parse error on line "+(T+1)+`:
2
- `+w.showPosition()+`
3
- Expecting `+_.join(", ")+", got '"+(this.terminals_[A]||A)+"'":S="Parse error on line "+(T+1)+": Unexpected "+(A==$?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(S,{text:w.match,token:this.terminals_[A]||A,line:w.yylineno,loc:O,expected:_})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+A);switch(P[0]){case 1:l.push(A),x.push(w.yytext),d.push(w.yylloc),l.push(P[1]),A=null,N=w.yyleng,M=w.yytext,T=w.yylineno,O=w.yylloc;break;case 2:if(c=this.productions_[P[1]][1],y.$=x[x.length-c],y._$={first_line:d[d.length-(c||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(c||1)].first_column,last_column:d[d.length-1].last_column},D&&(y._$.range=[d[d.length-(c||1)].range[0],d[d.length-1].range[1]]),n=this.performAction.apply(y,[M,N,T,C.yy,P[1],x,d].concat(R)),typeof n<"u")return n;c&&(l=l.slice(0,-1*c*2),x=x.slice(0,-1*c),d=d.slice(0,-1*c)),l.push(this.productions_[P[1]][0]),x.push(y.$),d.push(y._$),r=v[l[l.length-2]][l[l.length-1]],l.push(r);break;case 3:return!0}}return!0},"parse")},b=(function(){var m={EOF:1,parseError:f.__name(function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},"parseError"),setInput:f.__name(function(s,o){return this.yy=o||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f.__name(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:f.__name(function(s){var o=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var k=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===k.length?this.yylloc.first_column:0)+k[k.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:f.__name(function(){return this._more=!0,this},"more"),reject:f.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f.__name(function(s){this.unput(this.match.slice(s))},"less"),pastInput:f.__name(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f.__name(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f.__name(function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
5
- `+o+"^"},"showPosition"),test_match:f.__name(function(s,o){var l,k,x;if(this.options.backtrack_lexer&&(x={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(x.yylloc.range=this.yylloc.range.slice(0))),k=s[0].match(/(?:\r\n?|\n).*/g),k&&(this.yylineno+=k.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var d in x)this[d]=x[d];return!1}return!1},"test_match"),next:f.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,l,k;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),d=0;d<x.length;d++)if(l=this._input.match(this.rules[x[d]]),l&&(!o||l[0].length>o[0].length)){if(o=l,k=d,this.options.backtrack_lexer){if(s=this.test_match(l,x[d]),s!==!1)return s;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(s=this.test_match(o,x[k]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f.__name(function(){var o=this.next();return o||this.lex()},"lex"),begin:f.__name(function(o){this.conditionStack.push(o)},"begin"),popState:f.__name(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f.__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f.__name(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:f.__name(function(o){this.begin(o)},"pushState"),stateStackSize:f.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f.__name(function(o,l,k,x){switch(k){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return m})();h.lexer=b;function p(){this.yy={}}return f.__name(p,"Parser"),p.prototype=h,h.Parser=p,new p})();ot.parser=ot;var Q=ot,Z=[],J=[],K=new Map,Rt=f.__name(()=>{Z=[],J=[],K=new Map,f.clear()},"clear"),W,Ft=(W=class{constructor(e,i,a=0){this.source=e,this.target=i,this.value=a}},f.__name(W,"SankeyLink"),W),Vt=f.__name((t,e,i)=>{Z.push(new Ft(t,e,i))},"addLink"),U,Wt=(U=class{constructor(e){this.ID=e}},f.__name(U,"SankeyNode"),U),Ut=f.__name(t=>{t=f.common_default.sanitizeText(t,f.getConfig2());let e=K.get(t);return e===void 0&&(e=new Wt(t),K.set(t,e),J.push(e)),e},"findOrCreateNode"),Gt=f.__name(()=>J,"getNodes"),qt=f.__name(()=>Z,"getLinks"),Yt=f.__name(()=>({nodes:J.map(t=>({id:t.ID})),links:Z.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),Ht={nodesMap:K,getConfig:f.__name(()=>f.getConfig2().sankey,"getConfig"),getNodes:Gt,getLinks:qt,getGraph:Yt,addLink:Vt,findOrCreateNode:Ut,getAccTitle:f.getAccTitle,setAccTitle:f.setAccTitle,getAccDescription:f.getAccDescription,setAccDescription:f.setAccDescription,getDiagramTitle:f.getDiagramTitle,setDiagramTitle:f.setDiagramTitle,clear:Rt},z,yt=(z=class{static next(e){return new z(e+ ++z.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},f.__name(z,"Uid"),z.count=0,z),Xt={left:vt,right:bt,center:St,justify:gt},Qt=f.__name(function(t,e,i,a){const{securityLevel:h,sankey:b}=f.getConfig2(),p=f.defaultConfig2.sankey;let m;h==="sandbox"&&(m=f.select("#i"+e));const s=h==="sandbox"?f.select(m.nodes()[0].contentDocument.body):f.select("body"),o=h==="sandbox"?s.select(`[id="${e}"]`):f.select(`[id="${e}"]`),l=b?.width??p.width,k=b?.height??p.width,x=b?.useMaxWidth??p.useMaxWidth,d=b?.nodeAlignment??p.nodeAlignment,v=b?.prefix??p.prefix,M=b?.suffix??p.suffix,T=b?.showValues??p.showValues,N=a.db.getGraph(),I=Xt[d];At().nodeId(g=>g.id).nodeWidth(10).nodePadding(10+(T?15:0)).nodeAlign(I).extent([[0,0],[l,k]])(N);const w=_t.ordinal(kt);o.append("g").attr("class","nodes").selectAll(".node").data(N.nodes).join("g").attr("class","node").attr("id",g=>(g.uid=yt.next("node-")).id).attr("transform",function(g){return"translate("+g.x0+","+g.y0+")"}).attr("x",g=>g.x0).attr("y",g=>g.y0).append("rect").attr("height",g=>g.y1-g.y0).attr("width",g=>g.x1-g.x0).attr("fill",g=>w(g.id));const C=f.__name(({id:g,value:E})=>T?`${g}
7
- ${v}${Math.round(E*100)/100}${M}`:g,"getText");o.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(N.nodes).join("text").attr("x",g=>g.x0<l/2?g.x1+6:g.x0-6).attr("y",g=>(g.y1+g.y0)/2).attr("dy",`${T?"0":"0.35"}em`).attr("text-anchor",g=>g.x0<l/2?"start":"end").text(C);const B=o.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(N.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),O=b?.linkColor??"gradient";if(O==="gradient"){const g=B.append("linearGradient").attr("id",E=>(E.uid=yt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",E=>E.source.x1).attr("x2",E=>E.target.x0);g.append("stop").attr("offset","0%").attr("stop-color",E=>w(E.source.id)),g.append("stop").attr("offset","100%").attr("stop-color",E=>w(E.target.id))}let D;switch(O){case"gradient":D=f.__name(g=>g.uid,"coloring");break;case"source":D=f.__name(g=>w(g.source.id),"coloring");break;case"target":D=f.__name(g=>w(g.target.id),"coloring");break;default:D=O}B.append("path").attr("d",Bt()).attr("stroke",D).attr("stroke-width",g=>Math.max(1,g.width)),f.setupGraphViewbox(void 0,o,0,x)},"draw"),Kt={draw:Qt},Zt=f.__name(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
8
- `).trim(),"prepareTextForParsing"),Jt=f.__name(t=>`.label {
9
- font-family: ${t.fontFamily};
10
- }`,"getStyles"),te=Jt,ee=Q.parse.bind(Q);Q.parse=t=>ee(Zt(t));var ne={styles:te,parser:Q,db:Ht,renderer:Kt};exports.diagram=ne;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./chunk-DI55MBZ5-BUn8iSqn.cjs"),t=require("./custom-BB9B2BL2.cjs"),T=require("./graph-DFTHBY71.cjs"),H=require("./layout-BKa4J6c-.cjs");var z=t.__name(e=>e.append("circle").attr("class","start-state").attr("r",t.getConfig2().state.sizeUnit).attr("cx",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit).attr("cy",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit),"drawStartState"),L=t.__name(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t.getConfig2().state.textHeight).attr("class","divider").attr("x2",t.getConfig2().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),A=t.__name((e,n)=>{const d=e.append("text").attr("x",2*t.getConfig2().state.padding).attr("y",t.getConfig2().state.textHeight+2*t.getConfig2().state.padding).attr("font-size",t.getConfig2().state.fontSize).attr("class","state-title").text(n.id),g=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t.getConfig2().state.padding).attr("y",t.getConfig2().state.padding).attr("width",g.width+2*t.getConfig2().state.padding).attr("height",g.height+2*t.getConfig2().state.padding).attr("rx",t.getConfig2().state.radius),d},"drawSimpleState"),P=t.__name((e,n)=>{const d=t.__name(function(c,m,y){const b=c.append("tspan").attr("x",2*t.getConfig2().state.padding).text(m);y||b.attr("dy",t.getConfig2().state.textHeight)},"addTspan"),o=e.append("text").attr("x",2*t.getConfig2().state.padding).attr("y",t.getConfig2().state.textHeight+1.3*t.getConfig2().state.padding).attr("font-size",t.getConfig2().state.fontSize).attr("class","state-title").text(n.descriptions[0]).node().getBBox(),l=o.height,p=e.append("text").attr("x",t.getConfig2().state.padding).attr("y",l+t.getConfig2().state.padding*.4+t.getConfig2().state.dividerMargin+t.getConfig2().state.textHeight).attr("class","state-description");let i=!0,r=!0;n.descriptions.forEach(function(c){i||(d(p,c,r),r=!1),i=!1});const C=e.append("line").attr("x1",t.getConfig2().state.padding).attr("y1",t.getConfig2().state.padding+l+t.getConfig2().state.dividerMargin/2).attr("y2",t.getConfig2().state.padding+l+t.getConfig2().state.dividerMargin/2).attr("class","descr-divider"),h=p.node().getBBox(),s=Math.max(h.width,o.width);return C.attr("x2",s+3*t.getConfig2().state.padding),e.insert("rect",":first-child").attr("x",t.getConfig2().state.padding).attr("y",t.getConfig2().state.padding).attr("width",s+2*t.getConfig2().state.padding).attr("height",h.height+l+2*t.getConfig2().state.padding).attr("rx",t.getConfig2().state.radius),e},"drawDescrState"),R=t.__name((e,n,d)=>{const g=t.getConfig2().state.padding,o=2*t.getConfig2().state.padding,l=e.node().getBBox(),p=l.width,i=l.x,r=e.append("text").attr("x",0).attr("y",t.getConfig2().state.titleShift).attr("font-size",t.getConfig2().state.fontSize).attr("class","state-title").text(n.id),h=r.node().getBBox().width+o;let s=Math.max(h,p);s===p&&(s=s+o);let c;const m=e.node().getBBox();n.doc,c=i-g,h>p&&(c=(p-s)/2+g),Math.abs(i-m.x)<g&&h>p&&(c=i-(h-p)/2);const y=1-t.getConfig2().state.textHeight;return e.insert("rect",":first-child").attr("x",c).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",s).attr("height",m.height+t.getConfig2().state.textHeight+t.getConfig2().state.titleShift+1).attr("rx","0"),r.attr("x",c+g),h<=p&&r.attr("x",i+(s-o)/2-h/2+g),e.insert("rect",":first-child").attr("x",c).attr("y",t.getConfig2().state.titleShift-t.getConfig2().state.textHeight-t.getConfig2().state.padding).attr("width",s).attr("height",t.getConfig2().state.textHeight*3).attr("rx",t.getConfig2().state.radius),e.insert("rect",":first-child").attr("x",c).attr("y",t.getConfig2().state.titleShift-t.getConfig2().state.textHeight-t.getConfig2().state.padding).attr("width",s).attr("height",m.height+3+2*t.getConfig2().state.textHeight).attr("rx",t.getConfig2().state.radius),e},"addTitleAndBox"),W=t.__name(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t.getConfig2().state.sizeUnit+t.getConfig2().state.miniPadding).attr("cx",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+t.getConfig2().state.miniPadding).attr("cy",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+t.getConfig2().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t.getConfig2().state.sizeUnit).attr("cx",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+2).attr("cy",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+2)),"drawEndState"),G=t.__name((e,n)=>{let d=t.getConfig2().state.forkWidth,g=t.getConfig2().state.forkHeight;if(n.parentId){let o=d;d=g,g=o}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",g).attr("x",t.getConfig2().state.padding).attr("y",t.getConfig2().state.padding)},"drawForkJoinState"),D=t.__name((e,n,d,g)=>{let o=0;const l=g.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const i=p.split(t.common_default.lineBreakRegex);let r=1.25*t.getConfig2().state.noteMargin;for(const C of i){const h=C.trim();if(h.length>0){const s=l.append("tspan");if(s.text(h),r===0){const c=s.node().getBBox();r+=c.height}o+=r,s.attr("x",n+t.getConfig2().state.noteMargin),s.attr("y",d+o+1.25*t.getConfig2().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:o}},"_drawLongText"),U=t.__name((e,n)=>{n.attr("class","state-note");const d=n.append("rect").attr("x",0).attr("y",t.getConfig2().state.padding),g=n.append("g"),{textWidth:o,textHeight:l}=D(e,0,0,g);return d.attr("height",l+2*t.getConfig2().state.noteMargin),d.attr("width",o+t.getConfig2().state.noteMargin*2),d},"drawNote"),k=t.__name(function(e,n){const d=n.id,g={id:d,label:n.id,width:0,height:0},o=e.append("g").attr("id",d).attr("class","stateGroup");n.type==="start"&&z(o),n.type==="end"&&W(o),(n.type==="fork"||n.type==="join")&&G(o,n),n.type==="note"&&U(n.note.text,o),n.type==="divider"&&L(o),n.type==="default"&&n.descriptions.length===0&&A(o,n),n.type==="default"&&n.descriptions.length>0&&P(o,n);const l=o.node().getBBox();return g.width=l.width+2*t.getConfig2().state.padding,g.height=l.height+2*t.getConfig2().state.padding,g},"drawState"),N=0,F=t.__name(function(e,n,d){const g=t.__name(function(r){switch(r){case S.StateDB.relationType.AGGREGATION:return"aggregation";case S.StateDB.relationType.EXTENSION:return"extension";case S.StateDB.relationType.COMPOSITION:return"composition";case S.StateDB.relationType.DEPENDENCY:return"dependency"}},"getRelationType");n.points=n.points.filter(r=>!Number.isNaN(r.y));const o=n.points,l=t.line().x(function(r){return r.x}).y(function(r){return r.y}).curve(t.curveBasis),p=e.append("path").attr("d",l(o)).attr("id","edge"+N).attr("class","transition");let i="";if(t.getConfig2().state.arrowMarkerAbsolute&&(i=t.getUrl(!0)),p.attr("marker-end","url("+i+"#"+g(S.StateDB.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const r=e.append("g").attr("class","stateLabel"),{x:C,y:h}=t.utils_default.calcLabelPosition(n.points),s=t.common_default.getRows(d.title);let c=0;const m=[];let y=0,b=0;for(let x=0;x<=s.length;x++){const f=r.append("text").attr("text-anchor","middle").text(s[x]).attr("x",C).attr("y",h+c),u=f.node().getBBox();y=Math.max(y,u.width),b=Math.min(b,u.x),t.log.info(u.x,C,h+c),c===0&&(c=f.node().getBBox().height,t.log.info("Title height",c,h)),m.push(f)}let _=c*s.length;if(s.length>1){const x=(s.length-1)*c*.5;m.forEach((f,u)=>f.attr("y",h+u*c-x)),_=c*s.length}const a=r.node().getBBox();r.insert("rect",":first-child").attr("class","box").attr("x",C-y/2-t.getConfig2().state.padding/2).attr("y",h-_/2-t.getConfig2().state.padding/2-3.5).attr("width",y+t.getConfig2().state.padding).attr("height",_+t.getConfig2().state.padding),t.log.info(a)}N++},"drawEdge"),w,E={},O=t.__name(function(){},"setConf"),q=t.__name(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),J=t.__name(function(e,n,d,g){w=t.getConfig2().state;const o=t.getConfig2().securityLevel;let l;o==="sandbox"&&(l=t.select("#i"+n));const p=o==="sandbox"?t.select(l.nodes()[0].contentDocument.body):t.select("body"),i=o==="sandbox"?l.nodes()[0].contentDocument:document;t.log.debug("Rendering diagram "+e);const r=p.select(`[id='${n}']`);q(r);const C=g.db.getRootDoc();M(C,r,void 0,!1,p,i,g);const h=w.padding,s=r.node().getBBox(),c=s.width+h*2,m=s.height+h*2,y=c*1.75;t.configureSvgSize(r,m,y,w.useMaxWidth),r.attr("viewBox",`${s.x-w.padding} ${s.y-w.padding} `+c+" "+m)},"draw"),X=t.__name(e=>e?e.length*w.fontSizeFactor:1,"getLabelWidth"),M=t.__name((e,n,d,g,o,l,p)=>{const i=new T.Graph({compound:!0,multigraph:!0});let r,C=!0;for(r=0;r<e.length;r++)if(e[r].stmt==="relation"){C=!1;break}d?i.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:C?1:w.edgeLengthFactor,nodeSep:C?1:50,isMultiGraph:!0}):i.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:C?1:w.edgeLengthFactor,nodeSep:C?1:50,ranker:"tight-tree",isMultiGraph:!0}),i.setDefaultEdgeLabel(function(){return{}});const h=p.db.getStates(),s=p.db.getRelations(),c=Object.keys(h);for(const a of c){const x=h[a];d&&(x.parentId=d);let f;if(x.doc){let u=n.append("g").attr("id",x.id).attr("class","stateGroup");f=M(x.doc,u,x.id,!g,o,l,p);{u=R(u,x,g);let B=u.node().getBBox();f.width=B.width,f.height=B.height+w.padding/2,E[x.id]={y:w.compositTitleSize}}}else f=k(n,x,i);if(x.note){const u={descriptions:[],id:x.id+"-note",note:x.note,type:"note"},B=k(n,u,i);x.note.position==="left of"?(i.setNode(f.id+"-note",B),i.setNode(f.id,f)):(i.setNode(f.id,f),i.setNode(f.id+"-note",B)),i.setParent(f.id,f.id+"-group"),i.setParent(f.id+"-note",f.id+"-group")}else i.setNode(f.id,f)}t.log.debug("Count=",i.nodeCount(),i);let m=0;s.forEach(function(a){m++,t.log.debug("Setting edge",a),i.setEdge(a.id1,a.id2,{relation:a,width:X(a.title),height:w.labelHeight*t.common_default.getRows(a.title).length,labelpos:"c"},"id"+m)}),H.layout(i),t.log.debug("Graph after layout",i.nodes());const y=n.node();i.nodes().forEach(function(a){a!==void 0&&i.node(a)!==void 0?(t.log.warn("Node "+a+": "+JSON.stringify(i.node(a))),o.select("#"+y.id+" #"+a).attr("transform","translate("+(i.node(a).x-i.node(a).width/2)+","+(i.node(a).y+(E[a]?E[a].y:0)-i.node(a).height/2)+" )"),o.select("#"+y.id+" #"+a).attr("data-x-shift",i.node(a).x-i.node(a).width/2),l.querySelectorAll("#"+y.id+" #"+a+" .divider").forEach(f=>{const u=f.parentElement;let B=0,v=0;u&&(u.parentElement&&(B=u.parentElement.getBBox().width),v=parseInt(u.getAttribute("data-x-shift"),10),Number.isNaN(v)&&(v=0)),f.setAttribute("x1",0-v+8),f.setAttribute("x2",B-v-8)})):t.log.debug("No Node "+a+": "+JSON.stringify(i.node(a)))});let b=y.getBBox();i.edges().forEach(function(a){a!==void 0&&i.edge(a)!==void 0&&(t.log.debug("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(i.edge(a))),F(n,i.edge(a),i.edge(a).relation))}),b=y.getBBox();const _={id:d||"root",label:d||"root",width:0,height:0};return _.width=b.width+2*w.padding,_.height=b.height+2*w.padding,t.log.debug("Doc rendered",_,i),_},"renderDoc"),I={setConf:O,draw:J},Y={parser:S.stateDiagram_default,get db(){return new S.StateDB(1)},renderer:I,styles:S.styles_default,init:t.__name(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};exports.diagram=Y;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./chunk-DI55MBZ5-BUn8iSqn.cjs"),r=require("./custom-BB9B2BL2.cjs");var a={parser:t.stateDiagram_default,get db(){return new t.StateDB(2)},renderer:t.stateRenderer_v3_unified_default,styles:t.styles_default,init:r.__name(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};exports.diagram=a;
@@ -1,3 +0,0 @@
1
- import MdRenderer from '../MdRenderer.vue';
2
- export { MdRenderer };
3
- export default MdRenderer;
@@ -1,3 +0,0 @@
1
- export { CodeBlockPlugin } from '../../plugins/CodeBlockPlugin';
2
- export { EmojiPlugin } from '../../plugins/EmojiPlugin';
3
- export { mermaidPlugin } from '../../plugins/mermaidPlugin';
@@ -1,2 +0,0 @@
1
- export { katexPlugin } from '../../plugins/katexPlugin';
2
- export { AlertPlugin } from '../../plugins/AlertPlugin';
@@ -1,58 +0,0 @@
1
- /**
2
- * Helper functions for configuring markdown-it-container plugins
3
- *
4
- * 简化 markdown-it-container 的配置过程
5
- */
6
- import type { MarkdownItPluginConfig } from '../types';
7
- import { AlertPlugin } from '../plugins/AlertPlugin';
8
- /**
9
- * 创建一个 Alert 容器配置
10
- *
11
- * @param type - Alert 类型 (info, warning, error, success)
12
- * @returns markdown-it-container 配置对象
13
- *
14
- * @example
15
- * ```typescript
16
- * import { createAlertContainer } from 'mio-previewer/helpers';
17
- *
18
- * const markdownItPlugins = [
19
- * createAlertContainer('info'),
20
- * createAlertContainer('warning'),
21
- * createAlertContainer('error'),
22
- * createAlertContainer('success')
23
- * ];
24
- * ```
25
- *
26
- * 使用方式:
27
- * ```markdown
28
- * ::: info
29
- * 这是一个 **info** 类型的警告框
30
- * :::
31
- * ```
32
- */
33
- export declare function createAlertContainer(type: 'info' | 'warning' | 'error' | 'success', plugin: any): MarkdownItPluginConfig;
34
- /**
35
- * 创建所有 Alert 容器配置的便捷函数
36
- *
37
- * @param plugin - markdown-it-container 插件
38
- * @returns 包含所有 alert 类型的配置数组
39
- *
40
- * @example
41
- * ```typescript
42
- * import markdownItContainer from 'markdown-it-container';
43
- * import { createAllAlertContainers } from 'mio-previewer/helpers';
44
- *
45
- * const markdownItPlugins = createAllAlertContainers(markdownItContainer);
46
- * ```
47
- */
48
- export declare function createAllAlertContainers(plugin: any): MarkdownItPluginConfig[];
49
- /**
50
- * 便捷函数:同时返回自定义渲染插件(用于 RecursiveRenderer 的 customPlugins)
51
- * 以及对应的 markdown-it-container 配置数组(用于 markdown-it 插件数组)
52
- *
53
- * 这样可以在 demo 中通过一个调用同时获得两类插件,使用更直观。
54
- */
55
- export declare function createAlertPlugins(plugin: any): {
56
- customPlugins: (typeof AlertPlugin)[];
57
- markdownItPlugins: MarkdownItPluginConfig[];
58
- };
@@ -1,4 +0,0 @@
1
- /**
2
- * Helper functions and utilities for mio-previewer
3
- */
4
- export * from './containerHelpers';
@@ -1,9 +0,0 @@
1
- import type { CustomPlugin } from '../types';
2
- /**
3
- * CodeBlockPlugin - 代码块渲染插件
4
- *
5
- * 使用 Prism 进行语法高亮,并提供复制和 HTML 预览功能
6
- *
7
- * 优先级: 70 (高于默认渲染)
8
- */
9
- export declare const CodeBlockPlugin: CustomPlugin;
@@ -1,11 +0,0 @@
1
- import type { CustomPlugin } from '../types';
2
- /**
3
- * EmojiPlugin - Emoji 文本替换插件
4
- *
5
- * 将文本中的 :emoji_code: 替换为对应的 emoji 符号
6
- *
7
- * 支持的 emoji:
8
- * :smile: 😊, :heart: ❤️, :fire: 🔥, :rocket: 🚀, :star: ⭐
9
- * :thumbsup: 👍, :tada: 🎉, :check: ✅, :cross: ❌
10
- */
11
- export declare const EmojiPlugin: CustomPlugin;
@@ -1,13 +0,0 @@
1
- /**
2
- * Mermaid Plugin for RecursiveRenderer
3
- * Detects code blocks with language="mermaid" and renders them as interactive diagrams
4
- */
5
- import type { CustomPlugin } from '../types';
6
- /**
7
- * Mermaid Plugin
8
- * Test: matches <pre><code class="language-mermaid">
9
- * Render: creates MermaidDiagram component with code content
10
- *
11
- * Priority: 80 (higher than CodeBlock to intercept mermaid blocks)
12
- */
13
- export declare const mermaidPlugin: CustomPlugin;