@cagent/chat-embedding-core 0.0.13 → 0.0.14

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 (320) hide show
  1. package/.env +6 -0
  2. package/README.md +213 -213
  3. package/bun.lock +1548 -1548
  4. package/dist/abnfDiagram-VRR7QNED-3cfb3856.js +1 -0
  5. package/dist/abnfDiagram-VRR7QNED-686410b0.js +1 -0
  6. package/dist/abnfDiagram-VRR7QNED-fb22812d.js +1 -0
  7. package/dist/api/chatRoom.d.ts.map +1 -0
  8. package/dist/arc-24dd4755.js +1 -0
  9. package/dist/arc-5d6257cf.js +1 -0
  10. package/dist/arc-90e71e7e.js +1 -0
  11. package/dist/architecture-TIHT7OUA-a997f441.js +1 -0
  12. package/dist/architecture-TIHT7OUA-faa1f9b3.js +1 -0
  13. package/dist/architectureDiagram-ZJ3FMSHR-87443299.js +1 -0
  14. package/dist/architectureDiagram-ZJ3FMSHR-93988e41.js +1 -0
  15. package/dist/architectureDiagram-ZJ3FMSHR-bde2dd21.js +1 -0
  16. package/dist/blockDiagram-677ZJIJ3-25a94a47.js +1 -0
  17. package/dist/blockDiagram-677ZJIJ3-88bd543c.js +1 -0
  18. package/dist/blockDiagram-677ZJIJ3-c769a3c8.js +1 -0
  19. package/dist/c4Diagram-LMCZKHZV-763880d7.js +1 -0
  20. package/dist/c4Diagram-LMCZKHZV-d7fc839e.js +1 -0
  21. package/dist/c4Diagram-LMCZKHZV-da04a76e.js +1 -0
  22. package/dist/channel-11d3f4bc.js +1 -0
  23. package/dist/channel-534c2e17.js +1 -0
  24. package/dist/channel-c3cf6060.js +1 -0
  25. package/dist/chunk-2Q5K7J3B-2892df89.js +1 -0
  26. package/dist/chunk-2Q5K7J3B-7960ff8e.js +1 -0
  27. package/dist/chunk-2Q5K7J3B-9497bf31.js +1 -0
  28. package/dist/chunk-32BRIVSS-10123eba.js +1 -0
  29. package/dist/chunk-32BRIVSS-10ac68f7.js +1 -0
  30. package/dist/chunk-32BRIVSS-8a8507a2.js +1 -0
  31. package/dist/chunk-5VM5RSS4-36b32f6e.js +1 -0
  32. package/dist/chunk-5VM5RSS4-4b2efd20.js +1 -0
  33. package/dist/chunk-5VM5RSS4-5fc85a49.js +1 -0
  34. package/dist/chunk-EX3LRPZG-36494b87.js +1 -0
  35. package/dist/chunk-EX3LRPZG-6cd1f2fa.js +1 -0
  36. package/dist/chunk-EX3LRPZG-7ac6d0d7.js +1 -0
  37. package/dist/chunk-JWPE2WC7-15a55950.js +1 -0
  38. package/dist/chunk-JWPE2WC7-84faee3d.js +1 -0
  39. package/dist/chunk-JWPE2WC7-e2521b1e.js +1 -0
  40. package/dist/chunk-MOJQB5TN-47f0392f.js +1 -0
  41. package/dist/chunk-MOJQB5TN-5cc2e61b.js +1 -0
  42. package/dist/chunk-MOJQB5TN-ea88675c.js +1 -0
  43. package/dist/chunk-PUDLZKDR-057ec46a.js +1 -0
  44. package/dist/chunk-PUDLZKDR-53309be9.js +1 -0
  45. package/dist/chunk-PUDLZKDR-6de50ada.js +1 -0
  46. package/dist/chunk-RYQCIY6F-06b096c5.js +1 -0
  47. package/dist/chunk-RYQCIY6F-453400cd.js +1 -0
  48. package/dist/chunk-RYQCIY6F-8de649c8.js +1 -0
  49. package/dist/chunk-V7JOEXUC-4083766f.js +1 -0
  50. package/dist/chunk-V7JOEXUC-4e8d7729.js +1 -0
  51. package/dist/chunk-V7JOEXUC-bb2df9b0.js +1 -0
  52. package/dist/chunk-VR4S4FIN-5feb7571.js +1 -0
  53. package/dist/chunk-VR4S4FIN-9df47127.js +1 -0
  54. package/dist/chunk-VR4S4FIN-c4f2681d.js +1 -0
  55. package/dist/chunk-XXDRQBXY-3c9d8bf9.js +1 -0
  56. package/dist/chunk-XXDRQBXY-de00e988.js +1 -0
  57. package/dist/chunk-XXDRQBXY-f923ffed.js +1 -0
  58. package/dist/classDiagram-OUVF2IWQ-5cdf5fe6.js +1 -0
  59. package/dist/classDiagram-OUVF2IWQ-d51bd736.js +1 -0
  60. package/dist/classDiagram-OUVF2IWQ-fc2b54d6.js +1 -0
  61. package/dist/classDiagram-v2-EOCWNBFH-5cdf5fe6.js +1 -0
  62. package/dist/classDiagram-v2-EOCWNBFH-d51bd736.js +1 -0
  63. package/dist/classDiagram-v2-EOCWNBFH-fc2b54d6.js +1 -0
  64. package/dist/components/Badge.d.ts.map +1 -0
  65. package/dist/components/Bot.d.ts.map +1 -0
  66. package/dist/components/FeedbackContentDialog.d.ts.map +1 -0
  67. package/dist/components/RoomReconnectAlert.d.ts.map +1 -0
  68. package/dist/components/Toast.d.ts.map +1 -0
  69. package/dist/components/TypingBubble.d.ts.map +1 -0
  70. package/dist/components/avatars/Avatar.d.ts.map +1 -0
  71. package/dist/components/avatars/DefaultAvatar.d.ts.map +1 -0
  72. package/dist/components/bubbles/AgentReasoningBubble.d.ts.map +1 -0
  73. package/dist/components/bubbles/BotBubble.d.ts.map +1 -0
  74. package/dist/components/bubbles/ChartBubble.d.ts.map +1 -0
  75. package/dist/components/bubbles/ChartLoadingPlaceholder.d.ts.map +1 -0
  76. package/dist/components/bubbles/ChartPlaceholder.d.ts.map +1 -0
  77. package/dist/components/bubbles/ChartPopupModal.d.ts.map +1 -0
  78. package/dist/components/bubbles/FollowUpPromptBubble.d.ts.map +1 -0
  79. package/dist/components/bubbles/GuestBubble.d.ts.map +1 -0
  80. package/dist/components/bubbles/LeadCaptureBubble.d.ts.map +1 -0
  81. package/dist/components/bubbles/LoadingBubble.d.ts.map +1 -0
  82. package/dist/components/bubbles/SourceBubble.d.ts.map +1 -0
  83. package/dist/components/bubbles/StableChartWrapper.d.ts.map +1 -0
  84. package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -0
  85. package/dist/components/buttons/AttachmentUploadButton.d.ts.map +1 -0
  86. package/dist/components/buttons/CancelButton.d.ts.map +1 -0
  87. package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
  88. package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
  89. package/dist/components/buttons/FeedbackButtons.d.ts.map +1 -0
  90. package/dist/components/buttons/ImageUploadButton.d.ts.map +1 -0
  91. package/dist/components/buttons/LeadCaptureButtons.d.ts.map +1 -0
  92. package/dist/components/buttons/PopupToast.d.ts.map +1 -0
  93. package/dist/components/buttons/RecordAudioButton.d.ts.map +1 -0
  94. package/dist/components/buttons/SendButton.d.ts.map +1 -0
  95. package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
  96. package/dist/components/icons/AddImageIcon.d.ts.map +1 -0
  97. package/dist/components/icons/AttachmentIcon.d.ts.map +1 -0
  98. package/dist/components/icons/CheckIcon.d.ts.map +1 -0
  99. package/dist/components/icons/CircleDotIcon.d.ts.map +1 -0
  100. package/dist/components/icons/ClipboardIcon.d.ts.map +1 -0
  101. package/dist/components/icons/CopyIcon.d.ts.map +1 -0
  102. package/dist/components/icons/DeleteIcon.d.ts.map +1 -0
  103. package/dist/components/icons/EditIcon.d.ts.map +1 -0
  104. package/dist/components/icons/FullScreenIcon.d.ts.map +1 -0
  105. package/dist/components/icons/RecordIcon.d.ts.map +1 -0
  106. package/dist/components/icons/ResetZoomIcon.d.ts.map +1 -0
  107. package/dist/components/icons/SendIcon.d.ts.map +1 -0
  108. package/dist/components/icons/SparklesIcon.d.ts.map +1 -0
  109. package/dist/components/icons/StopIcon.d.ts.map +1 -0
  110. package/dist/components/icons/ThumbsDownIcon.d.ts.map +1 -0
  111. package/dist/components/icons/ThumbsUpIcon.d.ts.map +1 -0
  112. package/dist/components/icons/TickIcon.d.ts.map +1 -0
  113. package/dist/components/icons/TrashIcon.d.ts.map +1 -0
  114. package/dist/components/icons/XIcon.d.ts.map +1 -0
  115. package/dist/components/icons/ZoomInIcon.d.ts.map +1 -0
  116. package/dist/components/icons/ZoomOutIcon.d.ts.map +1 -0
  117. package/dist/components/icons/index.d.ts.map +1 -0
  118. package/dist/components/image/PreviewImage.d.ts.map +1 -0
  119. package/dist/components/index.d.ts.map +1 -0
  120. package/dist/components/inputs/textInput/components/FilePreview.d.ts.map +1 -0
  121. package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -0
  122. package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -0
  123. package/dist/components/inputs/textInput/index.d.ts.map +1 -0
  124. package/dist/constants.d.ts.map +1 -0
  125. package/dist/cose-bilkent-JH36ORCC-ac4d2e28.js +1 -0
  126. package/dist/cose-bilkent-JH36ORCC-c3560feb.js +1 -0
  127. package/dist/cose-bilkent-JH36ORCC-f0ddc3e7.js +1 -0
  128. package/dist/cynefin-VYW2F7L2-2458ad91.js +1 -0
  129. package/dist/cynefin-VYW2F7L2-a8648cf6.js +1 -0
  130. package/dist/cynefinDiagram-TSTJHNR4-62a29383.js +1 -0
  131. package/dist/cynefinDiagram-TSTJHNR4-910b3dfd.js +1 -0
  132. package/dist/cynefinDiagram-TSTJHNR4-deb0bb2c.js +1 -0
  133. package/dist/cytoscape.esm-56d2239f.js +1 -0
  134. package/dist/cytoscape.esm-c9352dc8.js +1 -0
  135. package/dist/dagre-VKFMJZFB-1467d0af.js +1 -0
  136. package/dist/dagre-VKFMJZFB-35daad97.js +1 -0
  137. package/dist/dagre-VKFMJZFB-c5b9a4a0.js +1 -0
  138. package/dist/defaultLocale-b4977250.js +1 -0
  139. package/dist/defaultLocale-e35a4def.js +1 -0
  140. package/dist/diagram-FQU43EPY-41eed431.js +1 -0
  141. package/dist/diagram-FQU43EPY-613e9e4e.js +1 -0
  142. package/dist/diagram-FQU43EPY-d256050e.js +1 -0
  143. package/dist/diagram-G47NLZAW-813bbb70.js +1 -0
  144. package/dist/diagram-G47NLZAW-8ef917d1.js +1 -0
  145. package/dist/diagram-G47NLZAW-aa02607c.js +1 -0
  146. package/dist/diagram-NH7WQ7WH-0af7a921.js +1 -0
  147. package/dist/diagram-NH7WQ7WH-0e4f7f17.js +1 -0
  148. package/dist/diagram-NH7WQ7WH-6f91f6aa.js +1 -0
  149. package/dist/diagram-OA4YK3LP-0fba2475.js +1 -0
  150. package/dist/diagram-OA4YK3LP-587273f4.js +1 -0
  151. package/dist/diagram-OA4YK3LP-6cbfc7a5.js +1 -0
  152. package/dist/diagram-WEI45ONY-0241463f.js +1 -0
  153. package/dist/diagram-WEI45ONY-dd634033.js +1 -0
  154. package/dist/diagram-WEI45ONY-e002e844.js +1 -0
  155. package/dist/ebnfDiagram-CCIWWBDH-20ac4ba3.js +1 -0
  156. package/dist/ebnfDiagram-CCIWWBDH-e9974165.js +1 -0
  157. package/dist/ebnfDiagram-CCIWWBDH-ead44055.js +1 -0
  158. package/dist/erDiagram-Q63AITRT-1febb8fc.js +1 -0
  159. package/dist/erDiagram-Q63AITRT-4ea4b93d.js +1 -0
  160. package/dist/erDiagram-Q63AITRT-bcb00855.js +1 -0
  161. package/dist/eventmodeling-45OFAUF4-a82f1f18.js +1 -0
  162. package/dist/eventmodeling-45OFAUF4-dcf667fc.js +1 -0
  163. package/dist/features/bubble/components/Bubble.d.ts.map +1 -0
  164. package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -0
  165. package/dist/features/bubble/components/Tooltip.d.ts.map +1 -0
  166. package/dist/features/bubble/components/index.d.ts.map +1 -0
  167. package/dist/features/bubble/index.d.ts.map +1 -0
  168. package/dist/features/bubble/types.d.ts.map +1 -0
  169. package/dist/features/full/components/Full.d.ts.map +1 -0
  170. package/dist/features/full/components/index.d.ts.map +1 -0
  171. package/dist/features/full/index.d.ts.map +1 -0
  172. package/dist/features/popup/components/DisclaimerPopup.d.ts.map +1 -0
  173. package/dist/features/popup/components/Popup.d.ts.map +1 -0
  174. package/dist/features/popup/components/index.d.ts.map +1 -0
  175. package/dist/features/popup/index.d.ts.map +1 -0
  176. package/dist/features/popup/types.d.ts.map +1 -0
  177. package/dist/flowDiagram-23GEKE2U-14ee2b3c.js +1 -0
  178. package/dist/flowDiagram-23GEKE2U-7ab9c2e4.js +1 -0
  179. package/dist/flowDiagram-23GEKE2U-f7309569.js +1 -0
  180. package/dist/ganttDiagram-NO4QXBWP-249a167d.js +1 -0
  181. package/dist/ganttDiagram-NO4QXBWP-bd530d12.js +1 -0
  182. package/dist/ganttDiagram-NO4QXBWP-e5e495d6.js +1 -0
  183. package/dist/gitGraph-TEB2WS4Q-72ba3362.js +1 -0
  184. package/dist/gitGraph-TEB2WS4Q-d07b15b3.js +1 -0
  185. package/dist/gitGraphDiagram-IHSO6WYX-2964ff91.js +1 -0
  186. package/dist/gitGraphDiagram-IHSO6WYX-4d9324ad.js +1 -0
  187. package/dist/gitGraphDiagram-IHSO6WYX-97bf868b.js +1 -0
  188. package/dist/graph-0df36b9d.js +1 -0
  189. package/dist/graph-c6801890.js +1 -0
  190. package/dist/index.d.ts.map +1 -0
  191. package/dist/info-DKCQHKI2-d8e8a901.js +1 -0
  192. package/dist/info-DKCQHKI2-dd69502c.js +1 -0
  193. package/dist/infoDiagram-FWYZ7A6U-1267309e.js +1 -0
  194. package/dist/infoDiagram-FWYZ7A6U-5b9d28af.js +1 -0
  195. package/dist/infoDiagram-FWYZ7A6U-cc33afe4.js +1 -0
  196. package/dist/init-b029a625.js +1 -0
  197. package/dist/init-cf76ae07.js +1 -0
  198. package/dist/ishikawaDiagram-FXEZZL3T-3f0977e8.js +1 -0
  199. package/dist/ishikawaDiagram-FXEZZL3T-89c1b2f4.js +1 -0
  200. package/dist/ishikawaDiagram-FXEZZL3T-9fef4653.js +1 -0
  201. package/dist/journeyDiagram-5HDEW3XC-563a68ff.js +1 -0
  202. package/dist/journeyDiagram-5HDEW3XC-c8c8d701.js +1 -0
  203. package/dist/journeyDiagram-5HDEW3XC-e6c5e84b.js +1 -0
  204. package/dist/kanban-definition-HUTT4EX6-3719e367.js +1 -0
  205. package/dist/kanban-definition-HUTT4EX6-7bc0cd1e.js +1 -0
  206. package/dist/kanban-definition-HUTT4EX6-d8b002e3.js +1 -0
  207. package/dist/katex-67456a45.js +1 -0
  208. package/dist/katex-b134d23c.js +1 -0
  209. package/dist/layout-e44354bf.js +1 -0
  210. package/dist/layout-ff5d33a1.js +1 -0
  211. package/dist/linear-7b1a23f3.js +1 -0
  212. package/dist/linear-d7ad6d25.js +1 -0
  213. package/dist/linear-e5c99c88.js +1 -0
  214. package/dist/map-05f0ff95.js +1 -0
  215. package/dist/map-d3292a5b.js +1 -0
  216. package/dist/mermaid-parser.core-6df0beec.js +1 -0
  217. package/dist/mermaid-parser.core-d8d1c2b9.js +1 -0
  218. package/dist/mermaid.core-2d237a1e.js +1 -0
  219. package/dist/mermaid.core-70d5aead.js +1 -0
  220. package/dist/mermaid.core-8797d6a9.js +1 -0
  221. package/dist/mindmap-definition-LN4V7U3C-04a12a88.js +1 -0
  222. package/dist/mindmap-definition-LN4V7U3C-86a890ce.js +1 -0
  223. package/dist/mindmap-definition-LN4V7U3C-f495948c.js +1 -0
  224. package/dist/ordinal-221e41d7.js +1 -0
  225. package/dist/ordinal-4a51e46c.js +1 -0
  226. package/dist/packet-7NZHBO7P-b4586e10.js +1 -0
  227. package/dist/packet-7NZHBO7P-f62750ff.js +1 -0
  228. package/dist/pegDiagram-2B236MQR-234fe6d1.js +1 -0
  229. package/dist/pegDiagram-2B236MQR-2826e278.js +1 -0
  230. package/dist/pegDiagram-2B236MQR-64eeb662.js +1 -0
  231. package/dist/pie-RZYD4A2V-106ba3d7.js +1 -0
  232. package/dist/pie-RZYD4A2V-752eda00.js +1 -0
  233. package/dist/pieDiagram-ENE6RG2P-0c3b09b8.js +1 -0
  234. package/dist/pieDiagram-ENE6RG2P-3fb5f734.js +1 -0
  235. package/dist/pieDiagram-ENE6RG2P-af928526.js +1 -0
  236. package/dist/quadrantDiagram-ABIIQ3AL-1a55c0f5.js +1 -0
  237. package/dist/quadrantDiagram-ABIIQ3AL-3d15c26d.js +1 -0
  238. package/dist/quadrantDiagram-ABIIQ3AL-9110fa9c.js +1 -0
  239. package/dist/queries/sendMessageQuery.d.ts.map +1 -0
  240. package/dist/radar-I7S5WNFK-53bde9ff.js +1 -0
  241. package/dist/radar-I7S5WNFK-87e8c5ba.js +1 -0
  242. package/dist/railroad-3IZDKUUU-99427b9f.js +1 -0
  243. package/dist/railroad-3IZDKUUU-9e29587d.js +1 -0
  244. package/dist/railroad-abnf-AHOZXSZD-1d11cb5b.js +1 -0
  245. package/dist/railroad-abnf-AHOZXSZD-c27db0bc.js +1 -0
  246. package/dist/railroad-ebnf-EBAXGLYW-38dff87c.js +1 -0
  247. package/dist/railroad-ebnf-EBAXGLYW-6bb5de0c.js +1 -0
  248. package/dist/railroad-peg-LSFZ7HO6-c9f0aa71.js +1 -0
  249. package/dist/railroad-peg-LSFZ7HO6-efcb0a43.js +1 -0
  250. package/dist/railroadDiagram-RFXS5EU6-14373a87.js +1 -0
  251. package/dist/railroadDiagram-RFXS5EU6-ec9e696e.js +1 -0
  252. package/dist/railroadDiagram-RFXS5EU6-effa5611.js +1 -0
  253. package/dist/register.d.ts.map +1 -0
  254. package/dist/requirementDiagram-TGXJPOKE-3d199581.js +1 -0
  255. package/dist/requirementDiagram-TGXJPOKE-5a337f1a.js +1 -0
  256. package/dist/requirementDiagram-TGXJPOKE-a7960859.js +1 -0
  257. package/dist/sankeyDiagram-HTMAVEWB-209eac30.js +1 -0
  258. package/dist/sankeyDiagram-HTMAVEWB-3c852fda.js +1 -0
  259. package/dist/sankeyDiagram-HTMAVEWB-46aa1eb1.js +1 -0
  260. package/dist/sequenceDiagram-DBY2YBRQ-4121f7c2.js +1 -0
  261. package/dist/sequenceDiagram-DBY2YBRQ-7bad18e4.js +1 -0
  262. package/dist/sequenceDiagram-DBY2YBRQ-af96f48e.js +1 -0
  263. package/dist/sizeCapture-X5ZJPWSS-13826306.js +1 -0
  264. package/dist/sizeCapture-X5ZJPWSS-32e2eec7.js +1 -0
  265. package/dist/sizeCapture-X5ZJPWSS-a078176f.js +1 -0
  266. package/dist/stateDiagram-2N3HPSRC-527374a2.js +1 -0
  267. package/dist/stateDiagram-2N3HPSRC-8047e124.js +1 -0
  268. package/dist/stateDiagram-2N3HPSRC-ba344b5d.js +1 -0
  269. package/dist/stateDiagram-v2-6OUMAXLB-7580bf69.js +1 -0
  270. package/dist/stateDiagram-v2-6OUMAXLB-d4c58fd3.js +1 -0
  271. package/dist/stateDiagram-v2-6OUMAXLB-e5921044.js +1 -0
  272. package/dist/store/constant.d.ts.map +1 -0
  273. package/dist/swimlanes-5IMT3BWC-5834b232.js +1 -0
  274. package/dist/swimlanes-5IMT3BWC-791a3547.js +1 -0
  275. package/dist/swimlanes-5IMT3BWC-db2c593a.js +1 -0
  276. package/dist/swimlanesDiagram-G3AALYLV-36c30eec.js +1 -0
  277. package/dist/swimlanesDiagram-G3AALYLV-89220ddd.js +1 -0
  278. package/dist/swimlanesDiagram-G3AALYLV-b621330d.js +1 -0
  279. package/dist/timeline-definition-FHXFAJF6-0482a67a.js +1 -0
  280. package/dist/timeline-definition-FHXFAJF6-1d165a67.js +1 -0
  281. package/dist/timeline-definition-FHXFAJF6-f9600b97.js +1 -0
  282. package/dist/treeView-QDETBFTQ-0ecf20cd.js +1 -0
  283. package/dist/treeView-QDETBFTQ-96ed8e2f.js +1 -0
  284. package/dist/treemap-6X3UGDF4-0a7f19ca.js +1 -0
  285. package/dist/treemap-6X3UGDF4-9f498e0c.js +1 -0
  286. package/dist/types/chart.d.ts.map +1 -0
  287. package/dist/types.d.ts +1 -0
  288. package/dist/types.d.ts.map +1 -0
  289. package/dist/utils/audioRecording.d.ts.map +1 -0
  290. package/dist/utils/chartInstanceManager.d.ts.map +1 -0
  291. package/dist/utils/chartTagParser.d.ts.map +1 -0
  292. package/dist/utils/chatInputHistory.d.ts.map +1 -0
  293. package/dist/utils/chatStreamHelper.d.ts.map +1 -0
  294. package/dist/utils/index.d.ts.map +1 -0
  295. package/dist/utils/isMobileSignal.d.ts.map +1 -0
  296. package/dist/utils/transcriptApi.d.ts.map +1 -0
  297. package/dist/utils/ultimateJsonParser.d.ts.map +1 -0
  298. package/dist/vennDiagram-L72KCM5P-05176193.js +1 -0
  299. package/dist/vennDiagram-L72KCM5P-25a48393.js +1 -0
  300. package/dist/vennDiagram-L72KCM5P-28cffef7.js +1 -0
  301. package/dist/wardley-OPB4EBWU-08c5f013.js +1 -0
  302. package/dist/wardley-OPB4EBWU-9803a1d9.js +1 -0
  303. package/dist/wardleyDiagram-EHGQE667-052e6de9.js +1 -0
  304. package/dist/wardleyDiagram-EHGQE667-6a614fd9.js +1 -0
  305. package/dist/wardleyDiagram-EHGQE667-d11fe904.js +1 -0
  306. package/dist/web-25bb78b9.js +1 -0
  307. package/dist/web-753300e1.js +1 -0
  308. package/dist/web-c3ed22c4.js +1 -0
  309. package/dist/web.d.ts.map +1 -0
  310. package/dist/web.js +1 -1
  311. package/dist/window.d.ts.map +1 -0
  312. package/dist/xychartDiagram-FW5EYKEG-43118b83.js +1 -0
  313. package/dist/xychartDiagram-FW5EYKEG-d77187fe.js +1 -0
  314. package/dist/xychartDiagram-FW5EYKEG-f2fac492.js +1 -0
  315. package/package.json +86 -86
  316. package/server.js +477 -477
  317. package/.idea/flowise-chatbox.iml +0 -10
  318. package/.idea/modules.xml +0 -8
  319. package/.idea/workspace.xml +0 -4
  320. package/docs/embedding-style-guide.md +0 -417
@@ -0,0 +1 @@
1
+ var t,e;(t=self.document)&&!t.getElementById("livereloadscript")&&((e=t.createElement("script")).async=1,e.src="//"+(self.location.host||"localhost").split(":")[0]+":35729/livereload.js?snipver=1",e.id="livereloadscript",t.getElementsByTagName("head")[0].appendChild(e));import{g as n}from"./chunk-5VM5RSS4-5fc85a49.js";import{d as i,h as a,g as r,b as s}from"./chunk-32BRIVSS-10ac68f7.js";import{_ as o,d as l,n as c,o as h,s as u,g as p,c as y,b as d,v as f,j as g,k as m}from"./mermaid.core-70d5aead.js";import{d as x}from"./arc-24dd4755.js";import"./web-25bb78b9.js";var k=(()=>{var t=o(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],a=[1,11],r=[1,12],s=[1,13],l=[1,14];n={trace:o(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:o(function(t,e,n,i,a,r,s){var o=r.length-1;switch(a){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:a,16:r,17:s,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:a,16:r,17:s,18:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:o(function(t,e){var n;if(!e.recoverable)throw(n=new Error(t)).hash=e,n;this.trace(t)},"parseError"),parse:o(function(t){var e,n=this,i=[0],a=[],r=[null],s=[],l=this.table,c="",h=0,u=0,p=s.slice.call(arguments,1),y=Object.create(this.lexer),d={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(d.yy[e]=this.yy[e]);y.setInput(t,d.yy),d.yy.lexer=y,d.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var f=y.yylloc,g=(s.push(f),y.options&&y.options.ranges);function m(){var t=a.pop()||y.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(a=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(function(t){i.length=i.length-2*t,r.length=r.length-t,s.length=s.length-t},"popStack"),o(m,"lex");for(var x,k,_,b,v,w,T={};;){if(k=i[i.length-1],void 0===(_=this.defaultActions[k]||(null==x&&(x=m()),l[k]&&l[k][x]))||!_.length||!_[0]){var $,M=[];for(b in l[k])this.terminals_[b]&&2<b&&M.push("'"+this.terminals_[b]+"'");$=y.showPosition?"Parse error on line "+(h+1)+":\n"+y.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError($,{text:y.match,token:this.terminals_[x]||x,line:y.yylineno,loc:f,expected:M})}if(_[0]instanceof Array&&1<_.length)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),r.push(y.yytext),s.push(y.yylloc),i.push(_[1]),x=null,u=y.yyleng,c=y.yytext,h=y.yylineno,f=y.yylloc;break;case 2:if(v=this.productions_[_[1]][1],T.$=r[r.length-v],T._$={first_line:s[s.length-(v||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(v||1)].first_column,last_column:s[s.length-1].last_column},g&&(T._$.range=[s[s.length-(v||1)].range[0],s[s.length-1].range[1]]),void 0!==(w=this.performAction.apply(T,[c,u,h,d.yy,_[1],r,s].concat(p))))return w;v&&(i=i.slice(0,-1*v*2),r=r.slice(0,-1*v),s=s.slice(0,-1*v)),i.push(this.productions_[_[1]][0]),r.push(T.$),s.push(T._$),w=l[i[i.length-2]][i[i.length-1]],i.push(w);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:o(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:o(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:o(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},"input"),unput:o(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g),i=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),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===t.length?this.yylloc.first_column:0)+t[t.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:o(function(t,e){var n,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)),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,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},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,i,a=this._currentRules(),r=0;r<a.length;r++)if((n=this._input.match(this.rules[a[r]]))&&(!e||n[0].length>e[0].length))if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[r])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,a[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){return this.next()||this.lex()},"lex"),begin:o(function(t){this.conditionStack.push(t)},"begin"),popState:o(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:o(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:o(function(t){this.begin(t)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;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 c(){this.yy={}}return n.lexer=i,o(c,"Parser"),new((c.prototype=n).Parser=c)})(),_=k.parser=k,b="",v=[],w=[],T=[],$=o(function(){v.length=0,w.length=0,b="",T.length=0,f()},"clear"),M=o(function(t){b=t,v.push(t)},"addSection"),S=o(function(){return v},"getSections"),E=o(function(){let t=j(),e=0;for(;!t&&e<100;)t=j(),e++;return w.push(...T),w},"getTasks"),C=o(function(){let t=[];return w.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),I=o(function(t,e){let n=0,i=[];e=(1===(e=e.substr(1).split(":")).length?(n=Number(e[0]),[]):(n=Number(e[0]),e[1].split(","))).map(t=>t.trim()),e={section:b,type:b,people:e,task:t,score:n},T.push(e)},"addTask"),P=o(function(t){t={section:b,type:b,description:t,task:t,classes:[]},w.push(t)},"addTaskOrg"),j=o(function(){var t,e,n=o(function(t){return T[t].processed},"compileTask");let i=!0;for([t,e]of T.entries())n(t),i=i&&e.processed;return i},"compileTasks"),A=o(function(){return C()},"getActors"),B={getConfig:o(()=>l().journey,"getConfig"),clear:$,setDiagramTitle:c,getDiagramTitle:h,setAccTitle:u,getAccTitle:p,setAccDescription:y,getAccDescription:d,addSection:M,getSections:S,getTasks:E,addTask:I,addTaskOrg:P,getActors:A},V=o(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n font-family: ${t.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?"fill: "+t.faceColor:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?"fill: "+t.fillType0:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?"fill: "+t.fillType1:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?"fill: "+t.fillType2:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?"fill: "+t.fillType3:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?"fill: "+t.fillType4:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?"fill: "+t.fillType5:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?"fill: "+t.fillType6:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?"fill: "+t.fillType7:""};\n }\n\n .actor-0 {\n ${t.actor0?"fill: "+t.actor0:""};\n }\n .actor-1 {\n ${t.actor1?"fill: "+t.actor1:""};\n }\n .actor-2 {\n ${t.actor2?"fill: "+t.actor2:""};\n }\n .actor-3 {\n ${t.actor3?"fill: "+t.actor3:""};\n }\n .actor-4 {\n ${t.actor4?"fill: "+t.actor4:""};\n }\n .actor-5 {\n ${t.actor5?"fill: "+t.actor5:""};\n }\n ${n()}\n`,"getStyles"),F=V,R=o(function(t,e){return i(t,e)},"drawRect"),L=o(function(t,e){var n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function i(t){var n=x().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(t){var n=x().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function r(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(t=t.append("g")).append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),t.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),o(i,"smile"),o(a,"sad"),o(r,"ambivalent"),(3<e.score?i:e.score<3?a:r)(t),n},"drawFace"),O=o(function(t,e){return(t=t.append("circle")).attr("cx",e.cx),t.attr("cy",e.cy),t.attr("class","actor-"+e.pos),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("r",e.r),void 0!==t.class&&t.attr("class",t.class),void 0!==e.title&&t.append("title").text(e.title),t},"drawCircle"),N=o(function(t,e){return a(t,e)},"drawText"),D=o(function(t,e){function n(t,e,n,i,a){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-a)+" "+(t+n-1.2*a)+","+(e+i)+" "+t+","+(e+i)}o(n,"genPoints");var i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,N(t,e)},"drawLabel"),z=o(function(t,e,n){t=t.append("g");var i=r();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,R(t,i),X(n)(e.text,t,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),Y=-1,W=o(function(t,e,n,i){var a=e.x+n.width/2;let s=t.append("g");Y++,s.append("line").attr("id",i+"-task"+Y).attr("x1",a).attr("y1",e.y).attr("x2",a).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),L(s,{cx:a,cy:300+30*(5-e.score),score:e.score}),(t=r()).x=e.x,t.y=e.y,t.fill=e.fill,t.width=n.width,t.height=n.height,t.class="task task-type-"+e.num,t.rx=3,t.ry=3,R(s,t);let o=e.x+14;e.people.forEach(t=>{var n=e.actors[t].color;n={cx:o,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};O(s,n),o+=10}),X(n)(e.task,s,t.x,t.y,t.width,t.height,{class:"task"},n,e.colour)},"drawTask"),q=o(function(t,e){s(t,e)},"drawBackgroundRect"),X=(()=>{function t(t,e,n,a,r,s,o,l){i(e.append("text").attr("x",n+r/2).attr("y",a+s/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,a,r,s,o,l,c){var{taskFontSize:h,taskFontFamily:u}=l,p=t.split(/<br\s*\/?>/gi);for(let t=0;t<p.length;t++){var y=t*h-h*(p.length-1)/2,d=e.append("text").attr("x",n+r/2).attr("y",a).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);d.append("tspan").attr("x",n+r/2).attr("dy",y).text(p[t]),d.attr("y",a+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(d,o)}}function n(t,n,a,r,s,o,l,c){var h=(n=n.append("switch")).append("foreignObject").attr("x",a).attr("y",r).attr("width",s).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,n,a,r,s,o,l,c),i(h,l)}function i(t,e){for(var n in e)n in e&&t.attr(n,e[n])}return o(t,"byText"),o(e,"byTspan"),o(n,"byFo"),o(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}})(),G=o(function(t,e){Y=-1,t.append("defs").append("marker").attr("id",e+"-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"),U={drawRect:R,drawCircle:O,drawSection:z,drawText:N,drawLabel:D,drawTask:W,drawBackgroundRect:q,initGraphics:G},H=o(function(t){Object.keys(t).forEach(function(e){Q[e]=t[e]})},"setConf"),Z={},J=0;function K(t){let e=l().journey,n=e.maxLabelWidth,i=(J=0,60);Object.keys(Z).forEach(a=>{var r=Z[a].color;r={cx:20,cy:i,r:7,fill:r,stroke:"#000",pos:Z[a].position};U.drawCircle(t,r);let s=t.append("text").attr("visibility","hidden").text(a);r=s.node().getBoundingClientRect().width,s.remove();let o=[];if(r<=n)o=[a];else{r=a.split(" ");let e="";s=t.append("text").attr("visibility","hidden"),r.forEach(t=>{var i=e?e+" "+t:t;if((s.text(i),s.node().getBoundingClientRect().width)>n){if(e&&o.push(e),e=t,s.text(t),s.node().getBoundingClientRect().width>n){let i="";for(var a of t)i+=a,s.text(i+"-"),s.node().getBoundingClientRect().width>n&&(o.push(i.slice(0,-1)+"-"),i=a);e=i}}else e=i}),e&&o.push(e),s.remove()}o.forEach((n,a)=>{a={x:40,y:i+7+20*a,fill:"#666",text:n,textMargin:e.boxTextMargin??5},n=U.drawText(t,a).node().getBoundingClientRect().width,J<n&&n>e.leftMargin-n&&(J=n)}),i+=Math.max(20,20*o.length)})}o(K,"drawActorLegend");var Q=l().journey,tt=0,et=o(function(t,e,n,i){var a=(h=l()).journey.titleColor,r=h.journey.titleFontSize,s=h.journey.titleFontFamily;let o;"sandbox"===(h=h.securityLevel)&&(o=g("#i"+e));var c,h=g("sandbox"===h?o.nodes()[0].contentDocument.body:"body"),u=(h=(nt.init(),h.select("#"+e)),U.initGraphics(h,e),i.db.getTasks()),p=i.db.getDiagramTitle();i=i.db.getActors();for(c in Z)delete Z[c];let y=0;i.forEach(t=>{Z[t]={color:Q.actorColours[y%Q.actorColours.length],position:y},y++}),K(h),tt=Q.leftMargin+J,nt.insert(0,0,tt,50*Object.keys(Z).length),rt(h,u,0,e),i=nt.getBounds(),p&&h.append("text").text(p).attr("x",tt).attr("font-size",r).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",s),u=i.stopy-i.starty+2*Q.diagramMarginY,r=tt+i.stopx+2*Q.diagramMarginX,m(h,u,r,Q.useMaxWidth),h.append("line").attr("x1",tt).attr("y1",4*Q.height).attr("x2",r-tt-4).attr("y2",4*Q.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)"),a=p?70:0,h.attr("viewBox",i.startx+` -25 ${r} `+(u+a)),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",u+a+25)},"draw"),nt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:o(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:o(function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},"updateVal"),updateBounds:o(function(t,e,n,i){let a=l().journey,r=this,s=0;function c(l){return o(function(o){s++;var c=r.sequenceItems.length-s+1;r.updateVal(o,"starty",e-c*a.boxMargin,Math.min),r.updateVal(o,"stopy",i+c*a.boxMargin,Math.max),r.updateVal(nt.data,"startx",t-c*a.boxMargin,Math.min),r.updateVal(nt.data,"stopx",n+c*a.boxMargin,Math.max),"activation"!==l&&(r.updateVal(o,"startx",t-c*a.boxMargin,Math.min),r.updateVal(o,"stopx",n+c*a.boxMargin,Math.max),r.updateVal(nt.data,"starty",e-c*a.boxMargin,Math.min),r.updateVal(nt.data,"stopy",i+c*a.boxMargin,Math.max))},"updateItemBounds")}o(c,"updateFn"),this.sequenceItems.forEach(c())},"updateBounds"),insert:o(function(t,e,n,i){var a=Math.min(t,n);t=Math.max(t,n),n=Math.min(e,i),e=Math.max(e,i);this.updateVal(nt.data,"startx",a,Math.min),this.updateVal(nt.data,"starty",n,Math.min),this.updateVal(nt.data,"stopx",t,Math.max),this.updateVal(nt.data,"stopy",e,Math.max),this.updateBounds(a,n,t,e)},"insert"),bumpVerticalPos:o(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:o(function(){return this.verticalPos},"getVerticalPos"),getBounds:o(function(){return this.data},"getBounds")},it=Q.sectionFills,at=Q.sectionColours,rt=o(function(t,e,n,i){var a=l().journey;let r="";var s,o,c=n+(2*a.height+a.diagramMarginY);let h=0,u="#CCC",p="black",y=0;for([s,o]of e.entries()){if(r!==o.section){u=it[h%it.length],y=h%it.length,p=at[h%at.length];let n=0;var d=o.section;for(let t=s;t<e.length&&e[t].section==d;t++)n+=1;var f={x:s*a.taskMargin+s*a.width+tt,y:50,text:o.section,fill:u,num:y,colour:p,taskCount:n};U.drawSection(t,f,a),r=o.section,h++}f=o.people.reduce((t,e)=>(Z[e]&&(t[e]=Z[e]),t),{}),o.x=s*a.taskMargin+s*a.width+tt,o.y=c,o.width=a.diagramMarginX,o.height=a.diagramMarginY,o.colour=p,o.fill=u,o.num=y,o.actors=f,U.drawTask(t,o,a,i),nt.insert(o.x,o.y,o.x+o.width+a.taskMargin,450)}},"drawTasks"),st={setConf:H,draw:et},ot={parser:_,db:B,renderer:st,styles:F,init:o(t=>{st.setConf(t.journey),B.clear()},"init")};export{ot as diagram};
@@ -0,0 +1 @@
1
+ var e,t;(e=self.document)&&!e.getElementById("livereloadscript")&&((t=e.createElement("script")).async=1,t.src="//"+(self.location.host||"localhost").split(":")[0]+":35729/livereload.js?snipver=1",t.id="livereloadscript",e.getElementsByTagName("head")[0].appendChild(t));import{_ as n,l as i,d as s,K as r,ag as a,ah as o,ai as l,X as c,E as h,i as g,p as d,J as u,Y as p,$ as y,a0 as f}from"./mermaid.core-70d5aead.js";import{g as m}from"./chunk-5VM5RSS4-5fc85a49.js";import"./web-25bb78b9.js";var b=(()=>{var e=n(function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},"o"),t=[1,13],i=[1,12],s=[1,15],r=[1,16],a=[1,20],o=[1,19],l=[1,26],c=[1,24],h=[1,25],g=[6,7,11],d=[1,31],u=[6,7,11,24],p=[1,6,13,16,17,20,23],y=[1,35],f=[1,36],m=[1,6,7,11,13,16,17,20,23],b=[1,38],_={trace:n(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:n(function(e,t,n,i,s,r,a){var o=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[o-1].id),i.addNode(r[o-2].length,r[o-1].id,r[o-1].descr,r[o-1].type,r[o]);break;case 16:i.getLogger().info("Node: ",r[o].id),i.addNode(r[o-1].length,r[o].id,r[o].descr,r[o].type);break;case 17:i.getLogger().trace("Icon: ",r[o]),i.decorateNode({icon:r[o]});break;case 18:case 23:i.decorateNode({class:r[o]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[o-1].id),i.addNode(0,r[o-1].id,r[o-1].descr,r[o-1].type,r[o]);break;case 21:i.getLogger().trace("Node: ",r[o].id),i.addNode(0,r[o].id,r[o].descr,r[o].type);break;case 22:i.decorateNode({icon:r[o]});break;case 27:i.getLogger().trace("node found ..",r[o-2]),this.$={id:r[o-1],descr:r[o-1],type:i.getType(r[o-2],r[o])};break;case 28:this.$={id:r[o],descr:r[o],type:0};break;case 29:i.getLogger().trace("node found ..",r[o-3]),this.$={id:r[o-3],descr:r[o-1],type:i.getType(r[o-2],r[o])};break;case 30:this.$=r[o-1]+r[o];break;case 31:this.$=r[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:_=[1,4]},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:_},{6:t,7:[1,10],9:9,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:o},e(k=[6,7,8],[2,3]),{1:[2,2]},e(k,[2,4]),e(k,[2,5]),{1:[2,6],6:t,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:o},{6:t,9:22,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:o},{6:l,7:c,10:23,11:h},e(g,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:o}),e(g,[2,19]),e(g,[2,21],{15:30,24:d}),e(g,[2,22]),e(g,[2,23]),e(u,[2,25]),e(u,[2,26]),e(u,[2,28],{20:[1,32]}),{21:[1,33]},{6:l,7:c,10:34,11:h},{1:[2,7],6:t,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:o},e(p,[2,14],{7:y,11:f}),e(m,[2,8]),e(m,[2,9]),e(m,[2,10]),e(g,[2,16],{15:37,24:d}),e(g,[2,17]),e(g,[2,18]),e(g,[2,20],{24:b}),e(u,[2,31]),{21:[1,39]},{22:[1,40]},e(p,[2,13],{7:y,11:f}),e(m,[2,11]),e(m,[2,12]),e(g,[2,15],{24:b}),e(u,[2,30]),{22:[1,41]},e(u,[2,27]),e(u,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:n(function(e,t){var n;if(!t.recoverable)throw(n=new Error(e)).hash=t,n;this.trace(e)},"parseError"),parse:n(function(e){var t,i=this,s=[0],r=[],a=[null],o=[],l=this.table,c="",h=0,g=0,d=o.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(p.yy[t]=this.yy[t]);u.setInput(e,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var y=u.yylloc,f=(o.push(y),u.options&&u.options.ranges);function m(){var e=r.pop()||u.lex()||1;return"number"!=typeof e&&(e instanceof Array&&(e=(r=e).pop()),e=i.symbols_[e]||e),e}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,n(function(e){s.length=s.length-2*e,a.length=a.length-e,o.length=o.length-e},"popStack"),n(m,"lex");for(var b,_,k,E,S,N,x={};;){if(_=s[s.length-1],void 0===(k=this.defaultActions[_]||(null==b&&(b=m()),l[_]&&l[_][b]))||!k.length||!k[0]){var L,D=[];for(E in l[_])this.terminals_[E]&&2<E&&D.push("'"+this.terminals_[E]+"'");L=u.showPosition?"Parse error on line "+(h+1)+":\n"+u.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:u.match,token:this.terminals_[b]||b,line:u.yylineno,loc:y,expected:D})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(k[0]){case 1:s.push(b),a.push(u.yytext),o.push(u.yylloc),s.push(k[1]),b=null,g=u.yyleng,c=u.yytext,h=u.yylineno,y=u.yylloc;break;case 2:if(S=this.productions_[k[1]][1],x.$=a[a.length-S],x._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},f&&(x._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(N=this.performAction.apply(x,[c,g,h,p.yy,k[1],a,o].concat(d))))return N;S&&(s=s.slice(0,-1*S*2),a=a.slice(0,-1*S),o=o.slice(0,-1*S)),s.push(this.productions_[k[1]][0]),a.push(x.$),o.push(x._$),N=l[s[s.length-2]][s[s.length-1]],s.push(N);break;case 3:return!0}}return!0},"parse")},k={EOF:1,parseError:n(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:n(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:n(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:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g),i=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,e=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),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===e.length?this.yylloc.first_column:0)+e[e.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:n(function(){return this._more=!0,this},"more"),reject:n(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:n(function(e){this.unput(this.match.slice(e))},"less"),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:n(function(e,t){var n,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)),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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 s in i)this[s]=i[s];return!1},"test_match"),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e,t,n,i,s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!t||n[0].length>t[0].length))if(t=n,i=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,s[r])))return e;if(!this._backtrack)return!1;t=!1}else if(!this.options.flex)break;return t?!1!==(e=this.test_match(t,s[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n(function(){return this.next()||this.lex()},"lex"),begin:n(function(e){this.conditionStack.push(e)},"begin"),popState:n(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:n(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:n(function(e){this.begin(e)},"pushState"),stateStackSize:n(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n(function(e,t,n,i){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:case 10:case 29:case 32: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 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:case 21:case 22: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 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";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:case 39:case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 41: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 E(){this.yy={}}return _.lexer=k,n(E,"Parser"),new((E.prototype=_).Parser=E)})(),_=b.parser=b,k=[],E=[],S=0,N={},x=n(()=>{k=[],E=[],S=0,N={}},"clear"),L=n(e=>{if(0===k.length)return null;var t=k[0].level;let n=null;for(let e=k.length-1;0<=e;e--)if(k[e].level===t&&(n=n||k[e]),k[e].level<t)throw new Error('Items without section detected, found section ("'+k[e].label+'")');return e===n?.level?null:n},"getSection"),D=n(function(){return E},"getSections"),v=n(function(){var e=[],t=D(),n=s();for(let s of t){var i,r={id:s.id,label:g(s.label??"",n),labelType:"markdown",isGroup:!0,ticket:s.ticket,shape:"kanbanSection",level:s.level,look:n.look};r=(e.push(r),k.filter(e=>e.parentId===s.id));for(i of r){var a={id:i.id,parentId:s.id,label:g(i.label??"",n),labelType:"markdown",isGroup:!1,ticket:i?.ticket,priority:i?.priority,assigned:i?.assigned,icon:i?.icon,shape:"kanbanItem",level:i.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(a)}}return{nodes:e,edges:[],other:{},config:s()}},"getData"),I=n((e,t,n,i,r)=>{var a=s();let o=a.mindmap?.padding??h.mindmap.padding;switch(i){case O.ROUNDED_RECT:case O.RECT:case O.HEXAGON:o*=2}if(i={id:g(t,a)||"kbn"+S++,level:e,label:g(n,a),width:a.mindmap?.maxNodeWidth??h.mindmap.maxNodeWidth,padding:o,isGroup:!1},void 0!==r){let e;if(e=r.includes("\n")?r+"\n":"{\n"+r+"\n}",(t=d(e,{schema:u})).shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes("_")))throw new Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&"kanbanItem"===t.shape&&(i.shape=t?.shape),t?.label&&(i.label=t?.label),t?.icon&&(i.icon=t?.icon.toString()),t?.assigned&&(i.assigned=t?.assigned.toString()),t?.ticket&&(i.ticket=t?.ticket.toString()),t?.priority&&(i.priority=t?.priority)}(n=L(e))?i.parentId=n.id||"kbn"+S++:E.push(i),k.push(i)},"addNode"),O={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},C=n((e,t)=>{switch(i.debug("In get type",e,t),e){case"[":return O.RECT;case"(":return")"===t?O.ROUNDED_RECT:O.CLOUD;case"((":return O.CIRCLE;case")":return O.CLOUD;case"))":return O.BANG;case"{{":return O.HEXAGON;default:return O.DEFAULT}},"getType"),w=n((e,t)=>{N[e]=t},"setElementForId"),A=n(e=>{var t,n;e&&(t=s(),n=k[k.length-1],e.icon&&(n.icon=g(e.icon,t)),e.class)&&(n.cssClasses=g(e.class,t))},"decorateNode"),$=n(e=>{switch(e){case O.DEFAULT:return"no-border";case O.RECT:return"rect";case O.ROUNDED_RECT:return"rounded-rect";case O.CIRCLE:return"circle";case O.CLOUD:return"cloud";case O.BANG:return"bang";case O.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),T=n(()=>i,"getLogger"),R=n(e=>N[e],"getElementById"),B={clear:x,addNode:I,getSections:D,getData:v,nodeType:O,getType:C,setElementForId:w,decorateNode:A,type2Str:$,getLogger:T,getElementById:R},P=n(async(e,t,n,g)=>{i.debug("Rendering kanban diagram\n"+e);var d,u=g.db.getData(),p=s();p.htmlLabels=!1,e=r(t);for(d of u.nodes)d.domId=t+"-"+d.id;var y=e.append("g"),f=(y.attr("class","sections"),e.append("g"));f.attr("class","items"),g=u.nodes.filter(e=>e.isGroup);let m=0;var b,_=[];let k=25;for(b of g){var E=p?.kanban?.sectionWidth||200;E=(m+=1,b.x=E*m+10*(m-1)/2,b.width=E,b.y=0,b.height=3*E,b.rx=5,b.ry=5,b.cssClasses=b.cssClasses+" section-"+m,await a(y,b));k=Math.max(k,E?.labelBBox?.height),_.push(E)}let S=0;for(let e of g){var N,x=_[S],L=(S+=1,p?.kanban?.sectionWidth||200),D=3*-L/2+k;let t=D;for(N of u.nodes.filter(t=>t.parentId===e.id)){if(N.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");N.x=e.x,N.width=L-15;var v=(await o(f,N,{config:p})).node().getBBox();N.y=t+v.height/2,await l(N),t=N.y+v.height/2+5}x=x.cluster.select("rect"),D=Math.max(t-D+30,50)+(k-25),x.attr("height",D)}c(void 0,e,p.mindmap?.padding??h.kanban.padding,p.mindmap?.useMaxWidth??h.kanban.useMaxWidth)},"draw"),j={draw:P},F=n(e=>{let t="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],p(e["lineColor"+t])?e["lineColor"+t]=y(e["lineColor"+t],20):e["lineColor"+t]=f(e["lineColor"+t],20);var i=n((t,n)=>(e.darkMode?f:y)(t,n),"adjuster");for(let n=0;n<e.THEME_COLOR_LIMIT;n++){var s=""+(17-3*n);t+=`\n .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {\n fill: ${i(e["cScale"+n],10)};\n stroke: ${i(e["cScale"+n],10)};\n\n }\n .section-${n-1} text {\n fill: ${e["cScaleLabel"+n]};\n }\n .node-icon-${n-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+n]};\n }\n .section-edge-${n-1}{\n stroke: ${e["cScale"+n]};\n }\n .edge-depth-${n-1}{\n stroke-width: ${s};\n }\n .section-${n-1} line {\n stroke: ${e["cScaleInv"+n]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return t},"genSections"),G=n(e=>`\n .edge {\n stroke-width: 3;\n }\n ${F(e)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${e.git0};\n }\n .section-root text {\n fill: ${e.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${e.textColor};\n fill: ${e.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${m()}\n`,"getStyles"),U={db:B,renderer:j,parser:_,styles:G};export{U as diagram};
@@ -0,0 +1 @@
1
+ import{_ as t,l as e,d as n,K as i,ag as s,ah as r,ai as o,X as a,E as c,i as l,p as h,J as g,Y as u,$ as d,a0 as p}from"./mermaid.core-8797d6a9.js";import{g as y}from"./chunk-5VM5RSS4-4b2efd20.js";import"./web-c3ed22c4.js";var f=function(){var e=t((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),n=[1,4],i=[1,13],s=[1,12],r=[1,15],o=[1,16],a=[1,20],c=[1,19],l=[6,7,8],h=[1,26],g=[1,24],u=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38];n={trace:t((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:t((function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}}),"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:i,7:[1,10],9:9,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:i,9:22,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:h,7:g,10:23,11:u},e(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:c}),e(d,[2,19]),e(d,[2,21],{15:30,24:p}),e(d,[2,22]),e(d,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:g,10:34,11:u},{1:[2,7],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(f,[2,14],{7:m,11:b}),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(d,[2,16],{15:37,24:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(f,[2,13],{7:m,11:b}),e(_,[2,11]),e(_,[2,12]),e(d,[2,15],{24:k}),e(y,[2,30]),{22:[1,41]},e(y,[2,27]),e(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t((function(t,e){var n;if(!e.recoverable)throw(n=new Error(t)).hash=e,n;this.trace(t)}),"parseError"),parse:t((function(e){var n,i=this,s=[0],r=[],o=[null],a=[],c=this.table,l="",h=0,g=0,u=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(n in this.yy)Object.prototype.hasOwnProperty.call(this.yy,n)&&(p.yy[n]=this.yy[n]);d.setInput(e,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc,f=(a.push(y),d.options&&d.options.ranges);function m(){var t=r.pop()||d.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(r=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){s.length=s.length-2*t,o.length=o.length-t,a.length=a.length-t}),"popStack"),t(m,"lex");for(var b,_,k,E,S,N,x={};;){if(_=s[s.length-1],void 0===(k=this.defaultActions[_]||(null==b&&(b=m()),c[_]&&c[_][b]))||!k.length||!k[0]){var L,D=[];for(E in c[_])this.terminals_[E]&&2<E&&D.push("'"+this.terminals_[E]+"'");L=d.showPosition?"Parse error on line "+(h+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:y,expected:D})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(k[0]){case 1:s.push(b),o.push(d.yytext),a.push(d.yylloc),s.push(k[1]),b=null,g=d.yyleng,l=d.yytext,h=d.yylineno,y=d.yylloc;break;case 2:if(S=this.productions_[k[1]][1],x.$=o[o.length-S],x._$={first_line:a[a.length-(S||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(S||1)].first_column,last_column:a[a.length-1].last_column},f&&(x._$.range=[a[a.length-(S||1)].range[0],a[a.length-1].range[1]]),void 0!==(N=this.performAction.apply(x,[l,g,h,p.yy,k[1],o,a].concat(u))))return N;S&&(s=s.slice(0,-1*S*2),o=o.slice(0,-1*S),a=a.slice(0,-1*S)),s.push(this.productions_[k[1]][0]),o.push(x.$),a.push(x._$),N=c[s[s.length-2]][s[s.length-1]],s.push(N);break;case 3:return!0}}return!0}),"parse")},l={EOF:1,parseError:t((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:t((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:t((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t}),"input"),unput:t((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g),i=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),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===t.length?this.yylloc.first_column:0)+t[t.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:t((function(){return this._more=!0,this}),"more"),reject:t((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:t((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:t((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:t((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:t((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:t((function(t,e){var n,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)),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var s in i)this[s]=i[s];return!1}),"test_match"),next:t((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,i,s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length))if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:t((function(){return this.next()||this.lex()}),"lex"),begin:t((function(t){this.conditionStack.push(t)}),"begin"),popState:t((function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:t((function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:t((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:t((function(t){this.begin(t)}),"pushState"),stateStackSize:t((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:t((function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return e.yytext=e.yytext.replace(/\n\s*/g,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22: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 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.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 E(){this.yy={}}return n.lexer=l,t(E,"Parser"),new((E.prototype=n).Parser=E)}(),m=f.parser=f,b=[],_=[],k=0,E={},S=t((()=>{b=[],_=[],k=0,E={}}),"clear"),N=t((t=>{if(0===b.length)return null;var e=b[0].level;let n=null;for(let t=b.length-1;0<=t;t--)if(b[t].level===e&&(n=n||b[t]),b[t].level<e)throw new Error('Items without section detected, found section ("'+b[t].label+'")');return t===n?.level?null:n}),"getSection"),x=t((function(){return _}),"getSections"),L=t((function(){var t=[],e=x(),i=n();for(const n of e){var s={id:n.id,label:l(n.label??"",i),labelType:"markdown",isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};s=(t.push(s),b.filter((t=>t.parentId===n.id)));for(const e of s){var r={id:e.id,parentId:n.id,label:l(e.label??"",i),labelType:"markdown",isGroup:!1,ticket:e?.ticket,priority:e?.priority,assigned:e?.assigned,icon:e?.icon,shape:"kanbanItem",level:e.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(r)}}return{nodes:t,edges:[],other:{},config:n()}}),"getData"),D=t(((t,e,i,s,r)=>{var o=n();let a=o.mindmap?.padding??c.mindmap.padding;switch(s){case v.ROUNDED_RECT:case v.RECT:case v.HEXAGON:a*=2}if(s={id:l(e,o)||"kbn"+k++,level:t,label:l(i,o),width:o.mindmap?.maxNodeWidth??c.mindmap.maxNodeWidth,padding:a,isGroup:!1},void 0!==r){let t;if(t=r.includes("\n")?r+"\n":"{\n"+r+"\n}",(e=h(t,{schema:g})).shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(s.shape=e?.shape),e?.label&&(s.label=e?.label),e?.icon&&(s.icon=e?.icon.toString()),e?.assigned&&(s.assigned=e?.assigned.toString()),e?.ticket&&(s.ticket=e?.ticket.toString()),e?.priority&&(s.priority=e?.priority)}(i=N(t))?s.parentId=i.id||"kbn"+k++:_.push(s),b.push(s)}),"addNode"),v={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},I=t(((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return v.RECT;case"(":return")"===n?v.ROUNDED_RECT:v.CLOUD;case"((":return v.CIRCLE;case")":return v.CLOUD;case"))":return v.BANG;case"{{":return v.HEXAGON;default:return v.DEFAULT}}),"getType"),O=t(((t,e)=>{E[t]=e}),"setElementForId"),C=t((t=>{var e,i;t&&(e=n(),i=b[b.length-1],t.icon&&(i.icon=l(t.icon,e)),t.class)&&(i.cssClasses=l(t.class,e))}),"decorateNode"),w=t((t=>{switch(t){case v.DEFAULT:return"no-border";case v.RECT:return"rect";case v.ROUNDED_RECT:return"rounded-rect";case v.CIRCLE:return"circle";case v.CLOUD:return"cloud";case v.BANG:return"bang";case v.HEXAGON:return"hexgon";default:return"no-border"}}),"type2Str"),A=t((()=>e),"getLogger"),$=t((t=>E[t]),"getElementById"),T={clear:S,addNode:D,getSections:x,getData:L,nodeType:v,getType:I,setElementForId:O,decorateNode:C,type2Str:w,getLogger:A,getElementById:$},R={draw:t((async(t,l,h,g)=>{e.debug("Rendering kanban diagram\n"+t);var u=g.db.getData(),d=n();d.htmlLabels=!1,t=i(l);for(const t of u.nodes)t.domId=l+"-"+t.id;var p=t.append("g"),y=(p.attr("class","sections"),t.append("g"));y.attr("class","items"),g=u.nodes.filter((t=>t.isGroup));let f=0;var m=[];let b=25;for(const t of g){var _=d?.kanban?.sectionWidth||200;_=(f+=1,t.x=_*f+10*(f-1)/2,t.width=_,t.y=0,t.height=3*_,t.rx=5,t.ry=5,t.cssClasses=t.cssClasses+" section-"+f,await s(p,t));b=Math.max(b,_?.labelBBox?.height),m.push(_)}let k=0;for(const t of g){var E=m[k],S=(k+=1,d?.kanban?.sectionWidth||200),N=3*-S/2+b;let e=N;for(const n of u.nodes.filter((e=>e.parentId===t.id))){if(n.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");n.x=t.x,n.width=S-15;var x=(await r(y,n,{config:d})).node().getBBox();n.y=e+x.height/2,await o(n),e=n.y+x.height/2+5}E=E.cluster.select("rect"),N=Math.max(e-N+30,50)+(b-25),E.attr("height",N)}a(void 0,t,d.mindmap?.padding??c.kanban.padding,d.mindmap?.useMaxWidth??c.kanban.useMaxWidth)}),"draw")},P=t((e=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],u(e["lineColor"+t])?e["lineColor"+t]=d(e["lineColor"+t],20):e["lineColor"+t]=p(e["lineColor"+t],20);var i=t(((t,n)=>(e.darkMode?p:d)(t,n)),"adjuster");for(let t=0;t<e.THEME_COLOR_LIMIT;t++){var s=""+(17-3*t);n+=`\n .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {\n fill: ${i(e["cScale"+t],10)};\n stroke: ${i(e["cScale"+t],10)};\n\n }\n .section-${t-1} text {\n fill: ${e["cScaleLabel"+t]};\n }\n .node-icon-${t-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+t]};\n }\n .section-edge-${t-1}{\n stroke: ${e["cScale"+t]};\n }\n .edge-depth-${t-1}{\n stroke-width: ${s};\n }\n .section-${t-1} line {\n stroke: ${e["cScaleInv"+t]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return n}),"genSections"),B=t((t=>`\n .edge {\n stroke-width: 3;\n }\n ${P(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${y()}\n`),"getStyles"),j={db:T,renderer:R,parser:m,styles:B};export{j as diagram};
@@ -0,0 +1 @@
1
+ var e,t;(e=self.document)&&!e.getElementById("livereloadscript")&&((t=e.createElement("script")).async=1,t.src="//"+(self.location.host||"localhost").split(":")[0]+":35729/livereload.js?snipver=1",t.id="livereloadscript",e.getElementsByTagName("head")[0].appendChild(t));import{_ as n,l as i,d as s,K as r,ag as a,ah as o,ai as l,X as c,E as h,i as g,p as d,J as u,Y as p,$ as y,a0 as f}from"./mermaid.core-2d237a1e.js";import{g as m}from"./chunk-5VM5RSS4-36b32f6e.js";import"./web-753300e1.js";var b=(()=>{var e=n(function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},"o"),t=[1,13],i=[1,12],s=[1,15],r=[1,16],a=[1,20],o=[1,19],l=[1,26],c=[1,24],h=[1,25],g=[6,7,11],d=[1,31],u=[6,7,11,24],p=[1,6,13,16,17,20,23],y=[1,35],f=[1,36],m=[1,6,7,11,13,16,17,20,23],b=[1,38],_={trace:n(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:n(function(e,t,n,i,s,r,a){var o=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[o-1].id),i.addNode(r[o-2].length,r[o-1].id,r[o-1].descr,r[o-1].type,r[o]);break;case 16:i.getLogger().info("Node: ",r[o].id),i.addNode(r[o-1].length,r[o].id,r[o].descr,r[o].type);break;case 17:i.getLogger().trace("Icon: ",r[o]),i.decorateNode({icon:r[o]});break;case 18:case 23:i.decorateNode({class:r[o]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[o-1].id),i.addNode(0,r[o-1].id,r[o-1].descr,r[o-1].type,r[o]);break;case 21:i.getLogger().trace("Node: ",r[o].id),i.addNode(0,r[o].id,r[o].descr,r[o].type);break;case 22:i.decorateNode({icon:r[o]});break;case 27:i.getLogger().trace("node found ..",r[o-2]),this.$={id:r[o-1],descr:r[o-1],type:i.getType(r[o-2],r[o])};break;case 28:this.$={id:r[o],descr:r[o],type:0};break;case 29:i.getLogger().trace("node found ..",r[o-3]),this.$={id:r[o-3],descr:r[o-1],type:i.getType(r[o-2],r[o])};break;case 30:this.$=r[o-1]+r[o];break;case 31:this.$=r[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:_=[1,4]},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:_},{6:t,7:[1,10],9:9,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:o},e(k=[6,7,8],[2,3]),{1:[2,2]},e(k,[2,4]),e(k,[2,5]),{1:[2,6],6:t,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:o},{6:t,9:22,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:o},{6:l,7:c,10:23,11:h},e(g,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:o}),e(g,[2,19]),e(g,[2,21],{15:30,24:d}),e(g,[2,22]),e(g,[2,23]),e(u,[2,25]),e(u,[2,26]),e(u,[2,28],{20:[1,32]}),{21:[1,33]},{6:l,7:c,10:34,11:h},{1:[2,7],6:t,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:a,23:o},e(p,[2,14],{7:y,11:f}),e(m,[2,8]),e(m,[2,9]),e(m,[2,10]),e(g,[2,16],{15:37,24:d}),e(g,[2,17]),e(g,[2,18]),e(g,[2,20],{24:b}),e(u,[2,31]),{21:[1,39]},{22:[1,40]},e(p,[2,13],{7:y,11:f}),e(m,[2,11]),e(m,[2,12]),e(g,[2,15],{24:b}),e(u,[2,30]),{22:[1,41]},e(u,[2,27]),e(u,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:n(function(e,t){var n;if(!t.recoverable)throw(n=new Error(e)).hash=t,n;this.trace(e)},"parseError"),parse:n(function(e){var t,i=this,s=[0],r=[],a=[null],o=[],l=this.table,c="",h=0,g=0,d=o.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(p.yy[t]=this.yy[t]);u.setInput(e,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var y=u.yylloc,f=(o.push(y),u.options&&u.options.ranges);function m(){var e=r.pop()||u.lex()||1;return"number"!=typeof e&&(e instanceof Array&&(e=(r=e).pop()),e=i.symbols_[e]||e),e}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,n(function(e){s.length=s.length-2*e,a.length=a.length-e,o.length=o.length-e},"popStack"),n(m,"lex");for(var b,_,k,E,S,N,x={};;){if(_=s[s.length-1],void 0===(k=this.defaultActions[_]||(null==b&&(b=m()),l[_]&&l[_][b]))||!k.length||!k[0]){var L,D=[];for(E in l[_])this.terminals_[E]&&2<E&&D.push("'"+this.terminals_[E]+"'");L=u.showPosition?"Parse error on line "+(h+1)+":\n"+u.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:u.match,token:this.terminals_[b]||b,line:u.yylineno,loc:y,expected:D})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(k[0]){case 1:s.push(b),a.push(u.yytext),o.push(u.yylloc),s.push(k[1]),b=null,g=u.yyleng,c=u.yytext,h=u.yylineno,y=u.yylloc;break;case 2:if(S=this.productions_[k[1]][1],x.$=a[a.length-S],x._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},f&&(x._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(N=this.performAction.apply(x,[c,g,h,p.yy,k[1],a,o].concat(d))))return N;S&&(s=s.slice(0,-1*S*2),a=a.slice(0,-1*S),o=o.slice(0,-1*S)),s.push(this.productions_[k[1]][0]),a.push(x.$),o.push(x._$),N=l[s[s.length-2]][s[s.length-1]],s.push(N);break;case 3:return!0}}return!0},"parse")},k={EOF:1,parseError:n(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:n(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:n(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:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g),i=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t,e=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),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===e.length?this.yylloc.first_column:0)+e[e.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:n(function(){return this._more=!0,this},"more"),reject:n(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:n(function(e){this.unput(this.match.slice(e))},"less"),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:n(function(e,t){var n,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)),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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 s in i)this[s]=i[s];return!1},"test_match"),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e,t,n,i,s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!t||n[0].length>t[0].length))if(t=n,i=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,s[r])))return e;if(!this._backtrack)return!1;t=!1}else if(!this.options.flex)break;return t?!1!==(e=this.test_match(t,s[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n(function(){return this.next()||this.lex()},"lex"),begin:n(function(e){this.conditionStack.push(e)},"begin"),popState:n(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:n(function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},"topState"),pushState:n(function(e){this.begin(e)},"pushState"),stateStackSize:n(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n(function(e,t,n,i){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:case 10:case 29:case 32: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 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:case 21:case 22: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 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";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:case 39:case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 41: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 E(){this.yy={}}return _.lexer=k,n(E,"Parser"),new((E.prototype=_).Parser=E)})(),_=b.parser=b,k=[],E=[],S=0,N={},x=n(()=>{k=[],E=[],S=0,N={}},"clear"),L=n(e=>{if(0===k.length)return null;var t=k[0].level;let n=null;for(let e=k.length-1;0<=e;e--)if(k[e].level===t&&(n=n||k[e]),k[e].level<t)throw new Error('Items without section detected, found section ("'+k[e].label+'")');return e===n?.level?null:n},"getSection"),D=n(function(){return E},"getSections"),v=n(function(){var e=[],t=D(),n=s();for(let s of t){var i,r={id:s.id,label:g(s.label??"",n),labelType:"markdown",isGroup:!0,ticket:s.ticket,shape:"kanbanSection",level:s.level,look:n.look};r=(e.push(r),k.filter(e=>e.parentId===s.id));for(i of r){var a={id:i.id,parentId:s.id,label:g(i.label??"",n),labelType:"markdown",isGroup:!1,ticket:i?.ticket,priority:i?.priority,assigned:i?.assigned,icon:i?.icon,shape:"kanbanItem",level:i.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(a)}}return{nodes:e,edges:[],other:{},config:s()}},"getData"),I=n((e,t,n,i,r)=>{var a=s();let o=a.mindmap?.padding??h.mindmap.padding;switch(i){case O.ROUNDED_RECT:case O.RECT:case O.HEXAGON:o*=2}if(i={id:g(t,a)||"kbn"+S++,level:e,label:g(n,a),width:a.mindmap?.maxNodeWidth??h.mindmap.maxNodeWidth,padding:o,isGroup:!1},void 0!==r){let e;if(e=r.includes("\n")?r+"\n":"{\n"+r+"\n}",(t=d(e,{schema:u})).shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes("_")))throw new Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&"kanbanItem"===t.shape&&(i.shape=t?.shape),t?.label&&(i.label=t?.label),t?.icon&&(i.icon=t?.icon.toString()),t?.assigned&&(i.assigned=t?.assigned.toString()),t?.ticket&&(i.ticket=t?.ticket.toString()),t?.priority&&(i.priority=t?.priority)}(n=L(e))?i.parentId=n.id||"kbn"+S++:E.push(i),k.push(i)},"addNode"),O={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},C=n((e,t)=>{switch(i.debug("In get type",e,t),e){case"[":return O.RECT;case"(":return")"===t?O.ROUNDED_RECT:O.CLOUD;case"((":return O.CIRCLE;case")":return O.CLOUD;case"))":return O.BANG;case"{{":return O.HEXAGON;default:return O.DEFAULT}},"getType"),w=n((e,t)=>{N[e]=t},"setElementForId"),A=n(e=>{var t,n;e&&(t=s(),n=k[k.length-1],e.icon&&(n.icon=g(e.icon,t)),e.class)&&(n.cssClasses=g(e.class,t))},"decorateNode"),$=n(e=>{switch(e){case O.DEFAULT:return"no-border";case O.RECT:return"rect";case O.ROUNDED_RECT:return"rounded-rect";case O.CIRCLE:return"circle";case O.CLOUD:return"cloud";case O.BANG:return"bang";case O.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),T=n(()=>i,"getLogger"),R=n(e=>N[e],"getElementById"),B={clear:x,addNode:I,getSections:D,getData:v,nodeType:O,getType:C,setElementForId:w,decorateNode:A,type2Str:$,getLogger:T,getElementById:R},P=n(async(e,t,n,g)=>{i.debug("Rendering kanban diagram\n"+e);var d,u=g.db.getData(),p=s();p.htmlLabels=!1,e=r(t);for(d of u.nodes)d.domId=t+"-"+d.id;var y=e.append("g"),f=(y.attr("class","sections"),e.append("g"));f.attr("class","items"),g=u.nodes.filter(e=>e.isGroup);let m=0;var b,_=[];let k=25;for(b of g){var E=p?.kanban?.sectionWidth||200;E=(m+=1,b.x=E*m+10*(m-1)/2,b.width=E,b.y=0,b.height=3*E,b.rx=5,b.ry=5,b.cssClasses=b.cssClasses+" section-"+m,await a(y,b));k=Math.max(k,E?.labelBBox?.height),_.push(E)}let S=0;for(let e of g){var N,x=_[S],L=(S+=1,p?.kanban?.sectionWidth||200),D=3*-L/2+k;let t=D;for(N of u.nodes.filter(t=>t.parentId===e.id)){if(N.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");N.x=e.x,N.width=L-15;var v=(await o(f,N,{config:p})).node().getBBox();N.y=t+v.height/2,await l(N),t=N.y+v.height/2+5}x=x.cluster.select("rect"),D=Math.max(t-D+30,50)+(k-25),x.attr("height",D)}c(void 0,e,p.mindmap?.padding??h.kanban.padding,p.mindmap?.useMaxWidth??h.kanban.useMaxWidth)},"draw"),j={draw:P},F=n(e=>{let t="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],p(e["lineColor"+t])?e["lineColor"+t]=y(e["lineColor"+t],20):e["lineColor"+t]=f(e["lineColor"+t],20);var i=n((t,n)=>(e.darkMode?f:y)(t,n),"adjuster");for(let n=0;n<e.THEME_COLOR_LIMIT;n++){var s=""+(17-3*n);t+=`\n .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {\n fill: ${i(e["cScale"+n],10)};\n stroke: ${i(e["cScale"+n],10)};\n\n }\n .section-${n-1} text {\n fill: ${e["cScaleLabel"+n]};\n }\n .node-icon-${n-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+n]};\n }\n .section-edge-${n-1}{\n stroke: ${e["cScale"+n]};\n }\n .edge-depth-${n-1}{\n stroke-width: ${s};\n }\n .section-${n-1} line {\n stroke: ${e["cScaleInv"+n]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return t},"genSections"),G=n(e=>`\n .edge {\n stroke-width: 3;\n }\n ${F(e)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${e.git0};\n }\n .section-root text {\n fill: ${e.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${e.textColor};\n fill: ${e.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${m()}\n`,"getStyles"),U={db:B,renderer:j,parser:_,styles:G};export{U as diagram};