@iowarp/clio-coder 0.4.7 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (485) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +29 -0
  3. package/CONTRIBUTING.md +83 -74
  4. package/README.md +66 -45
  5. package/dist/{acp-W3Y3TRHD.js → acp-JWPQZM2D.js} +14 -14
  6. package/dist/{agents-J4ICNLQ3.js → agents-4GCDIRVX.js} +55 -54
  7. package/dist/assets/codewiki.json +1 -1
  8. package/dist/assets/web-notices/@hono__node-server-LICENSE +21 -0
  9. package/dist/assets/web-notices/hono-LICENSE +21 -0
  10. package/dist/{auth-X2UJUMOC.js → auth-SYAKTDQE.js} +22 -22
  11. package/dist/background-OW67WMYR.js +37 -0
  12. package/dist/{builtins-XLXWWSRF.js → builtins-TKS63VNV.js} +4 -4
  13. package/dist/chunk-2JSCCEKO.js +85 -0
  14. package/dist/{chunk-QKWL7SYE.js → chunk-2SXGG2IV.js} +49 -38
  15. package/dist/{chunk-MZHXENL7.js → chunk-2U2U5POA.js} +5 -5
  16. package/dist/{chunk-NCCQ6DVS.js → chunk-2ZWLMA3T.js} +6 -6
  17. package/dist/{chunk-FQOOGXBH.js → chunk-36XSBPXL.js} +7 -7
  18. package/dist/{chunk-5AJPUR72.js → chunk-3IQOZRQ6.js} +7 -7
  19. package/dist/{chunk-4MFBBY2Z.js → chunk-44U2OUSM.js} +3 -3
  20. package/dist/{chunk-5ZSZEYJK.js → chunk-4P6M2TTE.js} +2 -2
  21. package/dist/{chunk-IZYTT3CD.js → chunk-526ABLHD.js} +6 -6
  22. package/dist/{chunk-BO4XV5VX.js → chunk-5C2OQHLR.js} +4 -4
  23. package/dist/chunk-5D2FNBMG.js +185 -0
  24. package/dist/{chunk-M6Z2V6YU.js → chunk-5HULHKT2.js} +5 -5
  25. package/dist/{chunk-PFLOULP3.js → chunk-5UG6EZI3.js} +4 -4
  26. package/dist/{chunk-WN552PKN.js → chunk-5W4FRA5Q.js} +280 -900
  27. package/dist/{chunk-KAFMW7WM.js → chunk-6R5MBXBJ.js} +1 -1
  28. package/dist/{chunk-24S3DN22.js → chunk-6TKOFFGE.js} +4 -4
  29. package/dist/{chunk-YKRJTYNP.js → chunk-6UJ7RDI7.js} +4 -4
  30. package/dist/{chunk-GXIWHXDB.js → chunk-6X7VOCDY.js} +3 -3
  31. package/dist/{chunk-KKEYGFX4.js → chunk-7QQRPB2E.js} +11 -11
  32. package/dist/{chunk-34XHRVKG.js → chunk-ARRUMZ7X.js} +2 -2
  33. package/dist/{chunk-3T4DXWP6.js → chunk-ATB3Q7YO.js} +1 -6
  34. package/dist/chunk-AUHVBIDW.js +19 -0
  35. package/dist/{chunk-L3Z5ANCV.js → chunk-BE4I3UJ2.js} +7 -7
  36. package/dist/chunk-BFPHMSK7.js +169 -0
  37. package/dist/{chunk-LVFANMOH.js → chunk-BHJMMCXS.js} +4 -4
  38. package/dist/{chunk-D2T66PDV.js → chunk-BIY22UUK.js} +35 -203
  39. package/dist/{chunk-VMATUZB6.js → chunk-D55WO5J7.js} +11 -11
  40. package/dist/{chunk-2O2LVQQK.js → chunk-E2NSPYLC.js} +4 -4
  41. package/dist/{chunk-IJMW64DX.js → chunk-EFXMQYI6.js} +32 -32
  42. package/dist/{chunk-GVZFCJHE.js → chunk-EPYATQMG.js} +18 -18
  43. package/dist/{chunk-MZNWZUJM.js → chunk-EXKUF426.js} +11 -11
  44. package/dist/{chunk-IMOD2YPV.js → chunk-F7Y6QTPL.js} +9 -19
  45. package/dist/{chunk-IQCNVLO6.js → chunk-FB3KTE2J.js} +10 -7
  46. package/dist/{chunk-3LXJOICS.js → chunk-FNVPQQYT.js} +2 -2
  47. package/dist/{chunk-UUQ5G6EZ.js → chunk-GEYX2NZ5.js} +2 -2
  48. package/dist/{chunk-CP3HIR5H.js → chunk-GJBJHJNY.js} +19 -18
  49. package/dist/{chunk-LZBMXNLP.js → chunk-GM4TY6VN.js} +43 -6
  50. package/dist/{chunk-WT5TRMO4.js → chunk-GVU4CXPJ.js} +179 -65
  51. package/dist/{chunk-TZ6UVP2H.js → chunk-H5DPSUBB.js} +8 -8
  52. package/dist/{chunk-EUEXGXXR.js → chunk-H77XBUBM.js} +5 -5
  53. package/dist/{config-YXARKGTX.js → chunk-HMGAKB7E.js} +15 -259
  54. package/dist/{chunk-EUZRMP4Y.js → chunk-HP7KJ5O2.js} +19 -19
  55. package/dist/chunk-HVCAY2FH.js +67 -0
  56. package/dist/{chunk-CPXGJI2A.js → chunk-ICYIUNO4.js} +4 -4
  57. package/dist/{chunk-GI5RRMAH.js → chunk-IILXVWJY.js} +7 -7
  58. package/dist/{chunk-MNQN3X6Y.js → chunk-JCVIL6TY.js} +5 -5
  59. package/dist/chunk-JIMWEYWO.js +63 -0
  60. package/dist/{chunk-C3G5PNUO.js → chunk-JLBVCROW.js} +25 -25
  61. package/dist/chunk-JOBN2YQQ.js +176 -0
  62. package/dist/chunk-JOL2QRLE.js +152 -0
  63. package/dist/{chunk-N37QC5FV.js → chunk-JRA6OBHY.js} +5 -5
  64. package/dist/{chunk-C6GEXX4L.js → chunk-JV25I7ID.js} +7 -7
  65. package/dist/{chunk-SEDI5K5B.js → chunk-JYKUMHCQ.js} +16 -16
  66. package/dist/{chunk-UA6W4XFJ.js → chunk-K3W6BF5C.js} +2 -2
  67. package/dist/chunk-K45LHSCI.js +194 -0
  68. package/dist/{chunk-UA3W4FGC.js → chunk-K53E2PTW.js} +5 -5
  69. package/dist/{chunk-VCRVEDUC.js → chunk-K5UJD6MM.js} +5 -5
  70. package/dist/{chunk-65BGHOUR.js → chunk-KGP3UQGJ.js} +5 -5
  71. package/dist/chunk-KKRXONXG.js +43 -0
  72. package/dist/{chunk-LBFQMYS3.js → chunk-KWJXCL2X.js} +5 -3
  73. package/dist/{chunk-RTLNFZMD.js → chunk-L75H5B3B.js} +3 -3
  74. package/dist/{chunk-G4LGUTOE.js → chunk-LLCGGVSW.js} +6 -6
  75. package/dist/{chunk-HRAKUPIH.js → chunk-LZCCBLRC.js} +5 -5
  76. package/dist/{chunk-WURGVOZJ.js → chunk-LZDLYSUN.js} +18 -14
  77. package/dist/{chunk-ISNCCX42.js → chunk-MATCRH3M.js} +7 -6
  78. package/dist/{chunk-BAU36233.js → chunk-MEHBW2SP.js} +7 -7
  79. package/dist/{chunk-BQQ5MXUC.js → chunk-MUXNDNMZ.js} +3 -3
  80. package/dist/{chunk-NO7J45X6.js → chunk-MWMW53WW.js} +90 -51
  81. package/dist/chunk-MZDPF35R.js +45 -0
  82. package/dist/{chunk-P4DL2LM5.js → chunk-MZKYVIWW.js} +8 -119
  83. package/dist/{chunk-T334FW2H.js → chunk-O2QJDRWP.js} +5 -5
  84. package/dist/{chunk-T7QQBNLH.js → chunk-O3HSB2YL.js} +9 -7
  85. package/dist/{chunk-WB7POC6M.js → chunk-OEMFEL26.js} +6 -6
  86. package/dist/{chunk-77CZRFTE.js → chunk-OPC4DQD6.js} +2 -2
  87. package/dist/{chunk-4UHVS5T7.js → chunk-ORRNGQDV.js} +8 -8
  88. package/dist/{chunk-TZHN5ITX.js → chunk-P4JS3MH5.js} +5 -5
  89. package/dist/{chunk-WBVKKTUT.js → chunk-P7GTE4FX.js} +2 -2
  90. package/dist/{chunk-6TAATXXH.js → chunk-PAQVETLA.js} +6 -6
  91. package/dist/{chunk-6CA2BHOR.js → chunk-PFZJMXIY.js} +4 -4
  92. package/dist/{chunk-4QKAITQT.js → chunk-PGEFOTJB.js} +70 -7
  93. package/dist/{chunk-MBJO5VNZ.js → chunk-PJ5H5B7A.js} +25 -25
  94. package/dist/{chunk-DO7M3LSX.js → chunk-PMUUAABD.js} +43 -96
  95. package/dist/{chunk-A67NR5AT.js → chunk-Q32C6AWI.js} +11 -8
  96. package/dist/{chunk-ECOMVOHP.js → chunk-QGIC5SX5.js} +2 -2
  97. package/dist/{chunk-5CMARGPF.js → chunk-QLAGXTTV.js} +7 -2
  98. package/dist/{chunk-GFQ7P2UF.js → chunk-QLKCCC2J.js} +9 -9
  99. package/dist/{chunk-SELG4SUR.js → chunk-QWUSS2QP.js} +7 -4
  100. package/dist/{chunk-P5SC4DLJ.js → chunk-QYSAZMSH.js} +2 -2
  101. package/dist/{fleet-decisions-S3PTZV2D.js → chunk-R5NRX5N4.js} +5 -41
  102. package/dist/{chunk-DLIYANB7.js → chunk-RAUOKUZV.js} +11 -11
  103. package/dist/{chunk-UFYNOQK4.js → chunk-RBES4TCZ.js} +7 -7
  104. package/dist/{chunk-T52TPHYC.js → chunk-RFULVPBX.js} +4 -4
  105. package/dist/{chunk-TLTGZTXI.js → chunk-RKFNU5UA.js} +3 -3
  106. package/dist/{chunk-T4TY5GG3.js → chunk-RM3XJX7P.js} +3 -3
  107. package/dist/{chunk-6YA46L5A.js → chunk-RNLAPBJL.js} +2 -2
  108. package/dist/chunk-RPMNIFRY.js +65 -0
  109. package/dist/{chunk-DACXIVVF.js → chunk-RRZFRIJP.js} +5 -5
  110. package/dist/{chunk-CE64C5K5.js → chunk-RXI7K4J5.js} +61 -61
  111. package/dist/{chunk-CULVKYTK.js → chunk-STC6CWUZ.js} +5 -5
  112. package/dist/{chunk-6YHPAAZR.js → chunk-TEHVMHOK.js} +3 -3
  113. package/dist/{chunk-VTYHHQ57.js → chunk-TOPICHGR.js} +2 -2
  114. package/dist/{chunk-UWD3JD5X.js → chunk-UB33F3YW.js} +10 -10
  115. package/dist/{chunk-TN5FW4XY.js → chunk-UDAK6GR2.js} +12 -9
  116. package/dist/chunk-USBBEKHW.js +177 -0
  117. package/dist/{chunk-6CB2IL4N.js → chunk-W5RM7YAH.js} +1 -1
  118. package/dist/{chunk-6LRLOJHQ.js → chunk-W7KNI3F5.js} +11 -62
  119. package/dist/chunk-WFTSK7N3.js +637 -0
  120. package/dist/{chunk-YPRSNUTC.js → chunk-WJWNZXRM.js} +2 -2
  121. package/dist/chunk-WS4FOGLY.js +686 -0
  122. package/dist/{chunk-ZGIGW4ZG.js → chunk-WTZVSMQZ.js} +5 -5
  123. package/dist/{chunk-XR3XJN2M.js → chunk-WWRV5RJI.js} +4 -4
  124. package/dist/{chunk-24TOGHPO.js → chunk-X6FLVUM5.js} +4 -4
  125. package/dist/chunk-XC5POIL4.js +68 -0
  126. package/dist/{chunk-XZ6UFQ52.js → chunk-XTLJDC2X.js} +22 -17
  127. package/dist/{chunk-7EEGBKV4.js → chunk-YGIV24MF.js} +8 -8
  128. package/dist/{chunk-RXFPB32E.js → chunk-YJCCMYYT.js} +2 -2
  129. package/dist/{chunk-4N2RZ4TO.js → chunk-YKIIWURD.js} +3 -3
  130. package/dist/{chunk-USZA7GWL.js → chunk-YQ3GFEUY.js} +2 -2
  131. package/dist/{chunk-KS7ETA3P.js → chunk-YXANQGCX.js} +6 -6
  132. package/dist/{chunk-HOX4YZ2K.js → chunk-YXFKLMX2.js} +5 -5
  133. package/dist/chunk-ZST3FRCV.js +132 -0
  134. package/dist/cli/index.js +39 -37
  135. package/dist/{clio-L2P7S2R2.js → clio-BPBAPZGA.js} +9 -9
  136. package/dist/{code-nav-B5LNX4KU.js → code-nav-KBQ3RIFK.js} +33 -33
  137. package/dist/{components-63MMQKUT.js → components-6DKAXWFN.js} +10 -10
  138. package/dist/config-FWL5JK2H.js +270 -0
  139. package/dist/config-graph-ACDB26L2.js +156 -0
  140. package/dist/{configure-LMVQJ46J.js → configure-ZIZ4YV62.js} +48 -48
  141. package/dist/{context-7HJEWTTP.js → context-EZZPT2ZV.js} +49 -49
  142. package/dist/{context-YG2LZDYZ.js → context-VIL5MFRH.js} +86 -84
  143. package/dist/{context-XSZKKFBW.js → context-Z3GOBHDK.js} +16 -16
  144. package/dist/{context-clear-AC5NXHM2.js → context-clear-ZPB3L7MN.js} +72 -70
  145. package/dist/{context-index-KKTPRV5G.js → context-index-W6A4V7OC.js} +4 -4
  146. package/dist/{context-map-T7ROR5D5.js → context-map-DKL3QT6D.js} +3 -3
  147. package/dist/{context-working-set-F4Q4J3NS.js → context-working-set-2GLBVF7L.js} +23 -22
  148. package/dist/{detail-H73BEF2N.js → detail-VSBWYSGZ.js} +73 -71
  149. package/dist/{dispatch-runner-3RY5FSJC.js → dispatch-runner-EEEHGKX4.js} +78 -76
  150. package/dist/docs-VMMWFVHL.js +101 -0
  151. package/dist/{doctor-EQYJOGUG.js → doctor-V5L4IQGP.js} +63 -62
  152. package/dist/{eval-4P7O6CCE.js → eval-VJYJ2BV3.js} +80 -65
  153. package/dist/{eval-inventory-QOYZERXJ.js → eval-inventory-CX24K2JT.js} +5 -60
  154. package/dist/evals-J2H5V6DD.js +104 -0
  155. package/dist/{evidence-D6GUSYJW.js → evidence-POWAEBEW.js} +72 -70
  156. package/dist/evidence-XCCCLS36.js +242 -0
  157. package/dist/{evidence-O76QF7TZ.js → evidence-Y35YSXH6.js} +80 -78
  158. package/dist/{evolve-H47BCETS.js → evolve-GPG72VB6.js} +74 -72
  159. package/dist/{extensions-NNL3ZOCU.js → extensions-YIZ7W3DA.js} +12 -11
  160. package/dist/fleet-2MDCQ2VK.js +264 -0
  161. package/dist/{fleet-KMNS6NOM.js → fleet-W2AF3TOJ.js} +127 -123
  162. package/dist/{fleet-commands-DOWSYCBX.js → fleet-commands-WS56G26H.js} +11 -11
  163. package/dist/fleet-decisions-MYGZ3JW7.js +52 -0
  164. package/dist/{fleet-graph-F2DE2TME.js → fleet-graph-ELTBXBAV.js} +22 -22
  165. package/dist/{fleet-inspect-EN2Q6IVB.js → fleet-inspect-45IK73L4.js} +84 -248
  166. package/dist/{fleet-preflight-FRLETDD3.js → fleet-preflight-T5NCZKHE.js} +4 -4
  167. package/dist/{fleet-validate-B2XDLS57.js → fleet-validate-VG4JBLA4.js} +26 -26
  168. package/dist/{fleet-verify-4JKUWGJ7.js → fleet-verify-VTSABAYO.js} +72 -70
  169. package/dist/{fleet-view-BHJFW26B.js → fleet-view-XC7WMKSS.js} +75 -73
  170. package/dist/{init-XAT5N5YM.js → init-VTJNNTIP.js} +95 -92
  171. package/dist/install-6PIF6F6W.js +19 -0
  172. package/dist/{interop-FVECHFKG.js → interop-IU6BNA7C.js} +25 -25
  173. package/dist/{inventory-7KFQGLCV.js → inventory-QPQUTUUZ.js} +75 -73
  174. package/dist/{library-NY2XOT75.js → library-HUTAS57T.js} +33 -33
  175. package/dist/{library-QAPAO23R.js → library-LF7DLU6S.js} +13 -13
  176. package/dist/library-Q3NWL5CM.js +75 -0
  177. package/dist/{library-import-5Y6MAS3R.js → library-import-PPW4YUC5.js} +25 -25
  178. package/dist/{library-inventory-JT6HWITQ.js → library-inventory-DIRVFRZU.js} +19 -19
  179. package/dist/{library-validation-EQUH25DC.js → library-validation-XHUZ3INE.js} +17 -17
  180. package/dist/{memory-DYVTTCP6.js → memory-Z2LSKNV6.js} +74 -72
  181. package/dist/{models-MASFJ6Y2.js → models-3FTREYPY.js} +53 -52
  182. package/dist/{monitor-YMP4NXJJ.js → monitor-HF2MQRB3.js} +83 -80
  183. package/dist/{orchestrator-AFQRRTEI.js → orchestrator-UYPA6W4S.js} +498 -358
  184. package/dist/{panes-NICTHQCV.js → panes-736XB73K.js} +14 -14
  185. package/dist/{panes-D3Y2KFG5.js → panes-C4P3PIWT.js} +4 -4
  186. package/dist/{paths-PSFAUIGO.js → paths-JQ4QYIYB.js} +6 -6
  187. package/dist/{preload-5Q7VXRFJ.js → preload-XSLRYH3Y.js} +72 -70
  188. package/dist/{reset-7NKZK7JN.js → reset-V7QSPZYE.js} +9 -9
  189. package/dist/{resources-NILSIZAT.js → resources-OJGDFHYT.js} +22 -22
  190. package/dist/{run-BPZGEBZV.js → run-T354SMDW.js} +129 -125
  191. package/dist/settings-MWZXO6RV.js +72 -0
  192. package/dist/{share-EZ6ERBMH.js → share-Y5ZKJPND.js} +26 -26
  193. package/dist/{skills-BTVVNYVM.js → skills-4GLZC4LN.js} +28 -28
  194. package/dist/{skills-eval-UY34MNK7.js → skills-eval-L5T7GODM.js} +87 -85
  195. package/dist/{skills-inventory-JDHSIA7I.js → skills-inventory-LASKXEZI.js} +22 -22
  196. package/dist/{slash-commands-K4FNQ2AT.js → slash-commands-OIMRU36D.js} +49 -49
  197. package/dist/{steer-2B3EQGFH.js → steer-KMAM2Y2C.js} +4 -4
  198. package/dist/{support-L2SOL3IE.js → support-AWC3XKPX.js} +8 -8
  199. package/dist/system-CD75NYBU.js +116 -0
  200. package/dist/{targets-44VKGFLN.js → targets-VSZX2J2S.js} +66 -65
  201. package/dist/{tasks-3KODKFU7.js → tasks-AN567LYH.js} +14 -14
  202. package/dist/{terminal-lease-LXA7MMPO.js → terminal-lease-6KTWNHVY.js} +3 -3
  203. package/dist/{tools-3UB7TEVR.js → tools-AGRK3V5J.js} +13 -13
  204. package/dist/{trace-TAMIU4OJ.js → trace-P4MQZD33.js} +18 -67
  205. package/dist/{uninstall-QYVRPEM4.js → uninstall-BRUTEPIC.js} +37 -12
  206. package/dist/{upgrade-7PMKM2JH.js → upgrade-SBCGHQGJ.js} +22 -21
  207. package/dist/{usage-6EQV7EQK.js → usage-BIDVTO6V.js} +93 -87
  208. package/dist/{verifiers-JLITWSHU.js → verifiers-LTGCAMXS.js} +12 -12
  209. package/dist/{verify-T7NAEVIG.js → verify-OZU4LLNP.js} +9 -9
  210. package/dist/web/client/THIRD_PARTY_LICENSES.md +1809 -0
  211. package/dist/web/client/assets/abnfDiagram-VCTEODGH-C5wfoHm3.js +1 -0
  212. package/dist/web/client/assets/arc-oH91sfLl.js +1 -0
  213. package/dist/web/client/assets/architecture-7GRP2DOG-EGozsYEO.js +1 -0
  214. package/dist/web/client/assets/architectureDiagram-5GKGNRK7-z9FokbJl.js +36 -0
  215. package/dist/web/client/assets/array-BifhSqXX.js +1 -0
  216. package/dist/web/client/assets/atkinson-hyperlegible-next-latin-ext-wght-normal-C6vrW8VD.woff2 +0 -0
  217. package/dist/web/client/assets/atkinson-hyperlegible-next-latin-wght-normal-BcXVPD7q.woff2 +0 -0
  218. package/dist/web/client/assets/blockDiagram-I7D4REHJ-wi0_CYHL.js +129 -0
  219. package/dist/web/client/assets/c4Diagram-7LVT6UL2-DV7NYc2W.js +38 -0
  220. package/dist/web/client/assets/channel-CiUWbHN9.js +1 -0
  221. package/dist/web/client/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
  222. package/dist/web/client/assets/chunk-4HAMMTFA-Bhsegh3F.js +62 -0
  223. package/dist/web/client/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
  224. package/dist/web/client/assets/chunk-75Z2AOVW-RQCckcQG.js +2 -0
  225. package/dist/web/client/assets/chunk-DU6HZSFF-C5USiOAy.js +125 -0
  226. package/dist/web/client/assets/chunk-F27PBJKO-BcNqv2x1.js +1 -0
  227. package/dist/web/client/assets/chunk-FOHPRMQF-CoA4358r.js +161 -0
  228. package/dist/web/client/assets/chunk-GMAD6QVW-Bq8JWiZT.js +72 -0
  229. package/dist/web/client/assets/chunk-GVQU2GXP-DbchrAeJ.js +1 -0
  230. package/dist/web/client/assets/chunk-IMKFNOWR-DrpvjocK.js +231 -0
  231. package/dist/web/client/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
  232. package/dist/web/client/assets/chunk-L3NEJ4N5-DHLmTnCe.js +1 -0
  233. package/dist/web/client/assets/chunk-OSK3NFVY-CsRbtN9n.js +10 -0
  234. package/dist/web/client/assets/chunk-P2QGCYS3-aqPbxoMh.js +1 -0
  235. package/dist/web/client/assets/chunk-POPQ4Y6H-Dl5vw0h0.js +1 -0
  236. package/dist/web/client/assets/chunk-PWAF6VOD-D7OBRSdO.js +1 -0
  237. package/dist/web/client/assets/chunk-SHT3W25Y-CdKCIwuB.js +168 -0
  238. package/dist/web/client/assets/chunk-SVP7TREG-B94Nu_1-.js +88 -0
  239. package/dist/web/client/assets/chunk-TICWLB2K-jjRQI_hk.js +206 -0
  240. package/dist/web/client/assets/chunk-XXDRQBXY-azkbKE37.js +1 -0
  241. package/dist/web/client/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
  242. package/dist/web/client/assets/classDiagram-ZZMXUADV-CMODalmo.js +1 -0
  243. package/dist/web/client/assets/classDiagram-v2-VYDZK3BY-CMODalmo.js +1 -0
  244. package/dist/web/client/assets/commit-mono-latin-400-normal-s0S3qwFW.woff +0 -0
  245. package/dist/web/client/assets/commit-mono-latin-400-normal-wzhe4RuD.woff2 +0 -0
  246. package/dist/web/client/assets/cose-bilkent-JH36ORCC-RbQL23qS.js +1 -0
  247. package/dist/web/client/assets/cynefin-OW5HDTMX--i9RDU5f.js +1 -0
  248. package/dist/web/client/assets/cynefinDiagram-5FMLGOSQ-cRcvyBdp.js +62 -0
  249. package/dist/web/client/assets/cytoscape.esm-c2aL46s-.js +321 -0
  250. package/dist/web/client/assets/dagre-C-rnJpZF.js +1 -0
  251. package/dist/web/client/assets/dagre-GXQ25YYZ-C9mZmAPe.js +4 -0
  252. package/dist/web/client/assets/defaultLocale-BFoDCU3G.js +1 -0
  253. package/dist/web/client/assets/diagram-S7CK7UJ4-Oj_zlLDY.js +30 -0
  254. package/dist/web/client/assets/diagram-UQ7AKVKN-BWKbbfcR.js +41 -0
  255. package/dist/web/client/assets/diagram-VSXAHHWV-C3N3f7DO.js +3 -0
  256. package/dist/web/client/assets/diagram-VX7I27RA-CtDKDAWe.js +24 -0
  257. package/dist/web/client/assets/diagram-Z3DM3KII-B8bkBRCz.js +24 -0
  258. package/dist/web/client/assets/dist-D0_q-A2b.js +1 -0
  259. package/dist/web/client/assets/ebnfDiagram-PWID7BFC-CskW-Whx.js +1 -0
  260. package/dist/web/client/assets/erDiagram-RLTQ6QDP-C-83cgCW.js +99 -0
  261. package/dist/web/client/assets/eventmodeling-NTZA5JFV-DjVq8wKU.js +1 -0
  262. package/dist/web/client/assets/flowDiagram-HODETNUW-BUiCBGXt.js +1 -0
  263. package/dist/web/client/assets/ganttDiagram-EL5Y4UJY-B2lb8lvF.js +292 -0
  264. package/dist/web/client/assets/gitGraph-4MIJSDKK-B40cQtBE.js +1 -0
  265. package/dist/web/client/assets/gitGraphDiagram-WWUBYQGX-CH-7P7Di.js +106 -0
  266. package/dist/web/client/assets/graphlib-DS17s2tU.js +1 -0
  267. package/dist/web/client/assets/index-Dsi52apB.css +1 -0
  268. package/dist/web/client/assets/index-FSIC94pi.js +83 -0
  269. package/dist/web/client/assets/info-A6RAGUB7-eCCE9D_Q.js +1 -0
  270. package/dist/web/client/assets/infoDiagram-27XIBGKW-DRnvqMjM.js +2 -0
  271. package/dist/web/client/assets/init-C-OQMol4.js +1 -0
  272. package/dist/web/client/assets/ishikawaDiagram-5VMMS53U-DBA_55wp.js +70 -0
  273. package/dist/web/client/assets/journeyDiagram-3NMN7TZE-C-ewpNl7.js +139 -0
  274. package/dist/web/client/assets/kanban-definition-UXKFOSKX-B1taGsu0.js +89 -0
  275. package/dist/web/client/assets/katex-ZlcWpGUi.js +257 -0
  276. package/dist/web/client/assets/line-lZ0kyxDI.js +1 -0
  277. package/dist/web/client/assets/linear-DIc8FgZj.js +1 -0
  278. package/dist/web/client/assets/mermaid-parser.core-SXolxpXw.js +7 -0
  279. package/dist/web/client/assets/mermaid.core-DXgQtkNg.js +44 -0
  280. package/dist/web/client/assets/mindmap-definition-YA3MSWOX-DXJas9K7.js +96 -0
  281. package/dist/web/client/assets/newsreader-latin-ext-wght-normal-C-3rgBeH.woff2 +0 -0
  282. package/dist/web/client/assets/newsreader-latin-wght-normal-CCVVNp6i.woff2 +0 -0
  283. package/dist/web/client/assets/newsreader-vietnamese-wght-normal-Czsa-EzN.woff2 +0 -0
  284. package/dist/web/client/assets/ordinal-BDEzSJ7C.js +1 -0
  285. package/dist/web/client/assets/packet-AYTQ26CC-OqVl_07o.js +1 -0
  286. package/dist/web/client/assets/path-fybaL0A-.js +1 -0
  287. package/dist/web/client/assets/pegDiagram-XKGWAZYB-CPE_zdfN.js +1 -0
  288. package/dist/web/client/assets/pie-WAS4IAKB-DAxnMBLe.js +1 -0
  289. package/dist/web/client/assets/pieDiagram-E7YTZNPT-Uwjpufxv.js +39 -0
  290. package/dist/web/client/assets/prism-bash-D6zCJ74D.js +1 -0
  291. package/dist/web/client/assets/prism-c-04YixN25.js +1 -0
  292. package/dist/web/client/assets/prism-clike-DapgWyxx.js +1 -0
  293. package/dist/web/client/assets/prism-core-BngLtbUd.js +1 -0
  294. package/dist/web/client/assets/prism-cpp-C-lJbC-6.js +1 -0
  295. package/dist/web/client/assets/prism-css-CPgOzxXp.js +1 -0
  296. package/dist/web/client/assets/prism-diff-BF8m0_mq.js +3 -0
  297. package/dist/web/client/assets/prism-docker-DkT6yOFj.js +1 -0
  298. package/dist/web/client/assets/prism-fortran-Be5x3y1V.js +1 -0
  299. package/dist/web/client/assets/prism-go-C_8qAH5n.js +1 -0
  300. package/dist/web/client/assets/prism-ini-BESK3y0r.js +1 -0
  301. package/dist/web/client/assets/prism-javascript-BnO-swvr.js +1 -0
  302. package/dist/web/client/assets/prism-json-Dp_-W-Hv.js +1 -0
  303. package/dist/web/client/assets/prism-jsx-D-D0NWtC.js +1 -0
  304. package/dist/web/client/assets/prism-julia-DIjOgiAV.js +1 -0
  305. package/dist/web/client/assets/prism-latex-DNMbqcH_.js +1 -0
  306. package/dist/web/client/assets/prism-makefile-CRKWLQ8l.js +1 -0
  307. package/dist/web/client/assets/prism-markdown-C0FPJ1Iz.js +1 -0
  308. package/dist/web/client/assets/prism-markup-Cp04rIa1.js +1 -0
  309. package/dist/web/client/assets/prism-matlab-D-nk08al.js +1 -0
  310. package/dist/web/client/assets/prism-python-CfiSVtM6.js +1 -0
  311. package/dist/web/client/assets/prism-r-QmNGR8LX.js +1 -0
  312. package/dist/web/client/assets/prism-rust-Bu9N8X3N.js +1 -0
  313. package/dist/web/client/assets/prism-shell-session-Be4UuYoM.js +1 -0
  314. package/dist/web/client/assets/prism-sql-CYhVDMEE.js +1 -0
  315. package/dist/web/client/assets/prism-toml-DKb54GAT.js +1 -0
  316. package/dist/web/client/assets/prism-tsx-p6J2Kc_4.js +1 -0
  317. package/dist/web/client/assets/prism-typescript-BMqONzxf.js +1 -0
  318. package/dist/web/client/assets/prism-yaml-C0JHu8gr.js +1 -0
  319. package/dist/web/client/assets/purify.es-ChwZkWde.js +3 -0
  320. package/dist/web/client/assets/quadrantDiagram-AXDQQJYC-Bjs4yjgs.js +7 -0
  321. package/dist/web/client/assets/radar-RG4KPBEZ-CuCKjHM3.js +1 -0
  322. package/dist/web/client/assets/railroad-74A4TZTK-CnQK-Cc1.js +1 -0
  323. package/dist/web/client/assets/railroad-abnf-HS5TGJTU-BcW01NZG.js +1 -0
  324. package/dist/web/client/assets/railroad-ebnf-LZEXJU2U-B7YCEDDd.js +1 -0
  325. package/dist/web/client/assets/railroad-peg-WCYAUIDC-DjNZbSTZ.js +1 -0
  326. package/dist/web/client/assets/railroadDiagram-O6MQD6OU-BDDIPNLL.js +1 -0
  327. package/dist/web/client/assets/requirementDiagram-BXWQKSXE-B5Ydyxc1.js +84 -0
  328. package/dist/web/client/assets/rough.esm-Dy-Kn_BL.js +1 -0
  329. package/dist/web/client/assets/sankeyDiagram-P5KCCOFB-Bw2Qym75.js +40 -0
  330. package/dist/web/client/assets/sequenceDiagram-WJ2MYXX4-BZf36nO0.js +162 -0
  331. package/dist/web/client/assets/sizeCapture-INFHLROL-B0uUizjq.js +1 -0
  332. package/dist/web/client/assets/src-yeptRXpt.js +1 -0
  333. package/dist/web/client/assets/stateDiagram-D77RDMKH-DnH6JRkp.js +1 -0
  334. package/dist/web/client/assets/stateDiagram-v2-MP3YSRHH-C7QtHeK4.js +1 -0
  335. package/dist/web/client/assets/swimlanes-42K2YHIH-D9PZmtZg.js +1 -0
  336. package/dist/web/client/assets/swimlanesDiagram-VR7AAH4N-CBZlPFky.js +8 -0
  337. package/dist/web/client/assets/timeline-definition-24CTP7MA-CrkZZBo7.js +120 -0
  338. package/dist/web/client/assets/treeView-Q6P3EWNA-C9zDShoC.js +1 -0
  339. package/dist/web/client/assets/treemap-WGGIJYW6-B-plj9yK.js +1 -0
  340. package/dist/web/client/assets/vennDiagram-4TSXK5OY-VeOdaphN.js +34 -0
  341. package/dist/web/client/assets/wardley-WFR3VGLG-Wl1P_m6L.js +1 -0
  342. package/dist/web/client/assets/wardleyDiagram-VM6X3IG4-B85-R9t2.js +78 -0
  343. package/dist/web/client/assets/xychartDiagram-S5SC5T6Z-BrD8OW8m.js +7 -0
  344. package/dist/web/client/clio-coder-logo.webp +0 -0
  345. package/dist/web/client/icon-192.png +0 -0
  346. package/dist/web/client/icon-512.png +0 -0
  347. package/dist/web/client/index.html +4 -0
  348. package/dist/web/client/manifest.webmanifest +15 -0
  349. package/dist/web/client/offline.css +55 -0
  350. package/dist/web/client/offline.html +5 -0
  351. package/dist/web/client/offline.js +27 -0
  352. package/dist/web/client/sw.js +34 -0
  353. package/dist/web/ops-worker.js +37 -0
  354. package/dist/web/reads-worker.js +1726 -0
  355. package/dist/web/server.js +8499 -0
  356. package/dist/web-EU6ATJWA.js +13 -0
  357. package/dist/{web-fetch-W4TNW4Q7.js → web-fetch-U22Q7HV4.js} +3 -3
  358. package/dist/{wiki-generate-T2TJQJUA.js → wiki-generate-LZRLFG6I.js} +98 -95
  359. package/dist/{with-panes-CHFC7HGI.js → with-panes-X5CZOGML.js} +9 -9
  360. package/dist/worker/entry.js +68 -68
  361. package/docs/README.md +27 -26
  362. package/docs/architecture/acp.md +5 -9
  363. package/docs/architecture/alcf-provider.md +0 -3
  364. package/docs/architecture/architecture.md +0 -3
  365. package/docs/architecture/artifact-placement.md +0 -3
  366. package/docs/architecture/artifact-versions.md +0 -3
  367. package/docs/architecture/capacity-and-scheduling.md +0 -3
  368. package/docs/architecture/context-engine.md +0 -3
  369. package/docs/architecture/context-working-set.md +0 -3
  370. package/docs/architecture/dispatch-architecture-rationale.md +0 -3
  371. package/docs/architecture/dispatch-typed-intent.md +0 -3
  372. package/docs/architecture/evidence-and-memory.md +0 -3
  373. package/docs/architecture/library.md +0 -2
  374. package/docs/architecture/middleware-and-components.md +0 -3
  375. package/docs/architecture/model-catalog.md +1 -4
  376. package/docs/architecture/observability.md +0 -3
  377. package/docs/architecture/pi-boundary.md +6 -9
  378. package/docs/architecture/prompt-envelope-and-tools.md +1 -4
  379. package/docs/architecture/provider-adapter-cookbook.md +1 -4
  380. package/docs/architecture/safety-model.md +0 -3
  381. package/docs/architecture/session-lifecycle.md +0 -3
  382. package/docs/architecture/time-conventions.md +0 -3
  383. package/docs/architecture/trace-store.md +28 -20
  384. package/docs/architecture/tui-design.md +1 -4
  385. package/docs/architecture/worker-context.md +1 -3
  386. package/docs/architecture/worker-dispatch-mechanics.md +1 -4
  387. package/docs/guide/authoring-plugins.md +1 -3
  388. package/docs/guide/built-in-agents.md +0 -3
  389. package/docs/guide/commands-and-modes.md +2 -6
  390. package/docs/guide/configuration-and-targets.md +197 -4
  391. package/docs/guide/configuration-reference.md +9 -4
  392. package/docs/guide/environment-variables.md +0 -3
  393. package/docs/guide/exit-codes-and-output.md +0 -3
  394. package/docs/guide/extensions-and-sharing.md +0 -3
  395. package/docs/guide/fleet-dispatch.md +0 -3
  396. package/docs/guide/glossary.md +0 -3
  397. package/docs/guide/harness-extensions.md +0 -2
  398. package/docs/guide/installation-and-lifecycle.md +1 -4
  399. package/docs/guide/interop.md +0 -2
  400. package/docs/guide/panes-and-files.md +0 -3
  401. package/docs/guide/plugins.md +0 -3
  402. package/docs/guide/proactive-memory.md +0 -3
  403. package/docs/guide/resource-library.md +0 -2
  404. package/docs/guide/skills-marketplace.md +0 -2
  405. package/docs/guide/tool-usage.md +0 -3
  406. package/docs/guide/troubleshooting.md +0 -3
  407. package/docs/history/config-knobs-audit.md +0 -3
  408. package/docs/history/release-cut-checklist.md +0 -3
  409. package/docs/process/development-pipeline.md +0 -3
  410. package/docs/process/documentation-coverage.md +3 -3
  411. package/docs/process/documentation-guide.md +15 -22
  412. package/docs/process/eval-runner.md +0 -3
  413. package/docs/process/evals-internal.md +0 -3
  414. package/docs/process/evolution.md +0 -3
  415. package/docs/process/fleet-demo-runbook.md +0 -3
  416. package/docs/process/git-commit-provenance.md +0 -3
  417. package/docs/process/performance-methodology.md +1 -4
  418. package/docs/process/release-cut-checklist.md +114 -221
  419. package/docs/process/scientific-validation.md +1 -4
  420. package/library/registry.yaml +2 -2
  421. package/library/skills/meta/clio-coder-test/SKILL.md +25 -15
  422. package/library/skills/meta/clio-coder-test/evals.md +16 -2
  423. package/library/skills/meta/clio-coder-test/plugin.json +1 -1
  424. package/library/skills/meta/clio-coder-test/references/test-map.md +19 -18
  425. package/library/skills/registry.yaml +2 -2
  426. package/library/skills/skill-marketplace.json +1 -1
  427. package/package.json +13 -11
  428. package/src/cli/docs.ts +65 -328
  429. package/src/cli/index.ts +3 -1
  430. package/src/cli/trace.ts +4 -65
  431. package/src/cli/uninstall.ts +26 -0
  432. package/src/cli/usage.ts +3 -0
  433. package/src/cli/web.ts +79 -0
  434. package/src/core/bus-events.ts +3 -4
  435. package/src/core/config.ts +71 -0
  436. package/src/core/domain-loader.ts +37 -28
  437. package/src/core/termination.ts +13 -9
  438. package/src/domains/agents/contract.ts +1 -1
  439. package/src/domains/agents/extension.ts +18 -10
  440. package/src/domains/config/extension.ts +5 -4
  441. package/src/domains/dispatch/extension.ts +75 -12
  442. package/src/domains/dispatch/index.ts +1 -0
  443. package/src/domains/dispatch/orphan-recovery.ts +1 -0
  444. package/src/domains/dispatch/receipt-integrity.ts +3 -0
  445. package/src/domains/dispatch/state.ts +1 -2
  446. package/src/domains/dispatch/types.ts +2 -0
  447. package/src/domains/eval/metrics/tracked.ts +22 -2
  448. package/src/domains/extensions/operator-runtime.ts +3 -1
  449. package/src/domains/middleware/hooks.ts +2 -2
  450. package/src/domains/observability/background-memory-usage.ts +3 -0
  451. package/src/domains/observability/compaction-usage.ts +2 -0
  452. package/src/domains/observability/cost.ts +5 -0
  453. package/src/domains/observability/extension.ts +1 -0
  454. package/src/domains/observability/out-of-turn-usage.ts +2 -0
  455. package/src/domains/observability/trace-store.ts +65 -5
  456. package/src/domains/prompts/extension.ts +4 -17
  457. package/src/domains/providers/cache-deployment.ts +147 -0
  458. package/src/domains/providers/catalog.ts +12 -7
  459. package/src/domains/providers/extension.ts +27 -5
  460. package/src/domains/providers/index.ts +1 -0
  461. package/src/domains/providers/plugins.ts +3 -13
  462. package/src/domains/providers/runtimes/common/local-synth.ts +4 -0
  463. package/src/domains/providers/types/target-descriptor.ts +17 -0
  464. package/src/domains/session/compaction/compact.ts +4 -1
  465. package/src/domains/session/entries.ts +1 -0
  466. package/src/domains/session/usage.ts +6 -7
  467. package/src/engine/acp/server.ts +11 -0
  468. package/src/engine/ai.ts +2 -0
  469. package/src/engine/apis/openai-completions.ts +9 -4
  470. package/src/engine/prewarm.ts +232 -0
  471. package/src/engine/provider-diagnostics.ts +6 -1
  472. package/src/entry/orchestrator.ts +20 -16
  473. package/src/interactive/chat-loop-messages.ts +3 -0
  474. package/src/interactive/chat-loop.ts +2 -8
  475. package/src/interactive/prewarm.ts +11 -197
  476. package/src/interactive/session-usage-reseed.ts +2 -0
  477. package/src/interactive/side-question.ts +2 -0
  478. package/src/interactive/turn-context.ts +1 -0
  479. package/src/interactive/turn-persistence.ts +3 -0
  480. package/src/interactive/turn-prewarm.ts +126 -19
  481. package/src/interactive/turn-runtime.ts +14 -0
  482. package/src/tools/builtin-tool-catalog.ts +8 -4
  483. package/src/tools/registry.ts +12 -2
  484. package/src/worker/spec-contract.ts +27 -0
  485. package/dist/docs-BL7ROUFN.js +0 -292
@@ -0,0 +1 @@
1
+ import"./chunk-FOHPRMQF-CoA4358r.js";import{w as e}from"./mermaid-parser.core-SXolxpXw.js";export{e as createInfoServices};
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./mermaid-parser.core-SXolxpXw.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-yeptRXpt.js";import{c as r}from"./chunk-DU6HZSFF-C5USiOAy.js";import{f as i}from"./mermaid.core-DXgQtkNg.js";var a={parse:t(async t=>{let r=await e(`info`,t);n.debug(r)},`parse`)},o={version:`11.17.2`},s={parser:a,db:{getVersion:t(()=>o.version,`getVersion`)},renderer:{draw:t((e,t,a)=>{n.debug(`rendering info diagram
2
+ `+e);let o=i(t);r(o,100,400,!0),o.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${a}`)},`draw`)}};export{s as diagram};
@@ -0,0 +1 @@
1
+ function e(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}export{e as t};
@@ -0,0 +1,70 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-yeptRXpt.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-C5USiOAy.js";import{p as d}from"./chunk-75Z2AOVW-RQCckcQG.js";import{t as f}from"./rough.esm-Dy-Kn_BL.js";import{f as p}from"./mermaid.core-DXgQtkNg.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim())}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
+ `+h.showPosition()+`
3
+ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},`anonymous`),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}})();function g(){this.yy={}}return e(g,`Parser`),g.prototype=h,h.Parser=g,new g})();m.parser=m;var h=m,g=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{e(this,`IshikawaDB`)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,i()}getRoot(){return this.root}addNode(e,t){let r=o.sanitizeText(t,l());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],n(r);return}this.baseLevel??=e;let i=e-this.baseLevel+1;for(i<=0&&(i=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=i;)this.stack.pop();let a=this.stack[this.stack.length-1].node,s={text:r,children:[]};a.children.push(s),this.stack.push({level:i,node:s})}getAccTitle(){return u()}setAccTitle(e){r(e)}getAccDescription(){return s()}setAccDescription(e){t(e)}getDiagramTitle(){return c()}setDiagramTitle(e){n(e)}},_=14,v=250,y=30,b=60,x=5,S=82*Math.PI/180,C=Math.cos(S),w=Math.sin(S),T=e((e,t,n)=>{let r=e.node().getBBox(),i=r.width+t*2,o=r.height+t*2;a(e,o,i,n),e.attr(`viewBox`,`${r.x-t} ${r.y-t} ${i} ${o}`)},`applyPaddedViewBox`),E=e((e,t,n,r)=>{let i=r.db.getRoot();if(!i)return;let a=l(),{look:o,handDrawnSeed:s,themeVariables:c}=a,u=d(a.fontSize)[0]??_,m=o===`handDrawn`,h=i.children??[],g=a.ishikawa?.diagramPadding??20,y=a.ishikawa?.useMaxWidth??!1,b=p(t),x=b.append(`g`).attr(`class`,`ishikawa`),S=m?f.svg(b.node()):void 0,C=S?{roughSvg:S,seed:s??0,lineColor:c?.lineColor??`#333`,fillColor:c?.mainBkg??`#fff`}:void 0,w=`ishikawa-arrow-${t}`;m||x.append(`defs`).append(`marker`).attr(`id`,w).attr(`viewBox`,`0 0 10 10`).attr(`refX`,0).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 Z`).attr(`class`,`ishikawa-arrow`);let E=0,k=v,A=m?void 0:L(x,E,k,E,k,`ishikawa-spine`);if(O(x,E,k,i.text,u,C),!h.length){m&&L(x,E,k,E,k,`ishikawa-spine`,C),T(b,g,y);return}E-=20;let j=h.filter((e,t)=>t%2==0),N=h.filter((e,t)=>t%2==1),P=D(j),F=D(N),I=P.total+F.total,R=v,z=v;if(I>0){let e=v*2,t=v*.3;R=Math.max(t,e*(P.total/I)),z=Math.max(t,e*(F.total/I))}let B=u*2;R=Math.max(R,P.max*B),z=Math.max(z,F.max*B),k=Math.max(R,v),A&&A.attr(`y1`,k).attr(`y2`,k),x.select(`.ishikawa-head-group`).attr(`transform`,`translate(0,${k})`);let V=Math.ceil(h.length/2);for(let e=0;e<V;e++){let t=x.append(`g`).attr(`class`,`ishikawa-pair`);for(let[n,r,i]of[[h[e*2],-1,R],[h[e*2+1],1,z]])n&&M(t,n,E,k,r,i,u,C);E=t.selectAll(`text`).nodes().reduce((e,t)=>Math.min(e,t.getBBox().x),1/0)}if(m)L(x,E,k,0,k,`ishikawa-spine`,C);else{A.attr(`x1`,E);let e=`url(#${w})`;x.selectAll(`line.ishikawa-branch, line.ishikawa-sub-branch`).attr(`marker-start`,e)}T(b,g,y)},`draw`),D=e(t=>{let n=e(e=>e.children.reduce((e,t)=>e+1+n(t),0),`countDescendants`);return t.reduce((e,t)=>{let r=n(t);return e.total+=r,e.max=Math.max(e.max,r),e},{total:0,max:0})},`sideStats`),O=e((e,t,n,r,i,a)=>{let o=Math.max(6,Math.floor(110/(i*.6))),s=e.append(`g`).attr(`class`,`ishikawa-head-group`).attr(`transform`,`translate(${t},${n})`),c=F(s,P(r,o),0,0,`ishikawa-head-label`,`start`,i),l=c.node().getBBox(),u=Math.max(60,l.width+6),d=Math.max(40,l.height*2+40),f=`M 0 ${-d/2} L 0 ${d/2} Q ${u*2.4} 0 0 ${-d/2} Z`;if(a){let e=a.roughSvg.path(f,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-head`)}else s.insert(`path`,`:first-child`).attr(`class`,`ishikawa-head`).attr(`d`,f);c.attr(`transform`,`translate(${(u-l.width)/2-l.x+3},${-l.y-l.height/2})`)},`drawHead`),k=e((t,n)=>{let r=[],i=[],a=e((e,t,o)=>{let s=n===-1?[...e].reverse():e;for(let e of s){let n=r.length,s=e.children??[];r.push({depth:o,text:P(e.text,15),parentIndex:t,childCount:s.length}),o%2==0?(i.push(n),s.length&&a(s,n,o+1)):(s.length&&a(s,n,o+1),i.push(n))}},`walk`);return a(t,-1,2),{entries:r,yOrder:i}},`flattenTree`),A=e((e,t,n,r,i,a,o)=>{let s=e.append(`g`).attr(`class`,`ishikawa-label-group`),c=F(s,t,n,r+11*i,`ishikawa-label cause`,`middle`,a).node().getBBox();if(o){let e=o.roughSvg.rectangle(c.x-20,c.y-2,c.width+40,c.height+4,{roughness:1.5,seed:o.seed,fill:o.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:o.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-label-box`)}else s.insert(`rect`,`:first-child`).attr(`class`,`ishikawa-label-box`).attr(`x`,c.x-20).attr(`y`,c.y-2).attr(`width`,c.width+40).attr(`height`,c.height+4)},`drawCauseLabel`),j=e((e,t,n,r,i,a)=>{let o=Math.sqrt(r*r+i*i);if(o===0)return;let s=r/o,c=i/o,l=-c*6,u=s*6,d=t,f=n,p=`M ${d} ${f} L ${d-s*6*2+l} ${f-c*6*2+u} L ${d-s*6*2-l} ${f-c*6*2-u} Z`,m=a.roughSvg.path(p,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:`solid`,stroke:a.lineColor,strokeWidth:1});e.append(()=>m)},`drawArrowMarker`),M=e((e,t,n,r,i,a,o,s)=>{let c=t.children??[],l=a*(c.length?1:.2),u=-C*l,d=w*l*i,f=n+u,p=r+d;if(L(e,n,r,f,p,`ishikawa-branch`,s),s&&j(e,n,r,n-f,r-p,s),A(e,t.text,f,p,i,o,s),!c.length)return;let{entries:m,yOrder:h}=k(c,i),g=m.length,_=Array(g);for(let[e,t]of h.entries())_[t]=r+d*((e+1)/(g+1));let v=new Map;v.set(-1,{x0:n,y0:r,x1:f,y1:p,childCount:c.length,childrenDrawn:0});let S=-C,T=w*i,E=i<0?`ishikawa-label up`:`ishikawa-label down`;for(let[t,n]of m.entries()){let r=_[t],i=v.get(n.parentIndex),a=e.append(`g`).attr(`class`,`ishikawa-sub-group`),c=0,l=0,u=0;if(n.depth%2==0){let e=i.y1-i.y0;c=I(i.x0,i.x1,e?(r-i.y0)/e:.5),l=r,u=c-(n.childCount>0?b+n.childCount*x:y),L(a,c,r,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,r,1,0,s),F(a,n.text,u,r,`ishikawa-label align`,`end`,o)}else{let e=i.childrenDrawn++;c=I(i.x0,i.x1,(i.childCount-e)/(i.childCount+1)),l=i.y0,u=c+S*((r-l)/T),L(a,c,l,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,l,c-u,l-r,s),F(a,n.text,u,r,E,`end`,o)}n.childCount>0&&v.set(t,{x0:c,y0:l,x1:u,y1:r,childCount:n.childCount,childrenDrawn:0})}},`drawBranch`),N=e(e=>e.split(/<br\s*\/?>|\n/),`splitLines`),P=e((e,t)=>{if(e.length<=t)return e;let n=[];for(let r of e.split(/\s+/)){let e=n.length-1;e>=0&&n[e].length+1+r.length<=t?n[e]+=` `+r:n.push(r)}return n.join(`
7
+ `)},`wrapText`),F=e((e,t,n,r,i,a,o)=>{let s=N(t),c=o*1.05,l=e.append(`text`).attr(`class`,i).attr(`text-anchor`,a).attr(`x`,n).attr(`y`,r-(s.length-1)*c/2);for(let[e,t]of s.entries())l.append(`tspan`).attr(`x`,n).attr(`dy`,e===0?0:c).text(t);return l},`drawMultilineText`),I=e((e,t,n)=>e+(t-e)*n,`lerp`),L=e((e,t,n,r,i,a,o)=>{if(o){let s=o.roughSvg.line(t,n,r,i,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});e.append(()=>s).attr(`class`,a);return}return e.append(`line`).attr(`class`,a).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i)},`drawLine`),R={parser:h,get db(){return new g},renderer:{draw:E},styles:e(e=>`
8
+ .ishikawa .ishikawa-spine,
9
+ .ishikawa .ishikawa-branch,
10
+ .ishikawa .ishikawa-sub-branch {
11
+ stroke: ${e.lineColor};
12
+ stroke-width: 2;
13
+ fill: none;
14
+ }
15
+
16
+ .ishikawa .ishikawa-sub-branch {
17
+ stroke-width: 1;
18
+ }
19
+
20
+ .ishikawa .ishikawa-arrow {
21
+ fill: ${e.lineColor};
22
+ }
23
+
24
+ .ishikawa .ishikawa-head {
25
+ fill: ${e.mainBkg};
26
+ stroke: ${e.lineColor};
27
+ stroke-width: 2;
28
+ }
29
+
30
+ .ishikawa .ishikawa-label-box {
31
+ fill: ${e.mainBkg};
32
+ stroke: ${e.lineColor};
33
+ stroke-width: 2;
34
+ }
35
+
36
+ .ishikawa text {
37
+ font-family: ${e.fontFamily};
38
+ font-size: ${e.fontSize};
39
+ fill: ${e.textColor};
40
+ }
41
+
42
+ .ishikawa .ishikawa-head-label {
43
+ font-weight: 600;
44
+ text-anchor: middle;
45
+ dominant-baseline: middle;
46
+ font-size: 14px;
47
+ }
48
+
49
+ .ishikawa .ishikawa-label {
50
+ text-anchor: end;
51
+ }
52
+
53
+ .ishikawa .ishikawa-label.cause {
54
+ text-anchor: middle;
55
+ dominant-baseline: middle;
56
+ }
57
+
58
+ .ishikawa .ishikawa-label.align {
59
+ text-anchor: end;
60
+ dominant-baseline: middle;
61
+ }
62
+
63
+ .ishikawa .ishikawa-label.up {
64
+ dominant-baseline: baseline;
65
+ }
66
+
67
+ .ishikawa .ishikawa-label.down {
68
+ dominant-baseline: hanging;
69
+ }
70
+ `,`getStyles`)};export{R as diagram};
@@ -0,0 +1,139 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-yeptRXpt.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-DU6HZSFF-C5USiOAy.js";import{t as d}from"./arc-oH91sfLl.js";import{t as f}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{a as p,n as m,o as h,s as g}from"./chunk-F27PBJKO-BcNqv2x1.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},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},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`},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]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
+ `+h.showPosition()+`
3
+ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};l.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin(`acc_title`),12;case 8:return this.popState(),`acc_title_value`;case 9:return this.begin(`acc_descr`),14;case 10:return this.popState(),`acc_descr_value`;case 11:this.begin(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 17;case 15:return 18;case 16:return 19;case 17:return`:`;case 18:return 6;case 19:return`INVALID`}},`anonymous`),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],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}}}})();function u(){this.yy={}}return e(u,`Parser`),u.prototype=l,l.Parser=u,new u})();_.parser=_;var v=_,y=``,b=[],x=[],S=[],C=e(function(){b.length=0,x.length=0,y=``,S.length=0,a()},`clear`),w=e(function(e){y=e,b.push(e)},`addSection`),T=e(function(){return b},`getSections`),E=e(function(){let e=A(),t=0;for(;!e&&t<100;)e=A(),t++;return x.push(...S),x},`getTasks`),D=e(function(){let e=[];return x.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},`updateActors`),O=e(function(e,t){let n=t.substr(1).split(`:`),r=0,i=[];n.length===1?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(`,`));let a=i.map(e=>e.trim()),o={section:y,type:y,people:a,task:e,score:r};S.push(o)},`addTask`),k=e(function(e){let t={section:y,type:y,description:e,task:e,classes:[]};x.push(t)},`addTaskOrg`),A=e(function(){let t=e(function(e){return S[e].processed},`compileTask`),n=!0;for(let[e,r]of S.entries())t(e),n&&=r.processed;return n},`compileTasks`),j={getConfig:e(()=>l().journey,`getConfig`),clear:C,setDiagramTitle:r,getDiagramTitle:c,setAccTitle:i,getAccTitle:u,setAccDescription:n,getAccDescription:s,addSection:w,getSections:T,getTasks:E,addTask:O,addTaskOrg:k,getActors:e(function(){return D()},`getActors`)},M=e(e=>`.label {
7
+ font-family: ${e.fontFamily};
8
+ color: ${e.textColor};
9
+ }
10
+ .mouth {
11
+ stroke: #666;
12
+ }
13
+
14
+ line {
15
+ stroke: ${e.textColor}
16
+ }
17
+
18
+ .legend {
19
+ fill: ${e.textColor};
20
+ font-family: ${e.fontFamily};
21
+ }
22
+
23
+ .label text {
24
+ fill: #333;
25
+ }
26
+ .label {
27
+ color: ${e.textColor}
28
+ }
29
+
30
+ .face {
31
+ ${e.faceColor?`fill: ${e.faceColor}`:`fill: #FFF8DC`};
32
+ stroke: #999;
33
+ }
34
+
35
+ .node rect,
36
+ .node circle,
37
+ .node ellipse,
38
+ .node polygon,
39
+ .node path {
40
+ fill: ${e.mainBkg};
41
+ stroke: ${e.nodeBorder};
42
+ stroke-width: 1px;
43
+ }
44
+
45
+ .node .label {
46
+ text-align: center;
47
+ }
48
+ .node.clickable {
49
+ cursor: pointer;
50
+ }
51
+
52
+ .arrowheadPath {
53
+ fill: ${e.arrowheadColor};
54
+ }
55
+
56
+ .edgePaths .path {
57
+ stroke: ${e.lineColor};
58
+ stroke-width: 1.5px;
59
+ }
60
+
61
+ .flowchart-link {
62
+ stroke: ${e.lineColor};
63
+ fill: none;
64
+ }
65
+
66
+ .edgeLabel {
67
+ background-color: ${e.edgeLabelBackground};
68
+ rect {
69
+ opacity: 0.5;
70
+ }
71
+ text-align: center;
72
+ }
73
+
74
+ .cluster rect {
75
+ }
76
+
77
+ .cluster text {
78
+ fill: ${e.titleColor};
79
+ }
80
+
81
+ div.mermaidTooltip {
82
+ position: absolute;
83
+ text-align: center;
84
+ max-width: 200px;
85
+ padding: 2px;
86
+ font-family: ${e.fontFamily};
87
+ font-size: 12px;
88
+ background: ${e.tertiaryColor};
89
+ border: 1px solid ${e.border2};
90
+ border-radius: 2px;
91
+ pointer-events: none;
92
+ z-index: 100;
93
+ }
94
+
95
+ .task-type-0, .section-type-0 {
96
+ ${e.fillType0?`fill: ${e.fillType0}`:``};
97
+ }
98
+ .task-type-1, .section-type-1 {
99
+ ${e.fillType0?`fill: ${e.fillType1}`:``};
100
+ }
101
+ .task-type-2, .section-type-2 {
102
+ ${e.fillType0?`fill: ${e.fillType2}`:``};
103
+ }
104
+ .task-type-3, .section-type-3 {
105
+ ${e.fillType0?`fill: ${e.fillType3}`:``};
106
+ }
107
+ .task-type-4, .section-type-4 {
108
+ ${e.fillType0?`fill: ${e.fillType4}`:``};
109
+ }
110
+ .task-type-5, .section-type-5 {
111
+ ${e.fillType0?`fill: ${e.fillType5}`:``};
112
+ }
113
+ .task-type-6, .section-type-6 {
114
+ ${e.fillType0?`fill: ${e.fillType6}`:``};
115
+ }
116
+ .task-type-7, .section-type-7 {
117
+ ${e.fillType0?`fill: ${e.fillType7}`:``};
118
+ }
119
+
120
+ .actor-0 {
121
+ ${e.actor0?`fill: ${e.actor0}`:``};
122
+ }
123
+ .actor-1 {
124
+ ${e.actor1?`fill: ${e.actor1}`:``};
125
+ }
126
+ .actor-2 {
127
+ ${e.actor2?`fill: ${e.actor2}`:``};
128
+ }
129
+ .actor-3 {
130
+ ${e.actor3?`fill: ${e.actor3}`:``};
131
+ }
132
+ .actor-4 {
133
+ ${e.actor4?`fill: ${e.actor4}`:``};
134
+ }
135
+ .actor-5 {
136
+ ${e.actor5?`fill: ${e.actor5}`:``};
137
+ }
138
+ ${f()}
139
+ `,`getStyles`),N=e(function(e,t){return p(e,t)},`drawRect`),P=e(function(t,n){let r=t.append(`circle`).attr(`cx`,n.cx).attr(`cy`,n.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),i=t.append(`g`);i.append(`circle`).attr(`cx`,n.cx-5).attr(`cy`,n.cy-5).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),i.append(`circle`).attr(`cx`,n.cx+5).attr(`cy`,n.cy-5).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function a(e){let t=d().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+2)+`)`)}e(a,`smile`);function o(e){let t=d().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+7)+`)`)}e(o,`sad`);function s(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,n.cx-5).attr(`y1`,n.cy+7).attr(`x2`,n.cx+5).attr(`y2`,n.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return e(s,`ambivalent`),n.score>3?a(i):n.score<3?o(i):s(i),r},`drawFace`),F=e(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),I=e(function(e,t){return h(e,t)},`drawText`),L=e(function(t,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}e(r,`genPoints`);let i=t.append(`polygon`);i.attr(`points`,r(n.x,n.y,50,20,7)),i.attr(`class`,`labelBox`),n.y+=n.labelMargin,n.x+=.5*n.labelMargin,I(t,n)},`drawLabel`),R=e(function(e,t,n){let r=e.append(`g`),i=g();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width*t.taskCount+n.diagramMarginX*(t.taskCount-1),i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,N(r,i),H(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),z=-1,B=e(function(e,t,n,r){let i=t.x+n.width/2,a=e.append(`g`);z++,a.append(`line`).attr(`id`,r+`-task`+z).attr(`x1`,i).attr(`y1`,t.y).attr(`x2`,i).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),P(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=g();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class=`task task-type-`+t.num,o.rx=3,o.ry=3,N(a,o);let s=t.x+14;t.people.forEach(e=>{let n=t.actors[e].color,r={cx:s,cy:t.y,r:7,fill:n,stroke:`#000`,title:e,pos:t.actors[e].position};F(a,r),s+=10}),H(n)(t.task,a,o.x,o.y,o.width,o.height,{class:`task`},n,t.colour)},`drawTask`),V=e(function(e,t){m(e,t)},`drawBackgroundRect`),H=(function(){function t(e,t,n,r,a,o,s,c){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`font-color`,c).style(`text-anchor`,`middle`).text(e),s)}e(t,`byText`);function n(e,t,n,r,a,o,s,c,l){let{taskFontSize:u,taskFontFamily:d}=c,f=e.split(/<br\s*\/?>/gi);for(let e=0;e<f.length;e++){let c=e*u-u*(f.length-1)/2,p=t.append(`text`).attr(`x`,n+a/2).attr(`y`,r).attr(`fill`,l).style(`text-anchor`,`middle`).style(`font-size`,u).style(`font-family`,d);p.append(`tspan`).attr(`x`,n+a/2).attr(`dy`,c).text(f[e]),p.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),i(p,s)}}e(n,`byTspan`);function r(e,t,r,a,o,s,c,l){let u=t.append(`switch`),d=u.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).attr(`position`,`fixed`).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);d.append(`div`).attr(`class`,`label`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),n(e,u,r,a,o,s,c,l),i(d,c)}e(r,`byFo`);function i(e,t){for(let n in t)n in t&&e.attr(n,t[n])}return e(i,`_setTextAttrs`),function(e){return e.textPlacement===`fo`?r:e.textPlacement===`old`?t:n}})(),U={drawRect:N,drawCircle:F,drawSection:R,drawText:I,drawLabel:L,drawTask:B,drawBackgroundRect:V,initGraphics:e(function(e,t){z=-1,e.append(`defs`).append(`marker`).attr(`id`,t+`-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`)},`initGraphics`)},W=e(function(e){Object.keys(e).forEach(function(t){J[t]=e[t]})},`setConf`),G={},K=0;function q(e){let t=l().journey,n=t.maxLabelWidth;K=0;let r=60;Object.keys(G).forEach(i=>{let a=G[i].color,o={cx:20,cy:r,r:7,fill:a,stroke:`#000`,pos:G[i].position};U.drawCircle(e,o);let s=e.append(`text`).attr(`visibility`,`hidden`).text(i),c=s.node().getBoundingClientRect().width;s.remove();let l=[];if(c<=n)l=[i];else{let t=i.split(` `),r=``;s=e.append(`text`).attr(`visibility`,`hidden`),t.forEach(e=>{let t=r?`${r} ${e}`:e;if(s.text(t),s.node().getBoundingClientRect().width>n){if(r&&l.push(r),r=e,s.text(e),s.node().getBoundingClientRect().width>n){let t=``;for(let r of e)t+=r,s.text(t+`-`),s.node().getBoundingClientRect().width>n&&(l.push(t.slice(0,-1)+`-`),t=r);r=t}}else r=t}),r&&l.push(r),s.remove()}l.forEach((n,i)=>{let a={x:40,y:r+7+i*20,fill:`#666`,text:n,textMargin:t.boxTextMargin??5},o=U.drawText(e,a).node().getBoundingClientRect().width;o>K&&o>t.leftMargin-o&&(K=o)}),r+=Math.max(20,l.length*20)})}e(q,`drawActorLegend`);var J=l().journey,Y=0,ee=e(function(e,n,r,i){let a=l(),s=a.journey.titleColor,c=a.journey.titleFontSize,u=a.journey.titleFontFamily,d=a.securityLevel,f;d===`sandbox`&&(f=t(`#i`+n));let p=t(d===`sandbox`?f.nodes()[0].contentDocument.body:`body`);X.init();let m=p.select(`#`+n);U.initGraphics(m,n);let h=i.db.getTasks(),g=i.db.getDiagramTitle(),_=i.db.getActors();for(let e in G)delete G[e];let v=0;_.forEach(e=>{G[e]={color:J.actorColours[v%J.actorColours.length],position:v},v++}),q(m),Y=J.leftMargin+K,X.insert(0,0,Y,Object.keys(G).length*50),te(m,h,0,n);let y=X.getBounds();g&&m.append(`text`).text(g).attr(`x`,Y).attr(`font-size`,c).attr(`font-weight`,`bold`).attr(`y`,25).attr(`fill`,s).attr(`font-family`,u);let b=y.stopy-y.starty+2*J.diagramMarginY,x=Y+y.stopx+2*J.diagramMarginX;o(m,b,x,J.useMaxWidth),m.append(`line`).attr(`x1`,Y).attr(`y1`,J.height*4).attr(`x2`,x-Y-4).attr(`y2`,J.height*4).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#`+n+`-arrowhead)`);let S=g?70:0;m.attr(`viewBox`,`${y.startx} -25 ${x} ${b+S}`),m.attr(`preserveAspectRatio`,`xMinYMin meet`),m.attr(`height`,b+S+25)},`draw`),X={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:e(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},`init`),updateVal:e(function(e,t,n,r){e[t]=e[t]===void 0?n:r(n,e[t])},`updateVal`),updateBounds:e(function(t,n,r,i){let a=l().journey,o=this,s=0;function c(c){return e(function(e){s++;let l=o.sequenceItems.length-s+1;o.updateVal(e,`starty`,n-l*a.boxMargin,Math.min),o.updateVal(e,`stopy`,i+l*a.boxMargin,Math.max),o.updateVal(X.data,`startx`,t-l*a.boxMargin,Math.min),o.updateVal(X.data,`stopx`,r+l*a.boxMargin,Math.max),c!==`activation`&&(o.updateVal(e,`startx`,t-l*a.boxMargin,Math.min),o.updateVal(e,`stopx`,r+l*a.boxMargin,Math.max),o.updateVal(X.data,`starty`,n-l*a.boxMargin,Math.min),o.updateVal(X.data,`stopy`,i+l*a.boxMargin,Math.max))},`updateItemBounds`)}e(c,`updateFn`),this.sequenceItems.forEach(c())},`updateBounds`),insert:e(function(e,t,n,r){let i=Math.min(e,n),a=Math.max(e,n),o=Math.min(t,r),s=Math.max(t,r);this.updateVal(X.data,`startx`,i,Math.min),this.updateVal(X.data,`starty`,o,Math.min),this.updateVal(X.data,`stopx`,a,Math.max),this.updateVal(X.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),bumpVerticalPos:e(function(e){this.verticalPos+=e,this.data.stopy=this.verticalPos},`bumpVerticalPos`),getVerticalPos:e(function(){return this.verticalPos},`getVerticalPos`),getBounds:e(function(){return this.data},`getBounds`)},Z=J.sectionFills,Q=J.sectionColours,te=e(function(e,t,n,r){let i=l().journey,a=``,o=n+(i.height*2+i.diagramMarginY),s=0,c=`#CCC`,u=`black`,d=0;for(let[n,l]of t.entries()){if(a!==l.section){c=Z[s%Z.length],d=s%Z.length,u=Q[s%Q.length];let r=0,o=l.section;for(let e=n;e<t.length&&t[e].section==o;e++)r+=1;let f={x:n*i.taskMargin+n*i.width+Y,y:50,text:l.section,fill:c,num:d,colour:u,taskCount:r};U.drawSection(e,f,i),a=l.section,s++}let f=l.people.reduce((e,t)=>(G[t]&&(e[t]=G[t]),e),{});l.x=n*i.taskMargin+n*i.width+Y,l.y=o,l.width=i.diagramMarginX,l.height=i.diagramMarginY,l.colour=u,l.fill=c,l.num=d,l.actors=f,U.drawTask(e,l,i,r),X.insert(l.x,l.y,l.x+l.width+i.taskMargin,450)}},`drawTasks`),$={setConf:W,draw:ee},ne={parser:v,db:j,renderer:$,styles:M,init:e(e=>{$.setConf(e.journey),j.clear()},`init`)};export{ne as diagram};
@@ -0,0 +1,89 @@
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-yeptRXpt.js";import{$ as n,J as r,et as i,f as a,nt as o,x as s,z as c}from"./chunk-DU6HZSFF-C5USiOAy.js";import"./chunk-75Z2AOVW-RQCckcQG.js";import"./chunk-PWAF6VOD-D7OBRSdO.js";import"./chunk-GMAD6QVW-Bq8JWiZT.js";import{t as l}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-P2QGCYS3-aqPbxoMh.js";import"./chunk-4HAMMTFA-Bhsegh3F.js";import{i as u,r as d}from"./chunk-GVQU2GXP-DbchrAeJ.js";import{n as f}from"./chunk-L3NEJ4N5-DHLmTnCe.js";import{f as p,n as m,r as h}from"./mermaid.core-DXgQtkNg.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
+ `+h.showPosition()+`
3
+ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};x.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return this.pushState(`shapeData`),t.yytext=``,24;case 1:return this.pushState(`shapeDataStr`),24;case 2:return this.popState(),24;case 3:return t.yytext=t.yytext.replace(/\n\s*/g,`<br/>`),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace(`Found comment`,t.yytext),6;case 7:return 8;case 8:this.begin(`CLASS`);break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace(`Begin icon`),this.begin(`ICON`);break;case 12:return e.getLogger().trace(`SPACELINE`),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace(`end icon`),this.popState();break;case 16:return e.getLogger().trace(`Exploding node`),this.begin(`NODE`),20;case 17:return e.getLogger().trace(`Cloud`),this.begin(`NODE`),20;case 18:return e.getLogger().trace(`Explosion Bang`),this.begin(`NODE`),20;case 19:return e.getLogger().trace(`Cloud Bang`),this.begin(`NODE`),20;case 20:return this.begin(`NODE`),20;case 21:return this.begin(`NODE`),20;case 22:return this.begin(`NODE`),20;case 23:return this.begin(`NODE`),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin(`NSTR2`);break;case 28:return`NODE_DESCR`;case 29:this.popState();break;case 30:e.getLogger().trace(`Starting NSTR`),this.begin(`NSTR`);break;case 31:return e.getLogger().trace(`description:`,t.yytext),`NODE_DESCR`;case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace(`node end ))`),`NODE_DEND`;case 34:return this.popState(),e.getLogger().trace(`node end )`),`NODE_DEND`;case 35:return this.popState(),e.getLogger().trace(`node end ...`,t.yytext),`NODE_DEND`;case 36:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 37:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 41:return e.getLogger().trace(`Long description:`,t.yytext),21;case 42:return e.getLogger().trace(`Long description:`,t.yytext),21}},`anonymous`),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}})();function S(){this.yy={}}return e(S,`Parser`),S.prototype=x,x.Parser=S,new S})();g.parser=g;var _=g,v=[],y=[],b=0,x={},S=e(()=>{v=[],y=[],b=0,x={}},`clear`),C=e(e=>{if(v.length===0)return null;let t=v[0].level,n=null;for(let e=v.length-1;e>=0;e--)if(v[e].level===t&&!n&&(n=v[e]),v[e].level<t)throw Error(`Items without section detected, found section ("`+v[e].label+`")`);return e===n?.level?null:n},`getSection`),w=e(function(){return y},`getSections`),T=e(function(){let e=[],t=[],n=w(),r=s();for(let e of n){let n={id:e.id,label:c(e.label??``,r),labelType:`markdown`,isGroup:!0,ticket:e.ticket,shape:`kanbanSection`,level:e.level,look:r.look};t.push(n);let i=v.filter(t=>t.parentId===e.id);for(let n of i){let i={id:n.id,parentId:e.id,label:c(n.label??``,r),labelType:`markdown`,isGroup:!1,ticket:n?.ticket,priority:n?.priority,assigned:n?.assigned,icon:n?.icon,shape:`kanbanItem`,level:n.level,rx:5,ry:5,cssStyles:[`text-align: left`]};t.push(i)}}return{nodes:t,edges:e,other:{},config:s()}},`getData`),E=e((e,t,n,r,i)=>{let o=s(),l=o.mindmap?.padding??a.mindmap.padding;switch(r){case D.ROUNDED_RECT:case D.RECT:case D.HEXAGON:l*=2}let u={id:c(t,o)||`kbn`+b++,level:e,label:c(n,o),width:o.mindmap?.maxNodeWidth??a.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(i!==void 0){let e;e=i.includes(`
7
+ `)?i+`
8
+ `:`{
9
+ `+i+`
10
+ }`;let t=h(e,{schema:m});if(t.shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes(`_`)))throw Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&t.shape===`kanbanItem`&&(u.shape=t?.shape),t?.label&&(u.label=t?.label),t?.icon&&(u.icon=t?.icon.toString()),t?.assigned&&(u.assigned=t?.assigned.toString()),t?.ticket&&(u.ticket=t?.ticket.toString()),t?.priority&&(u.priority=t?.priority)}let d=C(e);d?u.parentId=d.id||`kbn`+b++:y.push(u),v.push(u)},`addNode`),D={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O={clear:S,addNode:E,getSections:w,getData:T,nodeType:D,getType:e((e,n)=>{switch(t.debug(`In get type`,e,n),e){case`[`:return D.RECT;case`(`:return n===`)`?D.ROUNDED_RECT:D.CLOUD;case`((`:return D.CIRCLE;case`)`:return D.CLOUD;case`))`:return D.BANG;case`{{`:return D.HEXAGON;default:return D.DEFAULT}},`getType`),setElementForId:e((e,t)=>{x[e]=t},`setElementForId`),decorateNode:e(e=>{if(!e)return;let t=s(),n=v[v.length-1];e.icon&&(n.icon=c(e.icon,t)),e.class&&(n.cssClasses=c(e.class,t))},`decorateNode`),type2Str:e(e=>{switch(e){case D.DEFAULT:return`no-border`;case D.RECT:return`rect`;case D.ROUNDED_RECT:return`rounded-rect`;case D.CIRCLE:return`circle`;case D.CLOUD:return`cloud`;case D.BANG:return`bang`;case D.HEXAGON:return`hexgon`;default:return`no-border`}},`type2Str`),getLogger:e(()=>t,`getLogger`),getElementById:e(e=>x[e],`getElementById`)},k={draw:e(async(e,n,i,o)=>{t.debug(`Rendering kanban diagram
11
+ `+e);let c=o.db.getData(),l=s();l.htmlLabels=!1;let m=p(n);for(let e of c.nodes)e.domId=`${n}-${e.id}`;let h=m.append(`g`);h.attr(`class`,`sections`);let g=m.append(`g`);g.attr(`class`,`items`);let _=c.nodes.filter(e=>e.isGroup),v=0,y=[],b=25;for(let e of _){let t=l?.kanban?.sectionWidth||200;v+=1,e.x=t*v+(v-1)*10/2,e.width=t,e.y=0,e.height=t*3,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+` section-`+v;let n=await f(h,e);b=Math.max(b,n?.labelBBox?.height),y.push(n)}let x=0;for(let e of _){let t=y[x];x+=1;let n=l?.kanban?.sectionWidth||200,r=-n*3/2+b,i=r,a=c.nodes.filter(t=>t.parentId===e.id);for(let t of a){if(t.isGroup)throw Error(`Groups within groups are not allowed in Kanban diagrams`);t.x=e.x,t.width=n-15;let r=(await d(g,t,{config:l})).node().getBBox();t.y=i+r.height/2,await u(t),i=t.y+r.height/2+5}let o=t.cluster.select(`rect`),s=Math.max(i-r+30,50)+(b-25);o.attr(`height`,s)}r(void 0,m,l.mindmap?.padding??a.kanban.padding,l.mindmap?.useMaxWidth??a.kanban.useMaxWidth)},`draw`)},A=e(t=>{let r=``;for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t[`lineColor`+e]=t[`lineColor`+e]||t[`cScaleInv`+e],o(t[`lineColor`+e])?t[`lineColor`+e]=i(t[`lineColor`+e],20):t[`lineColor`+e]=n(t[`lineColor`+e],20);let a=e((e,r)=>t.darkMode?n(e,r):i(e,r),`adjuster`);for(let e=0;e<t.THEME_COLOR_LIMIT;e++){let n=``+(17-3*e);r+=`
12
+ .section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} polygon, .section-${e-1} path {
13
+ fill: ${a(t[`cScale`+e],10)};
14
+ stroke: ${a(t[`cScale`+e],10)};
15
+
16
+ }
17
+ .section-${e-1} text {
18
+ fill: ${t[`cScaleLabel`+e]};
19
+ }
20
+ .node-icon-${e-1} {
21
+ font-size: 40px;
22
+ color: ${t[`cScaleLabel`+e]};
23
+ }
24
+ .section-edge-${e-1}{
25
+ stroke: ${t[`cScale`+e]};
26
+ }
27
+ .edge-depth-${e-1}{
28
+ stroke-width: ${n};
29
+ }
30
+ .section-${e-1} line {
31
+ stroke: ${t[`cScaleInv`+e]} ;
32
+ stroke-width: 3;
33
+ }
34
+
35
+ .disabled, .disabled circle, .disabled text {
36
+ fill: lightgray;
37
+ }
38
+ .disabled text {
39
+ fill: #efefef;
40
+ }
41
+
42
+ .node rect,
43
+ .node circle,
44
+ .node ellipse,
45
+ .node polygon,
46
+ .node path {
47
+ fill: ${t.background};
48
+ stroke: ${t.nodeBorder};
49
+ stroke-width: 1px;
50
+ }
51
+
52
+ .kanban-ticket-link {
53
+ fill: ${t.background};
54
+ stroke: ${t.nodeBorder};
55
+ text-decoration: underline;
56
+ }
57
+ `}return r},`genSections`),j={db:O,renderer:k,parser:_,styles:e(e=>`
58
+ .edge {
59
+ stroke-width: 3;
60
+ }
61
+ ${A(e)}
62
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
63
+ fill: ${e.git0};
64
+ }
65
+ .section-root text {
66
+ fill: ${e.gitBranchLabel0};
67
+ }
68
+ .icon-container {
69
+ height:100%;
70
+ display: flex;
71
+ justify-content: center;
72
+ align-items: center;
73
+ }
74
+ .edge {
75
+ fill: none;
76
+ }
77
+ .cluster-label, .label {
78
+ color: ${e.textColor};
79
+ fill: ${e.textColor};
80
+ }
81
+ .kanban-label {
82
+ dy: 1em;
83
+ alignment-baseline: middle;
84
+ text-anchor: middle;
85
+ dominant-baseline: middle;
86
+ text-align: center;
87
+ }
88
+ ${l()}
89
+ `,`getStyles`)};export{j as diagram};