@dooc-dev/dooc 0.0.6 → 0.0.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 (395) hide show
  1. package/dist/client.global.js +1 -0
  2. package/dist/code-worker.global.js +11 -11
  3. package/dist/code.global.js +75 -75
  4. package/dist/edit.global.js +234 -231
  5. package/dist/{compiler → engine/compiler}/bundle-urls.js +1 -4
  6. package/dist/{compiler → engine/compiler}/check-prose.d.ts +1 -1
  7. package/dist/{compiler → engine/compiler}/check-prose.js +1 -1
  8. package/dist/{compiler → engine/compiler}/check.js +15 -27
  9. package/dist/{compiler → engine/compiler}/code-blocks.js +3 -1
  10. package/dist/{compiler → engine/compiler}/code-languages.js +1 -2
  11. package/dist/{compiler → engine/compiler}/compile.d.ts +5 -4
  12. package/dist/{compiler → engine/compiler}/compile.js +91 -32
  13. package/dist/{compiler → engine/compiler}/config.js +1 -3
  14. package/dist/{compiler → engine/compiler}/dialect.d.ts +1 -3
  15. package/dist/{compiler → engine/compiler}/dialect.js +8 -52
  16. package/dist/{compiler → engine/compiler}/dxf.js +1 -1
  17. package/dist/{compiler → engine/compiler}/export.js +15 -8
  18. package/dist/{compiler → engine/compiler}/figures.js +26 -22
  19. package/dist/{compiler → engine/compiler}/file-cache.d.ts +1 -2
  20. package/dist/{compiler → engine/compiler}/file-cache.js +8 -15
  21. package/dist/{compiler → engine/compiler}/files.js +49 -38
  22. package/dist/{compiler → engine/compiler}/fonts.js +1 -3
  23. package/dist/{compiler → engine/compiler}/from-mdast.js +1 -1
  24. package/dist/engine/compiler/host.d.ts +10 -0
  25. package/dist/engine/compiler/host.js +16 -0
  26. package/dist/{compiler → engine/compiler}/icons.d.ts +3 -0
  27. package/dist/{compiler → engine/compiler}/icons.js +28 -10
  28. package/dist/{compiler → engine/compiler}/ignored-files.d.ts +2 -0
  29. package/dist/{compiler → engine/compiler}/ignored-files.js +12 -3
  30. package/dist/{compiler → engine/compiler}/locales.js +2 -8
  31. package/dist/{compiler → engine/compiler}/manifest.d.ts +3 -2
  32. package/dist/engine/compiler/manifest.js +46 -0
  33. package/dist/{compiler → engine/compiler}/ops.d.ts +4 -1
  34. package/dist/{compiler → engine/compiler}/ops.js +36 -21
  35. package/dist/engine/compiler/schema-file-references.d.ts +2 -0
  36. package/dist/engine/compiler/schema-file-references.js +82 -0
  37. package/dist/engine/compiler/serialize.d.ts +2 -0
  38. package/dist/engine/compiler/serialize.js +5 -0
  39. package/dist/{compiler → engine/compiler}/subformat-schema.js +1 -3
  40. package/dist/{compiler → engine/compiler}/subformats.d.ts +10 -0
  41. package/dist/{compiler → engine/compiler}/subformats.js +122 -18
  42. package/dist/{compiler → engine/compiler}/textfile-remote.js +1 -2
  43. package/dist/{compiler → engine/compiler}/textfile.js +4 -6
  44. package/dist/{compiler → engine/compiler}/theme-variants.js +1 -1
  45. package/dist/{compiler → engine/compiler}/zip.js +1 -1
  46. package/dist/{core → engine/core}/blocks.d.ts +6 -4
  47. package/dist/{core → engine/core}/content-metadata.d.ts +6 -1
  48. package/dist/{core → engine/core}/content-metadata.js +84 -18
  49. package/dist/{core → engine/core}/content-types.d.ts +4 -2
  50. package/dist/{core → engine/core}/html.d.ts +7 -0
  51. package/dist/{core → engine/core}/html.js +44 -3
  52. package/dist/{core → engine/core}/icons.d.ts +3 -0
  53. package/dist/engine/core/icons.js +20 -0
  54. package/dist/{core → engine/core}/routing.d.ts +2 -0
  55. package/dist/{core → engine/core}/routing.js +9 -0
  56. package/dist/{core → engine/core}/schema-refs.d.ts +1 -1
  57. package/dist/{core → engine/core}/schema-refs.js +3 -1
  58. package/dist/engine/core/subformat-references.d.ts +5 -0
  59. package/dist/engine/core/subformat-references.js +33 -0
  60. package/dist/{core → engine/core}/subformats.d.ts +7 -0
  61. package/dist/{core → engine/core}/subformats.js +5 -1
  62. package/dist/{core → engine/core}/taxonomy.d.ts +2 -3
  63. package/dist/{core → engine/core}/taxonomy.js +1 -5
  64. package/dist/flow.global.js +1031 -1057
  65. package/dist/frontend/application-request.d.ts +14 -0
  66. package/dist/frontend/application-request.js +36 -0
  67. package/dist/frontend/document-application.d.ts +200 -0
  68. package/dist/{viewer/serve.js → frontend/document-application.js} +1611 -1670
  69. package/dist/frontend/figure-preview.d.ts +4 -0
  70. package/dist/{viewer → frontend}/figure-preview.js +4 -4
  71. package/dist/{viewer → frontend}/file-references.d.ts +1 -1
  72. package/dist/{viewer → frontend}/file-references.js +3 -3
  73. package/dist/{viewer → frontend}/font-picker.d.ts +1 -1
  74. package/dist/{viewer → frontend}/font-settings.d.ts +1 -1
  75. package/dist/{viewer → frontend}/language-picker.js +112 -18
  76. package/dist/{viewer → frontend}/locales/eng.json +16 -2
  77. package/dist/{viewer → frontend}/locales/jpn.json +16 -2
  78. package/dist/{viewer → frontend}/locales/zho.json +16 -2
  79. package/dist/{viewer → frontend}/nav-focus.js +2 -0
  80. package/dist/{viewer → frontend}/plugin-blocks.js +2 -2
  81. package/dist/{viewer → frontend}/resize.js +14 -2
  82. package/dist/frontend/resource-download.d.ts +2 -0
  83. package/dist/frontend/resource-download.js +43 -0
  84. package/dist/{viewer → frontend}/resource-library.d.ts +9 -2
  85. package/dist/{viewer → frontend}/resource-library.js +133 -37
  86. package/dist/{core → frontend}/schema-graph-flow.d.ts +1 -1
  87. package/dist/{core → frontend}/schema-graph-flow.js +1 -1
  88. package/dist/{viewer → frontend}/search.d.ts +2 -2
  89. package/dist/{viewer → frontend}/search.js +26 -8
  90. package/dist/graph/{abnfDiagram-S7VZAUFO-ASBULSKE.js → abnfDiagram-S7VZAUFO-GAGCW2J5.js} +1 -1
  91. package/dist/graph/{architecture-WOLXFQ4H-V57EDXXY.js → architecture-WOLXFQ4H-AWAC3VBS.js} +1 -1
  92. package/dist/graph/{architectureDiagram-YGSQEFNW-GIMP347N.js → architectureDiagram-YGSQEFNW-WQ7QKSUJ.js} +1 -1
  93. package/dist/graph/{blockDiagram-APKKGZFW-RDL2T4JW.js → blockDiagram-APKKGZFW-H7ZNJMOM.js} +1 -1
  94. package/dist/graph/{bpmnIcons-APHXDYXF-TWOSQNUQ.js → bpmnIcons-APHXDYXF-EAVPNTFE.js} +1 -1
  95. package/dist/graph/{c4Diagram-KJ2TOQU5-75LIUC4F.js → c4Diagram-KJ2TOQU5-3IYS34YL.js} +1 -1
  96. package/dist/graph/{chunk-KU6GTEMS.js → chunk-3CJU2RDX.js} +1 -1
  97. package/dist/graph/{chunk-ISO77HML.js → chunk-5N2X2DXU.js} +1 -1
  98. package/dist/graph/{chunk-YCRLJT2S.js → chunk-67BPVAXC.js} +1 -1
  99. package/dist/graph/{chunk-26TUJSYJ.js → chunk-6CDZONCA.js} +1 -1
  100. package/dist/graph/{chunk-I3DMZIHV.js → chunk-7ASYMKN2.js} +1 -1
  101. package/dist/graph/{chunk-K2KLZU7M.js → chunk-7JQUFVT4.js} +2 -2
  102. package/dist/graph/{chunk-BBD5CEDC.js → chunk-7LSMJ4VU.js} +1 -1
  103. package/dist/graph/{chunk-EG5UVNOC.js → chunk-7UKJADAE.js} +1 -1
  104. package/dist/graph/{chunk-BZAMCJ6B.js → chunk-AARGNXTW.js} +1 -1
  105. package/dist/graph/{chunk-HOPPTA6H.js → chunk-BOXAA5AP.js} +2 -2
  106. package/dist/graph/{chunk-N3OHKGRZ.js → chunk-BTMPKSGF.js} +1 -1
  107. package/dist/graph/{chunk-QCJUF4YA.js → chunk-DIDARDST.js} +1 -1
  108. package/dist/graph/{chunk-R63JUMUK.js → chunk-EWYECPNJ.js} +1 -1
  109. package/dist/graph/{chunk-3YJHMOOA.js → chunk-FD7ZFC7R.js} +1 -1
  110. package/dist/graph/chunk-GWYODWCE.js +1 -0
  111. package/dist/graph/{chunk-IC23EEF6.js → chunk-HKRJKXEE.js} +1 -1
  112. package/dist/graph/{chunk-PW2RGZ3O.js → chunk-I5LEUF24.js} +1 -1
  113. package/dist/graph/{chunk-OFZLK5G4.js → chunk-ICJPOOXG.js} +1 -1
  114. package/dist/graph/{chunk-KT4VPQD5.js → chunk-IVZHB6RS.js} +2 -2
  115. package/dist/graph/{chunk-VM2H7G2R.js → chunk-JZGXHT3J.js} +1 -1
  116. package/dist/graph/{chunk-HJG2HUYJ.js → chunk-LSRL537V.js} +1 -1
  117. package/dist/graph/{chunk-C6J4A356.js → chunk-N44XPVUD.js} +1 -1
  118. package/dist/graph/{chunk-JD7ZBJD2.js → chunk-NDAMZVXQ.js} +1 -1
  119. package/dist/graph/{chunk-QEEA3KYY.js → chunk-QLS7NIYR.js} +1 -1
  120. package/dist/graph/{chunk-JRSH5GNS.js → chunk-QQIGL7OP.js} +1 -1
  121. package/dist/graph/chunk-SQE76S5B.js +1 -0
  122. package/dist/graph/{chunk-ZMCB7VP2.js → chunk-WQHTQAFY.js} +1 -1
  123. package/dist/graph/{classDiagram-v2-L25IHNXF-JL7LVDZH.js → classDiagram-v2-L25IHNXF-HNTCDTNK.js} +1 -1
  124. package/dist/graph/{cose-bilkent-JH36ORCC-PNM3EYPB.js → cose-bilkent-JH36ORCC-2GVA7XKO.js} +1 -1
  125. package/dist/graph/{cynefin-EF2NZ3EQ-PSXP3DXL.js → cynefin-EF2NZ3EQ-TCI65RAQ.js} +1 -1
  126. package/dist/graph/{cynefinDiagram-L36ESFBY-QVY54CXO.js → cynefinDiagram-L36ESFBY-OKQ5BLVF.js} +1 -1
  127. package/dist/graph/{dagre-SPEB5RXH-HPGQXBZJ.js → dagre-SPEB5RXH-KZEBD52K.js} +1 -1
  128. package/dist/graph/{diagram-3B7GL73J-DWH5WS2P.js → diagram-3B7GL73J-ESCBJM3O.js} +1 -1
  129. package/dist/graph/{diagram-DNEMPZML-TEGH2U5I.js → diagram-DNEMPZML-ZIBUSQZI.js} +1 -1
  130. package/dist/graph/{diagram-L3MUGCDN-X4MREUWR.js → diagram-L3MUGCDN-IGK62IPN.js} +1 -1
  131. package/dist/graph/{diagram-LA4NIPWU-NXT746HG.js → diagram-LA4NIPWU-2KZCOFJ5.js} +1 -1
  132. package/dist/graph/{diagram-MHCOC4E2-JGHXSAGS.js → diagram-MHCOC4E2-EYAAB236.js} +1 -1
  133. package/dist/graph/{diagram-XPFHEONP-ZHZPBLT4.js → diagram-XPFHEONP-OZ5ARGMG.js} +1 -1
  134. package/dist/graph/{ebnfDiagram-UZSYDL2S-SMF6KJ43.js → ebnfDiagram-UZSYDL2S-M3XJHARD.js} +1 -1
  135. package/dist/graph/{erDiagram-EYBAPDEH-B3JNJ357.js → erDiagram-EYBAPDEH-Y7KUBH7A.js} +1 -1
  136. package/dist/graph/{eventmodeling-K75KTNOO-WG6DDYMC.js → eventmodeling-K75KTNOO-ROLYRDEP.js} +1 -1
  137. package/dist/graph/flowDiagram-MALGAFMO-AAUEIPCR.js +1 -0
  138. package/dist/graph/{ganttDiagram-23REXITY-YXBYWFOJ.js → ganttDiagram-23REXITY-JSBTFSSJ.js} +1 -1
  139. package/dist/graph/{gitGraph-VSP46ZUC-VBFWJBBT.js → gitGraph-VSP46ZUC-ZCBCDVNF.js} +1 -1
  140. package/dist/graph/{gitGraphDiagram-STJD7YCW-4FZDCFGV.js → gitGraphDiagram-STJD7YCW-3ZA5FT3G.js} +1 -1
  141. package/dist/graph/{info-OHQRW6UA-ALVDUVYV.js → info-OHQRW6UA-JKJGOQNY.js} +1 -1
  142. package/dist/graph/infoDiagram-KBXO4MBG-6LFMPP2O.js +2 -0
  143. package/dist/graph/{ishikawaDiagram-M35NCXHK-FRZD2PWQ.js → ishikawaDiagram-M35NCXHK-YLEU44DY.js} +1 -1
  144. package/dist/graph/{journeyDiagram-OPLOXDXO-7Z66JCPR.js → journeyDiagram-OPLOXDXO-ZHJV66ZT.js} +1 -1
  145. package/dist/graph/{kanban-definition-BZKZHSQY-NN5AIKTE.js → kanban-definition-BZKZHSQY-SDU25WUM.js} +1 -1
  146. package/dist/graph/{katex-DXDNVO6V.js → katex-WSLZOTY7.js} +1 -1
  147. package/dist/graph/{mindmap-definition-I2QAS2VK-HDPCABN2.js → mindmap-definition-I2QAS2VK-XQNBCYHN.js} +1 -1
  148. package/dist/graph/{packet-JDAUHWVQ-5MQIBWAH.js → packet-JDAUHWVQ-Y3H77ERD.js} +1 -1
  149. package/dist/graph/{pegDiagram-FD4XPPHP-H2BFNCKT.js → pegDiagram-FD4XPPHP-YO4VWH6V.js} +1 -1
  150. package/dist/graph/{pie-XZMESJXO-T5VRKHVT.js → pie-XZMESJXO-PRER4XL5.js} +1 -1
  151. package/dist/graph/{pieDiagram-J4AKIIQI-O3NJSVD3.js → pieDiagram-J4AKIIQI-TJ5WOOSV.js} +1 -1
  152. package/dist/graph/{quadrantDiagram-XTYBLID2-TMTZJI3P.js → quadrantDiagram-XTYBLID2-G6MSSZLW.js} +1 -1
  153. package/dist/graph/{radar-ABXABTNO-C6FXIBYW.js → radar-ABXABTNO-M6MV34GM.js} +1 -1
  154. package/dist/graph/{railroad-I3PHUGI6-ZSO5JXB3.js → railroad-I3PHUGI6-YIWPGN6Q.js} +1 -1
  155. package/dist/graph/{railroad-abnf-LNEFI6M7-CI4GQRHB.js → railroad-abnf-LNEFI6M7-7JHLZ2R7.js} +1 -1
  156. package/dist/graph/{railroad-ebnf-DWYD2UWJ-MUENNCGK.js → railroad-ebnf-DWYD2UWJ-V55BXEWY.js} +1 -1
  157. package/dist/graph/{railroad-peg-JR7BVNR7-N3X5GGIX.js → railroad-peg-JR7BVNR7-XCGKDRMK.js} +1 -1
  158. package/dist/graph/{railroadDiagram-MRQ6NCDL-JHWS23UO.js → railroadDiagram-MRQ6NCDL-RACSFXC4.js} +1 -1
  159. package/dist/graph/{requirementDiagram-Y7LWUY3S-7DVLPO4B.js → requirementDiagram-Y7LWUY3S-4LQIQWHQ.js} +1 -1
  160. package/dist/graph/{sankeyDiagram-WGJFYUXA-Z5L4R5TR.js → sankeyDiagram-WGJFYUXA-K3RXG5FB.js} +1 -1
  161. package/dist/graph/schema-graph-global.js +17 -17
  162. package/dist/graph/{sequenceDiagram-5NDRBG5M-RCTU25NT.js → sequenceDiagram-5NDRBG5M-Y6RBHRS3.js} +1 -1
  163. package/dist/graph/{sizeCapture-INFHLROL-RROY32P5.js → sizeCapture-INFHLROL-TJW3VUGH.js} +1 -1
  164. package/dist/graph/{stateDiagram-v2-FJ4FJNEA-BXUSPWDK.js → stateDiagram-v2-FJ4FJNEA-4M5WZORG.js} +1 -1
  165. package/dist/graph/swimlanes-UMQ2AFYF-O4W6U4RO.js +1 -0
  166. package/dist/graph/swimlanesDiagram-OMPLPG4O-HZAKM45N.js +8 -0
  167. package/dist/graph/{timeline-definition-SEUHKTQE-ZQSMIVAS.js → timeline-definition-SEUHKTQE-IHISQ4Q7.js} +1 -1
  168. package/dist/graph/{treeView-D4JQ5SDB-42S7U73N.js → treeView-D4JQ5SDB-EVGY4VYS.js} +1 -1
  169. package/dist/graph/{treemap-SAJKECNS-RUBYQ7XF.js → treemap-SAJKECNS-LN3SMFRX.js} +1 -1
  170. package/dist/graph/{usecaseDiagram-AFA6YXN4-57RDRYXF.js → usecaseDiagram-AFA6YXN4-B645A3J6.js} +1 -1
  171. package/dist/graph/{vennDiagram-NNMJR3RB-5C3LVAV6.js → vennDiagram-NNMJR3RB-K3HWMON6.js} +1 -1
  172. package/dist/graph/{wardley-7MLQ67FV-NV5HXTTC.js → wardley-7MLQ67FV-RRWOELC6.js} +1 -1
  173. package/dist/graph/{wardleyDiagram-S7YFUSEH-6D5BKXHM.js → wardleyDiagram-S7YFUSEH-DMMWKJEK.js} +1 -1
  174. package/dist/graph/{xychartDiagram-GGNKY7IX-6ET3ZM67.js → xychartDiagram-GGNKY7IX-K6MUQVXR.js} +1 -1
  175. package/dist/install.sh +68 -0
  176. package/dist/plugins.global.js +62 -62
  177. package/dist/{viewer → server}/assets.d.ts +2 -0
  178. package/dist/server/assets.js +7 -0
  179. package/dist/{viewer → server}/build-plugins.js +4 -4
  180. package/dist/{viewer → server}/build.d.ts +2 -1
  181. package/dist/{viewer → server}/build.js +31 -15
  182. package/dist/{cli.js → server/cli.js} +223 -56
  183. package/dist/server/editor-tools.d.ts +1 -0
  184. package/dist/server/editor-tools.js +1 -0
  185. package/dist/{viewer → server}/extension-pack.js +2 -2
  186. package/dist/{viewer → server}/extensions.d.ts +1 -1
  187. package/dist/{viewer → server}/extensions.js +3 -3
  188. package/dist/server/git-diff.d.ts +10 -0
  189. package/dist/{viewer → server}/git-diff.js +45 -10
  190. package/dist/server/git-origin.d.ts +4 -0
  191. package/dist/server/git-origin.js +103 -0
  192. package/dist/server/git.d.ts +9 -0
  193. package/dist/{viewer → server}/git.js +50 -6
  194. package/dist/server/history.d.ts +14 -0
  195. package/dist/server/history.js +205 -0
  196. package/dist/{viewer → server}/hmr.d.ts +0 -22
  197. package/dist/server/hmr.js +168 -0
  198. package/dist/server/index.d.ts +17 -0
  199. package/dist/{index.js → server/index.js} +16 -16
  200. package/dist/{viewer → server}/ja-lint.d.ts +1 -1
  201. package/dist/{viewer → server}/languages.d.ts +1 -1
  202. package/dist/{viewer → server}/languages.js +3 -3
  203. package/dist/{mcp.d.ts → server/mcp.d.ts} +2 -2
  204. package/dist/{mcp.js → server/mcp.js} +60 -21
  205. package/dist/{viewer → server}/plugin-config.d.ts +2 -2
  206. package/dist/{viewer → server}/plugin-config.js +2 -2
  207. package/dist/{plugins → server/plugins}/local-storage.d.ts +1 -1
  208. package/dist/{plugins → server/plugins}/local-storage.js +1 -1
  209. package/dist/{plugins → server/plugins}/runtime.d.ts +4 -4
  210. package/dist/{plugins → server/plugins}/runtime.js +4 -4
  211. package/dist/{viewer → server}/plugins.d.ts +3 -3
  212. package/dist/{viewer → server}/plugins.js +14 -13
  213. package/dist/server/resource-library.d.ts +1 -0
  214. package/dist/server/resource-library.js +1 -0
  215. package/dist/server/self.d.ts +5 -0
  216. package/dist/server/self.js +98 -0
  217. package/dist/server/serve.d.ts +61 -0
  218. package/dist/server/serve.js +503 -0
  219. package/dist/server/static-client.d.ts +4 -0
  220. package/dist/server/static-client.js +117 -0
  221. package/dist/server/workspace-server.d.ts +16 -0
  222. package/dist/server/workspace-server.js +266 -0
  223. package/dist/{viewer → server}/workspace.d.ts +6 -1
  224. package/dist/{viewer → server}/workspace.js +46 -0
  225. package/dist/subformats.global.js +92 -6
  226. package/dist/ui.global.js +85 -72
  227. package/dist/workspace/client.d.ts +13 -0
  228. package/dist/workspace/client.js +114 -0
  229. package/dist/{viewer → workspace}/code-file.d.ts +1 -1
  230. package/dist/{viewer → workspace}/code-file.js +7 -7
  231. package/dist/workspace/connection.d.ts +27 -0
  232. package/dist/workspace/connection.js +38 -0
  233. package/dist/{viewer → workspace}/editor-tools.d.ts +7 -1
  234. package/dist/{viewer → workspace}/editor-tools.js +12 -9
  235. package/dist/{viewer → workspace}/git-types.d.ts +7 -0
  236. package/dist/workspace/github.d.ts +4 -0
  237. package/dist/workspace/github.js +99 -0
  238. package/dist/workspace/history.d.ts +46 -0
  239. package/dist/workspace/history.js +86 -0
  240. package/dist/workspace/protocol.d.ts +38 -0
  241. package/dist/workspace/protocol.js +20 -0
  242. package/dist/workspace/resource-download.d.ts +1 -0
  243. package/dist/workspace/resource-download.js +8 -0
  244. package/dist/workspace/server.d.ts +9 -0
  245. package/dist/workspace/server.js +48 -0
  246. package/dist/{viewer → workspace}/site-icon.js +9 -10
  247. package/dist/{viewer → workspace}/site-title.js +6 -7
  248. package/dist/{viewer → workspace}/textfile.d.ts +1 -1
  249. package/dist/{viewer → workspace}/textfile.js +5 -5
  250. package/dist/workspace-worker.global.js +2859 -0
  251. package/package.json +43 -21
  252. package/dist/compiler/manifest.js +0 -37
  253. package/dist/compiler/serialize.d.ts +0 -3
  254. package/dist/compiler/serialize.js +0 -16
  255. package/dist/core/icons.js +0 -5
  256. package/dist/graph/chunk-3RNHDNP5.js +0 -1
  257. package/dist/graph/chunk-5UUEAHTN.js +0 -1
  258. package/dist/graph/chunk-6T55RVVR.js +0 -1
  259. package/dist/graph/elk-XV6XMXQE-AZ4HLCWI.js +0 -27
  260. package/dist/graph/flowDiagram-MALGAFMO-2R7EYAQI.js +0 -1
  261. package/dist/graph/infoDiagram-KBXO4MBG-7EHX2GQG.js +0 -2
  262. package/dist/graph/swimlanes-UMQ2AFYF-LDD74Q2S.js +0 -1
  263. package/dist/graph/swimlanesDiagram-OMPLPG4O-ZYULLJSU.js +0 -8
  264. package/dist/index.d.ts +0 -17
  265. package/dist/viewer/assets.js +0 -3
  266. package/dist/viewer/figure-preview.d.ts +0 -4
  267. package/dist/viewer/git-diff.d.ts +0 -6
  268. package/dist/viewer/git.d.ts +0 -5
  269. package/dist/viewer/hmr.js +0 -341
  270. package/dist/viewer/serve.d.ts +0 -216
  271. /package/dist/{compiler → engine/compiler}/asset-references.d.ts +0 -0
  272. /package/dist/{compiler → engine/compiler}/asset-references.js +0 -0
  273. /package/dist/{compiler → engine/compiler}/bundle-urls.d.ts +0 -0
  274. /package/dist/{compiler → engine/compiler}/check-types.d.ts +0 -0
  275. /package/dist/{compiler → engine/compiler}/check-types.js +0 -0
  276. /package/dist/{compiler → engine/compiler}/check.d.ts +0 -0
  277. /package/dist/{compiler → engine/compiler}/code-blocks.d.ts +0 -0
  278. /package/dist/{compiler → engine/compiler}/code-languages.d.ts +0 -0
  279. /package/dist/{compiler → engine/compiler}/config.d.ts +0 -0
  280. /package/dist/{compiler → engine/compiler}/drawio.d.ts +0 -0
  281. /package/dist/{compiler → engine/compiler}/drawio.js +0 -0
  282. /package/dist/{compiler → engine/compiler}/dxf.d.ts +0 -0
  283. /package/dist/{compiler → engine/compiler}/export.d.ts +0 -0
  284. /package/dist/{compiler → engine/compiler}/figures.d.ts +0 -0
  285. /package/dist/{compiler → engine/compiler}/files.d.ts +0 -0
  286. /package/dist/{compiler → engine/compiler}/fonts.d.ts +0 -0
  287. /package/dist/{compiler → engine/compiler}/format.d.ts +0 -0
  288. /package/dist/{compiler → engine/compiler}/format.js +0 -0
  289. /package/dist/{compiler → engine/compiler}/from-mdast.d.ts +0 -0
  290. /package/dist/{compiler → engine/compiler}/language-codes.d.ts +0 -0
  291. /package/dist/{compiler → engine/compiler}/language-codes.js +0 -0
  292. /package/dist/{compiler → engine/compiler}/locales.d.ts +0 -0
  293. /package/dist/{compiler → engine/compiler}/public-file.d.ts +0 -0
  294. /package/dist/{compiler → engine/compiler}/public-file.js +0 -0
  295. /package/dist/{compiler → engine/compiler}/subformat-schema.d.ts +0 -0
  296. /package/dist/{compiler → engine/compiler}/terms.d.ts +0 -0
  297. /package/dist/{compiler → engine/compiler}/terms.js +0 -0
  298. /package/dist/{compiler → engine/compiler}/textfile-remote.d.ts +0 -0
  299. /package/dist/{compiler → engine/compiler}/textfile.d.ts +0 -0
  300. /package/dist/{compiler → engine/compiler}/theme-variants.d.ts +0 -0
  301. /package/dist/{compiler → engine/compiler}/zip.d.ts +0 -0
  302. /package/dist/{core → engine/core}/blocks.js +0 -0
  303. /package/dist/{core → engine/core}/code-file.d.ts +0 -0
  304. /package/dist/{core → engine/core}/code-file.js +0 -0
  305. /package/dist/{core → engine/core}/code-grammars.d.ts +0 -0
  306. /package/dist/{core → engine/core}/code-grammars.js +0 -0
  307. /package/dist/{core → engine/core}/content-types.js +0 -0
  308. /package/dist/{core → engine/core}/escape-html.d.ts +0 -0
  309. /package/dist/{core → engine/core}/escape-html.js +0 -0
  310. /package/dist/{core → engine/core}/extension-package.d.ts +0 -0
  311. /package/dist/{core → engine/core}/extension-package.js +0 -0
  312. /package/dist/{core → engine/core}/figure-frame.d.ts +0 -0
  313. /package/dist/{core → engine/core}/figure-frame.js +0 -0
  314. /package/dist/{core → engine/core}/file-embed.d.ts +0 -0
  315. /package/dist/{core → engine/core}/file-embed.js +0 -0
  316. /package/dist/{core → engine/core}/files.d.ts +0 -0
  317. /package/dist/{core → engine/core}/files.js +0 -0
  318. /package/dist/{core → engine/core}/graph-common.d.ts +0 -0
  319. /package/dist/{core → engine/core}/graph-common.js +0 -0
  320. /package/dist/{core → engine/core}/graph.d.ts +0 -0
  321. /package/dist/{core → engine/core}/graph.js +0 -0
  322. /package/dist/{core → engine/core}/inline.d.ts +0 -0
  323. /package/dist/{core → engine/core}/inline.js +0 -0
  324. /package/dist/{core → engine/core}/json-tools.d.ts +0 -0
  325. /package/dist/{core → engine/core}/json-tools.js +0 -0
  326. /package/dist/{core → engine/core}/language.d.ts +0 -0
  327. /package/dist/{core → engine/core}/language.js +0 -0
  328. /package/dist/{core → engine/core}/languages/ja.d.ts +0 -0
  329. /package/dist/{core → engine/core}/languages/ja.js +0 -0
  330. /package/dist/{core → engine/core}/markdown.d.ts +0 -0
  331. /package/dist/{core → engine/core}/markdown.js +0 -0
  332. /package/dist/{core → engine/core}/previewers.d.ts +0 -0
  333. /package/dist/{core → engine/core}/previewers.js +0 -0
  334. /package/dist/{core → engine/core}/schema-comments.d.ts +0 -0
  335. /package/dist/{core → engine/core}/schema-comments.js +0 -0
  336. /package/dist/{core → engine/core}/schema-fields.d.ts +0 -0
  337. /package/dist/{core → engine/core}/schema-fields.js +0 -0
  338. /package/dist/{core → engine/core}/schema-graph.d.ts +0 -0
  339. /package/dist/{core → engine/core}/schema-graph.js +0 -0
  340. /package/dist/{core → engine/core}/subformat-record.d.ts +0 -0
  341. /package/dist/{core → engine/core}/subformat-record.js +0 -0
  342. /package/dist/{core → engine/core}/term-reference.d.ts +0 -0
  343. /package/dist/{core → engine/core}/term-reference.js +0 -0
  344. /package/dist/{core → engine/core}/textfile.d.ts +0 -0
  345. /package/dist/{core → engine/core}/textfile.js +0 -0
  346. /package/dist/{core → engine/core}/theme-variants.d.ts +0 -0
  347. /package/dist/{core → engine/core}/theme-variants.js +0 -0
  348. /package/dist/{core → engine/core}/workspace.d.ts +0 -0
  349. /package/dist/{core → engine/core}/workspace.js +0 -0
  350. /package/dist/{viewer → frontend}/bundle-network.d.ts +0 -0
  351. /package/dist/{viewer → frontend}/bundle-network.js +0 -0
  352. /package/dist/{core → frontend}/flow-base-css.generated.d.ts +0 -0
  353. /package/dist/{core → frontend}/flow-base-css.generated.js +0 -0
  354. /package/dist/{core → frontend}/flow-css.d.ts +0 -0
  355. /package/dist/{core → frontend}/flow-css.js +0 -0
  356. /package/dist/{viewer → frontend}/font-picker.js +0 -0
  357. /package/dist/{viewer → frontend}/font-settings.js +0 -0
  358. /package/dist/{viewer → frontend}/i18n.d.ts +0 -0
  359. /package/dist/{viewer → frontend}/i18n.js +0 -0
  360. /package/dist/{viewer → frontend}/language-picker.d.ts +0 -0
  361. /package/dist/{viewer → frontend}/lazy-preview.d.ts +0 -0
  362. /package/dist/{viewer → frontend}/lazy-preview.js +0 -0
  363. /package/dist/{viewer → frontend}/nav-focus.d.ts +0 -0
  364. /package/dist/{viewer → frontend}/nav-update.d.ts +0 -0
  365. /package/dist/{viewer → frontend}/nav-update.js +0 -0
  366. /package/dist/{viewer → frontend}/plugin-blocks.d.ts +0 -0
  367. /package/dist/{viewer → frontend}/plugin-style.d.ts +0 -0
  368. /package/dist/{viewer → frontend}/plugin-style.js +0 -0
  369. /package/dist/{viewer → frontend}/plugin-view.d.ts +0 -0
  370. /package/dist/{viewer → frontend}/plugin-view.js +0 -0
  371. /package/dist/{viewer → frontend}/resize.d.ts +0 -0
  372. /package/dist/{core → frontend}/schema-graph-mount.d.ts +0 -0
  373. /package/dist/{core → frontend}/schema-graph-mount.js +0 -0
  374. /package/dist/{core → frontend}/table-ui.d.ts +0 -0
  375. /package/dist/{core → frontend}/table-ui.js +0 -0
  376. /package/dist/{core → frontend}/terms-ui.d.ts +0 -0
  377. /package/dist/{core → frontend}/terms-ui.js +0 -0
  378. /package/dist/{viewer → frontend}/theme-picker.d.ts +0 -0
  379. /package/dist/{viewer → frontend}/theme-picker.js +0 -0
  380. /package/dist/{core → frontend}/toc-ui.d.ts +0 -0
  381. /package/dist/{core → frontend}/toc-ui.js +0 -0
  382. /package/dist/{core → frontend}/video-ui.d.ts +0 -0
  383. /package/dist/{core → frontend}/video-ui.js +0 -0
  384. /package/dist/graph/{chunk-GYT4IYBZ.js → chunk-RJFVWYCA.js} +0 -0
  385. /package/dist/{viewer → server}/build-plugins.d.ts +0 -0
  386. /package/dist/{cli.d.ts → server/cli.d.ts} +0 -0
  387. /package/dist/{viewer → server}/extension-pack.d.ts +0 -0
  388. /package/dist/{viewer → server}/fonts/LICENSE.txt +0 -0
  389. /package/dist/{viewer → server}/fonts/udev-gothic-regular.woff2 +0 -0
  390. /package/dist/{viewer → server}/fonts.d.ts +0 -0
  391. /package/dist/{viewer → server}/fonts.js +0 -0
  392. /package/dist/{viewer → server}/ja-lint.js +0 -0
  393. /package/dist/{viewer → workspace}/git-types.js +0 -0
  394. /package/dist/{viewer → workspace}/site-icon.d.ts +0 -0
  395. /package/dist/{viewer → workspace}/site-title.d.ts +0 -0
@@ -1 +1 @@
1
- import{C as E}from"./chunk-K4I76XBX.js";import{b as _,c as G}from"./chunk-R63JUMUK.js";import{f as x,g as O,h as F,i as D,j as S,k as $,m as j,n as H}from"./chunk-K2KLZU7M.js";import{a as M,b as A,d as X,e as L}from"./chunk-JD7ZBJD2.js";import{a as B}from"./chunk-HOPPTA6H.js";import{q as P}from"./chunk-QEEA3KYY.js";import{$ as T,C as R}from"./chunk-KT4VPQD5.js";import{b as a}from"./chunk-JRSH5GNS.js";import{a as u}from"./chunk-GYT4IYBZ.js";function J(e,{edgePathsClass:n="edges edgePaths"}={}){let t=e.insert("g").attr("class","root"),s=t.insert("g").attr("class","clusters"),r=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:s,edgePaths:r,edgeLabels:i,nodes:c,rootGroups:t}}u(J,"createLayoutElementGroups");async function W(e,n,t){if(n.label){let{shapeSvg:s,bbox:r}=await B(e,t===void 0?n:{...n,width:t});n.labelBBox={width:r.width,height:r.height},s.remove()}else n.labelBBox={width:0,height:0}}u(W,"measureGroupLabel");async function V(e,n,t){let s=await A(e,n,t),r=s.node()?.getBBox()??{width:0,height:0};return n.width=r.width,n.height=r.height,s}u(V,"insertMeasuredNode");function Y(e,n,t){let s=e,r=new Set;for(;s;){if(s.dir)return s.dir;if(!s.parentId||r.has(s.parentId))break;r.add(s.parentId),s=n.get(s.parentId)}return t}u(Y,"resolveNodeDir");async function q(e,n,t={}){let s=new E({multigraph:!0,compound:!0}),r=[...n.edges],i=T(),c=J(e),{edgeLabels:d,nodes:o}=c,g=new Map,b=new Map(n.nodes.map(f=>[f.id,f])),N=n.direction,h=e.node()!=null;await Promise.all(n.nodes.map(async f=>{if(f.isGroup){if(h){let w=t.unwrapGroupLabels&&f.labelType!=="markdown";await W(o,f,w?Number.POSITIVE_INFINITY:void 0)}s.setNode(f.id,{...f})}else{if(h){let w=await V(o,f,{config:i,dir:Y(f,b,N)});g.set(f.id,w)}s.setNode(f.id,{...f})}}));for(let f of r)h&&D(f)&&await S(d,f),s.setEdge(f.start,f.end,{...f},f.id),n.edges.some(v=>v.id===f.id)||n.edges.push(f);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:f}=await import("./sizeCapture-INFHLROL-RROY32P5.js");f(e,n)}return{graph:s,groups:c,nodeElements:g}}u(q,"createGraphWithElements");var l=new Map,m=new Map,K=new Map,ge=u(()=>{m.clear(),K.clear(),l.clear()},"clear"),p=u((e,n)=>{let t=m.get(n)||[];return a.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),me=u((e,n)=>{let t=m.get(n)||[];return a.info("Descendants of ",n," is ",t),a.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||p(e.v,n)||p(e.w,n)||t.includes(e.w):(a.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),Q=u((e,n,t,s)=>{a.debug("Copying children of ",e,"root",s,"data",n.node(e),s);let r=n.children(e)||[];e!==s&&r.push(e),a.debug("Copying (nodes) clusterId",e,"nodes",r),r.forEach(i=>{if(n.children(i).length>0)Q(i,n,t,s);else{let c=n.node(i);a.info("cp ",i," to ",s," with parent ",e),t.setNode(i,c),s!==n.parent(i)&&(a.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==s&&i!==e?(a.debug("Setting parent",i,e),t.setParent(i,e)):(a.info("In copy ",e,"root",s,"data",n.node(e),s),a.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==s,"node!==clusterId",i!==e));let d=n.edges(i);a.debug("Copying Edges",d),d.forEach(o=>{a.info("Edge",o);let g=n.edge(o.v,o.w,o.name);a.info("Edge data",g,s);try{me(o,s)?(a.info("Copying as ",o.v,o.w,g,o.name),t.setEdge(o.v,o.w,g,o.name),a.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):a.info("Skipping copy of edge ",o.v,"-->",o.w," rootId: ",s," clusterId:",e)}catch(b){a.error(b)}})}a.debug("Removing node",i),n.removeNode(i)})},"copy"),U=u((e,n)=>{let t=n.children(e),s=[...t];for(let r of t)K.set(r,e),s=[...s,...U(r,n)];return s},"extractDescendants"),be=u((e,n,t)=>{let s=e.edges().filter(o=>o.v===n||o.w===n),r=e.edges().filter(o=>o.v===t||o.w===t),i=s.map(o=>({v:o.v===n?t:o.v,w:o.w===n?n:o.w})),c=r.map(o=>({v:o.v,w:o.w}));return i.filter(o=>c.some(g=>o.v===g.v&&o.w===g.w))},"findCommonEdges"),C=u((e,n,t)=>{let s=n.children(e);if(a.trace("Searching children of id ",e,s),s.length<1)return e;let r;for(let i of s){let c=C(i,n,t),d=be(n,t,c);if(c)if(d.length>0)r=c;else return c}return r},"findNonClusterChild"),z=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Se=u((e,n)=>{if(!e||n>10){a.debug("Opting out, no graph ");return}else a.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(a.debug("Cluster identified",t," Replacement id in edges: ",C(t,e,t)),m.set(t,U(t,e)),l.set(t,{id:C(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let s=e.children(t),r=e.edges();s.length>0?(a.debug("Cluster identified",t,m),r.forEach(i=>{let c=p(i.v,t),d=p(i.w,t);c^d&&(a.debug("Edge: ",i," leaves cluster ",t),a.debug("Descendants of XXX ",t,": ",m.get(t)),l.get(t).externalConnections=!0)})):a.debug("Not a cluster ",t,m)});for(let t of l.keys()){let s=l.get(t).id,r=e.parent(s);r!==t&&l.has(r)&&!l.get(r).externalConnections&&(l.get(t).id=r);let i=e.edges().some(c=>c.v===t);if(s&&l.get(t)?.externalConnections&&i&&ee(e,s,t)){let c=he(e,t,e.parent(s));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){let s=e.edge(t);a.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),a.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(a.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(a.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),r=z(t.v),i=z(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let c=e.parent(r);l.get(c).externalConnections=!0,s.fromCluster=t.v}if(i!==t.w){let c=e.parent(i);l.get(c).externalConnections=!0,s.toCluster=t.w}a.debug("Fix Replacing with XXX",r,i,t.name),e.setEdge(r,i,s,t.name)}}),Z(e,0),a.trace(l)},"adjustClustersAndEdges"),Z=u((e,n)=>{if(n>10){a.error("Bailing out");return}let t=e.nodes(),s=!1;for(let r of t){let i=e.children(r);s=s||i.length>0}if(!s){a.debug("Done, no node has children",e.nodes());return}a.debug("Nodes = ",t,n);for(let r of t)if(a.debug("Extracting node",r,l,l.has(r)&&!l.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",n),!l.has(r))a.debug("Not a cluster",r,n);else if(!l.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){a.debug("Cluster without external connections, without a parent and with children",r,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(r)?.clusterData?.dir&&(c=l.get(r).clusterData.dir,a.debug("Fixing dir",l.get(r).clusterData.dir,c));let d=new E({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Q(r,e,d,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:l.get(r).clusterData,label:l.get(r).label,graph:d})}else a.debug("Cluster ** ",r," **not meeting the criteria !externalConnections:",!l.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),n),a.debug(l);t=e.nodes(),a.debug("New list of nodes",t);for(let r of t){let i=e.node(r);a.debug(" Now next level",r,i),i?.clusterNode&&Z(i.graph,n+1)}},"extractor"),I=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(s=>{let r=e.children(s),i=I(e,r);t=[...t,...i]}),t},"sorter"),ke=u(e=>I(e,e.children()),"sortNodesByHierarchy"),ee=u((e,n,t)=>{let s=e.parent(n);for(;s&&s!==t;){let r=l.get(s);if(r&&!r.externalConnections)return!0;s=e.parent(s)}return!1},"isNodeInExtractableCluster"),he=u((e,n,t)=>{let s=e.children(n)??[];for(let r of s){if(r===t||p(r,t))continue;let i=C(r,e,n);if(i&&!ee(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:s,afterPaint:r,paintOptions:i}){let c=n??ne;return u(async function(o,g,b,N){let h=g.select("g");(b?.insertMarkers??H)(h,o.markers,o.type,o.diagramId),te();let f={element:h,helpers:b,options:N};f.preparedLayout=await e?.(o,f);let w=await c(o,f),v=await t(o,f),y={...f,measure:w};s?await s(o,y,v):await re(o,y,i),await r?.(o,y,v)},"render")}u(we,"createCommonLayoutRenderer");function te(){X(),F(),G(),ge()}u(te,"clearLayoutRenderState");async function ne(e,{element:n},t){return await q(n,e,t)}u(ne,"defaultMeasureLayout");async function re(e,n,t={}){let{measure:s}=n,{groups:r}=s;for(let c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await se(r,c,n,t);let i=oe(e.nodes);for(let c of e.edges)ae(c,t)||await ce(r,c,i,e,t,n)}u(re,"paintLayoutData");async function se(e,n,t,s){n.clusterNode?L(n):ie(n,t,s)?await _(e.clusters,n):L(n)}u(se,"paintLayoutNode");function ie(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(ie,"shouldPaintAsCluster");function oe(e){let n=new Map;for(let t of e)t?.id&&n.set(t.id,t);return n}u(oe,"buildNodeLookup");function ae(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(ae,"shouldSkipPaintEdge");async function ce(e,n,t,s,r,i){let c=j(e.edgePaths,{...n},r.clusterDb??new Map,s.type,k(n.start,n,t,i,r),k(n.end,n,t,i,r),s.diagramId,le(n,r),s.layoutAlgorithm);D(n)&&(x.has(n.id)||await S(e.edgeLabels,n),ue(n,c))}u(ce,"paintLayoutEdge");function k(e,n,t,s,r){return r.getEdgeNode?.(e,n,s)??(e?t.get(e)??{}:{})}u(k,"getRenderedNode");function le(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(le,"shouldSkipIntersect");function ue(e,n){let t=n?.updatedPath??n?.originalPath,s=R(),{subGraphTitleTotalMargin:r}=M({flowchart:s.flowchart??{}});if(e.label){let i=x.get(e.id),{x:c,y:d}=$(e,n);i.attr("transform",`translate(${c}, ${d+r/2})`)}for(let[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){let{x:d,y:o}=fe(e,i,t);O.get(e.id)[i].attr("transform",`translate(${d}, ${o})`)}}u(ue,"positionRenderedEdgeLabel");var pe={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function fe(e,n,t){let s=e.terminalLabelCenters?.[n];if(s)return{...s};if(!t)return{x:e.x,y:e.y};let r=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return P.calcTerminalLabelPosition(r?10:0,pe[n],t)}u(fe,"terminalLabelTranslate");export{J as a,V as b,l as c,C as d,Se as e,ke as f,we as g,ne as h};
1
+ import{C as E}from"./chunk-K4I76XBX.js";import{a as _,b as G}from"./chunk-EWYECPNJ.js";import{e as x,f as O,g as F,h as D,i as S,j as $,l as j,m as H}from"./chunk-7JQUFVT4.js";import{a as M,b as A,d as X,e as L}from"./chunk-NDAMZVXQ.js";import{a as B}from"./chunk-BOXAA5AP.js";import{q as P}from"./chunk-QLS7NIYR.js";import{$ as T,C as R}from"./chunk-IVZHB6RS.js";import{b as a}from"./chunk-QQIGL7OP.js";import{a as u}from"./chunk-RJFVWYCA.js";function J(e,{edgePathsClass:n="edges edgePaths"}={}){let t=e.insert("g").attr("class","root"),s=t.insert("g").attr("class","clusters"),r=t.insert("g").attr("class",n),i=t.insert("g").attr("class","edgeLabels"),c=t.insert("g").attr("class","nodes");return{clusters:s,edgePaths:r,edgeLabels:i,nodes:c,rootGroups:t}}u(J,"createLayoutElementGroups");async function W(e,n,t){if(n.label){let{shapeSvg:s,bbox:r}=await B(e,t===void 0?n:{...n,width:t});n.labelBBox={width:r.width,height:r.height},s.remove()}else n.labelBBox={width:0,height:0}}u(W,"measureGroupLabel");async function V(e,n,t){let s=await A(e,n,t),r=s.node()?.getBBox()??{width:0,height:0};return n.width=r.width,n.height=r.height,s}u(V,"insertMeasuredNode");function Y(e,n,t){let s=e,r=new Set;for(;s;){if(s.dir)return s.dir;if(!s.parentId||r.has(s.parentId))break;r.add(s.parentId),s=n.get(s.parentId)}return t}u(Y,"resolveNodeDir");async function q(e,n,t={}){let s=new E({multigraph:!0,compound:!0}),r=[...n.edges],i=T(),c=J(e),{edgeLabels:d,nodes:o}=c,g=new Map,b=new Map(n.nodes.map(f=>[f.id,f])),N=n.direction,h=e.node()!=null;await Promise.all(n.nodes.map(async f=>{if(f.isGroup){if(h){let w=t.unwrapGroupLabels&&f.labelType!=="markdown";await W(o,f,w?Number.POSITIVE_INFINITY:void 0)}s.setNode(f.id,{...f})}else{if(h){let w=await V(o,f,{config:i,dir:Y(f,b,N)});g.set(f.id,w)}s.setNode(f.id,{...f})}}));for(let f of r)h&&D(f)&&await S(d,f),s.setEdge(f.start,f.end,{...f},f.id),n.edges.some(v=>v.id===f.id)||n.edges.push(f);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:f}=await import("./sizeCapture-INFHLROL-TJW3VUGH.js");f(e,n)}return{graph:s,groups:c,nodeElements:g}}u(q,"createGraphWithElements");var l=new Map,m=new Map,K=new Map,ge=u(()=>{m.clear(),K.clear(),l.clear()},"clear"),p=u((e,n)=>{let t=m.get(n)||[];return a.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),me=u((e,n)=>{let t=m.get(n)||[];return a.info("Descendants of ",n," is ",t),a.info("Edge is ",e),e.v===n||e.w===n?!1:t?t.includes(e.v)||p(e.v,n)||p(e.w,n)||t.includes(e.w):(a.debug("Tilt, ",n,",not in descendants"),!1)},"edgeInCluster"),Q=u((e,n,t,s)=>{a.debug("Copying children of ",e,"root",s,"data",n.node(e),s);let r=n.children(e)||[];e!==s&&r.push(e),a.debug("Copying (nodes) clusterId",e,"nodes",r),r.forEach(i=>{if(n.children(i).length>0)Q(i,n,t,s);else{let c=n.node(i);a.info("cp ",i," to ",s," with parent ",e),t.setNode(i,c),s!==n.parent(i)&&(a.debug("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==s&&i!==e?(a.debug("Setting parent",i,e),t.setParent(i,e)):(a.info("In copy ",e,"root",s,"data",n.node(e),s),a.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==s,"node!==clusterId",i!==e));let d=n.edges(i);a.debug("Copying Edges",d),d.forEach(o=>{a.info("Edge",o);let g=n.edge(o.v,o.w,o.name);a.info("Edge data",g,s);try{me(o,s)?(a.info("Copying as ",o.v,o.w,g,o.name),t.setEdge(o.v,o.w,g,o.name),a.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):a.info("Skipping copy of edge ",o.v,"-->",o.w," rootId: ",s," clusterId:",e)}catch(b){a.error(b)}})}a.debug("Removing node",i),n.removeNode(i)})},"copy"),U=u((e,n)=>{let t=n.children(e),s=[...t];for(let r of t)K.set(r,e),s=[...s,...U(r,n)];return s},"extractDescendants"),be=u((e,n,t)=>{let s=e.edges().filter(o=>o.v===n||o.w===n),r=e.edges().filter(o=>o.v===t||o.w===t),i=s.map(o=>({v:o.v===n?t:o.v,w:o.w===n?n:o.w})),c=r.map(o=>({v:o.v,w:o.w}));return i.filter(o=>c.some(g=>o.v===g.v&&o.w===g.w))},"findCommonEdges"),C=u((e,n,t)=>{let s=n.children(e);if(a.trace("Searching children of id ",e,s),s.length<1)return e;let r;for(let i of s){let c=C(i,n,t),d=be(n,t,c);if(c)if(d.length>0)r=c;else return c}return r},"findNonClusterChild"),z=u(e=>!l.has(e)||!l.get(e).externalConnections?e:l.has(e)?l.get(e).id:e,"getAnchorId"),Se=u((e,n)=>{if(!e||n>10){a.debug("Opting out, no graph ");return}else a.debug("Opting in, graph ");e.nodes().forEach(function(t){e.children(t).length>0&&(a.debug("Cluster identified",t," Replacement id in edges: ",C(t,e,t)),m.set(t,U(t,e)),l.set(t,{id:C(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let s=e.children(t),r=e.edges();s.length>0?(a.debug("Cluster identified",t,m),r.forEach(i=>{let c=p(i.v,t),d=p(i.w,t);c^d&&(a.debug("Edge: ",i," leaves cluster ",t),a.debug("Descendants of XXX ",t,": ",m.get(t)),l.get(t).externalConnections=!0)})):a.debug("Not a cluster ",t,m)});for(let t of l.keys()){let s=l.get(t).id,r=e.parent(s);r!==t&&l.has(r)&&!l.get(r).externalConnections&&(l.get(t).id=r);let i=e.edges().some(c=>c.v===t);if(s&&l.get(t)?.externalConnections&&i&&ee(e,s,t)){let c=he(e,t,e.parent(s));c&&(l.get(t).id=c)}}e.edges().forEach(function(t){let s=e.edge(t);a.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),a.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(a.debug("Fix XXX",l,"ids:",t.v,t.w,"Translating: ",l.get(t.v)," --- ",l.get(t.w)),l.get(t.v)||l.get(t.w)){if(a.debug("Fixing and trying - removing XXX",t.v,t.w,t.name),r=z(t.v),i=z(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let c=e.parent(r);l.get(c).externalConnections=!0,s.fromCluster=t.v}if(i!==t.w){let c=e.parent(i);l.get(c).externalConnections=!0,s.toCluster=t.w}a.debug("Fix Replacing with XXX",r,i,t.name),e.setEdge(r,i,s,t.name)}}),Z(e,0),a.trace(l)},"adjustClustersAndEdges"),Z=u((e,n)=>{if(n>10){a.error("Bailing out");return}let t=e.nodes(),s=!1;for(let r of t){let i=e.children(r);s=s||i.length>0}if(!s){a.debug("Done, no node has children",e.nodes());return}a.debug("Nodes = ",t,n);for(let r of t)if(a.debug("Extracting node",r,l,l.has(r)&&!l.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",n),!l.has(r))a.debug("Not a cluster",r,n);else if(!l.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){a.debug("Cluster without external connections, without a parent and with children",r,n);let c=e.graph().rankdir==="TB"?"LR":"TB";l.get(r)?.clusterData?.dir&&(c=l.get(r).clusterData.dir,a.debug("Fixing dir",l.get(r).clusterData.dir,c));let d=new E({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Q(r,e,d,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:l.get(r).clusterData,label:l.get(r).label,graph:d})}else a.debug("Cluster ** ",r," **not meeting the criteria !externalConnections:",!l.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),n),a.debug(l);t=e.nodes(),a.debug("New list of nodes",t);for(let r of t){let i=e.node(r);a.debug(" Now next level",r,i),i?.clusterNode&&Z(i.graph,n+1)}},"extractor"),I=u((e,n)=>{if(n.length===0)return[];let t=Object.assign([],n);return n.forEach(s=>{let r=e.children(s),i=I(e,r);t=[...t,...i]}),t},"sorter"),ke=u(e=>I(e,e.children()),"sortNodesByHierarchy"),ee=u((e,n,t)=>{let s=e.parent(n);for(;s&&s!==t;){let r=l.get(s);if(r&&!r.externalConnections)return!0;s=e.parent(s)}return!1},"isNodeInExtractableCluster"),he=u((e,n,t)=>{let s=e.children(n)??[];for(let r of s){if(r===t||p(r,t))continue;let i=C(r,e,n);if(i&&!ee(e,i,n))return i}return null},"findSafeAnchorNode");function we({prepareLayout:e,measureLayout:n,runLayoutCore:t,paintLayout:s,afterPaint:r,paintOptions:i}){let c=n??ne;return u(async function(o,g,b,N){let h=g.select("g");(b?.insertMarkers??H)(h,o.markers,o.type,o.diagramId),te();let f={element:h,helpers:b,options:N};f.preparedLayout=await e?.(o,f);let w=await c(o,f),v=await t(o,f),y={...f,measure:w};s?await s(o,y,v):await re(o,y,i),await r?.(o,y,v)},"render")}u(we,"createCommonLayoutRenderer");function te(){X(),F(),G(),ge()}u(te,"clearLayoutRenderState");async function ne(e,{element:n},t){return await q(n,e,t)}u(ne,"defaultMeasureLayout");async function re(e,n,t={}){let{measure:s}=n,{groups:r}=s;for(let c of t.getNodes?.(e,n)??e.nodes)t.skipNode?.(c,n)||await se(r,c,n,t);let i=oe(e.nodes);for(let c of e.edges)ae(c,t)||await ce(r,c,i,e,t,n)}u(re,"paintLayoutData");async function se(e,n,t,s){n.clusterNode?L(n):ie(n,t,s)?await _(e.clusters,n):L(n)}u(se,"paintLayoutNode");function ie(e,n,t){return e.isGroup===!0&&(t.isCluster?.(e,n)??!0)}u(ie,"shouldPaintAsCluster");function oe(e){let n=new Map;for(let t of e)t?.id&&n.set(t.id,t);return n}u(oe,"buildNodeLookup");function ae(e,n){return e.isLayoutOnly||!!n.skipEdge?.(e)}u(ae,"shouldSkipPaintEdge");async function ce(e,n,t,s,r,i){let c=j(e.edgePaths,{...n},r.clusterDb??new Map,s.type,k(n.start,n,t,i,r),k(n.end,n,t,i,r),s.diagramId,le(n,r),s.layoutAlgorithm);D(n)&&(x.has(n.id)||await S(e.edgeLabels,n),ue(n,c))}u(ce,"paintLayoutEdge");function k(e,n,t,s,r){return r.getEdgeNode?.(e,n,s)??(e?t.get(e)??{}:{})}u(k,"getRenderedNode");function le(e,n){return typeof n.skipIntersect=="function"?n.skipIntersect(e):n.skipIntersect??!1}u(le,"shouldSkipIntersect");function ue(e,n){let t=n?.updatedPath??n?.originalPath,s=R(),{subGraphTitleTotalMargin:r}=M({flowchart:s.flowchart??{}});if(e.label){let i=x.get(e.id),{x:c,y:d}=$(e,n);i.attr("transform",`translate(${c}, ${d+r/2})`)}for(let[i,c]of[["startLeft",e.startLabelLeft],["startRight",e.startLabelRight],["endLeft",e.endLabelLeft],["endRight",e.endLabelRight]])if(c){let{x:d,y:o}=fe(e,i,t);O.get(e.id)[i].attr("transform",`translate(${d}, ${o})`)}}u(ue,"positionRenderedEdgeLabel");var pe={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function fe(e,n,t){let s=e.terminalLabelCenters?.[n];if(s)return{...s};if(!t)return{x:e.x,y:e.y};let r=n.startsWith("start")?e.arrowTypeStart:e.arrowTypeEnd;return P.calcTerminalLabelPosition(r?10:0,pe[n],t)}u(fe,"terminalLabelTranslate");export{J as a,V as b,l as c,C as d,Se as e,ke as f,we as g};
@@ -1 +1 @@
1
- import{b as wt}from"./chunk-3RNHDNP5.js";var Rt=wt(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.BLANK_URL=k.relativeFirstCharacters=k.whitespaceEscapeCharsRegex=k.urlSchemeRegex=k.ctrlCharactersRegex=k.htmlCtrlEntityRegex=k.htmlEntitiesRegex=k.invalidProtocolRegex=void 0;k.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;k.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;k.htmlCtrlEntityRegex=/&(newline|tab);/gi;k.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;k.urlSchemeRegex=/^.+(:|&colon;)/gim;k.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;k.relativeFirstCharacters=[".","/"];k.BLANK_URL="about:blank"});var nn=wt(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.sanitizeUrl=tn;var R=Rt();function Gt(t){return R.relativeFirstCharacters.indexOf(t[0])>-1}function Jt(t){var n=t.replace(R.ctrlCharactersRegex,"");return n.replace(R.htmlEntitiesRegex,function(i,e){return String.fromCharCode(e)})}function jt(t){return URL.canParse(t)}function St(t){try{return decodeURIComponent(t)}catch{return t}}function tn(t){if(!t)return R.BLANK_URL;var n,i=St(t.trim());do i=Jt(i).replace(R.htmlCtrlEntityRegex,"").replace(R.ctrlCharactersRegex,"").replace(R.whitespaceEscapeCharsRegex,"").trim(),i=St(i),n=i.match(R.ctrlCharactersRegex)||i.match(R.htmlEntitiesRegex)||i.match(R.htmlCtrlEntityRegex)||i.match(R.whitespaceEscapeCharsRegex);while(n&&n.length>0);var e=i;if(!e)return R.BLANK_URL;if(Gt(e))return e;var o=e.trimStart(),r=o.match(R.urlSchemeRegex);if(!r)return e;var a=r[0].toLowerCase().trim();if(R.invalidProtocolRegex.test(a))return R.BLANK_URL;var s=o.replace(/\\/g,"/");if(a==="mailto:"||a.includes("://"))return s;if(a==="http:"||a==="https:"){if(!jt(s))return R.BLANK_URL;var l=new URL(s);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return s}});var H=Math.PI,dt=2*H,F=1e-6,en=dt-F;function Ct(t){this._+=t[0];for(let n=1,i=t.length;n<i;++n)this._+=arguments[n]+t[n]}function sn(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return Ct;let i=10**n;return function(e){this._+=e[0];for(let o=1,r=e.length;o<r;++o)this._+=Math.round(arguments[o]*i)/i+e[o]}}function Et(t,n,i,e){return t===i&&n===e}function on(t){let n=Math.floor(t);if(!(n<=15))return Et;let i=10**n,e=function(o){return Math.round(o*i)};return function(o,r,a,s){return e(o)===e(a)&&e(r)===e(s)}}var V=class{constructor(n){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=n==null?Ct:sn(n),this._equal=n==null?Et:on(n)}moveTo(n,i){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+i}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(n,i){this._append`L${this._x1=+n},${this._y1=+i}`}quadraticCurveTo(n,i,e,o){this._append`Q${+n},${+i},${this._x1=+e},${this._y1=+o}`}bezierCurveTo(n,i,e,o,r,a){this._append`C${+n},${+i},${+e},${+o},${this._x1=+r},${this._y1=+a}`}arcTo(n,i,e,o,r){if(n=+n,i=+i,e=+e,o=+o,r=+r,r<0)throw new Error(`negative radius: ${r}`);let a=this._x1,s=this._y1,l=e-n,_=o-i,h=a-n,p=s-i,u=h*h+p*p;if(this._x1===null)this._append`M${this._x1=n},${this._y1=i}`;else if(u>F)if(!(Math.abs(p*l-_*h)>F)||!r)this._append`L${this._x1=n},${this._y1=i}`;else{let f=e-a,y=o-s,v=l*l+_*_,N=f*f+y*y,m=Math.sqrt(v),b=Math.sqrt(u),T=r*Math.tan((H-Math.acos((v+u-N)/(2*m*b)))/2),g=T/b,w=T/m;Math.abs(g-1)>F&&this._append`L${n+g*h},${i+g*p}`,this._append`A${r},${r},0,0,${+(p*f>h*y)},${this._x1=n+w*l},${this._y1=i+w*_}`}}arc(n,i,e,o,r,a){if(n=+n,i=+i,e=+e,a=!!a,e<0)throw new Error(`negative radius: ${e}`);let s=e*Math.cos(o),l=e*Math.sin(o),_=n+s,h=i+l,p=1^a,u=a?o-r:r-o;if(this._x1===null?this._append`M${_},${h}`:(Math.abs(this._x1-_)>F||Math.abs(this._y1-h)>F)&&this._append`L${_},${h}`,!!e){if(u<0&&(u=u%dt+dt),u>en)this._append`A${e},${e},0,1,${p},${n-s},${i-l}A${e},${e},0,1,${p},${this._x1=_},${this._y1=h}`;else if(u>F){let f=n+e*Math.cos(r),y=i+e*Math.sin(r);if(u>=H&&this._equal(_,h,f,y)){u/=2;let v=o+u;this._append`A${e},${e},0,${+(u>=H)},${p},${n+e*Math.cos(v)},${i+e*Math.sin(v)}`}this._append`A${e},${e},0,${+(u>=H)},${p},${this._x1=f},${this._y1=y}`}}}rect(n,i,e,o){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+i}h${e=+e}v${+o}h${-e}Z`}toString(){return this._}};function rn(){return new V}rn.prototype=V.prototype;function x(t){return function(){return t}}var Nt=Math.abs,S=Math.atan2,X=Math.cos,hn=Math.max,yt=Math.min,M=Math.sin,P=Math.sqrt,C=1e-12,I=Math.PI,nt=I/2,W=2*I;function an(t){return t>1?0:t<-1?I:Math.acos(t)}function Mt(t){return t>=1?nt:t<=-1?-nt:Math.asin(t)}function Lt(t){let n=3;return t.digits=function(i){if(!arguments.length)return n;if(i==null)n=null;else{let e=Math.floor(i);if(!(e>=0))throw new RangeError(`invalid digits: ${i}`);n=e}return t},()=>new V(n)}function ln(t){return t.innerRadius}function un(t){return t.outerRadius}function _n(t){return t.startAngle}function cn(t){return t.endAngle}function fn(t){return t&&t.padAngle}function pn(t,n,i,e,o,r,a,s){var l=i-t,_=e-n,h=a-o,p=s-r,u=p*l-h*_;if(!(u*u<C))return u=(h*(n-r)-p*(t-o))/u,[t+u*l,n+u*_]}function tt(t,n,i,e,o,r,a){var s=t-i,l=n-e,_=(a?r:-r)/P(s*s+l*l),h=_*l,p=-_*s,u=t+h,f=n+p,y=i+h,v=e+p,N=(u+y)/2,m=(f+v)/2,b=y-u,T=v-f,g=b*b+T*T,w=o-r,E=u*v-y*f,q=(T<0?-1:1)*P(hn(0,w*w*g-E*E)),B=(E*T-b*q)/g,U=(-E*b-T*q)/g,O=(E*T+b*q)/g,A=(-E*b+T*q)/g,$=B-N,c=U-m,d=O-N,Y=A-m;return $*$+c*c>d*d+Y*Y&&(B=O,U=A),{cx:B,cy:U,x01:-h,y01:-p,x11:B*(o/w-1),y11:U*(o/w-1)}}function Sn(){var t=ln,n=un,i=x(0),e=null,o=_n,r=cn,a=fn,s=null,l=Lt(_);function _(){var h,p,u=+t.apply(this,arguments),f=+n.apply(this,arguments),y=o.apply(this,arguments)-nt,v=r.apply(this,arguments)-nt,N=Nt(v-y),m=v>y;if(s||(s=h=l()),f<u&&(p=f,f=u,u=p),!(f>C))s.moveTo(0,0);else if(N>W-C)s.moveTo(f*X(y),f*M(y)),s.arc(0,0,f,y,v,!m),u>C&&(s.moveTo(u*X(v),u*M(v)),s.arc(0,0,u,v,y,m));else{var b=y,T=v,g=y,w=v,E=N,q=N,B=a.apply(this,arguments)/2,U=B>C&&(e?+e.apply(this,arguments):P(u*u+f*f)),O=yt(Nt(f-u)/2,+i.apply(this,arguments)),A=O,$=O,c,d;if(U>C){var Y=Mt(U/u*M(B)),Z=Mt(U/f*M(B));(E-=Y*2)>C?(Y*=m?1:-1,g+=Y,w-=Y):(E=0,g=w=(y+v)/2),(q-=Z*2)>C?(Z*=m?1:-1,b+=Z,T-=Z):(q=0,b=T=(y+v)/2)}var D=f*X(b),K=f*M(b),Q=u*X(w),G=u*M(w);if(O>C){var J=f*X(T),j=f*M(T),at=u*X(g),lt=u*M(g),L;if(N<I)if(L=pn(D,K,at,lt,J,j,Q,G)){var ut=D-L[0],_t=K-L[1],ct=J-L[0],ft=j-L[1],bt=1/M(an((ut*ct+_t*ft)/(P(ut*ut+_t*_t)*P(ct*ct+ft*ft)))/2),kt=P(L[0]*L[0]+L[1]*L[1]);A=yt(O,(u-kt)/(bt-1)),$=yt(O,(f-kt)/(bt+1))}else A=$=0}q>C?$>C?(c=tt(at,lt,D,K,f,$,m),d=tt(J,j,Q,G,f,$,m),s.moveTo(c.cx+c.x01,c.cy+c.y01),$<O?s.arc(c.cx,c.cy,$,S(c.y01,c.x01),S(d.y01,d.x01),!m):(s.arc(c.cx,c.cy,$,S(c.y01,c.x01),S(c.y11,c.x11),!m),s.arc(0,0,f,S(c.cy+c.y11,c.cx+c.x11),S(d.cy+d.y11,d.cx+d.x11),!m),s.arc(d.cx,d.cy,$,S(d.y11,d.x11),S(d.y01,d.x01),!m))):(s.moveTo(D,K),s.arc(0,0,f,b,T,!m)):s.moveTo(D,K),!(u>C)||!(E>C)?s.lineTo(Q,G):A>C?(c=tt(Q,G,J,j,u,-A,m),d=tt(D,K,at,lt,u,-A,m),s.lineTo(c.cx+c.x01,c.cy+c.y01),A<O?s.arc(c.cx,c.cy,A,S(c.y01,c.x01),S(d.y01,d.x01),!m):(s.arc(c.cx,c.cy,A,S(c.y01,c.x01),S(c.y11,c.x11),!m),s.arc(0,0,u,S(c.cy+c.y11,c.cx+c.x11),S(d.cy+d.y11,d.cx+d.x11),m),s.arc(d.cx,d.cy,A,S(d.y11,d.x11),S(d.y01,d.x01),!m))):s.arc(0,0,u,w,g,m)}if(s.closePath(),h)return s=null,h+""||null}return _.centroid=function(){var h=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,p=(+o.apply(this,arguments)+ +r.apply(this,arguments))/2-I/2;return[X(p)*h,M(p)*h]},_.innerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:x(+h),_):t},_.outerRadius=function(h){return arguments.length?(n=typeof h=="function"?h:x(+h),_):n},_.cornerRadius=function(h){return arguments.length?(i=typeof h=="function"?h:x(+h),_):i},_.padRadius=function(h){return arguments.length?(e=h==null?null:typeof h=="function"?h:x(+h),_):e},_.startAngle=function(h){return arguments.length?(o=typeof h=="function"?h:x(+h),_):o},_.endAngle=function(h){return arguments.length?(r=typeof h=="function"?h:x(+h),_):r},_.padAngle=function(h){return arguments.length?(a=typeof h=="function"?h:x(+h),_):a},_.context=function(h){return arguments.length?(s=h??null,_):s},_}var Cn=Array.prototype.slice;function qt(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Bt(t){this._context=t}Bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n);break}}};function Ut(t){return new Bt(t)}function dn(t){return t[0]}function yn(t){return t[1]}function En(t,n){var i=x(!0),e=null,o=Ut,r=null,a=Lt(s);t=typeof t=="function"?t:t===void 0?dn:x(t),n=typeof n=="function"?n:n===void 0?yn:x(n);function s(l){var _,h=(l=qt(l)).length,p,u=!1,f;for(e==null&&(r=o(f=a())),_=0;_<=h;++_)!(_<h&&i(p=l[_],_,l))===u&&((u=!u)?r.lineStart():r.lineEnd()),u&&r.point(+t(p,_,l),+n(p,_,l));if(f)return r=null,f+""||null}return s.x=function(l){return arguments.length?(t=typeof l=="function"?l:x(+l),s):t},s.y=function(l){return arguments.length?(n=typeof l=="function"?l:x(+l),s):n},s.defined=function(l){return arguments.length?(i=typeof l=="function"?l:x(!!l),s):i},s.curve=function(l){return arguments.length?(o=l,e!=null&&(r=o(e)),s):o},s.context=function(l){return arguments.length?(l==null?e=r=null:r=o(e=l),s):e},s}function mn(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function vn(t){return t}function Nn(){var t=vn,n=mn,i=null,e=x(0),o=x(W),r=x(0);function a(s){var l,_=(s=qt(s)).length,h,p,u=0,f=new Array(_),y=new Array(_),v=+e.apply(this,arguments),N=Math.min(W,Math.max(-W,o.apply(this,arguments)-v)),m,b=Math.min(Math.abs(N)/_,r.apply(this,arguments)),T=b*(N<0?-1:1),g;for(l=0;l<_;++l)(g=y[f[l]=l]=+t(s[l],l,s))>0&&(u+=g);for(n!=null?f.sort(function(w,E){return n(y[w],y[E])}):i!=null&&f.sort(function(w,E){return i(s[w],s[E])}),l=0,p=u?(N-_*T)/u:0;l<_;++l,v=m)h=f[l],g=y[h],m=v+(g>0?g*p:0)+T,y[h]={data:s[h],index:l,value:g,startAngle:v,endAngle:m,padAngle:b};return y}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:x(+s),a):t},a.sortValues=function(s){return arguments.length?(n=s,i=null,a):n},a.sort=function(s){return arguments.length?(i=s,n=null,a):i},a.startAngle=function(s){return arguments.length?(e=typeof s=="function"?s:x(+s),a):e},a.endAngle=function(s){return arguments.length?(o=typeof s=="function"?s:x(+s),a):o},a.padAngle=function(s){return arguments.length?(r=typeof s=="function"?s:x(+s),a):r},a}var Mn=gn(Ut);function Xt(t){this._curve=t}Xt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};function gn(t){function n(i){return new Xt(t(i))}return n._curve=t,n}var it=class{constructor(n,i){this._context=n,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(n,i){switch(n=+n,i=+i,this._point){case 0:{this._point=1,this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+n)/2,this._y0,this._x0,i,n,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,n,this._y0,n,i);break}}this._x0=n,this._y0=i}};function An(t){return new it(t,!0)}function $n(t){return new it(t,!1)}var Pn=P(3);var xn=P(1/3),On=xn*2;var zt=M(I/10)/M(7*I/10),Ln=M(W/10)*zt,qn=-X(W/10)*zt;var Bn=P(3);var Un=P(3);var Xn=P(3)/2,Tn=1/P(12),zn=(Tn/2+1)*3;function z(){}function et(t,n,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+i)/6)}function rt(t){this._context=t}rt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:et(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:et(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function Yn(t){return new rt(t)}function Yt(t){this._context=t}Yt.prototype={areaStart:z,areaEnd:z,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:et(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function Fn(t){return new Yt(t)}function Ft(t){this._context=t}Ft.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,e=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 3:this._point=4;default:et(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function In(t){return new Ft(t)}function It(t,n){this._basis=new rt(t),this._beta=n}It.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,i=t.length-1;if(i>0)for(var e=t[0],o=n[0],r=t[i]-e,a=n[i]-o,s=-1,l;++s<=i;)l=s/i,this._basis.point(this._beta*t[s]+(1-this._beta)*(e+l*r),this._beta*n[s]+(1-this._beta)*(o+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Dn=(function t(n){function i(e){return n===1?new rt(e):new It(e,n)}return i.beta=function(e){return t(+e)},i})(.85);function st(t,n,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function vt(t,n){this._context=t,this._k=(1-n)/6}vt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:st(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:st(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Kn=(function t(n){function i(e){return new vt(e,n)}return i.tension=function(e){return t(+e)},i})(0);function gt(t,n){this._context=t,this._k=(1-n)/6}gt.prototype={areaStart:z,areaEnd:z,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:st(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Vn=(function t(n){function i(e){return new gt(e,n)}return i.tension=function(e){return t(+e)},i})(0);function xt(t,n){this._context=t,this._k=(1-n)/6}xt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:st(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Wn=(function t(n){function i(e){return new xt(e,n)}return i.tension=function(e){return t(+e)},i})(0);function Tt(t,n,i){var e=t._x1,o=t._y1,r=t._x2,a=t._y2;if(t._l01_a>C){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,o=(o*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>C){var _=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);r=(r*_+t._x1*t._l23_2a-n*t._l12_2a)/h,a=(a*_+t._y1*t._l23_2a-i*t._l12_2a)/h}t._context.bezierCurveTo(e,o,r,a,t._x2,t._y2)}function Dt(t,n){this._context=t,this._alpha=n}Dt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Tt(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Hn=(function t(n){function i(e){return n?new Dt(e,n):new vt(e,0)}return i.alpha=function(e){return t(+e)},i})(.5);function Kt(t,n){this._context=t,this._alpha=n}Kt.prototype={areaStart:z,areaEnd:z,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Tt(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Zn=(function t(n){function i(e){return n?new Kt(e,n):new gt(e,0)}return i.alpha=function(e){return t(+e)},i})(.5);function Vt(t,n){this._context=t,this._alpha=n}Vt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tt(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Qn=(function t(n){function i(e){return n?new Vt(e,n):new xt(e,0)}return i.alpha=function(e){return t(+e)},i})(.5);function Wt(t){this._context=t}Wt.prototype={areaStart:z,areaEnd:z,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};function Gn(t){return new Wt(t)}function At(t){return t<0?-1:1}function $t(t,n,i){var e=t._x1-t._x0,o=n-t._x1,r=(t._y1-t._y0)/(e||o<0&&-0),a=(i-t._y1)/(o||e<0&&-0),s=(r*o+a*e)/(e+o);return(At(r)+At(a))*Math.min(Math.abs(r),Math.abs(a),.5*Math.abs(s))||0}function Pt(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function mt(t,n,i){var e=t._x0,o=t._y0,r=t._x1,a=t._y1,s=(r-e)/3;t._context.bezierCurveTo(e+s,o+s*n,r-s,a-s*i,r,a)}function ot(t){this._context=t}ot.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:mt(this,this._t0,Pt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(t=+t,n=+n,!(t===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,mt(this,Pt(this,i=$t(this,t,n)),i);break;default:mt(this,this._t0,i=$t(this,t,n));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}};function Ht(t){this._context=new Zt(t)}(Ht.prototype=Object.create(ot.prototype)).point=function(t,n){ot.prototype.point.call(this,n,t)};function Zt(t){this._context=t}Zt.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,o,r){this._context.bezierCurveTo(n,t,e,i,r,o)}};function Jn(t){return new ot(t)}function jn(t){return new Ht(t)}function Qt(t){this._context=t}Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),i===2)this._context.lineTo(t[1],n[1]);else for(var e=Ot(t),o=Ot(n),r=0,a=1;a<i;++r,++a)this._context.bezierCurveTo(e[0][r],o[0][r],e[1][r],o[1][r],t[a],n[a]);(this._line||this._line!==0&&i===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}};function Ot(t){var n,i=t.length-1,e,o=new Array(i),r=new Array(i),a=new Array(i);for(o[0]=0,r[0]=2,a[0]=t[0]+2*t[1],n=1;n<i-1;++n)o[n]=1,r[n]=4,a[n]=4*t[n]+2*t[n+1];for(o[i-1]=2,r[i-1]=7,a[i-1]=8*t[i-1]+t[i],n=1;n<i;++n)e=o[n]/r[n-1],r[n]-=e,a[n]-=e*a[n-1];for(o[i-1]=a[i-1]/r[i-1],n=i-2;n>=0;--n)o[n]=(a[n]-o[n+1])/r[n];for(r[i-1]=(t[i]+o[i-1])/2,n=0;n<i-1;++n)r[n]=2*t[n+1]-o[n+1];return[o,r]}function ti(t){return new Qt(t)}function ht(t,n){this._context=t,this._t=n}ht.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}break}}this._x=t,this._y=n}};function ni(t){return new ht(t,.5)}function ii(t){return new ht(t,0)}function ei(t){return new ht(t,1)}export{nn as a,Sn as b,Ut as c,En as d,Nn as e,An as f,$n as g,Yn as h,Fn as i,In as j,Dn as k,Kn as l,Vn as m,Wn as n,Hn as o,Zn as p,Qn as q,Gn as r,Jn as s,jn as t,ti as u,ni as v,ii as w,ei as x};
1
+ import{a as wt}from"./chunk-SQE76S5B.js";var Rt=wt(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.BLANK_URL=k.relativeFirstCharacters=k.whitespaceEscapeCharsRegex=k.urlSchemeRegex=k.ctrlCharactersRegex=k.htmlCtrlEntityRegex=k.htmlEntitiesRegex=k.invalidProtocolRegex=void 0;k.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;k.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;k.htmlCtrlEntityRegex=/&(newline|tab);/gi;k.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;k.urlSchemeRegex=/^.+(:|&colon;)/gim;k.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;k.relativeFirstCharacters=[".","/"];k.BLANK_URL="about:blank"});var nn=wt(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.sanitizeUrl=tn;var R=Rt();function Gt(t){return R.relativeFirstCharacters.indexOf(t[0])>-1}function Jt(t){var n=t.replace(R.ctrlCharactersRegex,"");return n.replace(R.htmlEntitiesRegex,function(i,e){return String.fromCharCode(e)})}function jt(t){return URL.canParse(t)}function St(t){try{return decodeURIComponent(t)}catch{return t}}function tn(t){if(!t)return R.BLANK_URL;var n,i=St(t.trim());do i=Jt(i).replace(R.htmlCtrlEntityRegex,"").replace(R.ctrlCharactersRegex,"").replace(R.whitespaceEscapeCharsRegex,"").trim(),i=St(i),n=i.match(R.ctrlCharactersRegex)||i.match(R.htmlEntitiesRegex)||i.match(R.htmlCtrlEntityRegex)||i.match(R.whitespaceEscapeCharsRegex);while(n&&n.length>0);var e=i;if(!e)return R.BLANK_URL;if(Gt(e))return e;var o=e.trimStart(),r=o.match(R.urlSchemeRegex);if(!r)return e;var a=r[0].toLowerCase().trim();if(R.invalidProtocolRegex.test(a))return R.BLANK_URL;var s=o.replace(/\\/g,"/");if(a==="mailto:"||a.includes("://"))return s;if(a==="http:"||a==="https:"){if(!jt(s))return R.BLANK_URL;var l=new URL(s);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return s}});var H=Math.PI,dt=2*H,F=1e-6,en=dt-F;function Ct(t){this._+=t[0];for(let n=1,i=t.length;n<i;++n)this._+=arguments[n]+t[n]}function sn(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return Ct;let i=10**n;return function(e){this._+=e[0];for(let o=1,r=e.length;o<r;++o)this._+=Math.round(arguments[o]*i)/i+e[o]}}function Et(t,n,i,e){return t===i&&n===e}function on(t){let n=Math.floor(t);if(!(n<=15))return Et;let i=10**n,e=function(o){return Math.round(o*i)};return function(o,r,a,s){return e(o)===e(a)&&e(r)===e(s)}}var V=class{constructor(n){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=n==null?Ct:sn(n),this._equal=n==null?Et:on(n)}moveTo(n,i){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+i}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(n,i){this._append`L${this._x1=+n},${this._y1=+i}`}quadraticCurveTo(n,i,e,o){this._append`Q${+n},${+i},${this._x1=+e},${this._y1=+o}`}bezierCurveTo(n,i,e,o,r,a){this._append`C${+n},${+i},${+e},${+o},${this._x1=+r},${this._y1=+a}`}arcTo(n,i,e,o,r){if(n=+n,i=+i,e=+e,o=+o,r=+r,r<0)throw new Error(`negative radius: ${r}`);let a=this._x1,s=this._y1,l=e-n,_=o-i,h=a-n,p=s-i,u=h*h+p*p;if(this._x1===null)this._append`M${this._x1=n},${this._y1=i}`;else if(u>F)if(!(Math.abs(p*l-_*h)>F)||!r)this._append`L${this._x1=n},${this._y1=i}`;else{let f=e-a,y=o-s,v=l*l+_*_,N=f*f+y*y,m=Math.sqrt(v),b=Math.sqrt(u),T=r*Math.tan((H-Math.acos((v+u-N)/(2*m*b)))/2),g=T/b,w=T/m;Math.abs(g-1)>F&&this._append`L${n+g*h},${i+g*p}`,this._append`A${r},${r},0,0,${+(p*f>h*y)},${this._x1=n+w*l},${this._y1=i+w*_}`}}arc(n,i,e,o,r,a){if(n=+n,i=+i,e=+e,a=!!a,e<0)throw new Error(`negative radius: ${e}`);let s=e*Math.cos(o),l=e*Math.sin(o),_=n+s,h=i+l,p=1^a,u=a?o-r:r-o;if(this._x1===null?this._append`M${_},${h}`:(Math.abs(this._x1-_)>F||Math.abs(this._y1-h)>F)&&this._append`L${_},${h}`,!!e){if(u<0&&(u=u%dt+dt),u>en)this._append`A${e},${e},0,1,${p},${n-s},${i-l}A${e},${e},0,1,${p},${this._x1=_},${this._y1=h}`;else if(u>F){let f=n+e*Math.cos(r),y=i+e*Math.sin(r);if(u>=H&&this._equal(_,h,f,y)){u/=2;let v=o+u;this._append`A${e},${e},0,${+(u>=H)},${p},${n+e*Math.cos(v)},${i+e*Math.sin(v)}`}this._append`A${e},${e},0,${+(u>=H)},${p},${this._x1=f},${this._y1=y}`}}}rect(n,i,e,o){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+i}h${e=+e}v${+o}h${-e}Z`}toString(){return this._}};function rn(){return new V}rn.prototype=V.prototype;function x(t){return function(){return t}}var Nt=Math.abs,S=Math.atan2,X=Math.cos,hn=Math.max,yt=Math.min,M=Math.sin,P=Math.sqrt,C=1e-12,I=Math.PI,nt=I/2,W=2*I;function an(t){return t>1?0:t<-1?I:Math.acos(t)}function Mt(t){return t>=1?nt:t<=-1?-nt:Math.asin(t)}function Lt(t){let n=3;return t.digits=function(i){if(!arguments.length)return n;if(i==null)n=null;else{let e=Math.floor(i);if(!(e>=0))throw new RangeError(`invalid digits: ${i}`);n=e}return t},()=>new V(n)}function ln(t){return t.innerRadius}function un(t){return t.outerRadius}function _n(t){return t.startAngle}function cn(t){return t.endAngle}function fn(t){return t&&t.padAngle}function pn(t,n,i,e,o,r,a,s){var l=i-t,_=e-n,h=a-o,p=s-r,u=p*l-h*_;if(!(u*u<C))return u=(h*(n-r)-p*(t-o))/u,[t+u*l,n+u*_]}function tt(t,n,i,e,o,r,a){var s=t-i,l=n-e,_=(a?r:-r)/P(s*s+l*l),h=_*l,p=-_*s,u=t+h,f=n+p,y=i+h,v=e+p,N=(u+y)/2,m=(f+v)/2,b=y-u,T=v-f,g=b*b+T*T,w=o-r,E=u*v-y*f,q=(T<0?-1:1)*P(hn(0,w*w*g-E*E)),B=(E*T-b*q)/g,U=(-E*b-T*q)/g,O=(E*T+b*q)/g,A=(-E*b+T*q)/g,$=B-N,c=U-m,d=O-N,Y=A-m;return $*$+c*c>d*d+Y*Y&&(B=O,U=A),{cx:B,cy:U,x01:-h,y01:-p,x11:B*(o/w-1),y11:U*(o/w-1)}}function Sn(){var t=ln,n=un,i=x(0),e=null,o=_n,r=cn,a=fn,s=null,l=Lt(_);function _(){var h,p,u=+t.apply(this,arguments),f=+n.apply(this,arguments),y=o.apply(this,arguments)-nt,v=r.apply(this,arguments)-nt,N=Nt(v-y),m=v>y;if(s||(s=h=l()),f<u&&(p=f,f=u,u=p),!(f>C))s.moveTo(0,0);else if(N>W-C)s.moveTo(f*X(y),f*M(y)),s.arc(0,0,f,y,v,!m),u>C&&(s.moveTo(u*X(v),u*M(v)),s.arc(0,0,u,v,y,m));else{var b=y,T=v,g=y,w=v,E=N,q=N,B=a.apply(this,arguments)/2,U=B>C&&(e?+e.apply(this,arguments):P(u*u+f*f)),O=yt(Nt(f-u)/2,+i.apply(this,arguments)),A=O,$=O,c,d;if(U>C){var Y=Mt(U/u*M(B)),Z=Mt(U/f*M(B));(E-=Y*2)>C?(Y*=m?1:-1,g+=Y,w-=Y):(E=0,g=w=(y+v)/2),(q-=Z*2)>C?(Z*=m?1:-1,b+=Z,T-=Z):(q=0,b=T=(y+v)/2)}var D=f*X(b),K=f*M(b),Q=u*X(w),G=u*M(w);if(O>C){var J=f*X(T),j=f*M(T),at=u*X(g),lt=u*M(g),L;if(N<I)if(L=pn(D,K,at,lt,J,j,Q,G)){var ut=D-L[0],_t=K-L[1],ct=J-L[0],ft=j-L[1],bt=1/M(an((ut*ct+_t*ft)/(P(ut*ut+_t*_t)*P(ct*ct+ft*ft)))/2),kt=P(L[0]*L[0]+L[1]*L[1]);A=yt(O,(u-kt)/(bt-1)),$=yt(O,(f-kt)/(bt+1))}else A=$=0}q>C?$>C?(c=tt(at,lt,D,K,f,$,m),d=tt(J,j,Q,G,f,$,m),s.moveTo(c.cx+c.x01,c.cy+c.y01),$<O?s.arc(c.cx,c.cy,$,S(c.y01,c.x01),S(d.y01,d.x01),!m):(s.arc(c.cx,c.cy,$,S(c.y01,c.x01),S(c.y11,c.x11),!m),s.arc(0,0,f,S(c.cy+c.y11,c.cx+c.x11),S(d.cy+d.y11,d.cx+d.x11),!m),s.arc(d.cx,d.cy,$,S(d.y11,d.x11),S(d.y01,d.x01),!m))):(s.moveTo(D,K),s.arc(0,0,f,b,T,!m)):s.moveTo(D,K),!(u>C)||!(E>C)?s.lineTo(Q,G):A>C?(c=tt(Q,G,J,j,u,-A,m),d=tt(D,K,at,lt,u,-A,m),s.lineTo(c.cx+c.x01,c.cy+c.y01),A<O?s.arc(c.cx,c.cy,A,S(c.y01,c.x01),S(d.y01,d.x01),!m):(s.arc(c.cx,c.cy,A,S(c.y01,c.x01),S(c.y11,c.x11),!m),s.arc(0,0,u,S(c.cy+c.y11,c.cx+c.x11),S(d.cy+d.y11,d.cx+d.x11),m),s.arc(d.cx,d.cy,A,S(d.y11,d.x11),S(d.y01,d.x01),!m))):s.arc(0,0,u,w,g,m)}if(s.closePath(),h)return s=null,h+""||null}return _.centroid=function(){var h=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,p=(+o.apply(this,arguments)+ +r.apply(this,arguments))/2-I/2;return[X(p)*h,M(p)*h]},_.innerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:x(+h),_):t},_.outerRadius=function(h){return arguments.length?(n=typeof h=="function"?h:x(+h),_):n},_.cornerRadius=function(h){return arguments.length?(i=typeof h=="function"?h:x(+h),_):i},_.padRadius=function(h){return arguments.length?(e=h==null?null:typeof h=="function"?h:x(+h),_):e},_.startAngle=function(h){return arguments.length?(o=typeof h=="function"?h:x(+h),_):o},_.endAngle=function(h){return arguments.length?(r=typeof h=="function"?h:x(+h),_):r},_.padAngle=function(h){return arguments.length?(a=typeof h=="function"?h:x(+h),_):a},_.context=function(h){return arguments.length?(s=h??null,_):s},_}var Cn=Array.prototype.slice;function qt(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Bt(t){this._context=t}Bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n);break}}};function Ut(t){return new Bt(t)}function dn(t){return t[0]}function yn(t){return t[1]}function En(t,n){var i=x(!0),e=null,o=Ut,r=null,a=Lt(s);t=typeof t=="function"?t:t===void 0?dn:x(t),n=typeof n=="function"?n:n===void 0?yn:x(n);function s(l){var _,h=(l=qt(l)).length,p,u=!1,f;for(e==null&&(r=o(f=a())),_=0;_<=h;++_)!(_<h&&i(p=l[_],_,l))===u&&((u=!u)?r.lineStart():r.lineEnd()),u&&r.point(+t(p,_,l),+n(p,_,l));if(f)return r=null,f+""||null}return s.x=function(l){return arguments.length?(t=typeof l=="function"?l:x(+l),s):t},s.y=function(l){return arguments.length?(n=typeof l=="function"?l:x(+l),s):n},s.defined=function(l){return arguments.length?(i=typeof l=="function"?l:x(!!l),s):i},s.curve=function(l){return arguments.length?(o=l,e!=null&&(r=o(e)),s):o},s.context=function(l){return arguments.length?(l==null?e=r=null:r=o(e=l),s):e},s}function mn(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function vn(t){return t}function Nn(){var t=vn,n=mn,i=null,e=x(0),o=x(W),r=x(0);function a(s){var l,_=(s=qt(s)).length,h,p,u=0,f=new Array(_),y=new Array(_),v=+e.apply(this,arguments),N=Math.min(W,Math.max(-W,o.apply(this,arguments)-v)),m,b=Math.min(Math.abs(N)/_,r.apply(this,arguments)),T=b*(N<0?-1:1),g;for(l=0;l<_;++l)(g=y[f[l]=l]=+t(s[l],l,s))>0&&(u+=g);for(n!=null?f.sort(function(w,E){return n(y[w],y[E])}):i!=null&&f.sort(function(w,E){return i(s[w],s[E])}),l=0,p=u?(N-_*T)/u:0;l<_;++l,v=m)h=f[l],g=y[h],m=v+(g>0?g*p:0)+T,y[h]={data:s[h],index:l,value:g,startAngle:v,endAngle:m,padAngle:b};return y}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:x(+s),a):t},a.sortValues=function(s){return arguments.length?(n=s,i=null,a):n},a.sort=function(s){return arguments.length?(i=s,n=null,a):i},a.startAngle=function(s){return arguments.length?(e=typeof s=="function"?s:x(+s),a):e},a.endAngle=function(s){return arguments.length?(o=typeof s=="function"?s:x(+s),a):o},a.padAngle=function(s){return arguments.length?(r=typeof s=="function"?s:x(+s),a):r},a}var Mn=gn(Ut);function Xt(t){this._curve=t}Xt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};function gn(t){function n(i){return new Xt(t(i))}return n._curve=t,n}var it=class{constructor(n,i){this._context=n,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(n,i){switch(n=+n,i=+i,this._point){case 0:{this._point=1,this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+n)/2,this._y0,this._x0,i,n,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,n,this._y0,n,i);break}}this._x0=n,this._y0=i}};function An(t){return new it(t,!0)}function $n(t){return new it(t,!1)}var Pn=P(3);var xn=P(1/3),On=xn*2;var zt=M(I/10)/M(7*I/10),Ln=M(W/10)*zt,qn=-X(W/10)*zt;var Bn=P(3);var Un=P(3);var Xn=P(3)/2,Tn=1/P(12),zn=(Tn/2+1)*3;function z(){}function et(t,n,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+i)/6)}function rt(t){this._context=t}rt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:et(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:et(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function Yn(t){return new rt(t)}function Yt(t){this._context=t}Yt.prototype={areaStart:z,areaEnd:z,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:et(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function Fn(t){return new Yt(t)}function Ft(t){this._context=t}Ft.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,e=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 3:this._point=4;default:et(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function In(t){return new Ft(t)}function It(t,n){this._basis=new rt(t),this._beta=n}It.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,i=t.length-1;if(i>0)for(var e=t[0],o=n[0],r=t[i]-e,a=n[i]-o,s=-1,l;++s<=i;)l=s/i,this._basis.point(this._beta*t[s]+(1-this._beta)*(e+l*r),this._beta*n[s]+(1-this._beta)*(o+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Dn=(function t(n){function i(e){return n===1?new rt(e):new It(e,n)}return i.beta=function(e){return t(+e)},i})(.85);function st(t,n,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function vt(t,n){this._context=t,this._k=(1-n)/6}vt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:st(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:st(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Kn=(function t(n){function i(e){return new vt(e,n)}return i.tension=function(e){return t(+e)},i})(0);function gt(t,n){this._context=t,this._k=(1-n)/6}gt.prototype={areaStart:z,areaEnd:z,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:st(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Vn=(function t(n){function i(e){return new gt(e,n)}return i.tension=function(e){return t(+e)},i})(0);function xt(t,n){this._context=t,this._k=(1-n)/6}xt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:st(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Wn=(function t(n){function i(e){return new xt(e,n)}return i.tension=function(e){return t(+e)},i})(0);function Tt(t,n,i){var e=t._x1,o=t._y1,r=t._x2,a=t._y2;if(t._l01_a>C){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,o=(o*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>C){var _=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);r=(r*_+t._x1*t._l23_2a-n*t._l12_2a)/h,a=(a*_+t._y1*t._l23_2a-i*t._l12_2a)/h}t._context.bezierCurveTo(e,o,r,a,t._x2,t._y2)}function Dt(t,n){this._context=t,this._alpha=n}Dt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Tt(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Hn=(function t(n){function i(e){return n?new Dt(e,n):new vt(e,0)}return i.alpha=function(e){return t(+e)},i})(.5);function Kt(t,n){this._context=t,this._alpha=n}Kt.prototype={areaStart:z,areaEnd:z,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Tt(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Zn=(function t(n){function i(e){return n?new Kt(e,n):new gt(e,0)}return i.alpha=function(e){return t(+e)},i})(.5);function Vt(t,n){this._context=t,this._alpha=n}Vt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tt(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Qn=(function t(n){function i(e){return n?new Vt(e,n):new xt(e,0)}return i.alpha=function(e){return t(+e)},i})(.5);function Wt(t){this._context=t}Wt.prototype={areaStart:z,areaEnd:z,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};function Gn(t){return new Wt(t)}function At(t){return t<0?-1:1}function $t(t,n,i){var e=t._x1-t._x0,o=n-t._x1,r=(t._y1-t._y0)/(e||o<0&&-0),a=(i-t._y1)/(o||e<0&&-0),s=(r*o+a*e)/(e+o);return(At(r)+At(a))*Math.min(Math.abs(r),Math.abs(a),.5*Math.abs(s))||0}function Pt(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function mt(t,n,i){var e=t._x0,o=t._y0,r=t._x1,a=t._y1,s=(r-e)/3;t._context.bezierCurveTo(e+s,o+s*n,r-s,a-s*i,r,a)}function ot(t){this._context=t}ot.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:mt(this,this._t0,Pt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(t=+t,n=+n,!(t===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,mt(this,Pt(this,i=$t(this,t,n)),i);break;default:mt(this,this._t0,i=$t(this,t,n));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}};function Ht(t){this._context=new Zt(t)}(Ht.prototype=Object.create(ot.prototype)).point=function(t,n){ot.prototype.point.call(this,n,t)};function Zt(t){this._context=t}Zt.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,o,r){this._context.bezierCurveTo(n,t,e,i,r,o)}};function Jn(t){return new ot(t)}function jn(t){return new Ht(t)}function Qt(t){this._context=t}Qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),i===2)this._context.lineTo(t[1],n[1]);else for(var e=Ot(t),o=Ot(n),r=0,a=1;a<i;++r,++a)this._context.bezierCurveTo(e[0][r],o[0][r],e[1][r],o[1][r],t[a],n[a]);(this._line||this._line!==0&&i===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}};function Ot(t){var n,i=t.length-1,e,o=new Array(i),r=new Array(i),a=new Array(i);for(o[0]=0,r[0]=2,a[0]=t[0]+2*t[1],n=1;n<i-1;++n)o[n]=1,r[n]=4,a[n]=4*t[n]+2*t[n+1];for(o[i-1]=2,r[i-1]=7,a[i-1]=8*t[i-1]+t[i],n=1;n<i;++n)e=o[n]/r[n-1],r[n]-=e,a[n]-=e*a[n-1];for(o[i-1]=a[i-1]/r[i-1],n=i-2;n>=0;--n)o[n]=(a[n]-o[n+1])/r[n];for(r[i-1]=(t[i]+o[i-1])/2,n=0;n<i-1;++n)r[n]=2*t[n+1]-o[n+1];return[o,r]}function ti(t){return new Qt(t)}function ht(t,n){this._context=t,this._t=n}ht.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}break}}this._x=t,this._y=n}};function ni(t){return new ht(t,.5)}function ii(t){return new ht(t,0)}function ei(t){return new ht(t,1)}export{nn as a,Sn as b,Ut as c,En as d,Nn as e,An as f,$n as g,Yn as h,Fn as i,In as j,Dn as k,Kn as l,Vn as m,Wn as n,Hn as o,Zn as p,Qn as q,Gn as r,Jn as s,jn as t,ti as u,ni as v,ii as w,ei as x};