@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,848 @@
1
+ import { a as gt, g as lt, f as mt, d as xt } from "./chunk-TZMSLE5B-B6GY_sBW.js";
2
+ import { g as kt } from "./chunk-FMBD7UC4-BkpbM-uP.js";
3
+ import { g as _t, s as vt, a as bt, b as wt, q as Tt, p as St, _ as n, c as R, d as G, e as $t, y as Mt } from "./mermaid.core-08D5Vldk.js";
4
+ import { d as et } from "./arc-BzRDGNYi.js";
5
+ import "./index-C3mwt8G1.js";
6
+ import "react/jsx-runtime";
7
+ import "react";
8
+ import "class-variance-authority";
9
+ import "clsx";
10
+ import "tailwind-merge";
11
+ import "react-dom";
12
+ import "cmdk";
13
+ import "nanoid";
14
+ import "@foris/avocado-icons";
15
+ import "react-markdown";
16
+ var U = function() {
17
+ var t = /* @__PURE__ */ n(function(h, i, a, l) {
18
+ for (a = a || {}, l = h.length; l--; a[h[l]] = i)
19
+ ;
20
+ return a;
21
+ }, "o"), e = [6, 8, 10, 11, 12, 14, 16, 17, 18], s = [1, 9], c = [1, 10], r = [1, 11], p = [1, 12], u = [1, 13], y = [1, 14], g = {
22
+ trace: /* @__PURE__ */ n(function() {
23
+ }, "trace"),
24
+ yy: {},
25
+ symbols_: { error: 2, start: 3, journey: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, title: 11, acc_title: 12, acc_title_value: 13, acc_descr: 14, acc_descr_value: 15, acc_descr_multiline_value: 16, section: 17, taskName: 18, taskData: 19, $accept: 0, $end: 1 },
26
+ terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" },
27
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]],
28
+ performAction: /* @__PURE__ */ n(function(i, a, l, d, f, o, b) {
29
+ var k = o.length - 1;
30
+ switch (f) {
31
+ case 1:
32
+ return o[k - 1];
33
+ case 2:
34
+ this.$ = [];
35
+ break;
36
+ case 3:
37
+ o[k - 1].push(o[k]), this.$ = o[k - 1];
38
+ break;
39
+ case 4:
40
+ case 5:
41
+ this.$ = o[k];
42
+ break;
43
+ case 6:
44
+ case 7:
45
+ this.$ = [];
46
+ break;
47
+ case 8:
48
+ d.setDiagramTitle(o[k].substr(6)), this.$ = o[k].substr(6);
49
+ break;
50
+ case 9:
51
+ this.$ = o[k].trim(), d.setAccTitle(this.$);
52
+ break;
53
+ case 10:
54
+ case 11:
55
+ this.$ = o[k].trim(), d.setAccDescription(this.$);
56
+ break;
57
+ case 12:
58
+ d.addSection(o[k].substr(8)), this.$ = o[k].substr(8);
59
+ break;
60
+ case 13:
61
+ d.addTask(o[k - 1], o[k]), this.$ = "task";
62
+ break;
63
+ }
64
+ }, "anonymous"),
65
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: s, 12: c, 14: r, 16: p, 17: u, 18: y }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 15, 11: s, 12: c, 14: r, 16: p, 17: u, 18: y }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, t(e, [2, 11]), t(e, [2, 12]), { 19: [1, 18] }, t(e, [2, 4]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 13])],
66
+ defaultActions: {},
67
+ parseError: /* @__PURE__ */ n(function(i, a) {
68
+ if (a.recoverable)
69
+ this.trace(i);
70
+ else {
71
+ var l = new Error(i);
72
+ throw l.hash = a, l;
73
+ }
74
+ }, "parseError"),
75
+ parse: /* @__PURE__ */ n(function(i) {
76
+ var a = this, l = [0], d = [], f = [null], o = [], b = this.table, k = "", C = 0, K = 0, dt = 2, Q = 1, yt = o.slice.call(arguments, 1), _ = Object.create(this.lexer), I = { yy: {} };
77
+ for (var O in this.yy)
78
+ Object.prototype.hasOwnProperty.call(this.yy, O) && (I.yy[O] = this.yy[O]);
79
+ _.setInput(i, I.yy), I.yy.lexer = _, I.yy.parser = this, typeof _.yylloc > "u" && (_.yylloc = {});
80
+ var Y = _.yylloc;
81
+ o.push(Y);
82
+ var pt = _.options && _.options.ranges;
83
+ typeof I.yy.parseError == "function" ? this.parseError = I.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
84
+ function ft(w) {
85
+ l.length = l.length - 2 * w, f.length = f.length - w, o.length = o.length - w;
86
+ }
87
+ n(ft, "popStack");
88
+ function D() {
89
+ var w;
90
+ return w = d.pop() || _.lex() || Q, typeof w != "number" && (w instanceof Array && (d = w, w = d.pop()), w = a.symbols_[w] || w), w;
91
+ }
92
+ n(D, "lex");
93
+ for (var v, A, T, q, F = {}, N, M, tt, z; ; ) {
94
+ if (A = l[l.length - 1], this.defaultActions[A] ? T = this.defaultActions[A] : ((v === null || typeof v > "u") && (v = D()), T = b[A] && b[A][v]), typeof T > "u" || !T.length || !T[0]) {
95
+ var X = "";
96
+ z = [];
97
+ for (N in b[A])
98
+ this.terminals_[N] && N > dt && z.push("'" + this.terminals_[N] + "'");
99
+ _.showPosition ? X = "Parse error on line " + (C + 1) + `:
100
+ ` + _.showPosition() + `
101
+ Expecting ` + z.join(", ") + ", got '" + (this.terminals_[v] || v) + "'" : X = "Parse error on line " + (C + 1) + ": Unexpected " + (v == Q ? "end of input" : "'" + (this.terminals_[v] || v) + "'"), this.parseError(X, {
102
+ text: _.match,
103
+ token: this.terminals_[v] || v,
104
+ line: _.yylineno,
105
+ loc: Y,
106
+ expected: z
107
+ });
108
+ }
109
+ if (T[0] instanceof Array && T.length > 1)
110
+ throw new Error("Parse Error: multiple actions possible at state: " + A + ", token: " + v);
111
+ switch (T[0]) {
112
+ case 1:
113
+ l.push(v), f.push(_.yytext), o.push(_.yylloc), l.push(T[1]), v = null, K = _.yyleng, k = _.yytext, C = _.yylineno, Y = _.yylloc;
114
+ break;
115
+ case 2:
116
+ if (M = this.productions_[T[1]][1], F.$ = f[f.length - M], F._$ = {
117
+ first_line: o[o.length - (M || 1)].first_line,
118
+ last_line: o[o.length - 1].last_line,
119
+ first_column: o[o.length - (M || 1)].first_column,
120
+ last_column: o[o.length - 1].last_column
121
+ }, pt && (F._$.range = [
122
+ o[o.length - (M || 1)].range[0],
123
+ o[o.length - 1].range[1]
124
+ ]), q = this.performAction.apply(F, [
125
+ k,
126
+ K,
127
+ C,
128
+ I.yy,
129
+ T[1],
130
+ f,
131
+ o
132
+ ].concat(yt)), typeof q < "u")
133
+ return q;
134
+ M && (l = l.slice(0, -1 * M * 2), f = f.slice(0, -1 * M), o = o.slice(0, -1 * M)), l.push(this.productions_[T[1]][0]), f.push(F.$), o.push(F._$), tt = b[l[l.length - 2]][l[l.length - 1]], l.push(tt);
135
+ break;
136
+ case 3:
137
+ return !0;
138
+ }
139
+ }
140
+ return !0;
141
+ }, "parse")
142
+ }, m = /* @__PURE__ */ function() {
143
+ var h = {
144
+ EOF: 1,
145
+ parseError: /* @__PURE__ */ n(function(a, l) {
146
+ if (this.yy.parser)
147
+ this.yy.parser.parseError(a, l);
148
+ else
149
+ throw new Error(a);
150
+ }, "parseError"),
151
+ // resets the lexer, sets new input
152
+ setInput: /* @__PURE__ */ n(function(i, a) {
153
+ return this.yy = a || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
154
+ first_line: 1,
155
+ first_column: 0,
156
+ last_line: 1,
157
+ last_column: 0
158
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
159
+ }, "setInput"),
160
+ // consumes and returns one char from the input
161
+ input: /* @__PURE__ */ n(function() {
162
+ var i = this._input[0];
163
+ this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
164
+ var a = i.match(/(?:\r\n?|\n).*/g);
165
+ return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
166
+ }, "input"),
167
+ // unshifts one char (or a string) into the input
168
+ unput: /* @__PURE__ */ n(function(i) {
169
+ var a = i.length, l = i.split(/(?:\r\n?|\n)/g);
170
+ this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
171
+ var d = this.match.split(/(?:\r\n?|\n)/g);
172
+ 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);
173
+ var f = this.yylloc.range;
174
+ return this.yylloc = {
175
+ first_line: this.yylloc.first_line,
176
+ last_line: this.yylineno + 1,
177
+ first_column: this.yylloc.first_column,
178
+ last_column: l ? (l.length === d.length ? this.yylloc.first_column : 0) + d[d.length - l.length].length - l[0].length : this.yylloc.first_column - a
179
+ }, this.options.ranges && (this.yylloc.range = [f[0], f[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
180
+ }, "unput"),
181
+ // When called from action, caches matched text and appends it on next action
182
+ more: /* @__PURE__ */ n(function() {
183
+ return this._more = !0, this;
184
+ }, "more"),
185
+ // 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.
186
+ reject: /* @__PURE__ */ n(function() {
187
+ if (this.options.backtrack_lexer)
188
+ this._backtrack = !0;
189
+ else
190
+ 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).
191
+ ` + this.showPosition(), {
192
+ text: "",
193
+ token: null,
194
+ line: this.yylineno
195
+ });
196
+ return this;
197
+ }, "reject"),
198
+ // retain first n characters of the match
199
+ less: /* @__PURE__ */ n(function(i) {
200
+ this.unput(this.match.slice(i));
201
+ }, "less"),
202
+ // displays already matched input, i.e. for error messages
203
+ pastInput: /* @__PURE__ */ n(function() {
204
+ var i = this.matched.substr(0, this.matched.length - this.match.length);
205
+ return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
206
+ }, "pastInput"),
207
+ // displays upcoming input, i.e. for error messages
208
+ upcomingInput: /* @__PURE__ */ n(function() {
209
+ var i = this.match;
210
+ return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
211
+ }, "upcomingInput"),
212
+ // displays the character position where the lexing error occurred, i.e. for error messages
213
+ showPosition: /* @__PURE__ */ n(function() {
214
+ var i = this.pastInput(), a = new Array(i.length + 1).join("-");
215
+ return i + this.upcomingInput() + `
216
+ ` + a + "^";
217
+ }, "showPosition"),
218
+ // test the lexed token: return FALSE when not a match, otherwise return token
219
+ test_match: /* @__PURE__ */ n(function(i, a) {
220
+ var l, d, f;
221
+ if (this.options.backtrack_lexer && (f = {
222
+ yylineno: this.yylineno,
223
+ yylloc: {
224
+ first_line: this.yylloc.first_line,
225
+ last_line: this.last_line,
226
+ first_column: this.yylloc.first_column,
227
+ last_column: this.yylloc.last_column
228
+ },
229
+ yytext: this.yytext,
230
+ match: this.match,
231
+ matches: this.matches,
232
+ matched: this.matched,
233
+ yyleng: this.yyleng,
234
+ offset: this.offset,
235
+ _more: this._more,
236
+ _input: this._input,
237
+ yy: this.yy,
238
+ conditionStack: this.conditionStack.slice(0),
239
+ done: this.done
240
+ }, this.options.ranges && (f.yylloc.range = this.yylloc.range.slice(0))), d = i[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
241
+ first_line: this.yylloc.last_line,
242
+ last_line: this.yylineno + 1,
243
+ first_column: this.yylloc.last_column,
244
+ last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
245
+ }, this.yytext += i[0], this.match += i[0], this.matches = i, 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(i[0].length), this.matched += i[0], l = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
246
+ return l;
247
+ if (this._backtrack) {
248
+ for (var o in f)
249
+ this[o] = f[o];
250
+ return !1;
251
+ }
252
+ return !1;
253
+ }, "test_match"),
254
+ // return next match in input
255
+ next: /* @__PURE__ */ n(function() {
256
+ if (this.done)
257
+ return this.EOF;
258
+ this._input || (this.done = !0);
259
+ var i, a, l, d;
260
+ this._more || (this.yytext = "", this.match = "");
261
+ for (var f = this._currentRules(), o = 0; o < f.length; o++)
262
+ if (l = this._input.match(this.rules[f[o]]), l && (!a || l[0].length > a[0].length)) {
263
+ if (a = l, d = o, this.options.backtrack_lexer) {
264
+ if (i = this.test_match(l, f[o]), i !== !1)
265
+ return i;
266
+ if (this._backtrack) {
267
+ a = !1;
268
+ continue;
269
+ } else
270
+ return !1;
271
+ } else if (!this.options.flex)
272
+ break;
273
+ }
274
+ return a ? (i = this.test_match(a, f[d]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
275
+ ` + this.showPosition(), {
276
+ text: "",
277
+ token: null,
278
+ line: this.yylineno
279
+ });
280
+ }, "next"),
281
+ // return next match that has a token
282
+ lex: /* @__PURE__ */ n(function() {
283
+ var a = this.next();
284
+ return a || this.lex();
285
+ }, "lex"),
286
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
287
+ begin: /* @__PURE__ */ n(function(a) {
288
+ this.conditionStack.push(a);
289
+ }, "begin"),
290
+ // pop the previously active lexer condition state off the condition stack
291
+ popState: /* @__PURE__ */ n(function() {
292
+ var a = this.conditionStack.length - 1;
293
+ return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
294
+ }, "popState"),
295
+ // produce the lexer rule set which is active for the currently active lexer condition state
296
+ _currentRules: /* @__PURE__ */ n(function() {
297
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
298
+ }, "_currentRules"),
299
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
300
+ topState: /* @__PURE__ */ n(function(a) {
301
+ return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
302
+ }, "topState"),
303
+ // alias for begin(condition)
304
+ pushState: /* @__PURE__ */ n(function(a) {
305
+ this.begin(a);
306
+ }, "pushState"),
307
+ // return the number of states currently on the stack
308
+ stateStackSize: /* @__PURE__ */ n(function() {
309
+ return this.conditionStack.length;
310
+ }, "stateStackSize"),
311
+ options: { "case-insensitive": !0 },
312
+ performAction: /* @__PURE__ */ n(function(a, l, d, f) {
313
+ switch (d) {
314
+ case 0:
315
+ break;
316
+ case 1:
317
+ break;
318
+ case 2:
319
+ return 10;
320
+ case 3:
321
+ break;
322
+ case 4:
323
+ break;
324
+ case 5:
325
+ return 4;
326
+ case 6:
327
+ return 11;
328
+ case 7:
329
+ return this.begin("acc_title"), 12;
330
+ case 8:
331
+ return this.popState(), "acc_title_value";
332
+ case 9:
333
+ return this.begin("acc_descr"), 14;
334
+ case 10:
335
+ return this.popState(), "acc_descr_value";
336
+ case 11:
337
+ this.begin("acc_descr_multiline");
338
+ break;
339
+ case 12:
340
+ this.popState();
341
+ break;
342
+ case 13:
343
+ return "acc_descr_multiline_value";
344
+ case 14:
345
+ return 17;
346
+ case 15:
347
+ return 18;
348
+ case 16:
349
+ return 19;
350
+ case 17:
351
+ return ":";
352
+ case 18:
353
+ return 6;
354
+ case 19:
355
+ return "INVALID";
356
+ }
357
+ }, "anonymous"),
358
+ rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
359
+ conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], inclusive: !0 } }
360
+ };
361
+ return h;
362
+ }();
363
+ g.lexer = m;
364
+ function x() {
365
+ this.yy = {};
366
+ }
367
+ return n(x, "Parser"), x.prototype = g, g.Parser = x, new x();
368
+ }();
369
+ U.parser = U;
370
+ var Et = U, V = "", Z = [], L = [], B = [], Ct = /* @__PURE__ */ n(function() {
371
+ Z.length = 0, L.length = 0, V = "", B.length = 0, Mt();
372
+ }, "clear"), Pt = /* @__PURE__ */ n(function(t) {
373
+ V = t, Z.push(t);
374
+ }, "addSection"), It = /* @__PURE__ */ n(function() {
375
+ return Z;
376
+ }, "getSections"), At = /* @__PURE__ */ n(function() {
377
+ let t = it();
378
+ const e = 100;
379
+ let s = 0;
380
+ for (; !t && s < e; )
381
+ t = it(), s++;
382
+ return L.push(...B), L;
383
+ }, "getTasks"), Ft = /* @__PURE__ */ n(function() {
384
+ const t = [];
385
+ return L.forEach((s) => {
386
+ s.people && t.push(...s.people);
387
+ }), [...new Set(t)].sort();
388
+ }, "updateActors"), Vt = /* @__PURE__ */ n(function(t, e) {
389
+ const s = e.substr(1).split(":");
390
+ let c = 0, r = [];
391
+ s.length === 1 ? (c = Number(s[0]), r = []) : (c = Number(s[0]), r = s[1].split(","));
392
+ const p = r.map((y) => y.trim()), u = {
393
+ section: V,
394
+ type: V,
395
+ people: p,
396
+ task: t,
397
+ score: c
398
+ };
399
+ B.push(u);
400
+ }, "addTask"), Rt = /* @__PURE__ */ n(function(t) {
401
+ const e = {
402
+ section: V,
403
+ type: V,
404
+ description: t,
405
+ task: t,
406
+ classes: []
407
+ };
408
+ L.push(e);
409
+ }, "addTaskOrg"), it = /* @__PURE__ */ n(function() {
410
+ const t = /* @__PURE__ */ n(function(s) {
411
+ return B[s].processed;
412
+ }, "compileTask");
413
+ let e = !0;
414
+ for (const [s, c] of B.entries())
415
+ t(s), e = e && c.processed;
416
+ return e;
417
+ }, "compileTasks"), Lt = /* @__PURE__ */ n(function() {
418
+ return Ft();
419
+ }, "getActors"), rt = {
420
+ getConfig: /* @__PURE__ */ n(() => R().journey, "getConfig"),
421
+ clear: Ct,
422
+ setDiagramTitle: St,
423
+ getDiagramTitle: Tt,
424
+ setAccTitle: wt,
425
+ getAccTitle: bt,
426
+ setAccDescription: vt,
427
+ getAccDescription: _t,
428
+ addSection: Pt,
429
+ getSections: It,
430
+ getTasks: At,
431
+ addTask: Vt,
432
+ addTaskOrg: Rt,
433
+ getActors: Lt
434
+ }, Bt = /* @__PURE__ */ n((t) => `.label {
435
+ font-family: ${t.fontFamily};
436
+ color: ${t.textColor};
437
+ }
438
+ .mouth {
439
+ stroke: #666;
440
+ }
441
+
442
+ line {
443
+ stroke: ${t.textColor}
444
+ }
445
+
446
+ .legend {
447
+ fill: ${t.textColor};
448
+ font-family: ${t.fontFamily};
449
+ }
450
+
451
+ .label text {
452
+ fill: #333;
453
+ }
454
+ .label {
455
+ color: ${t.textColor}
456
+ }
457
+
458
+ .face {
459
+ ${t.faceColor ? `fill: ${t.faceColor}` : "fill: #FFF8DC"};
460
+ stroke: #999;
461
+ }
462
+
463
+ .node rect,
464
+ .node circle,
465
+ .node ellipse,
466
+ .node polygon,
467
+ .node path {
468
+ fill: ${t.mainBkg};
469
+ stroke: ${t.nodeBorder};
470
+ stroke-width: 1px;
471
+ }
472
+
473
+ .node .label {
474
+ text-align: center;
475
+ }
476
+ .node.clickable {
477
+ cursor: pointer;
478
+ }
479
+
480
+ .arrowheadPath {
481
+ fill: ${t.arrowheadColor};
482
+ }
483
+
484
+ .edgePath .path {
485
+ stroke: ${t.lineColor};
486
+ stroke-width: 1.5px;
487
+ }
488
+
489
+ .flowchart-link {
490
+ stroke: ${t.lineColor};
491
+ fill: none;
492
+ }
493
+
494
+ .edgeLabel {
495
+ background-color: ${t.edgeLabelBackground};
496
+ rect {
497
+ opacity: 0.5;
498
+ }
499
+ text-align: center;
500
+ }
501
+
502
+ .cluster rect {
503
+ }
504
+
505
+ .cluster text {
506
+ fill: ${t.titleColor};
507
+ }
508
+
509
+ div.mermaidTooltip {
510
+ position: absolute;
511
+ text-align: center;
512
+ max-width: 200px;
513
+ padding: 2px;
514
+ font-family: ${t.fontFamily};
515
+ font-size: 12px;
516
+ background: ${t.tertiaryColor};
517
+ border: 1px solid ${t.border2};
518
+ border-radius: 2px;
519
+ pointer-events: none;
520
+ z-index: 100;
521
+ }
522
+
523
+ .task-type-0, .section-type-0 {
524
+ ${t.fillType0 ? `fill: ${t.fillType0}` : ""};
525
+ }
526
+ .task-type-1, .section-type-1 {
527
+ ${t.fillType0 ? `fill: ${t.fillType1}` : ""};
528
+ }
529
+ .task-type-2, .section-type-2 {
530
+ ${t.fillType0 ? `fill: ${t.fillType2}` : ""};
531
+ }
532
+ .task-type-3, .section-type-3 {
533
+ ${t.fillType0 ? `fill: ${t.fillType3}` : ""};
534
+ }
535
+ .task-type-4, .section-type-4 {
536
+ ${t.fillType0 ? `fill: ${t.fillType4}` : ""};
537
+ }
538
+ .task-type-5, .section-type-5 {
539
+ ${t.fillType0 ? `fill: ${t.fillType5}` : ""};
540
+ }
541
+ .task-type-6, .section-type-6 {
542
+ ${t.fillType0 ? `fill: ${t.fillType6}` : ""};
543
+ }
544
+ .task-type-7, .section-type-7 {
545
+ ${t.fillType0 ? `fill: ${t.fillType7}` : ""};
546
+ }
547
+
548
+ .actor-0 {
549
+ ${t.actor0 ? `fill: ${t.actor0}` : ""};
550
+ }
551
+ .actor-1 {
552
+ ${t.actor1 ? `fill: ${t.actor1}` : ""};
553
+ }
554
+ .actor-2 {
555
+ ${t.actor2 ? `fill: ${t.actor2}` : ""};
556
+ }
557
+ .actor-3 {
558
+ ${t.actor3 ? `fill: ${t.actor3}` : ""};
559
+ }
560
+ .actor-4 {
561
+ ${t.actor4 ? `fill: ${t.actor4}` : ""};
562
+ }
563
+ .actor-5 {
564
+ ${t.actor5 ? `fill: ${t.actor5}` : ""};
565
+ }
566
+ ${kt()}
567
+ `, "getStyles"), jt = Bt, J = /* @__PURE__ */ n(function(t, e) {
568
+ return xt(t, e);
569
+ }, "drawRect"), Nt = /* @__PURE__ */ n(function(t, e) {
570
+ const c = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), r = t.append("g");
571
+ r.append("circle").attr("cx", e.cx - 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), r.append("circle").attr("cx", e.cx + 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
572
+ function p(g) {
573
+ const m = et().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
574
+ g.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 2) + ")");
575
+ }
576
+ n(p, "smile");
577
+ function u(g) {
578
+ const m = et().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
579
+ g.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 7) + ")");
580
+ }
581
+ n(u, "sad");
582
+ function y(g) {
583
+ g.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", e.cx - 5).attr("y1", e.cy + 7).attr("x2", e.cx + 5).attr("y2", e.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
584
+ }
585
+ return n(y, "ambivalent"), e.score > 3 ? p(r) : e.score < 3 ? u(r) : y(r), c;
586
+ }, "drawFace"), ot = /* @__PURE__ */ n(function(t, e) {
587
+ const s = t.append("circle");
588
+ return s.attr("cx", e.cx), s.attr("cy", e.cy), s.attr("class", "actor-" + e.pos), s.attr("fill", e.fill), s.attr("stroke", e.stroke), s.attr("r", e.r), s.class !== void 0 && s.attr("class", s.class), e.title !== void 0 && s.append("title").text(e.title), s;
589
+ }, "drawCircle"), ct = /* @__PURE__ */ n(function(t, e) {
590
+ return mt(t, e);
591
+ }, "drawText"), zt = /* @__PURE__ */ n(function(t, e) {
592
+ function s(r, p, u, y, g) {
593
+ return r + "," + p + " " + (r + u) + "," + p + " " + (r + u) + "," + (p + y - g) + " " + (r + u - g * 1.2) + "," + (p + y) + " " + r + "," + (p + y);
594
+ }
595
+ n(s, "genPoints");
596
+ const c = t.append("polygon");
597
+ c.attr("points", s(e.x, e.y, 50, 20, 7)), c.attr("class", "labelBox"), e.y = e.y + e.labelMargin, e.x = e.x + 0.5 * e.labelMargin, ct(t, e);
598
+ }, "drawLabel"), Wt = /* @__PURE__ */ n(function(t, e, s) {
599
+ const c = t.append("g"), r = lt();
600
+ r.x = e.x, r.y = e.y, r.fill = e.fill, r.width = s.width * e.taskCount + // width of the tasks
601
+ s.diagramMarginX * (e.taskCount - 1), r.height = s.height, r.class = "journey-section section-type-" + e.num, r.rx = 3, r.ry = 3, J(c, r), ht(s)(
602
+ e.text,
603
+ c,
604
+ r.x,
605
+ r.y,
606
+ r.width,
607
+ r.height,
608
+ { class: "journey-section section-type-" + e.num },
609
+ s,
610
+ e.colour
611
+ );
612
+ }, "drawSection"), nt = -1, Ot = /* @__PURE__ */ n(function(t, e, s) {
613
+ const c = e.x + s.width / 2, r = t.append("g");
614
+ nt++;
615
+ const p = 300 + 5 * 30;
616
+ r.append("line").attr("id", "task" + nt).attr("x1", c).attr("y1", e.y).attr("x2", c).attr("y2", p).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Nt(r, {
617
+ cx: c,
618
+ cy: 300 + (5 - e.score) * 30,
619
+ score: e.score
620
+ });
621
+ const u = lt();
622
+ u.x = e.x, u.y = e.y, u.fill = e.fill, u.width = s.width, u.height = s.height, u.class = "task task-type-" + e.num, u.rx = 3, u.ry = 3, J(r, u);
623
+ let y = e.x + 14;
624
+ e.people.forEach((g) => {
625
+ const m = e.actors[g].color, x = {
626
+ cx: y,
627
+ cy: e.y,
628
+ r: 7,
629
+ fill: m,
630
+ stroke: "#000",
631
+ title: g,
632
+ pos: e.actors[g].position
633
+ };
634
+ ot(r, x), y += 10;
635
+ }), ht(s)(
636
+ e.task,
637
+ r,
638
+ u.x,
639
+ u.y,
640
+ u.width,
641
+ u.height,
642
+ { class: "task" },
643
+ s,
644
+ e.colour
645
+ );
646
+ }, "drawTask"), Yt = /* @__PURE__ */ n(function(t, e) {
647
+ gt(t, e);
648
+ }, "drawBackgroundRect"), ht = /* @__PURE__ */ function() {
649
+ function t(r, p, u, y, g, m, x, h) {
650
+ const i = p.append("text").attr("x", u + g / 2).attr("y", y + m / 2 + 5).style("font-color", h).style("text-anchor", "middle").text(r);
651
+ c(i, x);
652
+ }
653
+ n(t, "byText");
654
+ function e(r, p, u, y, g, m, x, h, i) {
655
+ const { taskFontSize: a, taskFontFamily: l } = h, d = r.split(/<br\s*\/?>/gi);
656
+ for (let f = 0; f < d.length; f++) {
657
+ const o = f * a - a * (d.length - 1) / 2, b = p.append("text").attr("x", u + g / 2).attr("y", y).attr("fill", i).style("text-anchor", "middle").style("font-size", a).style("font-family", l);
658
+ b.append("tspan").attr("x", u + g / 2).attr("dy", o).text(d[f]), b.attr("y", y + m / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), c(b, x);
659
+ }
660
+ }
661
+ n(e, "byTspan");
662
+ function s(r, p, u, y, g, m, x, h) {
663
+ const i = p.append("switch"), l = i.append("foreignObject").attr("x", u).attr("y", y).attr("width", g).attr("height", m).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
664
+ l.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(r), e(r, i, u, y, g, m, x, h), c(l, x);
665
+ }
666
+ n(s, "byFo");
667
+ function c(r, p) {
668
+ for (const u in p)
669
+ u in p && r.attr(u, p[u]);
670
+ }
671
+ return n(c, "_setTextAttrs"), function(r) {
672
+ return r.textPlacement === "fo" ? s : r.textPlacement === "old" ? t : e;
673
+ };
674
+ }(), qt = /* @__PURE__ */ n(function(t) {
675
+ t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
676
+ }, "initGraphics"), j = {
677
+ drawRect: J,
678
+ drawCircle: ot,
679
+ drawSection: Wt,
680
+ drawText: ct,
681
+ drawLabel: zt,
682
+ drawTask: Ot,
683
+ drawBackgroundRect: Yt,
684
+ initGraphics: qt
685
+ }, Xt = /* @__PURE__ */ n(function(t) {
686
+ Object.keys(t).forEach(function(s) {
687
+ $[s] = t[s];
688
+ });
689
+ }, "setConf"), E = {}, W = 0;
690
+ function ut(t) {
691
+ const e = R().journey, s = e.maxLabelWidth;
692
+ W = 0;
693
+ let c = 60;
694
+ Object.keys(E).forEach((r) => {
695
+ const p = E[r].color, u = {
696
+ cx: 20,
697
+ cy: c,
698
+ r: 7,
699
+ fill: p,
700
+ stroke: "#000",
701
+ pos: E[r].position
702
+ };
703
+ j.drawCircle(t, u);
704
+ let y = t.append("text").attr("visibility", "hidden").text(r);
705
+ const g = y.node().getBoundingClientRect().width;
706
+ y.remove();
707
+ let m = [];
708
+ if (g <= s)
709
+ m = [r];
710
+ else {
711
+ const x = r.split(" ");
712
+ let h = "";
713
+ y = t.append("text").attr("visibility", "hidden"), x.forEach((i) => {
714
+ const a = h ? `${h} ${i}` : i;
715
+ if (y.text(a), y.node().getBoundingClientRect().width > s) {
716
+ if (h && m.push(h), h = i, y.text(i), y.node().getBoundingClientRect().width > s) {
717
+ let d = "";
718
+ for (const f of i)
719
+ d += f, y.text(d + "-"), y.node().getBoundingClientRect().width > s && (m.push(d.slice(0, -1) + "-"), d = f);
720
+ h = d;
721
+ }
722
+ } else
723
+ h = a;
724
+ }), h && m.push(h), y.remove();
725
+ }
726
+ m.forEach((x, h) => {
727
+ const i = {
728
+ x: 40,
729
+ y: c + 7 + h * 20,
730
+ fill: "#666",
731
+ text: x,
732
+ textMargin: e.boxTextMargin ?? 5
733
+ }, l = j.drawText(t, i).node().getBoundingClientRect().width;
734
+ l > W && l > e.leftMargin - l && (W = l);
735
+ }), c += Math.max(20, m.length * 20);
736
+ });
737
+ }
738
+ n(ut, "drawActorLegend");
739
+ var $ = R().journey, P = 0, Gt = /* @__PURE__ */ n(function(t, e, s, c) {
740
+ const r = R(), p = r.journey.titleColor, u = r.journey.titleFontSize, y = r.journey.titleFontFamily, g = r.securityLevel;
741
+ let m;
742
+ g === "sandbox" && (m = G("#i" + e));
743
+ const x = g === "sandbox" ? G(m.nodes()[0].contentDocument.body) : G("body");
744
+ S.init();
745
+ const h = x.select("#" + e);
746
+ j.initGraphics(h);
747
+ const i = c.db.getTasks(), a = c.db.getDiagramTitle(), l = c.db.getActors();
748
+ for (const C in E)
749
+ delete E[C];
750
+ let d = 0;
751
+ l.forEach((C) => {
752
+ E[C] = {
753
+ color: $.actorColours[d % $.actorColours.length],
754
+ position: d
755
+ }, d++;
756
+ }), ut(h), P = $.leftMargin + W, S.insert(0, 0, P, Object.keys(E).length * 50), Ht(h, i, 0);
757
+ const f = S.getBounds();
758
+ a && h.append("text").text(a).attr("x", P).attr("font-size", u).attr("font-weight", "bold").attr("y", 25).attr("fill", p).attr("font-family", y);
759
+ const o = f.stopy - f.starty + 2 * $.diagramMarginY, b = P + f.stopx + 2 * $.diagramMarginX;
760
+ $t(h, o, b, $.useMaxWidth), h.append("line").attr("x1", P).attr("y1", $.height * 4).attr("x2", b - P - 4).attr("y2", $.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
761
+ const k = a ? 70 : 0;
762
+ h.attr("viewBox", `${f.startx} -25 ${b} ${o + k}`), h.attr("preserveAspectRatio", "xMinYMin meet"), h.attr("height", o + k + 25);
763
+ }, "draw"), S = {
764
+ data: {
765
+ startx: void 0,
766
+ stopx: void 0,
767
+ starty: void 0,
768
+ stopy: void 0
769
+ },
770
+ verticalPos: 0,
771
+ sequenceItems: [],
772
+ init: /* @__PURE__ */ n(function() {
773
+ this.sequenceItems = [], this.data = {
774
+ startx: void 0,
775
+ stopx: void 0,
776
+ starty: void 0,
777
+ stopy: void 0
778
+ }, this.verticalPos = 0;
779
+ }, "init"),
780
+ updateVal: /* @__PURE__ */ n(function(t, e, s, c) {
781
+ t[e] === void 0 ? t[e] = s : t[e] = c(s, t[e]);
782
+ }, "updateVal"),
783
+ updateBounds: /* @__PURE__ */ n(function(t, e, s, c) {
784
+ const r = R().journey, p = this;
785
+ let u = 0;
786
+ function y(g) {
787
+ return /* @__PURE__ */ n(function(x) {
788
+ u++;
789
+ const h = p.sequenceItems.length - u + 1;
790
+ p.updateVal(x, "starty", e - h * r.boxMargin, Math.min), p.updateVal(x, "stopy", c + h * r.boxMargin, Math.max), p.updateVal(S.data, "startx", t - h * r.boxMargin, Math.min), p.updateVal(S.data, "stopx", s + h * r.boxMargin, Math.max), g !== "activation" && (p.updateVal(x, "startx", t - h * r.boxMargin, Math.min), p.updateVal(x, "stopx", s + h * r.boxMargin, Math.max), p.updateVal(S.data, "starty", e - h * r.boxMargin, Math.min), p.updateVal(S.data, "stopy", c + h * r.boxMargin, Math.max));
791
+ }, "updateItemBounds");
792
+ }
793
+ n(y, "updateFn"), this.sequenceItems.forEach(y());
794
+ }, "updateBounds"),
795
+ insert: /* @__PURE__ */ n(function(t, e, s, c) {
796
+ const r = Math.min(t, s), p = Math.max(t, s), u = Math.min(e, c), y = Math.max(e, c);
797
+ this.updateVal(S.data, "startx", r, Math.min), this.updateVal(S.data, "starty", u, Math.min), this.updateVal(S.data, "stopx", p, Math.max), this.updateVal(S.data, "stopy", y, Math.max), this.updateBounds(r, u, p, y);
798
+ }, "insert"),
799
+ bumpVerticalPos: /* @__PURE__ */ n(function(t) {
800
+ this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
801
+ }, "bumpVerticalPos"),
802
+ getVerticalPos: /* @__PURE__ */ n(function() {
803
+ return this.verticalPos;
804
+ }, "getVerticalPos"),
805
+ getBounds: /* @__PURE__ */ n(function() {
806
+ return this.data;
807
+ }, "getBounds")
808
+ }, H = $.sectionFills, st = $.sectionColours, Ht = /* @__PURE__ */ n(function(t, e, s) {
809
+ const c = R().journey;
810
+ let r = "";
811
+ const p = c.height * 2 + c.diagramMarginY, u = s + p;
812
+ let y = 0, g = "#CCC", m = "black", x = 0;
813
+ for (const [h, i] of e.entries()) {
814
+ if (r !== i.section) {
815
+ g = H[y % H.length], x = y % H.length, m = st[y % st.length];
816
+ let l = 0;
817
+ const d = i.section;
818
+ for (let o = h; o < e.length && e[o].section == d; o++)
819
+ l = l + 1;
820
+ const f = {
821
+ x: h * c.taskMargin + h * c.width + P,
822
+ y: 50,
823
+ text: i.section,
824
+ fill: g,
825
+ num: x,
826
+ colour: m,
827
+ taskCount: l
828
+ };
829
+ j.drawSection(t, f, c), r = i.section, y++;
830
+ }
831
+ const a = i.people.reduce((l, d) => (E[d] && (l[d] = E[d]), l), {});
832
+ i.x = h * c.taskMargin + h * c.width + P, i.y = u, i.width = c.diagramMarginX, i.height = c.diagramMarginY, i.colour = m, i.fill = g, i.num = x, i.actors = a, j.drawTask(t, i, c), S.insert(i.x, i.y, i.x + i.width + c.taskMargin, 300 + 5 * 30);
833
+ }
834
+ }, "drawTasks"), at = {
835
+ setConf: Xt,
836
+ draw: Gt
837
+ }, ce = {
838
+ parser: Et,
839
+ db: rt,
840
+ renderer: at,
841
+ styles: jt,
842
+ init: /* @__PURE__ */ n((t) => {
843
+ at.setConf(t.journey), rt.clear();
844
+ }, "init")
845
+ };
846
+ export {
847
+ ce as diagram
848
+ };