jekyll-obsidian-site 0.2.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 (191) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +133 -0
  4. data/website/_config.yml +21 -0
  5. data/website/_includes/website/archive-timeline.html +8 -0
  6. data/website/_includes/website/blog-ledger.html +19 -0
  7. data/website/_includes/website/blog-navigation.html +7 -0
  8. data/website/_includes/website/comments.html +22 -0
  9. data/website/_includes/website/contact-icon.html +14 -0
  10. data/website/_includes/website/context-tags.html +7 -0
  11. data/website/_includes/website/context.html +3 -0
  12. data/website/_includes/website/dialogs.html +71 -0
  13. data/website/_includes/website/docs-navigation.html +7 -0
  14. data/website/_includes/website/docs-tree.html +8 -0
  15. data/website/_includes/website/footer.html +14 -0
  16. data/website/_includes/website/github-icon.html +3 -0
  17. data/website/_includes/website/head.html +41 -0
  18. data/website/_includes/website/header.html +35 -0
  19. data/website/_includes/website/language-switcher.html +16 -0
  20. data/website/_includes/website/local-graph.html +25 -0
  21. data/website/_includes/website/note-header.html +35 -0
  22. data/website/_includes/website/outline.html +9 -0
  23. data/website/_includes/website/page-actions.html +34 -0
  24. data/website/_includes/website/portfolio-grid.html +36 -0
  25. data/website/_includes/website/portfolio-topics.html +4 -0
  26. data/website/_includes/website/post-cards.html +16 -0
  27. data/website/_includes/website/related-articles.html +7 -0
  28. data/website/_includes/website/relations.html +16 -0
  29. data/website/_includes/website/source-actions.html +28 -0
  30. data/website/_includes/website/system-page.html +31 -0
  31. data/website/_includes/website/tab-collection.html +28 -0
  32. data/website/_includes/website/tag-filter.html +12 -0
  33. data/website/_layouts/website-docs.html +20 -0
  34. data/website/_layouts/website-minimal.html +93 -0
  35. data/website/_layouts/website-redirect.html +17 -0
  36. data/website/assets/chunks/abnfDiagram-N423BO3Z-TSORAEI2.js +1 -0
  37. data/website/assets/chunks/architecture-TIHT7OUA-OUC5PEC7.js +1 -0
  38. data/website/assets/chunks/architectureDiagram-T3A2C74G-6P5MB2DJ.js +36 -0
  39. data/website/assets/chunks/blockDiagram-VBNYF7ZC-ZWINYROZ.js +132 -0
  40. data/website/assets/chunks/c4Diagram-5PPSVZJV-R5RMEAOT.js +10 -0
  41. data/website/assets/chunks/chunk-22DRK7VS.js +1 -0
  42. data/website/assets/chunks/chunk-25REBZ7M.js +2 -0
  43. data/website/assets/chunks/chunk-2RQCUDTG.js +1 -0
  44. data/website/assets/chunks/chunk-34FHPXU4.js +1 -0
  45. data/website/assets/chunks/chunk-57XXJOQN.js +10 -0
  46. data/website/assets/chunks/chunk-6DCNDVBX.js +2 -0
  47. data/website/assets/chunks/chunk-6DHFEWGX.js +1 -0
  48. data/website/assets/chunks/chunk-6VQ47JJS.js +2 -0
  49. data/website/assets/chunks/chunk-7CSIRG7W.js +127 -0
  50. data/website/assets/chunks/chunk-A43YELH5.js +1 -0
  51. data/website/assets/chunks/chunk-AIX6IH4O.js +1 -0
  52. data/website/assets/chunks/chunk-B3K7RH5O.js +88 -0
  53. data/website/assets/chunks/chunk-CBGUD2NP.js +1 -0
  54. data/website/assets/chunks/chunk-D3WOCELE.js +1 -0
  55. data/website/assets/chunks/chunk-D6FURU6X.js +1 -0
  56. data/website/assets/chunks/chunk-DGEGT77F.js +1 -0
  57. data/website/assets/chunks/chunk-DN52R6U7.js +1 -0
  58. data/website/assets/chunks/chunk-E3T3IFAC.js +1 -0
  59. data/website/assets/chunks/chunk-EIBFAW37.js +1 -0
  60. data/website/assets/chunks/chunk-ERWOH47R.js +1 -0
  61. data/website/assets/chunks/chunk-ETOVTYWF.js +1 -0
  62. data/website/assets/chunks/chunk-GHD3PFWA.js +231 -0
  63. data/website/assets/chunks/chunk-GMBKQ7NZ.js +1 -0
  64. data/website/assets/chunks/chunk-GQM25EPP.js +156 -0
  65. data/website/assets/chunks/chunk-GSOU4UTT.js +1 -0
  66. data/website/assets/chunks/chunk-HEMELP7J.js +1 -0
  67. data/website/assets/chunks/chunk-HZ5I5NJO.js +1 -0
  68. data/website/assets/chunks/chunk-IP56FOSI.js +70 -0
  69. data/website/assets/chunks/chunk-L7BMR7WL.js +1 -0
  70. data/website/assets/chunks/chunk-LGUG3SQB.js +1 -0
  71. data/website/assets/chunks/chunk-LOMHZYS2.js +1 -0
  72. data/website/assets/chunks/chunk-MII4VZEB.js +3 -0
  73. data/website/assets/chunks/chunk-MYMJLHQL.js +62 -0
  74. data/website/assets/chunks/chunk-NBH7YOBD.js +15 -0
  75. data/website/assets/chunks/chunk-NCOVM3YF.js +1 -0
  76. data/website/assets/chunks/chunk-OAGTSILX.js +1 -0
  77. data/website/assets/chunks/chunk-OCX5OCIU.js +321 -0
  78. data/website/assets/chunks/chunk-OE3NOVIH.js +1 -0
  79. data/website/assets/chunks/chunk-PLP5XUTJ.js +1 -0
  80. data/website/assets/chunks/chunk-PNOERP6G.js +1 -0
  81. data/website/assets/chunks/chunk-QBPQ7DPE.js +1 -0
  82. data/website/assets/chunks/chunk-RWFFDL53.js +1 -0
  83. data/website/assets/chunks/chunk-SEGIW3MP.js +1 -0
  84. data/website/assets/chunks/chunk-SZDMZNUS.js +1 -0
  85. data/website/assets/chunks/chunk-T2QBAPVT.js +1 -0
  86. data/website/assets/chunks/chunk-UE533OZ7.js +1 -0
  87. data/website/assets/chunks/chunk-UTWOJE2A.js +1 -0
  88. data/website/assets/chunks/chunk-VOCDYA3H.js +1 -0
  89. data/website/assets/chunks/chunk-VYZZPKGK.js +161 -0
  90. data/website/assets/chunks/chunk-WWLZIRS6.js +1 -0
  91. data/website/assets/chunks/chunk-XNXYDBKX.js +32 -0
  92. data/website/assets/chunks/chunk-XQUIO562.js +1 -0
  93. data/website/assets/chunks/chunk-Y2XVFW7T.js +2 -0
  94. data/website/assets/chunks/chunk-YORIST7Z.js +1 -0
  95. data/website/assets/chunks/chunk-Z2WBQPVY.js +206 -0
  96. data/website/assets/chunks/classDiagram-JCYQIIEL-OFDVDDIM.js +1 -0
  97. data/website/assets/chunks/classDiagram-v2-OCEON4UE-E36B6BGQ.js +1 -0
  98. data/website/assets/chunks/cose-bilkent-JH36ORCC-CBAW64AB.js +1 -0
  99. data/website/assets/chunks/cynefin-VYW2F7L2-CBO6DLNV.js +1 -0
  100. data/website/assets/chunks/cynefinDiagram-MW4NZA55-DFINLOUY.js +62 -0
  101. data/website/assets/chunks/dagre-VZM6K2ZE-BZFBSZAH.js +4 -0
  102. data/website/assets/chunks/diagram-7IWD3JNH-XQHTVOU2.js +30 -0
  103. data/website/assets/chunks/diagram-B4RE2ZJO-FTSXBZJR.js +3 -0
  104. data/website/assets/chunks/diagram-LBJQPF4R-ZSZW4OLH.js +24 -0
  105. data/website/assets/chunks/diagram-Q27KOJAE-2IV5TVCJ.js +24 -0
  106. data/website/assets/chunks/diagram-UB23O5K3-D6PDUTFL.js +41 -0
  107. data/website/assets/chunks/ebnfDiagram-BXEA7PRR-C6MAER3M.js +1 -0
  108. data/website/assets/chunks/erDiagram-JOGREHBK-EDAD2H5M.js +85 -0
  109. data/website/assets/chunks/eventmodeling-45OFAUF4-4K577DMF.js +1 -0
  110. data/website/assets/chunks/flowDiagram-UKHOOZJN-545F4YX3.js +1 -0
  111. data/website/assets/chunks/ganttDiagram-PKOTCBZU-7A7EKMY3.js +292 -0
  112. data/website/assets/chunks/gitGraph-TEB2WS4Q-3WUB7WYQ.js +1 -0
  113. data/website/assets/chunks/gitGraphDiagram-DS77QQ5N-A5UWV5FF.js +106 -0
  114. data/website/assets/chunks/info-DKCQHKI2-EOOHI7XS.js +1 -0
  115. data/website/assets/chunks/infoDiagram-6WML65LV-CWIOOWJP.js +2 -0
  116. data/website/assets/chunks/ishikawaDiagram-WSZJBQD7-CEASQVDL.js +70 -0
  117. data/website/assets/chunks/journeyDiagram-NVQOT4AX-LYG3S2AW.js +139 -0
  118. data/website/assets/chunks/kanban-definition-27J2QSJJ-HCC6KAYI.js +89 -0
  119. data/website/assets/chunks/katex-F4MQ6FB3.js +257 -0
  120. data/website/assets/chunks/mindmap-definition-FAOFIHXS-JMGSM3RE.js +96 -0
  121. data/website/assets/chunks/packet-7NZHBO7P-W3SJA3MY.js +1 -0
  122. data/website/assets/chunks/pegDiagram-VL7TDLO6-4JO3Y3Z3.js +1 -0
  123. data/website/assets/chunks/pie-RZYD4A2V-YOIQBTY7.js +1 -0
  124. data/website/assets/chunks/pieDiagram-7S7Q4E2Y-VFQ7SE46.js +39 -0
  125. data/website/assets/chunks/quadrantDiagram-CIZ2JOQS-JISDI2S6.js +7 -0
  126. data/website/assets/chunks/radar-I7S5WNFK-NMKP5AZO.js +1 -0
  127. data/website/assets/chunks/railroad-3IZDKUUU-7MOIV7CI.js +1 -0
  128. data/website/assets/chunks/railroad-abnf-AHOZXSZD-HXNH5SLO.js +1 -0
  129. data/website/assets/chunks/railroad-ebnf-EBAXGLYW-OWDJEWMK.js +1 -0
  130. data/website/assets/chunks/railroad-peg-LSFZ7HO6-ASSINGP5.js +1 -0
  131. data/website/assets/chunks/railroadDiagram-AXF67PYL-AFV5VP5F.js +1 -0
  132. data/website/assets/chunks/requirementDiagram-LRYGKXZP-RNRPEHHN.js +84 -0
  133. data/website/assets/chunks/sankeyDiagram-W5VNT64P-O54R2L3E.js +40 -0
  134. data/website/assets/chunks/sequenceDiagram-SI44F4Z6-42WISKJ7.js +162 -0
  135. data/website/assets/chunks/sizeCapture-X5ZJPWSS-LRN2Q37T.js +1 -0
  136. data/website/assets/chunks/stateDiagram-OKZ733FA-BWIBJXIR.js +1 -0
  137. data/website/assets/chunks/stateDiagram-v2-UEYNNEHI-L73LHL3L.js +1 -0
  138. data/website/assets/chunks/swimlanes-SLNWSIFB-ECOAE7LQ.js +1 -0
  139. data/website/assets/chunks/swimlanesDiagram-ULZ7WXOC-3CKKKFZZ.js +8 -0
  140. data/website/assets/chunks/timeline-definition-Z64GVDOM-HR2OL5G7.js +120 -0
  141. data/website/assets/chunks/treeView-QDETBFTQ-C6D5WFJA.js +1 -0
  142. data/website/assets/chunks/treemap-6X3UGDF4-JFCDMSCA.js +1 -0
  143. data/website/assets/chunks/vennDiagram-T6HMQDX7-62WAAPTF.js +34 -0
  144. data/website/assets/chunks/wardley-OPB4EBWU-RQIOII7I.js +1 -0
  145. data/website/assets/chunks/wardleyDiagram-T6FBY63Y-KUXO3NHV.js +78 -0
  146. data/website/assets/chunks/xychartDiagram-ELKLHX3M-I54W4HJ7.js +7 -0
  147. data/website/assets/color-scheme-bootstrap-4H4ZR4BW.js +1 -0
  148. data/website/assets/docs-3WBBQT6K.css +1 -0
  149. data/website/assets/docs-W3D5DWQF.js +1 -0
  150. data/website/assets/docs-navigation-75ALFYBA.js +1 -0
  151. data/website/assets/graph-QWL54LWD.js +1 -0
  152. data/website/assets/manifest.json +314 -0
  153. data/website/assets/math-7JTH4OWZ.js +21 -0
  154. data/website/assets/mermaid-RXC6URG4.js +10 -0
  155. data/website/assets/minimal-3NPTDWQX.js +1 -0
  156. data/website/assets/minimal-E2VATXXS.css +1 -0
  157. data/website/assets/previews-FMHOX7UX.js +1 -0
  158. data/website/assets/search-BH73JZDU.js +1 -0
  159. data/website/assets/search-worker-SM4IM4J7.js +1 -0
  160. data/website/exe/jekyll-obsidian +5 -0
  161. data/website/lib/jekyll_obsidian/adapter.rb +733 -0
  162. data/website/lib/jekyll_obsidian/built_in_themes.rb +855 -0
  163. data/website/lib/jekyll_obsidian/cli.rb +84 -0
  164. data/website/lib/jekyll_obsidian/content_policy.rb +194 -0
  165. data/website/lib/jekyll_obsidian/destination_registry.rb +39 -0
  166. data/website/lib/jekyll_obsidian/directory_indexes.rb +30 -0
  167. data/website/lib/jekyll_obsidian/external_media.rb +371 -0
  168. data/website/lib/jekyll_obsidian/front_matter.rb +453 -0
  169. data/website/lib/jekyll_obsidian/github_markdown.rb +664 -0
  170. data/website/lib/jekyll_obsidian/html_publication.rb +206 -0
  171. data/website/lib/jekyll_obsidian/initializer.rb +68 -0
  172. data/website/lib/jekyll_obsidian/localized_compiler.rb +1044 -0
  173. data/website/lib/jekyll_obsidian/media_policy.rb +41 -0
  174. data/website/lib/jekyll_obsidian/ofm_scanner.rb +493 -0
  175. data/website/lib/jekyll_obsidian/output_text.rb +13 -0
  176. data/website/lib/jekyll_obsidian/preview.rb +93 -0
  177. data/website/lib/jekyll_obsidian/published_markdown.rb +32 -0
  178. data/website/lib/jekyll_obsidian/raw_html_manifest.rb +66 -0
  179. data/website/lib/jekyll_obsidian/runtime.rb +197 -0
  180. data/website/lib/jekyll_obsidian/site_compilation.rb +147 -0
  181. data/website/lib/jekyll_obsidian/site_navigation.rb +517 -0
  182. data/website/lib/jekyll_obsidian/url_builder.rb +163 -0
  183. data/website/lib/jekyll_obsidian/value_objects.rb +198 -0
  184. data/website/lib/jekyll_obsidian/vault_compiler.rb +2771 -0
  185. data/website/lib/jekyll_obsidian/version.rb +6 -0
  186. data/website/lib/jekyll_obsidian/workspace_layout.rb +104 -0
  187. data/website/lib/jekyll_obsidian.rb +22 -0
  188. data/website/scripts/audit-site.rb +120 -0
  189. data/website/scripts/templates/pages.yml +55 -0
  190. data/website/scripts/verify-site-urls.rb +585 -0
  191. metadata +319 -0
@@ -0,0 +1,106 @@
1
+ import{a as fe}from"./chunk-L7BMR7WL.js";import{a as $e}from"./chunk-NCOVM3YF.js";import{a as pe}from"./chunk-MII4VZEB.js";import"./chunk-HEMELP7J.js";import"./chunk-AIX6IH4O.js";import"./chunk-HZ5I5NJO.js";import"./chunk-ETOVTYWF.js";import"./chunk-SEGIW3MP.js";import"./chunk-Y2XVFW7T.js";import"./chunk-25REBZ7M.js";import"./chunk-UTWOJE2A.js";import"./chunk-6VQ47JJS.js";import"./chunk-OE3NOVIH.js";import"./chunk-LOMHZYS2.js";import"./chunk-OAGTSILX.js";import"./chunk-DN52R6U7.js";import"./chunk-RWFFDL53.js";import"./chunk-A43YELH5.js";import"./chunk-VYZZPKGK.js";import{h as le,o as me,p as ge}from"./chunk-6DCNDVBX.js";import"./chunk-22DRK7VS.js";import{N as E,T as re,U as ae,V as oe,W as se,X as ne,Y as ce,Z as ie,_ as q,ca as de,k as te,u as F}from"./chunk-7CSIRG7W.js";import{b as w}from"./chunk-ERWOH47R.js";import{a as l}from"./chunk-EIBFAW37.js";import{e as he}from"./chunk-LGUG3SQB.js";import"./chunk-6DHFEWGX.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Ee=te.gitGraph,D=l(()=>me({...Ee,...F().gitGraph}),"getConfig"),d=new fe(()=>{let e=D(),t=e.mainBranchName,r=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:r}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});function j(){return le({length:7})}l(j,"getID");function xe(e,t){let r=Object.create(null);return e.reduce((s,n)=>{let i=t(n);return r[i]||(r[i]=!0,s.push(n)),s},[])}l(xe,"uniqBy");var Te=l(function(e){d.records.direction=e},"setDirection"),Le=l(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(t){w.error("error while parsing gitGraph options",t.message)}},"setOptions"),Me=l(function(){return d.records.options},"getOptions"),Pe=l(function(e){let t=e.msg,r=e.id,s=e.type,n=e.tags;w.info("commit",t,r,s,n),w.debug("Entering commit:",t,r,s,n);let i=D();r=E.sanitizeText(r,i),t=E.sanitizeText(t,i),n=n?.map(a=>E.sanitizeText(a,i));let o={id:r||d.records.seq+"-"+j(),message:t,seq:d.records.seq++,type:s??x.NORMAL,tags:n??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=o,w.info("main branch",i.mainBranchName),d.records.commits.has(o.id)&&w.warn(`Commit ID ${o.id} already exists`),d.records.commits.set(o.id,o),d.records.branches.set(d.records.currBranch,o.id),w.debug("in pushCommit "+o.id)},"commit"),Re=l(function(e){let t=e.name,r=e.order;if(t=E.sanitizeText(t,D()),d.records.branches.has(t))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);d.records.branches.set(t,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(t,{name:t,order:r}),ue(t),w.debug("in createBranch")},"branch"),Oe=l(e=>{let t=e.branch,r=e.id,s=e.type,n=e.tags,i=D();t=E.sanitizeText(t,i),r&&(r=E.sanitizeText(r,i));let o=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(t),h=o?d.records.commits.get(o):void 0,g=a?d.records.commits.get(a):void 0;if(h&&g&&h.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(d.records.currBranch===t){let c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},c}if(h===void 0||!h){let c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},c}if(!d.records.branches.has(t)){let c=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw c.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},c}if(g===void 0||!g){let c=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw c.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},c}if(h===g){let c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},c}if(r&&d.records.commits.has(r)){let c=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw c.hash={text:`merge ${t} ${r} ${s} ${n?.join(" ")}`,token:`merge ${t} ${r} ${s} ${n?.join(" ")}`,expected:[`merge ${t} ${r}_UNIQUE ${s} ${n?.join(" ")}`]},c}let f=a||"",m={id:r||`${d.records.seq}-${j()}`,message:`merged branch ${t} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,f],branch:d.records.currBranch,type:x.MERGE,customType:s,customId:!!r,tags:n??[]};d.records.head=m,d.records.commits.set(m.id,m),d.records.branches.set(d.records.currBranch,m.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),Ie=l(function(e){let t=e.id,r=e.targetId,s=e.tags,n=e.parent;w.debug("Entering cherryPick:",t,r,s);let i=D();if(t=E.sanitizeText(t,i),r=E.sanitizeText(r,i),s=s?.map(h=>E.sanitizeText(h,i)),n=E.sanitizeText(n,i),!t||!d.records.commits.has(t)){let h=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw h.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},h}let o=d.records.commits.get(t);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&!(Array.isArray(o.parents)&&o.parents.includes(n)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let a=o.branch;if(o.type===x.MERGE&&!n)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!d.records.commits.has(r)){if(a===d.records.currBranch){let m=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw m.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},m}let h=d.records.branches.get(d.records.currBranch);if(h===void 0||!h){let m=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw m.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},m}let g=d.records.commits.get(h);if(g===void 0||!g){let m=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw m.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},m}let f={id:d.records.seq+"-"+j(),message:`cherry-picked ${o?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,o.id],branch:d.records.currBranch,type:x.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${o.id}${o.type===x.MERGE?`|parent:${n}`:""}`]};d.records.head=f,d.records.commits.set(f.id,f),d.records.branches.set(d.records.currBranch,f.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ue=l(function(e){if(e=E.sanitizeText(e,D()),d.records.branches.has(e)){d.records.currBranch=e;let t=d.records.branches.get(d.records.currBranch);t===void 0||!t?d.records.head=null:d.records.head=d.records.commits.get(t)??null}else{let t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},"checkout");function Z(e,t,r){let s=e.indexOf(t);s===-1?e.push(r):e.splice(s,1,r)}l(Z,"upsert");function J(e){let t=e.reduce((n,i)=>n.seq>i.seq?n:i,e[0]),r="";e.forEach(function(n){n===t?r+=" *":r+=" |"});let s=[r,t.id,t.seq];for(let n in d.records.branches)d.records.branches.get(n)===t.id&&s.push(n);if(w.debug(s.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=d.records.commits.get(t.parents[0]);Z(e,t,n),t.parents[1]&&e.push(d.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let n=d.records.commits.get(t.parents[0]);Z(e,t,n)}}e=xe(e,n=>n.id),J(e)}l(J,"prettyPrintCommitHistory");var _e=l(function(){w.debug(d.records.commits);let e=be()[0];J([e])},"prettyPrint"),Ge=l(function(){d.reset(),re()},"clear"),De=l(function(){return[...d.records.branchConfig.values()].map((t,r)=>t.order!==null&&t.order!==void 0?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),We=l(function(){return d.records.branches},"getBranches"),qe=l(function(){return d.records.commits},"getCommits"),be=l(function(){let e=[...d.records.commits.values()];return e.forEach(function(t){w.debug(t.id)}),e.sort((t,r)=>t.seq-r.seq),e},"getCommitsArray"),Ae=l(function(){return d.records.currBranch},"getCurrentBranch"),He=l(function(){return d.records.direction},"getDirection"),Se=l(function(){return d.records.head},"getHead"),we={commitType:x,getConfig:D,setDirection:Te,setOptions:Le,getOptions:Me,commit:Pe,branch:Re,merge:Oe,cherryPick:Ie,checkout:ue,prettyPrint:_e,clear:Ge,getBranchesAsObjArray:De,getBranches:We,getCommits:qe,getCommitsArray:be,getCurrentBranch:Ae,getDirection:He,getHead:Se,setAccTitle:ae,getAccTitle:oe,getAccDescription:ne,setAccDescription:se,setDiagramTitle:ce,getDiagramTitle:ie},Ne=l((e,t)=>{$e(e,t),e.dir&&t.setDirection(e.dir);for(let r of e.statements)Fe(r,t)},"populate"),Fe=l((e,t)=>{let s={Commit:l(n=>t.commit(ze(n)),"Commit"),Branch:l(n=>t.branch(Ye(n)),"Branch"),Merge:l(n=>t.merge(je(n)),"Merge"),Checkout:l(n=>t.checkout(Ke(n)),"Checkout"),CherryPicking:l(n=>t.cherryPick(Ue(n)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=l(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?x[e.type]:x.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=l(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=l(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?x[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=l(e=>e.branch,"parseCheckout"),Ue=l(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:l(async e=>{let t=await pe("gitGraph",e);w.debug(t),Ne(t,we)},"parse")},O=10,I=40,L=4,P=2,_=8,K=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Q=new Set(["redux-color","redux-dark-color"]),Ze=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),G=l((e,t,r=!1)=>r&&e>0?(e-1)%(t-1)+1:e%t,"calcColorIndex"),C=new Map,v=new Map,z=30,H=new Map,Y=[],R=0,p="LR",Xe=l(()=>{C.clear(),v.clear(),H.clear(),R=0,Y=[],p="LR"},"clear"),Be=l(e=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{let n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),n.setAttribute("class","row"),n.textContent=s.trim(),t.appendChild(n)}),t},"drawText"),ke=l(e=>{let t,r,s;return p==="BT"?(r=l((n,i)=>n<=i,"comparisonFunc"),s=1/0):(r=l((n,i)=>n>=i,"comparisonFunc"),s=0),e.forEach(n=>{let i=p==="TB"||p=="BT"?v.get(n)?.y:v.get(n)?.x;i!==void 0&&r(i,s)&&(t=n,s=i)}),t},"findClosestParent"),Je=l(e=>{let t="",r=1/0;return e.forEach(s=>{let n=v.get(s).y;n<=r&&(t=s,r=n)}),t||void 0},"findClosestParentBT"),Qe=l((e,t,r)=>{let s=r,n=r,i=[];e.forEach(o=>{let a=t.get(o);if(!a)throw new Error(`Commit not found for key ${o}`);a.parents.length?(s=tt(a),n=Math.max(s,n)):i.push(a),rt(a,s)}),s=n,i.forEach(o=>{at(o,s,r)}),e.forEach(o=>{let a=t.get(o);if(a?.parents.length){let h=Je(a.parents);s=v.get(h).y-I,s<=n&&(n=s);let g=C.get(a.branch).pos,f=s-O;v.set(a.id,{x:g,y:f})}})},"setParallelBTPos"),et=l(e=>{let t=ke(e.parents.filter(s=>s!==null));if(!t)throw new Error(`Closest parent not found for commit ${e.id}`);let r=v.get(t)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return r},"findClosestParentPos"),tt=l(e=>et(e)+I,"calculateCommitPosition"),rt=l((e,t)=>{let r=C.get(e.branch);if(!r)throw new Error(`Branch not found for commit ${e.id}`);let s=r.pos,n=t+O;return v.set(e.id,{x:s,y:n}),{x:s,y:n}},"setCommitPosition"),at=l((e,t,r)=>{let s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);let n=t+r,i=s.pos;v.set(e.id,{x:i,y:n})},"setRootPosition"),ot=l((e,t,r,s,n,i)=>{let{theme:o}=q(),a=K.has(o??""),h=Q.has(o??""),g=Ze.has(o??"");if(i===x.HIGHLIGHT)e.append("rect").attr("x",r.x-10+(a?3:0)).attr("y",r.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${t.id} commit-highlight${G(n,_,h)} ${s}-outer`),e.append("rect").attr("x",r.x-6+(a?2:0)).attr("y",r.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${t.id} commit${G(n,_,h)} ${s}-inner`);else if(i===x.CHERRY_PICK)e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",a?7:10).attr("class",`commit ${t.id} ${s}`),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",a?2.5:2.75).attr("fill",g?"#000000":"#fff").attr("class",`commit ${t.id} ${s}`),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",a?2.5:2.75).attr("fill",g?"#000000":"#fff").attr("class",`commit ${t.id} ${s}`),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",g?"#000000":"#fff").attr("class",`commit ${t.id} ${s}`),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",g?"#000000":"#fff").attr("class",`commit ${t.id} ${s}`);else{let f=e.append("circle");if(f.attr("cx",r.x),f.attr("cy",r.y),f.attr("r",a?7:10),f.attr("class",`commit ${t.id} commit${G(n,_,h)}`),i===x.MERGE){let m=e.append("circle");m.attr("cx",r.x),m.attr("cy",r.y),m.attr("r",a?5:6),m.attr("class",`commit ${s} ${t.id} commit${G(n,_,h)}`)}if(i===x.REVERSE){let m=e.append("path"),c=a?4:5;m.attr("d",`M ${r.x-c},${r.y-c}L${r.x+c},${r.y+c}M${r.x-c},${r.y+c}L${r.x+c},${r.y-c}`).attr("class",`commit ${s} ${t.id} commit${G(n,_,h)}`)}}},"drawCommitBullet"),st=l((e,t,r,s,n)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&n.showCommitLabel){let i=e.append("g"),o=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",r.y+25).attr("class","commit-label").text(t.id),h=a.node()?.getBBox();if(h&&(o.attr("x",r.posWithOffset-h.width/2-P).attr("y",r.y+13.5).attr("width",h.width+2*P).attr("height",h.height+2*P),p==="TB"||p==="BT"?(o.attr("x",r.x-(h.width+4*L+5)).attr("y",r.y-12),a.attr("x",r.x-(h.width+4*L)).attr("y",r.y+h.height-12)):a.attr("x",r.posWithOffset-h.width/2),n.rotateCommitLabel))if(p==="TB"||p==="BT")a.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),o.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;i.attr("transform","translate("+g+", "+f+") rotate(-45, "+s+", "+r.y+")")}}},"drawCommitLabel"),nt=l((e,t,r,s)=>{if(t.tags.length>0){let n=0,i=0,o=0,a=[];for(let h of t.tags.reverse()){let g=e.insert("polygon"),f=e.append("circle"),m=e.append("text").attr("y",r.y-16-n).attr("class","tag-label").text(h),c=m.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),o=Math.max(o,c.height),m.attr("x",r.posWithOffset-c.width/2),a.push({tag:m,hole:f,rect:g,yOffset:n}),n+=20}for(let{tag:h,hole:g,rect:f,yOffset:m}of a){let c=o/2,y=r.y-19.2-m;if(f.attr("class","tag-label-bkg").attr("points",`
2
+ ${s-i/2-L/2},${y+P}
3
+ ${s-i/2-L/2},${y-P}
4
+ ${r.posWithOffset-i/2-L},${y-c-P}
5
+ ${r.posWithOffset+i/2+L},${y-c-P}
6
+ ${r.posWithOffset+i/2+L},${y+c+P}
7
+ ${r.posWithOffset-i/2-L},${y+c+P}`),g.attr("cy",y).attr("cx",s-i/2+L/2).attr("r",1.5).attr("class","tag-hole"),p==="TB"||p==="BT"){let $=s+m;f.attr("class","tag-label-bkg").attr("points",`
8
+ ${r.x},${$+2}
9
+ ${r.x},${$-2}
10
+ ${r.x+O},${$-c-2}
11
+ ${r.x+O+i+4},${$-c-2}
12
+ ${r.x+O+i+4},${$+c+2}
13
+ ${r.x+O},${$+c+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+s+")"),g.attr("cx",r.x+L/2).attr("cy",$).attr("transform","translate(12,12) rotate(45, "+r.x+","+s+")"),h.attr("x",r.x+5).attr("y",$+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+s+")")}}}},"drawCommitTags"),ct=l(e=>{switch(e.customType??e.type){case x.NORMAL:return"commit-normal";case x.REVERSE:return"commit-reverse";case x.HIGHLIGHT:return"commit-highlight";case x.MERGE:return"commit-merge";case x.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),it=l((e,t,r,s)=>{let n={x:0,y:0};if(e.parents.length>0){let i=ke(e.parents);if(i){let o=s.get(i)??n;return t==="TB"?o.y+I:t==="BT"?(s.get(e.id)??n).y-I:o.x+I}}else return t==="TB"?z:t==="BT"?(s.get(e.id)??n).y-I:0;return 0},"calculatePosition"),dt=l((e,t,r)=>{let s=p==="BT"&&r?t:t+O,n=C.get(e.branch)?.pos,i=p==="TB"||p==="BT"?C.get(e.branch)?.pos:s;if(i===void 0||n===void 0)throw new Error(`Position were undefined for commit ${e.id}`);let o=K.has(q().theme??""),a=p==="TB"||p==="BT"?s:n+(o?X/2+1:-2);return{x:i,y:a,posWithOffset:s}},"getCommitPosition"),ye=l((e,t,r,s)=>{let n=e.append("g").attr("class","commit-bullets"),i=e.append("g").attr("class","commit-labels"),o=p==="TB"||p==="BT"?z:0,a=[...t.keys()],h=s.parallelCommits??!1,g=l((m,c)=>{let y=t.get(m)?.seq,$=t.get(c)?.seq;return y!==void 0&&$!==void 0?y-$:0},"sortKeys"),f=a.sort(g);p==="BT"&&(h&&Qe(f,t,o),f=f.reverse()),f.forEach(m=>{let c=t.get(m);if(!c)throw new Error(`Commit not found for key ${m}`);h&&(o=it(c,p,o,v));let y=dt(c,o,h);if(r){let $=ct(c),u=c.customType??c.type,b=C.get(c.branch)?.index??0;ot(n,c,y,$,b,u),st(i,c,y,o,s),nt(i,c,y,o)}p==="TB"||p==="BT"?v.set(c.id,{x:y.x,y:y.posWithOffset}):v.set(c.id,{x:y.posWithOffset,y:y.y}),o=p==="BT"&&h?o+I:o+I+O,o>R&&(R=o)})},"drawCommits"),ht=l((e,t,r,s,n)=>{let o=(p==="TB"||p==="BT"?r.x<s.x:r.y<s.y)?t.branch:e.branch,a=l(g=>g.branch===o,"isOnBranchToGetCurve"),h=l(g=>g.seq>e.seq&&g.seq<t.seq,"isBetweenCommits");return[...n.values()].some(g=>h(g)&&a(g))},"shouldRerouteArrow"),S=l((e,t,r=0)=>{let s=e+Math.abs(e-t)/2;if(r>5)return s;if(Y.every(o=>Math.abs(o-s)>=10))return Y.push(s),s;let i=Math.abs(e-t);return S(e,t-i/5,r+1)},"findLane"),lt=l((e,t,r,s)=>{let{theme:n}=q(),i=Q.has(n??""),o=v.get(t.id),a=v.get(r.id);if(o===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${t.id} and ${r.id}`);let h=ht(t,r,o,a,s),g="",f="",m=0,c=0,y=C.get(r.branch)?.index;r.type===x.MERGE&&t.id!==r.parents[0]&&(y=C.get(t.branch)?.index);let $;if(h){g="A 10 10, 0, 0, 0,",f="A 10 10, 0, 0, 1,",m=10,c=10;let u=o.y<a.y?S(o.y,a.y):S(a.y,o.y),b=o.x<a.x?S(o.x,a.x):S(a.x,o.x);p==="TB"?o.x<a.x?$=`M ${o.x} ${o.y} L ${b-m} ${o.y} ${f} ${b} ${o.y+c} L ${b} ${a.y-m} ${g} ${b+c} ${a.y} L ${a.x} ${a.y}`:(y=C.get(t.branch)?.index,$=`M ${o.x} ${o.y} L ${b+m} ${o.y} ${g} ${b} ${o.y+c} L ${b} ${a.y-m} ${f} ${b-c} ${a.y} L ${a.x} ${a.y}`):p==="BT"?o.x<a.x?$=`M ${o.x} ${o.y} L ${b-m} ${o.y} ${g} ${b} ${o.y-c} L ${b} ${a.y+m} ${f} ${b+c} ${a.y} L ${a.x} ${a.y}`:(y=C.get(t.branch)?.index,$=`M ${o.x} ${o.y} L ${b+m} ${o.y} ${f} ${b} ${o.y-c} L ${b} ${a.y+m} ${g} ${b-c} ${a.y} L ${a.x} ${a.y}`):o.y<a.y?$=`M ${o.x} ${o.y} L ${o.x} ${u-m} ${g} ${o.x+c} ${u} L ${a.x-m} ${u} ${f} ${a.x} ${u+c} L ${a.x} ${a.y}`:(y=C.get(t.branch)?.index,$=`M ${o.x} ${o.y} L ${o.x} ${u+m} ${f} ${o.x+c} ${u} L ${a.x-m} ${u} ${g} ${a.x} ${u-c} L ${a.x} ${a.y}`)}else g="A 20 20, 0, 0, 0,",f="A 20 20, 0, 0, 1,",m=20,c=20,p==="TB"?(o.x<a.x&&(r.type===x.MERGE&&t.id!==r.parents[0]?$=`M ${o.x} ${o.y} L ${o.x} ${a.y-m} ${g} ${o.x+c} ${a.y} L ${a.x} ${a.y}`:$=`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${f} ${a.x} ${o.y+c} L ${a.x} ${a.y}`),o.x>a.x&&(g="A 20 20, 0, 0, 0,",f="A 20 20, 0, 0, 1,",m=20,c=20,r.type===x.MERGE&&t.id!==r.parents[0]?$=`M ${o.x} ${o.y} L ${o.x} ${a.y-m} ${f} ${o.x-c} ${a.y} L ${a.x} ${a.y}`:$=`M ${o.x} ${o.y} L ${a.x+m} ${o.y} ${g} ${a.x} ${o.y+c} L ${a.x} ${a.y}`),o.x===a.x&&($=`M ${o.x} ${o.y} L ${a.x} ${a.y}`)):p==="BT"?(o.x<a.x&&(r.type===x.MERGE&&t.id!==r.parents[0]?$=`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${f} ${o.x+c} ${a.y} L ${a.x} ${a.y}`:$=`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${g} ${a.x} ${o.y-c} L ${a.x} ${a.y}`),o.x>a.x&&(g="A 20 20, 0, 0, 0,",f="A 20 20, 0, 0, 1,",m=20,c=20,r.type===x.MERGE&&t.id!==r.parents[0]?$=`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${g} ${o.x-c} ${a.y} L ${a.x} ${a.y}`:$=`M ${o.x} ${o.y} L ${a.x+m} ${o.y} ${f} ${a.x} ${o.y-c} L ${a.x} ${a.y}`),o.x===a.x&&($=`M ${o.x} ${o.y} L ${a.x} ${a.y}`)):(o.y<a.y&&(r.type===x.MERGE&&t.id!==r.parents[0]?$=`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${f} ${a.x} ${o.y+c} L ${a.x} ${a.y}`:$=`M ${o.x} ${o.y} L ${o.x} ${a.y-m} ${g} ${o.x+c} ${a.y} L ${a.x} ${a.y}`),o.y>a.y&&(r.type===x.MERGE&&t.id!==r.parents[0]?$=`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${g} ${a.x} ${o.y-c} L ${a.x} ${a.y}`:$=`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${f} ${o.x+c} ${a.y} L ${a.x} ${a.y}`),o.y===a.y&&($=`M ${o.x} ${o.y} L ${a.x} ${a.y}`));if($===void 0)throw new Error("Line definition not found");e.append("path").attr("d",$).attr("class","arrow arrow"+G(y,_,i))},"drawArrow"),mt=l((e,t)=>{let r=e.append("g").attr("class","commit-arrows");[...t.keys()].forEach(s=>{let n=t.get(s);n.parents&&n.parents.length>0&&n.parents.forEach(i=>{lt(r,t.get(i),n,t)})})},"drawArrows"),gt=l((e,t,r,s)=>{let{look:n,theme:i,themeVariables:o}=q(),{dropShadow:a,THEME_COLOR_LIMIT:h}=o,g=K.has(i??""),f=Q.has(i??""),m=e.append("g");t.forEach((c,y)=>{let $=G(y,g?h:_,f),u=C.get(c.name)?.pos;if(u===void 0)throw new Error(`Position not found for branch ${c.name}`);let b=p==="TB"||p==="BT"?u:g?u+X/2+1:u-2,B=m.append("line");B.attr("x1",0),B.attr("y1",b),B.attr("x2",R),B.attr("y2",b),B.attr("class","branch branch"+$),p==="TB"?(B.attr("y1",z),B.attr("x1",u),B.attr("y2",R),B.attr("x2",u)):p==="BT"&&(B.attr("y1",R),B.attr("x1",u),B.attr("y2",z),B.attr("x2",u)),Y.push(b);let U=c.name,A=Be(U),T=m.insert("rect"),M=m.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+$);M.node().appendChild(A);let k=A.getBBox(),ee=g?0:4,N=g?16:0,W=g?X:0;n==="neo"&&T.attr("data-look","neo"),T.attr("class","branchLabelBkg label"+$).attr("style",n==="neo"?`filter:${g?`url(#${s}-drop-shadow)`:a}`:"").attr("rx",ee).attr("ry",ee).attr("x",-k.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-k.height/2+10).attr("width",k.width+18+N).attr("height",k.height+4+W),M.attr("transform","translate("+(-k.width-14-(r.rotateCommitLabel===!0?30:0)+N/2)+", "+(b-k.height/2-2)+")"),p==="TB"?(T.attr("x",u-k.width/2-10).attr("y",0),M.attr("transform","translate("+(u-k.width/2-5)+", 0)"),g&&(T.attr("transform",`translate(${-N/2-3}, ${-W-10})`),M.attr("transform","translate("+(u-k.width/2-5)+", "+(-W*2+7)+")"))):p==="BT"?(T.attr("x",u-k.width/2-10).attr("y",R),M.attr("transform","translate("+(u-k.width/2-5)+", "+R+")"),g&&(T.attr("transform",`translate(${-N/2-3}, ${W+10})`),M.attr("transform","translate("+(u-k.width/2-5)+", "+(R+W*2+4)+")"))):T.attr("transform","translate(-19, "+(b-12-W/2)+")")})},"drawBranches"),ft=l(function(e,t,r,s,n){return C.set(e,{pos:t,index:r}),t+=50+(n?40:0)+(p==="TB"||p==="BT"?s.width/2:0),t},"setBranchPosition"),$t=l(function(e,t,r,s){Xe(),w.debug("in gitgraph renderer",e+`
14
+ `,"id:",t,r);let n=s.db;if(!n.getConfig){w.error("getConfig method is not available on db");return}let i=n.getConfig(),o=i.rotateCommitLabel??!1;H=n.getCommits();let a=n.getBranchesAsObjArray();p=n.getDirection();let h=he(`[id="${t}"]`),{look:g,theme:f,themeVariables:m}=q(),{useGradient:c,gradientStart:y,gradientStop:$,filterColor:u}=m;if(c){let B=h.append("defs").append("linearGradient").attr("id",t+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");B.append("stop").attr("offset","0%").attr("stop-color",y).attr("stop-opacity",1),B.append("stop").attr("offset","100%").attr("stop-color",$).attr("stop-opacity",1)}g==="neo"&&K.has(f??"")&&h.append("defs").append("filter").attr("id",t+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",u);let b=0;a.forEach((B,U)=>{let A=Be(B.name),T=h.append("g"),V=T.insert("g").attr("class","branchLabel"),M=V.insert("g").attr("class","label branch-label");M.node()?.appendChild(A);let k=A.getBBox();b=ft(B.name,b,U,k,o),M.remove(),V.remove(),T.remove()}),ye(h,H,!1,i),i.showBranches&&gt(h,a,i,t),mt(h,H),ye(h,H,!0,i),ge.insertTitle(h,"gitTitleText",i.titleTopMargin??0,n.getDiagramTitle()),de(void 0,h,i.diagramPadding,i.useMaxWidth)},"draw"),pt={draw:$t},Ce=8,ve=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),yt=new Set(["redux-color","redux-dark-color"]),xt=new Set(["neo","neo-dark"]),ut=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),bt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),wt=l(e=>{let{svgId:t}=e,r="";if(e.useGradient&&t)for(let s=0;s<e.THEME_COLOR_LIMIT;s++)r+=`
15
+ .label${s} { fill: ${e.mainBkg}; stroke: url(${t}-gradient); stroke-width: ${e.strokeWidth};}
16
+ `;return r},"genGitGraphGradient"),Bt=l(e=>{let t=F(),{theme:r,themeVariables:s}=t,{borderColorArray:n}=s,i=ve.has(r);if(xt.has(r)){let o="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)if(a===0)o+=`
17
+ .branch-label${a} { fill: ${e.nodeBorder};}
18
+ .commit${a} { stroke: ${e.nodeBorder}; }
19
+ .commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
20
+ .arrow${a} { stroke: ${e.nodeBorder}; }
21
+ .commit-bullets { fill: ${e.nodeBorder}; }
22
+ .commit-cherry-pick${a} { stroke: ${e.nodeBorder}; }
23
+ ${wt(e)}`;else{let h=a%Ce;o+=`
24
+ .branch-label${a} { fill: ${e["gitBranchLabel"+h]}; }
25
+ .commit${a} { stroke: ${e["git"+h]}; fill: ${e["git"+h]}; }
26
+ .commit-highlight${a} { stroke: ${e["gitInv"+h]}; fill: ${e["gitInv"+h]}; }
27
+ .arrow${a} { stroke: ${e["git"+h]}; }
28
+ `}return o}else if(yt.has(r)){let o="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)if(a===0)o+=`
29
+ .branch-label${a} { fill: ${e.nodeBorder}; ${i?`font-weight:${e.noteFontWeight}`:""} }
30
+ .commit${a} { stroke: ${e.nodeBorder}; }
31
+ .commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.mainBkg}; }
32
+ .label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${i?`font-weight:${e.noteFontWeight}`:""} }
33
+ .arrow${a} { stroke: ${e.nodeBorder}; }
34
+ .commit-bullets { fill: ${e.nodeBorder}; }
35
+ `;else{let h=a%n.length;o+=`
36
+ .branch-label${a} { fill: ${e.nodeBorder}; ${i?`font-weight:${e.noteFontWeight}`:""} }
37
+ .commit${a} { stroke: ${n[h]}; fill: ${n[h]}; }
38
+ .commit-highlight${a} { stroke: ${n[h]}; fill: ${n[h]}; }
39
+ .label${a} { fill: ${ut.has(r)?e.mainBkg:n[h]}; stroke: ${n[h]}; stroke-width: ${e.strokeWidth}; }
40
+ .arrow${a} { stroke: ${n[h]}; }
41
+ `}return o}else{let o="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)o+=`
42
+ .branch-label${a} { fill: ${e.nodeBorder}; ${i?`font-weight:${e.noteFontWeight}`:""} }
43
+ .commit${a} { stroke: ${e.nodeBorder}; }
44
+ .commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
45
+ .label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${i?`font-weight:${e.noteFontWeight}`:""}}
46
+ .arrow${a} { stroke: ${e.nodeBorder}; }
47
+ .commit-bullets { fill: ${e.nodeBorder}; }
48
+ .commit-cherry-pick${a} { stroke: ${e.nodeBorder}; }
49
+ `;return o}},"genColor"),kt=l(e=>`${Array.from({length:e.THEME_COLOR_LIMIT},(t,r)=>r).map(t=>{let r=t%Ce;return`
50
+ .branch-label${t} { fill: ${e["gitBranchLabel"+r]}; }
51
+ .commit${t} { stroke: ${e["git"+r]}; fill: ${e["git"+r]}; }
52
+ .commit-highlight${t} { stroke: ${e["gitInv"+r]}; fill: ${e["gitInv"+r]}; }
53
+ .label${t} { fill: ${e["git"+r]}; }
54
+ .arrow${t} { stroke: ${e["git"+r]}; }
55
+ `}).join(`
56
+ `)}`,"normalTheme"),Ct=l(e=>{let t=F(),{theme:r}=t,s=bt.has(r);return`
57
+ .commit-id,
58
+ .commit-msg,
59
+ .branch-label {
60
+ fill: lightgrey;
61
+ color: lightgrey;
62
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
63
+ font-family: var(--mermaid-font-family);
64
+ }
65
+
66
+ ${s?Bt(e):kt(e)}
67
+
68
+ .branch {
69
+ stroke-width: ${e.strokeWidth};
70
+ stroke: ${e.commitLineColor??e.lineColor};
71
+ stroke-dasharray: ${s?"4 2":"2"};
72
+ }
73
+ .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${s?e.nodeBorder:e.commitLabelColor}; ${s?`font-weight:${e.noteFontWeight};`:""}}
74
+ .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${s?"transparent":e.commitLabelBackground}; opacity: ${s?"":.5}; }
75
+ .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
76
+ .tag-label-bkg { fill: ${s?e.mainBkg:e.tagLabelBackground}; stroke: ${s?e.nodeBorder:e.tagLabelBorder}; ${s?`filter:${e.dropShadow}`:""} }
77
+ .tag-hole { fill: ${e.textColor}; }
78
+
79
+ .commit-merge {
80
+ stroke: ${s?e.mainBkg:e.primaryColor};
81
+ fill: ${s?e.mainBkg:e.primaryColor};
82
+ }
83
+ .commit-reverse {
84
+ stroke: ${s?e.mainBkg:e.primaryColor};
85
+ fill: ${s?e.mainBkg:e.primaryColor};
86
+ stroke-width: ${s?e.strokeWidth:3};
87
+ }
88
+ .commit-highlight-outer {
89
+ }
90
+ .commit-highlight-inner {
91
+ stroke: ${s?e.mainBkg:e.primaryColor};
92
+ fill: ${s?e.mainBkg:e.primaryColor};
93
+ }
94
+
95
+ .arrow {
96
+ /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */
97
+ stroke-width: ${ve.has(r)?e.strokeWidth:8};
98
+ stroke-linecap: round;
99
+ fill: none
100
+ }
101
+ .gitTitleText {
102
+ text-anchor: middle;
103
+ font-size: 18px;
104
+ fill: ${e.textColor};
105
+ }
106
+ `},"getStyles"),vt=Ct,_t={parser:Ve,db:we,renderer:pt,styles:vt};export{_t as diagram};
@@ -0,0 +1 @@
1
+ import{a as o,b as e}from"./chunk-LOMHZYS2.js";import"./chunk-VYZZPKGK.js";import"./chunk-6DHFEWGX.js";export{o as InfoModule,e as createInfoServices};
@@ -0,0 +1,2 @@
1
+ import{a as s}from"./chunk-MII4VZEB.js";import"./chunk-HEMELP7J.js";import"./chunk-AIX6IH4O.js";import"./chunk-HZ5I5NJO.js";import"./chunk-ETOVTYWF.js";import"./chunk-SEGIW3MP.js";import"./chunk-Y2XVFW7T.js";import"./chunk-25REBZ7M.js";import"./chunk-UTWOJE2A.js";import"./chunk-6VQ47JJS.js";import"./chunk-OE3NOVIH.js";import"./chunk-LOMHZYS2.js";import"./chunk-OAGTSILX.js";import"./chunk-DN52R6U7.js";import"./chunk-RWFFDL53.js";import"./chunk-A43YELH5.js";import"./chunk-VYZZPKGK.js";import{a as i}from"./chunk-VOCDYA3H.js";import{O as n}from"./chunk-7CSIRG7W.js";import{b as a}from"./chunk-ERWOH47R.js";import{a as r}from"./chunk-EIBFAW37.js";import"./chunk-LGUG3SQB.js";import"./chunk-6DHFEWGX.js";var g={parse:r(async e=>{let t=await s("info",e);a.debug(t)},"parse")},m={version:"11.16.1"},v=r(()=>m.version,"getVersion"),d={getVersion:v},f=r((e,t,p)=>{a.debug(`rendering info diagram
2
+ `+e);let o=i(t);n(o,100,400,!0),o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${p}`)},"draw"),c={draw:f},w={parser:g,db:d,renderer:c};export{w as diagram};
@@ -0,0 +1,70 @@
1
+ import{a as dt}from"./chunk-VOCDYA3H.js";import{a as ft}from"./chunk-YORIST7Z.js";import{n as yt}from"./chunk-6DCNDVBX.js";import"./chunk-22DRK7VS.js";import{N as nt,O as at,T as rt,U as lt,V as ot,W as ht,X as ct,Y as Q,Z as ut,_ as J}from"./chunk-7CSIRG7W.js";import"./chunk-ERWOH47R.js";import{a as l}from"./chunk-EIBFAW37.js";import"./chunk-LGUG3SQB.js";import"./chunk-6DHFEWGX.js";var et=(function(){var t=l(function(M,e,s,i){for(s=s||{},i=M.length;i--;s[M[i]]=e);return s},"o"),d=[1,4],a=[1,14],r=[1,12],o=[1,13],y=[6,7,8],p=[1,20],u=[1,18],w=[1,19],c=[6,7,11],m=[1,6,13,14],k=[1,23],_=[1,24],x=[1,6,7,11,13,14],N={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:l(function(e,s,i,h,f,n,v){var b=n.length-1;switch(f){case 6:case 7:return h;case 15:h.addNode(n[b-1].length,n[b].trim());break;case 16:h.addNode(0,n[b].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:d},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:d},{6:a,7:[1,10],9:9,12:11,13:r,14:o},t(y,[2,3]),{1:[2,2]},t(y,[2,4]),t(y,[2,5]),{1:[2,6],6:a,12:15,13:r,14:o},{6:a,9:16,12:11,13:r,14:o},{6:p,7:u,10:17,11:w},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:p,7:u,10:22,11:w},{1:[2,7],6:a,12:15,13:r,14:o},t(m,[2,14],{7:k,11:_}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(c,[2,15]),t(m,[2,13],{7:k,11:_}),t(x,[2,11]),t(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(e,s){if(s.recoverable)this.trace(e);else{var i=new Error(e);throw i.hash=s,i}},"parseError"),parse:l(function(e){var s=this,i=[0],h=[],f=[null],n=[],v=this.table,b="",I=0,S=0,A=0,L=2,O=1,Z=n.slice.call(arguments,1),g=Object.create(this.lexer),E={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(E.yy[V]=this.yy[V]);g.setInput(e,E.yy),E.yy.lexer=g,E.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var R=g.yylloc;n.push(R);var X=g.options&&g.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function xt(P){i.length=i.length-2*P,f.length=f.length-P,n.length=n.length-P}l(xt,"popStack");function it(){var P;return P=h.pop()||g.lex()||O,typeof P!="number"&&(P instanceof Array&&(h=P,P=h.pop()),P=s.symbols_[P]||P),P}l(it,"lex");for(var T,Y,W,B,Vt,K,F={},H,C,st,G;;){if(W=i[i.length-1],this.defaultActions[W]?B=this.defaultActions[W]:((T===null||typeof T>"u")&&(T=it()),B=v[W]&&v[W][T]),typeof B>"u"||!B.length||!B[0]){var q="";G=[];for(H in v[W])this.terminals_[H]&&H>L&&G.push("'"+this.terminals_[H]+"'");g.showPosition?q="Parse error on line "+(I+1)+`:
2
+ `+g.showPosition()+`
3
+ Expecting `+G.join(", ")+", got '"+(this.terminals_[T]||T)+"'":q="Parse error on line "+(I+1)+": Unexpected "+(T==O?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(q,{text:g.match,token:this.terminals_[T]||T,line:g.yylineno,loc:R,expected:G})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+T);switch(B[0]){case 1:i.push(T),f.push(g.yytext),n.push(g.yylloc),i.push(B[1]),T=null,Y?(T=Y,Y=null):(S=g.yyleng,b=g.yytext,I=g.yylineno,R=g.yylloc,A>0&&A--);break;case 2:if(C=this.productions_[B[1]][1],F.$=f[f.length-C],F._$={first_line:n[n.length-(C||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(C||1)].first_column,last_column:n[n.length-1].last_column},X&&(F._$.range=[n[n.length-(C||1)].range[0],n[n.length-1].range[1]]),K=this.performAction.apply(F,[b,S,I,E.yy,B[1],f,n].concat(Z)),typeof K<"u")return K;C&&(i=i.slice(0,-1*C*2),f=f.slice(0,-1*C),n=n.slice(0,-1*C)),i.push(this.productions_[B[1]][0]),f.push(F.$),n.push(F._$),st=v[i[i.length-2]][i[i.length-1]],i.push(st);break;case 3:return!0}}return!0},"parse")},D=(function(){var M={EOF:1,parseError:l(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:l(function(e,s){return this.yy=s||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var s=e.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:l(function(e){var s=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var h=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===h.length?this.yylloc.first_column:0)+h[h.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(e){this.unput(this.match.slice(e))},"less"),pastInput:l(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var e=this.pastInput(),s=new Array(e.length+1).join("-");return e+this.upcomingInput()+`
5
+ `+s+"^"},"showPosition"),test_match:l(function(e,s){var i,h,f;if(this.options.backtrack_lexer&&(f={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(f.yylloc.range=this.yylloc.range.slice(0))),h=e[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,s,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var n in f)this[n]=f[n];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,s,i,h;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),n=0;n<f.length;n++)if(i=this._input.match(this.rules[f[n]]),i&&(!s||i[0].length>s[0].length)){if(s=i,h=n,this.options.backtrack_lexer){if(e=this.test_match(i,f[n]),e!==!1)return e;if(this._backtrack){s=!1;continue}else return!1}else if(!this.options.flex)break}return s?(e=this.test_match(s,f[h]),e!==!1?e:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:l(function(){var s=this.next();return s||this.lex()},"lex"),begin:l(function(s){this.conditionStack.push(s)},"begin"),popState:l(function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:l(function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:l(function(s){this.begin(s)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(s,i,h,f){var n=f;switch(h){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return M})();N.lexer=D;function $(){this.yy={}}return l($,"Parser"),$.prototype=N,N.Parser=$,new $})();et.parser=et;var vt=et,St=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{l(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,rt()}getRoot(){return this.root}addNode(t,d){let a=nt.sanitizeText(d,J());if(!this.root){this.root={text:a,children:[]},this.stack=[{level:0,node:this.root}],Q(a);return}this.baseLevel??=t;let r=t-this.baseLevel+1;for(r<=0&&(r=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=r;)this.stack.pop();let o=this.stack[this.stack.length-1].node,y={text:a,children:[]};o.children.push(y),this.stack.push({level:r,node:y})}getAccTitle(){return ot()}setAccTitle(t){lt(t)}getAccDescription(){return ct()}setAccDescription(t){ht(t)}getDiagramTitle(){return ut()}setDiagramTitle(t){Q(t)}},Et=14,j=250,$t=30,At=60,It=5,bt=82*Math.PI/180,pt=Math.cos(bt),gt=Math.sin(bt),kt=l((t,d,a)=>{let r=t.node().getBBox(),o=r.width+d*2,y=r.height+d*2;at(t,y,o,a),t.attr("viewBox",`${r.x-d} ${r.y-d} ${o} ${y}`)},"applyPaddedViewBox"),Lt=l((t,d,a,r)=>{let y=r.db.getRoot();if(!y)return;let p=J(),{look:u,handDrawnSeed:w,themeVariables:c}=p,m=yt(p.fontSize)[0]??Et,k=u==="handDrawn",_=y.children??[],x=p.ishikawa?.diagramPadding??20,N=p.ishikawa?.useMaxWidth??!1,D=dt(d),$=D.append("g").attr("class","ishikawa"),M=k?ft.svg(D.node()):void 0,e=M?{roughSvg:M,seed:w??0,lineColor:c?.lineColor??"#333",fillColor:c?.mainBkg??"#fff"}:void 0,s=`ishikawa-arrow-${d}`;k||$.append("defs").append("marker").attr("id",s).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let i=0,h=j,f=k?void 0:z($,i,h,i,h,"ishikawa-spine");if(Tt($,i,h,y.text,m,e),!_.length){k&&z($,i,h,i,h,"ishikawa-spine",e),kt(D,x,N);return}i-=20;let n=_.filter((g,E)=>E%2===0),v=_.filter((g,E)=>E%2===1),b=mt(n),I=mt(v),S=b.total+I.total,A=j,L=j;if(S>0){let g=j*2,E=j*.3;A=Math.max(E,g*(b.total/S)),L=Math.max(E,g*(I.total/S))}let O=m*2;A=Math.max(A,b.max*O),L=Math.max(L,I.max*O),h=Math.max(A,j),f&&f.attr("y1",h).attr("y2",h),$.select(".ishikawa-head-group").attr("transform",`translate(0,${h})`);let Z=Math.ceil(_.length/2);for(let g=0;g<Z;g++){let E=$.append("g").attr("class","ishikawa-pair");for(let[V,R,X]of[[_[g*2],-1,A],[_[g*2+1],1,L]])V&&Bt(E,V,i,h,R,X,m,e);i=E.selectAll("text").nodes().reduce((V,R)=>Math.min(V,R.getBBox().x),1/0)}if(k)z($,i,h,0,h,"ishikawa-spine",e);else{f.attr("x1",i);let g=`url(#${s})`;$.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",g)}kt(D,x,N)},"draw"),mt=l(t=>{let d=l(a=>a.children.reduce((r,o)=>r+1+d(o),0),"countDescendants");return t.reduce((a,r)=>{let o=d(r);return a.total+=o,a.max=Math.max(a.max,o),a},{total:0,max:0})},"sideStats"),Tt=l((t,d,a,r,o,y)=>{let p=Math.max(6,Math.floor(110/(o*.6))),u=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${d},${a})`),w=U(u,_t(r,p),0,0,"ishikawa-head-label","start",o),c=w.node().getBBox(),m=Math.max(60,c.width+6),k=Math.max(40,c.height*2+40),_=`M 0 ${-k/2} L 0 ${k/2} Q ${m*2.4} 0 0 ${-k/2} Z`;if(y){let x=y.roughSvg.path(_,{roughness:1.5,seed:y.seed,fill:y.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:y.lineColor,strokeWidth:2});u.insert(()=>x,":first-child").attr("class","ishikawa-head")}else u.insert("path",":first-child").attr("class","ishikawa-head").attr("d",_);w.attr("transform",`translate(${(m-c.width)/2-c.x+3},${-c.y-c.height/2})`)},"drawHead"),Mt=l((t,d)=>{let a=[],r=[],o=l((y,p,u)=>{let w=d===-1?[...y].reverse():y;for(let c of w){let m=a.length,k=c.children??[];a.push({depth:u,text:_t(c.text,15),parentIndex:p,childCount:k.length}),u%2===0?(r.push(m),k.length&&o(k,m,u+1)):(k.length&&o(k,m,u+1),r.push(m))}},"walk");return o(t,-1,2),{entries:a,yOrder:r}},"flattenTree"),Pt=l((t,d,a,r,o,y,p)=>{let u=t.append("g").attr("class","ishikawa-label-group"),c=U(u,d,a,r+11*o,"ishikawa-label cause","middle",y).node().getBBox();if(p){let m=p.roughSvg.rectangle(c.x-20,c.y-2,c.width+40,c.height+4,{roughness:1.5,seed:p.seed,fill:p.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:p.lineColor,strokeWidth:2});u.insert(()=>m,":first-child").attr("class","ishikawa-label-box")}else u.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",c.x-20).attr("y",c.y-2).attr("width",c.width+40).attr("height",c.height+4)},"drawCauseLabel"),tt=l((t,d,a,r,o,y)=>{let p=Math.sqrt(r*r+o*o);if(p===0)return;let u=r/p,w=o/p,c=6,m=-w*c,k=u*c,_=d,x=a,N=`M ${_} ${x} L ${_-u*c*2+m} ${x-w*c*2+k} L ${_-u*c*2-m} ${x-w*c*2-k} Z`,D=y.roughSvg.path(N,{roughness:1,seed:y.seed,fill:y.lineColor,fillStyle:"solid",stroke:y.lineColor,strokeWidth:1});t.append(()=>D)},"drawArrowMarker"),Bt=l((t,d,a,r,o,y,p,u)=>{let w=d.children??[],c=y*(w.length?1:.2),m=-pt*c,k=gt*c*o,_=a+m,x=r+k;if(z(t,a,r,_,x,"ishikawa-branch",u),u&&tt(t,a,r,a-_,r-x,u),Pt(t,d.text,_,x,o,p,u),!w.length)return;let{entries:N,yOrder:D}=Mt(w,o),$=N.length,M=new Array($);for(let[f,n]of D.entries())M[n]=r+k*((f+1)/($+1));let e=new Map;e.set(-1,{x0:a,y0:r,x1:_,y1:x,childCount:w.length,childrenDrawn:0});let s=-pt,i=gt*o,h=o<0?"ishikawa-label up":"ishikawa-label down";for(let[f,n]of N.entries()){let v=M[f],b=e.get(n.parentIndex),I=t.append("g").attr("class","ishikawa-sub-group"),S=0,A=0,L=0;if(n.depth%2===0){let O=b.y1-b.y0;S=wt(b.x0,b.x1,O?(v-b.y0)/O:.5),A=v,L=S-(n.childCount>0?At+n.childCount*It:$t),z(I,S,v,L,v,"ishikawa-sub-branch",u),u&&tt(I,S,v,1,0,u),U(I,n.text,L,v,"ishikawa-label align","end",p)}else{let O=b.childrenDrawn++;S=wt(b.x0,b.x1,(b.childCount-O)/(b.childCount+1)),A=b.y0,L=S+s*((v-A)/i),z(I,S,A,L,v,"ishikawa-sub-branch",u),u&&tt(I,S,A,S-L,A-v,u),U(I,n.text,L,v,h,"end",p)}n.childCount>0&&e.set(f,{x0:S,y0:A,x1:L,y1:v,childCount:n.childCount,childrenDrawn:0})}},"drawBranch"),Nt=l(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),_t=l((t,d)=>{if(t.length<=d)return t;let a=[];for(let r of t.split(/\s+/)){let o=a.length-1;o>=0&&a[o].length+1+r.length<=d?a[o]+=" "+r:a.push(r)}return a.join(`
7
+ `)},"wrapText"),U=l((t,d,a,r,o,y,p)=>{let u=Nt(d),w=p*1.05,c=t.append("text").attr("class",o).attr("text-anchor",y).attr("x",a).attr("y",r-(u.length-1)*w/2);for(let[m,k]of u.entries())c.append("tspan").attr("x",a).attr("dy",m===0?0:w).text(k);return c},"drawMultilineText"),wt=l((t,d,a)=>t+(d-t)*a,"lerp"),z=l((t,d,a,r,o,y,p)=>{if(p){let u=p.roughSvg.line(d,a,r,o,{roughness:1.5,seed:p.seed,stroke:p.lineColor,strokeWidth:2});t.append(()=>u).attr("class",y);return}return t.append("line").attr("class",y).attr("x1",d).attr("y1",a).attr("x2",r).attr("y2",o)},"drawLine"),Dt={draw:Lt},Ot=l(t=>`
8
+ .ishikawa .ishikawa-spine,
9
+ .ishikawa .ishikawa-branch,
10
+ .ishikawa .ishikawa-sub-branch {
11
+ stroke: ${t.lineColor};
12
+ stroke-width: 2;
13
+ fill: none;
14
+ }
15
+
16
+ .ishikawa .ishikawa-sub-branch {
17
+ stroke-width: 1;
18
+ }
19
+
20
+ .ishikawa .ishikawa-arrow {
21
+ fill: ${t.lineColor};
22
+ }
23
+
24
+ .ishikawa .ishikawa-head {
25
+ fill: ${t.mainBkg};
26
+ stroke: ${t.lineColor};
27
+ stroke-width: 2;
28
+ }
29
+
30
+ .ishikawa .ishikawa-label-box {
31
+ fill: ${t.mainBkg};
32
+ stroke: ${t.lineColor};
33
+ stroke-width: 2;
34
+ }
35
+
36
+ .ishikawa text {
37
+ font-family: ${t.fontFamily};
38
+ font-size: ${t.fontSize};
39
+ fill: ${t.textColor};
40
+ }
41
+
42
+ .ishikawa .ishikawa-head-label {
43
+ font-weight: 600;
44
+ text-anchor: middle;
45
+ dominant-baseline: middle;
46
+ font-size: 14px;
47
+ }
48
+
49
+ .ishikawa .ishikawa-label {
50
+ text-anchor: end;
51
+ }
52
+
53
+ .ishikawa .ishikawa-label.cause {
54
+ text-anchor: middle;
55
+ dominant-baseline: middle;
56
+ }
57
+
58
+ .ishikawa .ishikawa-label.align {
59
+ text-anchor: end;
60
+ dominant-baseline: middle;
61
+ }
62
+
63
+ .ishikawa .ishikawa-label.up {
64
+ dominant-baseline: baseline;
65
+ }
66
+
67
+ .ishikawa .ishikawa-label.down {
68
+ dominant-baseline: hanging;
69
+ }
70
+ `,"getStyles"),Ct=Ot,Gt={parser:vt,get db(){return new St},renderer:Dt,styles:Ct};export{Gt as diagram};
@@ -0,0 +1,139 @@
1
+ import{a as mt}from"./chunk-NBH7YOBD.js";import{a as ft,b as pt,c as gt,f as Z}from"./chunk-PLP5XUTJ.js";import"./chunk-22DRK7VS.js";import{O as at,T as lt,U as ot,V as ct,W as ht,X as ut,Y as yt,Z as dt,_ as F}from"./chunk-7CSIRG7W.js";import"./chunk-ERWOH47R.js";import{a as s}from"./chunk-EIBFAW37.js";import{I as U,e as W}from"./chunk-LGUG3SQB.js";import"./chunk-6DHFEWGX.js";var K=(function(){var t=s(function(h,i,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=i);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],r=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(i,n,l,y,d,c,_){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:r,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:r,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:s(function(i){var n=this,l=[0],y=[],d=[null],c=[],_=this.table,k="",C=0,et=0,rt=0,$t=2,it=1,Mt=c.slice.call(arguments,1),b=Object.create(this.lexer),I={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(I.yy[Y]=this.yy[Y]);b.setInput(i,I.yy),I.yy.lexer=b,I.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;c.push(q);var Et=b.options&&b.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ct(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(Ct,"popStack");function nt(){var w;return w=y.pop()||b.lex()||it,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(nt,"lex");for(var v,H,A,T,Jt,X,V={},N,M,st,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((v===null||typeof v>"u")&&(v=nt()),T=_[A]&&_[A][v]),typeof T>"u"||!T.length||!T[0]){var G="";z=[];for(N in _[A])this.terminals_[N]&&N>$t&&z.push("'"+this.terminals_[N]+"'");b.showPosition?G="Parse error on line "+(C+1)+`:
2
+ `+b.showPosition()+`
3
+ Expecting `+z.join(", ")+", got '"+(this.terminals_[v]||v)+"'":G="Parse error on line "+(C+1)+": Unexpected "+(v==it?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(G,{text:b.match,token:this.terminals_[v]||v,line:b.yylineno,loc:q,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+v);switch(T[0]){case 1:l.push(v),d.push(b.yytext),c.push(b.yylloc),l.push(T[1]),v=null,H?(v=H,H=null):(et=b.yyleng,k=b.yytext,C=b.yylineno,q=b.yylloc,rt>0&&rt--);break;case 2:if(M=this.productions_[T[1]][1],V.$=d[d.length-M],V._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},Et&&(V._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),X=this.performAction.apply(V,[k,et,C,I.yy,T[1],d,c].concat(Mt)),typeof X<"u")return X;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(V.$),c.push(V._$),st=_[l[l.length-2]][l[l.length-1]],l.push(st);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
+ `+n+"^"},"showPosition"),test_match:s(function(i,n){var l,y,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),y=i[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var c in d)this[c]=d[c];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,n,l,y;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),c=0;c<d.length;c++)if(l=this._input.match(this.rules[d[c]]),l&&(!n||l[0].length>n[0].length)){if(n=l,y=c,this.options.backtrack_lexer){if(i=this.test_match(l,d[c]),i!==!1)return i;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(i=this.test_match(n,d[y]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var n=this.next();return n||this.lex()},"lex"),begin:s(function(n){this.conditionStack.push(n)},"begin"),popState:s(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:s(function(n){this.begin(n)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(n,l,y,d){var c=d;switch(y){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return h})();g.lexer=m;function x(){this.yy={}}return s(x,"Parser"),x.prototype=g,g.Parser=x,new x})();K.parser=K;var Pt=K,R="",D=[],L=[],B=[],It=s(function(){D.length=0,L.length=0,R="",B.length=0,lt()},"clear"),At=s(function(t){R=t,D.push(t)},"addSection"),Ft=s(function(){return D},"getSections"),Vt=s(function(){let t=xt(),e=100,a=0;for(;!t&&a<e;)t=xt(),a++;return L.push(...B),L},"getTasks"),Rt=s(function(){let t=[];return L.forEach(a=>{a.people&&t.push(...a.people)}),[...new Set(t)].sort()},"updateActors"),Lt=s(function(t,e){let a=e.substr(1).split(":"),f=0,r=[];a.length===1?(f=Number(a[0]),r=[]):(f=Number(a[0]),r=a[1].split(","));let u=r.map(o=>o.trim()),p={section:R,type:R,people:u,task:t,score:f};B.push(p)},"addTask"),Bt=s(function(t){let e={section:R,type:R,description:t,task:t,classes:[]};L.push(e)},"addTaskOrg"),xt=s(function(){let t=s(function(a){return B[a].processed},"compileTask"),e=!0;for(let[a,f]of B.entries())t(a),e=e&&f.processed;return e},"compileTasks"),jt=s(function(){return Rt()},"getActors"),kt={getConfig:s(()=>F().journey,"getConfig"),clear:It,setDiagramTitle:yt,getDiagramTitle:dt,setAccTitle:ot,getAccTitle:ct,setAccDescription:ht,getAccDescription:ut,addSection:At,getSections:Ft,getTasks:Vt,addTask:Lt,addTaskOrg:Bt,getActors:jt},Nt=s(t=>`.label {
7
+ font-family: ${t.fontFamily};
8
+ color: ${t.textColor};
9
+ }
10
+ .mouth {
11
+ stroke: #666;
12
+ }
13
+
14
+ line {
15
+ stroke: ${t.textColor}
16
+ }
17
+
18
+ .legend {
19
+ fill: ${t.textColor};
20
+ font-family: ${t.fontFamily};
21
+ }
22
+
23
+ .label text {
24
+ fill: #333;
25
+ }
26
+ .label {
27
+ color: ${t.textColor}
28
+ }
29
+
30
+ .face {
31
+ ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
32
+ stroke: #999;
33
+ }
34
+
35
+ .node rect,
36
+ .node circle,
37
+ .node ellipse,
38
+ .node polygon,
39
+ .node path {
40
+ fill: ${t.mainBkg};
41
+ stroke: ${t.nodeBorder};
42
+ stroke-width: 1px;
43
+ }
44
+
45
+ .node .label {
46
+ text-align: center;
47
+ }
48
+ .node.clickable {
49
+ cursor: pointer;
50
+ }
51
+
52
+ .arrowheadPath {
53
+ fill: ${t.arrowheadColor};
54
+ }
55
+
56
+ .edgePath .path {
57
+ stroke: ${t.lineColor};
58
+ stroke-width: 1.5px;
59
+ }
60
+
61
+ .flowchart-link {
62
+ stroke: ${t.lineColor};
63
+ fill: none;
64
+ }
65
+
66
+ .edgeLabel {
67
+ background-color: ${t.edgeLabelBackground};
68
+ rect {
69
+ opacity: 0.5;
70
+ }
71
+ text-align: center;
72
+ }
73
+
74
+ .cluster rect {
75
+ }
76
+
77
+ .cluster text {
78
+ fill: ${t.titleColor};
79
+ }
80
+
81
+ div.mermaidTooltip {
82
+ position: absolute;
83
+ text-align: center;
84
+ max-width: 200px;
85
+ padding: 2px;
86
+ font-family: ${t.fontFamily};
87
+ font-size: 12px;
88
+ background: ${t.tertiaryColor};
89
+ border: 1px solid ${t.border2};
90
+ border-radius: 2px;
91
+ pointer-events: none;
92
+ z-index: 100;
93
+ }
94
+
95
+ .task-type-0, .section-type-0 {
96
+ ${t.fillType0?`fill: ${t.fillType0}`:""};
97
+ }
98
+ .task-type-1, .section-type-1 {
99
+ ${t.fillType0?`fill: ${t.fillType1}`:""};
100
+ }
101
+ .task-type-2, .section-type-2 {
102
+ ${t.fillType0?`fill: ${t.fillType2}`:""};
103
+ }
104
+ .task-type-3, .section-type-3 {
105
+ ${t.fillType0?`fill: ${t.fillType3}`:""};
106
+ }
107
+ .task-type-4, .section-type-4 {
108
+ ${t.fillType0?`fill: ${t.fillType4}`:""};
109
+ }
110
+ .task-type-5, .section-type-5 {
111
+ ${t.fillType0?`fill: ${t.fillType5}`:""};
112
+ }
113
+ .task-type-6, .section-type-6 {
114
+ ${t.fillType0?`fill: ${t.fillType6}`:""};
115
+ }
116
+ .task-type-7, .section-type-7 {
117
+ ${t.fillType0?`fill: ${t.fillType7}`:""};
118
+ }
119
+
120
+ .actor-0 {
121
+ ${t.actor0?`fill: ${t.actor0}`:""};
122
+ }
123
+ .actor-1 {
124
+ ${t.actor1?`fill: ${t.actor1}`:""};
125
+ }
126
+ .actor-2 {
127
+ ${t.actor2?`fill: ${t.actor2}`:""};
128
+ }
129
+ .actor-3 {
130
+ ${t.actor3?`fill: ${t.actor3}`:""};
131
+ }
132
+ .actor-4 {
133
+ ${t.actor4?`fill: ${t.actor4}`:""};
134
+ }
135
+ .actor-5 {
136
+ ${t.actor5?`fill: ${t.actor5}`:""};
137
+ }
138
+ ${mt()}
139
+ `,"getStyles"),zt=Nt,tt=s(function(t,e){return ft(t,e)},"drawRect"),Wt=s(function(t,e){let f=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");r.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function u(g){let m=U().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(u,"smile");function p(g){let m=U().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(p,"sad");function o(g){g.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(o,"ambivalent"),e.score>3?u(r):e.score<3?p(r):o(r),f},"drawFace"),vt=s(function(t,e){let a=t.append("circle");return a.attr("cx",e.cx),a.attr("cy",e.cy),a.attr("class","actor-"+e.pos),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("r",e.r),a.class!==void 0&&a.attr("class",a.class),e.title!==void 0&&a.append("title").text(e.title),a},"drawCircle"),wt=s(function(t,e){return gt(t,e)},"drawText"),Ot=s(function(t,e){function a(r,u,p,o,g){return r+","+u+" "+(r+p)+","+u+" "+(r+p)+","+(u+o-g)+" "+(r+p-g*1.2)+","+(u+o)+" "+r+","+(u+o)}s(a,"genPoints");let f=t.append("polygon");f.attr("points",a(e.x,e.y,50,20,7)),f.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,wt(t,e)},"drawLabel"),Yt=s(function(t,e,a){let f=t.append("g"),r=Z();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=a.width*e.taskCount+a.diagramMarginX*(e.taskCount-1),r.height=a.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,tt(f,r),Tt(a)(e.text,f,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},a,e.colour)},"drawSection"),Q=-1,qt=s(function(t,e,a,f){let r=e.x+a.width/2,u=t.append("g");Q++,u.append("line").attr("id",f+"-task"+Q).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Wt(u,{cx:r,cy:300+(5-e.score)*30,score:e.score});let o=Z();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=a.width,o.height=a.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,tt(u,o);let g=e.x+14;e.people.forEach(m=>{let x=e.actors[m].color,h={cx:g,cy:e.y,r:7,fill:x,stroke:"#000",title:m,pos:e.actors[m].position};vt(u,h),g+=10}),Tt(a)(e.task,u,o.x,o.y,o.width,o.height,{class:"task"},a,e.colour)},"drawTask"),Ht=s(function(t,e){pt(t,e)},"drawBackgroundRect"),Tt=(function(){function t(r,u,p,o,g,m,x,h){let i=u.append("text").attr("x",p+g/2).attr("y",o+m/2+5).style("font-color",h).style("text-anchor","middle").text(r);f(i,x)}s(t,"byText");function e(r,u,p,o,g,m,x,h,i){let{taskFontSize:n,taskFontFamily:l}=h,y=r.split(/<br\s*\/?>/gi);for(let d=0;d<y.length;d++){let c=d*n-n*(y.length-1)/2,_=u.append("text").attr("x",p+g/2).attr("y",o).attr("fill",i).style("text-anchor","middle").style("font-size",n).style("font-family",l);_.append("tspan").attr("x",p+g/2).attr("dy",c).text(y[d]),_.attr("y",o+m/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),f(_,x)}}s(e,"byTspan");function a(r,u,p,o,g,m,x,h){let i=u.append("switch"),l=i.append("foreignObject").attr("x",p).attr("y",o).attr("width",g).attr("height",m).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(r),e(r,i,p,o,g,m,x,h),f(l,x)}s(a,"byFo");function f(r,u){for(let p in u)p in u&&r.attr(p,u[p])}return s(f,"_setTextAttrs"),function(r){return r.textPlacement==="fo"?a:r.textPlacement==="old"?t:e}})(),Xt=s(function(t,e){Q=-1,t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),j={drawRect:tt,drawCircle:vt,drawSection:Yt,drawText:wt,drawLabel:Ot,drawTask:qt,drawBackgroundRect:Ht,initGraphics:Xt},Gt=s(function(t){Object.keys(t).forEach(function(a){$[a]=t[a]})},"setConf"),E={},O=0;function St(t){let e=F().journey,a=e.maxLabelWidth;O=0;let f=60;Object.keys(E).forEach(r=>{let u=E[r].color,p={cx:20,cy:f,r:7,fill:u,stroke:"#000",pos:E[r].position};j.drawCircle(t,p);let o=t.append("text").attr("visibility","hidden").text(r),g=o.node().getBoundingClientRect().width;o.remove();let m=[];if(g<=a)m=[r];else{let x=r.split(" "),h="";o=t.append("text").attr("visibility","hidden"),x.forEach(i=>{let n=h?`${h} ${i}`:i;if(o.text(n),o.node().getBoundingClientRect().width>a){if(h&&m.push(h),h=i,o.text(i),o.node().getBoundingClientRect().width>a){let y="";for(let d of i)y+=d,o.text(y+"-"),o.node().getBoundingClientRect().width>a&&(m.push(y.slice(0,-1)+"-"),y=d);h=y}}else h=n}),h&&m.push(h),o.remove()}m.forEach((x,h)=>{let i={x:40,y:f+7+h*20,fill:"#666",text:x,textMargin:e.boxTextMargin??5},l=j.drawText(t,i).node().getBoundingClientRect().width;l>O&&l>e.leftMargin-l&&(O=l)}),f+=Math.max(20,m.length*20)})}s(St,"drawActorLegend");var $=F().journey,P=0,Ut=s(function(t,e,a,f){let r=F(),u=r.journey.titleColor,p=r.journey.titleFontSize,o=r.journey.titleFontFamily,g=r.securityLevel,m;g==="sandbox"&&(m=W("#i"+e));let x=g==="sandbox"?W(m.nodes()[0].contentDocument.body):W("body");S.init();let h=x.select("#"+e);j.initGraphics(h,e);let i=f.db.getTasks(),n=f.db.getDiagramTitle(),l=f.db.getActors();for(let C in E)delete E[C];let y=0;l.forEach(C=>{E[C]={color:$.actorColours[y%$.actorColours.length],position:y},y++}),St(h),P=$.leftMargin+O,S.insert(0,0,P,Object.keys(E).length*50),Zt(h,i,0,e);let d=S.getBounds();n&&h.append("text").text(n).attr("x",P).attr("font-size",p).attr("font-weight","bold").attr("y",25).attr("fill",u).attr("font-family",o);let c=d.stopy-d.starty+2*$.diagramMarginY,_=P+d.stopx+2*$.diagramMarginX;at(h,c,_,$.useMaxWidth),h.append("line").attr("x1",P).attr("y1",$.height*4).attr("x2",_-P-4).attr("y2",$.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");let k=n?70:0;h.attr("viewBox",`${d.startx} -25 ${_} ${c+k}`),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",c+k+25)},"draw"),S={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(t,e,a,f){t[e]===void 0?t[e]=a:t[e]=f(a,t[e])},"updateVal"),updateBounds:s(function(t,e,a,f){let r=F().journey,u=this,p=0;function o(g){return s(function(x){p++;let h=u.sequenceItems.length-p+1;u.updateVal(x,"starty",e-h*r.boxMargin,Math.min),u.updateVal(x,"stopy",f+h*r.boxMargin,Math.max),u.updateVal(S.data,"startx",t-h*r.boxMargin,Math.min),u.updateVal(S.data,"stopx",a+h*r.boxMargin,Math.max),g!=="activation"&&(u.updateVal(x,"startx",t-h*r.boxMargin,Math.min),u.updateVal(x,"stopx",a+h*r.boxMargin,Math.max),u.updateVal(S.data,"starty",e-h*r.boxMargin,Math.min),u.updateVal(S.data,"stopy",f+h*r.boxMargin,Math.max))},"updateItemBounds")}s(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:s(function(t,e,a,f){let r=Math.min(t,a),u=Math.max(t,a),p=Math.min(e,f),o=Math.max(e,f);this.updateVal(S.data,"startx",r,Math.min),this.updateVal(S.data,"starty",p,Math.min),this.updateVal(S.data,"stopx",u,Math.max),this.updateVal(S.data,"stopy",o,Math.max),this.updateBounds(r,p,u,o)},"insert"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},J=$.sectionFills,bt=$.sectionColours,Zt=s(function(t,e,a,f){let r=F().journey,u="",p=r.height*2+r.diagramMarginY,o=a+p,g=0,m="#CCC",x="black",h=0;for(let[i,n]of e.entries()){if(u!==n.section){m=J[g%J.length],h=g%J.length,x=bt[g%bt.length];let y=0,d=n.section;for(let _=i;_<e.length&&e[_].section==d;_++)y=y+1;let c={x:i*r.taskMargin+i*r.width+P,y:50,text:n.section,fill:m,num:h,colour:x,taskCount:y};j.drawSection(t,c,r),u=n.section,g++}let l=n.people.reduce((y,d)=>(E[d]&&(y[d]=E[d]),y),{});n.x=i*r.taskMargin+i*r.width+P,n.y=o,n.width=r.diagramMarginX,n.height=r.diagramMarginY,n.colour=x,n.fill=m,n.num=h,n.actors=l,j.drawTask(t,n,r,f),S.insert(n.x,n.y,n.x+n.width+r.taskMargin,450)}},"drawTasks"),_t={setConf:Gt,draw:Ut},ne={parser:Pt,db:kt,renderer:_t,styles:zt,init:s(t=>{_t.setConf(t.journey),kt.clear()},"init")};export{ne as diagram};
@@ -0,0 +1,89 @@
1
+ import{a as Ee}from"./chunk-NBH7YOBD.js";import{a as pe}from"./chunk-VOCDYA3H.js";import{a as fe,b as be}from"./chunk-XNXYDBKX.js";import{d as ye,g as ke,j as me}from"./chunk-MYMJLHQL.js";import"./chunk-YORIST7Z.js";import"./chunk-QBPQ7DPE.js";import"./chunk-GSOU4UTT.js";import"./chunk-IP56FOSI.js";import"./chunk-CBGUD2NP.js";import"./chunk-6DCNDVBX.js";import"./chunk-22DRK7VS.js";import{H as B,P as de,_ as M,c as ge,d as te,e as ne,k as W}from"./chunk-7CSIRG7W.js";import{b as Y}from"./chunk-ERWOH47R.js";import{a as o}from"./chunk-EIBFAW37.js";import"./chunk-LGUG3SQB.js";import"./chunk-6DHFEWGX.js";var ie=(function(){var e=o(function(O,i,n,s){for(n=n||{},s=O.length;s--;n[O[s]]=i);return n},"o"),u=[1,4],p=[1,13],r=[1,12],d=[1,15],m=[1,16],k=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],E=[6,7,11],U=[1,31],N=[6,7,11,24],j=[1,6,13,16,17,20,23],f=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],H=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(i,n,s,a,h,t,R){var c=t.length-1;switch(h){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:u},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:u},{6:p,7:[1,10],9:9,12:11,13:r,14:14,16:d,17:m,18:17,19:18,20:k,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:r,14:14,16:d,17:m,18:17,19:18,20:k,23:l},{6:p,9:22,12:11,13:r,14:14,16:d,17:m,18:17,19:18,20:k,23:l},{6:I,7:g,10:23,11:w},e(E,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:k,23:l}),e(E,[2,19]),e(E,[2,21],{15:30,24:U}),e(E,[2,22]),e(E,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:r,14:14,16:d,17:m,18:17,19:18,20:k,23:l},e(j,[2,14],{7:f,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(E,[2,16],{15:37,24:U}),e(E,[2,17]),e(E,[2,18]),e(E,[2,20],{24:H}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(j,[2,13],{7:f,11:A}),e(L,[2,11]),e(L,[2,12]),e(E,[2,15],{24:H}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var s=new Error(i);throw s.hash=n,s}},"parseError"),parse:o(function(i){var n=this,s=[0],a=[],h=[null],t=[],R=this.table,c="",z=0,oe=0,ce=0,Se=2,le=1,Ne=t.slice.call(arguments,1),y=Object.create(this.lexer),P={yy:{}};for(var q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,q)&&(P.yy[q]=this.yy[q]);y.setInput(i,P.yy),P.yy.lexer=y,P.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Q=y.yylloc;t.push(Q);var xe=y.options&&y.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ve(S){s.length=s.length-2*S,h.length=h.length-S,t.length=t.length-S}o(ve,"popStack");function he(){var S;return S=a.pop()||y.lex()||le,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(he,"lex");for(var _,Z,V,x,We,$,G={},X,C,ue,K;;){if(V=s[s.length-1],this.defaultActions[V]?x=this.defaultActions[V]:((_===null||typeof _>"u")&&(_=he()),x=R[V]&&R[V][_]),typeof x>"u"||!x.length||!x[0]){var ee="";K=[];for(X in R[V])this.terminals_[X]&&X>Se&&K.push("'"+this.terminals_[X]+"'");y.showPosition?ee="Parse error on line "+(z+1)+`:
2
+ `+y.showPosition()+`
3
+ Expecting `+K.join(", ")+", got '"+(this.terminals_[_]||_)+"'":ee="Parse error on line "+(z+1)+": Unexpected "+(_==le?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(ee,{text:y.match,token:this.terminals_[_]||_,line:y.yylineno,loc:Q,expected:K})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+_);switch(x[0]){case 1:s.push(_),h.push(y.yytext),t.push(y.yylloc),s.push(x[1]),_=null,Z?(_=Z,Z=null):(oe=y.yyleng,c=y.yytext,z=y.yylineno,Q=y.yylloc,ce>0&&ce--);break;case 2:if(C=this.productions_[x[1]][1],G.$=h[h.length-C],G._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},xe&&(G._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),$=this.performAction.apply(G,[c,oe,z,P.yy,x[1],h,t].concat(Ne)),typeof $<"u")return $;C&&(s=s.slice(0,-1*C*2),h=h.slice(0,-1*C),t=t.slice(0,-1*C)),s.push(this.productions_[x[1]][0]),h.push(G.$),t.push(G._$),ue=R[s[s.length-2]][s[s.length-1]],s.push(ue);break;case 3:return!0}}return!0},"parse")},J=(function(){var O={EOF:1,parseError:o(function(n,s){if(this.yy.parser)this.yy.parser.parseError(n,s);else throw new Error(n)},"parseError"),setInput:o(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:o(function(i){var n=i.length,s=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var h=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===a.length?this.yylloc.first_column:0)+a[a.length-s.length].length-s[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
+ `+n+"^"},"showPosition"),test_match:o(function(i,n){var s,a,h;if(this.options.backtrack_lexer&&(h={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(h.yylloc.range=this.yylloc.range.slice(0))),a=i[0].match(/(?:\r\n?|\n).*/g),a&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],s=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var t in h)this[t]=h[t];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,n,s,a;this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),t=0;t<h.length;t++)if(s=this._input.match(this.rules[h[t]]),s&&(!n||s[0].length>n[0].length)){if(n=s,a=t,this.options.backtrack_lexer){if(i=this.test_match(s,h[t]),i!==!1)return i;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(i=this.test_match(n,h[a]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var n=this.next();return n||this.lex()},"lex"),begin:o(function(n){this.conditionStack.push(n)},"begin"),popState:o(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:o(function(n){this.begin(n)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(n,s,a,h){var t=h;switch(a){case 0:return this.pushState("shapeData"),s.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let R=/\n\s*/g;return s.yytext=s.yytext.replace(R,"<br/>"),24;break;case 4:return 24;case 5:this.popState();break;case 6:return n.getLogger().trace("Found comment",s.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return n.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:n.getLogger().trace("end icon"),this.popState();break;case 16:return n.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return n.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return n.getLogger().trace("description:",s.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),n.getLogger().trace("node end ...",s.yytext),"NODE_DEND";break;case 36:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return n.getLogger().trace("Long description:",s.yytext),21;break;case 42:return n.getLogger().trace("Long description:",s.yytext),21;break}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return O})();T.lexer=J;function F(){this.yy={}}return o(F,"Parser"),F.prototype=T,T.Parser=F,new F})();ie.parser=ie;var De=ie,v=[],se=[],re=0,ae={},Le=o(()=>{v=[],se=[],re=0,ae={}},"clear"),Oe=o(e=>{if(v.length===0)return null;let u=v[0].level,p=null;for(let r=v.length-1;r>=0;r--)if(v[r].level===u&&!p&&(p=v[r]),v[r].level<u)throw new Error('Items without section detected, found section ("'+v[r].label+'")');return e===p?.level?null:p},"getSection"),_e=o(function(){return se},"getSections"),Ie=o(function(){let e=[],u=[],p=_e(),r=M();for(let d of p){let m={id:d.id,label:B(d.label??"",r),labelType:"markdown",isGroup:!0,ticket:d.ticket,shape:"kanbanSection",level:d.level,look:r.look};u.push(m);let k=v.filter(l=>l.parentId===d.id);for(let l of k){let D={id:l.id,parentId:d.id,label:B(l.label??"",r),labelType:"markdown",isGroup:!1,ticket:l?.ticket,priority:l?.priority,assigned:l?.assigned,icon:l?.icon,shape:"kanbanItem",level:l.level,rx:5,ry:5,cssStyles:["text-align: left"]};u.push(D)}}return{nodes:u,edges:e,other:{},config:M()}},"getData"),Ce=o((e,u,p,r,d)=>{let m=M(),k=m.mindmap?.padding??W.mindmap.padding;switch(r){case b.ROUNDED_RECT:case b.RECT:case b.HEXAGON:k*=2}let l={id:B(u,m)||"kbn"+re++,level:e,label:B(p,m),width:m.mindmap?.maxNodeWidth??W.mindmap.maxNodeWidth,padding:k,isGroup:!1};if(d!==void 0){let I;d.includes(`
7
+ `)?I=d+`
8
+ `:I=`{
9
+ `+d+`
10
+ }`;let g=be(I,{schema:fe});if(g.shape&&(g.shape!==g.shape.toLowerCase()||g.shape.includes("_")))throw new Error(`No such shape: ${g.shape}. Shape names should be lowercase.`);g?.shape&&g.shape==="kanbanItem"&&(l.shape=g?.shape),g?.label&&(l.label=g?.label),g?.icon&&(l.icon=g?.icon.toString()),g?.assigned&&(l.assigned=g?.assigned.toString()),g?.ticket&&(l.ticket=g?.ticket.toString()),g?.priority&&(l.priority=g?.priority)}let D=Oe(e);D?l.parentId=D.id||"kbn"+re++:se.push(l),v.push(l)},"addNode"),b={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},we=o((e,u)=>{switch(Y.debug("In get type",e,u),e){case"[":return b.RECT;case"(":return u===")"?b.ROUNDED_RECT:b.CLOUD;case"((":return b.CIRCLE;case")":return b.CLOUD;case"))":return b.BANG;case"{{":return b.HEXAGON;default:return b.DEFAULT}},"getType"),Ae=o((e,u)=>{ae[e]=u},"setElementForId"),Te=o(e=>{if(!e)return;let u=M(),p=v[v.length-1];e.icon&&(p.icon=B(e.icon,u)),e.class&&(p.cssClasses=B(e.class,u))},"decorateNode"),Re=o(e=>{switch(e){case b.DEFAULT:return"no-border";case b.RECT:return"rect";case b.ROUNDED_RECT:return"rounded-rect";case b.CIRCLE:return"circle";case b.CLOUD:return"cloud";case b.BANG:return"bang";case b.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Pe=o(()=>Y,"getLogger"),Ve=o(e=>ae[e],"getElementById"),Be={clear:Le,addNode:Ce,getSections:_e,getData:Ie,nodeType:b,getType:we,setElementForId:Ae,decorateNode:Te,type2Str:Re,getLogger:Pe,getElementById:Ve},je=Be,Fe=o(async(e,u,p,r)=>{Y.debug(`Rendering kanban diagram
11
+ `+e);let m=r.db.getData(),k=M();k.htmlLabels=!1;let l=pe(u);for(let f of m.nodes)f.domId=`${u}-${f.id}`;let D=l.append("g");D.attr("class","sections");let I=l.append("g");I.attr("class","items");let g=m.nodes.filter(f=>f.isGroup),w=0,E=10,U=[],N=25;for(let f of g){let A=k?.kanban?.sectionWidth||200;w=w+1,f.x=A*w+(w-1)*E/2,f.width=A,f.y=0,f.height=A*3,f.rx=5,f.ry=5,f.cssClasses=f.cssClasses+" section-"+w;let L=await ye(D,f);N=Math.max(N,L?.labelBBox?.height),U.push(L)}let j=0;for(let f of g){let A=U[j];j=j+1;let L=k?.kanban?.sectionWidth||200,H=-L*3/2+N,T=H,J=m.nodes.filter(i=>i.parentId===f.id);for(let i of J){if(i.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");i.x=f.x,i.width=L-1.5*E;let s=(await ke(I,i,{config:k})).node().getBBox();i.y=T+s.height/2,await me(i),T=i.y+s.height/2+E/2}let F=A.cluster.select("rect"),O=Math.max(T-H+3*E,50)+(N-25);F.attr("height",O)}de(void 0,l,k.mindmap?.padding??W.kanban.padding,k.mindmap?.useMaxWidth??W.kanban.useMaxWidth)},"draw"),Ge={draw:Fe},Me=o(e=>{let u="";for(let r=0;r<e.THEME_COLOR_LIMIT;r++)e["lineColor"+r]=e["lineColor"+r]||e["cScaleInv"+r],ge(e["lineColor"+r])?e["lineColor"+r]=te(e["lineColor"+r],20):e["lineColor"+r]=ne(e["lineColor"+r],20);let p=o((r,d)=>e.darkMode?ne(r,d):te(r,d),"adjuster");for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let d=""+(17-3*r);u+=`
12
+ .section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} polygon, .section-${r-1} path {
13
+ fill: ${p(e["cScale"+r],10)};
14
+ stroke: ${p(e["cScale"+r],10)};
15
+
16
+ }
17
+ .section-${r-1} text {
18
+ fill: ${e["cScaleLabel"+r]};
19
+ }
20
+ .node-icon-${r-1} {
21
+ font-size: 40px;
22
+ color: ${e["cScaleLabel"+r]};
23
+ }
24
+ .section-edge-${r-1}{
25
+ stroke: ${e["cScale"+r]};
26
+ }
27
+ .edge-depth-${r-1}{
28
+ stroke-width: ${d};
29
+ }
30
+ .section-${r-1} line {
31
+ stroke: ${e["cScaleInv"+r]} ;
32
+ stroke-width: 3;
33
+ }
34
+
35
+ .disabled, .disabled circle, .disabled text {
36
+ fill: lightgray;
37
+ }
38
+ .disabled text {
39
+ fill: #efefef;
40
+ }
41
+
42
+ .node rect,
43
+ .node circle,
44
+ .node ellipse,
45
+ .node polygon,
46
+ .node path {
47
+ fill: ${e.background};
48
+ stroke: ${e.nodeBorder};
49
+ stroke-width: 1px;
50
+ }
51
+
52
+ .kanban-ticket-link {
53
+ fill: ${e.background};
54
+ stroke: ${e.nodeBorder};
55
+ text-decoration: underline;
56
+ }
57
+ `}return u},"genSections"),Ue=o(e=>`
58
+ .edge {
59
+ stroke-width: 3;
60
+ }
61
+ ${Me(e)}
62
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
63
+ fill: ${e.git0};
64
+ }
65
+ .section-root text {
66
+ fill: ${e.gitBranchLabel0};
67
+ }
68
+ .icon-container {
69
+ height:100%;
70
+ display: flex;
71
+ justify-content: center;
72
+ align-items: center;
73
+ }
74
+ .edge {
75
+ fill: none;
76
+ }
77
+ .cluster-label, .label {
78
+ color: ${e.textColor};
79
+ fill: ${e.textColor};
80
+ }
81
+ .kanban-label {
82
+ dy: 1em;
83
+ alignment-baseline: middle;
84
+ text-anchor: middle;
85
+ dominant-baseline: middle;
86
+ text-align: center;
87
+ }
88
+ ${Ee()}
89
+ `,"getStyles"),He=Ue,rt={db:je,renderer:Ge,parser:De,styles:He};export{rt as diagram};