@foris/ai-agent 0.9.1-beta.2 → 0.9.1-beta.3

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 (325) hide show
  1. package/dist/abap-Y8Dl9g_6.js +6 -0
  2. package/dist/actionscript-3-DZzbMeqX.js +6 -0
  3. package/dist/ada-vP6ak0IW.js +6 -0
  4. package/dist/ai-agent.es.js +14 -2779
  5. package/dist/ai-agent.umd.js +3213 -4
  6. package/dist/andromeeda-BIpZ7gaU.js +4 -0
  7. package/dist/angular-html-CHuhdNYa.js +32 -0
  8. package/dist/angular-ts-CkwnAxZa.js +32 -0
  9. package/dist/apache-BUjz-sD2.js +6 -0
  10. package/dist/apex-oLhhs58q.js +6 -0
  11. package/dist/apl-C8FRyJIY.js +24 -0
  12. package/dist/applescript-BPx7YFFu.js +6 -0
  13. package/dist/ara-Z2fSOxSw.js +6 -0
  14. package/dist/arc-BzRDGNYi.js +85 -0
  15. package/dist/architectureDiagram-VXUJARFQ-jlW87y1j.js +4682 -0
  16. package/dist/asciidoc-B-pCoB3G.js +6 -0
  17. package/dist/asm-BTWLY5ym.js +6 -0
  18. package/dist/astro-CAC4-sRr.js +25 -0
  19. package/dist/aurora-x-BwoVEUWZ.js +4 -0
  20. package/dist/awk-Fb0P9dkn.js +6 -0
  21. package/dist/ayu-dark-CxPZkpb2.js +4 -0
  22. package/dist/ballerina-oZK-YekG.js +6 -0
  23. package/dist/bat-0FvbqU9S.js +6 -0
  24. package/dist/beancount-DqJEb89h.js +6 -0
  25. package/dist/berry-DODBq_Ff.js +6 -0
  26. package/dist/bibtex-EULQRLY5.js +6 -0
  27. package/dist/bicep-BorU73w0.js +6 -0
  28. package/dist/blade-Bwl5-ENK.js +27 -0
  29. package/dist/blockDiagram-VD42YOAC-P4woNHAr.js +2415 -0
  30. package/dist/bsl-NkNNwerW.js +8 -0
  31. package/dist/c-eeMepfLm.js +6 -0
  32. package/dist/c4Diagram-YG6GDRKO-CB9WFLmJ.js +1593 -0
  33. package/dist/cadence-02UX7mW8.js +6 -0
  34. package/dist/cairo-Cp116741.js +18 -0
  35. package/dist/catppuccin-frappe-D3cH2rXe.js +4 -0
  36. package/dist/catppuccin-latte-C0LRGUW4.js +4 -0
  37. package/dist/catppuccin-macchiato-c5wQ11TT.js +4 -0
  38. package/dist/catppuccin-mocha-WMD6Qvya.js +4 -0
  39. package/dist/channel-B-TkD8Bv.js +5 -0
  40. package/dist/chunk-4BX2VUAB-DCjARiNr.js +9 -0
  41. package/dist/chunk-55IACEB6-DvmPHLo5.js +8 -0
  42. package/dist/chunk-B4BG7PRW-L08cVxNP.js +1377 -0
  43. package/dist/chunk-DI55MBZ5-zkyTO7pn.js +1383 -0
  44. package/dist/chunk-FMBD7UC4-BkpbM-uP.js +19 -0
  45. package/dist/chunk-QN33PNHL-DSFN3Uoh.js +20 -0
  46. package/dist/chunk-QZHKN3VN-CAgMv7Xo.js +15 -0
  47. package/dist/chunk-TZMSLE5B-B6GY_sBW.js +64 -0
  48. package/dist/clarity-PKm5CwqM.js +6 -0
  49. package/dist/classDiagram-2ON5EDUG-KqDAjO33.js +30 -0
  50. package/dist/classDiagram-v2-WZHVMYZB-KqDAjO33.js +30 -0
  51. package/dist/clojure-CXJfHrL3.js +6 -0
  52. package/dist/cmake-BJz8BOTU.js +6 -0
  53. package/dist/cobol-DNTp9HAy.js +20 -0
  54. package/dist/code-block-QI2IAROF-Culy9AKV.js +2042 -0
  55. package/dist/codeowners-Bt9yU6NX.js +6 -0
  56. package/dist/codeql-DHkodjjI.js +6 -0
  57. package/dist/coffee-BrprHIxF.js +18 -0
  58. package/dist/common-lisp-EVqT9Zhp.js +6 -0
  59. package/dist/coq-B0L9upzn.js +6 -0
  60. package/dist/cose-bilkent-S5V4N54A-DtppvcNV.js +2620 -0
  61. package/dist/cpp-CwJ5QP3s.js +29 -0
  62. package/dist/crystal-DWRgWI1Z.js +24 -0
  63. package/dist/csv-CmYOceLb.js +6 -0
  64. package/dist/cue-ZzumE7IT.js +6 -0
  65. package/dist/cypher-jpdmjtA6.js +6 -0
  66. package/dist/cytoscape.esm-ClN43hhW.js +18846 -0
  67. package/dist/d-CBagWSwH.js +6 -0
  68. package/dist/dagre-6UL2VRFP-BfvQz4N-.js +459 -0
  69. package/dist/dark-plus-pUHDTVV0.js +4 -0
  70. package/dist/dart-6ObCrKr9.js +6 -0
  71. package/dist/dax-CcDT-8dH.js +6 -0
  72. package/dist/defaultLocale-D1piDxzZ.js +177 -0
  73. package/dist/desktop-B93p9R9O.js +6 -0
  74. package/dist/diagram-PSM6KHXK-ka-cDwC2.js +552 -0
  75. package/dist/diagram-QEK2KX5R-BW-yTygZ.js +232 -0
  76. package/dist/diagram-S2PKOQOG-j24g_p7y.js +154 -0
  77. package/dist/diff-BxzP2J8R.js +6 -0
  78. package/dist/docker-CsHqm9tx.js +6 -0
  79. package/dist/dotenv-BMjVjUL1.js +6 -0
  80. package/dist/dracula-BtZx2Kac.js +4 -0
  81. package/dist/dracula-soft-BKa-aqBv.js +4 -0
  82. package/dist/dream-maker-PAx17jaB.js +6 -0
  83. package/dist/edge-B5_tHZZy.js +21 -0
  84. package/dist/elixir-Dj_1qPNg.js +18 -0
  85. package/dist/elm-DZPAA5Qn.js +9 -0
  86. package/dist/emacs-lisp-Cfxdx5D-.js +6 -0
  87. package/dist/erDiagram-Q2GNP2WA-BoiJgXhe.js +854 -0
  88. package/dist/erb-DiYOU0he.js +31 -0
  89. package/dist/erlang-CNRRyeIc.js +18 -0
  90. package/dist/everforest-dark-DMCBqXCK.js +4 -0
  91. package/dist/everforest-light-BbXl82Em.js +4 -0
  92. package/dist/fennel-N4WcXuKx.js +6 -0
  93. package/dist/fish-BTDEUgqH.js +6 -0
  94. package/dist/flowDiagram-NV44I4VS-BHGntIlE.js +1639 -0
  95. package/dist/fluent-BMXUxfv1.js +6 -0
  96. package/dist/fortran-fixed-form-DUsA-VGo.js +8 -0
  97. package/dist/fortran-free-form-DPIT_jbP.js +6 -0
  98. package/dist/fsharp-yevJ8DSS.js +18 -0
  99. package/dist/ganttDiagram-JELNMOA3-Ce8NwhCP.js +2710 -0
  100. package/dist/gdresource-BwtMIoBm.js +10 -0
  101. package/dist/gdscript-BifyeYhI.js +6 -0
  102. package/dist/gdshader-Bk8fF6yr.js +6 -0
  103. package/dist/genie-DzUvd7U9.js +6 -0
  104. package/dist/gherkin-DHRaV0YP.js +6 -0
  105. package/dist/git-commit-Bd32YZ0K.js +8 -0
  106. package/dist/git-rebase-BWMiWxYf.js +18 -0
  107. package/dist/gitGraphDiagram-NY62KEGX-DxoN7y5T.js +723 -0
  108. package/dist/github-dark-DenFmJkN.js +4 -0
  109. package/dist/github-dark-default-BJPUVz4H.js +4 -0
  110. package/dist/github-dark-dimmed-DUshB20C.js +4 -0
  111. package/dist/github-dark-high-contrast-D3aGCnF8.js +4 -0
  112. package/dist/github-light-JYsPkUQd.js +4 -0
  113. package/dist/github-light-default-D99KPAby.js +4 -0
  114. package/dist/github-light-high-contrast-BbmZE-Mp.js +4 -0
  115. package/dist/gleam-Bv284lvN.js +6 -0
  116. package/dist/glimmer-js-Nc7Kk_CN.js +21 -0
  117. package/dist/glimmer-ts-DLoneyA9.js +21 -0
  118. package/dist/glsl-CkUcVZNK.js +8 -0
  119. package/dist/gnuplot-yPG9-sE_.js +6 -0
  120. package/dist/graph-C-gpLwEq.js +1189 -0
  121. package/dist/graphql-CB9Yiq18.js +23 -0
  122. package/dist/groovy-CJQTphOW.js +6 -0
  123. package/dist/gruvbox-dark-hard-C5HOtKIh.js +4 -0
  124. package/dist/gruvbox-dark-medium-FVgwJHuz.js +4 -0
  125. package/dist/gruvbox-dark-soft-B46F314v.js +4 -0
  126. package/dist/gruvbox-light-hard-CJD38wDZ.js +4 -0
  127. package/dist/gruvbox-light-medium-BlIhMYTA.js +4 -0
  128. package/dist/gruvbox-light-soft-DoPHyLVZ.js +4 -0
  129. package/dist/hack-dNZDE7CK.js +19 -0
  130. package/dist/haml-CIHYN_l8.js +19 -0
  131. package/dist/handlebars-5wdAGqTJ.js +21 -0
  132. package/dist/haskell-WeIwNIP6.js +6 -0
  133. package/dist/haxe-TztHsm5T.js +6 -0
  134. package/dist/hcl-D438OF-I.js +6 -0
  135. package/dist/hjson-DYBUbqOl.js +6 -0
  136. package/dist/hlsl-Bk8TCZNL.js +6 -0
  137. package/dist/houston-BDYrDoDW.js +4 -0
  138. package/dist/html-derivative-89LwIO26.js +18 -0
  139. package/dist/http-Dsh8rSJR.js +26 -0
  140. package/dist/hurl-NdmqbL7E.js +26 -0
  141. package/dist/hxml-GbqSQCLa.js +8 -0
  142. package/dist/hy-Brt5EZ7-.js +6 -0
  143. package/dist/imba-CimUv-Uh.js +6 -0
  144. package/dist/index-C3mwt8G1.js +67982 -0
  145. package/dist/infoDiagram-WHAUD3N6-DdxAG2VL.js +35 -0
  146. package/dist/ini-BZIuRIvJ.js +6 -0
  147. package/dist/init-DjUOC4st.js +16 -0
  148. package/dist/java-DY6VlHhP.js +6 -0
  149. package/dist/jinja-BuwNoMI4.js +21 -0
  150. package/dist/jison-_q6rTsMi.js +18 -0
  151. package/dist/journeyDiagram-XKPGCS4Q-CT5Fbg6c.js +848 -0
  152. package/dist/json5-BT4Fjg39.js +6 -0
  153. package/dist/jsonc-CHjZD8gR.js +6 -0
  154. package/dist/jsonl-BGuvDmy9.js +6 -0
  155. package/dist/jsonnet-Bx2cfsXg.js +6 -0
  156. package/dist/jssm-BcADi6EI.js +6 -0
  157. package/dist/jsx-BtKADgXT.js +6 -0
  158. package/dist/julia-BCBeSq7V.js +27 -0
  159. package/dist/kanagawa-dragon-CiKur4Hl.js +4 -0
  160. package/dist/kanagawa-lotus-BKu-smKu.js +4 -0
  161. package/dist/kanagawa-wave-CQwozSzG.js +4 -0
  162. package/dist/kanban-definition-3W4ZIXB7-CxtMdkvq.js +732 -0
  163. package/dist/katex.min-l0sNRNKZ.js +1 -0
  164. package/dist/kdl-BNOv9TC3.js +6 -0
  165. package/dist/kotlin-ByBMgTeR.js +6 -0
  166. package/dist/kusto-VWFLl2T0.js +6 -0
  167. package/dist/laserwave-6a00oqik.js +4 -0
  168. package/dist/latex-DF20280u.js +9 -0
  169. package/dist/layout-D2NtTgFh.js +1730 -0
  170. package/dist/lean-D5yRrexI.js +6 -0
  171. package/dist/less-B1GLI2Di.js +6 -0
  172. package/dist/light-plus-CZuVqSLX.js +4 -0
  173. package/dist/linear-sERCAB61.js +277 -0
  174. package/dist/liquid-CFYzC-s7.js +21 -0
  175. package/dist/llvm-co1rIKs3.js +6 -0
  176. package/dist/log-Al8wyEFV.js +6 -0
  177. package/dist/logo-DBa4JDzV.js +6 -0
  178. package/dist/lua-kX5WP_P5.js +8 -0
  179. package/dist/luau-DtBSxLyz.js +6 -0
  180. package/dist/make-CsMclxtr.js +6 -0
  181. package/dist/marko-OTJE9YCh.js +23 -0
  182. package/dist/material-theme-D6KBX41T.js +4 -0
  183. package/dist/material-theme-darker-CkRroheE.js +4 -0
  184. package/dist/material-theme-lighter-BUBw43Yz.js +4 -0
  185. package/dist/material-theme-ocean-ClGX14Ja.js +4 -0
  186. package/dist/material-theme-palenight-C1RVm8K1.js +4 -0
  187. package/dist/matlab-BOAaUVP0.js +6 -0
  188. package/dist/mdc-tFNBAW39.js +21 -0
  189. package/dist/mdx-BOhZZUJ8.js +6 -0
  190. package/dist/mermaid-B0ixDHKN.js +6 -0
  191. package/dist/mermaid-NA5CF7SZ-620UJKEg.js +14 -0
  192. package/dist/mermaid.core-08D5Vldk.js +14401 -0
  193. package/dist/min-dark-C7ak0t6c.js +4 -0
  194. package/dist/min-light-CKFxVcPp.js +4 -0
  195. package/dist/mindmap-definition-VGOIOE7T-CTZ_Wx0b.js +798 -0
  196. package/dist/mipsasm-CTx18fBl.js +6 -0
  197. package/dist/mojo-BD611d7o.js +6 -0
  198. package/dist/monokai-C1KBYcO0.js +4 -0
  199. package/dist/move-F-dICmj2.js +6 -0
  200. package/dist/narrat-DmhDCBs-.js +6 -0
  201. package/dist/nextflow-DmSVRGjG.js +6 -0
  202. package/dist/nginx-COxS3qoU.js +9 -0
  203. package/dist/night-owl-Bm2rzalh.js +4 -0
  204. package/dist/nim-CZHmlxcO.js +28 -0
  205. package/dist/nix-BZK5F767.js +9 -0
  206. package/dist/nord-CC5OiUXg.js +4 -0
  207. package/dist/nushell-D8j3dhT-.js +6 -0
  208. package/dist/objective-c-Itk8tzmv.js +6 -0
  209. package/dist/objective-cpp-DGt5UKRO.js +6 -0
  210. package/dist/ocaml-eSVK32Eg.js +6 -0
  211. package/dist/openscad-Sp5uZ6f2.js +6 -0
  212. package/dist/ordinal-MUacOSdK.js +65 -0
  213. package/dist/pascal-xy8pJNns.js +6 -0
  214. package/dist/perl-CvmtpKyV.js +24 -0
  215. package/dist/php-B1tFq0rn.js +25 -0
  216. package/dist/pieDiagram-ADFJNKIX-DtleX3ES.js +173 -0
  217. package/dist/pkl-C-zSNmaA.js +6 -0
  218. package/dist/plastic-CSTz3KZp.js +4 -0
  219. package/dist/plsql-pVbGZfOv.js +6 -0
  220. package/dist/po-BNfHvqmm.js +6 -0
  221. package/dist/poimandres-C-VADXHD.js +4 -0
  222. package/dist/polar-CAZahv3u.js +6 -0
  223. package/dist/postcss-05aHdL-n.js +6 -0
  224. package/dist/powerquery-DI9HkTvs.js +6 -0
  225. package/dist/powershell-Clc4ydu-.js +6 -0
  226. package/dist/prisma-FZjmVtSl.js +6 -0
  227. package/dist/prolog-C5-yg4TO.js +6 -0
  228. package/dist/proto-MmCPeFAD.js +6 -0
  229. package/dist/pug-xpTstXA9.js +20 -0
  230. package/dist/puppet-CUJHmnxV.js +6 -0
  231. package/dist/purescript-rUfGld-4.js +6 -0
  232. package/dist/qml-G4_KKZym.js +18 -0
  233. package/dist/qmldir-BInDYbpo.js +6 -0
  234. package/dist/qss-AeJTysr_.js +6 -0
  235. package/dist/quadrantDiagram-AYHSOK5B-D193y_DL.js +1038 -0
  236. package/dist/r-Bm0uF0U2.js +6 -0
  237. package/dist/racket-B83wSAja.js +6 -0
  238. package/dist/raku-nEQ4ZJJ7.js +6 -0
  239. package/dist/razor-BS4LwTsw.js +19 -0
  240. package/dist/red-7y8PH7HH.js +4 -0
  241. package/dist/reg-m_s_Kiip.js +6 -0
  242. package/dist/regexp-BazyLpPg.js +6 -0
  243. package/dist/rel-BcRfyd6Q.js +6 -0
  244. package/dist/requirementDiagram-UZGBJVZJ-DcSe-m6d.js +864 -0
  245. package/dist/riscv-Ce8MAQLP.js +6 -0
  246. package/dist/rose-pine-BKc3yVeu.js +4 -0
  247. package/dist/rose-pine-dawn-BulJcPZT.js +4 -0
  248. package/dist/rose-pine-moon-j6jiXKV8.js +4 -0
  249. package/dist/rosmsg-Cz0w1km8.js +6 -0
  250. package/dist/rst-BvkiqG_4.js +39 -0
  251. package/dist/ruby-CSrNBwZK.js +40 -0
  252. package/dist/sankeyDiagram-TZEHDZUN-HpXuokMl.js +838 -0
  253. package/dist/sas-DciBl6hq.js +18 -0
  254. package/dist/sass-DxHp5rTx.js +6 -0
  255. package/dist/scala-D4grkFkl.js +6 -0
  256. package/dist/scheme-BCRWuEm4.js +6 -0
  257. package/dist/scss-Sr5SHsiH.js +18 -0
  258. package/dist/sdbl-B7T8abf4.js +6 -0
  259. package/dist/sequenceDiagram-WL72ISMW-D_5I_YtC.js +2530 -0
  260. package/dist/shaderlab-Cr62-Wb4.js +8 -0
  261. package/dist/shellsession-B0YIY3D-.js +18 -0
  262. package/dist/slack-dark-i7wN4OET.js +4 -0
  263. package/dist/slack-ochin-ndHf0LoP.js +4 -0
  264. package/dist/smalltalk-BlI1_OkM.js +6 -0
  265. package/dist/snazzy-light-BlSJXAu4.js +4 -0
  266. package/dist/solarized-dark-UTmkh7lw.js +4 -0
  267. package/dist/solarized-light-BheCkDPT.js +4 -0
  268. package/dist/solidity-DUWnFhS6.js +6 -0
  269. package/dist/soy-I6L3jl3W.js +18 -0
  270. package/dist/sparql-B0KWFEri.js +8 -0
  271. package/dist/splunk-CRXR8A9s.js +6 -0
  272. package/dist/ssh-config-DP-hNVbF.js +6 -0
  273. package/dist/stata-BNwq7-ev.js +18 -0
  274. package/dist/stateDiagram-FKZM4ZOC-CRSpvNED.js +276 -0
  275. package/dist/stateDiagram-v2-4FDKWEC3-DfUK-Zbc.js +29 -0
  276. package/dist/style.css +1 -1
  277. package/dist/stylus-CyKEU1Ej.js +6 -0
  278. package/dist/svelte-Din0yw3u.js +22 -0
  279. package/dist/swift-9UzSvamq.js +6 -0
  280. package/dist/synthwave-84-NU3C_KFZ.js +4 -0
  281. package/dist/system-verilog-BCm7smPJ.js +6 -0
  282. package/dist/systemd-C-4qm6XH.js +6 -0
  283. package/dist/talonscript-CFF3LF_O.js +6 -0
  284. package/dist/tasl-Cg_WBUAe.js +6 -0
  285. package/dist/tcl-DN7buRTF.js +6 -0
  286. package/dist/templ-CBu7yCES.js +20 -0
  287. package/dist/terraform-DGvcn9zM.js +6 -0
  288. package/dist/tex-DpOayVob.js +8 -0
  289. package/dist/timeline-definition-IT6M3QCI-DaJ4iEOK.js +813 -0
  290. package/dist/tokyo-night-DP4TmcQl.js +4 -0
  291. package/dist/treemap-KMMF4GRG-C3Ab2yjL.js +16045 -0
  292. package/dist/ts-tags-3Kvfz4et.js +49 -0
  293. package/dist/tsv-BtvSkaG0.js +6 -0
  294. package/dist/tsx-B8rCNbgL.js +6 -0
  295. package/dist/turtle-_H59FV7D.js +6 -0
  296. package/dist/twig-3l_q-6xZ.js +37 -0
  297. package/dist/typespec-DWqp-kUU.js +6 -0
  298. package/dist/typst-D_1QKWns.js +6 -0
  299. package/dist/v-BPCNiyYe.js +6 -0
  300. package/dist/vala-uxaPR7d1.js +6 -0
  301. package/dist/vb-D8_c5-KN.js +6 -0
  302. package/dist/verilog-B-bybjPF.js +6 -0
  303. package/dist/vesper-BckBta1U.js +4 -0
  304. package/dist/vhdl-CUlNa8ac.js +6 -0
  305. package/dist/viml-DsfA-sWm.js +6 -0
  306. package/dist/vitesse-black-BoGvW84i.js +4 -0
  307. package/dist/vitesse-dark-Cym-eLtO.js +4 -0
  308. package/dist/vitesse-light-CcmG315c.js +4 -0
  309. package/dist/vue-BuFQ04-G.js +37 -0
  310. package/dist/vue-html-CyxHqgfT.js +21 -0
  311. package/dist/vue-vine-B_YNGutq.js +30 -0
  312. package/dist/vyper-CPQuu50u.js +6 -0
  313. package/dist/wasm-BBXxrAl7.js +6 -0
  314. package/dist/wasm-DQxwEHae.js +7 -0
  315. package/dist/wenyan-pbVjoM9_.js +6 -0
  316. package/dist/wgsl-DY4iK1q1.js +6 -0
  317. package/dist/wikitext-Z-MoUasO.js +6 -0
  318. package/dist/wit-CQMQOlTg.js +6 -0
  319. package/dist/wolfram-Dz4KXISs.js +6 -0
  320. package/dist/xml-C2J0sS9M.js +8 -0
  321. package/dist/xsl-CbTBIiv3.js +9 -0
  322. package/dist/xychartDiagram-PRI3JC2R-Cf2smXg5.js +1353 -0
  323. package/dist/zenscript-CxBjpf9c.js +6 -0
  324. package/dist/zig-Vm0PO9wB.js +6 -0
  325. package/package.json +25 -25
@@ -0,0 +1,838 @@
1
+ import { p as _t, q as xt, s as vt, g as bt, b as wt, a as St, _ as g, c as lt, z as Lt, d as H, V as Et, y as At, k as Tt } from "./mermaid.core-08D5Vldk.js";
2
+ import { o as Mt } from "./ordinal-MUacOSdK.js";
3
+ import "./index-C3mwt8G1.js";
4
+ import "react/jsx-runtime";
5
+ import "react";
6
+ import "class-variance-authority";
7
+ import "clsx";
8
+ import "tailwind-merge";
9
+ import "react-dom";
10
+ import "cmdk";
11
+ import "nanoid";
12
+ import "@foris/avocado-icons";
13
+ import "react-markdown";
14
+ import "./init-DjUOC4st.js";
15
+ function Nt(t) {
16
+ for (var e = t.length / 6 | 0, i = new Array(e), a = 0; a < e; )
17
+ i[a] = "#" + t.slice(a * 6, ++a * 6);
18
+ return i;
19
+ }
20
+ const It = Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");
21
+ function ct(t, e) {
22
+ let i;
23
+ if (e === void 0)
24
+ for (const a of t)
25
+ a != null && (i < a || i === void 0 && a >= a) && (i = a);
26
+ else {
27
+ let a = -1;
28
+ for (let h of t)
29
+ (h = e(h, ++a, t)) != null && (i < h || i === void 0 && h >= h) && (i = h);
30
+ }
31
+ return i;
32
+ }
33
+ function gt(t, e) {
34
+ let i;
35
+ if (e === void 0)
36
+ for (const a of t)
37
+ a != null && (i > a || i === void 0 && a >= a) && (i = a);
38
+ else {
39
+ let a = -1;
40
+ for (let h of t)
41
+ (h = e(h, ++a, t)) != null && (i > h || i === void 0 && h >= h) && (i = h);
42
+ }
43
+ return i;
44
+ }
45
+ function nt(t, e) {
46
+ let i = 0;
47
+ if (e === void 0)
48
+ for (let a of t)
49
+ (a = +a) && (i += a);
50
+ else {
51
+ let a = -1;
52
+ for (let h of t)
53
+ (h = +e(h, ++a, t)) && (i += h);
54
+ }
55
+ return i;
56
+ }
57
+ function Pt(t) {
58
+ return t.target.depth;
59
+ }
60
+ function Ct(t) {
61
+ return t.depth;
62
+ }
63
+ function Ot(t, e) {
64
+ return e - 1 - t.height;
65
+ }
66
+ function mt(t, e) {
67
+ return t.sourceLinks.length ? t.depth : e - 1;
68
+ }
69
+ function zt(t) {
70
+ return t.targetLinks.length ? t.depth : t.sourceLinks.length ? gt(t.sourceLinks, Pt) - 1 : 0;
71
+ }
72
+ function X(t) {
73
+ return function() {
74
+ return t;
75
+ };
76
+ }
77
+ function ut(t, e) {
78
+ return Q(t.source, e.source) || t.index - e.index;
79
+ }
80
+ function ht(t, e) {
81
+ return Q(t.target, e.target) || t.index - e.index;
82
+ }
83
+ function Q(t, e) {
84
+ return t.y0 - e.y0;
85
+ }
86
+ function it(t) {
87
+ return t.value;
88
+ }
89
+ function Dt(t) {
90
+ return t.index;
91
+ }
92
+ function $t(t) {
93
+ return t.nodes;
94
+ }
95
+ function jt(t) {
96
+ return t.links;
97
+ }
98
+ function ft(t, e) {
99
+ const i = t.get(e);
100
+ if (!i)
101
+ throw new Error("missing: " + e);
102
+ return i;
103
+ }
104
+ function yt({ nodes: t }) {
105
+ for (const e of t) {
106
+ let i = e.y0, a = i;
107
+ for (const h of e.sourceLinks)
108
+ h.y0 = i + h.width / 2, i += h.width;
109
+ for (const h of e.targetLinks)
110
+ h.y1 = a + h.width / 2, a += h.width;
111
+ }
112
+ }
113
+ function Bt() {
114
+ let t = 0, e = 0, i = 1, a = 1, h = 24, d = 8, m, _ = Dt, r = mt, o, l, x = $t, v = jt, y = 6;
115
+ function b() {
116
+ const n = { nodes: x.apply(null, arguments), links: v.apply(null, arguments) };
117
+ return M(n), T(n), N(n), C(n), S(n), yt(n), n;
118
+ }
119
+ b.update = function(n) {
120
+ return yt(n), n;
121
+ }, b.nodeId = function(n) {
122
+ return arguments.length ? (_ = typeof n == "function" ? n : X(n), b) : _;
123
+ }, b.nodeAlign = function(n) {
124
+ return arguments.length ? (r = typeof n == "function" ? n : X(n), b) : r;
125
+ }, b.nodeSort = function(n) {
126
+ return arguments.length ? (o = n, b) : o;
127
+ }, b.nodeWidth = function(n) {
128
+ return arguments.length ? (h = +n, b) : h;
129
+ }, b.nodePadding = function(n) {
130
+ return arguments.length ? (d = m = +n, b) : d;
131
+ }, b.nodes = function(n) {
132
+ return arguments.length ? (x = typeof n == "function" ? n : X(n), b) : x;
133
+ }, b.links = function(n) {
134
+ return arguments.length ? (v = typeof n == "function" ? n : X(n), b) : v;
135
+ }, b.linkSort = function(n) {
136
+ return arguments.length ? (l = n, b) : l;
137
+ }, b.size = function(n) {
138
+ return arguments.length ? (t = e = 0, i = +n[0], a = +n[1], b) : [i - t, a - e];
139
+ }, b.extent = function(n) {
140
+ return arguments.length ? (t = +n[0][0], i = +n[1][0], e = +n[0][1], a = +n[1][1], b) : [[t, e], [i, a]];
141
+ }, b.iterations = function(n) {
142
+ return arguments.length ? (y = +n, b) : y;
143
+ };
144
+ function M({ nodes: n, links: f }) {
145
+ for (const [c, s] of n.entries())
146
+ s.index = c, s.sourceLinks = [], s.targetLinks = [];
147
+ const u = new Map(n.map((c, s) => [_(c, s, n), c]));
148
+ for (const [c, s] of f.entries()) {
149
+ s.index = c;
150
+ let { source: k, target: w } = s;
151
+ typeof k != "object" && (k = s.source = ft(u, k)), typeof w != "object" && (w = s.target = ft(u, w)), k.sourceLinks.push(s), w.targetLinks.push(s);
152
+ }
153
+ if (l != null)
154
+ for (const { sourceLinks: c, targetLinks: s } of n)
155
+ c.sort(l), s.sort(l);
156
+ }
157
+ function T({ nodes: n }) {
158
+ for (const f of n)
159
+ f.value = f.fixedValue === void 0 ? Math.max(nt(f.sourceLinks, it), nt(f.targetLinks, it)) : f.fixedValue;
160
+ }
161
+ function N({ nodes: n }) {
162
+ const f = n.length;
163
+ let u = new Set(n), c = /* @__PURE__ */ new Set(), s = 0;
164
+ for (; u.size; ) {
165
+ for (const k of u) {
166
+ k.depth = s;
167
+ for (const { target: w } of k.sourceLinks)
168
+ c.add(w);
169
+ }
170
+ if (++s > f)
171
+ throw new Error("circular link");
172
+ u = c, c = /* @__PURE__ */ new Set();
173
+ }
174
+ }
175
+ function C({ nodes: n }) {
176
+ const f = n.length;
177
+ let u = new Set(n), c = /* @__PURE__ */ new Set(), s = 0;
178
+ for (; u.size; ) {
179
+ for (const k of u) {
180
+ k.height = s;
181
+ for (const { source: w } of k.targetLinks)
182
+ c.add(w);
183
+ }
184
+ if (++s > f)
185
+ throw new Error("circular link");
186
+ u = c, c = /* @__PURE__ */ new Set();
187
+ }
188
+ }
189
+ function D({ nodes: n }) {
190
+ const f = ct(n, (s) => s.depth) + 1, u = (i - t - h) / (f - 1), c = new Array(f);
191
+ for (const s of n) {
192
+ const k = Math.max(0, Math.min(f - 1, Math.floor(r.call(null, s, f))));
193
+ s.layer = k, s.x0 = t + k * u, s.x1 = s.x0 + h, c[k] ? c[k].push(s) : c[k] = [s];
194
+ }
195
+ if (o)
196
+ for (const s of c)
197
+ s.sort(o);
198
+ return c;
199
+ }
200
+ function R(n) {
201
+ const f = gt(n, (u) => (a - e - (u.length - 1) * m) / nt(u, it));
202
+ for (const u of n) {
203
+ let c = e;
204
+ for (const s of u) {
205
+ s.y0 = c, s.y1 = c + s.value * f, c = s.y1 + m;
206
+ for (const k of s.sourceLinks)
207
+ k.width = k.value * f;
208
+ }
209
+ c = (a - c + m) / (u.length + 1);
210
+ for (let s = 0; s < u.length; ++s) {
211
+ const k = u[s];
212
+ k.y0 += c * (s + 1), k.y1 += c * (s + 1);
213
+ }
214
+ A(u);
215
+ }
216
+ }
217
+ function S(n) {
218
+ const f = D(n);
219
+ m = Math.min(d, (a - e) / (ct(f, (u) => u.length) - 1)), R(f);
220
+ for (let u = 0; u < y; ++u) {
221
+ const c = Math.pow(0.99, u), s = Math.max(1 - c, (u + 1) / y);
222
+ j(f, c, s), P(f, c, s);
223
+ }
224
+ }
225
+ function P(n, f, u) {
226
+ for (let c = 1, s = n.length; c < s; ++c) {
227
+ const k = n[c];
228
+ for (const w of k) {
229
+ let L = 0, V = 0;
230
+ for (const { source: U, value: et } of w.targetLinks) {
231
+ let G = et * (w.layer - U.layer);
232
+ L += $(U, w) * G, V += G;
233
+ }
234
+ if (!(V > 0))
235
+ continue;
236
+ let W = (L / V - w.y0) * f;
237
+ w.y0 += W, w.y1 += W, E(w);
238
+ }
239
+ o === void 0 && k.sort(Q), O(k, u);
240
+ }
241
+ }
242
+ function j(n, f, u) {
243
+ for (let c = n.length, s = c - 2; s >= 0; --s) {
244
+ const k = n[s];
245
+ for (const w of k) {
246
+ let L = 0, V = 0;
247
+ for (const { target: U, value: et } of w.sourceLinks) {
248
+ let G = et * (U.layer - w.layer);
249
+ L += I(w, U) * G, V += G;
250
+ }
251
+ if (!(V > 0))
252
+ continue;
253
+ let W = (L / V - w.y0) * f;
254
+ w.y0 += W, w.y1 += W, E(w);
255
+ }
256
+ o === void 0 && k.sort(Q), O(k, u);
257
+ }
258
+ }
259
+ function O(n, f) {
260
+ const u = n.length >> 1, c = n[u];
261
+ p(n, c.y0 - m, u - 1, f), z(n, c.y1 + m, u + 1, f), p(n, a, n.length - 1, f), z(n, e, 0, f);
262
+ }
263
+ function z(n, f, u, c) {
264
+ for (; u < n.length; ++u) {
265
+ const s = n[u], k = (f - s.y0) * c;
266
+ k > 1e-6 && (s.y0 += k, s.y1 += k), f = s.y1 + m;
267
+ }
268
+ }
269
+ function p(n, f, u, c) {
270
+ for (; u >= 0; --u) {
271
+ const s = n[u], k = (s.y1 - f) * c;
272
+ k > 1e-6 && (s.y0 -= k, s.y1 -= k), f = s.y0 - m;
273
+ }
274
+ }
275
+ function E({ sourceLinks: n, targetLinks: f }) {
276
+ if (l === void 0) {
277
+ for (const { source: { sourceLinks: u } } of f)
278
+ u.sort(ht);
279
+ for (const { target: { targetLinks: u } } of n)
280
+ u.sort(ut);
281
+ }
282
+ }
283
+ function A(n) {
284
+ if (l === void 0)
285
+ for (const { sourceLinks: f, targetLinks: u } of n)
286
+ f.sort(ht), u.sort(ut);
287
+ }
288
+ function $(n, f) {
289
+ let u = n.y0 - (n.sourceLinks.length - 1) * m / 2;
290
+ for (const { target: c, width: s } of n.sourceLinks) {
291
+ if (c === f)
292
+ break;
293
+ u += s + m;
294
+ }
295
+ for (const { source: c, width: s } of f.targetLinks) {
296
+ if (c === n)
297
+ break;
298
+ u -= s;
299
+ }
300
+ return u;
301
+ }
302
+ function I(n, f) {
303
+ let u = f.y0 - (f.targetLinks.length - 1) * m / 2;
304
+ for (const { source: c, width: s } of f.targetLinks) {
305
+ if (c === n)
306
+ break;
307
+ u += s + m;
308
+ }
309
+ for (const { target: c, width: s } of n.sourceLinks) {
310
+ if (c === f)
311
+ break;
312
+ u -= s;
313
+ }
314
+ return u;
315
+ }
316
+ return b;
317
+ }
318
+ var rt = Math.PI, st = 2 * rt, F = 1e-6, Rt = st - F;
319
+ function ot() {
320
+ this._x0 = this._y0 = // start of current subpath
321
+ this._x1 = this._y1 = null, this._ = "";
322
+ }
323
+ function kt() {
324
+ return new ot();
325
+ }
326
+ ot.prototype = kt.prototype = {
327
+ constructor: ot,
328
+ moveTo: function(t, e) {
329
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +e);
330
+ },
331
+ closePath: function() {
332
+ this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
333
+ },
334
+ lineTo: function(t, e) {
335
+ this._ += "L" + (this._x1 = +t) + "," + (this._y1 = +e);
336
+ },
337
+ quadraticCurveTo: function(t, e, i, a) {
338
+ this._ += "Q" + +t + "," + +e + "," + (this._x1 = +i) + "," + (this._y1 = +a);
339
+ },
340
+ bezierCurveTo: function(t, e, i, a, h, d) {
341
+ this._ += "C" + +t + "," + +e + "," + +i + "," + +a + "," + (this._x1 = +h) + "," + (this._y1 = +d);
342
+ },
343
+ arcTo: function(t, e, i, a, h) {
344
+ t = +t, e = +e, i = +i, a = +a, h = +h;
345
+ var d = this._x1, m = this._y1, _ = i - t, r = a - e, o = d - t, l = m - e, x = o * o + l * l;
346
+ if (h < 0)
347
+ throw new Error("negative radius: " + h);
348
+ if (this._x1 === null)
349
+ this._ += "M" + (this._x1 = t) + "," + (this._y1 = e);
350
+ else if (x > F)
351
+ if (!(Math.abs(l * _ - r * o) > F) || !h)
352
+ this._ += "L" + (this._x1 = t) + "," + (this._y1 = e);
353
+ else {
354
+ var v = i - d, y = a - m, b = _ * _ + r * r, M = v * v + y * y, T = Math.sqrt(b), N = Math.sqrt(x), C = h * Math.tan((rt - Math.acos((b + x - M) / (2 * T * N))) / 2), D = C / N, R = C / T;
355
+ Math.abs(D - 1) > F && (this._ += "L" + (t + D * o) + "," + (e + D * l)), this._ += "A" + h + "," + h + ",0,0," + +(l * v > o * y) + "," + (this._x1 = t + R * _) + "," + (this._y1 = e + R * r);
356
+ }
357
+ },
358
+ arc: function(t, e, i, a, h, d) {
359
+ t = +t, e = +e, i = +i, d = !!d;
360
+ var m = i * Math.cos(a), _ = i * Math.sin(a), r = t + m, o = e + _, l = 1 ^ d, x = d ? a - h : h - a;
361
+ if (i < 0)
362
+ throw new Error("negative radius: " + i);
363
+ this._x1 === null ? this._ += "M" + r + "," + o : (Math.abs(this._x1 - r) > F || Math.abs(this._y1 - o) > F) && (this._ += "L" + r + "," + o), i && (x < 0 && (x = x % st + st), x > Rt ? this._ += "A" + i + "," + i + ",0,1," + l + "," + (t - m) + "," + (e - _) + "A" + i + "," + i + ",0,1," + l + "," + (this._x1 = r) + "," + (this._y1 = o) : x > F && (this._ += "A" + i + "," + i + ",0," + +(x >= rt) + "," + l + "," + (this._x1 = t + i * Math.cos(h)) + "," + (this._y1 = e + i * Math.sin(h))));
364
+ },
365
+ rect: function(t, e, i, a) {
366
+ this._ += "M" + (this._x0 = this._x1 = +t) + "," + (this._y0 = this._y1 = +e) + "h" + +i + "v" + +a + "h" + -i + "Z";
367
+ },
368
+ toString: function() {
369
+ return this._;
370
+ }
371
+ };
372
+ function dt(t) {
373
+ return function() {
374
+ return t;
375
+ };
376
+ }
377
+ function Vt(t) {
378
+ return t[0];
379
+ }
380
+ function Ft(t) {
381
+ return t[1];
382
+ }
383
+ var Wt = Array.prototype.slice;
384
+ function Ut(t) {
385
+ return t.source;
386
+ }
387
+ function Gt(t) {
388
+ return t.target;
389
+ }
390
+ function Yt(t) {
391
+ var e = Ut, i = Gt, a = Vt, h = Ft, d = null;
392
+ function m() {
393
+ var _, r = Wt.call(arguments), o = e.apply(this, r), l = i.apply(this, r);
394
+ if (d || (d = _ = kt()), t(d, +a.apply(this, (r[0] = o, r)), +h.apply(this, r), +a.apply(this, (r[0] = l, r)), +h.apply(this, r)), _)
395
+ return d = null, _ + "" || null;
396
+ }
397
+ return m.source = function(_) {
398
+ return arguments.length ? (e = _, m) : e;
399
+ }, m.target = function(_) {
400
+ return arguments.length ? (i = _, m) : i;
401
+ }, m.x = function(_) {
402
+ return arguments.length ? (a = typeof _ == "function" ? _ : dt(+_), m) : a;
403
+ }, m.y = function(_) {
404
+ return arguments.length ? (h = typeof _ == "function" ? _ : dt(+_), m) : h;
405
+ }, m.context = function(_) {
406
+ return arguments.length ? (d = _ ?? null, m) : d;
407
+ }, m;
408
+ }
409
+ function qt(t, e, i, a, h) {
410
+ t.moveTo(e, i), t.bezierCurveTo(e = (e + a) / 2, i, e, h, a, h);
411
+ }
412
+ function Ht() {
413
+ return Yt(qt);
414
+ }
415
+ function Xt(t) {
416
+ return [t.source.x1, t.y0];
417
+ }
418
+ function Qt(t) {
419
+ return [t.target.x0, t.y1];
420
+ }
421
+ function Kt() {
422
+ return Ht().source(Xt).target(Qt);
423
+ }
424
+ var at = function() {
425
+ var t = /* @__PURE__ */ g(function(_, r, o, l) {
426
+ for (o = o || {}, l = _.length; l--; o[_[l]] = r)
427
+ ;
428
+ return o;
429
+ }, "o"), e = [1, 9], i = [1, 10], a = [1, 5, 10, 12], h = {
430
+ trace: /* @__PURE__ */ g(function() {
431
+ }, "trace"),
432
+ yy: {},
433
+ symbols_: { error: 2, start: 3, SANKEY: 4, NEWLINE: 5, csv: 6, opt_eof: 7, record: 8, csv_tail: 9, EOF: 10, "field[source]": 11, COMMA: 12, "field[target]": 13, "field[value]": 14, field: 15, escaped: 16, non_escaped: 17, DQUOTE: 18, ESCAPED_TEXT: 19, NON_ESCAPED_TEXT: 20, $accept: 0, $end: 1 },
434
+ terminals_: { 2: "error", 4: "SANKEY", 5: "NEWLINE", 10: "EOF", 11: "field[source]", 12: "COMMA", 13: "field[target]", 14: "field[value]", 18: "DQUOTE", 19: "ESCAPED_TEXT", 20: "NON_ESCAPED_TEXT" },
435
+ productions_: [0, [3, 4], [6, 2], [9, 2], [9, 0], [7, 1], [7, 0], [8, 5], [15, 1], [15, 1], [16, 3], [17, 1]],
436
+ performAction: /* @__PURE__ */ g(function(r, o, l, x, v, y, b) {
437
+ var M = y.length - 1;
438
+ switch (v) {
439
+ case 7:
440
+ const T = x.findOrCreateNode(y[M - 4].trim().replaceAll('""', '"')), N = x.findOrCreateNode(y[M - 2].trim().replaceAll('""', '"')), C = parseFloat(y[M].trim());
441
+ x.addLink(T, N, C);
442
+ break;
443
+ case 8:
444
+ case 9:
445
+ case 11:
446
+ this.$ = y[M];
447
+ break;
448
+ case 10:
449
+ this.$ = y[M - 1];
450
+ break;
451
+ }
452
+ }, "anonymous"),
453
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, { 5: [1, 3] }, { 6: 4, 8: 5, 15: 6, 16: 7, 17: 8, 18: e, 20: i }, { 1: [2, 6], 7: 11, 10: [1, 12] }, t(i, [2, 4], { 9: 13, 5: [1, 14] }), { 12: [1, 15] }, t(a, [2, 8]), t(a, [2, 9]), { 19: [1, 16] }, t(a, [2, 11]), { 1: [2, 1] }, { 1: [2, 5] }, t(i, [2, 2]), { 6: 17, 8: 5, 15: 6, 16: 7, 17: 8, 18: e, 20: i }, { 15: 18, 16: 7, 17: 8, 18: e, 20: i }, { 18: [1, 19] }, t(i, [2, 3]), { 12: [1, 20] }, t(a, [2, 10]), { 15: 21, 16: 7, 17: 8, 18: e, 20: i }, t([1, 5, 10], [2, 7])],
454
+ defaultActions: { 11: [2, 1], 12: [2, 5] },
455
+ parseError: /* @__PURE__ */ g(function(r, o) {
456
+ if (o.recoverable)
457
+ this.trace(r);
458
+ else {
459
+ var l = new Error(r);
460
+ throw l.hash = o, l;
461
+ }
462
+ }, "parseError"),
463
+ parse: /* @__PURE__ */ g(function(r) {
464
+ var o = this, l = [0], x = [], v = [null], y = [], b = this.table, M = "", T = 0, N = 0, C = 2, D = 1, R = y.slice.call(arguments, 1), S = Object.create(this.lexer), P = { yy: {} };
465
+ for (var j in this.yy)
466
+ Object.prototype.hasOwnProperty.call(this.yy, j) && (P.yy[j] = this.yy[j]);
467
+ S.setInput(r, P.yy), P.yy.lexer = S, P.yy.parser = this, typeof S.yylloc > "u" && (S.yylloc = {});
468
+ var O = S.yylloc;
469
+ y.push(O);
470
+ var z = S.options && S.options.ranges;
471
+ typeof P.yy.parseError == "function" ? this.parseError = P.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
472
+ function p(L) {
473
+ l.length = l.length - 2 * L, v.length = v.length - L, y.length = y.length - L;
474
+ }
475
+ g(p, "popStack");
476
+ function E() {
477
+ var L;
478
+ return L = x.pop() || S.lex() || D, typeof L != "number" && (L instanceof Array && (x = L, L = x.pop()), L = o.symbols_[L] || L), L;
479
+ }
480
+ g(E, "lex");
481
+ for (var A, $, I, n, f = {}, u, c, s, k; ; ) {
482
+ if ($ = l[l.length - 1], this.defaultActions[$] ? I = this.defaultActions[$] : ((A === null || typeof A > "u") && (A = E()), I = b[$] && b[$][A]), typeof I > "u" || !I.length || !I[0]) {
483
+ var w = "";
484
+ k = [];
485
+ for (u in b[$])
486
+ this.terminals_[u] && u > C && k.push("'" + this.terminals_[u] + "'");
487
+ S.showPosition ? w = "Parse error on line " + (T + 1) + `:
488
+ ` + S.showPosition() + `
489
+ Expecting ` + k.join(", ") + ", got '" + (this.terminals_[A] || A) + "'" : w = "Parse error on line " + (T + 1) + ": Unexpected " + (A == D ? "end of input" : "'" + (this.terminals_[A] || A) + "'"), this.parseError(w, {
490
+ text: S.match,
491
+ token: this.terminals_[A] || A,
492
+ line: S.yylineno,
493
+ loc: O,
494
+ expected: k
495
+ });
496
+ }
497
+ if (I[0] instanceof Array && I.length > 1)
498
+ throw new Error("Parse Error: multiple actions possible at state: " + $ + ", token: " + A);
499
+ switch (I[0]) {
500
+ case 1:
501
+ l.push(A), v.push(S.yytext), y.push(S.yylloc), l.push(I[1]), A = null, N = S.yyleng, M = S.yytext, T = S.yylineno, O = S.yylloc;
502
+ break;
503
+ case 2:
504
+ if (c = this.productions_[I[1]][1], f.$ = v[v.length - c], f._$ = {
505
+ first_line: y[y.length - (c || 1)].first_line,
506
+ last_line: y[y.length - 1].last_line,
507
+ first_column: y[y.length - (c || 1)].first_column,
508
+ last_column: y[y.length - 1].last_column
509
+ }, z && (f._$.range = [
510
+ y[y.length - (c || 1)].range[0],
511
+ y[y.length - 1].range[1]
512
+ ]), n = this.performAction.apply(f, [
513
+ M,
514
+ N,
515
+ T,
516
+ P.yy,
517
+ I[1],
518
+ v,
519
+ y
520
+ ].concat(R)), typeof n < "u")
521
+ return n;
522
+ c && (l = l.slice(0, -1 * c * 2), v = v.slice(0, -1 * c), y = y.slice(0, -1 * c)), l.push(this.productions_[I[1]][0]), v.push(f.$), y.push(f._$), s = b[l[l.length - 2]][l[l.length - 1]], l.push(s);
523
+ break;
524
+ case 3:
525
+ return !0;
526
+ }
527
+ }
528
+ return !0;
529
+ }, "parse")
530
+ }, d = /* @__PURE__ */ function() {
531
+ var _ = {
532
+ EOF: 1,
533
+ parseError: /* @__PURE__ */ g(function(o, l) {
534
+ if (this.yy.parser)
535
+ this.yy.parser.parseError(o, l);
536
+ else
537
+ throw new Error(o);
538
+ }, "parseError"),
539
+ // resets the lexer, sets new input
540
+ setInput: /* @__PURE__ */ g(function(r, o) {
541
+ return this.yy = o || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
542
+ first_line: 1,
543
+ first_column: 0,
544
+ last_line: 1,
545
+ last_column: 0
546
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
547
+ }, "setInput"),
548
+ // consumes and returns one char from the input
549
+ input: /* @__PURE__ */ g(function() {
550
+ var r = this._input[0];
551
+ this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
552
+ var o = r.match(/(?:\r\n?|\n).*/g);
553
+ return o ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r;
554
+ }, "input"),
555
+ // unshifts one char (or a string) into the input
556
+ unput: /* @__PURE__ */ g(function(r) {
557
+ var o = r.length, l = r.split(/(?:\r\n?|\n)/g);
558
+ this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - o), this.offset -= o;
559
+ var x = this.match.split(/(?:\r\n?|\n)/g);
560
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
561
+ var v = this.yylloc.range;
562
+ return this.yylloc = {
563
+ first_line: this.yylloc.first_line,
564
+ last_line: this.yylineno + 1,
565
+ first_column: this.yylloc.first_column,
566
+ last_column: l ? (l.length === x.length ? this.yylloc.first_column : 0) + x[x.length - l.length].length - l[0].length : this.yylloc.first_column - o
567
+ }, this.options.ranges && (this.yylloc.range = [v[0], v[0] + this.yyleng - o]), this.yyleng = this.yytext.length, this;
568
+ }, "unput"),
569
+ // When called from action, caches matched text and appends it on next action
570
+ more: /* @__PURE__ */ g(function() {
571
+ return this._more = !0, this;
572
+ }, "more"),
573
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
574
+ reject: /* @__PURE__ */ g(function() {
575
+ if (this.options.backtrack_lexer)
576
+ this._backtrack = !0;
577
+ else
578
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
579
+ ` + this.showPosition(), {
580
+ text: "",
581
+ token: null,
582
+ line: this.yylineno
583
+ });
584
+ return this;
585
+ }, "reject"),
586
+ // retain first n characters of the match
587
+ less: /* @__PURE__ */ g(function(r) {
588
+ this.unput(this.match.slice(r));
589
+ }, "less"),
590
+ // displays already matched input, i.e. for error messages
591
+ pastInput: /* @__PURE__ */ g(function() {
592
+ var r = this.matched.substr(0, this.matched.length - this.match.length);
593
+ return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
594
+ }, "pastInput"),
595
+ // displays upcoming input, i.e. for error messages
596
+ upcomingInput: /* @__PURE__ */ g(function() {
597
+ var r = this.match;
598
+ return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
599
+ }, "upcomingInput"),
600
+ // displays the character position where the lexing error occurred, i.e. for error messages
601
+ showPosition: /* @__PURE__ */ g(function() {
602
+ var r = this.pastInput(), o = new Array(r.length + 1).join("-");
603
+ return r + this.upcomingInput() + `
604
+ ` + o + "^";
605
+ }, "showPosition"),
606
+ // test the lexed token: return FALSE when not a match, otherwise return token
607
+ test_match: /* @__PURE__ */ g(function(r, o) {
608
+ var l, x, v;
609
+ if (this.options.backtrack_lexer && (v = {
610
+ yylineno: this.yylineno,
611
+ yylloc: {
612
+ first_line: this.yylloc.first_line,
613
+ last_line: this.last_line,
614
+ first_column: this.yylloc.first_column,
615
+ last_column: this.yylloc.last_column
616
+ },
617
+ yytext: this.yytext,
618
+ match: this.match,
619
+ matches: this.matches,
620
+ matched: this.matched,
621
+ yyleng: this.yyleng,
622
+ offset: this.offset,
623
+ _more: this._more,
624
+ _input: this._input,
625
+ yy: this.yy,
626
+ conditionStack: this.conditionStack.slice(0),
627
+ done: this.done
628
+ }, this.options.ranges && (v.yylloc.range = this.yylloc.range.slice(0))), x = r[0].match(/(?:\r\n?|\n).*/g), x && (this.yylineno += x.length), this.yylloc = {
629
+ first_line: this.yylloc.last_line,
630
+ last_line: this.yylineno + 1,
631
+ first_column: this.yylloc.last_column,
632
+ last_column: x ? x[x.length - 1].length - x[x.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
633
+ }, this.yytext += r[0], this.match += r[0], this.matches = r, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(r[0].length), this.matched += r[0], l = this.performAction.call(this, this.yy, this, o, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
634
+ return l;
635
+ if (this._backtrack) {
636
+ for (var y in v)
637
+ this[y] = v[y];
638
+ return !1;
639
+ }
640
+ return !1;
641
+ }, "test_match"),
642
+ // return next match in input
643
+ next: /* @__PURE__ */ g(function() {
644
+ if (this.done)
645
+ return this.EOF;
646
+ this._input || (this.done = !0);
647
+ var r, o, l, x;
648
+ this._more || (this.yytext = "", this.match = "");
649
+ for (var v = this._currentRules(), y = 0; y < v.length; y++)
650
+ if (l = this._input.match(this.rules[v[y]]), l && (!o || l[0].length > o[0].length)) {
651
+ if (o = l, x = y, this.options.backtrack_lexer) {
652
+ if (r = this.test_match(l, v[y]), r !== !1)
653
+ return r;
654
+ if (this._backtrack) {
655
+ o = !1;
656
+ continue;
657
+ } else
658
+ return !1;
659
+ } else if (!this.options.flex)
660
+ break;
661
+ }
662
+ return o ? (r = this.test_match(o, v[x]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
663
+ ` + this.showPosition(), {
664
+ text: "",
665
+ token: null,
666
+ line: this.yylineno
667
+ });
668
+ }, "next"),
669
+ // return next match that has a token
670
+ lex: /* @__PURE__ */ g(function() {
671
+ var o = this.next();
672
+ return o || this.lex();
673
+ }, "lex"),
674
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
675
+ begin: /* @__PURE__ */ g(function(o) {
676
+ this.conditionStack.push(o);
677
+ }, "begin"),
678
+ // pop the previously active lexer condition state off the condition stack
679
+ popState: /* @__PURE__ */ g(function() {
680
+ var o = this.conditionStack.length - 1;
681
+ return o > 0 ? this.conditionStack.pop() : this.conditionStack[0];
682
+ }, "popState"),
683
+ // produce the lexer rule set which is active for the currently active lexer condition state
684
+ _currentRules: /* @__PURE__ */ g(function() {
685
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
686
+ }, "_currentRules"),
687
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
688
+ topState: /* @__PURE__ */ g(function(o) {
689
+ return o = this.conditionStack.length - 1 - Math.abs(o || 0), o >= 0 ? this.conditionStack[o] : "INITIAL";
690
+ }, "topState"),
691
+ // alias for begin(condition)
692
+ pushState: /* @__PURE__ */ g(function(o) {
693
+ this.begin(o);
694
+ }, "pushState"),
695
+ // return the number of states currently on the stack
696
+ stateStackSize: /* @__PURE__ */ g(function() {
697
+ return this.conditionStack.length;
698
+ }, "stateStackSize"),
699
+ options: { "case-insensitive": !0 },
700
+ performAction: /* @__PURE__ */ g(function(o, l, x, v) {
701
+ switch (x) {
702
+ case 0:
703
+ return this.pushState("csv"), 4;
704
+ case 1:
705
+ return this.pushState("csv"), 4;
706
+ case 2:
707
+ return 10;
708
+ case 3:
709
+ return 5;
710
+ case 4:
711
+ return 12;
712
+ case 5:
713
+ return this.pushState("escaped_text"), 18;
714
+ case 6:
715
+ return 20;
716
+ case 7:
717
+ return this.popState("escaped_text"), 18;
718
+ case 8:
719
+ return 19;
720
+ }
721
+ }, "anonymous"),
722
+ rules: [/^(?:sankey-beta\b)/i, /^(?:sankey\b)/i, /^(?:$)/i, /^(?:((\u000D\u000A)|(\u000A)))/i, /^(?:(\u002C))/i, /^(?:(\u0022))/i, /^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i, /^(?:(\u0022)(?!(\u0022)))/i, /^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],
723
+ conditions: { csv: { rules: [2, 3, 4, 5, 6, 7, 8], inclusive: !1 }, escaped_text: { rules: [7, 8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8], inclusive: !0 } }
724
+ };
725
+ return _;
726
+ }();
727
+ h.lexer = d;
728
+ function m() {
729
+ this.yy = {};
730
+ }
731
+ return g(m, "Parser"), m.prototype = h, h.Parser = m, new m();
732
+ }();
733
+ at.parser = at;
734
+ var K = at, J = [], tt = [], Z = /* @__PURE__ */ new Map(), Zt = /* @__PURE__ */ g(() => {
735
+ J = [], tt = [], Z = /* @__PURE__ */ new Map(), At();
736
+ }, "clear"), Y, Jt = (Y = class {
737
+ constructor(e, i, a = 0) {
738
+ this.source = e, this.target = i, this.value = a;
739
+ }
740
+ }, g(Y, "SankeyLink"), Y), te = /* @__PURE__ */ g((t, e, i) => {
741
+ J.push(new Jt(t, e, i));
742
+ }, "addLink"), q, ee = (q = class {
743
+ constructor(e) {
744
+ this.ID = e;
745
+ }
746
+ }, g(q, "SankeyNode"), q), ne = /* @__PURE__ */ g((t) => {
747
+ t = Tt.sanitizeText(t, lt());
748
+ let e = Z.get(t);
749
+ return e === void 0 && (e = new ee(t), Z.set(t, e), tt.push(e)), e;
750
+ }, "findOrCreateNode"), ie = /* @__PURE__ */ g(() => tt, "getNodes"), re = /* @__PURE__ */ g(() => J, "getLinks"), se = /* @__PURE__ */ g(() => ({
751
+ nodes: tt.map((t) => ({ id: t.ID })),
752
+ links: J.map((t) => ({
753
+ source: t.source.ID,
754
+ target: t.target.ID,
755
+ value: t.value
756
+ }))
757
+ }), "getGraph"), oe = {
758
+ nodesMap: Z,
759
+ getConfig: /* @__PURE__ */ g(() => lt().sankey, "getConfig"),
760
+ getNodes: ie,
761
+ getLinks: re,
762
+ getGraph: se,
763
+ addLink: te,
764
+ findOrCreateNode: ne,
765
+ getAccTitle: St,
766
+ setAccTitle: wt,
767
+ getAccDescription: bt,
768
+ setAccDescription: vt,
769
+ getDiagramTitle: xt,
770
+ setDiagramTitle: _t,
771
+ clear: Zt
772
+ }, B, pt = (B = class {
773
+ static next(e) {
774
+ return new B(e + ++B.count);
775
+ }
776
+ constructor(e) {
777
+ this.id = e, this.href = `#${e}`;
778
+ }
779
+ toString() {
780
+ return "url(" + this.href + ")";
781
+ }
782
+ }, g(B, "Uid"), B.count = 0, B), ae = {
783
+ left: Ct,
784
+ right: Ot,
785
+ center: zt,
786
+ justify: mt
787
+ }, le = /* @__PURE__ */ g(function(t, e, i, a) {
788
+ const { securityLevel: h, sankey: d } = lt(), m = Lt.sankey;
789
+ let _;
790
+ h === "sandbox" && (_ = H("#i" + e));
791
+ const r = h === "sandbox" ? H(_.nodes()[0].contentDocument.body) : H("body"), o = h === "sandbox" ? r.select(`[id="${e}"]`) : H(`[id="${e}"]`), l = (d == null ? void 0 : d.width) ?? m.width, x = (d == null ? void 0 : d.height) ?? m.width, v = (d == null ? void 0 : d.useMaxWidth) ?? m.useMaxWidth, y = (d == null ? void 0 : d.nodeAlignment) ?? m.nodeAlignment, b = (d == null ? void 0 : d.prefix) ?? m.prefix, M = (d == null ? void 0 : d.suffix) ?? m.suffix, T = (d == null ? void 0 : d.showValues) ?? m.showValues, N = a.db.getGraph(), C = ae[y];
792
+ Bt().nodeId((p) => p.id).nodeWidth(10).nodePadding(10 + (T ? 15 : 0)).nodeAlign(C).extent([
793
+ [0, 0],
794
+ [l, x]
795
+ ])(N);
796
+ const S = Mt(It);
797
+ o.append("g").attr("class", "nodes").selectAll(".node").data(N.nodes).join("g").attr("class", "node").attr("id", (p) => (p.uid = pt.next("node-")).id).attr("transform", function(p) {
798
+ return "translate(" + p.x0 + "," + p.y0 + ")";
799
+ }).attr("x", (p) => p.x0).attr("y", (p) => p.y0).append("rect").attr("height", (p) => p.y1 - p.y0).attr("width", (p) => p.x1 - p.x0).attr("fill", (p) => S(p.id));
800
+ const P = /* @__PURE__ */ g(({ id: p, value: E }) => T ? `${p}
801
+ ${b}${Math.round(E * 100) / 100}${M}` : p, "getText");
802
+ o.append("g").attr("class", "node-labels").attr("font-size", 14).selectAll("text").data(N.nodes).join("text").attr("x", (p) => p.x0 < l / 2 ? p.x1 + 6 : p.x0 - 6).attr("y", (p) => (p.y1 + p.y0) / 2).attr("dy", `${T ? "0" : "0.35"}em`).attr("text-anchor", (p) => p.x0 < l / 2 ? "start" : "end").text(P);
803
+ const j = o.append("g").attr("class", "links").attr("fill", "none").attr("stroke-opacity", 0.5).selectAll(".link").data(N.links).join("g").attr("class", "link").style("mix-blend-mode", "multiply"), O = (d == null ? void 0 : d.linkColor) ?? "gradient";
804
+ if (O === "gradient") {
805
+ const p = j.append("linearGradient").attr("id", (E) => (E.uid = pt.next("linearGradient-")).id).attr("gradientUnits", "userSpaceOnUse").attr("x1", (E) => E.source.x1).attr("x2", (E) => E.target.x0);
806
+ p.append("stop").attr("offset", "0%").attr("stop-color", (E) => S(E.source.id)), p.append("stop").attr("offset", "100%").attr("stop-color", (E) => S(E.target.id));
807
+ }
808
+ let z;
809
+ switch (O) {
810
+ case "gradient":
811
+ z = /* @__PURE__ */ g((p) => p.uid, "coloring");
812
+ break;
813
+ case "source":
814
+ z = /* @__PURE__ */ g((p) => S(p.source.id), "coloring");
815
+ break;
816
+ case "target":
817
+ z = /* @__PURE__ */ g((p) => S(p.target.id), "coloring");
818
+ break;
819
+ default:
820
+ z = O;
821
+ }
822
+ j.append("path").attr("d", Kt()).attr("stroke", z).attr("stroke-width", (p) => Math.max(1, p.width)), Et(void 0, o, 0, v);
823
+ }, "draw"), ce = {
824
+ draw: le
825
+ }, ue = /* @__PURE__ */ g((t) => t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g, "").replaceAll(/([\n\r])+/g, `
826
+ `).trim(), "prepareTextForParsing"), he = /* @__PURE__ */ g((t) => `.label {
827
+ font-family: ${t.fontFamily};
828
+ }`, "getStyles"), fe = he, ye = K.parse.bind(K);
829
+ K.parse = (t) => ye(ue(t));
830
+ var Te = {
831
+ styles: fe,
832
+ parser: K,
833
+ db: oe,
834
+ renderer: ce
835
+ };
836
+ export {
837
+ Te as diagram
838
+ };