@axiom-lattice/gateway 11.1.0 → 11.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 (102) hide show
  1. package/dist/{chunk-JUA3VJE7.mjs → chunk-MQQGGIWU.mjs} +5 -19
  2. package/dist/{chunk-JUA3VJE7.mjs.map → chunk-MQQGGIWU.mjs.map} +1 -1
  3. package/dist/chunk-PSOMTQPW.mjs +138 -0
  4. package/dist/chunk-PSOMTQPW.mjs.map +1 -0
  5. package/dist/embed/embed-page-AgentDetailSideApp-UGLFIWJ3.js +1 -0
  6. package/dist/embed/embed-page-AgentGovernanceWorkbench-HZXQSMH2.js +1 -0
  7. package/dist/embed/{embed-page-LangfuseDashboard-HEHIDTTV.js → embed-page-LangfuseDashboard-L2LCWTBP.js} +1 -1
  8. package/dist/embed/embed-page-MessageGraph-BQUYKIK3.js +6 -0
  9. package/dist/embed/embed-page-ReactChart-5C6FIRZ4.js +1 -0
  10. package/dist/embed/embed-page-SkillFlow-MP72HEKD.js +1 -0
  11. package/dist/embed/{embed-page-TasksSideApp-PJ5LIIMG.js → embed-page-TasksSideApp-5JDZKFUH.js} +1 -1
  12. package/dist/embed/embed-page-TenantMonitorPanel-TIGNG44X.js +1 -0
  13. package/dist/embed/embed-page-ThreadMaintenancePanel-3OPCUQTF.js +1 -0
  14. package/dist/embed/{embed-page-TopologyRuntimeView-4UNE3VG5.js → embed-page-TopologyRuntimeView-7BRFAWID.js} +1 -1
  15. package/dist/embed/{embed-page-WorkflowAutomationView-AMNUEPOW.js → embed-page-WorkflowAutomationView-DKFNUAZY.js} +1 -1
  16. package/dist/embed/{embed-page-abnfDiagram-N423BO3Z-4HBLZWO7.js → embed-page-abnfDiagram-N423BO3Z-CRB43OW3.js} +1 -1
  17. package/dist/embed/embed-page-all-BS2CILLD.js +1 -0
  18. package/dist/embed/{embed-page-architectureDiagram-T3A2C74G-ZMH2RUZR.js → embed-page-architectureDiagram-T3A2C74G-N4QJM7EZ.js} +1 -1
  19. package/dist/embed/{embed-page-chunk-YW3P73TT.js → embed-page-chunk-32KEPBH4.js} +1 -1
  20. package/dist/embed/{embed-page-chunk-DFAZQFX4.js → embed-page-chunk-36VOH7DG.js} +13 -13
  21. package/dist/embed/{embed-page-chunk-UE7LEPK3.js → embed-page-chunk-77S6GKXR.js} +1 -1
  22. package/dist/embed/{embed-page-chunk-QPWSDWJ2.js → embed-page-chunk-7EEAFSMK.js} +1 -1
  23. package/dist/embed/{embed-page-chunk-EEHCG6K2.js → embed-page-chunk-A4EW4WEZ.js} +1 -1
  24. package/dist/embed/{embed-page-chunk-2LEOOAXJ.js → embed-page-chunk-A4I7H7RP.js} +1 -1
  25. package/dist/embed/{embed-page-chunk-UWC5QL3B.js → embed-page-chunk-BPNG3LLL.js} +1 -1
  26. package/dist/embed/{embed-page-chunk-YGBGMNRQ.js → embed-page-chunk-CBD4QXF2.js} +1 -1
  27. package/dist/embed/{embed-page-chunk-W4W6GR5T.js → embed-page-chunk-CR6PEMSJ.js} +1 -1
  28. package/dist/embed/{embed-page-chunk-JUZFORQA.js → embed-page-chunk-CS6LWVK2.js} +1 -1
  29. package/dist/embed/{embed-page-chunk-GD245YMF.js → embed-page-chunk-CSRF4YQD.js} +6 -6
  30. package/dist/embed/{embed-page-chunk-RPGUOUD3.js → embed-page-chunk-EMCH2FMD.js} +1 -1
  31. package/dist/embed/{embed-page-chunk-V5NE4FIR.js → embed-page-chunk-F52TPGBP.js} +1 -1
  32. package/dist/embed/embed-page-chunk-F5RPCW5O.js +216 -0
  33. package/dist/embed/embed-page-chunk-FYIVKZA2.js +1 -0
  34. package/dist/embed/{embed-page-chunk-TUVY65HW.js → embed-page-chunk-HGFIZATQ.js} +1 -1
  35. package/dist/embed/{embed-page-chunk-52VIWQVA.js → embed-page-chunk-HJYCGHWQ.js} +139 -139
  36. package/dist/embed/{embed-page-chunk-BJESMNTG.js → embed-page-chunk-I6Q3MSI4.js} +1 -1
  37. package/dist/embed/{embed-page-chunk-ZYYH2WHW.js → embed-page-chunk-IKESLNJH.js} +1 -1
  38. package/dist/embed/{embed-page-chunk-7IPWMDQ3.js → embed-page-chunk-OZUFLDHF.js} +1 -1
  39. package/dist/embed/embed-page-chunk-Q54ZBF3I.js +2 -0
  40. package/dist/embed/{embed-page-chunk-TWJOR2LG.js → embed-page-chunk-QWLZN3EX.js} +102 -102
  41. package/dist/embed/embed-page-chunk-VRVIRMMM.js +1 -0
  42. package/dist/embed/{embed-page-chunk-7TINC3YA.js → embed-page-chunk-WMHFEZXB.js} +1 -1
  43. package/dist/embed/{embed-page-chunk-SFG3O43S.js → embed-page-chunk-XGZYUTPS.js} +1 -1
  44. package/dist/embed/{embed-page-chunk-NY2J2ZAX.js → embed-page-chunk-ZX5EBQI5.js} +1 -1
  45. package/dist/embed/{embed-page-classDiagram-JCYQIIEL-QS7YU54N.js → embed-page-classDiagram-JCYQIIEL-NUQ6QNVB.js} +1 -1
  46. package/dist/embed/{embed-page-classDiagram-v2-OCEON4UE-EMQVQCCM.js → embed-page-classDiagram-v2-OCEON4UE-PGDM7DLE.js} +1 -1
  47. package/dist/embed/{embed-page-code-highlighter-LFX62WWR.js → embed-page-code-highlighter-VEQOWOHE.js} +1 -1
  48. package/dist/embed/{embed-page-cynefinDiagram-MW4NZA55-PAQOPJV2.js → embed-page-cynefinDiagram-MW4NZA55-WVU5T5A4.js} +1 -1
  49. package/dist/embed/{embed-page-dagre-VZM6K2ZE-35URH6ZO.js → embed-page-dagre-VZM6K2ZE-CAXZPEHO.js} +1 -1
  50. package/dist/embed/{embed-page-diagram-7IWD3JNH-CYEWFX2M.js → embed-page-diagram-7IWD3JNH-2RDNXDA6.js} +1 -1
  51. package/dist/embed/{embed-page-diagram-B4RE2ZJO-YQLA7HKI.js → embed-page-diagram-B4RE2ZJO-ZQTDRA2Q.js} +1 -1
  52. package/dist/embed/{embed-page-diagram-LBJQPF4R-R5X23WLT.js → embed-page-diagram-LBJQPF4R-QMUPQDDN.js} +1 -1
  53. package/dist/embed/{embed-page-diagram-Q27KOJAE-CSOUXGQI.js → embed-page-diagram-Q27KOJAE-SNK7KL7X.js} +1 -1
  54. package/dist/embed/{embed-page-diagram-UB23O5K3-ZYKI7DKR.js → embed-page-diagram-UB23O5K3-BTZB45HL.js} +1 -1
  55. package/dist/embed/{embed-page-ebnfDiagram-BXEA7PRR-AXHHSO6J.js → embed-page-ebnfDiagram-BXEA7PRR-6YXIIO2V.js} +1 -1
  56. package/dist/embed/{embed-page-en-3ML3AIGI.js → embed-page-en-2PUUB6AU.js} +1 -1
  57. package/dist/embed/embed-page-en-WCGOIHE7.js +1 -0
  58. package/dist/embed/{embed-page-erDiagram-JOGREHBK-TIWNY54V.js → embed-page-erDiagram-JOGREHBK-L5HOOC7O.js} +1 -1
  59. package/dist/embed/{embed-page-flowDiagram-UKHOOZJN-YZBV5FD5.js → embed-page-flowDiagram-UKHOOZJN-DG3SO7VX.js} +1 -1
  60. package/dist/embed/{embed-page-gitGraphDiagram-DS77QQ5N-JXOCEBS4.js → embed-page-gitGraphDiagram-DS77QQ5N-N2FD2D7W.js} +1 -1
  61. package/dist/embed/{embed-page-infoDiagram-6WML65LV-JXXYLFOE.js → embed-page-infoDiagram-6WML65LV-EQW3XJ3V.js} +1 -1
  62. package/dist/embed/{embed-page-kanban-definition-27J2QSJJ-GLES277J.js → embed-page-kanban-definition-27J2QSJJ-N2UULQCD.js} +1 -1
  63. package/dist/embed/{embed-page-mermaid-TRGRXQWI.js → embed-page-mermaid-VMLRSGBS.js} +2 -2
  64. package/dist/embed/{embed-page-mindmap-definition-FAOFIHXS-IK7SJKOY.js → embed-page-mindmap-definition-FAOFIHXS-HTKLKWBW.js} +1 -1
  65. package/dist/embed/{embed-page-pegDiagram-VL7TDLO6-WTW3QO5Z.js → embed-page-pegDiagram-VL7TDLO6-SA6LNRAH.js} +1 -1
  66. package/dist/embed/{embed-page-pieDiagram-7S7Q4E2Y-IO7RF3AF.js → embed-page-pieDiagram-7S7Q4E2Y-OMYAEVGG.js} +1 -1
  67. package/dist/embed/{embed-page-railroadDiagram-AXF67PYL-OW3L5JI4.js → embed-page-railroadDiagram-AXF67PYL-BDS2I2BL.js} +1 -1
  68. package/dist/embed/{embed-page-requirementDiagram-LRYGKXZP-APMTCGOA.js → embed-page-requirementDiagram-LRYGKXZP-7TQTEVRC.js} +1 -1
  69. package/dist/embed/{embed-page-stateDiagram-OKZ733FA-DYGG6K57.js → embed-page-stateDiagram-OKZ733FA-AJO67KCZ.js} +1 -1
  70. package/dist/embed/{embed-page-stateDiagram-v2-UEYNNEHI-BZIFN7WW.js → embed-page-stateDiagram-v2-UEYNNEHI-4ISQYRGQ.js} +1 -1
  71. package/dist/embed/{embed-page-swimlanes-SLNWSIFB-OKHSRANK.js → embed-page-swimlanes-SLNWSIFB-PEXIKADL.js} +1 -1
  72. package/dist/embed/{embed-page-swimlanesDiagram-ULZ7WXOC-CTOAIWO4.js → embed-page-swimlanesDiagram-ULZ7WXOC-M76ES3LS.js} +1 -1
  73. package/dist/embed/embed-page-t4-vb-FJS5HDYF.js +1 -0
  74. package/dist/embed/{embed-page-wardleyDiagram-T6FBY63Y-DL57P2VA.js → embed-page-wardleyDiagram-T6FBY63Y-B4SOYBIA.js} +1 -1
  75. package/dist/embed/embed-page-zh-JI3RZIRT.js +1 -0
  76. package/dist/embed/{embed-page-zh-ARIKNWNS.js → embed-page-zh-NFR2SOHA.js} +1 -1
  77. package/dist/embed/embed-page.js +1 -1
  78. package/dist/embed/mcp-app-page.js +36 -36
  79. package/dist/index.js +1383 -1075
  80. package/dist/index.js.map +1 -1
  81. package/dist/index.mjs +606 -452
  82. package/dist/index.mjs.map +1 -1
  83. package/dist/{open-TJLQARLV.mjs → open-IA7RD66P.mjs} +3 -2
  84. package/dist/{open-TJLQARLV.mjs.map → open-IA7RD66P.mjs.map} +1 -1
  85. package/dist/open-audit-B756NMRP.mjs +67 -0
  86. package/dist/open-audit-B756NMRP.mjs.map +1 -0
  87. package/dist/{open-files-QIMOTHSN.mjs → open-files-JKHNZ5FF.mjs} +3 -2
  88. package/dist/{open-files-QIMOTHSN.mjs.map → open-files-JKHNZ5FF.mjs.map} +1 -1
  89. package/package.json +8 -8
  90. package/dist/embed/embed-page-AgentDetailSideApp-CZFD577F.js +0 -1
  91. package/dist/embed/embed-page-AgentGovernanceWorkbench-BPNTELS5.js +0 -1
  92. package/dist/embed/embed-page-MessageGraph-W5KMRMHF.js +0 -6
  93. package/dist/embed/embed-page-ReactChart-LOQULL4T.js +0 -1
  94. package/dist/embed/embed-page-SkillFlow-4KLNJILK.js +0 -1
  95. package/dist/embed/embed-page-ThreadMaintenancePanel-NTWT4SEQ.js +0 -1
  96. package/dist/embed/embed-page-all-6R5IZE46.js +0 -1
  97. package/dist/embed/embed-page-chunk-LMWLK4X2.js +0 -1
  98. package/dist/embed/embed-page-chunk-ZZPEVBX2.js +0 -217
  99. package/dist/embed/embed-page-t4-vb-5IKMGA3I.js +0 -1
  100. package/dist/open-audit-UJ3NXCGW.mjs +0 -32
  101. package/dist/open-audit-UJ3NXCGW.mjs.map +0 -1
  102. /package/dist/embed/{embed-page-chunk-XRN4MSDO.js → embed-page-chunk-3NCDEXPW.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{a as pt}from"./embed-page-chunk-GA5A7NLC.js";import{a as yt}from"./embed-page-chunk-W2KSSDKP.js";import{a as ut}from"./embed-page-chunk-XRN4MSDO.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-2RWSBPM5.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-YO55GEK3.js";import{o as X}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{N as rt,S as it,T as st,U as ct,V as lt,W as dt,X as ft,Y as mt,h as Q,j as at,t as O}from"./embed-page-chunk-FPA5BD6K.js";import{b as E}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import{a as r}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var xt=r(()=>({domains:new Map,transitions:[]}),"createDefaultData"),G=xt(),St=r(()=>G.domains,"getDomains"),Mt=r(()=>G.transitions,"getTransitions"),zt=r(t=>{if(t)for(let e of t){let n=e.domain,o=(e.items??[]).map(c=>({label:c.label}));G.domains.set(n,{name:n,items:o})}},"setDomains"),Lt=r(t=>{t&&(G.transitions=t.filter(e=>e.from===e.to?(E.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=r(()=>X({...at.cynefin,...O().cynefin}),"getConfig"),Pt=r(()=>{it(),G=xt()},"clear"),j={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:st,getAccTitle:ct,setDiagramTitle:ft,getDiagramTitle:mt,getAccDescription:dt,setAccDescription:lt},It=r(t=>{yt(t,j),j.setDomains(t.domains),j.setTransitions(t.transitions)},"populate"),Wt={parse:r(async t=>{let e=await ut("cynefin",t);E.debug(e),It(e)},"parse")};function H(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}r(H,"seededRandom");function gt(t){let e=0;for(let n=0;n<t.length;n++){let o=t.charCodeAt(n);e=(e<<5)-e+o,e|=0}return e}r(gt,"hashString");function $t(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:gt(e)}r($t,"resolveSeed");function bt(t,e,n,o){let c=t/2,m=o??t*.015,v=7,W=e/v,d=[];for(let a=0;a<=v;a++){let p=H(n+a*17)*m*2-m;d.push({x:c+p,y:a*W})}let D=`M${d[0].x},${d[0].y}`;for(let a=0;a<d.length-1;a++){let p=d[a],s=d[a+1],f=(p.y+s.y)/2,b=a%2===0?1:-1,h=m*1.5*b*H(n+a*31+7),R=p.x+h,F=f,V=s.x-h;D+=` C${R},${F} ${V},${f} ${s.x},${s.y}`}return D}r(bt,"generateFoldPath");function wt(t,e,n,o){let c=e/2,m=o??e*.015,v=7,W=t/v,d=[];for(let a=0;a<=v;a++){let p=H(n+a*23)*m*2-m;d.push({x:a*W,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let a=0;a<d.length-1;a++){let p=d[a],s=d[a+1],f=(p.x+s.x)/2,b=a%2===0?1:-1,h=m*1.5*b*H(n+a*37+11),R=f,F=p.y+h,V=f,z=s.y-h;D+=` C${R},${F} ${V},${z} ${s.x},${s.y}`}return D}r(wt,"generateHorizontalBoundary");function Ct(t,e){let n=t/2,o=e*.5,c=e,m=t*.03;return[`M${n},${o}`,`C${n+m},${o+(c-o)*.2}`,`${n-m*1.5},${o+(c-o)*.55}`,`${n+m*.5},${o+(c-o)*.75}`,`C${n-m},${o+(c-o)*.85}`,`${n+m*.3},${o+(c-o)*.95}`,`${n},${c}`].join(" ")}r(Ct,"generateCliffPath");function vt(t,e,n,o){return[`M${t-n},${e}`,`A${n},${o} 0 1,1 ${t+n},${e}`,`A${n},${o} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}r(vt,"generateConfusionPath");var ht={complex:{model:"Probe \u2192 Sense \u2192 Respond",practice:"Emergent Practices"},complicated:{model:"Sense \u2192 Analyse \u2192 Respond",practice:"Good Practices"},clear:{model:"Sense \u2192 Categorise \u2192 Respond",practice:"Best Practices"},chaotic:{model:"Act \u2192 Sense \u2192 Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Rt=r((t,e)=>{let n=t/2,o=e/2;return{complex:{cx:n/2,cy:o/2,x:0,y:0,w:n,h:o},complicated:{cx:n+n/2,cy:o/2,x:n,y:0,w:n,h:o},chaotic:{cx:n/2,cy:o+o/2,x:0,y:o,w:n,h:o},clear:{cx:n+n/2,cy:o+o/2,x:n,y:o,w:n,h:o},confusion:{cx:n,cy:o,x:n*.7,y:o*.7,w:n*.6,h:o*.6}}},"getDomainLayouts"),Ft=r(()=>{let t=Q(),e=O();return X(t,e.themeVariables).cynefin},"getCynefinDomainColors"),Z=3,Vt=r((t,e,n,o)=>{let c=o.db,m=c.getDomains(),v=c.getTransitions(),W=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),a=c.getConfig(),p=Ft();E.debug("Rendering Cynefin diagram");let s=a.width,f=a.height,b=a.padding,h=a.showDomainDescriptions,R=a.boundaryAmplitude,F=s+b*2,V=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=pt(e);rt(k,V,F,a.useMaxWidth??!0),k.attr("viewBox",`0 0 ${F} ${V}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);let T=k.append("g").attr("transform",`translate(${b}, ${b})`),_=Rt(s,f),J=$t(a.seed,e),Dt=T.append("g").attr("class","cynefin-backgrounds"),q=["complex","complicated","chaotic","clear"];for(let l of q){let i=_[l];Dt.append("rect").attr("class","cynefinDomain").attr("x",i.x).attr("y",i.y).attr("width",i.w).attr("height",i.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}let U=T.append("g").attr("class","cynefin-boundaries");U.append("path").attr("class","cynefinBoundary").attr("d",bt(s,f,J,R)).attr("fill","none"),U.append("path").attr("class","cynefinBoundary").attr("d",wt(s,f,J+100,R)).attr("fill","none"),U.append("path").attr("class","cynefinCliff").attr("d",Ct(s,f)).attr("fill","none");let kt=s*.15,Tt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",vt(s/2,f/2,kt,Tt)).attr("fill",z.confusion).attr("fill-opacity",.5);let K=T.append("g").attr("class","cynefin-labels");for(let l of q){let i=_[l];K.append("text").attr("class","cynefinDomainLabel").attr("x",i.cx).attr("y",h?i.cy-30:i.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(K.append("text").attr("class","cynefinDomainLabel").attr("x",s/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){let l=T.append("g").attr("class","cynefin-subtitles");for(let i of q){let u=_[i],y=ht[i];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",s/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(ht.confusion.practice)}let tt=T.append("g").attr("class","cynefin-items"),A=26,et=10,At=["complex","complicated","chaotic","clear","confusion"];for(let l of At){let i=m.get(l);if(!i||i.items.length===0)continue;let u=_[l],y=l==="confusion",L=i.items,N=0;y&&i.items.length>Z&&(N=i.items.length-Z,L=i.items.slice(0,Z));let B;if(y){let g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{let w=B+S*(A+4),M=tt.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label),$=g.label.length*7,x=P.node();if(x&&typeof x.getBBox=="function"){let Y=x.getBBox();Y.width>0&&($=Y.width)}let C=$+et*2,I=u.cx-C/2;M.attr("transform",`translate(${I}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",A/2)}),N>0){let g=B+L.length*(A+4),S=`+${N} more`,w=tt.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S),P=S.length*7,$=M.node();if($&&typeof $.getBBox=="function"){let I=$.getBBox();I.width>0&&(P=I.width)}let x=P+et*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){let l=k.select("defs").empty()?k.append("defs"):k.select("defs"),i=`cynefin-arrow-${e}`;l.append("marker").attr("id",i).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");let u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{let L=_[y.from],N=_[y.to];if(!L||!N)return;if(y.from===y.to){E.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}let B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),I=C*.15,Y=-x/C,Bt=$/C,nt=M+Y*I,ot=P+Bt*I;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${nt},${ot} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${i})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",nt).attr("y",ot-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}W&&T.append("text").attr("class","cynefinTitle").attr("x",s/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(W)},"draw"),_t={draw:Vt},Et=r(()=>{let t=Q(),e=O();return X(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=r(()=>{let t=Et();return`
1
+ import{a as yt}from"./embed-page-chunk-W2KSSDKP.js";import{a as ut}from"./embed-page-chunk-3NCDEXPW.js";import"./embed-page-chunk-2RWSBPM5.js";import{a as pt}from"./embed-page-chunk-GA5A7NLC.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-YO55GEK3.js";import{o as X}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{N as rt,S as it,T as st,U as ct,V as lt,W as dt,X as ft,Y as mt,h as Q,j as at,t as O}from"./embed-page-chunk-FPA5BD6K.js";import{b as E}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import{a as r}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var xt=r(()=>({domains:new Map,transitions:[]}),"createDefaultData"),G=xt(),St=r(()=>G.domains,"getDomains"),Mt=r(()=>G.transitions,"getTransitions"),zt=r(t=>{if(t)for(let e of t){let n=e.domain,o=(e.items??[]).map(c=>({label:c.label}));G.domains.set(n,{name:n,items:o})}},"setDomains"),Lt=r(t=>{t&&(G.transitions=t.filter(e=>e.from===e.to?(E.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=r(()=>X({...at.cynefin,...O().cynefin}),"getConfig"),Pt=r(()=>{it(),G=xt()},"clear"),j={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:st,getAccTitle:ct,setDiagramTitle:ft,getDiagramTitle:mt,getAccDescription:dt,setAccDescription:lt},It=r(t=>{yt(t,j),j.setDomains(t.domains),j.setTransitions(t.transitions)},"populate"),Wt={parse:r(async t=>{let e=await ut("cynefin",t);E.debug(e),It(e)},"parse")};function H(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}r(H,"seededRandom");function gt(t){let e=0;for(let n=0;n<t.length;n++){let o=t.charCodeAt(n);e=(e<<5)-e+o,e|=0}return e}r(gt,"hashString");function $t(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:gt(e)}r($t,"resolveSeed");function bt(t,e,n,o){let c=t/2,m=o??t*.015,v=7,W=e/v,d=[];for(let a=0;a<=v;a++){let p=H(n+a*17)*m*2-m;d.push({x:c+p,y:a*W})}let D=`M${d[0].x},${d[0].y}`;for(let a=0;a<d.length-1;a++){let p=d[a],s=d[a+1],f=(p.y+s.y)/2,b=a%2===0?1:-1,h=m*1.5*b*H(n+a*31+7),R=p.x+h,F=f,V=s.x-h;D+=` C${R},${F} ${V},${f} ${s.x},${s.y}`}return D}r(bt,"generateFoldPath");function wt(t,e,n,o){let c=e/2,m=o??e*.015,v=7,W=t/v,d=[];for(let a=0;a<=v;a++){let p=H(n+a*23)*m*2-m;d.push({x:a*W,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let a=0;a<d.length-1;a++){let p=d[a],s=d[a+1],f=(p.x+s.x)/2,b=a%2===0?1:-1,h=m*1.5*b*H(n+a*37+11),R=f,F=p.y+h,V=f,z=s.y-h;D+=` C${R},${F} ${V},${z} ${s.x},${s.y}`}return D}r(wt,"generateHorizontalBoundary");function Ct(t,e){let n=t/2,o=e*.5,c=e,m=t*.03;return[`M${n},${o}`,`C${n+m},${o+(c-o)*.2}`,`${n-m*1.5},${o+(c-o)*.55}`,`${n+m*.5},${o+(c-o)*.75}`,`C${n-m},${o+(c-o)*.85}`,`${n+m*.3},${o+(c-o)*.95}`,`${n},${c}`].join(" ")}r(Ct,"generateCliffPath");function vt(t,e,n,o){return[`M${t-n},${e}`,`A${n},${o} 0 1,1 ${t+n},${e}`,`A${n},${o} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}r(vt,"generateConfusionPath");var ht={complex:{model:"Probe \u2192 Sense \u2192 Respond",practice:"Emergent Practices"},complicated:{model:"Sense \u2192 Analyse \u2192 Respond",practice:"Good Practices"},clear:{model:"Sense \u2192 Categorise \u2192 Respond",practice:"Best Practices"},chaotic:{model:"Act \u2192 Sense \u2192 Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Rt=r((t,e)=>{let n=t/2,o=e/2;return{complex:{cx:n/2,cy:o/2,x:0,y:0,w:n,h:o},complicated:{cx:n+n/2,cy:o/2,x:n,y:0,w:n,h:o},chaotic:{cx:n/2,cy:o+o/2,x:0,y:o,w:n,h:o},clear:{cx:n+n/2,cy:o+o/2,x:n,y:o,w:n,h:o},confusion:{cx:n,cy:o,x:n*.7,y:o*.7,w:n*.6,h:o*.6}}},"getDomainLayouts"),Ft=r(()=>{let t=Q(),e=O();return X(t,e.themeVariables).cynefin},"getCynefinDomainColors"),Z=3,Vt=r((t,e,n,o)=>{let c=o.db,m=c.getDomains(),v=c.getTransitions(),W=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),a=c.getConfig(),p=Ft();E.debug("Rendering Cynefin diagram");let s=a.width,f=a.height,b=a.padding,h=a.showDomainDescriptions,R=a.boundaryAmplitude,F=s+b*2,V=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=pt(e);rt(k,V,F,a.useMaxWidth??!0),k.attr("viewBox",`0 0 ${F} ${V}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);let T=k.append("g").attr("transform",`translate(${b}, ${b})`),_=Rt(s,f),J=$t(a.seed,e),Dt=T.append("g").attr("class","cynefin-backgrounds"),q=["complex","complicated","chaotic","clear"];for(let l of q){let i=_[l];Dt.append("rect").attr("class","cynefinDomain").attr("x",i.x).attr("y",i.y).attr("width",i.w).attr("height",i.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}let U=T.append("g").attr("class","cynefin-boundaries");U.append("path").attr("class","cynefinBoundary").attr("d",bt(s,f,J,R)).attr("fill","none"),U.append("path").attr("class","cynefinBoundary").attr("d",wt(s,f,J+100,R)).attr("fill","none"),U.append("path").attr("class","cynefinCliff").attr("d",Ct(s,f)).attr("fill","none");let kt=s*.15,Tt=f*.15;T.append("path").attr("class","cynefinConfusion").attr("d",vt(s/2,f/2,kt,Tt)).attr("fill",z.confusion).attr("fill-opacity",.5);let K=T.append("g").attr("class","cynefin-labels");for(let l of q){let i=_[l];K.append("text").attr("class","cynefinDomainLabel").attr("x",i.cx).attr("y",h?i.cy-30:i.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(K.append("text").attr("class","cynefinDomainLabel").attr("x",s/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){let l=T.append("g").attr("class","cynefin-subtitles");for(let i of q){let u=_[i],y=ht[i];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",s/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(ht.confusion.practice)}let tt=T.append("g").attr("class","cynefin-items"),A=26,et=10,At=["complex","complicated","chaotic","clear","confusion"];for(let l of At){let i=m.get(l);if(!i||i.items.length===0)continue;let u=_[l],y=l==="confusion",L=i.items,N=0;y&&i.items.length>Z&&(N=i.items.length-Z,L=i.items.slice(0,Z));let B;if(y){let g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{let w=B+S*(A+4),M=tt.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label),$=g.label.length*7,x=P.node();if(x&&typeof x.getBBox=="function"){let Y=x.getBBox();Y.width>0&&($=Y.width)}let C=$+et*2,I=u.cx-C/2;M.attr("transform",`translate(${I}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",A/2)}),N>0){let g=B+L.length*(A+4),S=`+${N} more`,w=tt.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S),P=S.length*7,$=M.node();if($&&typeof $.getBBox=="function"){let I=$.getBBox();I.width>0&&(P=I.width)}let x=P+et*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){let l=k.select("defs").empty()?k.append("defs"):k.select("defs"),i=`cynefin-arrow-${e}`;l.append("marker").attr("id",i).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");let u=T.append("g").attr("class","cynefin-arrows");v.forEach(y=>{let L=_[y.from],N=_[y.to];if(!L||!N)return;if(y.from===y.to){E.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}let B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),I=C*.15,Y=-x/C,Bt=$/C,nt=M+Y*I,ot=P+Bt*I;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${nt},${ot} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${i})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",nt).attr("y",ot-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}W&&T.append("text").attr("class","cynefinTitle").attr("x",s/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(W)},"draw"),_t={draw:Vt},Et=r(()=>{let t=Q(),e=O();return X(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=r(()=>{let t=Et();return`
2
2
  .cynefinDomain {
3
3
  stroke: none;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{a as z}from"./embed-page-chunk-MZ7T7V2Q.js";import{a as I,b as S,c as j,d as J,e as F,f as q}from"./embed-page-chunk-JTJTYIGA.js";import{a as W}from"./embed-page-chunk-4C57ERO3.js";import"./embed-page-chunk-5IWMQWTZ.js";import{c as D,d as R,e as H,f as Y,g as _}from"./embed-page-chunk-RPGUOUD3.js";import"./embed-page-chunk-7AXKFOLH.js";import{b as B,d as T,e as k,g as O,h as A,i as v,j as P}from"./embed-page-chunk-7IPWMDQ3.js";import"./embed-page-chunk-ME637LUU.js";import{a as G}from"./embed-page-chunk-X2TOGOMH.js";import"./embed-page-chunk-7TH7FFVA.js";import"./embed-page-chunk-I7EMCZI6.js";import"./embed-page-chunk-5ZRWN6T7.js";import"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{Z as C}from"./embed-page-chunk-FPA5BD6K.js";import{b as l}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import{a as w}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var K=w((n,t,g)=>Math.max(t,Math.min(g,n)),"clamp"),Q=w((n="TB")=>{switch(n){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),Z=w(n=>n==="flowchart"||n==="flowchart-v2"||n==="stateDiagram","shouldMergeSelfLoopSegments"),$=w((n,t,g,m,c)=>{let i=[],s=new Set;if(g.forEach(({start:r,end:o})=>{r!==m&&s.add(r),o!==m&&s.add(o)}),s.forEach(r=>{let o=n.node(r);typeof o?.x=="number"&&typeof o?.y=="number"&&i.push(o)}),i.length===0&&g.forEach(({edge:r})=>{(r.points??[]).forEach(o=>{typeof o?.x=="number"&&typeof o?.y=="number"&&i.push(o)})}),i.length===0)return Q(c);let f=i.reduce((r,o)=>({x:r.x+o.x/i.length,y:r.y+o.y/i.length}),{x:0,y:0}),h=f.x-t.x,a=f.y-t.y;return Math.abs(h)>Math.abs(a)?h>0?"right":"left":Math.abs(a)>0?a>0?"bottom":"top":Q(c)},"getSelfLoopSide"),ee=w((n,t="top",g=0,m=0)=>{let c=n.x,i=n.y-g,s=n.width/2,f=n.height/2,h=Math.max(36,Math.min(100,n.width*.8)),a=K(Math.max(m,n.width*.35),36,h),r=K(Math.min(n.width,n.height)*.45,24,48);switch(t){case"bottom":{let o=i+f;return[{x:c-a/2,y:o},{x:c-a/2,y:o+r},{x:c+a/2,y:o+r},{x:c+a/2,y:o}]}case"right":{let o=c+s;return[{x:o,y:i-a/2},{x:o+r,y:i-a/2},{x:o+r,y:i+a/2},{x:o,y:i+a/2}]}case"left":{let o=c-s;return[{x:o,y:i-a/2},{x:o-r,y:i-a/2},{x:o-r,y:i+a/2},{x:o,y:i+a/2}]}case"top":default:{let o=i-f;return[{x:c-a/2,y:o},{x:c-a/2,y:o-r},{x:c+a/2,y:o-r},{x:c+a/2,y:o}]}}},"getSelfLoopPoints"),te=w((n,t,g="top",m=0,c={})=>{let s=n.x,f=n.y-m,h=c.width??0,a=c.height??0;switch(g){case"bottom":return{x:s,y:Math.max(...t.map(r=>r.y))+a/2+4};case"right":return{x:Math.max(...t.map(r=>r.x))+h/2+4,y:f};case"left":return{x:Math.min(...t.map(r=>r.x))-h/2-4,y:f};case"top":default:return{x:s,y:Math.min(...t.map(r=>r.y))-a/2-4}}},"getSelfLoopLabelPosition"),oe=w((n,t=0,{mergeSelfLoops:g=!0}={})=>{let m=new Map,c=[],i=n.graph()?.rankdir;return n.edges().forEach(s=>{let f=n.edge(s);if(g&&f.selfLoop){let h=f.selfLoop.id;m.has(h)||m.set(h,[]),m.get(h).push({edge:f,start:s.v,end:s.w})}else c.push({edge:f,start:s.v,end:s.w})}),m.forEach(s=>{if(s.length!==3){s.forEach(L=>c.push(L));return}s.sort((L,d)=>L.edge.selfLoop.order-d.edge.selfLoop.order);let[f,h,a]=s,r=f.edge.originalEdge??h.edge.originalEdge??a.edge.originalEdge??h.edge,o=n.node(r.start);if(!o){s.forEach(L=>c.push(L));return}let u={width:h.edge.width,height:h.edge.height},y=$(n,o,s,r.start,i),X=ee(o,y,t,u.width??0),E=te(o,X,y,t,u),b={...h.edge,...r,id:r.id,points:X,start:r.start,end:r.end,x:E.x,y:E.y,width:u.width,height:u.height,labelStyle:h.edge.labelStyle,fromCluster:f.edge.fromCluster??h.edge.fromCluster??a.edge.fromCluster,toCluster:f.edge.toCluster??h.edge.toCluster??a.edge.toCluster};delete b.selfLoop,delete b.originalEdge,c.push({edge:b,start:b.start,end:b.end})}),c},"getEdgesToRender"),U=w(async(n,t,g,m,c,i)=>{l.warn("Graph in recursive render:XAX",I(t),c);let s=t.graph().rankdir;l.trace("Dir in recursive render - dir:",s);let f=n.insert("g").attr("class","root");t.nodes()?l.info("Recursive render XXX",t.nodes()):l.info("No nodes found for",t),t.edges().length>0&&l.info("Recursive edges",t.edge(t.edges()[0]));let h=f.insert("g").attr("class","clusters"),a=f.insert("g").attr("class","edgePaths"),r=f.insert("g").attr("class","edgeLabels"),o=f.insert("g").attr("class","nodes"),u=Z(g);await Promise.all(t.nodes().map(async function(d){let e=t.node(d);if(c!==void 0){let p=JSON.parse(JSON.stringify(c.clusterData));l.trace(`Setting data for parent cluster XXX
1
+ import{a as z}from"./embed-page-chunk-MZ7T7V2Q.js";import{a as I,b as S,c as j,d as J,e as F,f as q}from"./embed-page-chunk-JTJTYIGA.js";import{a as W}from"./embed-page-chunk-4C57ERO3.js";import"./embed-page-chunk-5IWMQWTZ.js";import{c as D,d as R,e as H,f as Y,g as _}from"./embed-page-chunk-EMCH2FMD.js";import{b as B,d as T,e as k,g as O,h as A,i as v,j as P}from"./embed-page-chunk-OZUFLDHF.js";import"./embed-page-chunk-7TH7FFVA.js";import"./embed-page-chunk-ME637LUU.js";import"./embed-page-chunk-7AXKFOLH.js";import{a as G}from"./embed-page-chunk-X2TOGOMH.js";import"./embed-page-chunk-I7EMCZI6.js";import"./embed-page-chunk-5ZRWN6T7.js";import"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{Z as C}from"./embed-page-chunk-FPA5BD6K.js";import{b as l}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import{a as w}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var K=w((n,t,g)=>Math.max(t,Math.min(g,n)),"clamp"),Q=w((n="TB")=>{switch(n){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),Z=w(n=>n==="flowchart"||n==="flowchart-v2"||n==="stateDiagram","shouldMergeSelfLoopSegments"),$=w((n,t,g,m,c)=>{let i=[],s=new Set;if(g.forEach(({start:r,end:o})=>{r!==m&&s.add(r),o!==m&&s.add(o)}),s.forEach(r=>{let o=n.node(r);typeof o?.x=="number"&&typeof o?.y=="number"&&i.push(o)}),i.length===0&&g.forEach(({edge:r})=>{(r.points??[]).forEach(o=>{typeof o?.x=="number"&&typeof o?.y=="number"&&i.push(o)})}),i.length===0)return Q(c);let f=i.reduce((r,o)=>({x:r.x+o.x/i.length,y:r.y+o.y/i.length}),{x:0,y:0}),h=f.x-t.x,a=f.y-t.y;return Math.abs(h)>Math.abs(a)?h>0?"right":"left":Math.abs(a)>0?a>0?"bottom":"top":Q(c)},"getSelfLoopSide"),ee=w((n,t="top",g=0,m=0)=>{let c=n.x,i=n.y-g,s=n.width/2,f=n.height/2,h=Math.max(36,Math.min(100,n.width*.8)),a=K(Math.max(m,n.width*.35),36,h),r=K(Math.min(n.width,n.height)*.45,24,48);switch(t){case"bottom":{let o=i+f;return[{x:c-a/2,y:o},{x:c-a/2,y:o+r},{x:c+a/2,y:o+r},{x:c+a/2,y:o}]}case"right":{let o=c+s;return[{x:o,y:i-a/2},{x:o+r,y:i-a/2},{x:o+r,y:i+a/2},{x:o,y:i+a/2}]}case"left":{let o=c-s;return[{x:o,y:i-a/2},{x:o-r,y:i-a/2},{x:o-r,y:i+a/2},{x:o,y:i+a/2}]}case"top":default:{let o=i-f;return[{x:c-a/2,y:o},{x:c-a/2,y:o-r},{x:c+a/2,y:o-r},{x:c+a/2,y:o}]}}},"getSelfLoopPoints"),te=w((n,t,g="top",m=0,c={})=>{let s=n.x,f=n.y-m,h=c.width??0,a=c.height??0;switch(g){case"bottom":return{x:s,y:Math.max(...t.map(r=>r.y))+a/2+4};case"right":return{x:Math.max(...t.map(r=>r.x))+h/2+4,y:f};case"left":return{x:Math.min(...t.map(r=>r.x))-h/2-4,y:f};case"top":default:return{x:s,y:Math.min(...t.map(r=>r.y))-a/2-4}}},"getSelfLoopLabelPosition"),oe=w((n,t=0,{mergeSelfLoops:g=!0}={})=>{let m=new Map,c=[],i=n.graph()?.rankdir;return n.edges().forEach(s=>{let f=n.edge(s);if(g&&f.selfLoop){let h=f.selfLoop.id;m.has(h)||m.set(h,[]),m.get(h).push({edge:f,start:s.v,end:s.w})}else c.push({edge:f,start:s.v,end:s.w})}),m.forEach(s=>{if(s.length!==3){s.forEach(L=>c.push(L));return}s.sort((L,d)=>L.edge.selfLoop.order-d.edge.selfLoop.order);let[f,h,a]=s,r=f.edge.originalEdge??h.edge.originalEdge??a.edge.originalEdge??h.edge,o=n.node(r.start);if(!o){s.forEach(L=>c.push(L));return}let u={width:h.edge.width,height:h.edge.height},y=$(n,o,s,r.start,i),X=ee(o,y,t,u.width??0),E=te(o,X,y,t,u),b={...h.edge,...r,id:r.id,points:X,start:r.start,end:r.end,x:E.x,y:E.y,width:u.width,height:u.height,labelStyle:h.edge.labelStyle,fromCluster:f.edge.fromCluster??h.edge.fromCluster??a.edge.fromCluster,toCluster:f.edge.toCluster??h.edge.toCluster??a.edge.toCluster};delete b.selfLoop,delete b.originalEdge,c.push({edge:b,start:b.start,end:b.end})}),c},"getEdgesToRender"),U=w(async(n,t,g,m,c,i)=>{l.warn("Graph in recursive render:XAX",I(t),c);let s=t.graph().rankdir;l.trace("Dir in recursive render - dir:",s);let f=n.insert("g").attr("class","root");t.nodes()?l.info("Recursive render XXX",t.nodes()):l.info("No nodes found for",t),t.edges().length>0&&l.info("Recursive edges",t.edge(t.edges()[0]));let h=f.insert("g").attr("class","clusters"),a=f.insert("g").attr("class","edgePaths"),r=f.insert("g").attr("class","edgeLabels"),o=f.insert("g").attr("class","nodes"),u=Z(g);await Promise.all(t.nodes().map(async function(d){let e=t.node(d);if(c!==void 0){let p=JSON.parse(JSON.stringify(c.clusterData));l.trace(`Setting data for parent cluster XXX
2
2
  Node.id = `,d,`
3
3
  data=`,p.height,`
4
4
  Parent cluster`,c.height),t.setNode(c.id,p),t.parent(d)||(l.trace("Setting parent",d,c.id),t.setParent(d,c.id,p))}if(l.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),e?.clusterNode){l.info("Cluster identified XBX",d,e.width,t.node(d));let{ranksep:p,nodesep:x}=t.graph();e.graph.setGraph({...e.graph.graph(),ranksep:p+25,nodesep:x});let N=await U(o,e.graph,g,m,t.node(d),i),M=N.elem;B(e,M),e.diff=N.diff||0,l.info("New compound node after recursive render XAX",d,"width",e.width,"height",e.height),A(M,e)}else t.children(d).length>0?(l.trace("Cluster - the non recursive path XBX",d,e.id,e,e.width,"Graph:",t),l.trace(J(e.id,t)),S.set(e.id,{id:J(e.id,t),node:e})):(l.trace("Node - the non recursive path XAX",d,o,t.node(d),s),await O(o,t.node(d),{config:i,dir:s}))})),await w(async()=>{let d=t.edges().map(async function(e){let p=t.edge(e.v,e.w,e.name);if(l.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),l.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),l.info("Fix",S,"ids:",e.v,e.w,"Translating: ",S.get(e.v),S.get(e.w)),u&&p.selfLoop){if(p.selfLoop.order!==1)return;let x=p.id;p.id=p.selfLoop.id,await R(r,p),p.id=x;return}await R(r,p)});await Promise.all(d)},"processEdges")(),l.info("Graph before layout:",JSON.stringify(I(t))),l.info("############################################# XXX"),l.info("### Layout ### XXX"),l.info("############################################# XXX"),z(t),l.info("Graph after layout:",JSON.stringify(I(t)));let X=0,{subGraphTitleTotalMargin:E}=G(i);await Promise.all(q(t).map(async function(d){let e=t.node(d);if(l.info("Position XBX => "+d+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e?.clusterNode)e.y+=E,l.info("A tainted cluster node XBX1",d,e.id,e.width,e.height,e.x,e.y,t.parent(d)),S.get(e.id).node=e,P(e);else if(t.children(d).length>0){l.info("A pure cluster node XBX1",d,e.id,e.x,e.y,e.width,e.height,t.parent(d)),e.height+=E,t.node(e.parentId);let p=e?.padding/2||0,x=e?.labelBBox?.height||0,N=x-p||0;l.debug("OffsetY",N,"labelHeight",x,"halfPadding",p),await T(h,e),S.get(e.id).node=e}else{let p=t.node(e.parentId);e.y+=E/2,l.info("A regular node XBX1 - using the padding",e.id,"parent",e.parentId,e.width,e.height,e.x,e.y,"offsetY",e.offsetY,"parent",p,p?.offsetY,e),P(e)}}));let b=E/2;return oe(t,b,{mergeSelfLoops:u}).forEach(function({edge:d,start:e,end:p}){l.info("Edge "+e+" -> "+p+": "+JSON.stringify(d),d),d.points.forEach(V=>V.y+=b);let x=t.node(e),N=t.node(p),M=Y(a,d,S,g,x,N,m);H(d,M)}),t.nodes().forEach(function(d){let e=t.node(d);l.info(d,e.type,e.diff),e.isGroup&&(X=e.diff)}),l.warn("Returning from recursive render XAX",f,X),{elem:f,diff:X}},"recursiveRender"),we=w(async(n,t)=>{let g=new W({multigraph:!0,compound:!0}).setGraph({rankdir:n.direction,nodesep:n.config?.nodeSpacing||n.config?.flowchart?.nodeSpacing||n.nodeSpacing,ranksep:n.config?.rankSpacing||n.config?.flowchart?.rankSpacing||n.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),m=t.select("g");_(m,n.markers,n.type,n.diagramId),v(),D(),k(),j(),n.nodes.forEach(i=>{g.setNode(i.id,{...i}),i.parentId&&g.setParent(i.id,i.parentId)}),l.debug("Edges:",n.edges),n.edges.forEach(i=>{if(i.start===i.end){let s=i.start,f=s+"---"+s+"---1",h=s+"---"+s+"---2",a=g.node(s);g.setNode(f,{domId:f,id:f,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),g.setParent(f,a.parentId),g.setNode(h,{domId:h,id:h,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),g.setParent(h,a.parentId);let r=structuredClone(i),o=structuredClone(i),u=structuredClone(i),y=structuredClone(i);o.originalEdge=r,o.selfLoop={id:r.id,order:0},u.originalEdge=r,u.selfLoop={id:r.id,order:1},y.originalEdge=r,y.selfLoop={id:r.id,order:2},o.label="",o.arrowTypeEnd="none",o.endLabelLeft="",o.endLabelRight="",o.startLabelLeft="",o.id=s+"-cyclic-special-1",u.startLabelRight="",u.startLabelLeft="",u.endLabelLeft="",u.endLabelRight="",u.arrowTypeStart="none",u.arrowTypeEnd="none",u.id=s+"-cyclic-special-mid",y.label="",y.startLabelRight="",y.startLabelLeft="",y.arrowTypeStart="none",a.isGroup&&(o.fromCluster=s,y.toCluster=s),y.id=s+"-cyclic-special-2",y.arrowTypeStart="none",g.setEdge(s,f,o,s+"-cyclic-special-0"),g.setEdge(f,h,u,s+"-cyclic-special-1"),g.setEdge(h,s,y,s+"-cyclic-special-2")}else g.setEdge(i.start,i.end,{...i},i.id)}),l.warn("Graph at first:",JSON.stringify(I(g))),F(g),l.warn("Graph after XAX:",JSON.stringify(I(g)));let c=C();await U(m,g,n.type,n.diagramId,void 0,c)},"render");export{oe as getEdgesToRender,we as render};
@@ -1,4 +1,4 @@
1
- import{a as H}from"./embed-page-chunk-GA5A7NLC.js";import{a as O}from"./embed-page-chunk-W2KSSDKP.js";import{a as G}from"./embed-page-chunk-XRN4MSDO.js";import{a as X}from"./embed-page-chunk-X3MWV772.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-2RWSBPM5.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-YO55GEK3.js";import{b as z,d as W}from"./embed-page-chunk-5ZRWN6T7.js";import{o as y}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{G as A,N,S as D,T as E,U as S,V as L,W as _,X as M,Y as R,j as T,t as C}from"./embed-page-chunk-FPA5BD6K.js";import{b as I}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import{a as p}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var Z=/[─━│┃└┗├┣]/,q=/[└┗├┣]/,re=/[─━]/,Y=/^[\s│┃]+$/,P=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,F=/^\s*%%/,ie=" ";function U(n){return n.some(e=>Z.test(e))}p(U,"isBoxDrawingFormat");function J(n){for(let e of n){let t=q.exec(e);if(t?.index&&t.index>0)return t.index}return 4}p(J,"inferSegmentWidth");function K(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,r)=>{let i=parseInt(r,10),a=e.get(i);return a?`line ${a}`:t})}p(K,"remapErrorLines");function Q(n){let e=n.split(`
1
+ import{a as X}from"./embed-page-chunk-X3MWV772.js";import{a as O}from"./embed-page-chunk-W2KSSDKP.js";import{a as G}from"./embed-page-chunk-3NCDEXPW.js";import"./embed-page-chunk-2RWSBPM5.js";import{a as H}from"./embed-page-chunk-GA5A7NLC.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-YO55GEK3.js";import{b as z,d as W}from"./embed-page-chunk-5ZRWN6T7.js";import{o as y}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{G as A,N,S as D,T as E,U as S,V as L,W as _,X as M,Y as R,j as T,t as C}from"./embed-page-chunk-FPA5BD6K.js";import{b as I}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import{a as p}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var Z=/[─━│┃└┗├┣]/,q=/[└┗├┣]/,re=/[─━]/,Y=/^[\s│┃]+$/,P=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,F=/^\s*%%/,ie=" ";function U(n){return n.some(e=>Z.test(e))}p(U,"isBoxDrawingFormat");function J(n){for(let e of n){let t=q.exec(e);if(t?.index&&t.index>0)return t.index}return 4}p(J,"inferSegmentWidth");function K(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,r)=>{let i=parseInt(r,10),a=e.get(i);return a?`line ${a}`:t})}p(K,"remapErrorLines");function Q(n){let e=n.split(`
2
2
  `),t=new Map,r=-1;for(let[s,o]of e.entries())if(o.trim()==="treeView-beta"){r=s;break}if(r===-1)return{text:n,lineMap:t};let i=[];for(let s=r+1;s<e.length;s++){let o=e[s];o.trim()===""||F.test(o)||P.test(o)||Y.test(o)||i.push(o.replace(/\t/g," "))}if(!U(i))return{text:n,lineMap:t};let a=J(i),c=[],l=0;for(let s=0;s<=r;s++)c.push(e[s]),l++,t.set(l,s+1);for(let s=r+1;s<e.length;s++){let o=e[s],h=o.trim(),f=s+1;if(h===""){c.push(o),l++,t.set(l,f);continue}if(F.test(o)){c.push(o),l++,t.set(l,f);continue}if(P.test(o)){c.push(o),l++,t.set(l,f);continue}if(Y.test(o))continue;let d=o.replace(/\t/g," "),m=q.exec(d);if(m?.index!==void 0){let g=m.index,w=Math.round(g/a)+1,u=g+1;for(;u<d.length&&re.test(d[u]);)u++;for(;u<d.length&&d[u]===" ";)u++;let v=d.slice(u).trimEnd();if(!v)throw new Error(`Line ${f}: Empty node \u2014 expected a filename or directory name after the box-drawing prefix`);let ne=ie.repeat(w);c.push(ne+v),l++,t.set(l,f)}else{if(/^[\s─━│┃└┗├┣]+$/.test(d))continue;if(Z.test(d))c.push(o),l++,t.set(l,f);else{if(/^\s+/.test(d))throw new Error(`Line ${f}: Unexpected indentation without box-drawing characters. In box-drawing format, use \u251C\u2500\u2500 or \u2514\u2500\u2500 prefixes for indented nodes.`);c.push(o),l++,t.set(l,f)}}}return{text:c.join(`
3
3
  `),lineMap:t}}p(Q,"preprocessBoxDrawing");var x=new X(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),oe=p(()=>{x.reset(),D()},"clear"),se=p(()=>x.records.stack[0],"getRoot"),ae=p(()=>x.records.cnt,"getCount"),ce=T.treeView,le=p(()=>y(ce,C().treeView),"getConfig"),de=p((n,e,t,r,i,a)=>{for(;n<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();let c={id:x.records.cnt++,level:n,name:e,nodeType:t,icon:i,cssClass:r,description:a,children:[]};x.records.stack[x.records.stack.length-1].children.push(c),x.records.stack.push(c)},"addNode"),he={clear:oe,addNode:de,getRoot:se,getCount:ae,getConfig:le,getAccTitle:S,getAccDescription:_,getDiagramTitle:R,setAccDescription:L,setAccTitle:E,setDiagramTitle:M},B=he,pe=p(n=>{O(n,B);for(let e of n.nodes){let t=typeof e.indent=="number"?e.indent:0,r=e.name,i=r.endsWith("/");i&&(r=r.slice(0,-1));let a=i?"directory":"file",c=e.classAnnotation||void 0,l=e.iconAnnotation,s=l!==void 0?l||"none":void 0,o=e.descAnnotation||void 0,h=o?A(o,C()):void 0;B.addNode(t,r,a,c,s,h)}},"populate"),fe={parse:p(async n=>{let{text:e,lineMap:t}=Q(n);try{let r=await G("treeView",e);I.debug(r),pe(r)}catch(r){throw t.size>0&&r instanceof Error&&(r.message=K(r.message,t)),r}},"parse")},b={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function ee(n,e){let t=e?.filenameIcons?.[n];if(t)return t;let r=n.lastIndexOf(".");if(r>0){let i=n.substring(r).toLowerCase(),a=e?.extensionIcons;return a?.[i]??a?.[i.slice(1)]}}p(ee,"detectIcon");function V(n,e){return n.includes(":")?n:n in b.icons||!e?`${b.prefix}:${n}`:`${e}:${n}`}p(V,"qualifyIcon");function k(n,e){if(n.icon!=="none"){if(n.icon)return V(n.icon,e.defaultIconPack);if(e.showIcons){if(n.nodeType==="file"){let t=ee(n.name,e);if(t==="none")return;if(t)return V(t,e.defaultIconPack)}return`${b.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}p(k,"getNodeIcon");z([{name:b.prefix,icons:b}]);var $=14,ge=4,ue=16,te=p((n,e)=>`tv-icon-${n}-${e.replace(/[^\w-]/g,"-")}`,"iconSymbolId"),me=p(async(n,e,t,r)=>{let i=new Set,a=p(s=>{let o=k(s,t);o&&i.add(o),s.children.forEach(a)},"collect");if(a(e),i.size===0)return;let c=await Promise.all([...i].map(async s=>({icon:s,svg:await W(s,{height:$,width:$})}))),l=n.append("defs");for(let{icon:s,svg:o}of c)l.append("g").attr("id",te(r,s)).html(o)},"injectIconDefs"),we=p((n,e,t,r,i,a)=>{let c=r.append("g"),l="treeView-node-label";t.nodeType==="directory"&&(l+=" treeView-node-dir"),t.cssClass&&(l+=` ${t.cssClass}`);let s=$+ge,o=k(t,i),h=o!==void 0;o&&c.append("use").attr("xlink:href",`#${te(a,o)}`).attr("x",n+i.paddingX).attr("y",e+i.paddingY).attr("class","treeView-node-icon");let f=c.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",l),{height:d,width:m}=f.node().getBBox(),g=d+i.paddingY*2,w=n+i.paddingX+(h?s:0);f.attr("x",w),f.attr("y",e+g/2);let u=w+m,v=m+i.paddingX*2+(h?s:0);return t.BBox={x:n,y:e,width:v,height:g},t.cssClass?.split(/\s+/).includes("highlight")&&c.insert("rect",":first-child").attr("x",n).attr("y",e+1).attr("width",0).attr("height",g-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:t,nodeGroup:c,labelRightEdge:u,centerY:e+g/2}},"positionLabel"),j=p((n,e,t,r,i,a)=>n.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",i).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),xe=p((n,e,t,r)=>{let i=0,a=0,c=[],l=p((h,f,d,m)=>{let g=m*(d.rowIndent+d.paddingX),w=we(g,i,f,h,d,r);c.push(w);let{height:u,width:v}=f.BBox;j(h,g-d.rowIndent,i+u/2,g,i+u/2,d.lineThickness),a=Math.max(a,g+v),i+=u},"drawNode"),s=p((h,f=0)=>{l(n,h,t,f),h.children.forEach(w=>{s(w,f+1)});let{x:d,y:m,height:g}=h.BBox;if(h.children.length){let{y:w,height:u}=h.children[h.children.length-1].BBox;j(n,d+t.paddingX,m+g,d+t.paddingX,w+u/2+t.lineThickness/2,t.lineThickness)}},"processNode");s(e);let o=c.filter(h=>h.node.description);if(o.length>0){let f=Math.max(...c.map(d=>d.labelRightEdge))+ue;for(let d of o){let g=d.nodeGroup.append("text").text(d.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",f).attr("y",d.centerY).node().getBBox();a=Math.max(a,f+g.width+t.paddingX)}}for(let h of c)if(h.node.cssClass?.split(/\s+/).includes("highlight")){let f=h.nodeGroup.select(".treeView-highlight-bg");if(!f.empty()){let d=a-h.node.BBox.x+8;f.attr("width",d),a=Math.max(a,h.node.BBox.x+d+2)}}return{totalHeight:i,totalWidth:a}},"drawTree"),ve=p(async(n,e,t,r)=>{I.debug(`Rendering treeView diagram
4
4
  `+n);let i=r.db,a=i.getRoot(),c=i.getConfig(),l=H(e);await me(l,a,c,e);let s=l.append("g");s.attr("class","tree-view");let{totalHeight:o,totalWidth:h}=xe(s,a,c,e);l.attr("viewBox",`-${c.lineThickness/2} 0 ${h} ${o}`),N(l,o,h,c.useMaxWidth)},"draw"),be={draw:ve},Ie=be,Ce={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},ye=p(({treeView:n})=>{let{labelFontSize:e,labelColor:t,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:c,highlightStroke:l}=y(Ce,n);return`
@@ -1,3 +1,3 @@
1
- import{a as V}from"./embed-page-chunk-W2KSSDKP.js";import{a as j}from"./embed-page-chunk-XRN4MSDO.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-2RWSBPM5.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import{f as X}from"./embed-page-chunk-YO55GEK3.js";import{i as w,l as G,o as L}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{G as v,S as D,T as N,U as C,V as O,W as I,X as W,Y as H,Z as M,ba as U,j as $,t as b}from"./embed-page-chunk-FPA5BD6K.js";import{b as f}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import{b as _}from"./embed-page-chunk-S4XZPBRM.js";import{a as o}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var Y="position frame",z="frame positioned",k="position relation",K="relation positioned",we=o(function(e){f.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){q(),D()},"clear");function q(){E={}}o(q,"reset");var Se=$.eventmodeling,Me=o(()=>L({...Se,...b().eventmodeling}),"getConfig"),E={};function J(){let e=ke,{ast:n}=E,t=A();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,r)=>{let a=re(i,n.dataEntities,t);e=P(e,{$kind:Y,index:r,frame:i,textProps:a});let d;ce(i)?(f.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=P(e,{$kind:k,index:r,frame:i,sourceFrame:l})})):e=P(e,{$kind:k,index:r,frame:i})}),e={...e,sortedSwimlanesArray:R(e.swimlanes)},e}o(J,"getState");function Q(e){E.ast=e}o(Q,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function A(){return s}o(A,"getDiagramProps");var ke={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function Z(e){let n=e.split(".");if(n.length===2)return n[0]}o(Z,"extractNamespace");function ee(e){let n=e.split(".");return n.length===2?n[1]:e}o(ee,"extractName");function te(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(te,"findSwimlaneByNamespace");function y(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{let r=Number.parseInt(i);return r>n&&r<t}).map(i=>Number.parseInt(i)))+1}o(y,"findNextAvailableIndex");function ne(e,n){let t=Z(e.entityIdentifier),i=te(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:y(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:y(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:y(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(ne,"calculateSwimlaneProps");function ie(e){let{themeVariables:n}=b();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(ie,"calculateEntityVisualProps");function re(e,n,t){let i=b(),r=v(ee(e.entityIdentifier)??"",i),a,d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"},c=`<b>${w(r,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(a=e.dataInlineValue,a=a.substring(a.indexOf("{")+1),a=a.substring(0,a.lastIndexOf("}")-1),a=v(a,i),a=w(a,t.textMaxWidth,d),a=a.replaceAll(" ","&nbsp;")),e.dataReference){let p=n.find(S=>S.name===e.dataReference?.$refText);p&&(a=p.dataBlockValue,a=a.substring(a.indexOf(`{
1
+ import{a as V}from"./embed-page-chunk-W2KSSDKP.js";import{a as j}from"./embed-page-chunk-3NCDEXPW.js";import"./embed-page-chunk-2RWSBPM5.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import{f as X}from"./embed-page-chunk-YO55GEK3.js";import{i as w,l as G,o as L}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{G as v,S as D,T as N,U as C,V as O,W as I,X as W,Y as H,Z as M,ba as U,j as $,t as b}from"./embed-page-chunk-FPA5BD6K.js";import{b as f}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import{b as _}from"./embed-page-chunk-S4XZPBRM.js";import{a as o}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var Y="position frame",z="frame positioned",k="position relation",K="relation positioned",we=o(function(e){f.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){q(),D()},"clear");function q(){E={}}o(q,"reset");var Se=$.eventmodeling,Me=o(()=>L({...Se,...b().eventmodeling}),"getConfig"),E={};function J(){let e=ke,{ast:n}=E,t=A();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,r)=>{let a=re(i,n.dataEntities,t);e=P(e,{$kind:Y,index:r,frame:i,textProps:a});let d;ce(i)?(f.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=P(e,{$kind:k,index:r,frame:i,sourceFrame:l})})):e=P(e,{$kind:k,index:r,frame:i})}),e={...e,sortedSwimlanesArray:R(e.swimlanes)},e}o(J,"getState");function Q(e){E.ast=e}o(Q,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function A(){return s}o(A,"getDiagramProps");var ke={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function Z(e){let n=e.split(".");if(n.length===2)return n[0]}o(Z,"extractNamespace");function ee(e){let n=e.split(".");return n.length===2?n[1]:e}o(ee,"extractName");function te(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(te,"findSwimlaneByNamespace");function y(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{let r=Number.parseInt(i);return r>n&&r<t}).map(i=>Number.parseInt(i)))+1}o(y,"findNextAvailableIndex");function ne(e,n){let t=Z(e.entityIdentifier),i=te(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:y(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:y(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:y(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(ne,"calculateSwimlaneProps");function ie(e){let{themeVariables:n}=b();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(ie,"calculateEntityVisualProps");function re(e,n,t){let i=b(),r=v(ee(e.entityIdentifier)??"",i),a,d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"},c=`<b>${w(r,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(a=e.dataInlineValue,a=a.substring(a.indexOf("{")+1),a=a.substring(0,a.lastIndexOf("}")-1),a=v(a,i),a=w(a,t.textMaxWidth,d),a=a.replaceAll(" ","&nbsp;")),e.dataReference){let p=n.find(S=>S.name===e.dataReference?.$refText);p&&(a=p.dataBlockValue,a=a.substring(a.indexOf(`{
2
2
  `)+2),a=a.substring(0,a.lastIndexOf("}")-1),a=v(a,i),a=w(a,t.textMaxWidth,d),a=a.replaceAll(" ","&nbsp;"),a+="<br/>")}let m=a!==void 0;m&&(c+=`<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${a}</code>`);let x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=G(c,x),h=m?u.width/3:u.width,g={content:c,width:h,height:u.height};return f.debug(`[${e.name}] ${e.entityIdentifier} text`,g),g}o(re,"calculateTextProps");function ae(e,n){let t=n,i=ie(t.frame),r={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:z,frame:t.frame,index:t.index,visual:i,dimension:r,textProps:t.textProps}]}o(ae,"decidePositionFrame");function oe(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(oe,"calculateX");function se(e,n){let t=[...e.map(i=>i.r),n];return Math.max(...t)}o(se,"calculateMaxRight");function R(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o(R,"sortedSwimlanesArray");function de(e,n){let t=n,i=ne(t.frame,e.swimlanes),r;i.index in e.swimlanes?r=e.swimlanes[i.index]:r={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=oe(r,d,a),m=c+l.width+s.boxPadding,x=se(Object.values(e.swimlanes),m);r.r=c+l.width,r.maxHeight=Math.max(r.maxHeight,l.height),r.height=Math.max(s.swimlaneMinHeight,r.maxHeight)+2*s.swimlanePadding;let u={x:c,y:s.swimlanePadding+r.y,r:m,dimension:l,leftSibling:!1,swimlane:r,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${r.index}`]:r},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},g=R(h.swimlanes);g.length>0&&(g[0].y=0);for(let p=1;p<g.length;p++){let S=g[p],T=g[p-1];S.y=T.y+T.height+s.swimlaneGap}return h}o(de,"evolveFramePositioned");function le(e,n){return e===0&&n.sourceFrames.length===0}o(le,"isFirstFrame");function ce(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}o(ce,"hasSourceFrame");function F(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(F,"findBoxByFrame");function me(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){let r=e[i];if(r.swimlane.index!==n)return r}}o(me,"findBoxByLineIndex");function ue(e,n){let t=n;if(X(t.frame)||le(t.index,t.frame))return[];let i=F(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let r;return t.sourceFrame?r=F(e.boxes,t.sourceFrame):r=me(e.boxes,i.swimlane.index,t.index-1),r===void 0?[]:[{$kind:K,frame:t.frame,index:t.index,sourceBox:r,targetBox:i}]}o(ue,"decidePositionRelation");function xe(e,n){let t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(xe,"evolveRelationPositioned");var Fe={[Y]:ae,[k]:ue},Be={[z]:de,[K]:xe};function fe(e,n){let t=Fe[n.$kind];if(t==null)return[];let i=t(e,n);return f.debug("decided events",i),i}o(fe,"decide");function ge(e,n){let t=n.reduce((i,r)=>{let a=Be[r.$kind];return a==null?i:a(i,r)},e);return f.debug("evolve events",{state:e,newState:t,events:n}),t}o(ge,"evolve");function P(e,n){let t=fe(e,n);return ge(e,t)}o(P,"dispatch");var B={getConfig:Me,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:N,getAccTitle:C,getAccDescription:I,setAccDescription:O,setDiagramTitle:W,getDiagramTitle:H,setAst:Q,getDiagramProps:A,getState:J},Ee={parse:o(async e=>{let n=await j("eventmodeling",e);f.debug(n),B.setAst(n),V(n,B)},"parse")},Ae=M(),Re=Ae?.eventmodeling;function he(e,n){return t=>{let i=t.swimlane.y+n.swimlanePadding,r=e.append("g").attr("class","em-box");r.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),r.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(he,"renderD3Box");function pe(e,n){return e>n}o(pe,"dirUpwards");function be(e,n,t,i){return r=>{let a=r.sourceBox.swimlane.y+n.swimlanePadding,d=r.targetBox.swimlane.y+n.swimlanePadding,l=pe(a,d),c=r.sourceBox.x+r.sourceBox.dimension.width*2/3,m=r.targetBox.x+r.targetBox.dimension.width/3,x,u;f.debug(`rendering relation up=${l} for `,{sourceBox:r.sourceBox,targetBox:r.targetBox}),l?(x=a,u=d+r.targetBox.dimension.height):(x=a+r.sourceBox.dimension.height,u=d);let h=i.emRelationStroke??r.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",r.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(be,"renderD3Relation");function ve(e,n,t,i){return r=>{let a=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";a.append("rect").attr("x",0).attr("y",r.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",r.height).attr("fill",d).attr("stroke",l),a.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",r.y+30).text(r.label)}}o(ve,"renderD3Swimlane");var Te=o(function(e,n,t,i){if(f.debug("in eventmodeling renderer",e+`
3
3
  `,"id:",n,t),!Re)throw new Error("EventModeling config not found");let r=i.db,{themeVariables:a,eventmodeling:d}=M(),l=_(`[id="${n}"]`),c=r.getDiagramProps(),m=r.getState(),x=`em-arrowhead-${n}`,u=a.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ve(l,m.maxR,c,a)),m.boxes.forEach(he(l,c)),m.relations.forEach(be(l,c,x,a)),l.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),U(void 0,l,d?.padding??30,d?.useMaxWidth)},"draw"),$e={draw:Te},De=o(e=>"","getStyles"),Ne=De,Le={parser:Ee,db:B,renderer:$e,styles:Ne};export{Le as diagram};
@@ -1,4 +1,4 @@
1
- import{a as P}from"./embed-page-chunk-GA5A7NLC.js";import{a as z}from"./embed-page-chunk-W2KSSDKP.js";import{a as E}from"./embed-page-chunk-XRN4MSDO.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-2RWSBPM5.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-YO55GEK3.js";import{o as u}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{N as x,S as y,T as $,U as B,V as C,W as S,X as D,Y as T,j as w,t as v}from"./embed-page-chunk-FPA5BD6K.js";import{b}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import{a as h}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var N=w.packet,F=class{constructor(){this.packet=[],this.setAccTitle=$,this.getAccTitle=B,this.setDiagramTitle=D,this.getDiagramTitle=T,this.getAccDescription=S,this.setAccDescription=C}static{h(this,"PacketDB")}getConfig(){let t=u({...N,...v().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){y(),this.packet=[]}},L=1e4,M=h((t,e)=>{z(t,e);let a=-1,o=[],n=1,{bitsPerRow:l}=e.getConfig();for(let{start:r,end:s,bits:d,label:c}of t.blocks){if(r!==void 0&&s!==void 0&&s<r)throw new Error(`Packet block ${r} - ${s} is invalid. End must be greater than start.`);if(r??=a+1,r!==a+1)throw new Error(`Packet block ${r} - ${s??r} is not contiguous. It should start from ${a+1}.`);if(d===0)throw new Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(s??=r+(d??1)-1,d??=s-r+1,a=s,b.debug(`Packet block ${r} - ${a} with label ${c}`);o.length<=l+1&&e.getPacket().length<L;){let[p,i]=Y({start:r,end:s,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(e.pushWord(o),o=[],n++),!i)break;({start:r,end:s,bits:d,label:c}=i)}}e.pushWord(o)},"populate"),Y=h((t,e,a)=>{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*a)return[t,void 0];let o=e*a-1,n=e*a;return[{start:t.start,end:o,label:t.label,bits:o-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),A={parser:{yy:void 0},parse:h(async t=>{let e=await E("packet",t),a=A.parser?.yy;if(!(a instanceof F))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");b.debug(e),M(e,a)},"parse")},I=h((t,e,a,o)=>{let n=o.db,l=n.getConfig(),{rowHeight:r,paddingY:s,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),i=n.getDiagramTitle(),f=r+s,g=f*(p.length+1)-(i?0:r),k=d*c+2,m=P(e);m.attr("viewBox",`0 0 ${k} ${g}`),x(m,g,k,l.useMaxWidth);for(let[W,_]of p.entries())O(m,_,W,l);m.append("text").text(i).attr("x",k/2).attr("y",g-f/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=h((t,e,a,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:r,bitsPerRow:s,showBits:d})=>{let c=t.append("g"),p=a*(o+l)+l;for(let i of e){let f=i.start%s*r+1,g=(i.end-i.start+1)*r-n;if(c.append("rect").attr("x",f).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",f+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(i.label),!d)continue;let k=i.end===i.start,m=p-2;c.append("text").attr("x",f+(k?g/2:0)).attr("y",m).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(i.start),k||c.append("text").attr("x",f+g).attr("y",m).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(i.end)}},"drawWord"),j={draw:I},G={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},H=h(({packet:t}={})=>{let e=u(G,t);return`
1
+ import{a as z}from"./embed-page-chunk-W2KSSDKP.js";import{a as E}from"./embed-page-chunk-3NCDEXPW.js";import"./embed-page-chunk-2RWSBPM5.js";import{a as P}from"./embed-page-chunk-GA5A7NLC.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-YO55GEK3.js";import{o as u}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{N as x,S as y,T as $,U as B,V as C,W as S,X as D,Y as T,j as w,t as v}from"./embed-page-chunk-FPA5BD6K.js";import{b}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import{a as h}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var N=w.packet,F=class{constructor(){this.packet=[],this.setAccTitle=$,this.getAccTitle=B,this.setDiagramTitle=D,this.getDiagramTitle=T,this.getAccDescription=S,this.setAccDescription=C}static{h(this,"PacketDB")}getConfig(){let t=u({...N,...v().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){y(),this.packet=[]}},L=1e4,M=h((t,e)=>{z(t,e);let a=-1,o=[],n=1,{bitsPerRow:l}=e.getConfig();for(let{start:r,end:s,bits:d,label:c}of t.blocks){if(r!==void 0&&s!==void 0&&s<r)throw new Error(`Packet block ${r} - ${s} is invalid. End must be greater than start.`);if(r??=a+1,r!==a+1)throw new Error(`Packet block ${r} - ${s??r} is not contiguous. It should start from ${a+1}.`);if(d===0)throw new Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(s??=r+(d??1)-1,d??=s-r+1,a=s,b.debug(`Packet block ${r} - ${a} with label ${c}`);o.length<=l+1&&e.getPacket().length<L;){let[p,i]=Y({start:r,end:s,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(e.pushWord(o),o=[],n++),!i)break;({start:r,end:s,bits:d,label:c}=i)}}e.pushWord(o)},"populate"),Y=h((t,e,a)=>{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*a)return[t,void 0];let o=e*a-1,n=e*a;return[{start:t.start,end:o,label:t.label,bits:o-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),A={parser:{yy:void 0},parse:h(async t=>{let e=await E("packet",t),a=A.parser?.yy;if(!(a instanceof F))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");b.debug(e),M(e,a)},"parse")},I=h((t,e,a,o)=>{let n=o.db,l=n.getConfig(),{rowHeight:r,paddingY:s,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),i=n.getDiagramTitle(),f=r+s,g=f*(p.length+1)-(i?0:r),k=d*c+2,m=P(e);m.attr("viewBox",`0 0 ${k} ${g}`),x(m,g,k,l.useMaxWidth);for(let[W,_]of p.entries())O(m,_,W,l);m.append("text").text(i).attr("x",k/2).attr("y",g-f/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=h((t,e,a,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:r,bitsPerRow:s,showBits:d})=>{let c=t.append("g"),p=a*(o+l)+l;for(let i of e){let f=i.start%s*r+1,g=(i.end-i.start+1)*r-n;if(c.append("rect").attr("x",f).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",f+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(i.label),!d)continue;let k=i.end===i.start,m=p-2;c.append("text").attr("x",f+(k?g/2:0)).attr("y",m).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(i.start),k||c.append("text").attr("x",f+g).attr("y",m).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(i.end)}},"drawWord"),j={draw:I},G={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},H=h(({packet:t}={})=>{let e=u(G,t);return`
2
2
  .packetByte {
3
3
  font-size: ${e.byteFontSize};
4
4
  }
@@ -1,4 +1,4 @@
1
- import{a as he}from"./embed-page-chunk-GA5A7NLC.js";import{a as ue}from"./embed-page-chunk-W2KSSDKP.js";import{a as ye}from"./embed-page-chunk-XRN4MSDO.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-2RWSBPM5.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-YO55GEK3.js";import{a as fe}from"./embed-page-chunk-MM3IA4HE.js";import{c as me,d as $}from"./embed-page-chunk-ME637LUU.js";import{o as I}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{N as ae,S as le,T as se,U as re,V as ne,W as oe,X as ie,Y as ce,h as ee,j as te,t as R}from"./embed-page-chunk-FPA5BD6K.js";import{b as H}from"./embed-page-chunk-2BOYLGSX.js";import{e as N,f as pe,h as de,i as B}from"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import{b as V}from"./embed-page-chunk-S4XZPBRM.js";import{a as h}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var ge=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=se,this.getAccTitle=re,this.setDiagramTitle=ie,this.getDiagramTitle=ce,this.getAccDescription=oe,this.setAccDescription=ne}static{h(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let r=te,s=R();return I({...r.treemap,...s.treemap??{}})}addNode(r,s){this.nodes.push(r),this.levels.set(r,s),s===0&&(this.outerNodes.push(r),this.root??=r)}getRoot(){return{name:"",children:this.outerNodes}}addClass(r,s){let i=this.classes.get(r)??{id:r,styles:[],textStyles:[]},c=s.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");c&&c.forEach(l=>{me(l)&&(i?.textStyles?i.textStyles.push(l):i.textStyles=[l]),i?.styles?i.styles.push(l):i.styles=[l]}),this.classes.set(r,i)}getClasses(){return this.classes}getStylesForClass(r){return this.classes.get(r)?.styles??[]}clear(){le(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function Se(r){if(!r.length)return[];let s=[],i=[];return r.forEach(c=>{let l={name:c.name,children:c.type==="Leaf"?void 0:[]};for(l.classSelector=c?.classSelector,c?.cssCompiledStyles&&(l.cssCompiledStyles=c.cssCompiledStyles),c.type==="Leaf"&&c.value!==void 0&&(l.value=c.value);i.length>0&&i[i.length-1].level>=c.level;)i.pop();if(i.length===0)s.push(l);else{let n=i[i.length-1].node;n.children?n.children.push(l):n.children=[l]}c.type!=="Leaf"&&i.push({node:l,level:c.level})}),s}h(Se,"buildHierarchy");var Fe=h((r,s)=>{ue(r,s);let i=[];for(let n of r.TreemapRows??[])n.$type==="ClassDefStatement"&&s.addClass(n.className??"",n.styleText??"");for(let n of r.TreemapRows??[]){let d=n.item;if(!d)continue;let m=n.indent?parseInt(n.indent):0,k=Ne(d),a=d.classSelector?s.getStylesForClass(d.classSelector):[],A=a.length>0?a:void 0,b={level:m,name:k,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:A};i.push(b)}let c=Se(i),l=h((n,d)=>{for(let m of n)s.addNode(m,d),m.children&&m.children.length>0&&l(m.children,d+1)},"addNodesRecursively");l(c,0)},"populate"),Ne=h(r=>r.name?String(r.name):"","getItemName"),xe={parser:{yy:void 0},parse:h(async r=>{try{let i=await ye("treemap",r);H.debug("Treemap AST:",i);let c=xe.parser?.yy;if(!(c instanceof ge))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Fe(i,c)}catch(s){throw H.error("Error parsing treemap:",s),s}},"parse")},ze=10,z=10,M=25,Ae=h((r,s,i,c)=>{let l=c.db,n=l.getConfig(),d=n.padding??ze,m=l.getDiagramTitle(),k=l.getRoot(),{themeVariables:a}=R();if(!k)return;let A=m?30:0,b=he(s),Y=n.nodeWidth?n.nodeWidth*z:960,j=n.nodeHeight?n.nodeHeight*z:500,O=Y,U=j+A;b.attr("viewBox",`0 0 ${O} ${U}`),ae(b,U,O,n.useMaxWidth);let v;try{let e=n.valueFormat||",";if(e==="$0,0")v=h(t=>"$"+N(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){let t=/\.\d+/.exec(e),o=t?t[0]:"";v=h(f=>"$"+N(","+o)(f),"valueFormat")}else if(e.startsWith("$")){let t=e.substring(1);v=h(o=>"$"+N(t||"")(o),"valueFormat")}else v=N(e)}catch(e){H.error("Error creating format function:",e),v=N(",")}let P=B().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),be=B().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),W=B().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);m&&b.append("text").attr("x",O/2).attr("y",A/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(m);let q=b.append("g").attr("transform",`translate(0, ${A})`).attr("class","treemapContainer"),ve=pe(k).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=de().size([Y,j]).paddingTop(e=>e.children&&e.children.length>0?M+z:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?z:0).paddingRight(e=>e.children&&e.children.length>0?z:0).paddingBottom(e=>e.children&&e.children.length>0?z:0).round(!0)(ve),Ce=J.descendants().filter(e=>e.children&&e.children.length>0),D=q.selectAll(".treemapSection").data(Ce).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);D.append("rect").attr("width",e=>e.x1-e.x0).attr("height",M).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),D.append("clipPath").attr("id",(e,t)=>`clip-section-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",M),D.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>P(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>be(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";let t=$({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),D.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",M/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,t)=>`url(#clip-section-${s}-${t})`).attr("style",e=>{if(e.depth===0)return"display: none;";let t="dominant-baseline: middle; font-size: 12px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",o=$({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;let t=V(this),o=e.data.name;t.text(o);let f=e.x1-e.x0,y=6,u;n.showValues!==!1&&e.value?u=f-10-30-10-y:u=f-y-6;let p=Math.max(15,u),w=t.node();if(w.getComputedTextLength()>p){let T=o;for(;T.length>0;){if(T=o.substring(0,T.length-1),T.length===0){t.text("..."),w.getComputedTextLength()>p&&t.text("");break}if(t.text(T+"..."),w.getComputedTextLength()<=p)break}}}),n.showValues!==!1&&D.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",M/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?v(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";let t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",o=$({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")});let K=J.leaves(),S=K.length>20,we=S?16:38,E=S?14:28,L=S?4:8,F=S?4:6,G=S?2:4,Q=S?8:10,X=S?1:2,_=q.selectAll(".treemapLeafGroup").data(K).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);_.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?P(e.parent.data.name):P(e.data.name)).attr("style",e=>$({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?P(e.parent.data.name):P(e.data.name)).attr("stroke-width",3),_.append("clipPath").attr("id",(e,t)=>`clip-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),_.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{let t=`text-anchor: middle; dominant-baseline: middle; font-size: ${we}px;fill:`+W(e.data.name)+";",o=$({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.data.name).each(function(e){let t=V(this),o=e.x1-e.x0,f=e.y1-e.y0,y=t.node(),u=o-2*G,C=f-2*G;if(u<Q||C<Q){t.style("display","none");return}let p=parseInt(t.style("font-size"),10),w=.6;for(;y.getComputedTextLength()>u&&p>L;)p--,t.style("font-size",`${p}px`);let g=Math.max(F,Math.min(E,Math.round(p*w))),x=p+X+g;for(;x>C&&p>L&&(p--,g=Math.max(F,Math.min(E,Math.round(p*w))),!(g<F&&p===L));)t.style("font-size",`${p}px`),x=p+X+g,g<=F&&x>C;t.style("font-size",`${p}px`),S?(p<L||C<L)&&t.style("display","none"):(y.getComputedTextLength()>u||p<L||C<p)&&t.style("display","none")}),n.showValues!==!1&&_.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{let o=`text-anchor: middle; dominant-baseline: hanging; font-size: ${E}px;fill:`+W(t.data.name)+";",f=$({cssCompiledStyles:t.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,o)=>`url(#clip-${s}-${o})`).text(t=>t.value?v(t.value):"").each(function(t){let o=V(this),f=this.parentNode;if(!f){o.style("display","none");return}let y=V(f).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){o.style("display","none");return}let u=parseFloat(y.style("font-size")),p=Math.max(F,Math.min(E,Math.round(u*.6)));o.style("font-size",`${p}px`);let g=(t.y1-t.y0)/2+u/2+X;o.attr("y",g);let x=t.x1-t.x0,Z=t.y1-t.y0-4,Le=x-2*G;o.node().getComputedTextLength()>Le||g+p>Z||p<F?o.style("display","none"):o.style("display",null)});let Te=n.diagramPadding??8;fe(b,Te,"flowchart",n?.useMaxWidth||!1)},"draw"),Pe=h(function(r,s){return s.db.getClasses()},"getClasses"),De={draw:Ae,getClasses:Pe},Ve={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Me=h(({treemap:r}={})=>{let s=ee(),i=R(),c=I(s,i.themeVariables),l=I(Ve,r),n=l.titleColor??c.titleColor,d=l.labelColor??c.textColor,m=l.valueColor??c.textColor;return`
1
+ import{a as ue}from"./embed-page-chunk-W2KSSDKP.js";import{a as ye}from"./embed-page-chunk-3NCDEXPW.js";import"./embed-page-chunk-2RWSBPM5.js";import{a as he}from"./embed-page-chunk-GA5A7NLC.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-YO55GEK3.js";import{a as fe}from"./embed-page-chunk-MM3IA4HE.js";import{c as me,d as $}from"./embed-page-chunk-ME637LUU.js";import{o as I}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{N as ae,S as le,T as se,U as re,V as ne,W as oe,X as ie,Y as ce,h as ee,j as te,t as R}from"./embed-page-chunk-FPA5BD6K.js";import{b as H}from"./embed-page-chunk-2BOYLGSX.js";import{e as N,f as pe,h as de,i as B}from"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import{b as V}from"./embed-page-chunk-S4XZPBRM.js";import{a as h}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var ge=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=se,this.getAccTitle=re,this.setDiagramTitle=ie,this.getDiagramTitle=ce,this.getAccDescription=oe,this.setAccDescription=ne}static{h(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let r=te,s=R();return I({...r.treemap,...s.treemap??{}})}addNode(r,s){this.nodes.push(r),this.levels.set(r,s),s===0&&(this.outerNodes.push(r),this.root??=r)}getRoot(){return{name:"",children:this.outerNodes}}addClass(r,s){let i=this.classes.get(r)??{id:r,styles:[],textStyles:[]},c=s.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");c&&c.forEach(l=>{me(l)&&(i?.textStyles?i.textStyles.push(l):i.textStyles=[l]),i?.styles?i.styles.push(l):i.styles=[l]}),this.classes.set(r,i)}getClasses(){return this.classes}getStylesForClass(r){return this.classes.get(r)?.styles??[]}clear(){le(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function Se(r){if(!r.length)return[];let s=[],i=[];return r.forEach(c=>{let l={name:c.name,children:c.type==="Leaf"?void 0:[]};for(l.classSelector=c?.classSelector,c?.cssCompiledStyles&&(l.cssCompiledStyles=c.cssCompiledStyles),c.type==="Leaf"&&c.value!==void 0&&(l.value=c.value);i.length>0&&i[i.length-1].level>=c.level;)i.pop();if(i.length===0)s.push(l);else{let n=i[i.length-1].node;n.children?n.children.push(l):n.children=[l]}c.type!=="Leaf"&&i.push({node:l,level:c.level})}),s}h(Se,"buildHierarchy");var Fe=h((r,s)=>{ue(r,s);let i=[];for(let n of r.TreemapRows??[])n.$type==="ClassDefStatement"&&s.addClass(n.className??"",n.styleText??"");for(let n of r.TreemapRows??[]){let d=n.item;if(!d)continue;let m=n.indent?parseInt(n.indent):0,k=Ne(d),a=d.classSelector?s.getStylesForClass(d.classSelector):[],A=a.length>0?a:void 0,b={level:m,name:k,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:A};i.push(b)}let c=Se(i),l=h((n,d)=>{for(let m of n)s.addNode(m,d),m.children&&m.children.length>0&&l(m.children,d+1)},"addNodesRecursively");l(c,0)},"populate"),Ne=h(r=>r.name?String(r.name):"","getItemName"),xe={parser:{yy:void 0},parse:h(async r=>{try{let i=await ye("treemap",r);H.debug("Treemap AST:",i);let c=xe.parser?.yy;if(!(c instanceof ge))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Fe(i,c)}catch(s){throw H.error("Error parsing treemap:",s),s}},"parse")},ze=10,z=10,M=25,Ae=h((r,s,i,c)=>{let l=c.db,n=l.getConfig(),d=n.padding??ze,m=l.getDiagramTitle(),k=l.getRoot(),{themeVariables:a}=R();if(!k)return;let A=m?30:0,b=he(s),Y=n.nodeWidth?n.nodeWidth*z:960,j=n.nodeHeight?n.nodeHeight*z:500,O=Y,U=j+A;b.attr("viewBox",`0 0 ${O} ${U}`),ae(b,U,O,n.useMaxWidth);let v;try{let e=n.valueFormat||",";if(e==="$0,0")v=h(t=>"$"+N(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){let t=/\.\d+/.exec(e),o=t?t[0]:"";v=h(f=>"$"+N(","+o)(f),"valueFormat")}else if(e.startsWith("$")){let t=e.substring(1);v=h(o=>"$"+N(t||"")(o),"valueFormat")}else v=N(e)}catch(e){H.error("Error creating format function:",e),v=N(",")}let P=B().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),be=B().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),W=B().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);m&&b.append("text").attr("x",O/2).attr("y",A/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(m);let q=b.append("g").attr("transform",`translate(0, ${A})`).attr("class","treemapContainer"),ve=pe(k).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=de().size([Y,j]).paddingTop(e=>e.children&&e.children.length>0?M+z:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?z:0).paddingRight(e=>e.children&&e.children.length>0?z:0).paddingBottom(e=>e.children&&e.children.length>0?z:0).round(!0)(ve),Ce=J.descendants().filter(e=>e.children&&e.children.length>0),D=q.selectAll(".treemapSection").data(Ce).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);D.append("rect").attr("width",e=>e.x1-e.x0).attr("height",M).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),D.append("clipPath").attr("id",(e,t)=>`clip-section-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",M),D.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>P(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>be(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";let t=$({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),D.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",M/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,t)=>`url(#clip-section-${s}-${t})`).attr("style",e=>{if(e.depth===0)return"display: none;";let t="dominant-baseline: middle; font-size: 12px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",o=$({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;let t=V(this),o=e.data.name;t.text(o);let f=e.x1-e.x0,y=6,u;n.showValues!==!1&&e.value?u=f-10-30-10-y:u=f-y-6;let p=Math.max(15,u),w=t.node();if(w.getComputedTextLength()>p){let T=o;for(;T.length>0;){if(T=o.substring(0,T.length-1),T.length===0){t.text("..."),w.getComputedTextLength()>p&&t.text("");break}if(t.text(T+"..."),w.getComputedTextLength()<=p)break}}}),n.showValues!==!1&&D.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",M/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?v(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";let t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+W(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",o=$({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")});let K=J.leaves(),S=K.length>20,we=S?16:38,E=S?14:28,L=S?4:8,F=S?4:6,G=S?2:4,Q=S?8:10,X=S?1:2,_=q.selectAll(".treemapLeafGroup").data(K).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);_.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?P(e.parent.data.name):P(e.data.name)).attr("style",e=>$({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?P(e.parent.data.name):P(e.data.name)).attr("stroke-width",3),_.append("clipPath").attr("id",(e,t)=>`clip-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),_.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{let t=`text-anchor: middle; dominant-baseline: middle; font-size: ${we}px;fill:`+W(e.data.name)+";",o=$({cssCompiledStyles:e.data.cssCompiledStyles});return t+o.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.data.name).each(function(e){let t=V(this),o=e.x1-e.x0,f=e.y1-e.y0,y=t.node(),u=o-2*G,C=f-2*G;if(u<Q||C<Q){t.style("display","none");return}let p=parseInt(t.style("font-size"),10),w=.6;for(;y.getComputedTextLength()>u&&p>L;)p--,t.style("font-size",`${p}px`);let g=Math.max(F,Math.min(E,Math.round(p*w))),x=p+X+g;for(;x>C&&p>L&&(p--,g=Math.max(F,Math.min(E,Math.round(p*w))),!(g<F&&p===L));)t.style("font-size",`${p}px`),x=p+X+g,g<=F&&x>C;t.style("font-size",`${p}px`),S?(p<L||C<L)&&t.style("display","none"):(y.getComputedTextLength()>u||p<L||C<p)&&t.style("display","none")}),n.showValues!==!1&&_.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{let o=`text-anchor: middle; dominant-baseline: hanging; font-size: ${E}px;fill:`+W(t.data.name)+";",f=$({cssCompiledStyles:t.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,o)=>`url(#clip-${s}-${o})`).text(t=>t.value?v(t.value):"").each(function(t){let o=V(this),f=this.parentNode;if(!f){o.style("display","none");return}let y=V(f).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){o.style("display","none");return}let u=parseFloat(y.style("font-size")),p=Math.max(F,Math.min(E,Math.round(u*.6)));o.style("font-size",`${p}px`);let g=(t.y1-t.y0)/2+u/2+X;o.attr("y",g);let x=t.x1-t.x0,Z=t.y1-t.y0-4,Le=x-2*G;o.node().getComputedTextLength()>Le||g+p>Z||p<F?o.style("display","none"):o.style("display",null)});let Te=n.diagramPadding??8;fe(b,Te,"flowchart",n?.useMaxWidth||!1)},"draw"),Pe=h(function(r,s){return s.db.getClasses()},"getClasses"),De={draw:Ae,getClasses:Pe},Ve={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Me=h(({treemap:r}={})=>{let s=ee(),i=R(),c=I(s,i.themeVariables),l=I(Ve,r),n=l.titleColor??c.titleColor,d=l.labelColor??c.textColor,m=l.valueColor??c.textColor;return`
2
2
  .treemapNode.section {
3
3
  stroke: ${l.sectionStrokeColor};
4
4
  stroke-width: ${l.sectionStrokeWidth};
@@ -1,4 +1,4 @@
1
- import{a as E}from"./embed-page-chunk-GA5A7NLC.js";import{a as F}from"./embed-page-chunk-W2KSSDKP.js";import{a as D}from"./embed-page-chunk-XRN4MSDO.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-2RWSBPM5.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-YO55GEK3.js";import{o as y}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{N as L,S as T,T as S,U as k,V as O,W as R,X as I,Y as _,h as A,j as M,t as b}from"./embed-page-chunk-FPA5BD6K.js";import{b as C}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import{a as i}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w=32,P={axes:[],curves:[],options:x},g=structuredClone(P),U=M.radar,X=i(()=>y({...U,...b().radar}),"getConfig"),z=i(()=>g.axes,"getAxes"),K=i(()=>g.curves,"getCurves"),N=i(()=>g.options,"getOptions"),Y=i(a=>{g.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Z=i(a=>{g.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:q(t.entries)}))},"setCurves"),q=i(a=>{if(a[0].axis==null)return a.map(e=>e.value);let t=z();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{let r=a.find(n=>n.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=i(a=>{let t=a.reduce((e,r)=>(e[r.name]=r,e),{});g.options={showLegend:t.showLegend?.value??x.showLegend,ticks:t.ticks?.value??x.ticks,max:t.max?.value??x.max,min:t.min?.value??x.min,graticule:t.graticule?.value??x.graticule},g.options.ticks>w&&(C.warn(`Radar diagram ticks (${g.options.ticks}) exceeds maximum allowed (${w}). Using ${w} instead.`),g.options.ticks=w)},"setOptions"),Q=i(()=>{T(),g=structuredClone(P)},"clear"),$={getAxes:z,getCurves:K,getOptions:N,setAxes:Y,setCurves:Z,setOptions:J,getConfig:X,clear:Q,setAccTitle:S,getAccTitle:k,setDiagramTitle:I,getDiagramTitle:_,getAccDescription:R,setAccDescription:O},tt=i(a=>{F(a,$);let{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:i(async a=>{let t=await D("radar",a);C.debug(t),tt(t)},"parse")},at=i((a,t,e,r)=>{let n=r.db,l=n.getAxes(),c=n.getCurves(),s=n.getOptions(),o=n.getConfig(),d=n.getDiagramTitle(),p=E(t),u=rt(p,o),m=s.max??Math.max(...c.map(f=>Math.max(...f.entries))),h=s.min,v=Math.min(o.width,o.height)/2;nt(u,l,v,s.ticks,s.graticule),st(u,l,v,o),G(u,l,c,h,m,s.graticule,o),V(u,c,s.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),rt=i((a,t)=>{let e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,n={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return L(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${n.x}, ${n.y})`)},"drawFrame"),nt=i((a,t,e,r,n)=>{if(n==="circle")for(let l=0;l<r;l++){let c=e*(l+1)/r;a.append("circle").attr("r",c).attr("class","radarGraticule")}else if(n==="polygon"){let l=t.length;for(let c=0;c<r;c++){let s=e*(c+1)/r,o=t.map((d,p)=>{let u=2*p*Math.PI/l-Math.PI/2,m=s*Math.cos(u),h=s*Math.sin(u);return`${m},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),st=i((a,t,e,r)=>{let n=t.length;for(let l=0;l<n;l++){let c=t[l].label,s=2*l*Math.PI/n-Math.PI/2,o=Math.cos(s),d=Math.sin(s);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*o).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");let p=o>.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",m=4;a.append("text").text(c).attr("x",e*r.axisLabelFactor*o+m*o).attr("y",e*r.axisLabelFactor*d+m*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function G(a,t,e,r,n,l,c){let s=t.length,o=Math.min(c.width,c.height)/2;e.forEach((d,p)=>{if(d.entries.length!==s)return;let u=d.entries.map((m,h)=>{let v=2*Math.PI*h/s-Math.PI/2,f=B(m,r,n,o),H=f*Math.cos(v),j=f*Math.sin(v);return{x:H,y:j}});l==="circle"?a.append("path").attr("d",W(u,c.curveTension)).attr("class",`radarCurve-${p}`):l==="polygon"&&a.append("polygon").attr("points",u.map(m=>`${m.x},${m.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}i(G,"drawCurves");function B(a,t,e,r){let n=Math.min(Math.max(a,t),e);return r*(n-t)/(e-t)}i(B,"relativeRadius");function W(a,t){let e=a.length,r=`M${a[0].x},${a[0].y}`;for(let n=0;n<e;n++){let l=a[(n-1+e)%e],c=a[n],s=a[(n+1)%e],o=a[(n+2)%e],d={x:c.x+(s.x-l.x)*t,y:c.y+(s.y-l.y)*t},p={x:s.x-(o.x-c.x)*t,y:s.y-(o.y-c.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${s.x},${s.y}`}return`${r} Z`}i(W,"closedRoundCurve");function V(a,t,e,r){if(!e)return;let n=(r.width/2+r.marginRight)*3/4,l=-(r.height/2+r.marginTop)*3/4,c=20;t.forEach((s,o)=>{let d=a.append("g").attr("transform",`translate(${n}, ${l+o*c})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(s.label)})}i(V,"drawLegend");var ot={draw:at},it=i((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){let n=a[`cScale${r}`];e+=`
1
+ import{a as F}from"./embed-page-chunk-W2KSSDKP.js";import{a as D}from"./embed-page-chunk-3NCDEXPW.js";import"./embed-page-chunk-2RWSBPM5.js";import{a as E}from"./embed-page-chunk-GA5A7NLC.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-YO55GEK3.js";import{o as y}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{N as L,S as T,T as S,U as k,V as O,W as R,X as I,Y as _,h as A,j as M,t as b}from"./embed-page-chunk-FPA5BD6K.js";import{b as C}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import{a as i}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w=32,P={axes:[],curves:[],options:x},g=structuredClone(P),U=M.radar,X=i(()=>y({...U,...b().radar}),"getConfig"),z=i(()=>g.axes,"getAxes"),K=i(()=>g.curves,"getCurves"),N=i(()=>g.options,"getOptions"),Y=i(a=>{g.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Z=i(a=>{g.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:q(t.entries)}))},"setCurves"),q=i(a=>{if(a[0].axis==null)return a.map(e=>e.value);let t=z();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{let r=a.find(n=>n.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),J=i(a=>{let t=a.reduce((e,r)=>(e[r.name]=r,e),{});g.options={showLegend:t.showLegend?.value??x.showLegend,ticks:t.ticks?.value??x.ticks,max:t.max?.value??x.max,min:t.min?.value??x.min,graticule:t.graticule?.value??x.graticule},g.options.ticks>w&&(C.warn(`Radar diagram ticks (${g.options.ticks}) exceeds maximum allowed (${w}). Using ${w} instead.`),g.options.ticks=w)},"setOptions"),Q=i(()=>{T(),g=structuredClone(P)},"clear"),$={getAxes:z,getCurves:K,getOptions:N,setAxes:Y,setCurves:Z,setOptions:J,getConfig:X,clear:Q,setAccTitle:S,getAccTitle:k,setDiagramTitle:I,getDiagramTitle:_,getAccDescription:R,setAccDescription:O},tt=i(a=>{F(a,$);let{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:i(async a=>{let t=await D("radar",a);C.debug(t),tt(t)},"parse")},at=i((a,t,e,r)=>{let n=r.db,l=n.getAxes(),c=n.getCurves(),s=n.getOptions(),o=n.getConfig(),d=n.getDiagramTitle(),p=E(t),u=rt(p,o),m=s.max??Math.max(...c.map(f=>Math.max(...f.entries))),h=s.min,v=Math.min(o.width,o.height)/2;nt(u,l,v,s.ticks,s.graticule),st(u,l,v,o),G(u,l,c,h,m,s.graticule,o),V(u,c,s.showLegend,o),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),rt=i((a,t)=>{let e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,n={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return L(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${n.x}, ${n.y})`)},"drawFrame"),nt=i((a,t,e,r,n)=>{if(n==="circle")for(let l=0;l<r;l++){let c=e*(l+1)/r;a.append("circle").attr("r",c).attr("class","radarGraticule")}else if(n==="polygon"){let l=t.length;for(let c=0;c<r;c++){let s=e*(c+1)/r,o=t.map((d,p)=>{let u=2*p*Math.PI/l-Math.PI/2,m=s*Math.cos(u),h=s*Math.sin(u);return`${m},${h}`}).join(" ");a.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),st=i((a,t,e,r)=>{let n=t.length;for(let l=0;l<n;l++){let c=t[l].label,s=2*l*Math.PI/n-Math.PI/2,o=Math.cos(s),d=Math.sin(s);a.append("line").attr("x1",0).attr("y1",0).attr("x2",e*r.axisScaleFactor*o).attr("y2",e*r.axisScaleFactor*d).attr("class","radarAxisLine");let p=o>.01?"start":o<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",m=4;a.append("text").text(c).attr("x",e*r.axisLabelFactor*o+m*o).attr("y",e*r.axisLabelFactor*d+m*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function G(a,t,e,r,n,l,c){let s=t.length,o=Math.min(c.width,c.height)/2;e.forEach((d,p)=>{if(d.entries.length!==s)return;let u=d.entries.map((m,h)=>{let v=2*Math.PI*h/s-Math.PI/2,f=B(m,r,n,o),H=f*Math.cos(v),j=f*Math.sin(v);return{x:H,y:j}});l==="circle"?a.append("path").attr("d",W(u,c.curveTension)).attr("class",`radarCurve-${p}`):l==="polygon"&&a.append("polygon").attr("points",u.map(m=>`${m.x},${m.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}i(G,"drawCurves");function B(a,t,e,r){let n=Math.min(Math.max(a,t),e);return r*(n-t)/(e-t)}i(B,"relativeRadius");function W(a,t){let e=a.length,r=`M${a[0].x},${a[0].y}`;for(let n=0;n<e;n++){let l=a[(n-1+e)%e],c=a[n],s=a[(n+1)%e],o=a[(n+2)%e],d={x:c.x+(s.x-l.x)*t,y:c.y+(s.y-l.y)*t},p={x:s.x-(o.x-c.x)*t,y:s.y-(o.y-c.y)*t};r+=` C${d.x},${d.y} ${p.x},${p.y} ${s.x},${s.y}`}return`${r} Z`}i(W,"closedRoundCurve");function V(a,t,e,r){if(!e)return;let n=(r.width/2+r.marginRight)*3/4,l=-(r.height/2+r.marginTop)*3/4,c=20;t.forEach((s,o)=>{let d=a.append("g").attr("transform",`translate(${n}, ${l+o*c})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${o}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(s.label)})}i(V,"drawLegend");var ot={draw:at},it=i((a,t)=>{let e="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){let n=a[`cScale${r}`];e+=`
2
2
  .radarCurve-${r} {
3
3
  color: ${n};
4
4
  fill: ${n};
@@ -1 +1 @@
1
- import{a as n,b as p,c as f}from"./embed-page-chunk-S2XGVDY7.js";import"./embed-page-chunk-GA5A7NLC.js";import{a as i}from"./embed-page-chunk-W2KSSDKP.js";import{b as l}from"./embed-page-chunk-XRN4MSDO.js";import"./embed-page-chunk-SN26GUFN.js";import{b as m}from"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-2RWSBPM5.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-YO55GEK3.js";import"./embed-page-chunk-FPA5BD6K.js";import{b as o}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import{a as t}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var c=m().RailroadEbnf.parser.LangiumParser,s=t(e=>{let r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{let r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),u=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},u(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),y=t(e=>e.postfixes.reduce((r,a)=>b(r,a),u(e.base)),"transformTerm"),d=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{i(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(d(r)))},"populateDb"),P={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");let r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new l(r);let a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},$={parser:P,db:n,renderer:f,styles:p};export{$ as diagram};
1
+ import{a as n,b as p,c as f}from"./embed-page-chunk-S2XGVDY7.js";import{a as i}from"./embed-page-chunk-W2KSSDKP.js";import{b as l}from"./embed-page-chunk-3NCDEXPW.js";import"./embed-page-chunk-2RWSBPM5.js";import"./embed-page-chunk-GA5A7NLC.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-SN26GUFN.js";import{b as m}from"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-YO55GEK3.js";import"./embed-page-chunk-FPA5BD6K.js";import{b as o}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import{a as t}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var c=m().RailroadEbnf.parser.LangiumParser,s=t(e=>{let r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{let r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),u=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},u(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),y=t(e=>e.postfixes.reduce((r,a)=>b(r,a),u(e.base)),"transformTerm"),d=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{i(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(d(r)))},"populateDb"),P={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");let r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new l(r);let a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},$={parser:P,db:n,renderer:f,styles:p};export{$ as diagram};
@@ -1 +1 @@
1
- import"./embed-page-chunk-45A47GH2.js";var s={"chatMenu.workspace.personalAssistant":"Personal Assistant","chatMenu.workspace.projects":"Projects","chatMenu.workspace.metrics":"Metrics","chatMenu.workspace.database":"Database","chatMenu.workspace.plugins":"Plugins","chatMenu.workspace.modelProviders":"Model Providers","chatMenu.workspace.runtime":"Runtime","chatMenu.workspace.inbox":"Inbox","chatMenu.workspace.automations":"Automations","chatMenu.workspace.shares":"Shares","chatMenu.workspace.migration":"Migration","chatMenu.workspace.eval":"Eval","chatMenu.workspace.assistants":"Agents","chatMenu.workspace.skills":"Skills","chatMenu.workspace.collections":"Collections","chatMenu.workspace.mcp":"MCP","chatMenu.workspace.apiKeys":"API Keys","chatMenu.workspace.auditLog":"Audit Log","chatMenu.workspace.runtimeProfiles":"Runtime Profiles","chatMenu.workspace.tools":"Tools","chatMenu.workspace.tasks":"Tasks","chatMenu.group.dataSource":"DataSource","chatMenu.group.process":"Process","chatMenu.group.knowledge":"Knowledge","chatMenu.group.settings":"Settings","chatMenu.workspace.unpinFromMenu":"Unpin from Menu","chatMenu.workspace.unpinnedSuccess":"Unpinned from menu","chatMenu.workspace.crons":"Crons","chatMenu.workspace.store":"Long-term Store","chatMenu.workspace.systemInfo":"System Info","chatMenu.workspace.observability":"Observability"},o={messages:s};export{o as default,s as messages};
1
+ import"./embed-page-chunk-45A47GH2.js";var s={"chatMenu.workspace.personalAssistant":"Personal Assistant","chatMenu.workspace.projects":"Projects","chatMenu.workspace.metrics":"Metrics","chatMenu.workspace.database":"Database","chatMenu.workspace.plugins":"Plugins","chatMenu.workspace.modelProviders":"Model Providers","chatMenu.workspace.runtime":"Runtime","chatMenu.workspace.inbox":"Inbox","chatMenu.workspace.automations":"Automations","chatMenu.workspace.shares":"Shares","chatMenu.workspace.migration":"Migration","chatMenu.workspace.eval":"Eval","chatMenu.workspace.assistants":"Agents","chatMenu.workspace.skills":"Skills","chatMenu.workspace.collections":"Collections","chatMenu.workspace.mcp":"MCP","chatMenu.workspace.apiKeys":"API Keys","chatMenu.workspace.auditLog":"Audit Log","chatMenu.workspace.runtimeProfiles":"Runtime Profiles","chatMenu.workspace.tools":"Tools","chatMenu.workspace.tasks":"Tasks","chatMenu.group.dataSource":"DataSource","chatMenu.group.process":"Process","chatMenu.group.knowledge":"Knowledge","chatMenu.group.settings":"Settings","chatMenu.group.administration":"Administration","chatMenu.workspace.unpinFromMenu":"Unpin from Menu","chatMenu.workspace.unpinnedSuccess":"Unpinned from menu","chatMenu.workspace.crons":"Crons","chatMenu.workspace.store":"Long-term Store","chatMenu.workspace.systemInfo":"System Info","chatMenu.workspace.observability":"Observability","chatMenu.workspace.monitor":"Monitor"},o={messages:s};export{o as default,s as messages};
@@ -0,0 +1 @@
1
+ import"./embed-page-chunk-45A47GH2.js";var r={"monitor.title":"Agent Monitor","monitor.subtitle":"Tenant-wide thread and run posture. Read-only.","monitor.scope":"Entire tenant","monitor.refresh":"Refresh","monitor.empty":"No records","monitor.tabs.runs":"Runs","monitor.tabs.threads":"Threads","monitor.overview.pending":"Pending","monitor.overview.running":"Running","monitor.overview.stuck":"Stuck","monitor.overview.failed":"Failed","monitor.overview.pendingThreads":"Pending threads","monitor.overview.oldestPending":"Oldest pending","monitor.filters.status":"Status","monitor.filters.source":"Source","monitor.filters.kind":"Kind","monitor.filters.assistant":"Agent","monitor.columns.status":"Status","monitor.columns.run":"Run","monitor.columns.agent":"Agent","monitor.columns.thread":"Thread","monitor.columns.source":"Source","monitor.columns.kind":"Kind","monitor.columns.scope":"Workspace / Project","monitor.columns.created":"Created","monitor.columns.duration":"Duration","monitor.columns.error":"Error","monitor.drawer.title":"Details","monitor.drawer.inputPreview":"Input preview","monitor.drawer.room":"Room","monitor.drawer.task":"Task","monitor.drawer.updated":"Updated","monitor.drawer.expires":"Expires","monitor.status.pending":"Pending","monitor.status.running":"Running","monitor.status.success":"Success","monitor.status.error":"Error","monitor.status.interrupted":"Interrupted","monitor.status.cancelled":"Cancelled","monitor.status.timeout":"Timeout","monitor.source.run_api":"Run API","monitor.source.legacy":"Legacy","monitor.source.project_task":"Project Task","monitor.kind.conversation":"Conversation","monitor.kind.room_presence":"Room presence","monitor.kind.task_execution":"Task execution","monitor.kind.open_api":"Open API","monitor.kind.web_app":"Web App","monitor.kind.cron":"Cron","monitor.kind.channel":"Channel"},t={messages:r};export{t as default,r as messages};
@@ -1,4 +1,4 @@
1
- import{a as je}from"./embed-page-chunk-62HLTSNB.js";import{a as We}from"./embed-page-chunk-MM3IA4HE.js";import{b as Ue,c as Ze}from"./embed-page-chunk-NY2J2ZAX.js";import"./embed-page-chunk-RPGUOUD3.js";import"./embed-page-chunk-7AXKFOLH.js";import"./embed-page-chunk-7IPWMDQ3.js";import"./embed-page-chunk-ME637LUU.js";import"./embed-page-chunk-X2TOGOMH.js";import"./embed-page-chunk-7TH7FFVA.js";import"./embed-page-chunk-I7EMCZI6.js";import"./embed-page-chunk-5ZRWN6T7.js";import{p as Ge,s as Ke}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{S as we,T as Ve,U as Me,V as Be,W as Fe,X as Ye,Y as Pe,Z as j,a as De,b as Le}from"./embed-page-chunk-FPA5BD6K.js";import{b as D}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import{b as ze}from"./embed-page-chunk-S4XZPBRM.js";import{a as l,b as ve}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var ye=(function(){var t=l(function(C,a,o,c){for(o=o||{},c=C.length;c--;o[C[c]]=a);return o},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],h=[1,10],n=[1,11],u=[1,12],d=[1,13],k=[1,23],p=[1,24],m=[1,25],W=[1,26],Q=[1,27],S=[1,19],X=[1,28],M=[1,29],L=[1,20],I=[1,18],T=[1,21],R=[1,22],ae=[1,36],ne=[1,37],oe=[1,38],ce=[1,39],le=[1,40],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],O=[1,45],N=[1,46],F=[1,55],Y=[40,48,50,51,52,71,72],P=[1,66],z=[1,64],A=[1,61],G=[1,65],K=[1,67],q=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],_e=[66,67,68,69,70],ge=[1,85],me=[1,84],Ee=[1,82],Se=[1,83],Te=[6,10,42,47],w=[6,10,13,41,42,47,48,49],H=[1,93],J=[1,92],$=[1,91],U=[19,58],Oe=[1,102],Ne=[1,101],he=[19,58,61,63],ue={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:l(function(a,o,c,r,b,e,Z){var s=e.length-1;switch(b){case 1:break;case 2:this.$=[];break;case 3:e[s-1].push(e[s]),this.$=e[s-1];break;case 4:case 5:this.$=e[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(e[s-4]),r.addEntity(e[s-2]),r.addRelationship(e[s-4],e[s],e[s-2],e[s-3]);break;case 9:r.addEntity(e[s-8]),r.addEntity(e[s-4]),r.addRelationship(e[s-8],e[s],e[s-4],e[s-5]),r.setClass([e[s-8]],e[s-6]),r.setClass([e[s-4]],e[s-2]);break;case 10:r.addEntity(e[s-6]),r.addEntity(e[s-2]),r.addRelationship(e[s-6],e[s],e[s-2],e[s-3]),r.setClass([e[s-6]],e[s-4]);break;case 11:r.addEntity(e[s-6]),r.addEntity(e[s-4]),r.addRelationship(e[s-6],e[s],e[s-4],e[s-5]),r.setClass([e[s-4]],e[s-2]);break;case 12:r.addEntity(e[s-3]),r.addAttributes(e[s-3],e[s-1]);break;case 13:r.addEntity(e[s-5]),r.addAttributes(e[s-5],e[s-1]),r.setClass([e[s-5]],e[s-3]);break;case 14:r.addEntity(e[s-2]);break;case 15:r.addEntity(e[s-4]),r.setClass([e[s-4]],e[s-2]);break;case 16:r.addEntity(e[s]);break;case 17:r.addEntity(e[s-2]),r.setClass([e[s-2]],e[s]);break;case 18:r.addEntity(e[s-6],e[s-4]),r.addAttributes(e[s-6],e[s-1]);break;case 19:r.addEntity(e[s-8],e[s-6]),r.addAttributes(e[s-8],e[s-1]),r.setClass([e[s-8]],e[s-3]);break;case 20:r.addEntity(e[s-5],e[s-3]);break;case 21:r.addEntity(e[s-7],e[s-5]),r.setClass([e[s-7]],e[s-2]);break;case 22:r.addEntity(e[s-3],e[s-1]);break;case 23:r.addEntity(e[s-5],e[s-3]),r.setClass([e[s-5]],e[s]);break;case 24:case 25:this.$=e[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=e[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=e[s-3],r.addClass(e[s-2],e[s-1]);break;case 37:case 38:case 59:case 68:this.$=[e[s]];break;case 39:case 40:this.$=e[s-2].concat([e[s]]);break;case 41:this.$=e[s-2],r.setClass(e[s-1],e[s]);break;case 42:this.$=e[s-3],r.addCssStyles(e[s-2],e[s-1]);break;case 43:this.$=[e[s]];break;case 44:e[s-2].push(e[s]),this.$=e[s-2];break;case 46:this.$=e[s-1]+e[s];break;case 54:case 80:case 81:this.$=e[s].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=e[s];break;case 60:e[s].push(e[s-1]),this.$=e[s];break;case 61:this.$={type:e[s-1],name:e[s]};break;case 62:this.$={type:e[s-2],name:e[s-1],keys:e[s]};break;case 63:this.$={type:e[s-2],name:e[s-1],comment:e[s]};break;case 64:this.$={type:e[s-3],name:e[s-2],keys:e[s-1],comment:e[s]};break;case 65:case 67:case 70:this.$=e[s];break;case 66:this.$=e[s-1]+e[s];break;case 69:e[s-2].push(e[s]),this.$=e[s-2];break;case 71:this.$=e[s].replace(/"/g,"");break;case 72:this.$={cardA:e[s],relType:e[s-1],cardB:e[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:n,26:u,28:d,29:14,30:15,31:16,32:17,33:k,34:p,35:m,36:W,37:Q,40:S,43:X,44:M,48:L,50:I,51:T,52:R},t(i,[2,7],{1:[2,1]}),t(i,[2,3]),{9:30,11:9,22:h,24:n,26:u,28:d,29:14,30:15,31:16,32:17,33:k,34:p,35:m,36:W,37:Q,40:S,43:X,44:M,48:L,50:I,51:T,52:R},t(i,[2,5]),t(i,[2,6]),t(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:ae,67:ne,68:oe,69:ce,70:le}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(i,[2,27]),t(i,[2,28]),t(i,[2,29]),t(i,[2,30]),t(i,[2,31]),t(B,[2,54]),t(B,[2,55]),t(B,[2,56]),t(B,[2,57]),t(B,[2,58]),t(i,[2,32]),t(i,[2,33]),t(i,[2,34]),t(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},t(i,[2,4]),{11:49,40:S,48:L,50:I,51:T,52:R},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:F},{11:56,40:S,48:L,50:I,51:T,52:R},{65:57,71:[1,58],72:[1,59]},t(Y,[2,73]),t(Y,[2,74]),t(Y,[2,75]),t(Y,[2,76]),t(Y,[2,77]),t(i,[2,24]),t(i,[2,25]),t(i,[2,26]),{13:P,38:60,41:z,42:A,45:62,46:63,48:G,49:K},t(q,[2,37]),t(q,[2,38]),{16:68,40:O,41:N,42:A},{13:P,38:69,41:z,42:A,45:62,46:63,48:G,49:K},{13:[1,70],15:[1,71]},t(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:ae,67:ne,68:oe,69:ce,70:le}),{19:[1,74]},t(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:F},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:ae,67:ne,68:oe,69:ce,70:le},t(_e,[2,78]),t(_e,[2,79]),{6:ge,10:me,39:81,42:Ee,47:Se},{40:[1,86],41:[1,87]},t(Te,[2,43],{46:88,13:P,41:z,48:G,49:K}),t(w,[2,45]),t(w,[2,50]),t(w,[2,51]),t(w,[2,52]),t(w,[2,53]),t(i,[2,41],{42:A}),{6:ge,10:me,39:89,42:Ee,47:Se},{14:90,40:H,50:J,73:$},{16:94,40:O,41:N},{11:95,40:S,48:L,50:I,51:T,52:R},{18:96,19:[1,97],53:53,54:54,58:F},t(i,[2,12]),{19:[2,60]},t(U,[2,61],{56:98,57:99,60:100,62:Oe,63:Ne}),t([19,58,62,63],[2,67]),{58:[2,66]},t(i,[2,22],{15:[1,104],17:[1,103]}),t([40,48,50,51,52],[2,72]),t(i,[2,36]),{13:P,41:z,45:105,46:63,48:G,49:K},t(i,[2,47]),t(i,[2,48]),t(i,[2,49]),t(q,[2,39]),t(q,[2,40]),t(w,[2,46]),t(i,[2,42]),t(i,[2,8]),t(i,[2,80]),t(i,[2,81]),t(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},t(i,[2,15]),t(U,[2,62],{57:110,61:[1,111],63:Ne}),t(U,[2,63]),t(he,[2,68]),t(U,[2,71]),t(he,[2,70]),{18:112,19:[1,113],53:53,54:54,58:F},{16:114,40:O,41:N},t(Te,[2,44],{46:88,13:P,41:z,48:G,49:K}),{14:115,40:H,50:J,73:$},{16:116,40:O,41:N},{14:117,40:H,50:J,73:$},t(i,[2,13]),t(U,[2,64]),{60:118,62:Oe},{19:[1,119]},t(i,[2,20]),t(i,[2,23],{17:[1,120],42:A}),t(i,[2,11]),{13:[1,121],42:A},t(i,[2,10]),t(he,[2,69]),t(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:F},{14:124,40:H,50:J,73:$},{19:[1,125]},t(i,[2,21]),t(i,[2,9]),t(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:l(function(a,o){if(o.recoverable)this.trace(a);else{var c=new Error(a);throw c.hash=o,c}},"parseError"),parse:l(function(a){var o=this,c=[0],r=[],b=[null],e=[],Z=this.table,s="",te=0,Ae=0,Ce=0,He=2,Ie=1,Je=e.slice.call(arguments,1),f=Object.create(this.lexer),x={yy:{}};for(var de in this.yy)Object.prototype.hasOwnProperty.call(this.yy,de)&&(x.yy[de]=this.yy[de]);f.setInput(a,x.yy),x.yy.lexer=f,x.yy.parser=this,typeof f.yylloc>"u"&&(f.yylloc={});var be=f.yylloc;e.push(be);var $e=f.options&&f.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(_){c.length=c.length-2*_,b.length=b.length-_,e.length=e.length-_}l(et,"popStack");function Re(){var _;return _=r.pop()||f.lex()||Ie,typeof _!="number"&&(_ instanceof Array&&(r=_,_=r.pop()),_=o.symbols_[_]||_),_}l(Re,"lex");for(var y,pe,v,g,ot,ke,V={},se,E,xe,ie;;){if(v=c[c.length-1],this.defaultActions[v]?g=this.defaultActions[v]:((y===null||typeof y>"u")&&(y=Re()),g=Z[v]&&Z[v][y]),typeof g>"u"||!g.length||!g[0]){var fe="";ie=[];for(se in Z[v])this.terminals_[se]&&se>He&&ie.push("'"+this.terminals_[se]+"'");f.showPosition?fe="Parse error on line "+(te+1)+`:
1
+ import{a as je}from"./embed-page-chunk-62HLTSNB.js";import{b as Ue,c as Ze}from"./embed-page-chunk-ZX5EBQI5.js";import{a as We}from"./embed-page-chunk-MM3IA4HE.js";import"./embed-page-chunk-EMCH2FMD.js";import"./embed-page-chunk-OZUFLDHF.js";import"./embed-page-chunk-7TH7FFVA.js";import"./embed-page-chunk-ME637LUU.js";import"./embed-page-chunk-7AXKFOLH.js";import"./embed-page-chunk-X2TOGOMH.js";import"./embed-page-chunk-I7EMCZI6.js";import"./embed-page-chunk-5ZRWN6T7.js";import{p as Ge,s as Ke}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{S as we,T as Ve,U as Me,V as Be,W as Fe,X as Ye,Y as Pe,Z as j,a as De,b as Le}from"./embed-page-chunk-FPA5BD6K.js";import{b as D}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import{b as ze}from"./embed-page-chunk-S4XZPBRM.js";import{a as l,b as ve}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";var ye=(function(){var t=l(function(C,a,o,c){for(o=o||{},c=C.length;c--;o[C[c]]=a);return o},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],h=[1,10],n=[1,11],u=[1,12],d=[1,13],k=[1,23],p=[1,24],m=[1,25],W=[1,26],Q=[1,27],S=[1,19],X=[1,28],M=[1,29],L=[1,20],I=[1,18],T=[1,21],R=[1,22],ae=[1,36],ne=[1,37],oe=[1,38],ce=[1,39],le=[1,40],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],O=[1,45],N=[1,46],F=[1,55],Y=[40,48,50,51,52,71,72],P=[1,66],z=[1,64],A=[1,61],G=[1,65],K=[1,67],q=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],_e=[66,67,68,69,70],ge=[1,85],me=[1,84],Ee=[1,82],Se=[1,83],Te=[6,10,42,47],w=[6,10,13,41,42,47,48,49],H=[1,93],J=[1,92],$=[1,91],U=[19,58],Oe=[1,102],Ne=[1,101],he=[19,58,61,63],ue={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:l(function(a,o,c,r,b,e,Z){var s=e.length-1;switch(b){case 1:break;case 2:this.$=[];break;case 3:e[s-1].push(e[s]),this.$=e[s-1];break;case 4:case 5:this.$=e[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(e[s-4]),r.addEntity(e[s-2]),r.addRelationship(e[s-4],e[s],e[s-2],e[s-3]);break;case 9:r.addEntity(e[s-8]),r.addEntity(e[s-4]),r.addRelationship(e[s-8],e[s],e[s-4],e[s-5]),r.setClass([e[s-8]],e[s-6]),r.setClass([e[s-4]],e[s-2]);break;case 10:r.addEntity(e[s-6]),r.addEntity(e[s-2]),r.addRelationship(e[s-6],e[s],e[s-2],e[s-3]),r.setClass([e[s-6]],e[s-4]);break;case 11:r.addEntity(e[s-6]),r.addEntity(e[s-4]),r.addRelationship(e[s-6],e[s],e[s-4],e[s-5]),r.setClass([e[s-4]],e[s-2]);break;case 12:r.addEntity(e[s-3]),r.addAttributes(e[s-3],e[s-1]);break;case 13:r.addEntity(e[s-5]),r.addAttributes(e[s-5],e[s-1]),r.setClass([e[s-5]],e[s-3]);break;case 14:r.addEntity(e[s-2]);break;case 15:r.addEntity(e[s-4]),r.setClass([e[s-4]],e[s-2]);break;case 16:r.addEntity(e[s]);break;case 17:r.addEntity(e[s-2]),r.setClass([e[s-2]],e[s]);break;case 18:r.addEntity(e[s-6],e[s-4]),r.addAttributes(e[s-6],e[s-1]);break;case 19:r.addEntity(e[s-8],e[s-6]),r.addAttributes(e[s-8],e[s-1]),r.setClass([e[s-8]],e[s-3]);break;case 20:r.addEntity(e[s-5],e[s-3]);break;case 21:r.addEntity(e[s-7],e[s-5]),r.setClass([e[s-7]],e[s-2]);break;case 22:r.addEntity(e[s-3],e[s-1]);break;case 23:r.addEntity(e[s-5],e[s-3]),r.setClass([e[s-5]],e[s]);break;case 24:case 25:this.$=e[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=e[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=e[s-3],r.addClass(e[s-2],e[s-1]);break;case 37:case 38:case 59:case 68:this.$=[e[s]];break;case 39:case 40:this.$=e[s-2].concat([e[s]]);break;case 41:this.$=e[s-2],r.setClass(e[s-1],e[s]);break;case 42:this.$=e[s-3],r.addCssStyles(e[s-2],e[s-1]);break;case 43:this.$=[e[s]];break;case 44:e[s-2].push(e[s]),this.$=e[s-2];break;case 46:this.$=e[s-1]+e[s];break;case 54:case 80:case 81:this.$=e[s].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=e[s];break;case 60:e[s].push(e[s-1]),this.$=e[s];break;case 61:this.$={type:e[s-1],name:e[s]};break;case 62:this.$={type:e[s-2],name:e[s-1],keys:e[s]};break;case 63:this.$={type:e[s-2],name:e[s-1],comment:e[s]};break;case 64:this.$={type:e[s-3],name:e[s-2],keys:e[s-1],comment:e[s]};break;case 65:case 67:case 70:this.$=e[s];break;case 66:this.$=e[s-1]+e[s];break;case 69:e[s-2].push(e[s]),this.$=e[s-2];break;case 71:this.$=e[s].replace(/"/g,"");break;case 72:this.$={cardA:e[s],relType:e[s-1],cardB:e[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:n,26:u,28:d,29:14,30:15,31:16,32:17,33:k,34:p,35:m,36:W,37:Q,40:S,43:X,44:M,48:L,50:I,51:T,52:R},t(i,[2,7],{1:[2,1]}),t(i,[2,3]),{9:30,11:9,22:h,24:n,26:u,28:d,29:14,30:15,31:16,32:17,33:k,34:p,35:m,36:W,37:Q,40:S,43:X,44:M,48:L,50:I,51:T,52:R},t(i,[2,5]),t(i,[2,6]),t(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:ae,67:ne,68:oe,69:ce,70:le}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(i,[2,27]),t(i,[2,28]),t(i,[2,29]),t(i,[2,30]),t(i,[2,31]),t(B,[2,54]),t(B,[2,55]),t(B,[2,56]),t(B,[2,57]),t(B,[2,58]),t(i,[2,32]),t(i,[2,33]),t(i,[2,34]),t(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},t(i,[2,4]),{11:49,40:S,48:L,50:I,51:T,52:R},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:F},{11:56,40:S,48:L,50:I,51:T,52:R},{65:57,71:[1,58],72:[1,59]},t(Y,[2,73]),t(Y,[2,74]),t(Y,[2,75]),t(Y,[2,76]),t(Y,[2,77]),t(i,[2,24]),t(i,[2,25]),t(i,[2,26]),{13:P,38:60,41:z,42:A,45:62,46:63,48:G,49:K},t(q,[2,37]),t(q,[2,38]),{16:68,40:O,41:N,42:A},{13:P,38:69,41:z,42:A,45:62,46:63,48:G,49:K},{13:[1,70],15:[1,71]},t(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:ae,67:ne,68:oe,69:ce,70:le}),{19:[1,74]},t(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:F},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:ae,67:ne,68:oe,69:ce,70:le},t(_e,[2,78]),t(_e,[2,79]),{6:ge,10:me,39:81,42:Ee,47:Se},{40:[1,86],41:[1,87]},t(Te,[2,43],{46:88,13:P,41:z,48:G,49:K}),t(w,[2,45]),t(w,[2,50]),t(w,[2,51]),t(w,[2,52]),t(w,[2,53]),t(i,[2,41],{42:A}),{6:ge,10:me,39:89,42:Ee,47:Se},{14:90,40:H,50:J,73:$},{16:94,40:O,41:N},{11:95,40:S,48:L,50:I,51:T,52:R},{18:96,19:[1,97],53:53,54:54,58:F},t(i,[2,12]),{19:[2,60]},t(U,[2,61],{56:98,57:99,60:100,62:Oe,63:Ne}),t([19,58,62,63],[2,67]),{58:[2,66]},t(i,[2,22],{15:[1,104],17:[1,103]}),t([40,48,50,51,52],[2,72]),t(i,[2,36]),{13:P,41:z,45:105,46:63,48:G,49:K},t(i,[2,47]),t(i,[2,48]),t(i,[2,49]),t(q,[2,39]),t(q,[2,40]),t(w,[2,46]),t(i,[2,42]),t(i,[2,8]),t(i,[2,80]),t(i,[2,81]),t(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},t(i,[2,15]),t(U,[2,62],{57:110,61:[1,111],63:Ne}),t(U,[2,63]),t(he,[2,68]),t(U,[2,71]),t(he,[2,70]),{18:112,19:[1,113],53:53,54:54,58:F},{16:114,40:O,41:N},t(Te,[2,44],{46:88,13:P,41:z,48:G,49:K}),{14:115,40:H,50:J,73:$},{16:116,40:O,41:N},{14:117,40:H,50:J,73:$},t(i,[2,13]),t(U,[2,64]),{60:118,62:Oe},{19:[1,119]},t(i,[2,20]),t(i,[2,23],{17:[1,120],42:A}),t(i,[2,11]),{13:[1,121],42:A},t(i,[2,10]),t(he,[2,69]),t(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:F},{14:124,40:H,50:J,73:$},{19:[1,125]},t(i,[2,21]),t(i,[2,9]),t(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:l(function(a,o){if(o.recoverable)this.trace(a);else{var c=new Error(a);throw c.hash=o,c}},"parseError"),parse:l(function(a){var o=this,c=[0],r=[],b=[null],e=[],Z=this.table,s="",te=0,Ae=0,Ce=0,He=2,Ie=1,Je=e.slice.call(arguments,1),f=Object.create(this.lexer),x={yy:{}};for(var de in this.yy)Object.prototype.hasOwnProperty.call(this.yy,de)&&(x.yy[de]=this.yy[de]);f.setInput(a,x.yy),x.yy.lexer=f,x.yy.parser=this,typeof f.yylloc>"u"&&(f.yylloc={});var be=f.yylloc;e.push(be);var $e=f.options&&f.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(_){c.length=c.length-2*_,b.length=b.length-_,e.length=e.length-_}l(et,"popStack");function Re(){var _;return _=r.pop()||f.lex()||Ie,typeof _!="number"&&(_ instanceof Array&&(r=_,_=r.pop()),_=o.symbols_[_]||_),_}l(Re,"lex");for(var y,pe,v,g,ot,ke,V={},se,E,xe,ie;;){if(v=c[c.length-1],this.defaultActions[v]?g=this.defaultActions[v]:((y===null||typeof y>"u")&&(y=Re()),g=Z[v]&&Z[v][y]),typeof g>"u"||!g.length||!g[0]){var fe="";ie=[];for(se in Z[v])this.terminals_[se]&&se>He&&ie.push("'"+this.terminals_[se]+"'");f.showPosition?fe="Parse error on line "+(te+1)+`:
2
2
  `+f.showPosition()+`
3
3
  Expecting `+ie.join(", ")+", got '"+(this.terminals_[y]||y)+"'":fe="Parse error on line "+(te+1)+": Unexpected "+(y==Ie?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(fe,{text:f.match,token:this.terminals_[y]||y,line:f.yylineno,loc:be,expected:ie})}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+y);switch(g[0]){case 1:c.push(y),b.push(f.yytext),e.push(f.yylloc),c.push(g[1]),y=null,pe?(y=pe,pe=null):(Ae=f.yyleng,s=f.yytext,te=f.yylineno,be=f.yylloc,Ce>0&&Ce--);break;case 2:if(E=this.productions_[g[1]][1],V.$=b[b.length-E],V._$={first_line:e[e.length-(E||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(E||1)].first_column,last_column:e[e.length-1].last_column},$e&&(V._$.range=[e[e.length-(E||1)].range[0],e[e.length-1].range[1]]),ke=this.performAction.apply(V,[s,Ae,te,x.yy,g[1],b,e].concat(Je)),typeof ke<"u")return ke;E&&(c=c.slice(0,-1*E*2),b=b.slice(0,-1*E),e=e.slice(0,-1*E)),c.push(this.productions_[g[1]][0]),b.push(V.$),e.push(V._$),xe=Z[c[c.length-2]][c[c.length-1]],c.push(xe);break;case 3:return!0}}return!0},"parse")},qe=(function(){var C={EOF:1,parseError:l(function(o,c){if(this.yy.parser)this.yy.parser.parseError(o,c);else throw new Error(o)},"parseError"),setInput:l(function(a,o){return this.yy=o||this.yy||{},this._input=a,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 a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var o=a.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:l(function(a){var o=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var b=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:c?(c.length===r.length?this.yylloc.first_column:0)+r[r.length-c.length].length-c[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-o]),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
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(a){this.unput(this.match.slice(a))},"less"),pastInput:l(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var a=this.pastInput(),o=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{b as r,c as m}from"./embed-page-chunk-UWC5QL3B.js";import"./embed-page-chunk-ZFADBU7Y.js";import"./embed-page-chunk-AWMMPAX5.js";import"./embed-page-chunk-V3HPWIF4.js";import"./embed-page-chunk-62HLTSNB.js";import"./embed-page-chunk-MM3IA4HE.js";import"./embed-page-chunk-NY2J2ZAX.js";import"./embed-page-chunk-RPGUOUD3.js";import"./embed-page-chunk-7AXKFOLH.js";import"./embed-page-chunk-7IPWMDQ3.js";import"./embed-page-chunk-ME637LUU.js";import"./embed-page-chunk-X2TOGOMH.js";import"./embed-page-chunk-7TH7FFVA.js";import"./embed-page-chunk-I7EMCZI6.js";import"./embed-page-chunk-5ZRWN6T7.js";import"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import"./embed-page-chunk-FPA5BD6K.js";import"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";export{r as createFlowDiagram,m as diagram};
1
+ import{b as r,c as m}from"./embed-page-chunk-BPNG3LLL.js";import"./embed-page-chunk-ZFADBU7Y.js";import"./embed-page-chunk-AWMMPAX5.js";import"./embed-page-chunk-62HLTSNB.js";import"./embed-page-chunk-ZX5EBQI5.js";import"./embed-page-chunk-MM3IA4HE.js";import"./embed-page-chunk-EMCH2FMD.js";import"./embed-page-chunk-OZUFLDHF.js";import"./embed-page-chunk-7TH7FFVA.js";import"./embed-page-chunk-ME637LUU.js";import"./embed-page-chunk-7AXKFOLH.js";import"./embed-page-chunk-X2TOGOMH.js";import"./embed-page-chunk-I7EMCZI6.js";import"./embed-page-chunk-5ZRWN6T7.js";import"./embed-page-chunk-V3HPWIF4.js";import"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import"./embed-page-chunk-FPA5BD6K.js";import"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.js";export{r as createFlowDiagram,m as diagram};
@@ -1,4 +1,4 @@
1
- import{a as $e}from"./embed-page-chunk-W2KSSDKP.js";import{a as pe}from"./embed-page-chunk-XRN4MSDO.js";import{a as fe}from"./embed-page-chunk-X3MWV772.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-2RWSBPM5.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-YO55GEK3.js";import{h as le,o as me,p as ge}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{M as E,S as re,T as ae,U as oe,V as se,W as ne,X as ce,Y as ie,Z as q,ba as de,j as te,t as F}from"./embed-page-chunk-FPA5BD6K.js";import{b as w}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import{b as he}from"./embed-page-chunk-S4XZPBRM.js";import{a as l}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.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",`
1
+ import{a as fe}from"./embed-page-chunk-X3MWV772.js";import{a as $e}from"./embed-page-chunk-W2KSSDKP.js";import{a as pe}from"./embed-page-chunk-3NCDEXPW.js";import"./embed-page-chunk-2RWSBPM5.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-YO55GEK3.js";import{h as le,o as me,p as ge}from"./embed-page-chunk-UAXOXJ4N.js";import"./embed-page-chunk-72UJHRYJ.js";import{M as E,S as re,T as ae,U as oe,V as se,W as ne,X as ce,Y as ie,Z as q,ba as de,j as te,t as F}from"./embed-page-chunk-FPA5BD6K.js";import{b as w}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import{b as he}from"./embed-page-chunk-S4XZPBRM.js";import{a as l}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.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
2
  ${s-i/2-L/2},${y+P}
3
3
  ${s-i/2-L/2},${y-P}
4
4
  ${r.posWithOffset-i/2-L},${y-c-P}
@@ -1,2 +1,2 @@
1
- import{a as i}from"./embed-page-chunk-GA5A7NLC.js";import{a as s}from"./embed-page-chunk-XRN4MSDO.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-2RWSBPM5.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-YO55GEK3.js";import{N as n}from"./embed-page-chunk-FPA5BD6K.js";import{b as a}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import{a as r}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.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
1
+ import{a as s}from"./embed-page-chunk-3NCDEXPW.js";import"./embed-page-chunk-2RWSBPM5.js";import{a as i}from"./embed-page-chunk-GA5A7NLC.js";import"./embed-page-chunk-SOZBIUVL.js";import"./embed-page-chunk-QYZHHDW5.js";import"./embed-page-chunk-SN26GUFN.js";import"./embed-page-chunk-4XOTFVZI.js";import"./embed-page-chunk-OA75S54S.js";import"./embed-page-chunk-UWPUXGYU.js";import"./embed-page-chunk-ULUQTYZ6.js";import"./embed-page-chunk-HRLDTFOW.js";import"./embed-page-chunk-ZDVDBZSS.js";import"./embed-page-chunk-7AWGM2AG.js";import"./embed-page-chunk-KQ4YWZMQ.js";import"./embed-page-chunk-2A6GYGUX.js";import"./embed-page-chunk-Q4EFCGVD.js";import"./embed-page-chunk-4WSBJAJ5.js";import"./embed-page-chunk-YO55GEK3.js";import{N as n}from"./embed-page-chunk-FPA5BD6K.js";import{b as a}from"./embed-page-chunk-2BOYLGSX.js";import"./embed-page-chunk-DM5ESF6C.js";import"./embed-page-chunk-SV2BM3WO.js";import"./embed-page-chunk-S4XZPBRM.js";import{a as r}from"./embed-page-chunk-444E5YR2.js";import"./embed-page-chunk-U2CG7PH5.js";import"./embed-page-chunk-45A47GH2.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
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};