@legionworks/facet 1.9.0

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 (327) hide show
  1. package/LICENSE-APACHE +202 -0
  2. package/LICENSE-MIT +23 -0
  3. package/README.md +158 -0
  4. package/dist/gallery/chunk-4g8rem85.css +656 -0
  5. package/dist/gallery/chunk-c6s9k9ty.js +5970 -0
  6. package/dist/gallery/frame/artifact.css +8424 -0
  7. package/dist/gallery/frame/chunks/abnfDiagram-N423BO3Z-jj74szbm.js +155 -0
  8. package/dist/gallery/frame/chunks/architecture-TIHT7OUA-cvdjn7dt.js +10 -0
  9. package/dist/gallery/frame/chunks/architectureDiagram-T3A2C74G-n4z77eg6.js +8675 -0
  10. package/dist/gallery/frame/chunks/blockDiagram-VBNYF7ZC-7xsqzrd1.js +3529 -0
  11. package/dist/gallery/frame/chunks/c4Diagram-5PPSVZJV-z2zjs7wx.js +2413 -0
  12. package/dist/gallery/frame/chunks/classDiagram-JCYQIIEL-ve8rngqp.js +47 -0
  13. package/dist/gallery/frame/chunks/classDiagram-v2-OCEON4UE-8cfaxb8z.js +47 -0
  14. package/dist/gallery/frame/chunks/cose-bilkent-JH36ORCC-sn92qexx.js +4822 -0
  15. package/dist/gallery/frame/chunks/cynefin-VYW2F7L2-tqjv913d.js +10 -0
  16. package/dist/gallery/frame/chunks/cynefinDiagram-MW4NZA55-c1c0dj12.js +500 -0
  17. package/dist/gallery/frame/chunks/dagre-VZM6K2ZE-7tyg4yt2.js +476 -0
  18. package/dist/gallery/frame/chunks/diagram-7IWD3JNH-y4eng9sc.js +526 -0
  19. package/dist/gallery/frame/chunks/diagram-B4RE2ZJO-rn3p7j5h.js +673 -0
  20. package/dist/gallery/frame/chunks/diagram-LBJQPF4R-w4a2cm9q.js +255 -0
  21. package/dist/gallery/frame/chunks/diagram-Q27KOJAE-aqc2v7wy.js +575 -0
  22. package/dist/gallery/frame/chunks/diagram-UB23O5K3-xncy8nyd.js +355 -0
  23. package/dist/gallery/frame/chunks/ebnfDiagram-BXEA7PRR-acwgxz16.js +175 -0
  24. package/dist/gallery/frame/chunks/erDiagram-JOGREHBK-mzp5nswt.js +1332 -0
  25. package/dist/gallery/frame/chunks/eventmodeling-45OFAUF4-sg07qr0c.js +10 -0
  26. package/dist/gallery/frame/chunks/flowDiagram-UKHOOZJN-2e5ygs44.js +29 -0
  27. package/dist/gallery/frame/chunks/ganttDiagram-PKOTCBZU-p2hhh7hr.js +2620 -0
  28. package/dist/gallery/frame/chunks/gitGraph-TEB2WS4Q-j6kw0naa.js +10 -0
  29. package/dist/gallery/frame/chunks/gitGraphDiagram-DS77QQ5N-4z9z8wjm.js +1347 -0
  30. package/dist/gallery/frame/chunks/info-DKCQHKI2-mpt80jd3.js +10 -0
  31. package/dist/gallery/frame/chunks/infoDiagram-6WML65LV-5rqm3mgg.js +65 -0
  32. package/dist/gallery/frame/chunks/ishikawaDiagram-WSZJBQD7-b51z96jy.js +975 -0
  33. package/dist/gallery/frame/chunks/journeyDiagram-NVQOT4AX-9jbfp0pk.js +1272 -0
  34. package/dist/gallery/frame/chunks/kanban-definition-27J2QSJJ-4x0vx4se.js +1116 -0
  35. package/dist/gallery/frame/chunks/katex-xfgk95tv.js +14034 -0
  36. package/dist/gallery/frame/chunks/markdown-1s5vwkf2.js +9 -0
  37. package/dist/gallery/frame/chunks/markdown-2h6bwsms.js +3239 -0
  38. package/dist/gallery/frame/chunks/markdown-2x113yh8.js +107 -0
  39. package/dist/gallery/frame/chunks/markdown-30b7rwmp.js +1943 -0
  40. package/dist/gallery/frame/chunks/markdown-356bfj4g.js +2031 -0
  41. package/dist/gallery/frame/chunks/markdown-44n9ea69.js +2406 -0
  42. package/dist/gallery/frame/chunks/markdown-56enrf2r.js +39 -0
  43. package/dist/gallery/frame/chunks/markdown-5avymm8t.js +725 -0
  44. package/dist/gallery/frame/chunks/markdown-6r4svars.js +33 -0
  45. package/dist/gallery/frame/chunks/markdown-6zz8efx2.js +24 -0
  46. package/dist/gallery/frame/chunks/markdown-7jp6prnb.js +19 -0
  47. package/dist/gallery/frame/chunks/markdown-809k7q41.js +55 -0
  48. package/dist/gallery/frame/chunks/markdown-82xmzhzd.js +1076 -0
  49. package/dist/gallery/frame/chunks/markdown-92n37gd4.js +7627 -0
  50. package/dist/gallery/frame/chunks/markdown-ag2sssf8.js +36 -0
  51. package/dist/gallery/frame/chunks/markdown-b4s7ntq2.js +19 -0
  52. package/dist/gallery/frame/chunks/markdown-c9k0fvp1.js +100 -0
  53. package/dist/gallery/frame/chunks/markdown-ceefymn8.js +125 -0
  54. package/dist/gallery/frame/chunks/markdown-d1wfbs70.js +243 -0
  55. package/dist/gallery/frame/chunks/markdown-dy5sgjhc.js +11022 -0
  56. package/dist/gallery/frame/chunks/markdown-dz3z5w30.js +30868 -0
  57. package/dist/gallery/frame/chunks/markdown-eg6ngz7y.js +30340 -0
  58. package/dist/gallery/frame/chunks/markdown-ff5wvb43.js +1149 -0
  59. package/dist/gallery/frame/chunks/markdown-ffg06nfz.js +86 -0
  60. package/dist/gallery/frame/chunks/markdown-fvfncadf.js +472 -0
  61. package/dist/gallery/frame/chunks/markdown-gvyszqpv.js +19 -0
  62. package/dist/gallery/frame/chunks/markdown-gx1p0ew0.js +88 -0
  63. package/dist/gallery/frame/chunks/markdown-gxye5frz.js +65 -0
  64. package/dist/gallery/frame/chunks/markdown-h7pzv34e.js +105 -0
  65. package/dist/gallery/frame/chunks/markdown-hab789t9.js +47 -0
  66. package/dist/gallery/frame/chunks/markdown-hjp6sj8t.js +125 -0
  67. package/dist/gallery/frame/chunks/markdown-jka64qgp.js +1993 -0
  68. package/dist/gallery/frame/chunks/markdown-k8xkn8mw.js +56 -0
  69. package/dist/gallery/frame/chunks/markdown-m7frq8x8.js +112 -0
  70. package/dist/gallery/frame/chunks/markdown-p740v4qm.js +36 -0
  71. package/dist/gallery/frame/chunks/markdown-pxfeh231.js +57 -0
  72. package/dist/gallery/frame/chunks/markdown-pzgd8z3s.js +87 -0
  73. package/dist/gallery/frame/chunks/markdown-qx3cngz2.js +1673 -0
  74. package/dist/gallery/frame/chunks/markdown-rawhfvvc.js +85 -0
  75. package/dist/gallery/frame/chunks/markdown-rd8w0ng9.js +49 -0
  76. package/dist/gallery/frame/chunks/markdown-rm2yxfjj.js +2773 -0
  77. package/dist/gallery/frame/chunks/markdown-s1jatrnk.js +993 -0
  78. package/dist/gallery/frame/chunks/markdown-sgfg5vvq.js +59 -0
  79. package/dist/gallery/frame/chunks/markdown-t4ethv9d.js +409 -0
  80. package/dist/gallery/frame/chunks/markdown-tnmabqvz.js +36 -0
  81. package/dist/gallery/frame/chunks/markdown-tvdpppw8.js +5292 -0
  82. package/dist/gallery/frame/chunks/markdown-v0x27twr.js +22 -0
  83. package/dist/gallery/frame/chunks/markdown-v14td68x.js +36 -0
  84. package/dist/gallery/frame/chunks/markdown-w6sgd54z.js +36 -0
  85. package/dist/gallery/frame/chunks/markdown-xw8dsk8b.js +2125 -0
  86. package/dist/gallery/frame/chunks/markdown-y18mve73.js +85 -0
  87. package/dist/gallery/frame/chunks/markdown-yengsms5.js +427 -0
  88. package/dist/gallery/frame/chunks/markdown-z1wc0v0d.js +1826 -0
  89. package/dist/gallery/frame/chunks/markdown-zazx9h4n.js +329 -0
  90. package/dist/gallery/frame/chunks/mermaid-de7p4v0x.js +30 -0
  91. package/dist/gallery/frame/chunks/mindmap-definition-FAOFIHXS-ra44cbem.js +1216 -0
  92. package/dist/gallery/frame/chunks/packet-7NZHBO7P-xppm5913.js +10 -0
  93. package/dist/gallery/frame/chunks/pegDiagram-VL7TDLO6-a2a4wg03.js +163 -0
  94. package/dist/gallery/frame/chunks/pie-RZYD4A2V-hnbxk152.js +10 -0
  95. package/dist/gallery/frame/chunks/pieDiagram-7S7Q4E2Y-f1vxjtmx.js +311 -0
  96. package/dist/gallery/frame/chunks/quadrantDiagram-CIZ2JOQS-ywafa6kh.js +1390 -0
  97. package/dist/gallery/frame/chunks/radar-I7S5WNFK-ewqd27se.js +10 -0
  98. package/dist/gallery/frame/chunks/railroad-3IZDKUUU-5hy4bdx3.js +10 -0
  99. package/dist/gallery/frame/chunks/railroad-abnf-AHOZXSZD-bh5sxz0d.js +10 -0
  100. package/dist/gallery/frame/chunks/railroad-ebnf-EBAXGLYW-6b9c3zeh.js +10 -0
  101. package/dist/gallery/frame/chunks/railroad-peg-LSFZ7HO6-avc8v39s.js +10 -0
  102. package/dist/gallery/frame/chunks/railroadDiagram-AXF67PYL-qc61wax4.js +131 -0
  103. package/dist/gallery/frame/chunks/requirementDiagram-LRYGKXZP-9bs4786c.js +1295 -0
  104. package/dist/gallery/frame/chunks/sankeyDiagram-W5VNT64P-awt1em8b.js +1339 -0
  105. package/dist/gallery/frame/chunks/sequenceDiagram-SI44F4Z6-qaf9mz3t.js +4324 -0
  106. package/dist/gallery/frame/chunks/sizeCapture-X5ZJPWSS-9fq685xd.js +64 -0
  107. package/dist/gallery/frame/chunks/stateDiagram-OKZ733FA-vx7a7hh0.js +456 -0
  108. package/dist/gallery/frame/chunks/stateDiagram-v2-UEYNNEHI-x4m6ws5t.js +46 -0
  109. package/dist/gallery/frame/chunks/swimlanes-SLNWSIFB-e4mxm1gh.js +8287 -0
  110. package/dist/gallery/frame/chunks/swimlanesDiagram-ULZ7WXOC-0h93e2qq.js +42 -0
  111. package/dist/gallery/frame/chunks/timeline-definition-Z64GVDOM-wp0bhbzg.js +1549 -0
  112. package/dist/gallery/frame/chunks/treeView-QDETBFTQ-hcx7n0vt.js +10 -0
  113. package/dist/gallery/frame/chunks/treemap-6X3UGDF4-av02skdw.js +10 -0
  114. package/dist/gallery/frame/chunks/vennDiagram-T6HMQDX7-pmvk1p7n.js +2566 -0
  115. package/dist/gallery/frame/chunks/wardley-OPB4EBWU-njsp6e40.js +10 -0
  116. package/dist/gallery/frame/chunks/wardleyDiagram-T6FBY63Y-eggmnv4z.js +979 -0
  117. package/dist/gallery/frame/chunks/xychartDiagram-ELKLHX3M-q40tnpe5.js +1954 -0
  118. package/dist/gallery/frame/frame.css +183 -0
  119. package/dist/gallery/frame/runtime/chart.js +42744 -0
  120. package/dist/gallery/frame/runtime/html.js +14 -0
  121. package/dist/gallery/frame/runtime/markdown.js +1403 -0
  122. package/dist/gallery/frame/runtime/mermaid.js +32 -0
  123. package/dist/gallery/frame/runtime/svg.js +14 -0
  124. package/dist/gallery/frame/runtime/tsx.js +52 -0
  125. package/dist/gallery/index.html +104 -0
  126. package/docs/reference/cli.md +163 -0
  127. package/docs/reference/export.md +106 -0
  128. package/docs/reference/html.md +215 -0
  129. package/docs/reference/http.md +85 -0
  130. package/docs/reference/mcp.md +78 -0
  131. package/docs/reference/security.md +119 -0
  132. package/docs/reference/storage.md +93 -0
  133. package/docs/reference/tsx.md +101 -0
  134. package/docs/reference/validation.md +212 -0
  135. package/package.json +89 -0
  136. package/scripts/build-gallery.ts +127 -0
  137. package/scripts/launch-netns.sh +67 -0
  138. package/skills/facet/SKILL.md +100 -0
  139. package/src/cli/client.ts +311 -0
  140. package/src/cli/commands/create.ts +49 -0
  141. package/src/cli/commands/doctor.ts +249 -0
  142. package/src/cli/commands/export.ts +179 -0
  143. package/src/cli/commands/instantiate.ts +35 -0
  144. package/src/cli/commands/list.ts +49 -0
  145. package/src/cli/commands/open.ts +75 -0
  146. package/src/cli/commands/pin.ts +39 -0
  147. package/src/cli/commands/promote.ts +49 -0
  148. package/src/cli/commands/publish.ts +122 -0
  149. package/src/cli/commands/read-back.ts +56 -0
  150. package/src/cli/commands/status.ts +114 -0
  151. package/src/cli/commands/watch.ts +146 -0
  152. package/src/cli/main.ts +522 -0
  153. package/src/cli/output.ts +106 -0
  154. package/src/cli/parser.ts +376 -0
  155. package/src/cli/presenter.ts +212 -0
  156. package/src/cli/service-metadata.ts +134 -0
  157. package/src/cli/spawn-service.ts +326 -0
  158. package/src/css.d.ts +4 -0
  159. package/src/gallery-web/app.ts +1581 -0
  160. package/src/gallery-web/export-menu.ts +121 -0
  161. package/src/gallery-web/export.ts +112 -0
  162. package/src/gallery-web/favicon.ts +54 -0
  163. package/src/gallery-web/frame/entries/chart.ts +6 -0
  164. package/src/gallery-web/frame/entries/html.ts +6 -0
  165. package/src/gallery-web/frame/entries/markdown.ts +6 -0
  166. package/src/gallery-web/frame/entries/mermaid.ts +6 -0
  167. package/src/gallery-web/frame/entries/svg.ts +6 -0
  168. package/src/gallery-web/frame/entries/tsx.ts +6 -0
  169. package/src/gallery-web/frame/frame-payload.ts +91 -0
  170. package/src/gallery-web/frame/renderer-validation.ts +13 -0
  171. package/src/gallery-web/frame/renderers/chart.ts +182 -0
  172. package/src/gallery-web/frame/renderers/dompurify-shim.ts +112 -0
  173. package/src/gallery-web/frame/renderers/html.ts +48 -0
  174. package/src/gallery-web/frame/renderers/markdown.ts +81 -0
  175. package/src/gallery-web/frame/renderers/mermaid.ts +120 -0
  176. package/src/gallery-web/frame/renderers/registry.ts +260 -0
  177. package/src/gallery-web/frame/renderers/svg.ts +393 -0
  178. package/src/gallery-web/frame/renderers/tsx.ts +61 -0
  179. package/src/gallery-web/frame/runtime.ts +501 -0
  180. package/src/gallery-web/frame/styles/artifact.css +8424 -0
  181. package/src/gallery-web/frame/styles/frame.css +183 -0
  182. package/src/gallery-web/frame/styles/html-source.css +23 -0
  183. package/src/gallery-web/frame/view-box.ts +33 -0
  184. package/src/gallery-web/frame-html.ts +72 -0
  185. package/src/gallery-web/index.html +104 -0
  186. package/src/gallery-web/session.ts +107 -0
  187. package/src/gallery-web/sse-client.ts +212 -0
  188. package/src/gallery-web/styles/app.css +420 -0
  189. package/src/gallery-web/styles/tokens.css +112 -0
  190. package/src/gallery-web/styles/verdict.css +186 -0
  191. package/src/gallery-web/swap.ts +64 -0
  192. package/src/gallery-web/theme.ts +40 -0
  193. package/src/gallery-web/view-state.ts +93 -0
  194. package/src/harness-adapters/claude-code/README.md +10 -0
  195. package/src/harness-adapters/claude-code/facet.sh +4 -0
  196. package/src/harness-adapters/codex/README.md +10 -0
  197. package/src/harness-adapters/codex/facet.sh +4 -0
  198. package/src/harness-adapters/mcp/README.md +13 -0
  199. package/src/harness-adapters/mcp/cli-bridge.ts +216 -0
  200. package/src/harness-adapters/mcp/main.ts +15 -0
  201. package/src/harness-adapters/mcp/server.ts +164 -0
  202. package/src/harness-adapters/mcp/tool-schemas.ts +53 -0
  203. package/src/harness-adapters/opencode/README.md +10 -0
  204. package/src/harness-adapters/opencode/facet.sh +4 -0
  205. package/src/runtime/compiled-entrypoints.ts +69 -0
  206. package/src/service/dispatcher.ts +717 -0
  207. package/src/service/export.ts +218 -0
  208. package/src/service/http-utils.ts +55 -0
  209. package/src/service/lexical/expectations.ts +210 -0
  210. package/src/service/lifecycle/idle-controller.ts +125 -0
  211. package/src/service/lifecycle/orphan-cleanup.ts +128 -0
  212. package/src/service/lifecycle/process-lock.ts +235 -0
  213. package/src/service/main.ts +136 -0
  214. package/src/service/process.ts +240 -0
  215. package/src/service/router-guards.ts +239 -0
  216. package/src/service/router.ts +627 -0
  217. package/src/service/security/auth.ts +168 -0
  218. package/src/service/security/host-origin.ts +138 -0
  219. package/src/service/security/http-guards.ts +13 -0
  220. package/src/service/security/leases.ts +182 -0
  221. package/src/service/security/token-store.ts +138 -0
  222. package/src/service/server.ts +356 -0
  223. package/src/service/store/database.ts +61 -0
  224. package/src/service/store/evidence-retention.ts +234 -0
  225. package/src/service/store/migrations.ts +167 -0
  226. package/src/service/store/repository-lifecycle.ts +121 -0
  227. package/src/service/store/repository.ts +732 -0
  228. package/src/service/store/schema.ts +218 -0
  229. package/src/service/stored-verdict.ts +97 -0
  230. package/src/service/stream.ts +301 -0
  231. package/src/service/verdict-enrichment.ts +45 -0
  232. package/src/shared/build/frame-bundle-plugins.ts +61 -0
  233. package/src/shared/build-mode.ts +28 -0
  234. package/src/shared/config/evidence-read.ts +98 -0
  235. package/src/shared/config/limits.ts +56 -0
  236. package/src/shared/config/paths.ts +96 -0
  237. package/src/shared/contracts/artifact-types.ts +2 -0
  238. package/src/shared/contracts/artifact.ts +98 -0
  239. package/src/shared/contracts/commands/_shared.ts +59 -0
  240. package/src/shared/contracts/commands/guards.ts +86 -0
  241. package/src/shared/contracts/commands/index.ts +204 -0
  242. package/src/shared/contracts/commands/names.ts +35 -0
  243. package/src/shared/contracts/commands/requests.ts +149 -0
  244. package/src/shared/contracts/commands/results.ts +200 -0
  245. package/src/shared/contracts/envelope.ts +140 -0
  246. package/src/shared/contracts/events.ts +41 -0
  247. package/src/shared/contracts/observed-counts.ts +19 -0
  248. package/src/shared/contracts/renderers.ts +6 -0
  249. package/src/shared/contracts/validation.ts +296 -0
  250. package/src/shared/errors/facet-error.ts +127 -0
  251. package/src/shared/errors/store-error.ts +68 -0
  252. package/src/shared/evidence-image.ts +37 -0
  253. package/src/shared/export.ts +31 -0
  254. package/src/shared/html/policy.ts +108 -0
  255. package/src/shared/html/style-vocabulary.ts +352 -0
  256. package/src/shared/logging/logger.ts +108 -0
  257. package/src/shared/logging/redact.ts +49 -0
  258. package/src/shared/security/frozen-csp.ts +13 -0
  259. package/src/shared/storage-version.ts +2 -0
  260. package/src/shared/tsx/execution.ts +29 -0
  261. package/src/shared/tsx/import-policy.ts +94 -0
  262. package/src/shared/util/dir-permissions.ts +94 -0
  263. package/src/shared/util/mermaid-nodes.ts +230 -0
  264. package/src/shared/util/process.ts +67 -0
  265. package/src/shared/util/time.ts +21 -0
  266. package/src/shared/version.ts +3 -0
  267. package/src/validation/sandbox/limits.ts +41 -0
  268. package/src/validation/sandbox/netns.ts +177 -0
  269. package/src/validation/tier0/chart.ts +177 -0
  270. package/src/validation/tier0/dom-shim.ts +54 -0
  271. package/src/validation/tier0/html.ts +408 -0
  272. package/src/validation/tier0/markdown.ts +285 -0
  273. package/src/validation/tier0/mermaid.ts +98 -0
  274. package/src/validation/tier0/runner.ts +504 -0
  275. package/src/validation/tier0/svg.ts +321 -0
  276. package/src/validation/tier0/tsx/allowlist-resolver.ts +77 -0
  277. package/src/validation/tier0/tsx/ast-policy-capabilities.ts +238 -0
  278. package/src/validation/tier0/tsx/ast-policy-shared.ts +71 -0
  279. package/src/validation/tier0/tsx/ast-policy.ts +181 -0
  280. package/src/validation/tier0/tsx/compiler.ts +156 -0
  281. package/src/validation/tier0/worker-dispatch.ts +211 -0
  282. package/src/validation/tier0/worker-entry.ts +96 -0
  283. package/src/validation/tier0/worker-input.ts +75 -0
  284. package/src/validation/tier1/browser-process.ts +147 -0
  285. package/src/validation/tier1/cdp-pipe.ts +281 -0
  286. package/src/validation/tier1/entries/chart.ts +5 -0
  287. package/src/validation/tier1/entries/html.ts +6 -0
  288. package/src/validation/tier1/entries/markdown.ts +5 -0
  289. package/src/validation/tier1/entries/mermaid.ts +5 -0
  290. package/src/validation/tier1/entries/svg.ts +5 -0
  291. package/src/validation/tier1/entries/tsx.ts +5 -0
  292. package/src/validation/tier1/frame-target.ts +162 -0
  293. package/src/validation/tier1/harness-entry.ts +261 -0
  294. package/src/validation/tier1/harness.ts +215 -0
  295. package/src/validation/tier1/isolated-probe.ts +94 -0
  296. package/src/validation/tier1/launcher.ts +177 -0
  297. package/src/validation/tier1/limits.ts +80 -0
  298. package/src/validation/tier1/nonce.ts +17 -0
  299. package/src/validation/tier1/protocol-probe.ts +519 -0
  300. package/src/validation/tier1/runner.ts +1122 -0
  301. package/src/validation/tier1/verdict.ts +246 -0
  302. package/src/validation/tier1/webp.ts +69 -0
  303. package/templates/README.md +88 -0
  304. package/templates/bar-compare.vl.json +63 -0
  305. package/templates/capacity-report.tsx +102 -0
  306. package/templates/decision-record.md +24 -0
  307. package/templates/deployment-state.mmd +40 -0
  308. package/templates/exemplar.md +91 -0
  309. package/templates/facet-story.tsx +799 -0
  310. package/templates/fleet-dashboard.html +141 -0
  311. package/templates/html-release-ledger.html +91 -0
  312. package/templates/html-status-report.html +114 -0
  313. package/templates/incident-console.tsx +147 -0
  314. package/templates/legion-boundaries.mmd +23 -0
  315. package/templates/legion-flow.mmd +15 -0
  316. package/templates/legion-sequence.mmd +14 -0
  317. package/templates/legion-state.mmd +7 -0
  318. package/templates/metric-card.svg +29 -0
  319. package/templates/observability-map.svg +101 -0
  320. package/templates/pipeline-audit.md +108 -0
  321. package/templates/release-metrics.vl.json +98 -0
  322. package/templates/service-topology.mmd +47 -0
  323. package/templates/status-report.md +32 -0
  324. package/templates/system-map.svg +53 -0
  325. package/templates/timeseries.vl.json +71 -0
  326. package/templates/tsx-interactive-counter.tsx +19 -0
  327. package/templates/tsx-status-report.tsx +31 -0
@@ -0,0 +1,2620 @@
1
+ import {
2
+ utils_default
3
+ } from "./markdown-ff5wvb43.js";
4
+ import {
5
+ require_dist
6
+ } from "./markdown-pzgd8z3s.js";
7
+ import {
8
+ clear,
9
+ common_default,
10
+ configureSvgSize,
11
+ getAccDescription,
12
+ getAccTitle,
13
+ getConfig2,
14
+ getDiagramTitle,
15
+ setAccDescription,
16
+ setAccTitle,
17
+ setDiagramTitle
18
+ } from "./markdown-92n37gd4.js";
19
+ import {
20
+ axisBottom,
21
+ axisTop,
22
+ log,
23
+ require_dayjs_min,
24
+ select_default
25
+ } from "./markdown-xw8dsk8b.js";
26
+ import {
27
+ __name
28
+ } from "./markdown-1s5vwkf2.js";
29
+ import {
30
+ hcl_default,
31
+ linear,
32
+ max,
33
+ millisecond,
34
+ min,
35
+ second,
36
+ time,
37
+ timeDay,
38
+ timeFormat,
39
+ timeFriday,
40
+ timeHour,
41
+ timeMinute,
42
+ timeMonday,
43
+ timeMonth,
44
+ timeSaturday,
45
+ timeSunday,
46
+ timeThursday,
47
+ timeTuesday,
48
+ timeWednesday
49
+ } from "./markdown-dy5sgjhc.js";
50
+ import {
51
+ __commonJS,
52
+ __toESM
53
+ } from "./markdown-809k7q41.js";
54
+
55
+ // node_modules/dayjs/plugin/isoWeek.js
56
+ var require_isoWeek = __commonJS(function(exports, module) {
57
+ (function(e, t) {
58
+ typeof exports == "object" && typeof module != "undefined" ? module.exports = t() : typeof define == "function" && define.amd ? define(t) : (e = typeof globalThis != "undefined" ? globalThis : e || self).dayjs_plugin_isoWeek = t();
59
+ })(exports, function() {
60
+ var e = "day";
61
+ return function(t, i, s) {
62
+ var a = function(t2) {
63
+ return t2.add(4 - t2.isoWeekday(), e);
64
+ }, d = i.prototype;
65
+ d.isoWeekYear = function() {
66
+ return a(this).year();
67
+ }, d.isoWeek = function(t2) {
68
+ if (!this.$utils().u(t2))
69
+ return this.add(7 * (t2 - this.isoWeek()), e);
70
+ var i2, d2, n2, o, r = a(this), u = (i2 = this.isoWeekYear(), d2 = this.$u, n2 = (d2 ? s.utc : s)().year(i2).startOf("year"), o = 4 - n2.isoWeekday(), n2.isoWeekday() > 4 && (o += 7), n2.add(o, e));
71
+ return r.diff(u, "week") + 1;
72
+ }, d.isoWeekday = function(e2) {
73
+ return this.$utils().u(e2) ? this.day() || 7 : this.day(this.day() % 7 ? e2 : e2 - 7);
74
+ };
75
+ var n = d.startOf;
76
+ d.startOf = function(e2, t2) {
77
+ var i2 = this.$utils(), s2 = !!i2.u(t2) || t2;
78
+ return i2.p(e2) === "isoweek" ? s2 ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : n.bind(this)(e2, t2);
79
+ };
80
+ };
81
+ });
82
+ });
83
+
84
+ // node_modules/dayjs/plugin/customParseFormat.js
85
+ var require_customParseFormat = __commonJS(function(exports, module) {
86
+ (function(e, t) {
87
+ typeof exports == "object" && typeof module != "undefined" ? module.exports = t() : typeof define == "function" && define.amd ? define(t) : (e = typeof globalThis != "undefined" ? globalThis : e || self).dayjs_plugin_customParseFormat = t();
88
+ })(exports, function() {
89
+ var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e2) {
90
+ return (e2 = +e2) + (e2 > 68 ? 1900 : 2000);
91
+ };
92
+ var f = function(e2) {
93
+ return function(t2) {
94
+ this[e2] = +t2;
95
+ };
96
+ }, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
97
+ (this.zone || (this.zone = {})).offset = function(e3) {
98
+ if (!e3)
99
+ return 0;
100
+ if (e3 === "Z")
101
+ return 0;
102
+ var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
103
+ return n2 === 0 ? 0 : t2[0] === "+" ? -n2 : n2;
104
+ }(e2);
105
+ }], u = function(e2) {
106
+ var t2 = s[e2];
107
+ return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
108
+ }, d = function(e2, t2) {
109
+ var n2, r2 = s.meridiem;
110
+ if (r2) {
111
+ for (var i2 = 1;i2 <= 24; i2 += 1)
112
+ if (e2.indexOf(r2(i2, 0, t2)) > -1) {
113
+ n2 = i2 > 12;
114
+ break;
115
+ }
116
+ } else
117
+ n2 = e2 === (t2 ? "pm" : "PM");
118
+ return n2;
119
+ }, c = { A: [o, function(e2) {
120
+ this.afternoon = d(e2, false);
121
+ }], a: [o, function(e2) {
122
+ this.afternoon = d(e2, true);
123
+ }], Q: [n, function(e2) {
124
+ this.month = 3 * (e2 - 1) + 1;
125
+ }], S: [n, function(e2) {
126
+ this.milliseconds = 100 * +e2;
127
+ }], SS: [r, function(e2) {
128
+ this.milliseconds = 10 * +e2;
129
+ }], SSS: [/\d{3}/, function(e2) {
130
+ this.milliseconds = +e2;
131
+ }], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [r, f("day")], Do: [o, function(e2) {
132
+ var t2 = s.ordinal, n2 = e2.match(/\d+/);
133
+ if (this.day = n2[0], t2)
134
+ for (var r2 = 1;r2 <= 31; r2 += 1)
135
+ t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
136
+ }], w: [i, f("week")], ww: [r, f("week")], M: [i, f("month")], MM: [r, f("month")], MMM: [o, function(e2) {
137
+ var t2 = u("months"), n2 = (u("monthsShort") || t2.map(function(e3) {
138
+ return e3.slice(0, 3);
139
+ })).indexOf(e2) + 1;
140
+ if (n2 < 1)
141
+ throw new Error;
142
+ this.month = n2 % 12 || n2;
143
+ }], MMMM: [o, function(e2) {
144
+ var t2 = u("months").indexOf(e2) + 1;
145
+ if (t2 < 1)
146
+ throw new Error;
147
+ this.month = t2 % 12 || t2;
148
+ }], Y: [/[+-]?\d+/, f("year")], YY: [r, function(e2) {
149
+ this.year = a(e2);
150
+ }], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h };
151
+ function l(n2) {
152
+ var r2, i2;
153
+ r2 = n2, i2 = s && s.formats;
154
+ for (var o2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t2, n3, r3) {
155
+ var o3 = r3 && r3.toUpperCase();
156
+ return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e2, t3, n4) {
157
+ return t3 || n4.slice(1);
158
+ });
159
+ })).match(t), a2 = o2.length, f2 = 0;f2 < a2; f2 += 1) {
160
+ var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l2 = u2 && u2[1];
161
+ o2[f2] = l2 ? { regex: d2, parser: l2 } : h2.replace(/^\[|\]$/g, "");
162
+ }
163
+ return function(e2) {
164
+ for (var t2 = {}, n3 = 0, r3 = 0;n3 < a2; n3 += 1) {
165
+ var i3 = o2[n3];
166
+ if (typeof i3 == "string")
167
+ r3 += i3.length;
168
+ else {
169
+ var { regex: s2, parser: f3 } = i3, h3 = e2.slice(r3), u3 = s2.exec(h3)[0];
170
+ f3.call(t2, u3), e2 = e2.replace(u3, "");
171
+ }
172
+ }
173
+ return function(e3) {
174
+ var t3 = e3.afternoon;
175
+ if (t3 !== undefined) {
176
+ var n4 = e3.hours;
177
+ t3 ? n4 < 12 && (e3.hours += 12) : n4 === 12 && (e3.hours = 0), delete e3.afternoon;
178
+ }
179
+ }(t2), t2;
180
+ };
181
+ }
182
+ return function(e2, t2, n2) {
183
+ n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (a = e2.parseTwoDigitYear);
184
+ var r2 = t2.prototype, i2 = r2.parse;
185
+ r2.parse = function(e3) {
186
+ var { date: t3, utc: r3, args: o2 } = e3;
187
+ this.$u = r3;
188
+ var a2 = o2[1];
189
+ if (typeof a2 == "string") {
190
+ var f2 = o2[2] === true, h2 = o2[3] === true, u2 = f2 || h2, d2 = o2[2];
191
+ h2 && (d2 = o2[2]), s = this.$locale(), !f2 && d2 && (s = n2.Ls[d2]), this.$d = function(e4, t4, n3, r4) {
192
+ try {
193
+ if (["x", "X"].indexOf(t4) > -1)
194
+ return new Date((t4 === "X" ? 1000 : 1) * e4);
195
+ var i3 = l(t4)(e4), o3 = i3.year, s2 = i3.month, a3 = i3.day, f3 = i3.hours, h3 = i3.minutes, u3 = i3.seconds, d3 = i3.milliseconds, c3 = i3.zone, m2 = i3.week, M2 = new Date, Y = a3 || (o3 || s2 ? 1 : M2.getDate()), p = o3 || M2.getFullYear(), v = 0;
196
+ o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth());
197
+ var D, w = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0;
198
+ return c3 ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c3.offset * 1000)) : n3 ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m2 && (D = r4(D).week(m2).toDate()), D);
199
+ } catch (e5) {
200
+ return new Date("");
201
+ }
202
+ }(t3, a2, r3, n2), this.init(), d2 && d2 !== true && (this.$L = this.locale(d2).$L), u2 && t3 != this.format(a2) && (this.$d = new Date("")), s = {};
203
+ } else if (a2 instanceof Array)
204
+ for (var c2 = a2.length, m = 1;m <= c2; m += 1) {
205
+ o2[1] = a2[m - 1];
206
+ var M = n2.apply(this, o2);
207
+ if (M.isValid()) {
208
+ this.$d = M.$d, this.$L = M.$L, this.init();
209
+ break;
210
+ }
211
+ m === c2 && (this.$d = new Date(""));
212
+ }
213
+ else
214
+ i2.call(this, e3);
215
+ };
216
+ };
217
+ });
218
+ });
219
+
220
+ // node_modules/dayjs/plugin/advancedFormat.js
221
+ var require_advancedFormat = __commonJS(function(exports, module) {
222
+ (function(e, t) {
223
+ typeof exports == "object" && typeof module != "undefined" ? module.exports = t() : typeof define == "function" && define.amd ? define(t) : (e = typeof globalThis != "undefined" ? globalThis : e || self).dayjs_plugin_advancedFormat = t();
224
+ })(exports, function() {
225
+ return function(e, t) {
226
+ var r = t.prototype, n = r.format;
227
+ r.format = function(e2) {
228
+ var t2 = this, r2 = this.$locale();
229
+ if (!this.isValid())
230
+ return n.bind(this)(e2);
231
+ var s = this.$utils(), a = (e2 || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(e3) {
232
+ switch (e3) {
233
+ case "Q":
234
+ return Math.ceil((t2.$M + 1) / 3);
235
+ case "Do":
236
+ return r2.ordinal(t2.$D);
237
+ case "gggg":
238
+ return t2.weekYear();
239
+ case "GGGG":
240
+ return t2.isoWeekYear();
241
+ case "wo":
242
+ return r2.ordinal(t2.week(), "W");
243
+ case "w":
244
+ case "ww":
245
+ return s.s(t2.week(), e3 === "w" ? 1 : 2, "0");
246
+ case "W":
247
+ case "WW":
248
+ return s.s(t2.isoWeek(), e3 === "W" ? 1 : 2, "0");
249
+ case "k":
250
+ case "kk":
251
+ return s.s(String(t2.$H === 0 ? 24 : t2.$H), e3 === "k" ? 1 : 2, "0");
252
+ case "X":
253
+ return Math.floor(t2.$d.getTime() / 1000);
254
+ case "x":
255
+ return t2.$d.getTime();
256
+ case "z":
257
+ return "[" + t2.offsetName() + "]";
258
+ case "zzz":
259
+ return "[" + t2.offsetName("long") + "]";
260
+ default:
261
+ return e3;
262
+ }
263
+ });
264
+ return n.bind(this)(a);
265
+ };
266
+ };
267
+ });
268
+ });
269
+
270
+ // node_modules/dayjs/plugin/duration.js
271
+ var require_duration = __commonJS(function(exports, module) {
272
+ (function(t, s) {
273
+ typeof exports == "object" && typeof module != "undefined" ? module.exports = s() : typeof define == "function" && define.amd ? define(s) : (t = typeof globalThis != "undefined" ? globalThis : t || self).dayjs_plugin_duration = s();
274
+ })(exports, function() {
275
+ var t, s, n = 1000, i = 60000, e = 3600000, r = 86400000, o = 31536000000, u = 2628000000, d = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, a = /\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g, h = { years: o, months: u, days: r, hours: e, minutes: i, seconds: n, milliseconds: 1, weeks: 604800000 }, c = function(t2) {
276
+ return t2 instanceof g;
277
+ }, f = function(t2, s2, n2) {
278
+ return new g(t2, n2, s2.$l);
279
+ }, m = function(t2) {
280
+ return s.p(t2) + "s";
281
+ }, l = function(t2) {
282
+ return t2 < 0;
283
+ }, $ = function(t2) {
284
+ return l(t2) ? Math.ceil(t2) : Math.floor(t2);
285
+ }, y = function(t2) {
286
+ return Math.abs(t2);
287
+ }, v = function(t2, s2) {
288
+ return t2 ? l(t2) ? { negative: true, format: "" + y(t2) + s2 } : { negative: false, format: "" + t2 + s2 } : { negative: false, format: "" };
289
+ }, g = function() {
290
+ function l2(t2, s2, n2) {
291
+ var i2 = this;
292
+ if (this.$d = {}, this.$l = n2, t2 === undefined && (this.$ms = 0, this.parseFromMilliseconds()), s2)
293
+ return f(t2 * h[m(s2)], this);
294
+ if (typeof t2 == "number")
295
+ return this.$ms = t2, this.parseFromMilliseconds(), this;
296
+ if (typeof t2 == "object")
297
+ return Object.keys(t2).forEach(function(s3) {
298
+ i2.$d[m(s3)] = t2[s3];
299
+ }), this.calMilliseconds(), this;
300
+ if (typeof t2 == "string") {
301
+ var e2 = t2.match(d);
302
+ if (e2) {
303
+ var r2 = e2.slice(2).map(function(t3) {
304
+ return t3 != null ? Number(t3) : 0;
305
+ });
306
+ return this.$d.years = r2[0], this.$d.months = r2[1], this.$d.weeks = r2[2], this.$d.days = r2[3], this.$d.hours = r2[4], this.$d.minutes = r2[5], this.$d.seconds = r2[6], this.calMilliseconds(), this;
307
+ }
308
+ }
309
+ return this;
310
+ }
311
+ var y2 = l2.prototype;
312
+ return y2.calMilliseconds = function() {
313
+ var t2 = this;
314
+ this.$ms = Object.keys(this.$d).reduce(function(s2, n2) {
315
+ return s2 + (t2.$d[n2] || 0) * h[n2];
316
+ }, 0);
317
+ }, y2.parseFromMilliseconds = function() {
318
+ var t2 = this.$ms;
319
+ this.$d.years = $(t2 / o), t2 %= o, this.$d.months = $(t2 / u), t2 %= u, this.$d.days = $(t2 / r), t2 %= r, this.$d.hours = $(t2 / e), t2 %= e, this.$d.minutes = $(t2 / i), t2 %= i, this.$d.seconds = $(t2 / n), t2 %= n, this.$d.milliseconds = t2;
320
+ }, y2.toISOString = function() {
321
+ var t2 = v(this.$d.years, "Y"), s2 = v(this.$d.months, "M"), n2 = +this.$d.days || 0;
322
+ this.$d.weeks && (n2 += 7 * this.$d.weeks);
323
+ var i2 = v(n2, "D"), e2 = v(this.$d.hours, "H"), r2 = v(this.$d.minutes, "M"), o2 = this.$d.seconds || 0;
324
+ this.$d.milliseconds && (o2 += this.$d.milliseconds / 1000, o2 = Math.round(1000 * o2) / 1000);
325
+ var u2 = v(o2, "S"), d2 = t2.negative || s2.negative || i2.negative || e2.negative || r2.negative || u2.negative, a2 = e2.format || r2.format || u2.format ? "T" : "", h2 = (d2 ? "-" : "") + "P" + t2.format + s2.format + i2.format + a2 + e2.format + r2.format + u2.format;
326
+ return h2 === "P" || h2 === "-P" ? "P0D" : h2;
327
+ }, y2.toJSON = function() {
328
+ return this.toISOString();
329
+ }, y2.format = function(t2) {
330
+ var n2 = t2 || "YYYY-MM-DDTHH:mm:ss", i2 = { Y: this.$d.years, YY: s.s(this.$d.years, 2, "0"), YYYY: s.s(this.$d.years, 4, "0"), M: this.$d.months, MM: s.s(this.$d.months, 2, "0"), D: this.$d.days, DD: s.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: s.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: s.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: s.s(this.$d.seconds, 2, "0"), SSS: s.s(this.$d.milliseconds, 3, "0") };
331
+ return n2.replace(a, function(t3, s2) {
332
+ return s2 || String(i2[t3]);
333
+ });
334
+ }, y2.as = function(t2) {
335
+ return this.$ms / h[m(t2)];
336
+ }, y2.get = function(t2) {
337
+ var s2 = this.$ms, n2 = m(t2);
338
+ return n2 === "milliseconds" ? s2 %= 1000 : s2 = n2 === "weeks" ? $(s2 / h[n2]) : this.$d[n2], s2 || 0;
339
+ }, y2.add = function(t2, s2, n2) {
340
+ var i2;
341
+ return i2 = s2 ? t2 * h[m(s2)] : c(t2) ? t2.$ms : f(t2, this).$ms, f(this.$ms + i2 * (n2 ? -1 : 1), this);
342
+ }, y2.subtract = function(t2, s2) {
343
+ return this.add(t2, s2, true);
344
+ }, y2.locale = function(t2) {
345
+ var s2 = this.clone();
346
+ return s2.$l = t2, s2;
347
+ }, y2.clone = function() {
348
+ return f(this.$ms, this);
349
+ }, y2.humanize = function(s2) {
350
+ return t().add(this.$ms, "ms").locale(this.$l).fromNow(!s2);
351
+ }, y2.valueOf = function() {
352
+ return this.asMilliseconds();
353
+ }, y2.milliseconds = function() {
354
+ return this.get("milliseconds");
355
+ }, y2.asMilliseconds = function() {
356
+ return this.as("milliseconds");
357
+ }, y2.seconds = function() {
358
+ return this.get("seconds");
359
+ }, y2.asSeconds = function() {
360
+ return this.as("seconds");
361
+ }, y2.minutes = function() {
362
+ return this.get("minutes");
363
+ }, y2.asMinutes = function() {
364
+ return this.as("minutes");
365
+ }, y2.hours = function() {
366
+ return this.get("hours");
367
+ }, y2.asHours = function() {
368
+ return this.as("hours");
369
+ }, y2.days = function() {
370
+ return this.get("days");
371
+ }, y2.asDays = function() {
372
+ return this.as("days");
373
+ }, y2.weeks = function() {
374
+ return this.get("weeks");
375
+ }, y2.asWeeks = function() {
376
+ return this.as("weeks");
377
+ }, y2.months = function() {
378
+ return this.get("months");
379
+ }, y2.asMonths = function() {
380
+ return this.as("months");
381
+ }, y2.years = function() {
382
+ return this.get("years");
383
+ }, y2.asYears = function() {
384
+ return this.as("years");
385
+ }, l2;
386
+ }(), p = function(t2, s2, n2) {
387
+ return t2.add(s2.years() * n2, "y").add(s2.months() * n2, "M").add(s2.days() * n2, "d").add(s2.hours() * n2, "h").add(s2.minutes() * n2, "m").add(s2.seconds() * n2, "s").add(s2.milliseconds() * n2, "ms");
388
+ };
389
+ return function(n2, i2, e2) {
390
+ t = e2, s = e2().$utils(), e2.duration = function(t2, s2) {
391
+ var n3 = e2.locale();
392
+ return f(t2, { $l: n3 }, s2);
393
+ }, e2.isDuration = c;
394
+ var r2 = i2.prototype.add, o2 = i2.prototype.subtract;
395
+ i2.prototype.add = function(t2, s2) {
396
+ return c(t2) ? p(this, t2, 1) : r2.bind(this)(t2, s2);
397
+ }, i2.prototype.subtract = function(t2, s2) {
398
+ return c(t2) ? p(this, t2, -1) : o2.bind(this)(t2, s2);
399
+ };
400
+ };
401
+ });
402
+ });
403
+
404
+ // node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-PKOTCBZU.mjs
405
+ var import_sanitize_url = __toESM(require_dist(), 1);
406
+ var import_dayjs = __toESM(require_dayjs_min(), 1);
407
+ var import_isoWeek = __toESM(require_isoWeek(), 1);
408
+ var import_customParseFormat = __toESM(require_customParseFormat(), 1);
409
+ var import_advancedFormat = __toESM(require_advancedFormat(), 1);
410
+ var import_dayjs2 = __toESM(require_dayjs_min(), 1);
411
+ var import_duration = __toESM(require_duration(), 1);
412
+ var parser = function() {
413
+ var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
414
+ for (o2 = o2 || {}, l = k.length;l--; o2[k[l]] = v)
415
+ ;
416
+ return o2;
417
+ }, "o"), $V0 = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 36, 38, 40], $V1 = [1, 26], $V2 = [1, 27], $V3 = [1, 28], $V4 = [1, 29], $V5 = [1, 30], $V6 = [1, 31], $V7 = [1, 32], $V8 = [1, 33], $V9 = [1, 34], $Va = [1, 9], $Vb = [1, 10], $Vc = [1, 11], $Vd = [1, 12], $Ve = [1, 13], $Vf = [1, 14], $Vg = [1, 15], $Vh = [1, 16], $Vi = [1, 19], $Vj = [1, 20], $Vk = [1, 21], $Vl = [1, 22], $Vm = [1, 23], $Vn = [1, 25], $Vo = [1, 35];
418
+ var parser2 = {
419
+ trace: /* @__PURE__ */ __name(function trace() {}, "trace"),
420
+ yy: {},
421
+ symbols_: { error: 2, start: 3, gantt: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NL: 10, weekday: 11, weekday_monday: 12, weekday_tuesday: 13, weekday_wednesday: 14, weekday_thursday: 15, weekday_friday: 16, weekday_saturday: 17, weekday_sunday: 18, weekend: 19, weekend_friday: 20, weekend_saturday: 21, dateFormat: 22, inclusiveEndDates: 23, topAxis: 24, axisFormat: 25, tickInterval: 26, excludes: 27, includes: 28, todayMarker: 29, title: 30, acc_title: 31, acc_title_value: 32, acc_descr: 33, acc_descr_value: 34, acc_descr_multiline_value: 35, section: 36, clickStatement: 37, taskTxt: 38, taskData: 39, click: 40, callbackname: 41, callbackargs: 42, href: 43, clickStatementDebug: 44, $accept: 0, $end: 1 },
422
+ terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 12: "weekday_monday", 13: "weekday_tuesday", 14: "weekday_wednesday", 15: "weekday_thursday", 16: "weekday_friday", 17: "weekday_saturday", 18: "weekday_sunday", 20: "weekend_friday", 21: "weekend_saturday", 22: "dateFormat", 23: "inclusiveEndDates", 24: "topAxis", 25: "axisFormat", 26: "tickInterval", 27: "excludes", 28: "includes", 29: "todayMarker", 30: "title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "section", 38: "taskTxt", 39: "taskData", 40: "click", 41: "callbackname", 42: "callbackargs", 43: "href" },
423
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [19, 1], [19, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [37, 2], [37, 3], [37, 3], [37, 4], [37, 3], [37, 4], [37, 2], [44, 2], [44, 3], [44, 3], [44, 4], [44, 3], [44, 4], [44, 2]],
424
+ performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
425
+ var $0 = $$.length - 1;
426
+ switch (yystate) {
427
+ case 1:
428
+ return $$[$0 - 1];
429
+ break;
430
+ case 2:
431
+ this.$ = [];
432
+ break;
433
+ case 3:
434
+ $$[$0 - 1].push($$[$0]);
435
+ this.$ = $$[$0 - 1];
436
+ break;
437
+ case 4:
438
+ case 5:
439
+ this.$ = $$[$0];
440
+ break;
441
+ case 6:
442
+ case 7:
443
+ this.$ = [];
444
+ break;
445
+ case 8:
446
+ yy.setWeekday("monday");
447
+ break;
448
+ case 9:
449
+ yy.setWeekday("tuesday");
450
+ break;
451
+ case 10:
452
+ yy.setWeekday("wednesday");
453
+ break;
454
+ case 11:
455
+ yy.setWeekday("thursday");
456
+ break;
457
+ case 12:
458
+ yy.setWeekday("friday");
459
+ break;
460
+ case 13:
461
+ yy.setWeekday("saturday");
462
+ break;
463
+ case 14:
464
+ yy.setWeekday("sunday");
465
+ break;
466
+ case 15:
467
+ yy.setWeekend("friday");
468
+ break;
469
+ case 16:
470
+ yy.setWeekend("saturday");
471
+ break;
472
+ case 17:
473
+ yy.setDateFormat($$[$0].substr(11));
474
+ this.$ = $$[$0].substr(11);
475
+ break;
476
+ case 18:
477
+ yy.enableInclusiveEndDates();
478
+ this.$ = $$[$0].substr(18);
479
+ break;
480
+ case 19:
481
+ yy.TopAxis();
482
+ this.$ = $$[$0].substr(8);
483
+ break;
484
+ case 20:
485
+ yy.setAxisFormat($$[$0].substr(11));
486
+ this.$ = $$[$0].substr(11);
487
+ break;
488
+ case 21:
489
+ yy.setTickInterval($$[$0].substr(13));
490
+ this.$ = $$[$0].substr(13);
491
+ break;
492
+ case 22:
493
+ yy.setExcludes($$[$0].substr(9));
494
+ this.$ = $$[$0].substr(9);
495
+ break;
496
+ case 23:
497
+ yy.setIncludes($$[$0].substr(9));
498
+ this.$ = $$[$0].substr(9);
499
+ break;
500
+ case 24:
501
+ yy.setTodayMarker($$[$0].substr(12));
502
+ this.$ = $$[$0].substr(12);
503
+ break;
504
+ case 27:
505
+ yy.setDiagramTitle($$[$0].substr(6));
506
+ this.$ = $$[$0].substr(6);
507
+ break;
508
+ case 28:
509
+ this.$ = $$[$0].trim();
510
+ yy.setAccTitle(this.$);
511
+ break;
512
+ case 29:
513
+ case 30:
514
+ this.$ = $$[$0].trim();
515
+ yy.setAccDescription(this.$);
516
+ break;
517
+ case 31:
518
+ yy.addSection($$[$0].substr(8));
519
+ this.$ = $$[$0].substr(8);
520
+ break;
521
+ case 33:
522
+ yy.addTask($$[$0 - 1], $$[$0]);
523
+ this.$ = "task";
524
+ break;
525
+ case 34:
526
+ this.$ = $$[$0 - 1];
527
+ yy.setClickEvent($$[$0 - 1], $$[$0], null);
528
+ break;
529
+ case 35:
530
+ this.$ = $$[$0 - 2];
531
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
532
+ break;
533
+ case 36:
534
+ this.$ = $$[$0 - 2];
535
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], null);
536
+ yy.setLink($$[$0 - 2], $$[$0]);
537
+ break;
538
+ case 37:
539
+ this.$ = $$[$0 - 3];
540
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);
541
+ yy.setLink($$[$0 - 3], $$[$0]);
542
+ break;
543
+ case 38:
544
+ this.$ = $$[$0 - 2];
545
+ yy.setClickEvent($$[$0 - 2], $$[$0], null);
546
+ yy.setLink($$[$0 - 2], $$[$0 - 1]);
547
+ break;
548
+ case 39:
549
+ this.$ = $$[$0 - 3];
550
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 1], $$[$0]);
551
+ yy.setLink($$[$0 - 3], $$[$0 - 2]);
552
+ break;
553
+ case 40:
554
+ this.$ = $$[$0 - 1];
555
+ yy.setLink($$[$0 - 1], $$[$0]);
556
+ break;
557
+ case 41:
558
+ case 47:
559
+ this.$ = $$[$0 - 1] + " " + $$[$0];
560
+ break;
561
+ case 42:
562
+ case 43:
563
+ case 45:
564
+ this.$ = $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0];
565
+ break;
566
+ case 44:
567
+ case 46:
568
+ this.$ = $$[$0 - 3] + " " + $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0];
569
+ break;
570
+ }
571
+ }, "anonymous"),
572
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: 18, 20: $V8, 21: $V9, 22: $Va, 23: $Vb, 24: $Vc, 25: $Vd, 26: $Ve, 27: $Vf, 28: $Vg, 29: $Vh, 30: $Vi, 31: $Vj, 33: $Vk, 35: $Vl, 36: $Vm, 37: 24, 38: $Vn, 40: $Vo }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 36, 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: 18, 20: $V8, 21: $V9, 22: $Va, 23: $Vb, 24: $Vc, 25: $Vd, 26: $Ve, 27: $Vf, 28: $Vg, 29: $Vh, 30: $Vi, 31: $Vj, 33: $Vk, 35: $Vl, 36: $Vm, 37: 24, 38: $Vn, 40: $Vo }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 17]), o($V0, [2, 18]), o($V0, [2, 19]), o($V0, [2, 20]), o($V0, [2, 21]), o($V0, [2, 22]), o($V0, [2, 23]), o($V0, [2, 24]), o($V0, [2, 25]), o($V0, [2, 26]), o($V0, [2, 27]), { 32: [1, 37] }, { 34: [1, 38] }, o($V0, [2, 30]), o($V0, [2, 31]), o($V0, [2, 32]), { 39: [1, 39] }, o($V0, [2, 8]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), o($V0, [2, 15]), o($V0, [2, 16]), { 41: [1, 40], 43: [1, 41] }, o($V0, [2, 4]), o($V0, [2, 28]), o($V0, [2, 29]), o($V0, [2, 33]), o($V0, [2, 34], { 42: [1, 42], 43: [1, 43] }), o($V0, [2, 40], { 41: [1, 44] }), o($V0, [2, 35], { 43: [1, 45] }), o($V0, [2, 36]), o($V0, [2, 38], { 42: [1, 46] }), o($V0, [2, 37]), o($V0, [2, 39])],
573
+ defaultActions: {},
574
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
575
+ if (hash.recoverable) {
576
+ this.trace(str);
577
+ } else {
578
+ var error = new Error(str);
579
+ error.hash = hash;
580
+ throw error;
581
+ }
582
+ }, "parseError"),
583
+ parse: /* @__PURE__ */ __name(function parse(input) {
584
+ var self2 = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
585
+ var args = lstack.slice.call(arguments, 1);
586
+ var lexer2 = Object.create(this.lexer);
587
+ var sharedState = { yy: {} };
588
+ for (var k in this.yy) {
589
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
590
+ sharedState.yy[k] = this.yy[k];
591
+ }
592
+ }
593
+ lexer2.setInput(input, sharedState.yy);
594
+ sharedState.yy.lexer = lexer2;
595
+ sharedState.yy.parser = this;
596
+ if (typeof lexer2.yylloc == "undefined") {
597
+ lexer2.yylloc = {};
598
+ }
599
+ var yyloc = lexer2.yylloc;
600
+ lstack.push(yyloc);
601
+ var ranges = lexer2.options && lexer2.options.ranges;
602
+ if (typeof sharedState.yy.parseError === "function") {
603
+ this.parseError = sharedState.yy.parseError;
604
+ } else {
605
+ this.parseError = Object.getPrototypeOf(this).parseError;
606
+ }
607
+ function popStack(n) {
608
+ stack.length = stack.length - 2 * n;
609
+ vstack.length = vstack.length - n;
610
+ lstack.length = lstack.length - n;
611
+ }
612
+ __name(popStack, "popStack");
613
+ function lex() {
614
+ var token;
615
+ token = tstack.pop() || lexer2.lex() || EOF;
616
+ if (typeof token !== "number") {
617
+ if (token instanceof Array) {
618
+ tstack = token;
619
+ token = tstack.pop();
620
+ }
621
+ token = self2.symbols_[token] || token;
622
+ }
623
+ return token;
624
+ }
625
+ __name(lex, "lex");
626
+ var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
627
+ while (true) {
628
+ state = stack[stack.length - 1];
629
+ if (this.defaultActions[state]) {
630
+ action = this.defaultActions[state];
631
+ } else {
632
+ if (symbol === null || typeof symbol == "undefined") {
633
+ symbol = lex();
634
+ }
635
+ action = table[state] && table[state][symbol];
636
+ }
637
+ if (typeof action === "undefined" || !action.length || !action[0]) {
638
+ var errStr = "";
639
+ expected = [];
640
+ for (p in table[state]) {
641
+ if (this.terminals_[p] && p > TERROR) {
642
+ expected.push("'" + this.terminals_[p] + "'");
643
+ }
644
+ }
645
+ if (lexer2.showPosition) {
646
+ errStr = "Parse error on line " + (yylineno + 1) + `:
647
+ ` + lexer2.showPosition() + `
648
+ Expecting ` + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
649
+ } else {
650
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
651
+ }
652
+ this.parseError(errStr, {
653
+ text: lexer2.match,
654
+ token: this.terminals_[symbol] || symbol,
655
+ line: lexer2.yylineno,
656
+ loc: yyloc,
657
+ expected
658
+ });
659
+ }
660
+ if (action[0] instanceof Array && action.length > 1) {
661
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
662
+ }
663
+ switch (action[0]) {
664
+ case 1:
665
+ stack.push(symbol);
666
+ vstack.push(lexer2.yytext);
667
+ lstack.push(lexer2.yylloc);
668
+ stack.push(action[1]);
669
+ symbol = null;
670
+ if (!preErrorSymbol) {
671
+ yyleng = lexer2.yyleng;
672
+ yytext = lexer2.yytext;
673
+ yylineno = lexer2.yylineno;
674
+ yyloc = lexer2.yylloc;
675
+ if (recovering > 0) {
676
+ recovering--;
677
+ }
678
+ } else {
679
+ symbol = preErrorSymbol;
680
+ preErrorSymbol = null;
681
+ }
682
+ break;
683
+ case 2:
684
+ len = this.productions_[action[1]][1];
685
+ yyval.$ = vstack[vstack.length - len];
686
+ yyval._$ = {
687
+ first_line: lstack[lstack.length - (len || 1)].first_line,
688
+ last_line: lstack[lstack.length - 1].last_line,
689
+ first_column: lstack[lstack.length - (len || 1)].first_column,
690
+ last_column: lstack[lstack.length - 1].last_column
691
+ };
692
+ if (ranges) {
693
+ yyval._$.range = [
694
+ lstack[lstack.length - (len || 1)].range[0],
695
+ lstack[lstack.length - 1].range[1]
696
+ ];
697
+ }
698
+ r = this.performAction.apply(yyval, [
699
+ yytext,
700
+ yyleng,
701
+ yylineno,
702
+ sharedState.yy,
703
+ action[1],
704
+ vstack,
705
+ lstack
706
+ ].concat(args));
707
+ if (typeof r !== "undefined") {
708
+ return r;
709
+ }
710
+ if (len) {
711
+ stack = stack.slice(0, -1 * len * 2);
712
+ vstack = vstack.slice(0, -1 * len);
713
+ lstack = lstack.slice(0, -1 * len);
714
+ }
715
+ stack.push(this.productions_[action[1]][0]);
716
+ vstack.push(yyval.$);
717
+ lstack.push(yyval._$);
718
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
719
+ stack.push(newState);
720
+ break;
721
+ case 3:
722
+ return true;
723
+ }
724
+ }
725
+ return true;
726
+ }, "parse")
727
+ };
728
+ var lexer = /* @__PURE__ */ function() {
729
+ var lexer2 = {
730
+ EOF: 1,
731
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
732
+ if (this.yy.parser) {
733
+ this.yy.parser.parseError(str, hash);
734
+ } else {
735
+ throw new Error(str);
736
+ }
737
+ }, "parseError"),
738
+ setInput: /* @__PURE__ */ __name(function(input, yy) {
739
+ this.yy = yy || this.yy || {};
740
+ this._input = input;
741
+ this._more = this._backtrack = this.done = false;
742
+ this.yylineno = this.yyleng = 0;
743
+ this.yytext = this.matched = this.match = "";
744
+ this.conditionStack = ["INITIAL"];
745
+ this.yylloc = {
746
+ first_line: 1,
747
+ first_column: 0,
748
+ last_line: 1,
749
+ last_column: 0
750
+ };
751
+ if (this.options.ranges) {
752
+ this.yylloc.range = [0, 0];
753
+ }
754
+ this.offset = 0;
755
+ return this;
756
+ }, "setInput"),
757
+ input: /* @__PURE__ */ __name(function() {
758
+ var ch = this._input[0];
759
+ this.yytext += ch;
760
+ this.yyleng++;
761
+ this.offset++;
762
+ this.match += ch;
763
+ this.matched += ch;
764
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
765
+ if (lines) {
766
+ this.yylineno++;
767
+ this.yylloc.last_line++;
768
+ } else {
769
+ this.yylloc.last_column++;
770
+ }
771
+ if (this.options.ranges) {
772
+ this.yylloc.range[1]++;
773
+ }
774
+ this._input = this._input.slice(1);
775
+ return ch;
776
+ }, "input"),
777
+ unput: /* @__PURE__ */ __name(function(ch) {
778
+ var len = ch.length;
779
+ var lines = ch.split(/(?:\r\n?|\n)/g);
780
+ this._input = ch + this._input;
781
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
782
+ this.offset -= len;
783
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
784
+ this.match = this.match.substr(0, this.match.length - 1);
785
+ this.matched = this.matched.substr(0, this.matched.length - 1);
786
+ if (lines.length - 1) {
787
+ this.yylineno -= lines.length - 1;
788
+ }
789
+ var r = this.yylloc.range;
790
+ this.yylloc = {
791
+ first_line: this.yylloc.first_line,
792
+ last_line: this.yylineno + 1,
793
+ first_column: this.yylloc.first_column,
794
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
795
+ };
796
+ if (this.options.ranges) {
797
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
798
+ }
799
+ this.yyleng = this.yytext.length;
800
+ return this;
801
+ }, "unput"),
802
+ more: /* @__PURE__ */ __name(function() {
803
+ this._more = true;
804
+ return this;
805
+ }, "more"),
806
+ reject: /* @__PURE__ */ __name(function() {
807
+ if (this.options.backtrack_lexer) {
808
+ this._backtrack = true;
809
+ } else {
810
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
811
+ ` + this.showPosition(), {
812
+ text: "",
813
+ token: null,
814
+ line: this.yylineno
815
+ });
816
+ }
817
+ return this;
818
+ }, "reject"),
819
+ less: /* @__PURE__ */ __name(function(n) {
820
+ this.unput(this.match.slice(n));
821
+ }, "less"),
822
+ pastInput: /* @__PURE__ */ __name(function() {
823
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
824
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
825
+ }, "pastInput"),
826
+ upcomingInput: /* @__PURE__ */ __name(function() {
827
+ var next = this.match;
828
+ if (next.length < 20) {
829
+ next += this._input.substr(0, 20 - next.length);
830
+ }
831
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
832
+ }, "upcomingInput"),
833
+ showPosition: /* @__PURE__ */ __name(function() {
834
+ var pre = this.pastInput();
835
+ var c = new Array(pre.length + 1).join("-");
836
+ return pre + this.upcomingInput() + `
837
+ ` + c + "^";
838
+ }, "showPosition"),
839
+ test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
840
+ var token, lines, backup;
841
+ if (this.options.backtrack_lexer) {
842
+ backup = {
843
+ yylineno: this.yylineno,
844
+ yylloc: {
845
+ first_line: this.yylloc.first_line,
846
+ last_line: this.last_line,
847
+ first_column: this.yylloc.first_column,
848
+ last_column: this.yylloc.last_column
849
+ },
850
+ yytext: this.yytext,
851
+ match: this.match,
852
+ matches: this.matches,
853
+ matched: this.matched,
854
+ yyleng: this.yyleng,
855
+ offset: this.offset,
856
+ _more: this._more,
857
+ _input: this._input,
858
+ yy: this.yy,
859
+ conditionStack: this.conditionStack.slice(0),
860
+ done: this.done
861
+ };
862
+ if (this.options.ranges) {
863
+ backup.yylloc.range = this.yylloc.range.slice(0);
864
+ }
865
+ }
866
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
867
+ if (lines) {
868
+ this.yylineno += lines.length;
869
+ }
870
+ this.yylloc = {
871
+ first_line: this.yylloc.last_line,
872
+ last_line: this.yylineno + 1,
873
+ first_column: this.yylloc.last_column,
874
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
875
+ };
876
+ this.yytext += match[0];
877
+ this.match += match[0];
878
+ this.matches = match;
879
+ this.yyleng = this.yytext.length;
880
+ if (this.options.ranges) {
881
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
882
+ }
883
+ this._more = false;
884
+ this._backtrack = false;
885
+ this._input = this._input.slice(match[0].length);
886
+ this.matched += match[0];
887
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
888
+ if (this.done && this._input) {
889
+ this.done = false;
890
+ }
891
+ if (token) {
892
+ return token;
893
+ } else if (this._backtrack) {
894
+ for (var k in backup) {
895
+ this[k] = backup[k];
896
+ }
897
+ return false;
898
+ }
899
+ return false;
900
+ }, "test_match"),
901
+ next: /* @__PURE__ */ __name(function() {
902
+ if (this.done) {
903
+ return this.EOF;
904
+ }
905
+ if (!this._input) {
906
+ this.done = true;
907
+ }
908
+ var token, match, tempMatch, index;
909
+ if (!this._more) {
910
+ this.yytext = "";
911
+ this.match = "";
912
+ }
913
+ var rules = this._currentRules();
914
+ for (var i = 0;i < rules.length; i++) {
915
+ tempMatch = this._input.match(this.rules[rules[i]]);
916
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
917
+ match = tempMatch;
918
+ index = i;
919
+ if (this.options.backtrack_lexer) {
920
+ token = this.test_match(tempMatch, rules[i]);
921
+ if (token !== false) {
922
+ return token;
923
+ } else if (this._backtrack) {
924
+ match = false;
925
+ continue;
926
+ } else {
927
+ return false;
928
+ }
929
+ } else if (!this.options.flex) {
930
+ break;
931
+ }
932
+ }
933
+ }
934
+ if (match) {
935
+ token = this.test_match(match, rules[index]);
936
+ if (token !== false) {
937
+ return token;
938
+ }
939
+ return false;
940
+ }
941
+ if (this._input === "") {
942
+ return this.EOF;
943
+ } else {
944
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
945
+ ` + this.showPosition(), {
946
+ text: "",
947
+ token: null,
948
+ line: this.yylineno
949
+ });
950
+ }
951
+ }, "next"),
952
+ lex: /* @__PURE__ */ __name(function lex() {
953
+ var r = this.next();
954
+ if (r) {
955
+ return r;
956
+ } else {
957
+ return this.lex();
958
+ }
959
+ }, "lex"),
960
+ begin: /* @__PURE__ */ __name(function begin(condition) {
961
+ this.conditionStack.push(condition);
962
+ }, "begin"),
963
+ popState: /* @__PURE__ */ __name(function popState() {
964
+ var n = this.conditionStack.length - 1;
965
+ if (n > 0) {
966
+ return this.conditionStack.pop();
967
+ } else {
968
+ return this.conditionStack[0];
969
+ }
970
+ }, "popState"),
971
+ _currentRules: /* @__PURE__ */ __name(function _currentRules() {
972
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
973
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
974
+ } else {
975
+ return this.conditions["INITIAL"].rules;
976
+ }
977
+ }, "_currentRules"),
978
+ topState: /* @__PURE__ */ __name(function topState(n) {
979
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
980
+ if (n >= 0) {
981
+ return this.conditionStack[n];
982
+ } else {
983
+ return "INITIAL";
984
+ }
985
+ }, "topState"),
986
+ pushState: /* @__PURE__ */ __name(function pushState(condition) {
987
+ this.begin(condition);
988
+ }, "pushState"),
989
+ stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
990
+ return this.conditionStack.length;
991
+ }, "stateStackSize"),
992
+ options: { "case-insensitive": true },
993
+ performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
994
+ var YYSTATE = YY_START;
995
+ switch ($avoiding_name_collisions) {
996
+ case 0:
997
+ this.begin("open_directive");
998
+ return "open_directive";
999
+ break;
1000
+ case 1:
1001
+ this.begin("acc_title");
1002
+ return 31;
1003
+ break;
1004
+ case 2:
1005
+ this.popState();
1006
+ return "acc_title_value";
1007
+ break;
1008
+ case 3:
1009
+ this.begin("acc_descr");
1010
+ return 33;
1011
+ break;
1012
+ case 4:
1013
+ this.popState();
1014
+ return "acc_descr_value";
1015
+ break;
1016
+ case 5:
1017
+ this.begin("acc_descr_multiline");
1018
+ break;
1019
+ case 6:
1020
+ this.popState();
1021
+ break;
1022
+ case 7:
1023
+ return "acc_descr_multiline_value";
1024
+ break;
1025
+ case 8:
1026
+ break;
1027
+ case 9:
1028
+ break;
1029
+ case 10:
1030
+ break;
1031
+ case 11:
1032
+ return 10;
1033
+ break;
1034
+ case 12:
1035
+ break;
1036
+ case 13:
1037
+ break;
1038
+ case 14:
1039
+ this.begin("href");
1040
+ break;
1041
+ case 15:
1042
+ this.popState();
1043
+ break;
1044
+ case 16:
1045
+ return 43;
1046
+ break;
1047
+ case 17:
1048
+ this.begin("callbackname");
1049
+ break;
1050
+ case 18:
1051
+ this.popState();
1052
+ break;
1053
+ case 19:
1054
+ this.popState();
1055
+ this.begin("callbackargs");
1056
+ break;
1057
+ case 20:
1058
+ return 41;
1059
+ break;
1060
+ case 21:
1061
+ this.popState();
1062
+ break;
1063
+ case 22:
1064
+ return 42;
1065
+ break;
1066
+ case 23:
1067
+ this.begin("click");
1068
+ break;
1069
+ case 24:
1070
+ this.popState();
1071
+ break;
1072
+ case 25:
1073
+ return 40;
1074
+ break;
1075
+ case 26:
1076
+ return 4;
1077
+ break;
1078
+ case 27:
1079
+ return 22;
1080
+ break;
1081
+ case 28:
1082
+ return 23;
1083
+ break;
1084
+ case 29:
1085
+ return 24;
1086
+ break;
1087
+ case 30:
1088
+ return 25;
1089
+ break;
1090
+ case 31:
1091
+ return 26;
1092
+ break;
1093
+ case 32:
1094
+ return 28;
1095
+ break;
1096
+ case 33:
1097
+ return 27;
1098
+ break;
1099
+ case 34:
1100
+ return 29;
1101
+ break;
1102
+ case 35:
1103
+ return 12;
1104
+ break;
1105
+ case 36:
1106
+ return 13;
1107
+ break;
1108
+ case 37:
1109
+ return 14;
1110
+ break;
1111
+ case 38:
1112
+ return 15;
1113
+ break;
1114
+ case 39:
1115
+ return 16;
1116
+ break;
1117
+ case 40:
1118
+ return 17;
1119
+ break;
1120
+ case 41:
1121
+ return 18;
1122
+ break;
1123
+ case 42:
1124
+ return 20;
1125
+ break;
1126
+ case 43:
1127
+ return 21;
1128
+ break;
1129
+ case 44:
1130
+ return "date";
1131
+ break;
1132
+ case 45:
1133
+ return 30;
1134
+ break;
1135
+ case 46:
1136
+ return "accDescription";
1137
+ break;
1138
+ case 47:
1139
+ return 36;
1140
+ break;
1141
+ case 48:
1142
+ return 38;
1143
+ break;
1144
+ case 49:
1145
+ return 39;
1146
+ break;
1147
+ case 50:
1148
+ return ":";
1149
+ break;
1150
+ case 51:
1151
+ return 6;
1152
+ break;
1153
+ case 52:
1154
+ return "INVALID";
1155
+ break;
1156
+ }
1157
+ }, "anonymous"),
1158
+ rules: [/^(?:%%\{)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:weekend\s+friday\b)/i, /^(?:weekend\s+saturday\b)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^\n]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^\n]+)/i, /^(?:[^:\n]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
1159
+ conditions: { acc_descr_multiline: { rules: [6, 7], inclusive: false }, acc_descr: { rules: [4], inclusive: false }, acc_title: { rules: [2], inclusive: false }, callbackargs: { rules: [21, 22], inclusive: false }, callbackname: { rules: [18, 19, 20], inclusive: false }, href: { rules: [15, 16], inclusive: false }, click: { rules: [24, 25], inclusive: false }, INITIAL: { rules: [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 17, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52], inclusive: true } }
1160
+ };
1161
+ return lexer2;
1162
+ }();
1163
+ parser2.lexer = lexer;
1164
+ function Parser() {
1165
+ this.yy = {};
1166
+ }
1167
+ __name(Parser, "Parser");
1168
+ Parser.prototype = parser2;
1169
+ parser2.Parser = Parser;
1170
+ return new Parser;
1171
+ }();
1172
+ parser.parser = parser;
1173
+ var gantt_default = parser;
1174
+ import_dayjs.default.extend(import_isoWeek.default);
1175
+ import_dayjs.default.extend(import_customParseFormat.default);
1176
+ import_dayjs.default.extend(import_advancedFormat.default);
1177
+ var WEEKEND_START_DAY = { friday: 5, saturday: 6 };
1178
+ var dateFormat = "";
1179
+ var axisFormat = "";
1180
+ var tickInterval = undefined;
1181
+ var todayMarker = "";
1182
+ var includes = [];
1183
+ var excludes = [];
1184
+ var links = /* @__PURE__ */ new Map;
1185
+ var sections = [];
1186
+ var tasks = [];
1187
+ var currentSection = "";
1188
+ var displayMode = "";
1189
+ var tags = ["active", "done", "crit", "milestone", "vert"];
1190
+ var funs = [];
1191
+ var diagramId = "";
1192
+ var inclusiveEndDates = false;
1193
+ var topAxis = false;
1194
+ var weekday = "sunday";
1195
+ var weekend = "saturday";
1196
+ var lastOrder = 0;
1197
+ var clear2 = /* @__PURE__ */ __name(function() {
1198
+ sections = [];
1199
+ tasks = [];
1200
+ currentSection = "";
1201
+ funs = [];
1202
+ taskCnt = 0;
1203
+ lastTask = undefined;
1204
+ lastTaskID = undefined;
1205
+ rawTasks = [];
1206
+ dateFormat = "";
1207
+ axisFormat = "";
1208
+ displayMode = "";
1209
+ tickInterval = undefined;
1210
+ todayMarker = "";
1211
+ includes = [];
1212
+ excludes = [];
1213
+ inclusiveEndDates = false;
1214
+ topAxis = false;
1215
+ lastOrder = 0;
1216
+ links = /* @__PURE__ */ new Map;
1217
+ diagramId = "";
1218
+ clear();
1219
+ weekday = "sunday";
1220
+ weekend = "saturday";
1221
+ }, "clear");
1222
+ var setDiagramId = /* @__PURE__ */ __name(function(id) {
1223
+ diagramId = id;
1224
+ }, "setDiagramId");
1225
+ var setAxisFormat = /* @__PURE__ */ __name(function(txt) {
1226
+ axisFormat = txt;
1227
+ }, "setAxisFormat");
1228
+ var getAxisFormat = /* @__PURE__ */ __name(function() {
1229
+ return axisFormat;
1230
+ }, "getAxisFormat");
1231
+ var setTickInterval = /* @__PURE__ */ __name(function(txt) {
1232
+ tickInterval = txt;
1233
+ }, "setTickInterval");
1234
+ var getTickInterval = /* @__PURE__ */ __name(function() {
1235
+ return tickInterval;
1236
+ }, "getTickInterval");
1237
+ var setTodayMarker = /* @__PURE__ */ __name(function(txt) {
1238
+ todayMarker = txt;
1239
+ }, "setTodayMarker");
1240
+ var getTodayMarker = /* @__PURE__ */ __name(function() {
1241
+ return todayMarker;
1242
+ }, "getTodayMarker");
1243
+ var setDateFormat = /* @__PURE__ */ __name(function(txt) {
1244
+ dateFormat = txt;
1245
+ }, "setDateFormat");
1246
+ var enableInclusiveEndDates = /* @__PURE__ */ __name(function() {
1247
+ inclusiveEndDates = true;
1248
+ }, "enableInclusiveEndDates");
1249
+ var endDatesAreInclusive = /* @__PURE__ */ __name(function() {
1250
+ return inclusiveEndDates;
1251
+ }, "endDatesAreInclusive");
1252
+ var enableTopAxis = /* @__PURE__ */ __name(function() {
1253
+ topAxis = true;
1254
+ }, "enableTopAxis");
1255
+ var topAxisEnabled = /* @__PURE__ */ __name(function() {
1256
+ return topAxis;
1257
+ }, "topAxisEnabled");
1258
+ var setDisplayMode = /* @__PURE__ */ __name(function(txt) {
1259
+ displayMode = txt;
1260
+ }, "setDisplayMode");
1261
+ var getDisplayMode = /* @__PURE__ */ __name(function() {
1262
+ return displayMode;
1263
+ }, "getDisplayMode");
1264
+ var getDateFormat = /* @__PURE__ */ __name(function() {
1265
+ return dateFormat;
1266
+ }, "getDateFormat");
1267
+ var mergeTokens = /* @__PURE__ */ __name((existing, txt) => {
1268
+ const tokens = txt.toLowerCase().split(/[\s,]+/).filter((t) => t !== "");
1269
+ return [.../* @__PURE__ */ new Set([...existing, ...tokens])];
1270
+ }, "mergeTokens");
1271
+ var setIncludes = /* @__PURE__ */ __name(function(txt) {
1272
+ includes = mergeTokens(includes, txt);
1273
+ }, "setIncludes");
1274
+ var getIncludes = /* @__PURE__ */ __name(function() {
1275
+ return includes;
1276
+ }, "getIncludes");
1277
+ var setExcludes = /* @__PURE__ */ __name(function(txt) {
1278
+ excludes = mergeTokens(excludes, txt);
1279
+ }, "setExcludes");
1280
+ var getExcludes = /* @__PURE__ */ __name(function() {
1281
+ return excludes;
1282
+ }, "getExcludes");
1283
+ var getLinks = /* @__PURE__ */ __name(function() {
1284
+ return links;
1285
+ }, "getLinks");
1286
+ var addSection = /* @__PURE__ */ __name(function(txt) {
1287
+ currentSection = txt;
1288
+ sections.push(txt);
1289
+ }, "addSection");
1290
+ var getSections = /* @__PURE__ */ __name(function() {
1291
+ return sections;
1292
+ }, "getSections");
1293
+ var getTasks = /* @__PURE__ */ __name(function() {
1294
+ let allItemsProcessed = compileTasks();
1295
+ const maxDepth = 10;
1296
+ let iterationCount = 0;
1297
+ while (!allItemsProcessed && iterationCount < maxDepth) {
1298
+ allItemsProcessed = compileTasks();
1299
+ iterationCount++;
1300
+ }
1301
+ tasks = rawTasks;
1302
+ return tasks;
1303
+ }, "getTasks");
1304
+ var isInvalidDate = /* @__PURE__ */ __name(function(date, dateFormat2, excludes2, includes2) {
1305
+ const formattedDate = date.format(dateFormat2.trim());
1306
+ const dateOnly = date.format("YYYY-MM-DD");
1307
+ if (includes2.includes(formattedDate) || includes2.includes(dateOnly)) {
1308
+ return false;
1309
+ }
1310
+ if (excludes2.includes("weekends") && (date.isoWeekday() === WEEKEND_START_DAY[weekend] || date.isoWeekday() === WEEKEND_START_DAY[weekend] + 1)) {
1311
+ return true;
1312
+ }
1313
+ if (excludes2.includes(date.format("dddd").toLowerCase())) {
1314
+ return true;
1315
+ }
1316
+ return excludes2.includes(formattedDate) || excludes2.includes(dateOnly);
1317
+ }, "isInvalidDate");
1318
+ var setWeekday = /* @__PURE__ */ __name(function(txt) {
1319
+ weekday = txt;
1320
+ }, "setWeekday");
1321
+ var getWeekday = /* @__PURE__ */ __name(function() {
1322
+ return weekday;
1323
+ }, "getWeekday");
1324
+ var setWeekend = /* @__PURE__ */ __name(function(startDay) {
1325
+ weekend = startDay;
1326
+ }, "setWeekend");
1327
+ var checkTaskDates = /* @__PURE__ */ __name(function(task, dateFormat2, excludes2, includes2) {
1328
+ if (!excludes2.length || task.manualEndTime) {
1329
+ return;
1330
+ }
1331
+ let startTime;
1332
+ if (task.startTime instanceof Date) {
1333
+ startTime = import_dayjs.default(task.startTime);
1334
+ } else {
1335
+ startTime = import_dayjs.default(task.startTime, dateFormat2, true);
1336
+ }
1337
+ startTime = startTime.add(1, "d");
1338
+ let originalEndTime;
1339
+ if (task.endTime instanceof Date) {
1340
+ originalEndTime = import_dayjs.default(task.endTime);
1341
+ } else {
1342
+ originalEndTime = import_dayjs.default(task.endTime, dateFormat2, true);
1343
+ }
1344
+ const [fixedEndTime, renderEndTime] = fixTaskDates(startTime, originalEndTime, dateFormat2, excludes2, includes2);
1345
+ task.endTime = fixedEndTime.toDate();
1346
+ task.renderEndTime = renderEndTime;
1347
+ }, "checkTaskDates");
1348
+ var fixTaskDates = /* @__PURE__ */ __name(function(startTime, endTime, dateFormat2, excludes2, includes2) {
1349
+ let invalid = false;
1350
+ let renderEndTime = null;
1351
+ const maxEndTime = endTime.add(1e4, "d");
1352
+ while (startTime <= endTime) {
1353
+ if (!invalid) {
1354
+ renderEndTime = endTime.toDate();
1355
+ }
1356
+ invalid = isInvalidDate(startTime, dateFormat2, excludes2, includes2);
1357
+ if (invalid) {
1358
+ endTime = endTime.add(1, "d");
1359
+ if (endTime > maxEndTime) {
1360
+ throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");
1361
+ }
1362
+ }
1363
+ startTime = startTime.add(1, "d");
1364
+ }
1365
+ return [endTime, renderEndTime];
1366
+ }, "fixTaskDates");
1367
+ var getStartDate = /* @__PURE__ */ __name(function(prevTime, dateFormat2, str) {
1368
+ str = str.trim();
1369
+ const isTimestampFormat = /* @__PURE__ */ __name((format) => {
1370
+ const trimmedFormat = format.trim();
1371
+ return trimmedFormat === "x" || trimmedFormat === "X";
1372
+ }, "isTimestampFormat");
1373
+ if (isTimestampFormat(dateFormat2) && /^\d+$/.test(str)) {
1374
+ return new Date(Number(str));
1375
+ }
1376
+ const afterRePattern = /^after\s+(?<ids>[\d\w- ]+)/;
1377
+ const afterStatement = afterRePattern.exec(str);
1378
+ if (afterStatement !== null) {
1379
+ let latestTask = null;
1380
+ for (const id of afterStatement.groups.ids.split(" ")) {
1381
+ let task = findTaskById(id);
1382
+ if (task !== undefined && (!latestTask || task.endTime > latestTask.endTime)) {
1383
+ latestTask = task;
1384
+ }
1385
+ }
1386
+ if (latestTask) {
1387
+ return latestTask.endTime;
1388
+ }
1389
+ const today = /* @__PURE__ */ new Date;
1390
+ today.setHours(0, 0, 0, 0);
1391
+ return today;
1392
+ }
1393
+ let mDate = import_dayjs.default(str, dateFormat2.trim(), true);
1394
+ if (mDate.isValid()) {
1395
+ return mDate.toDate();
1396
+ } else {
1397
+ log.debug("Invalid date:" + str);
1398
+ log.debug("With date format:" + dateFormat2.trim());
1399
+ const d = new Date(str);
1400
+ if (d === undefined || isNaN(d.getTime()) || d.getFullYear() < -1e4 || d.getFullYear() > 1e4) {
1401
+ throw new Error("Invalid date:" + str);
1402
+ }
1403
+ return d;
1404
+ }
1405
+ }, "getStartDate");
1406
+ var parseDuration = /* @__PURE__ */ __name(function(str) {
1407
+ const statement = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(str.trim());
1408
+ if (statement !== null) {
1409
+ return [Number.parseFloat(statement[1]), statement[2]];
1410
+ }
1411
+ return [NaN, "ms"];
1412
+ }, "parseDuration");
1413
+ var getEndDate = /* @__PURE__ */ __name(function(prevTime, dateFormat2, str, inclusive = false) {
1414
+ str = str.trim();
1415
+ const untilRePattern = /^until\s+(?<ids>[\d\w- ]+)/;
1416
+ const untilStatement = untilRePattern.exec(str);
1417
+ if (untilStatement !== null) {
1418
+ let earliestTask = null;
1419
+ for (const id of untilStatement.groups.ids.split(" ")) {
1420
+ let task = findTaskById(id);
1421
+ if (task !== undefined && (!earliestTask || task.startTime < earliestTask.startTime)) {
1422
+ earliestTask = task;
1423
+ }
1424
+ }
1425
+ if (earliestTask) {
1426
+ return earliestTask.startTime;
1427
+ }
1428
+ const today = /* @__PURE__ */ new Date;
1429
+ today.setHours(0, 0, 0, 0);
1430
+ return today;
1431
+ }
1432
+ let parsedDate = import_dayjs.default(str, dateFormat2.trim(), true);
1433
+ if (parsedDate.isValid()) {
1434
+ if (inclusive) {
1435
+ parsedDate = parsedDate.add(1, "d");
1436
+ }
1437
+ return parsedDate.toDate();
1438
+ }
1439
+ let endTime = import_dayjs.default(prevTime);
1440
+ const [durationValue, durationUnit] = parseDuration(str);
1441
+ if (!Number.isNaN(durationValue)) {
1442
+ const newEndTime = endTime.add(durationValue, durationUnit);
1443
+ if (newEndTime.isValid()) {
1444
+ endTime = newEndTime;
1445
+ }
1446
+ }
1447
+ return endTime.toDate();
1448
+ }, "getEndDate");
1449
+ var taskCnt = 0;
1450
+ var parseId = /* @__PURE__ */ __name(function(idStr) {
1451
+ if (idStr === undefined) {
1452
+ taskCnt = taskCnt + 1;
1453
+ return "task" + taskCnt;
1454
+ }
1455
+ return idStr;
1456
+ }, "parseId");
1457
+ var compileData = /* @__PURE__ */ __name(function(prevTask, dataStr) {
1458
+ let ds;
1459
+ if (dataStr.substr(0, 1) === ":") {
1460
+ ds = dataStr.substr(1, dataStr.length);
1461
+ } else {
1462
+ ds = dataStr;
1463
+ }
1464
+ const data = ds.split(",");
1465
+ const task = {};
1466
+ getTaskTags(data, task, tags);
1467
+ for (let i = 0;i < data.length; i++) {
1468
+ data[i] = data[i].trim();
1469
+ }
1470
+ let endTimeData = "";
1471
+ switch (data.length) {
1472
+ case 1:
1473
+ task.id = parseId();
1474
+ task.startTime = prevTask.endTime;
1475
+ endTimeData = data[0];
1476
+ break;
1477
+ case 2:
1478
+ task.id = parseId();
1479
+ task.startTime = getStartDate(undefined, dateFormat, data[0]);
1480
+ endTimeData = data[1];
1481
+ break;
1482
+ case 3:
1483
+ task.id = parseId(data[0]);
1484
+ task.startTime = getStartDate(undefined, dateFormat, data[1]);
1485
+ endTimeData = data[2];
1486
+ break;
1487
+ default:
1488
+ }
1489
+ if (endTimeData) {
1490
+ task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates);
1491
+ task.manualEndTime = import_dayjs.default(endTimeData, "YYYY-MM-DD", true).isValid();
1492
+ checkTaskDates(task, dateFormat, excludes, includes);
1493
+ }
1494
+ return task;
1495
+ }, "compileData");
1496
+ var parseData = /* @__PURE__ */ __name(function(prevTaskId, dataStr) {
1497
+ let ds;
1498
+ if (dataStr.substr(0, 1) === ":") {
1499
+ ds = dataStr.substr(1, dataStr.length);
1500
+ } else {
1501
+ ds = dataStr;
1502
+ }
1503
+ const data = ds.split(",");
1504
+ const task = {};
1505
+ getTaskTags(data, task, tags);
1506
+ for (let i = 0;i < data.length; i++) {
1507
+ data[i] = data[i].trim();
1508
+ }
1509
+ switch (data.length) {
1510
+ case 1:
1511
+ task.id = parseId();
1512
+ task.startTime = {
1513
+ type: "prevTaskEnd",
1514
+ id: prevTaskId
1515
+ };
1516
+ task.endTime = {
1517
+ data: data[0]
1518
+ };
1519
+ break;
1520
+ case 2:
1521
+ task.id = parseId();
1522
+ task.startTime = {
1523
+ type: "getStartDate",
1524
+ startData: data[0]
1525
+ };
1526
+ task.endTime = {
1527
+ data: data[1]
1528
+ };
1529
+ break;
1530
+ case 3:
1531
+ task.id = parseId(data[0]);
1532
+ task.startTime = {
1533
+ type: "getStartDate",
1534
+ startData: data[1]
1535
+ };
1536
+ task.endTime = {
1537
+ data: data[2]
1538
+ };
1539
+ break;
1540
+ default:
1541
+ }
1542
+ return task;
1543
+ }, "parseData");
1544
+ var lastTask;
1545
+ var lastTaskID;
1546
+ var rawTasks = [];
1547
+ var taskDb = {};
1548
+ var addTask = /* @__PURE__ */ __name(function(descr, data) {
1549
+ const rawTask = {
1550
+ section: currentSection,
1551
+ type: currentSection,
1552
+ processed: false,
1553
+ manualEndTime: false,
1554
+ renderEndTime: null,
1555
+ raw: { data },
1556
+ task: descr,
1557
+ classes: []
1558
+ };
1559
+ const taskInfo = parseData(lastTaskID, data);
1560
+ rawTask.raw.startTime = taskInfo.startTime;
1561
+ rawTask.raw.endTime = taskInfo.endTime;
1562
+ rawTask.id = taskInfo.id;
1563
+ rawTask.prevTaskId = lastTaskID;
1564
+ rawTask.active = taskInfo.active;
1565
+ rawTask.done = taskInfo.done;
1566
+ rawTask.crit = taskInfo.crit;
1567
+ rawTask.milestone = taskInfo.milestone;
1568
+ rawTask.vert = taskInfo.vert;
1569
+ if (rawTask.vert) {
1570
+ rawTask.order = -1;
1571
+ } else {
1572
+ rawTask.order = lastOrder;
1573
+ lastOrder++;
1574
+ }
1575
+ const pos = rawTasks.push(rawTask);
1576
+ lastTaskID = rawTask.id;
1577
+ taskDb[rawTask.id] = pos - 1;
1578
+ }, "addTask");
1579
+ var findTaskById = /* @__PURE__ */ __name(function(id) {
1580
+ const pos = taskDb[id];
1581
+ return rawTasks[pos];
1582
+ }, "findTaskById");
1583
+ var addTaskOrg = /* @__PURE__ */ __name(function(descr, data) {
1584
+ const newTask = {
1585
+ section: currentSection,
1586
+ type: currentSection,
1587
+ description: descr,
1588
+ task: descr,
1589
+ classes: []
1590
+ };
1591
+ const taskInfo = compileData(lastTask, data);
1592
+ newTask.startTime = taskInfo.startTime;
1593
+ newTask.endTime = taskInfo.endTime;
1594
+ newTask.id = taskInfo.id;
1595
+ newTask.active = taskInfo.active;
1596
+ newTask.done = taskInfo.done;
1597
+ newTask.crit = taskInfo.crit;
1598
+ newTask.milestone = taskInfo.milestone;
1599
+ newTask.vert = taskInfo.vert;
1600
+ lastTask = newTask;
1601
+ tasks.push(newTask);
1602
+ }, "addTaskOrg");
1603
+ var compileTasks = /* @__PURE__ */ __name(function() {
1604
+ const compileTask = /* @__PURE__ */ __name(function(pos) {
1605
+ const task = rawTasks[pos];
1606
+ let startTime = "";
1607
+ switch (rawTasks[pos].raw.startTime.type) {
1608
+ case "prevTaskEnd": {
1609
+ const prevTask = findTaskById(task.prevTaskId);
1610
+ task.startTime = prevTask.endTime;
1611
+ break;
1612
+ }
1613
+ case "getStartDate":
1614
+ startTime = getStartDate(undefined, dateFormat, rawTasks[pos].raw.startTime.startData);
1615
+ if (startTime) {
1616
+ rawTasks[pos].startTime = startTime;
1617
+ }
1618
+ break;
1619
+ }
1620
+ if (rawTasks[pos].startTime) {
1621
+ rawTasks[pos].endTime = getEndDate(rawTasks[pos].startTime, dateFormat, rawTasks[pos].raw.endTime.data, inclusiveEndDates);
1622
+ if (rawTasks[pos].endTime) {
1623
+ rawTasks[pos].processed = true;
1624
+ rawTasks[pos].manualEndTime = import_dayjs.default(rawTasks[pos].raw.endTime.data, "YYYY-MM-DD", true).isValid();
1625
+ checkTaskDates(rawTasks[pos], dateFormat, excludes, includes);
1626
+ }
1627
+ }
1628
+ return rawTasks[pos].processed;
1629
+ }, "compileTask");
1630
+ let allProcessed = true;
1631
+ for (const [i, rawTask] of rawTasks.entries()) {
1632
+ compileTask(i);
1633
+ allProcessed = allProcessed && rawTask.processed;
1634
+ }
1635
+ return allProcessed;
1636
+ }, "compileTasks");
1637
+ var setLink = /* @__PURE__ */ __name(function(ids, _linkStr) {
1638
+ let linkStr = _linkStr;
1639
+ if (getConfig2().securityLevel !== "loose") {
1640
+ linkStr = import_sanitize_url.sanitizeUrl(_linkStr);
1641
+ }
1642
+ ids.split(",").forEach(function(id) {
1643
+ let rawTask = findTaskById(id);
1644
+ if (rawTask !== undefined) {
1645
+ pushFun(id, () => {
1646
+ window.open(linkStr, "_self");
1647
+ });
1648
+ links.set(id, linkStr);
1649
+ }
1650
+ });
1651
+ setClass(ids, "clickable");
1652
+ }, "setLink");
1653
+ var setClass = /* @__PURE__ */ __name(function(ids, className) {
1654
+ ids.split(",").forEach(function(id) {
1655
+ let rawTask = findTaskById(id);
1656
+ if (rawTask !== undefined) {
1657
+ rawTask.classes.push(className);
1658
+ }
1659
+ });
1660
+ }, "setClass");
1661
+ var setClickFun = /* @__PURE__ */ __name(function(id, functionName, functionArgs) {
1662
+ if (getConfig2().securityLevel !== "loose") {
1663
+ return;
1664
+ }
1665
+ if (functionName === undefined) {
1666
+ return;
1667
+ }
1668
+ let argList = [];
1669
+ if (typeof functionArgs === "string") {
1670
+ argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
1671
+ for (let i = 0;i < argList.length; i++) {
1672
+ let item = argList[i].trim();
1673
+ if (item.startsWith('"') && item.endsWith('"')) {
1674
+ item = item.substr(1, item.length - 2);
1675
+ }
1676
+ argList[i] = item;
1677
+ }
1678
+ }
1679
+ if (argList.length === 0) {
1680
+ argList.push(id);
1681
+ }
1682
+ let rawTask = findTaskById(id);
1683
+ if (rawTask !== undefined) {
1684
+ pushFun(id, () => {
1685
+ utils_default.runFunc(functionName, ...argList);
1686
+ });
1687
+ }
1688
+ }, "setClickFun");
1689
+ var pushFun = /* @__PURE__ */ __name(function(id, callbackFunction) {
1690
+ funs.push(function() {
1691
+ const prefixedId = diagramId ? `${diagramId}-${id}` : id;
1692
+ const elem = document.querySelector(`[id="${prefixedId}"]`);
1693
+ if (elem !== null) {
1694
+ elem.addEventListener("click", function() {
1695
+ callbackFunction();
1696
+ });
1697
+ }
1698
+ }, function() {
1699
+ const prefixedId = diagramId ? `${diagramId}-${id}` : id;
1700
+ const elem = document.querySelector(`[id="${prefixedId}-text"]`);
1701
+ if (elem !== null) {
1702
+ elem.addEventListener("click", function() {
1703
+ callbackFunction();
1704
+ });
1705
+ }
1706
+ });
1707
+ }, "pushFun");
1708
+ var setClickEvent = /* @__PURE__ */ __name(function(ids, functionName, functionArgs) {
1709
+ ids.split(",").forEach(function(id) {
1710
+ setClickFun(id, functionName, functionArgs);
1711
+ });
1712
+ setClass(ids, "clickable");
1713
+ }, "setClickEvent");
1714
+ var bindFunctions = /* @__PURE__ */ __name(function(element) {
1715
+ funs.forEach(function(fun) {
1716
+ fun(element);
1717
+ });
1718
+ }, "bindFunctions");
1719
+ var ganttDb_default = {
1720
+ getConfig: /* @__PURE__ */ __name(() => getConfig2().gantt, "getConfig"),
1721
+ clear: clear2,
1722
+ setDateFormat,
1723
+ getDateFormat,
1724
+ enableInclusiveEndDates,
1725
+ endDatesAreInclusive,
1726
+ enableTopAxis,
1727
+ topAxisEnabled,
1728
+ setAxisFormat,
1729
+ getAxisFormat,
1730
+ setTickInterval,
1731
+ getTickInterval,
1732
+ setTodayMarker,
1733
+ getTodayMarker,
1734
+ setAccTitle,
1735
+ getAccTitle,
1736
+ setDiagramTitle,
1737
+ getDiagramTitle,
1738
+ setDiagramId,
1739
+ setDisplayMode,
1740
+ getDisplayMode,
1741
+ setAccDescription,
1742
+ getAccDescription,
1743
+ addSection,
1744
+ getSections,
1745
+ getTasks,
1746
+ addTask,
1747
+ findTaskById,
1748
+ addTaskOrg,
1749
+ setIncludes,
1750
+ getIncludes,
1751
+ setExcludes,
1752
+ getExcludes,
1753
+ setClickEvent,
1754
+ setLink,
1755
+ getLinks,
1756
+ bindFunctions,
1757
+ parseDuration,
1758
+ isInvalidDate,
1759
+ setWeekday,
1760
+ getWeekday,
1761
+ setWeekend
1762
+ };
1763
+ function getTaskTags(data, task, tags2) {
1764
+ let matchFound = true;
1765
+ while (matchFound) {
1766
+ matchFound = false;
1767
+ tags2.forEach(function(t) {
1768
+ const pattern = "^\\s*" + t + "\\s*$";
1769
+ const regex = new RegExp(pattern);
1770
+ if (data[0].match(regex)) {
1771
+ task[t] = true;
1772
+ data.shift(1);
1773
+ matchFound = true;
1774
+ }
1775
+ });
1776
+ }
1777
+ }
1778
+ __name(getTaskTags, "getTaskTags");
1779
+ import_dayjs2.default.extend(import_duration.default);
1780
+ var setConf = /* @__PURE__ */ __name(function() {
1781
+ log.debug("Something is calling, setConf, remove the call");
1782
+ }, "setConf");
1783
+ var mapWeekdayToTimeFunction = {
1784
+ monday: timeMonday,
1785
+ tuesday: timeTuesday,
1786
+ wednesday: timeWednesday,
1787
+ thursday: timeThursday,
1788
+ friday: timeFriday,
1789
+ saturday: timeSaturday,
1790
+ sunday: timeSunday
1791
+ };
1792
+ var getMaxIntersections = /* @__PURE__ */ __name((tasks2, orderOffset) => {
1793
+ let timeline = [...tasks2].map(() => -Infinity);
1794
+ let sorted = [...tasks2].sort((a, b) => a.startTime - b.startTime || a.order - b.order);
1795
+ let maxIntersections = 0;
1796
+ for (const element of sorted) {
1797
+ for (let j = 0;j < timeline.length; j++) {
1798
+ if (element.startTime >= timeline[j]) {
1799
+ timeline[j] = element.endTime;
1800
+ element.order = j + orderOffset;
1801
+ if (j > maxIntersections) {
1802
+ maxIntersections = j;
1803
+ }
1804
+ break;
1805
+ }
1806
+ }
1807
+ }
1808
+ return maxIntersections;
1809
+ }, "getMaxIntersections");
1810
+ var w;
1811
+ var MAX_TICK_COUNT = 1e4;
1812
+ var draw = /* @__PURE__ */ __name(function(text, id, version, diagObj) {
1813
+ const conf = getConfig2().gantt;
1814
+ diagObj.db.setDiagramId(id);
1815
+ const securityLevel = getConfig2().securityLevel;
1816
+ let sandboxElement;
1817
+ if (securityLevel === "sandbox") {
1818
+ sandboxElement = select_default("#i" + id);
1819
+ }
1820
+ const root = securityLevel === "sandbox" ? select_default(sandboxElement.nodes()[0].contentDocument.body) : select_default("body");
1821
+ const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
1822
+ const elem = doc.getElementById(id);
1823
+ w = elem.parentElement.offsetWidth;
1824
+ if (w === undefined) {
1825
+ w = 1200;
1826
+ }
1827
+ if (conf.useWidth !== undefined) {
1828
+ w = conf.useWidth;
1829
+ }
1830
+ const taskArray = diagObj.db.getTasks();
1831
+ const tasksWithoutVert = taskArray.filter((task) => !task.vert);
1832
+ let categories = [];
1833
+ for (const element of tasksWithoutVert) {
1834
+ categories.push(element.type);
1835
+ }
1836
+ categories = checkUnique(categories);
1837
+ const categoryHeights = {};
1838
+ let h = 2 * conf.topPadding;
1839
+ if (diagObj.db.getDisplayMode() === "compact" || conf.displayMode === "compact") {
1840
+ const categoryElements = {};
1841
+ for (const element of tasksWithoutVert) {
1842
+ if (categoryElements[element.section] === undefined) {
1843
+ categoryElements[element.section] = [element];
1844
+ } else {
1845
+ categoryElements[element.section].push(element);
1846
+ }
1847
+ }
1848
+ let intersections = 0;
1849
+ for (const category of Object.keys(categoryElements)) {
1850
+ const categoryHeight = getMaxIntersections(categoryElements[category], intersections) + 1;
1851
+ intersections += categoryHeight;
1852
+ h += categoryHeight * (conf.barHeight + conf.barGap);
1853
+ categoryHeights[category] = categoryHeight;
1854
+ }
1855
+ } else {
1856
+ h += tasksWithoutVert.length * (conf.barHeight + conf.barGap);
1857
+ for (const category of categories) {
1858
+ categoryHeights[category] = tasksWithoutVert.filter((task) => task.type === category).length;
1859
+ }
1860
+ }
1861
+ elem.setAttribute("viewBox", "0 0 " + w + " " + h);
1862
+ const svg = root.select(`[id="${id}"]`);
1863
+ const timeScale = time().domain([
1864
+ min(taskArray, function(d) {
1865
+ return d.startTime;
1866
+ }),
1867
+ max(taskArray, function(d) {
1868
+ return d.endTime;
1869
+ })
1870
+ ]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]);
1871
+ function taskCompare(a, b) {
1872
+ const taskA = a.startTime;
1873
+ const taskB = b.startTime;
1874
+ let result = 0;
1875
+ if (taskA > taskB) {
1876
+ result = 1;
1877
+ } else if (taskA < taskB) {
1878
+ result = -1;
1879
+ }
1880
+ return result;
1881
+ }
1882
+ __name(taskCompare, "taskCompare");
1883
+ taskArray.sort(taskCompare);
1884
+ makeGantt(taskArray, w, h);
1885
+ configureSvgSize(svg, h, w, conf.useMaxWidth);
1886
+ svg.append("text").text(diagObj.db.getDiagramTitle()).attr("x", w / 2).attr("y", conf.titleTopMargin).attr("class", "titleText");
1887
+ function makeGantt(tasks2, pageWidth, pageHeight) {
1888
+ const barHeight = conf.barHeight;
1889
+ const gap = barHeight + conf.barGap;
1890
+ const topPadding = conf.topPadding;
1891
+ const leftPadding = conf.leftPadding;
1892
+ const colorScale = linear().domain([0, categories.length]).range(["#00B9FA", "#F95002"]).interpolate(hcl_default);
1893
+ drawExcludeDays(gap, topPadding, leftPadding, pageWidth, pageHeight, tasks2, diagObj.db.getExcludes(), diagObj.db.getIncludes());
1894
+ makeGrid(leftPadding, topPadding, pageWidth, pageHeight);
1895
+ drawRects(tasks2, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth, pageHeight);
1896
+ vertLabels(gap, topPadding, leftPadding, barHeight, colorScale);
1897
+ drawToday(leftPadding, topPadding, pageWidth, pageHeight);
1898
+ }
1899
+ __name(makeGantt, "makeGantt");
1900
+ function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w2) {
1901
+ theArray.sort((a, b) => a.vert === b.vert ? 0 : a.vert ? 1 : -1);
1902
+ const tasksWithoutVert2 = theArray.filter((task) => !task.vert);
1903
+ const uniqueTaskOrderIds = [...new Set(tasksWithoutVert2.map((item) => item.order))];
1904
+ const uniqueTasks = uniqueTaskOrderIds.map((id2) => tasksWithoutVert2.find((item) => item.order === id2));
1905
+ svg.append("g").selectAll("rect").data(uniqueTasks).enter().append("rect").attr("x", 0).attr("y", function(d, i) {
1906
+ i = d.order;
1907
+ return i * theGap + theTopPad - 2;
1908
+ }).attr("width", function() {
1909
+ return w2 - conf.rightPadding / 2;
1910
+ }).attr("height", theGap).attr("class", function(d) {
1911
+ for (const [i, category] of categories.entries()) {
1912
+ if (d.type === category) {
1913
+ return "section section" + i % conf.numberSectionStyles;
1914
+ }
1915
+ }
1916
+ return "section section0";
1917
+ }).enter();
1918
+ const rectangles = svg.append("g").selectAll("rect").data(theArray).enter();
1919
+ const links2 = diagObj.db.getLinks();
1920
+ rectangles.append("rect").attr("id", function(d) {
1921
+ return id + "-" + d.id;
1922
+ }).attr("rx", 3).attr("ry", 3).attr("x", function(d) {
1923
+ if (d.milestone) {
1924
+ return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
1925
+ }
1926
+ return timeScale(d.startTime) + theSidePad;
1927
+ }).attr("y", function(d, i) {
1928
+ i = d.order;
1929
+ if (d.vert) {
1930
+ return conf.gridLineStartPadding;
1931
+ }
1932
+ return i * theGap + theTopPad;
1933
+ }).attr("width", function(d) {
1934
+ if (d.milestone) {
1935
+ return theBarHeight;
1936
+ }
1937
+ if (d.vert) {
1938
+ return 0.08 * theBarHeight;
1939
+ }
1940
+ return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);
1941
+ }).attr("height", function(d) {
1942
+ if (d.vert) {
1943
+ return tasksWithoutVert2.length * (conf.barHeight + conf.barGap) + conf.barHeight * 2;
1944
+ }
1945
+ return theBarHeight;
1946
+ }).attr("transform-origin", function(d, i) {
1947
+ i = d.order;
1948
+ return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + "px " + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + "px";
1949
+ }).attr("class", function(d) {
1950
+ const res = "task";
1951
+ let classStr = "";
1952
+ if (d.classes.length > 0) {
1953
+ classStr = d.classes.join(" ");
1954
+ }
1955
+ let secNum = 0;
1956
+ for (const [i, category] of categories.entries()) {
1957
+ if (d.type === category) {
1958
+ secNum = i % conf.numberSectionStyles;
1959
+ }
1960
+ }
1961
+ let taskClass = "";
1962
+ if (d.active) {
1963
+ if (d.crit) {
1964
+ taskClass += " activeCrit";
1965
+ } else {
1966
+ taskClass = " active";
1967
+ }
1968
+ } else if (d.done) {
1969
+ if (d.crit) {
1970
+ taskClass = " doneCrit";
1971
+ } else {
1972
+ taskClass = " done";
1973
+ }
1974
+ } else {
1975
+ if (d.crit) {
1976
+ taskClass += " crit";
1977
+ }
1978
+ }
1979
+ if (taskClass.length === 0) {
1980
+ taskClass = " task";
1981
+ }
1982
+ if (d.milestone) {
1983
+ taskClass = " milestone " + taskClass;
1984
+ }
1985
+ if (d.vert) {
1986
+ taskClass = " vert " + taskClass;
1987
+ }
1988
+ taskClass += secNum;
1989
+ taskClass += " " + classStr;
1990
+ return res + taskClass;
1991
+ });
1992
+ rectangles.append("text").attr("id", function(d) {
1993
+ return id + "-" + d.id + "-text";
1994
+ }).text(function(d) {
1995
+ return d.task;
1996
+ }).attr("font-size", conf.fontSize).attr("x", function(d) {
1997
+ let startX = timeScale(d.startTime);
1998
+ let endX = timeScale(d.renderEndTime || d.endTime);
1999
+ if (d.milestone) {
2000
+ startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
2001
+ endX = startX + theBarHeight;
2002
+ }
2003
+ if (d.vert) {
2004
+ return timeScale(d.startTime) + theSidePad;
2005
+ }
2006
+ const textWidth = this.getBBox().width;
2007
+ if (textWidth > endX - startX) {
2008
+ if (endX + textWidth + 1.5 * conf.leftPadding > w2) {
2009
+ return startX + theSidePad - 5;
2010
+ } else {
2011
+ return endX + theSidePad + 5;
2012
+ }
2013
+ } else {
2014
+ return (endX - startX) / 2 + startX + theSidePad;
2015
+ }
2016
+ }).attr("y", function(d, i) {
2017
+ if (d.vert) {
2018
+ return conf.gridLineStartPadding + tasksWithoutVert2.length * (conf.barHeight + conf.barGap) + 60;
2019
+ }
2020
+ i = d.order;
2021
+ return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;
2022
+ }).attr("text-height", theBarHeight).attr("class", function(d) {
2023
+ const startX = timeScale(d.startTime);
2024
+ let endX = timeScale(d.endTime);
2025
+ if (d.milestone) {
2026
+ endX = startX + theBarHeight;
2027
+ }
2028
+ const textWidth = this.getBBox().width;
2029
+ let classStr = "";
2030
+ if (d.classes.length > 0) {
2031
+ classStr = d.classes.join(" ");
2032
+ }
2033
+ let secNum = 0;
2034
+ for (const [i, category] of categories.entries()) {
2035
+ if (d.type === category) {
2036
+ secNum = i % conf.numberSectionStyles;
2037
+ }
2038
+ }
2039
+ let taskType = "";
2040
+ if (d.active) {
2041
+ if (d.crit) {
2042
+ taskType = "activeCritText" + secNum;
2043
+ } else {
2044
+ taskType = "activeText" + secNum;
2045
+ }
2046
+ }
2047
+ if (d.done) {
2048
+ if (d.crit) {
2049
+ taskType = taskType + " doneCritText" + secNum;
2050
+ } else {
2051
+ taskType = taskType + " doneText" + secNum;
2052
+ }
2053
+ } else {
2054
+ if (d.crit) {
2055
+ taskType = taskType + " critText" + secNum;
2056
+ }
2057
+ }
2058
+ if (d.milestone) {
2059
+ taskType += " milestoneText";
2060
+ }
2061
+ if (d.vert) {
2062
+ taskType += " vertText";
2063
+ }
2064
+ if (textWidth > endX - startX) {
2065
+ if (endX + textWidth + 1.5 * conf.leftPadding > w2) {
2066
+ return classStr + " taskTextOutsideLeft taskTextOutside" + secNum + " " + taskType;
2067
+ } else {
2068
+ return classStr + " taskTextOutsideRight taskTextOutside" + secNum + " " + taskType + " width-" + textWidth;
2069
+ }
2070
+ } else {
2071
+ return classStr + " taskText taskText" + secNum + " " + taskType + " width-" + textWidth;
2072
+ }
2073
+ });
2074
+ const securityLevel2 = getConfig2().securityLevel;
2075
+ if (securityLevel2 === "sandbox") {
2076
+ let sandboxElement2;
2077
+ sandboxElement2 = select_default("#i" + id);
2078
+ const doc2 = sandboxElement2.nodes()[0].contentDocument;
2079
+ rectangles.filter(function(d) {
2080
+ return links2.has(d.id);
2081
+ }).each(function(o) {
2082
+ var taskRect = doc2.querySelector("#" + CSS.escape(id + "-" + o.id));
2083
+ var taskText = doc2.querySelector("#" + CSS.escape(id + "-" + o.id + "-text"));
2084
+ const oldParent = taskRect.parentNode;
2085
+ var Link = doc2.createElement("a");
2086
+ Link.setAttribute("xlink:href", links2.get(o.id));
2087
+ Link.setAttribute("target", "_top");
2088
+ oldParent.appendChild(Link);
2089
+ Link.appendChild(taskRect);
2090
+ Link.appendChild(taskText);
2091
+ });
2092
+ }
2093
+ }
2094
+ __name(drawRects, "drawRects");
2095
+ function drawExcludeDays(theGap, theTopPad, theSidePad, w2, h2, tasks2, excludes2, includes2) {
2096
+ if (excludes2.length === 0 && includes2.length === 0) {
2097
+ return;
2098
+ }
2099
+ let minTime;
2100
+ let maxTime;
2101
+ for (const { startTime, endTime } of tasks2) {
2102
+ if (minTime === undefined || startTime < minTime) {
2103
+ minTime = startTime;
2104
+ }
2105
+ if (maxTime === undefined || endTime > maxTime) {
2106
+ maxTime = endTime;
2107
+ }
2108
+ }
2109
+ if (!minTime || !maxTime) {
2110
+ return;
2111
+ }
2112
+ if (import_dayjs2.default(maxTime).diff(import_dayjs2.default(minTime), "year") > 5) {
2113
+ log.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");
2114
+ return;
2115
+ }
2116
+ const dateFormat2 = diagObj.db.getDateFormat();
2117
+ const excludeRanges = [];
2118
+ let range = null;
2119
+ let d = import_dayjs2.default(minTime);
2120
+ while (d.valueOf() <= maxTime) {
2121
+ if (diagObj.db.isInvalidDate(d, dateFormat2, excludes2, includes2)) {
2122
+ if (!range) {
2123
+ range = {
2124
+ start: d,
2125
+ end: d
2126
+ };
2127
+ } else {
2128
+ range.end = d;
2129
+ }
2130
+ } else {
2131
+ if (range) {
2132
+ excludeRanges.push(range);
2133
+ range = null;
2134
+ }
2135
+ }
2136
+ d = d.add(1, "d");
2137
+ }
2138
+ const rectangles = svg.append("g").selectAll("rect").data(excludeRanges).enter();
2139
+ rectangles.append("rect").attr("id", (d2) => id + "-exclude-" + d2.start.format("YYYY-MM-DD")).attr("x", (d2) => timeScale(d2.start.startOf("day")) + theSidePad).attr("y", conf.gridLineStartPadding).attr("width", (d2) => timeScale(d2.end.endOf("day")) - timeScale(d2.start.startOf("day"))).attr("height", h2 - theTopPad - conf.gridLineStartPadding).attr("transform-origin", function(d2, i) {
2140
+ return (timeScale(d2.start) + theSidePad + 0.5 * (timeScale(d2.end) - timeScale(d2.start))).toString() + "px " + (i * theGap + 0.5 * h2).toString() + "px";
2141
+ }).attr("class", "exclude-range");
2142
+ }
2143
+ __name(drawExcludeDays, "drawExcludeDays");
2144
+ function getEstimatedTickCount(minTime, maxTime, every, interval) {
2145
+ if (every <= 0 || minTime > maxTime) {
2146
+ return Infinity;
2147
+ }
2148
+ const timeDiffMs = maxTime - minTime;
2149
+ const intervalMs = import_dayjs2.default.duration({ [interval ?? "day"]: every }).asMilliseconds();
2150
+ if (intervalMs <= 0) {
2151
+ return Infinity;
2152
+ }
2153
+ return Math.ceil(timeDiffMs / intervalMs);
2154
+ }
2155
+ __name(getEstimatedTickCount, "getEstimatedTickCount");
2156
+ function makeGrid(theSidePad, theTopPad, w2, h2) {
2157
+ const dateFormat2 = diagObj.db.getDateFormat();
2158
+ const userAxisFormat = diagObj.db.getAxisFormat();
2159
+ let axisFormat2;
2160
+ if (userAxisFormat) {
2161
+ axisFormat2 = userAxisFormat;
2162
+ } else if (dateFormat2 === "D") {
2163
+ axisFormat2 = "%d";
2164
+ } else {
2165
+ axisFormat2 = conf.axisFormat ?? "%Y-%m-%d";
2166
+ }
2167
+ let bottomXAxis = axisBottom(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat(timeFormat(axisFormat2));
2168
+ const reTickInterval = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/;
2169
+ const resultTickInterval = reTickInterval.exec(diagObj.db.getTickInterval() || conf.tickInterval);
2170
+ if (resultTickInterval !== null) {
2171
+ const every = parseInt(resultTickInterval[1], 10);
2172
+ if (isNaN(every) || every <= 0) {
2173
+ log.warn(`Invalid tick interval value: "${resultTickInterval[1]}". Skipping custom tick interval.`);
2174
+ } else {
2175
+ const interval = resultTickInterval[2];
2176
+ const weekday2 = diagObj.db.getWeekday() || conf.weekday;
2177
+ const domain = timeScale.domain();
2178
+ const minTime = domain[0];
2179
+ const maxTime = domain[1];
2180
+ const estimatedTicks = getEstimatedTickCount(minTime, maxTime, every, interval);
2181
+ if (estimatedTicks > MAX_TICK_COUNT) {
2182
+ log.warn(`The tick interval "${every}${interval}" would generate ${estimatedTicks} ticks, which exceeds the maximum allowed (${MAX_TICK_COUNT}). This may indicate an invalid date or time range. Skipping custom tick interval.`);
2183
+ } else {
2184
+ switch (interval) {
2185
+ case "millisecond":
2186
+ bottomXAxis.ticks(millisecond.every(every));
2187
+ break;
2188
+ case "second":
2189
+ bottomXAxis.ticks(second.every(every));
2190
+ break;
2191
+ case "minute":
2192
+ bottomXAxis.ticks(timeMinute.every(every));
2193
+ break;
2194
+ case "hour":
2195
+ bottomXAxis.ticks(timeHour.every(every));
2196
+ break;
2197
+ case "day":
2198
+ bottomXAxis.ticks(timeDay.every(every));
2199
+ break;
2200
+ case "week":
2201
+ bottomXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every));
2202
+ break;
2203
+ case "month":
2204
+ bottomXAxis.ticks(timeMonth.every(every));
2205
+ break;
2206
+ }
2207
+ }
2208
+ }
2209
+ }
2210
+ svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + (h2 - 50) + ")").call(bottomXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em");
2211
+ if (diagObj.db.topAxisEnabled() || conf.topAxis) {
2212
+ let topXAxis = axisTop(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat(timeFormat(axisFormat2));
2213
+ if (resultTickInterval !== null) {
2214
+ const every = parseInt(resultTickInterval[1], 10);
2215
+ if (isNaN(every) || every <= 0) {
2216
+ log.warn(`Invalid tick interval value: "${resultTickInterval[1]}". Skipping custom tick interval.`);
2217
+ } else {
2218
+ const interval = resultTickInterval[2];
2219
+ const weekday2 = diagObj.db.getWeekday() || conf.weekday;
2220
+ const domain = timeScale.domain();
2221
+ const minTime = domain[0];
2222
+ const maxTime = domain[1];
2223
+ const estimatedTicks = getEstimatedTickCount(minTime, maxTime, every, interval);
2224
+ if (estimatedTicks <= MAX_TICK_COUNT) {
2225
+ switch (interval) {
2226
+ case "millisecond":
2227
+ topXAxis.ticks(millisecond.every(every));
2228
+ break;
2229
+ case "second":
2230
+ topXAxis.ticks(second.every(every));
2231
+ break;
2232
+ case "minute":
2233
+ topXAxis.ticks(timeMinute.every(every));
2234
+ break;
2235
+ case "hour":
2236
+ topXAxis.ticks(timeHour.every(every));
2237
+ break;
2238
+ case "day":
2239
+ topXAxis.ticks(timeDay.every(every));
2240
+ break;
2241
+ case "week":
2242
+ topXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every));
2243
+ break;
2244
+ case "month":
2245
+ topXAxis.ticks(timeMonth.every(every));
2246
+ break;
2247
+ }
2248
+ }
2249
+ }
2250
+ }
2251
+ svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + theTopPad + ")").call(topXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
2252
+ }
2253
+ }
2254
+ __name(makeGrid, "makeGrid");
2255
+ function vertLabels(theGap, theTopPad) {
2256
+ let prevGap = 0;
2257
+ const numOccurrences = Object.keys(categoryHeights).map((d) => [d, categoryHeights[d]]);
2258
+ svg.append("g").selectAll("text").data(numOccurrences).enter().append(function(d) {
2259
+ const rows = d[0].split(common_default.lineBreakRegex);
2260
+ const dy = -(rows.length - 1) / 2;
2261
+ const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text");
2262
+ svgLabel.setAttribute("dy", dy + "em");
2263
+ for (const [j, row] of rows.entries()) {
2264
+ const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan");
2265
+ tspan.setAttribute("alignment-baseline", "central");
2266
+ tspan.setAttribute("x", "10");
2267
+ if (j > 0) {
2268
+ tspan.setAttribute("dy", "1em");
2269
+ }
2270
+ tspan.textContent = row;
2271
+ svgLabel.appendChild(tspan);
2272
+ }
2273
+ return svgLabel;
2274
+ }).attr("x", 10).attr("y", function(d, i) {
2275
+ if (i > 0) {
2276
+ for (let j = 0;j < i; j++) {
2277
+ prevGap += numOccurrences[i - 1][1];
2278
+ return d[1] * theGap / 2 + prevGap * theGap + theTopPad;
2279
+ }
2280
+ } else {
2281
+ return d[1] * theGap / 2 + theTopPad;
2282
+ }
2283
+ }).attr("font-size", conf.sectionFontSize).attr("class", function(d) {
2284
+ for (const [i, category] of categories.entries()) {
2285
+ if (d[0] === category) {
2286
+ return "sectionTitle sectionTitle" + i % conf.numberSectionStyles;
2287
+ }
2288
+ }
2289
+ return "sectionTitle";
2290
+ });
2291
+ }
2292
+ __name(vertLabels, "vertLabels");
2293
+ function drawToday(theSidePad, theTopPad, w2, h2) {
2294
+ const todayMarker2 = diagObj.db.getTodayMarker();
2295
+ if (todayMarker2 === "off") {
2296
+ return;
2297
+ }
2298
+ const todayG = svg.append("g").attr("class", "today");
2299
+ const today = /* @__PURE__ */ new Date;
2300
+ const todayLine = todayG.append("line");
2301
+ todayLine.attr("x1", timeScale(today) + theSidePad).attr("x2", timeScale(today) + theSidePad).attr("y1", conf.titleTopMargin).attr("y2", h2 - conf.titleTopMargin).attr("class", "today");
2302
+ if (todayMarker2 !== "") {
2303
+ todayLine.attr("style", todayMarker2.replace(/,/g, ";"));
2304
+ }
2305
+ }
2306
+ __name(drawToday, "drawToday");
2307
+ function checkUnique(arr) {
2308
+ const hash = {};
2309
+ const result = [];
2310
+ for (let i = 0, l = arr.length;i < l; ++i) {
2311
+ if (!Object.prototype.hasOwnProperty.call(hash, arr[i])) {
2312
+ hash[arr[i]] = true;
2313
+ result.push(arr[i]);
2314
+ }
2315
+ }
2316
+ return result;
2317
+ }
2318
+ __name(checkUnique, "checkUnique");
2319
+ }, "draw");
2320
+ var ganttRenderer_default = {
2321
+ setConf,
2322
+ draw
2323
+ };
2324
+ var getStyles = /* @__PURE__ */ __name((options) => `
2325
+ .mermaid-main-font {
2326
+ font-family: ${options.fontFamily};
2327
+ }
2328
+
2329
+ .exclude-range {
2330
+ fill: ${options.excludeBkgColor};
2331
+ }
2332
+
2333
+ .section {
2334
+ stroke: none;
2335
+ opacity: 0.2;
2336
+ }
2337
+
2338
+ .section0 {
2339
+ fill: ${options.sectionBkgColor};
2340
+ }
2341
+
2342
+ .section2 {
2343
+ fill: ${options.sectionBkgColor2};
2344
+ }
2345
+
2346
+ .section1,
2347
+ .section3 {
2348
+ fill: ${options.altSectionBkgColor};
2349
+ opacity: 0.2;
2350
+ }
2351
+
2352
+ .sectionTitle0 {
2353
+ fill: ${options.titleColor};
2354
+ }
2355
+
2356
+ .sectionTitle1 {
2357
+ fill: ${options.titleColor};
2358
+ }
2359
+
2360
+ .sectionTitle2 {
2361
+ fill: ${options.titleColor};
2362
+ }
2363
+
2364
+ .sectionTitle3 {
2365
+ fill: ${options.titleColor};
2366
+ }
2367
+
2368
+ .sectionTitle {
2369
+ text-anchor: start;
2370
+ font-family: ${options.fontFamily};
2371
+ }
2372
+
2373
+
2374
+ /* Grid and axis */
2375
+
2376
+ .grid .tick {
2377
+ stroke: ${options.gridColor};
2378
+ opacity: 0.8;
2379
+ shape-rendering: crispEdges;
2380
+ }
2381
+
2382
+ .grid .tick text {
2383
+ font-family: ${options.fontFamily};
2384
+ fill: ${options.textColor};
2385
+ }
2386
+
2387
+ .grid path {
2388
+ stroke-width: 0;
2389
+ }
2390
+
2391
+
2392
+ /* Today line */
2393
+
2394
+ .today {
2395
+ fill: none;
2396
+ stroke: ${options.todayLineColor};
2397
+ stroke-width: 2px;
2398
+ }
2399
+
2400
+
2401
+ /* Task styling */
2402
+
2403
+ /* Default task */
2404
+
2405
+ .task {
2406
+ stroke-width: 2;
2407
+ }
2408
+
2409
+ .taskText {
2410
+ text-anchor: middle;
2411
+ font-family: ${options.fontFamily};
2412
+ }
2413
+
2414
+ .taskTextOutsideRight {
2415
+ fill: ${options.taskTextDarkColor};
2416
+ text-anchor: start;
2417
+ font-family: ${options.fontFamily};
2418
+ }
2419
+
2420
+ .taskTextOutsideLeft {
2421
+ fill: ${options.taskTextDarkColor};
2422
+ text-anchor: end;
2423
+ }
2424
+
2425
+
2426
+ /* Special case clickable */
2427
+
2428
+ .task.clickable {
2429
+ cursor: pointer;
2430
+ }
2431
+
2432
+ .taskText.clickable {
2433
+ cursor: pointer;
2434
+ fill: ${options.taskTextClickableColor} !important;
2435
+ font-weight: bold;
2436
+ }
2437
+
2438
+ .taskTextOutsideLeft.clickable {
2439
+ cursor: pointer;
2440
+ fill: ${options.taskTextClickableColor} !important;
2441
+ font-weight: bold;
2442
+ }
2443
+
2444
+ .taskTextOutsideRight.clickable {
2445
+ cursor: pointer;
2446
+ fill: ${options.taskTextClickableColor} !important;
2447
+ font-weight: bold;
2448
+ }
2449
+
2450
+
2451
+ /* Specific task settings for the sections*/
2452
+
2453
+ .taskText0,
2454
+ .taskText1,
2455
+ .taskText2,
2456
+ .taskText3 {
2457
+ fill: ${options.taskTextColor};
2458
+ }
2459
+
2460
+ .task0,
2461
+ .task1,
2462
+ .task2,
2463
+ .task3 {
2464
+ fill: ${options.taskBkgColor};
2465
+ stroke: ${options.taskBorderColor};
2466
+ }
2467
+
2468
+ .taskTextOutside0,
2469
+ .taskTextOutside2
2470
+ {
2471
+ fill: ${options.taskTextOutsideColor};
2472
+ }
2473
+
2474
+ .taskTextOutside1,
2475
+ .taskTextOutside3 {
2476
+ fill: ${options.taskTextOutsideColor};
2477
+ }
2478
+
2479
+
2480
+ /* Active task */
2481
+
2482
+ .active0,
2483
+ .active1,
2484
+ .active2,
2485
+ .active3 {
2486
+ fill: ${options.activeTaskBkgColor};
2487
+ stroke: ${options.activeTaskBorderColor};
2488
+ }
2489
+
2490
+ .activeText0,
2491
+ .activeText1,
2492
+ .activeText2,
2493
+ .activeText3 {
2494
+ fill: ${options.taskTextDarkColor} !important;
2495
+ }
2496
+
2497
+
2498
+ /* Completed task */
2499
+
2500
+ .done0,
2501
+ .done1,
2502
+ .done2,
2503
+ .done3 {
2504
+ stroke: ${options.doneTaskBorderColor};
2505
+ fill: ${options.doneTaskBkgColor};
2506
+ stroke-width: 2;
2507
+ }
2508
+
2509
+ .doneText0,
2510
+ .doneText1,
2511
+ .doneText2,
2512
+ .doneText3 {
2513
+ fill: ${options.taskTextDarkColor} !important;
2514
+ }
2515
+
2516
+ /* Done task text displayed outside the bar sits against the diagram background,
2517
+ not against the done-task bar, so it must use the outside/contrast color. */
2518
+ .doneText0.taskTextOutsideLeft,
2519
+ .doneText0.taskTextOutsideRight,
2520
+ .doneText1.taskTextOutsideLeft,
2521
+ .doneText1.taskTextOutsideRight,
2522
+ .doneText2.taskTextOutsideLeft,
2523
+ .doneText2.taskTextOutsideRight,
2524
+ .doneText3.taskTextOutsideLeft,
2525
+ .doneText3.taskTextOutsideRight {
2526
+ fill: ${options.taskTextOutsideColor} !important;
2527
+ }
2528
+
2529
+
2530
+ /* Tasks on the critical line */
2531
+
2532
+ .crit0,
2533
+ .crit1,
2534
+ .crit2,
2535
+ .crit3 {
2536
+ stroke: ${options.critBorderColor};
2537
+ fill: ${options.critBkgColor};
2538
+ stroke-width: 2;
2539
+ }
2540
+
2541
+ .activeCrit0,
2542
+ .activeCrit1,
2543
+ .activeCrit2,
2544
+ .activeCrit3 {
2545
+ stroke: ${options.critBorderColor};
2546
+ fill: ${options.activeTaskBkgColor};
2547
+ stroke-width: 2;
2548
+ }
2549
+
2550
+ .doneCrit0,
2551
+ .doneCrit1,
2552
+ .doneCrit2,
2553
+ .doneCrit3 {
2554
+ stroke: ${options.critBorderColor};
2555
+ fill: ${options.doneTaskBkgColor};
2556
+ stroke-width: 2;
2557
+ cursor: pointer;
2558
+ shape-rendering: crispEdges;
2559
+ }
2560
+
2561
+ .milestone {
2562
+ transform: rotate(45deg) scale(0.8,0.8);
2563
+ }
2564
+
2565
+ .milestoneText {
2566
+ font-style: italic;
2567
+ }
2568
+ .doneCritText0,
2569
+ .doneCritText1,
2570
+ .doneCritText2,
2571
+ .doneCritText3 {
2572
+ fill: ${options.taskTextDarkColor} !important;
2573
+ }
2574
+
2575
+ /* Done-crit task text outside the bar — same reasoning as doneText above. */
2576
+ .doneCritText0.taskTextOutsideLeft,
2577
+ .doneCritText0.taskTextOutsideRight,
2578
+ .doneCritText1.taskTextOutsideLeft,
2579
+ .doneCritText1.taskTextOutsideRight,
2580
+ .doneCritText2.taskTextOutsideLeft,
2581
+ .doneCritText2.taskTextOutsideRight,
2582
+ .doneCritText3.taskTextOutsideLeft,
2583
+ .doneCritText3.taskTextOutsideRight {
2584
+ fill: ${options.taskTextOutsideColor} !important;
2585
+ }
2586
+
2587
+ .vert {
2588
+ stroke: ${options.vertLineColor};
2589
+ }
2590
+
2591
+ .vertText {
2592
+ font-size: 15px;
2593
+ text-anchor: middle;
2594
+ fill: ${options.vertLineColor} !important;
2595
+ }
2596
+
2597
+ .activeCritText0,
2598
+ .activeCritText1,
2599
+ .activeCritText2,
2600
+ .activeCritText3 {
2601
+ fill: ${options.taskTextDarkColor} !important;
2602
+ }
2603
+
2604
+ .titleText {
2605
+ text-anchor: middle;
2606
+ font-size: 18px;
2607
+ fill: ${options.titleColor || options.textColor};
2608
+ font-family: ${options.fontFamily};
2609
+ }
2610
+ `, "getStyles");
2611
+ var styles_default = getStyles;
2612
+ var diagram = {
2613
+ parser: gantt_default,
2614
+ db: ganttDb_default,
2615
+ renderer: ganttRenderer_default,
2616
+ styles: styles_default
2617
+ };
2618
+ export {
2619
+ diagram
2620
+ };