@economic/agents-playground 0.0.1 → 1.0.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 (62) hide show
  1. package/bin/cli.mjs +8 -3
  2. package/dist/assets/{_basePickBy-BJ_rm3-n.js → _basePickBy-yrdMoyRa.js} +1 -1
  3. package/dist/assets/{_baseUniq-BGPNLZq7.js → _baseUniq-BdCUZ9M5.js} +1 -1
  4. package/dist/assets/architecture-PBZL5I3N-Cad1LrWT.js +1 -0
  5. package/dist/assets/{architectureDiagram-2XIMDMQ5-Ci6lZRdi.js → architectureDiagram-2XIMDMQ5-CXe1GsCp.js} +1 -1
  6. package/dist/assets/{blockDiagram-WCTKOSBZ-Bs2dO4Lh.js → blockDiagram-WCTKOSBZ-WvVIvKo3.js} +1 -1
  7. package/dist/assets/{chunk-7E7YKBS2-CjPkysZ4.js → chunk-7E7YKBS2-BGpfhwxh.js} +1 -1
  8. package/dist/assets/{chunk-C72U2L5F-B11-t4Kx.js → chunk-C72U2L5F-BO7XGzNn.js} +1 -1
  9. package/dist/assets/{chunk-EGIJ26TM-Dn67x_wP.js → chunk-EGIJ26TM-BJdFILT0.js} +1 -1
  10. package/dist/assets/{chunk-L3YUKLVL-B6prTSRj.js → chunk-L3YUKLVL-BmMfhz2B.js} +1 -1
  11. package/dist/assets/{chunk-NQ4KR5QH-CgXz_uQQ.js → chunk-NQ4KR5QH-f5X7YUdy.js} +1 -1
  12. package/dist/assets/{chunk-OZEHJAEY-DFGloWwN.js → chunk-OZEHJAEY-BdHqIz8_.js} +1 -1
  13. package/dist/assets/{chunk-R5LLSJPH-iHaJebab.js → chunk-R5LLSJPH-9LnZ-s_V.js} +1 -1
  14. package/dist/assets/{chunk-WL4C6EOR-BTGOslpF.js → chunk-WL4C6EOR-SO8Rq4UE.js} +1 -1
  15. package/dist/assets/{chunk-XIRO2GV7-BbBu2-ax.js → chunk-XIRO2GV7-BVE8qECr.js} +1 -1
  16. package/dist/assets/{chunk-XZSTWKYB-CR7HLNO4.js → chunk-XZSTWKYB-DCEIWIqq.js} +1 -1
  17. package/dist/assets/{classDiagram-VBA2DB6C-DET8D2F6.js → classDiagram-VBA2DB6C-BEQm-49f.js} +1 -1
  18. package/dist/assets/{classDiagram-v2-RAHNMMFH-C_pvaxDg.js → classDiagram-v2-RAHNMMFH-fw-8tC0c.js} +1 -1
  19. package/dist/assets/clone-CGkAhfYR.js +1 -0
  20. package/dist/assets/{dagre-DHSLkSfU.js → dagre-4O7tL0je.js} +1 -1
  21. package/dist/assets/{dagre-KLK3FWXG-CsIRyGd-.js → dagre-KLK3FWXG-Cn3uXM0V.js} +1 -1
  22. package/dist/assets/{diagram-E7M64L7V-eMkzKdKv.js → diagram-E7M64L7V-CCy1m6PJ.js} +1 -1
  23. package/dist/assets/{diagram-IFDJBPK2-BDQnMPef.js → diagram-IFDJBPK2-SbqNcW81.js} +1 -1
  24. package/dist/assets/{diagram-P4PSJMXO-C1pGlueJ.js → diagram-P4PSJMXO-DDVenWMc.js} +1 -1
  25. package/dist/assets/{erDiagram-INFDFZHY-oSJOQVMl.js → erDiagram-INFDFZHY-C3LYWEpo.js} +1 -1
  26. package/dist/assets/{flowDiagram-PKNHOUZH-DCjCL66H.js → flowDiagram-PKNHOUZH-DCj5WLbj.js} +1 -1
  27. package/dist/assets/gitGraph-HDMCJU4V-Cn-UK-sq.js +1 -0
  28. package/dist/assets/{gitGraphDiagram-K3NZZRJ6-BaVomO0E.js → gitGraphDiagram-K3NZZRJ6-CV51mwUg.js} +1 -1
  29. package/dist/assets/{graphlib-sSK0q0jO.js → graphlib-Bm7lcrUK.js} +1 -1
  30. package/dist/assets/{highlighted-body-OFNGDK62-BWa9Mb0y.js → highlighted-body-OFNGDK62-Dp3ztwIT.js} +1 -1
  31. package/dist/assets/{index-D8W5OEji.js → index-DXEtzDAV.js} +8 -8
  32. package/dist/assets/info-3K5VOQVL-CE6MZbxN.js +1 -0
  33. package/dist/assets/{infoDiagram-LFFYTUFH-BpLjxnPR.js → infoDiagram-LFFYTUFH-Djc7zwh9.js} +1 -1
  34. package/dist/assets/{ishikawaDiagram-PHBUUO56-KwEjkSbo.js → ishikawaDiagram-PHBUUO56-BJ58d9Jk.js} +1 -1
  35. package/dist/assets/{kanban-definition-K7BYSVSG-qoQ-gouW.js → kanban-definition-K7BYSVSG-_PQKDb6G.js} +1 -1
  36. package/dist/assets/mermaid-GHXKKRXX-BjkWKRgx.js +1 -0
  37. package/dist/assets/{mermaid-parser.core-zSGpBtrZ.js → mermaid-parser.core-CCnSeR0B.js} +2 -2
  38. package/dist/assets/{mindmap-definition-YRQLILUH-a6cg75mj.js → mindmap-definition-YRQLILUH-DlEtVP2j.js} +1 -1
  39. package/dist/assets/{ordinal-t_ha_BUo.js → ordinal-BffLatsF.js} +1 -1
  40. package/dist/assets/packet-RMMSAZCW-CQjOaPM8.js +1 -0
  41. package/dist/assets/pie-UPGHQEXC-CxFpgwTC.js +1 -0
  42. package/dist/assets/{pieDiagram-SKSYHLDU-Ba8_qWtW.js → pieDiagram-SKSYHLDU-C7-s9HqH.js} +1 -1
  43. package/dist/assets/radar-KQ55EAFF-CXSI5zhq.js +1 -0
  44. package/dist/assets/{requirementDiagram-Z7DCOOCP-bWlpEI8M.js → requirementDiagram-Z7DCOOCP-z1GE-T5H.js} +1 -1
  45. package/dist/assets/{sankeyDiagram-WA2Y5GQK-Bemb6KrC.js → sankeyDiagram-WA2Y5GQK-ljtUGdwd.js} +1 -1
  46. package/dist/assets/{sequenceDiagram-2WXFIKYE-DXTnjjaR.js → sequenceDiagram-2WXFIKYE-Dmj3tYFt.js} +1 -1
  47. package/dist/assets/{stateDiagram-RAJIS63D-BEPLG8-b.js → stateDiagram-RAJIS63D-U-EujGed.js} +1 -1
  48. package/dist/assets/{stateDiagram-v2-FVOUBMTO-Cn3GtrPV.js → stateDiagram-v2-FVOUBMTO-2uVNjycs.js} +1 -1
  49. package/dist/assets/treemap-KZPCXAKY-DKNko2Ay.js +1 -0
  50. package/dist/assets/{vennDiagram-LZ73GAT5-Bl0Pzjn6.js → vennDiagram-LZ73GAT5-B1RIPDjh.js} +1 -1
  51. package/dist/assets/{xychartDiagram-JWTSCODW-BCXHFEAl.js → xychartDiagram-JWTSCODW-D9kjPJFQ.js} +1 -1
  52. package/dist/index.html +1 -1
  53. package/package.json +2 -2
  54. package/dist/assets/architecture-PBZL5I3N-BqR3gJ-S.js +0 -1
  55. package/dist/assets/clone-DCUYwHc1.js +0 -1
  56. package/dist/assets/gitGraph-HDMCJU4V-Cldfavhj.js +0 -1
  57. package/dist/assets/info-3K5VOQVL-Bp03asUc.js +0 -1
  58. package/dist/assets/mermaid-GHXKKRXX-BonhTQ8Y.js +0 -1
  59. package/dist/assets/packet-RMMSAZCW-DZw3Th1z.js +0 -1
  60. package/dist/assets/pie-UPGHQEXC-Boxmvw0_.js +0 -1
  61. package/dist/assets/radar-KQ55EAFF-CMpoCV22.js +0 -1
  62. package/dist/assets/treemap-KZPCXAKY-C2Yo6dTQ.js +0 -1
@@ -1,4 +1,4 @@
1
- import{g as e,h as t,p as n}from"./src-B0URjIBy.js";import{B as r,C as i,V as a,W as o,_ as s,a as c,c as l,d as u,v as d,y as f}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{t as p}from"./ordinal-t_ha_BUo.js";import{t as m}from"./defaultLocale-DL4ssfbz.js";import{r as h}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{i as g,n as _}from"./chunk-PQ6SQG4A-DB1drAIU.js";import{p as v}from"./index-D8W5OEji.js";import{t as y}from"./chunk-4BX2VUAB-BMQY333L.js";import{t as b}from"./mermaid-parser.core-zSGpBtrZ.js";import{t as x}from"./chunk-KX2RTZJC-yDo9-99g.js";function S(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function C(){return this.eachAfter(S)}function w(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function T(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function E(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function D(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function O(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function k(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function A(e){for(var t=this,n=j(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function j(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function M(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function N(){return Array.from(this)}function P(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function F(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*I(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function L(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=B)):t===void 0&&(t=z);for(var n=new U(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new U(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(H)}function R(){return L(this).eachBefore(V)}function z(e){return e.children}function B(e){return Array.isArray(e)?e[1]:null}function V(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function H(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=L.prototype={constructor:U,count:C,each:w,eachAfter:E,eachBefore:T,find:D,sum:O,sort:k,path:A,ancestors:M,descendants:N,leaves:P,links:F,copy:R,[Symbol.iterator]:I};function W(e){if(typeof e!=`function`)throw Error();return e}function G(){return 0}function K(e){return function(){return e}}function q(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function J(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function ee(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var te=(1+Math.sqrt(5))/2;function ne(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?J(c,n,r,i,h?r+=m*g/h:a):ee(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var re=(function e(t){function n(e,n,r,i,a){ne(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(te);function ie(){var e=re,t=!1,n=1,r=1,i=[0],a=G,o=G,s=G,c=G,l=G;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(q),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=W(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:K(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:K(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:K(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:K(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:K(+e),u):l},u}var Y=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=a,this.getAccTitle=d,this.setDiagramTitle=o,this.getDiagramTitle=i,this.getAccDescription=s,this.setAccDescription=r}static{t(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=u,t=f();return h({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{_(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){c(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function X(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}t(X,`buildHierarchy`);var ae=t((e,n)=>{y(e,n);let r=[];for(let t of e.TreemapRows??[])t.$type===`ClassDefStatement`&&n.addClass(t.className??``,t.styleText??``);for(let t of e.TreemapRows??[]){let e=t.item;if(!e)continue;let i=t.indent?parseInt(t.indent):0,a=oe(e),o=e.classSelector?n.getStylesForClass(e.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};r.push(c)}let i=X(r),a=t((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),oe=t(e=>e.name?String(e.name):``,`getItemName`),Z={parser:{yy:void 0},parse:t(async t=>{try{let n=await b(`treemap`,t);e.debug(`Treemap AST:`,n);let r=Z.parser?.yy;if(!(r instanceof Y))throw 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.`);ae(n,r)}catch(t){throw e.error(`Error parsing treemap:`,t),t}},`parse`)},se=10,Q=10,$=25,ce={draw:t((r,i,a,o)=>{let s=o.db,c=s.getConfig(),u=c.padding??se,d=s.getDiagramTitle(),h=s.getRoot(),{themeVariables:_}=f();if(!h)return;let y=d?30:0,b=v(i),S=c.nodeWidth?c.nodeWidth*Q:960,C=c.nodeHeight?c.nodeHeight*Q:500,w=S,T=C+y;b.attr(`viewBox`,`0 0 ${w} ${T}`),l(b,T,w,c.useMaxWidth);let E;try{let e=c.valueFormat||`,`;if(e===`$0,0`)E=t(e=>`$`+m(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let n=/\.\d+/.exec(e),r=n?n[0]:``;E=t(e=>`$`+m(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let n=e.substring(1);E=t(e=>`$`+m(n||``)(e),`valueFormat`)}else E=m(e)}catch(t){e.error(`Error creating format function:`,t),E=m(`,`)}let D=p().range([`transparent`,_.cScale0,_.cScale1,_.cScale2,_.cScale3,_.cScale4,_.cScale5,_.cScale6,_.cScale7,_.cScale8,_.cScale9,_.cScale10,_.cScale11]),O=p().range([`transparent`,_.cScalePeer0,_.cScalePeer1,_.cScalePeer2,_.cScalePeer3,_.cScalePeer4,_.cScalePeer5,_.cScalePeer6,_.cScalePeer7,_.cScalePeer8,_.cScalePeer9,_.cScalePeer10,_.cScalePeer11]),k=p().range([_.cScaleLabel0,_.cScaleLabel1,_.cScaleLabel2,_.cScaleLabel3,_.cScaleLabel4,_.cScaleLabel5,_.cScaleLabel6,_.cScaleLabel7,_.cScaleLabel8,_.cScaleLabel9,_.cScaleLabel10,_.cScaleLabel11]);d&&b.append(`text`).attr(`x`,w/2).attr(`y`,y/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(d);let A=b.append(`g`).attr(`transform`,`translate(0, ${y})`).attr(`class`,`treemapContainer`),j=L(h).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=ie().size([S,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(u).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.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=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=g({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+g({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=n(this),r=e.data.name;t.text(r);let i=e.x1-e.x0,a;a=c.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),c.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+g({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=A.selectAll(`.treemapLeafGroup`).data(F).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})`);I.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>g({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),I.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${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)),I.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:`+k(e.data.name)+`;`+g({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(e){let t=n(this),r=e.x1-e.x0,i=e.y1-e.y0,a=t.node(),o=r-8,s=i-8;if(o<10||s<10){t.style(`display`,`none`);return}let c=parseInt(t.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>8;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(6,Math.min(28,Math.round(c*l))),d=c+2+u;for(;d>s&&c>8&&(c--,u=Math.max(6,Math.min(28,Math.round(c*l))),!(u<6&&c===8));)t.style(`font-size`,`${c}px`),d=c+2+u;t.style(`font-size`,`${c}px`),(a.getComputedTextLength()>o||c<8||s<c)&&t.style(`display`,`none`)}),c.showValues!==!1&&I.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:`+k(e.data.name)+`;`+g({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(e){let t=n(this),r=this.parentNode;if(!r){t.style(`display`,`none`);return}let i=n(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(6,Math.min(28,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+2;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-8;t.node().getComputedTextLength()>u||s+o>l||o<6?t.style(`display`,`none`):t.style(`display`,null)}),x(b,c.diagramPadding??8,`flowchart`,c?.useMaxWidth||!1)},`draw`),getClasses:t(function(e,t){return t.db.getClasses()},`getClasses`)},le={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelColor:`black`,labelFontSize:`12px`,valueFontSize:`10px`,valueColor:`black`,titleColor:`black`,titleFontSize:`14px`},ue={parser:Z,get db(){return new Y},renderer:ce,styles:t(({treemap:e}={})=>{let t=h(le,e);return`
1
+ import{g as e,h as t,p as n}from"./src-B0URjIBy.js";import{B as r,C as i,V as a,W as o,_ as s,a as c,c as l,d as u,v as d,y as f}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{t as p}from"./ordinal-BffLatsF.js";import{t as m}from"./defaultLocale-DL4ssfbz.js";import{r as h}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{i as g,n as _}from"./chunk-PQ6SQG4A-DB1drAIU.js";import{p as v}from"./index-DXEtzDAV.js";import{t as y}from"./chunk-4BX2VUAB-BMQY333L.js";import{t as b}from"./mermaid-parser.core-CCnSeR0B.js";import{t as x}from"./chunk-KX2RTZJC-yDo9-99g.js";function S(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function C(){return this.eachAfter(S)}function w(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function T(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function E(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function D(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function O(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function k(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function A(e){for(var t=this,n=j(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function j(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function M(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function N(){return Array.from(this)}function P(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function F(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*I(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function L(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=B)):t===void 0&&(t=z);for(var n=new U(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new U(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(H)}function R(){return L(this).eachBefore(V)}function z(e){return e.children}function B(e){return Array.isArray(e)?e[1]:null}function V(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function H(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=L.prototype={constructor:U,count:C,each:w,eachAfter:E,eachBefore:T,find:D,sum:O,sort:k,path:A,ancestors:M,descendants:N,leaves:P,links:F,copy:R,[Symbol.iterator]:I};function W(e){if(typeof e!=`function`)throw Error();return e}function G(){return 0}function K(e){return function(){return e}}function q(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function J(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function ee(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var te=(1+Math.sqrt(5))/2;function ne(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?J(c,n,r,i,h?r+=m*g/h:a):ee(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var re=(function e(t){function n(e,n,r,i,a){ne(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(te);function ie(){var e=re,t=!1,n=1,r=1,i=[0],a=G,o=G,s=G,c=G,l=G;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(q),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=W(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:K(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:K(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:K(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:K(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:K(+e),u):l},u}var Y=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=a,this.getAccTitle=d,this.setDiagramTitle=o,this.getDiagramTitle=i,this.getAccDescription=s,this.setAccDescription=r}static{t(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=u,t=f();return h({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{_(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){c(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function X(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}t(X,`buildHierarchy`);var ae=t((e,n)=>{y(e,n);let r=[];for(let t of e.TreemapRows??[])t.$type===`ClassDefStatement`&&n.addClass(t.className??``,t.styleText??``);for(let t of e.TreemapRows??[]){let e=t.item;if(!e)continue;let i=t.indent?parseInt(t.indent):0,a=oe(e),o=e.classSelector?n.getStylesForClass(e.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};r.push(c)}let i=X(r),a=t((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),oe=t(e=>e.name?String(e.name):``,`getItemName`),Z={parser:{yy:void 0},parse:t(async t=>{try{let n=await b(`treemap`,t);e.debug(`Treemap AST:`,n);let r=Z.parser?.yy;if(!(r instanceof Y))throw 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.`);ae(n,r)}catch(t){throw e.error(`Error parsing treemap:`,t),t}},`parse`)},se=10,Q=10,$=25,ce={draw:t((r,i,a,o)=>{let s=o.db,c=s.getConfig(),u=c.padding??se,d=s.getDiagramTitle(),h=s.getRoot(),{themeVariables:_}=f();if(!h)return;let y=d?30:0,b=v(i),S=c.nodeWidth?c.nodeWidth*Q:960,C=c.nodeHeight?c.nodeHeight*Q:500,w=S,T=C+y;b.attr(`viewBox`,`0 0 ${w} ${T}`),l(b,T,w,c.useMaxWidth);let E;try{let e=c.valueFormat||`,`;if(e===`$0,0`)E=t(e=>`$`+m(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let n=/\.\d+/.exec(e),r=n?n[0]:``;E=t(e=>`$`+m(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let n=e.substring(1);E=t(e=>`$`+m(n||``)(e),`valueFormat`)}else E=m(e)}catch(t){e.error(`Error creating format function:`,t),E=m(`,`)}let D=p().range([`transparent`,_.cScale0,_.cScale1,_.cScale2,_.cScale3,_.cScale4,_.cScale5,_.cScale6,_.cScale7,_.cScale8,_.cScale9,_.cScale10,_.cScale11]),O=p().range([`transparent`,_.cScalePeer0,_.cScalePeer1,_.cScalePeer2,_.cScalePeer3,_.cScalePeer4,_.cScalePeer5,_.cScalePeer6,_.cScalePeer7,_.cScalePeer8,_.cScalePeer9,_.cScalePeer10,_.cScalePeer11]),k=p().range([_.cScaleLabel0,_.cScaleLabel1,_.cScaleLabel2,_.cScaleLabel3,_.cScaleLabel4,_.cScaleLabel5,_.cScaleLabel6,_.cScaleLabel7,_.cScaleLabel8,_.cScaleLabel9,_.cScaleLabel10,_.cScaleLabel11]);d&&b.append(`text`).attr(`x`,w/2).attr(`y`,y/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(d);let A=b.append(`g`).attr(`transform`,`translate(0, ${y})`).attr(`class`,`treemapContainer`),j=L(h).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=ie().size([S,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(u).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.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=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=g({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+g({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=n(this),r=e.data.name;t.text(r);let i=e.x1-e.x0,a;a=c.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),c.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+g({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=A.selectAll(`.treemapLeafGroup`).data(F).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})`);I.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>g({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),I.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${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)),I.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:`+k(e.data.name)+`;`+g({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(e){let t=n(this),r=e.x1-e.x0,i=e.y1-e.y0,a=t.node(),o=r-8,s=i-8;if(o<10||s<10){t.style(`display`,`none`);return}let c=parseInt(t.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>8;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(6,Math.min(28,Math.round(c*l))),d=c+2+u;for(;d>s&&c>8&&(c--,u=Math.max(6,Math.min(28,Math.round(c*l))),!(u<6&&c===8));)t.style(`font-size`,`${c}px`),d=c+2+u;t.style(`font-size`,`${c}px`),(a.getComputedTextLength()>o||c<8||s<c)&&t.style(`display`,`none`)}),c.showValues!==!1&&I.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:`+k(e.data.name)+`;`+g({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(e){let t=n(this),r=this.parentNode;if(!r){t.style(`display`,`none`);return}let i=n(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(6,Math.min(28,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+2;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-8;t.node().getComputedTextLength()>u||s+o>l||o<6?t.style(`display`,`none`):t.style(`display`,null)}),x(b,c.diagramPadding??8,`flowchart`,c?.useMaxWidth||!1)},`draw`),getClasses:t(function(e,t){return t.db.getClasses()},`getClasses`)},le={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelColor:`black`,labelFontSize:`12px`,valueFontSize:`10px`,valueColor:`black`,titleColor:`black`,titleFontSize:`14px`},ue={parser:Z,get db(){return new Y},renderer:ce,styles:t(({treemap:e}={})=>{let t=h(le,e);return`
2
2
  .treemapNode.section {
3
3
  stroke: ${t.sectionStrokeColor};
4
4
  stroke-width: ${t.sectionStrokeWidth};
@@ -1,4 +1,4 @@
1
- import{g as e,h as t}from"./src-B0URjIBy.js";import{B as n,C as r,E as i,V as a,W as o,_ as s,a as c,c as l,d as u,v as d,y as f}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{r as p}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{p as m}from"./index-D8W5OEji.js";import{t as h}from"./chunk-4BX2VUAB-BMQY333L.js";import{t as g}from"./mermaid-parser.core-zSGpBtrZ.js";var _={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},v={axes:[],curves:[],options:_},y=structuredClone(v),b=u.radar,x=t(()=>p({...b,...f().radar}),`getConfig`),S=t(()=>y.axes,`getAxes`),C=t(()=>y.curves,`getCurves`),w=t(()=>y.options,`getOptions`),T=t(e=>{y.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),E=t(e=>{y.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:D(e.entries)}))},`setCurves`),D=t(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=S();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),O={getAxes:S,getCurves:C,getOptions:w,setAxes:T,setCurves:E,setOptions:t(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});y.options={showLegend:t.showLegend?.value??_.showLegend,ticks:t.ticks?.value??_.ticks,max:t.max?.value??_.max,min:t.min?.value??_.min,graticule:t.graticule?.value??_.graticule}},`setOptions`),getConfig:x,clear:t(()=>{c(),y=structuredClone(v)},`clear`),setAccTitle:a,getAccTitle:d,setDiagramTitle:o,getDiagramTitle:r,getAccDescription:s,setAccDescription:n},k=t(e=>{h(e,O);let{axes:t,curves:n,options:r}=e;O.setAxes(t),O.setCurves(n),O.setOptions(r)},`populate`),A={parse:t(async t=>{let n=await g(`radar`,t);e.debug(n),k(n)},`parse`)},j=t((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=M(m(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;N(u,a,p,s.ticks,s.graticule),P(u,a,p,c),F(u,a,o,f,d,s.graticule,c),R(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),M=t((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return l(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),N=t((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t<r;t++){let i=n*(t+1)/r;e.append(`circle`).attr(`r`,i).attr(`class`,`radarGraticule`)}else if(i===`polygon`){let i=t.length;for(let a=0;a<r;a++){let o=n*(a+1)/r,s=t.map((e,t)=>{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),P=t((e,t,n,r)=>{let i=t.length;for(let a=0;a<i;a++){let o=t[a].label,s=2*a*Math.PI/i-Math.PI/2;e.append(`line`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,n*r.axisScaleFactor*Math.cos(s)).attr(`y2`,n*r.axisScaleFactor*Math.sin(s)).attr(`class`,`radarAxisLine`),e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*Math.cos(s)).attr(`y`,n*r.axisLabelFactor*Math.sin(s)).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function F(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=I(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,L(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}t(F,`drawCurves`);function I(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}t(I,`relativeRadius`);function L(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i<n;i++){let a=e[(i-1+n)%n],o=e[i],s=e[(i+1)%n],c=e[(i+2)%n],l={x:o.x+(s.x-a.x)*t,y:o.y+(s.y-a.y)*t},u={x:s.x-(c.x-o.x)*t,y:s.y-(c.y-o.y)*t};r+=` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`}return`${r} Z`}t(L,`closedRoundCurve`);function R(e,t,n,r){if(!n)return;let i=(r.width/2+r.marginRight)*3/4,a=-(r.height/2+r.marginTop)*3/4;t.forEach((t,n)=>{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}t(R,`drawLegend`);var z={draw:j},B=t((e,t)=>{let n=``;for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=e[`cScale${r}`];n+=`
1
+ import{g as e,h as t}from"./src-B0URjIBy.js";import{B as n,C as r,E as i,V as a,W as o,_ as s,a as c,c as l,d as u,v as d,y as f}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{r as p}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{p as m}from"./index-DXEtzDAV.js";import{t as h}from"./chunk-4BX2VUAB-BMQY333L.js";import{t as g}from"./mermaid-parser.core-CCnSeR0B.js";var _={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},v={axes:[],curves:[],options:_},y=structuredClone(v),b=u.radar,x=t(()=>p({...b,...f().radar}),`getConfig`),S=t(()=>y.axes,`getAxes`),C=t(()=>y.curves,`getCurves`),w=t(()=>y.options,`getOptions`),T=t(e=>{y.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),E=t(e=>{y.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:D(e.entries)}))},`setCurves`),D=t(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=S();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),O={getAxes:S,getCurves:C,getOptions:w,setAxes:T,setCurves:E,setOptions:t(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});y.options={showLegend:t.showLegend?.value??_.showLegend,ticks:t.ticks?.value??_.ticks,max:t.max?.value??_.max,min:t.min?.value??_.min,graticule:t.graticule?.value??_.graticule}},`setOptions`),getConfig:x,clear:t(()=>{c(),y=structuredClone(v)},`clear`),setAccTitle:a,getAccTitle:d,setDiagramTitle:o,getDiagramTitle:r,getAccDescription:s,setAccDescription:n},k=t(e=>{h(e,O);let{axes:t,curves:n,options:r}=e;O.setAxes(t),O.setCurves(n),O.setOptions(r)},`populate`),A={parse:t(async t=>{let n=await g(`radar`,t);e.debug(n),k(n)},`parse`)},j=t((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=M(m(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;N(u,a,p,s.ticks,s.graticule),P(u,a,p,c),F(u,a,o,f,d,s.graticule,c),R(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),M=t((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return l(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),N=t((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t<r;t++){let i=n*(t+1)/r;e.append(`circle`).attr(`r`,i).attr(`class`,`radarGraticule`)}else if(i===`polygon`){let i=t.length;for(let a=0;a<r;a++){let o=n*(a+1)/r,s=t.map((e,t)=>{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),P=t((e,t,n,r)=>{let i=t.length;for(let a=0;a<i;a++){let o=t[a].label,s=2*a*Math.PI/i-Math.PI/2;e.append(`line`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,n*r.axisScaleFactor*Math.cos(s)).attr(`y2`,n*r.axisScaleFactor*Math.sin(s)).attr(`class`,`radarAxisLine`),e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*Math.cos(s)).attr(`y`,n*r.axisLabelFactor*Math.sin(s)).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function F(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=I(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,L(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}t(F,`drawCurves`);function I(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}t(I,`relativeRadius`);function L(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i<n;i++){let a=e[(i-1+n)%n],o=e[i],s=e[(i+1)%n],c=e[(i+2)%n],l={x:o.x+(s.x-a.x)*t,y:o.y+(s.y-a.y)*t},u={x:s.x-(c.x-o.x)*t,y:s.y-(c.y-o.y)*t};r+=` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`}return`${r} Z`}t(L,`closedRoundCurve`);function R(e,t,n,r){if(!n)return;let i=(r.width/2+r.marginRight)*3/4,a=-(r.height/2+r.marginTop)*3/4;t.forEach((t,n)=>{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}t(R,`drawLegend`);var z={draw:j},B=t((e,t)=>{let n=``;for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=e[`cScale${r}`];n+=`
2
2
  .radarCurve-${r} {
3
3
  color: ${i};
4
4
  fill: ${i};
@@ -1,4 +1,4 @@
1
- import{g as e,h as t}from"./src-B0URjIBy.js";import{B as n,C as r,V as i,W as a,_ as o,a as s,c,d as l,v as u,y as d}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{r as f}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{p}from"./index-D8W5OEji.js";import{t as m}from"./chunk-4BX2VUAB-BMQY333L.js";import{t as h}from"./mermaid-parser.core-zSGpBtrZ.js";var g=l.packet,_=class{constructor(){this.packet=[],this.setAccTitle=i,this.getAccTitle=u,this.setDiagramTitle=a,this.getDiagramTitle=r,this.getAccDescription=o,this.setAccDescription=n}static{t(this,`PacketDB`)}getConfig(){let e=f({...g,...d().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){s(),this.packet=[]}},v=1e4,y=t((t,n)=>{m(t,n);let r=-1,i=[],a=1,{bitsPerRow:o}=n.getConfig();for(let{start:s,end:c,bits:l,label:u}of t.blocks){if(s!==void 0&&c!==void 0&&c<s)throw Error(`Packet block ${s} - ${c} is invalid. End must be greater than start.`);if(s??=r+1,s!==r+1)throw Error(`Packet block ${s} - ${c??s} is not contiguous. It should start from ${r+1}.`);if(l===0)throw Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);for(c??=s+(l??1)-1,l??=c-s+1,r=c,e.debug(`Packet block ${s} - ${r} with label ${u}`);i.length<=o+1&&n.getPacket().length<v;){let[e,t]=b({start:s,end:c,bits:l,label:u},a,o);if(i.push(e),e.end+1===a*o&&(n.pushWord(i),i=[],a++),!t)break;({start:s,end:c,bits:l,label:u}=t)}}n.pushWord(i)},`populate`),b=t((e,t,n)=>{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),x={parser:{yy:void 0},parse:t(async t=>{let n=await h(`packet`,t),r=x.parser?.yy;if(!(r instanceof _))throw 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.`);e.debug(n),y(n,r)},`parse`)},S=t((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:s,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),m=o+s,h=m*(d.length+1)-(f?0:o),g=l*u+2,_=p(t);_.attr(`viewBox`,`0 0 ${g} ${h}`),c(_,h,g,a.useMaxWidth);for(let[e,t]of d.entries())C(_,t,e,a);_.append(`text`).text(f).attr(`x`,g/2).attr(`y`,h-m/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),C=t((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),w={draw:S},T={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},E={parser:x,get db(){return new _},renderer:w,styles:t(({packet:e}={})=>{let t=f(T,e);return`
1
+ import{g as e,h as t}from"./src-B0URjIBy.js";import{B as n,C as r,V as i,W as a,_ as o,a as s,c,d as l,v as u,y as d}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{r as f}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{p}from"./index-DXEtzDAV.js";import{t as m}from"./chunk-4BX2VUAB-BMQY333L.js";import{t as h}from"./mermaid-parser.core-CCnSeR0B.js";var g=l.packet,_=class{constructor(){this.packet=[],this.setAccTitle=i,this.getAccTitle=u,this.setDiagramTitle=a,this.getDiagramTitle=r,this.getAccDescription=o,this.setAccDescription=n}static{t(this,`PacketDB`)}getConfig(){let e=f({...g,...d().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){s(),this.packet=[]}},v=1e4,y=t((t,n)=>{m(t,n);let r=-1,i=[],a=1,{bitsPerRow:o}=n.getConfig();for(let{start:s,end:c,bits:l,label:u}of t.blocks){if(s!==void 0&&c!==void 0&&c<s)throw Error(`Packet block ${s} - ${c} is invalid. End must be greater than start.`);if(s??=r+1,s!==r+1)throw Error(`Packet block ${s} - ${c??s} is not contiguous. It should start from ${r+1}.`);if(l===0)throw Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);for(c??=s+(l??1)-1,l??=c-s+1,r=c,e.debug(`Packet block ${s} - ${r} with label ${u}`);i.length<=o+1&&n.getPacket().length<v;){let[e,t]=b({start:s,end:c,bits:l,label:u},a,o);if(i.push(e),e.end+1===a*o&&(n.pushWord(i),i=[],a++),!t)break;({start:s,end:c,bits:l,label:u}=t)}}n.pushWord(i)},`populate`),b=t((e,t,n)=>{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),x={parser:{yy:void 0},parse:t(async t=>{let n=await h(`packet`,t),r=x.parser?.yy;if(!(r instanceof _))throw 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.`);e.debug(n),y(n,r)},`parse`)},S=t((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:s,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),m=o+s,h=m*(d.length+1)-(f?0:o),g=l*u+2,_=p(t);_.attr(`viewBox`,`0 0 ${g} ${h}`),c(_,h,g,a.useMaxWidth);for(let[e,t]of d.entries())C(_,t,e,a);_.append(`text`).text(f).attr(`x`,g/2).attr(`y`,h-m/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),C=t((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),w={draw:S},T={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},E={parser:x,get db(){return new _},renderer:w,styles:t(({packet:e}={})=>{let t=f(T,e);return`
2
2
  .packetByte {
3
3
  font-size: ${t.byteFontSize};
4
4
  }
@@ -1,4 +1,4 @@
1
- import{g as e,h as t,m as n,p as r}from"./src-B0URjIBy.js";import{B as i,C as a,V as o,W as s,_ as c,a as l,b as u,nt as d,v as f}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{t as p}from"./channel-B_vP0iKX.js";import{h as m,s as h}from"./chunk-GEFDOKGD-D5eIWnuf.js";import"./chunk-MX3YWQON-FdgNOTEP.js";import"./chunk-YBOYWFTD-i-hva81G.js";import"./chunk-PQ6SQG4A-DB1drAIU.js";import"./chunk-PU5JKC2W-KA2MZku5.js";import"./chunk-KYZI473N-CXcIXlKo.js";import"./chunk-O4XLMI2P-n-oWchCV.js";import{l as g,u as _}from"./index-D8W5OEji.js";import{t as v}from"./chunk-55IACEB6-CLHg9Ulb.js";import{t as y}from"./chunk-KX2RTZJC-yDo9-99g.js";var b=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,23],c=[1,24],l=[1,25],u=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],h=[1,20],g=[1,18],_=[1,21],v=[1,22],y=[1,36],b=[1,37],x=[1,38],S=[1,39],C=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],T=[1,45],E=[1,46],D=[1,55],O=[40,48,50,51,52,70,71],k=[1,66],A=[1,64],j=[1,61],M=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],F=[65,66,67,68,69],I=[1,84],L=[1,83],R=[1,81],z=[1,82],B=[6,10,42,47],V=[6,10,13,41,42,47,48,49],H=[1,92],U=[1,91],W=[1,90],G=[19,58],K=[1,101],q=[1,100],J=[19,58,60,62],Y={trace:t(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,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$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`,60:`,`,61:`ATTRIBUTE_KEY`,62:`COMMENT`,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`},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],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[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.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 67:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 79:case 80:this.$=a[s].replace(/"/g,``);break;case 55:case 56:case 57:case 58:case 81:this.$=a[s];break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 65:case 66:case 69:this.$=a[s];break;case 68:a[s-2].push(a[s]),this.$=a[s-2];break;case 70:this.$=a[s].replace(/"/g,``);break;case 71:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:30,11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(n,[2,5]),e(n,[2,6]),e(n,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:y,66:b,67:x,68:S,69:C}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(n,[2,27]),e(n,[2,28]),e(n,[2,29]),e(n,[2,30]),e(n,[2,31]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(n,[2,32]),e(n,[2,33]),e(n,[2,34]),e(n,[2,35]),{16:44,40:T,41:E},{16:47,40:T,41:E},{16:48,40:T,41:E},e(n,[2,4]),{11:49,40:f,48:h,50:g,51:_,52:v},{16:50,40:T,41:E},{18:51,19:[1,52],53:53,54:54,58:D},{11:56,40:f,48:h,50:g,51:_,52:v},{64:57,70:[1,58],71:[1,59]},e(O,[2,72]),e(O,[2,73]),e(O,[2,74]),e(O,[2,75]),e(O,[2,76]),e(n,[2,24]),e(n,[2,25]),e(n,[2,26]),{13:k,38:60,41:A,42:j,45:62,46:63,48:M,49:N},e(P,[2,37]),e(P,[2,38]),{16:68,40:T,41:E,42:j},{13:k,38:69,41:A,42:j,45:62,46:63,48:M,49:N},{13:[1,70],15:[1,71]},e(n,[2,17],{63:35,12:72,17:[1,73],42:j,65:y,66:b,67:x,68:S,69:C}),{19:[1,74]},e(n,[2,14]),{18:75,19:[2,59],53:53,54:54,58:D},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:y,66:b,67:x,68:S,69:C},e(F,[2,77]),e(F,[2,78]),{6:I,10:L,39:80,42:R,47:z},{40:[1,85],41:[1,86]},e(B,[2,43],{46:87,13:k,41:A,48:M,49:N}),e(V,[2,45]),e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(n,[2,41],{42:j}),{6:I,10:L,39:88,42:R,47:z},{14:89,40:H,50:U,72:W},{16:93,40:T,41:E},{11:94,40:f,48:h,50:g,51:_,52:v},{18:95,19:[1,96],53:53,54:54,58:D},e(n,[2,12]),{19:[2,60]},e(G,[2,61],{56:97,57:98,59:99,61:K,62:q}),e([19,58,61,62],[2,66]),e(n,[2,22],{15:[1,103],17:[1,102]}),e([40,48,50,51,52],[2,71]),e(n,[2,36]),{13:k,41:A,45:104,46:63,48:M,49:N},e(n,[2,47]),e(n,[2,48]),e(n,[2,49]),e(P,[2,39]),e(P,[2,40]),e(V,[2,46]),e(n,[2,42]),e(n,[2,8]),e(n,[2,79]),e(n,[2,80]),e(n,[2,81]),{13:[1,105],42:j},{13:[1,107],15:[1,106]},{19:[1,108]},e(n,[2,15]),e(G,[2,62],{57:109,60:[1,110],62:q}),e(G,[2,63]),e(J,[2,67]),e(G,[2,70]),e(J,[2,69]),{18:111,19:[1,112],53:53,54:54,58:D},{16:113,40:T,41:E},e(B,[2,44],{46:87,13:k,41:A,48:M,49:N}),{14:114,40:H,50:U,72:W},{16:115,40:T,41:E},{14:116,40:H,50:U,72:W},e(n,[2,13]),e(G,[2,64]),{59:117,61:K},{19:[1,118]},e(n,[2,20]),e(n,[2,23],{17:[1,119],42:j}),e(n,[2,11]),{13:[1,120],42:j},e(n,[2,10]),e(J,[2,68]),e(n,[2,18]),{18:121,19:[1,122],53:53,54:54,58:D},{14:123,40:H,50:U,72:W},{19:[1,124]},e(n,[2,21]),e(n,[2,9]),e(n,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{g as e,h as t,m as n,p as r}from"./src-B0URjIBy.js";import{B as i,C as a,V as o,W as s,_ as c,a as l,b as u,nt as d,v as f}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{t as p}from"./channel-B_vP0iKX.js";import{h as m,s as h}from"./chunk-GEFDOKGD-D5eIWnuf.js";import"./chunk-MX3YWQON-FdgNOTEP.js";import"./chunk-YBOYWFTD-i-hva81G.js";import"./chunk-PQ6SQG4A-DB1drAIU.js";import"./chunk-PU5JKC2W-KA2MZku5.js";import"./chunk-KYZI473N-CXcIXlKo.js";import"./chunk-O4XLMI2P-n-oWchCV.js";import{l as g,u as _}from"./index-DXEtzDAV.js";import{t as v}from"./chunk-55IACEB6-CLHg9Ulb.js";import{t as y}from"./chunk-KX2RTZJC-yDo9-99g.js";var b=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,23],c=[1,24],l=[1,25],u=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],h=[1,20],g=[1,18],_=[1,21],v=[1,22],y=[1,36],b=[1,37],x=[1,38],S=[1,39],C=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],T=[1,45],E=[1,46],D=[1,55],O=[40,48,50,51,52,70,71],k=[1,66],A=[1,64],j=[1,61],M=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],F=[65,66,67,68,69],I=[1,84],L=[1,83],R=[1,81],z=[1,82],B=[6,10,42,47],V=[6,10,13,41,42,47,48,49],H=[1,92],U=[1,91],W=[1,90],G=[19,58],K=[1,101],q=[1,100],J=[19,58,60,62],Y={trace:t(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,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$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`,60:`,`,61:`ATTRIBUTE_KEY`,62:`COMMENT`,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`},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],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[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.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 67:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 79:case 80:this.$=a[s].replace(/"/g,``);break;case 55:case 56:case 57:case 58:case 81:this.$=a[s];break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 65:case 66:case 69:this.$=a[s];break;case 68:a[s-2].push(a[s]),this.$=a[s-2];break;case 70:this.$=a[s].replace(/"/g,``);break;case 71:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:30,11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(n,[2,5]),e(n,[2,6]),e(n,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:y,66:b,67:x,68:S,69:C}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(n,[2,27]),e(n,[2,28]),e(n,[2,29]),e(n,[2,30]),e(n,[2,31]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(n,[2,32]),e(n,[2,33]),e(n,[2,34]),e(n,[2,35]),{16:44,40:T,41:E},{16:47,40:T,41:E},{16:48,40:T,41:E},e(n,[2,4]),{11:49,40:f,48:h,50:g,51:_,52:v},{16:50,40:T,41:E},{18:51,19:[1,52],53:53,54:54,58:D},{11:56,40:f,48:h,50:g,51:_,52:v},{64:57,70:[1,58],71:[1,59]},e(O,[2,72]),e(O,[2,73]),e(O,[2,74]),e(O,[2,75]),e(O,[2,76]),e(n,[2,24]),e(n,[2,25]),e(n,[2,26]),{13:k,38:60,41:A,42:j,45:62,46:63,48:M,49:N},e(P,[2,37]),e(P,[2,38]),{16:68,40:T,41:E,42:j},{13:k,38:69,41:A,42:j,45:62,46:63,48:M,49:N},{13:[1,70],15:[1,71]},e(n,[2,17],{63:35,12:72,17:[1,73],42:j,65:y,66:b,67:x,68:S,69:C}),{19:[1,74]},e(n,[2,14]),{18:75,19:[2,59],53:53,54:54,58:D},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:y,66:b,67:x,68:S,69:C},e(F,[2,77]),e(F,[2,78]),{6:I,10:L,39:80,42:R,47:z},{40:[1,85],41:[1,86]},e(B,[2,43],{46:87,13:k,41:A,48:M,49:N}),e(V,[2,45]),e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(n,[2,41],{42:j}),{6:I,10:L,39:88,42:R,47:z},{14:89,40:H,50:U,72:W},{16:93,40:T,41:E},{11:94,40:f,48:h,50:g,51:_,52:v},{18:95,19:[1,96],53:53,54:54,58:D},e(n,[2,12]),{19:[2,60]},e(G,[2,61],{56:97,57:98,59:99,61:K,62:q}),e([19,58,61,62],[2,66]),e(n,[2,22],{15:[1,103],17:[1,102]}),e([40,48,50,51,52],[2,71]),e(n,[2,36]),{13:k,41:A,45:104,46:63,48:M,49:N},e(n,[2,47]),e(n,[2,48]),e(n,[2,49]),e(P,[2,39]),e(P,[2,40]),e(V,[2,46]),e(n,[2,42]),e(n,[2,8]),e(n,[2,79]),e(n,[2,80]),e(n,[2,81]),{13:[1,105],42:j},{13:[1,107],15:[1,106]},{19:[1,108]},e(n,[2,15]),e(G,[2,62],{57:109,60:[1,110],62:q}),e(G,[2,63]),e(J,[2,67]),e(G,[2,70]),e(J,[2,69]),{18:111,19:[1,112],53:53,54:54,58:D},{16:113,40:T,41:E},e(B,[2,44],{46:87,13:k,41:A,48:M,49:N}),{14:114,40:H,50:U,72:W},{16:115,40:T,41:E},{14:116,40:H,50:U,72:W},e(n,[2,13]),e(G,[2,64]),{59:117,61:K},{19:[1,118]},e(n,[2,20]),e(n,[2,23],{17:[1,119],42:j}),e(n,[2,11]),{13:[1,120],42:j},e(n,[2,10]),e(J,[2,68]),e(n,[2,18]),{18:121,19:[1,122],53:53,54:54,58:D},{14:123,40:H,50:U,72:W},{19:[1,124]},e(n,[2,21]),e(n,[2,9]),e(n,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};Y.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(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:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{g as e,h as t,p as n}from"./src-B0URjIBy.js";import{B as r,C as i,U as a,V as o,W as s,Z as c,_ as l,a as u,b as d,nt as f,s as p,u as ee,v as m}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{t as h}from"./channel-B_vP0iKX.js";import{h as g,s as _}from"./chunk-GEFDOKGD-D5eIWnuf.js";import"./chunk-MX3YWQON-FdgNOTEP.js";import"./chunk-YBOYWFTD-i-hva81G.js";import"./chunk-PQ6SQG4A-DB1drAIU.js";import"./chunk-PU5JKC2W-KA2MZku5.js";import{o as te}from"./chunk-KYZI473N-CXcIXlKo.js";import"./chunk-O4XLMI2P-n-oWchCV.js";import{d as ne,f as re,l as v,u as y}from"./index-D8W5OEji.js";import{t as b}from"./chunk-FMBD7UC4-Cca8p-Ag.js";import{t as x}from"./chunk-JSJVCQXG-BthkA1o-.js";import{t as S}from"./chunk-55IACEB6-CLHg9Ulb.js";import{t as C}from"./chunk-KX2RTZJC-yDo9-99g.js";var w=`flowchart-`,T=class{constructor(){this.vertexCounter=0,this.config=d(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=o,this.setAccDescription=r,this.setDiagramTitle=s,this.getAccTitle=m,this.getAccDescription=l,this.getDiagramTitle=i,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{t(this,`FlowDB`)}sanitizeText(e){return p.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return t.domId;return e}addVertex(e,t,n,r,i,a,o={},s){if(!e||e.trim().length===0)return;let c;if(s!==void 0){let e;e=s.includes(`
1
+ import{g as e,h as t,p as n}from"./src-B0URjIBy.js";import{B as r,C as i,U as a,V as o,W as s,Z as c,_ as l,a as u,b as d,nt as f,s as p,u as ee,v as m}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{t as h}from"./channel-B_vP0iKX.js";import{h as g,s as _}from"./chunk-GEFDOKGD-D5eIWnuf.js";import"./chunk-MX3YWQON-FdgNOTEP.js";import"./chunk-YBOYWFTD-i-hva81G.js";import"./chunk-PQ6SQG4A-DB1drAIU.js";import"./chunk-PU5JKC2W-KA2MZku5.js";import{o as te}from"./chunk-KYZI473N-CXcIXlKo.js";import"./chunk-O4XLMI2P-n-oWchCV.js";import{d as ne,f as re,l as v,u as y}from"./index-DXEtzDAV.js";import{t as b}from"./chunk-FMBD7UC4-Cca8p-Ag.js";import{t as x}from"./chunk-JSJVCQXG-BthkA1o-.js";import{t as S}from"./chunk-55IACEB6-CLHg9Ulb.js";import{t as C}from"./chunk-KX2RTZJC-yDo9-99g.js";var w=`flowchart-`,T=class{constructor(){this.vertexCounter=0,this.config=d(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=o,this.setAccDescription=r,this.setDiagramTitle=s,this.getAccTitle=m,this.getAccDescription=l,this.getDiagramTitle=i,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{t(this,`FlowDB`)}sanitizeText(e){return p.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return t.domId;return e}addVertex(e,t,n,r,i,a,o={},s){if(!e||e.trim().length===0)return;let c;if(s!==void 0){let e;e=s.includes(`
2
2
  `)?s+`
3
3
  `:`{
4
4
  `+s+`
@@ -0,0 +1 @@
1
+ import"./chunk-XZSTWKYB-DCEIWIqq.js";import{n as e}from"./chunk-7E7YKBS2-BGpfhwxh.js";export{e as createGitGraphServices};
@@ -1,4 +1,4 @@
1
- import{g as e,h as t,p as n}from"./src-B0URjIBy.js";import{B as r,C as i,V as a,W as o,_ as s,a as c,d as l,q as u,s as d,v as f,y as p}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{h as ee,p as te,r as m}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{t as h}from"./chunk-4BX2VUAB-BMQY333L.js";import{t as g}from"./mermaid-parser.core-zSGpBtrZ.js";import{t as ne}from"./chunk-QZHKN3VN-C-zFVA0L.js";var _={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},re=l.gitGraph,v=t(()=>m({...re,...p().gitGraph}),`getConfig`),y=new ne(()=>{let e=v(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function b(){return te({length:7})}t(b,`getID`);function x(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}t(x,`uniqBy`);var S=t(function(e){y.records.direction=e},`setDirection`),C=t(function(t){e.debug(`options str`,t),t=t?.trim(),t||=`{}`;try{y.records.options=JSON.parse(t)}catch(t){e.error(`error while parsing gitGraph options`,t.message)}},`setOptions`),ie=t(function(){return y.records.options},`getOptions`),ae=t(function(t){let n=t.msg,r=t.id,i=t.type,a=t.tags;e.info(`commit`,n,r,i,a),e.debug(`Entering commit:`,n,r,i,a);let o=v();r=d.sanitizeText(r,o),n=d.sanitizeText(n,o),a=a?.map(e=>d.sanitizeText(e,o));let s={id:r||y.records.seq+`-`+b(),message:n,seq:y.records.seq++,type:i??_.NORMAL,tags:a??[],parents:y.records.head==null?[]:[y.records.head.id],branch:y.records.currBranch};y.records.head=s,e.info(`main branch`,o.mainBranchName),y.records.commits.has(s.id)&&e.warn(`Commit ID ${s.id} already exists`),y.records.commits.set(s.id,s),y.records.branches.set(y.records.currBranch,s.id),e.debug(`in pushCommit `+s.id)},`commit`),oe=t(function(t){let n=t.name,r=t.order;if(n=d.sanitizeText(n,v()),y.records.branches.has(n))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${n}")`);y.records.branches.set(n,y.records.head==null?null:y.records.head.id),y.records.branchConfig.set(n,{name:n,order:r}),w(n),e.debug(`in createBranch`)},`branch`),se=t(t=>{let n=t.branch,r=t.id,i=t.type,a=t.tags,o=v();n=d.sanitizeText(n,o),r&&=d.sanitizeText(r,o);let s=y.records.branches.get(y.records.currBranch),c=y.records.branches.get(n),l=s?y.records.commits.get(s):void 0,u=c?y.records.commits.get(c):void 0;if(l&&u&&l.branch===n)throw Error(`Cannot merge branch '${n}' into itself.`);if(y.records.currBranch===n){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`commit`]},e}if(!y.records.branches.has(n)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) does not exist`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch ${n}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(r&&y.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${n} ${r} ${i} ${a?.join(` `)}`,token:`merge ${n} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${n} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${y.records.seq}-${b()}`,message:`merged branch ${n} into ${y.records.currBranch}`,seq:y.records.seq++,parents:y.records.head==null?[]:[y.records.head.id,f],branch:y.records.currBranch,type:_.MERGE,customType:i,customId:!!r,tags:a??[]};y.records.head=p,y.records.commits.set(p.id,p),y.records.branches.set(y.records.currBranch,p.id),e.debug(y.records.branches),e.debug(`in mergeBranch`)},`merge`),ce=t(function(t){let n=t.id,r=t.targetId,i=t.tags,a=t.parent;e.debug(`Entering cherryPick:`,n,r,i);let o=v();if(n=d.sanitizeText(n,o),r=d.sanitizeText(r,o),i=i?.map(e=>d.sanitizeText(e,o)),a=d.sanitizeText(a,o),!n||!y.records.commits.has(n)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let s=y.records.commits.get(n);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===_.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!y.records.commits.has(r)){if(c===y.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let t=y.records.branches.get(y.records.currBranch);if(t===void 0||!t){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let o=y.records.commits.get(t);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:y.records.seq+`-`+b(),message:`cherry-picked ${s?.message} into ${y.records.currBranch}`,seq:y.records.seq++,parents:y.records.head==null?[]:[y.records.head.id,s.id],branch:y.records.currBranch,type:_.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===_.MERGE?`|parent:${a}`:``}`]};y.records.head=l,y.records.commits.set(l.id,l),y.records.branches.set(y.records.currBranch,l.id),e.debug(y.records.branches),e.debug(`in cherryPick`)}},`cherryPick`),w=t(function(e){if(e=d.sanitizeText(e,v()),y.records.branches.has(e)){y.records.currBranch=e;let t=y.records.branches.get(y.records.currBranch);t===void 0||!t?y.records.head=null:y.records.head=y.records.commits.get(t)??null}else{let t=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 T(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}t(T,`upsert`);function E(t){let n=t.reduce((e,t)=>e.seq>t.seq?e:t,t[0]),r=``;t.forEach(function(e){e===n?r+=` *`:r+=` |`});let i=[r,n.id,n.seq];for(let e in y.records.branches)y.records.branches.get(e)===n.id&&i.push(e);if(e.debug(i.join(` `)),n.parents&&n.parents.length==2&&n.parents[0]&&n.parents[1]){let e=y.records.commits.get(n.parents[0]);T(t,n,e),n.parents[1]&&t.push(y.records.commits.get(n.parents[1]))}else if(n.parents.length==0)return;else if(n.parents[0]){let e=y.records.commits.get(n.parents[0]);T(t,n,e)}t=x(t,e=>e.id),E(t)}t(E,`prettyPrintCommitHistory`);var le=t(function(){e.debug(y.records.commits);let t=D()[0];E([t])},`prettyPrint`),ue=t(function(){y.reset(),c()},`clear`),de=t(function(){return[...y.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),fe=t(function(){return y.records.branches},`getBranches`),pe=t(function(){return y.records.commits},`getCommits`),D=t(function(){let t=[...y.records.commits.values()];return t.forEach(function(t){e.debug(t.id)}),t.sort((e,t)=>e.seq-t.seq),t},`getCommitsArray`),O={commitType:_,getConfig:v,setDirection:S,setOptions:C,getOptions:ie,commit:ae,branch:oe,merge:se,cherryPick:ce,checkout:w,prettyPrint:le,clear:ue,getBranchesAsObjArray:de,getBranches:fe,getCommits:pe,getCommitsArray:D,getCurrentBranch:t(function(){return y.records.currBranch},`getCurrentBranch`),getDirection:t(function(){return y.records.direction},`getDirection`),getHead:t(function(){return y.records.head},`getHead`),setAccTitle:a,getAccTitle:f,getAccDescription:s,setAccDescription:r,setDiagramTitle:o,getDiagramTitle:i},k=t((e,t)=>{h(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)A(n,t)},`populate`),A=t((n,r)=>{let i={Commit:t(e=>r.commit(j(e)),`Commit`),Branch:t(e=>r.branch(M(e)),`Branch`),Merge:t(e=>r.merge(N(e)),`Merge`),Checkout:t(e=>r.checkout(P(e)),`Checkout`),CherryPicking:t(e=>r.cherryPick(F(e)),`CherryPicking`)}[n.$type];i?i(n):e.error(`Unknown statement type: ${n.$type}`)},`parseStatement`),j=t(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?_.NORMAL:_[e.type],tags:e.tags??void 0}),`parseCommit`),M=t(e=>({name:e.name,order:e.order??0}),`parseBranch`),N=t(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:_[e.type],tags:e.tags??void 0}),`parseMerge`),P=t(e=>e.branch,`parseCheckout`),F=t(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),I={parse:t(async t=>{let n=await g(`gitGraph`,t);e.debug(n),k(n,O)},`parse`)},L=10,R=40,z=4,B=2,V=8,H=new Map,U=new Map,W=30,G=new Map,K=[],q=0,J=`LR`,me=t(()=>{H.clear(),U.clear(),G.clear(),q=0,K=[],J=`LR`},`clear`),Y=t(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(e=>{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=e.trim(),t.appendChild(n)}),t},`drawText`),X=t(e=>{let n,r,i;return J===`BT`?(r=t((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=t((e,t)=>e>=t,`comparisonFunc`),i=0),e.forEach(e=>{let t=J===`TB`||J==`BT`?U.get(e)?.y:U.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),he=t(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=U.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),ge=t((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=ve(n),i=Math.max(r,i)):a.push(n),ye(n,r)}),r=i,a.forEach(e=>{be(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=he(n.parents);r=U.get(e).y-R,r<=i&&(i=r);let t=H.get(n.branch).pos,a=r-L;U.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),_e=t(e=>{let t=X(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=U.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),ve=t(e=>_e(e)+R,`calculateCommitPosition`),ye=t((e,t)=>{let n=H.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+L;return U.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),be=t((e,t,n)=>{let r=H.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;U.set(e.id,{x:a,y:i})},`setRootPosition`),xe=t((e,t,n,r,i,a)=>{if(a===_.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10).attr(`y`,n.y-10).attr(`width`,20).attr(`height`,20).attr(`class`,`commit ${t.id} commit-highlight${i%V} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6).attr(`y`,n.y-6).attr(`width`,12).attr(`height`,12).attr(`class`,`commit ${t.id} commit${i%V} ${r}-inner`);else if(a===_.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,t.type===_.MERGE?9:10),o.attr(`class`,`commit ${t.id} commit${i%V}`),a===_.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,6),a.attr(`class`,`commit ${r} ${t.id} commit${i%V}`)}a===_.REVERSE&&e.append(`path`).attr(`d`,`M ${n.x-5},${n.y-5}L${n.x+5},${n.y+5}M${n.x-5},${n.y+5}L${n.x+5},${n.y-5}`).attr(`class`,`commit ${r} ${t.id} commit${i%V}`)}},`drawCommitBullet`),Se=t((e,t,n,r,i)=>{if(t.type!==_.CHERRY_PICK&&(t.customId&&t.type===_.MERGE||t.type!==_.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-B).attr(`y`,n.y+13.5).attr(`width`,c.width+2*B).attr(`height`,c.height+2*B),J===`TB`||J===`BT`?(o.attr(`x`,n.x-(c.width+4*z+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*z)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(J===`TB`||J===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),Z=t((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
1
+ import{g as e,h as t,p as n}from"./src-B0URjIBy.js";import{B as r,C as i,V as a,W as o,_ as s,a as c,d as l,q as u,s as d,v as f,y as p}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{h as ee,p as te,r as m}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{t as h}from"./chunk-4BX2VUAB-BMQY333L.js";import{t as g}from"./mermaid-parser.core-CCnSeR0B.js";import{t as ne}from"./chunk-QZHKN3VN-C-zFVA0L.js";var _={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},re=l.gitGraph,v=t(()=>m({...re,...p().gitGraph}),`getConfig`),y=new ne(()=>{let e=v(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function b(){return te({length:7})}t(b,`getID`);function x(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}t(x,`uniqBy`);var S=t(function(e){y.records.direction=e},`setDirection`),C=t(function(t){e.debug(`options str`,t),t=t?.trim(),t||=`{}`;try{y.records.options=JSON.parse(t)}catch(t){e.error(`error while parsing gitGraph options`,t.message)}},`setOptions`),ie=t(function(){return y.records.options},`getOptions`),ae=t(function(t){let n=t.msg,r=t.id,i=t.type,a=t.tags;e.info(`commit`,n,r,i,a),e.debug(`Entering commit:`,n,r,i,a);let o=v();r=d.sanitizeText(r,o),n=d.sanitizeText(n,o),a=a?.map(e=>d.sanitizeText(e,o));let s={id:r||y.records.seq+`-`+b(),message:n,seq:y.records.seq++,type:i??_.NORMAL,tags:a??[],parents:y.records.head==null?[]:[y.records.head.id],branch:y.records.currBranch};y.records.head=s,e.info(`main branch`,o.mainBranchName),y.records.commits.has(s.id)&&e.warn(`Commit ID ${s.id} already exists`),y.records.commits.set(s.id,s),y.records.branches.set(y.records.currBranch,s.id),e.debug(`in pushCommit `+s.id)},`commit`),oe=t(function(t){let n=t.name,r=t.order;if(n=d.sanitizeText(n,v()),y.records.branches.has(n))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${n}")`);y.records.branches.set(n,y.records.head==null?null:y.records.head.id),y.records.branchConfig.set(n,{name:n,order:r}),w(n),e.debug(`in createBranch`)},`branch`),se=t(t=>{let n=t.branch,r=t.id,i=t.type,a=t.tags,o=v();n=d.sanitizeText(n,o),r&&=d.sanitizeText(r,o);let s=y.records.branches.get(y.records.currBranch),c=y.records.branches.get(n),l=s?y.records.commits.get(s):void 0,u=c?y.records.commits.get(c):void 0;if(l&&u&&l.branch===n)throw Error(`Cannot merge branch '${n}' into itself.`);if(y.records.currBranch===n){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`commit`]},e}if(!y.records.branches.has(n)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) does not exist`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch ${n}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(r&&y.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${n} ${r} ${i} ${a?.join(` `)}`,token:`merge ${n} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${n} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${y.records.seq}-${b()}`,message:`merged branch ${n} into ${y.records.currBranch}`,seq:y.records.seq++,parents:y.records.head==null?[]:[y.records.head.id,f],branch:y.records.currBranch,type:_.MERGE,customType:i,customId:!!r,tags:a??[]};y.records.head=p,y.records.commits.set(p.id,p),y.records.branches.set(y.records.currBranch,p.id),e.debug(y.records.branches),e.debug(`in mergeBranch`)},`merge`),ce=t(function(t){let n=t.id,r=t.targetId,i=t.tags,a=t.parent;e.debug(`Entering cherryPick:`,n,r,i);let o=v();if(n=d.sanitizeText(n,o),r=d.sanitizeText(r,o),i=i?.map(e=>d.sanitizeText(e,o)),a=d.sanitizeText(a,o),!n||!y.records.commits.has(n)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let s=y.records.commits.get(n);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===_.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!y.records.commits.has(r)){if(c===y.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let t=y.records.branches.get(y.records.currBranch);if(t===void 0||!t){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let o=y.records.commits.get(t);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:y.records.seq+`-`+b(),message:`cherry-picked ${s?.message} into ${y.records.currBranch}`,seq:y.records.seq++,parents:y.records.head==null?[]:[y.records.head.id,s.id],branch:y.records.currBranch,type:_.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===_.MERGE?`|parent:${a}`:``}`]};y.records.head=l,y.records.commits.set(l.id,l),y.records.branches.set(y.records.currBranch,l.id),e.debug(y.records.branches),e.debug(`in cherryPick`)}},`cherryPick`),w=t(function(e){if(e=d.sanitizeText(e,v()),y.records.branches.has(e)){y.records.currBranch=e;let t=y.records.branches.get(y.records.currBranch);t===void 0||!t?y.records.head=null:y.records.head=y.records.commits.get(t)??null}else{let t=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 T(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}t(T,`upsert`);function E(t){let n=t.reduce((e,t)=>e.seq>t.seq?e:t,t[0]),r=``;t.forEach(function(e){e===n?r+=` *`:r+=` |`});let i=[r,n.id,n.seq];for(let e in y.records.branches)y.records.branches.get(e)===n.id&&i.push(e);if(e.debug(i.join(` `)),n.parents&&n.parents.length==2&&n.parents[0]&&n.parents[1]){let e=y.records.commits.get(n.parents[0]);T(t,n,e),n.parents[1]&&t.push(y.records.commits.get(n.parents[1]))}else if(n.parents.length==0)return;else if(n.parents[0]){let e=y.records.commits.get(n.parents[0]);T(t,n,e)}t=x(t,e=>e.id),E(t)}t(E,`prettyPrintCommitHistory`);var le=t(function(){e.debug(y.records.commits);let t=D()[0];E([t])},`prettyPrint`),ue=t(function(){y.reset(),c()},`clear`),de=t(function(){return[...y.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),fe=t(function(){return y.records.branches},`getBranches`),pe=t(function(){return y.records.commits},`getCommits`),D=t(function(){let t=[...y.records.commits.values()];return t.forEach(function(t){e.debug(t.id)}),t.sort((e,t)=>e.seq-t.seq),t},`getCommitsArray`),O={commitType:_,getConfig:v,setDirection:S,setOptions:C,getOptions:ie,commit:ae,branch:oe,merge:se,cherryPick:ce,checkout:w,prettyPrint:le,clear:ue,getBranchesAsObjArray:de,getBranches:fe,getCommits:pe,getCommitsArray:D,getCurrentBranch:t(function(){return y.records.currBranch},`getCurrentBranch`),getDirection:t(function(){return y.records.direction},`getDirection`),getHead:t(function(){return y.records.head},`getHead`),setAccTitle:a,getAccTitle:f,getAccDescription:s,setAccDescription:r,setDiagramTitle:o,getDiagramTitle:i},k=t((e,t)=>{h(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)A(n,t)},`populate`),A=t((n,r)=>{let i={Commit:t(e=>r.commit(j(e)),`Commit`),Branch:t(e=>r.branch(M(e)),`Branch`),Merge:t(e=>r.merge(N(e)),`Merge`),Checkout:t(e=>r.checkout(P(e)),`Checkout`),CherryPicking:t(e=>r.cherryPick(F(e)),`CherryPicking`)}[n.$type];i?i(n):e.error(`Unknown statement type: ${n.$type}`)},`parseStatement`),j=t(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?_.NORMAL:_[e.type],tags:e.tags??void 0}),`parseCommit`),M=t(e=>({name:e.name,order:e.order??0}),`parseBranch`),N=t(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:_[e.type],tags:e.tags??void 0}),`parseMerge`),P=t(e=>e.branch,`parseCheckout`),F=t(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),I={parse:t(async t=>{let n=await g(`gitGraph`,t);e.debug(n),k(n,O)},`parse`)},L=10,R=40,z=4,B=2,V=8,H=new Map,U=new Map,W=30,G=new Map,K=[],q=0,J=`LR`,me=t(()=>{H.clear(),U.clear(),G.clear(),q=0,K=[],J=`LR`},`clear`),Y=t(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(e=>{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=e.trim(),t.appendChild(n)}),t},`drawText`),X=t(e=>{let n,r,i;return J===`BT`?(r=t((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=t((e,t)=>e>=t,`comparisonFunc`),i=0),e.forEach(e=>{let t=J===`TB`||J==`BT`?U.get(e)?.y:U.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),he=t(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=U.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),ge=t((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=ve(n),i=Math.max(r,i)):a.push(n),ye(n,r)}),r=i,a.forEach(e=>{be(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=he(n.parents);r=U.get(e).y-R,r<=i&&(i=r);let t=H.get(n.branch).pos,a=r-L;U.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),_e=t(e=>{let t=X(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=U.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),ve=t(e=>_e(e)+R,`calculateCommitPosition`),ye=t((e,t)=>{let n=H.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+L;return U.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),be=t((e,t,n)=>{let r=H.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;U.set(e.id,{x:a,y:i})},`setRootPosition`),xe=t((e,t,n,r,i,a)=>{if(a===_.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10).attr(`y`,n.y-10).attr(`width`,20).attr(`height`,20).attr(`class`,`commit ${t.id} commit-highlight${i%V} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6).attr(`y`,n.y-6).attr(`width`,12).attr(`height`,12).attr(`class`,`commit ${t.id} commit${i%V} ${r}-inner`);else if(a===_.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,t.type===_.MERGE?9:10),o.attr(`class`,`commit ${t.id} commit${i%V}`),a===_.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,6),a.attr(`class`,`commit ${r} ${t.id} commit${i%V}`)}a===_.REVERSE&&e.append(`path`).attr(`d`,`M ${n.x-5},${n.y-5}L${n.x+5},${n.y+5}M${n.x-5},${n.y+5}L${n.x+5},${n.y-5}`).attr(`class`,`commit ${r} ${t.id} commit${i%V}`)}},`drawCommitBullet`),Se=t((e,t,n,r,i)=>{if(t.type!==_.CHERRY_PICK&&(t.customId&&t.type===_.MERGE||t.type!==_.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-B).attr(`y`,n.y+13.5).attr(`width`,c.width+2*B).attr(`height`,c.height+2*B),J===`TB`||J===`BT`?(o.attr(`x`,n.x-(c.width+4*z+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*z)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(J===`TB`||J===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),Z=t((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
2
2
  ${r-a/2-z/2},${l+B}
3
3
  ${r-a/2-z/2},${l-B}
4
4
  ${n.posWithOffset-a/2-z},${l-s-B}
@@ -1 +1 @@
1
- import{V as e,_ as t,a as n,r}from"./_createAssigner-BmxrMTIs.js";import{a as i}from"./index-D8W5OEji.js";import{D as a,S as o,a as s,i as c,n as l,r as u,s as d,t as f}from"./_baseUniq-BGPNLZq7.js";var p=r(function(e){return f(o(e,1,t,!0))}),m=`\0`,h=`\0`,g=``,_=class{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,`directed`)?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=n(void 0),this._defaultEdgeLabelFn=n(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[h]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(t){return e(t)||(t=n(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return a(this._nodes)}sources(){var e=this;return s(this.nodes(),function(t){return i(e._in[t])})}sinks(){var e=this;return s(this.nodes(),function(t){return i(e._out[t])})}setNodes(e,t){var n=arguments,r=this;return d(e,function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=h,this._children[e]={},this._children[h][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),d(a(this._in[e]),t),delete this._in[e],delete this._preds[e],d(a(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(u(t))t=h;else{t+=``;for(var n=t;!u(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==h)return t}}children(e){if(u(e)&&(e=h),this._isCompound){var t=this._children[e];if(t)return a(t)}else if(e===h)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return a(t)}successors(e){var t=this._sucs[e];if(t)return a(t)}neighbors(e){var t=this.predecessors(e);if(t)return p(t,this.successors(e))}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;d(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),d(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&d(t.nodes(),function(e){t.setParent(e,i(e))}),t}setDefaultEdgeLabel(t){return e(t)||(t=n(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return c(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return l(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,u(n)||(n=``+n);var o=b(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!u(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);var s=x(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,v(this._preds[t],e),v(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?S(this._isDirected,arguments[0]):b(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?S(this._isDirected,arguments[0]):b(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?S(this._isDirected,arguments[0]):b(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],y(this._preds[t],e),y(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=c(n);return t?s(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=c(n);return t?s(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};_.prototype._nodeCount=0,_.prototype._edgeCount=0;function v(e,t){e[t]?e[t]++:e[t]=1}function y(e,t){--e[t]||delete e[t]}function b(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+g+a+g+(u(r)?m:r)}function x(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function S(e,t){return b(e,t.v,t.w,t.name)}export{_ as t};
1
+ import{V as e,_ as t,a as n,r}from"./_createAssigner-BmxrMTIs.js";import{a as i}from"./index-DXEtzDAV.js";import{D as a,S as o,a as s,i as c,n as l,r as u,s as d,t as f}from"./_baseUniq-BdCUZ9M5.js";var p=r(function(e){return f(o(e,1,t,!0))}),m=`\0`,h=`\0`,g=``,_=class{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,`directed`)?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=n(void 0),this._defaultEdgeLabelFn=n(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[h]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(t){return e(t)||(t=n(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return a(this._nodes)}sources(){var e=this;return s(this.nodes(),function(t){return i(e._in[t])})}sinks(){var e=this;return s(this.nodes(),function(t){return i(e._out[t])})}setNodes(e,t){var n=arguments,r=this;return d(e,function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=h,this._children[e]={},this._children[h][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),d(a(this._in[e]),t),delete this._in[e],delete this._preds[e],d(a(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(u(t))t=h;else{t+=``;for(var n=t;!u(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==h)return t}}children(e){if(u(e)&&(e=h),this._isCompound){var t=this._children[e];if(t)return a(t)}else if(e===h)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return a(t)}successors(e){var t=this._sucs[e];if(t)return a(t)}neighbors(e){var t=this.predecessors(e);if(t)return p(t,this.successors(e))}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;d(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),d(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&d(t.nodes(),function(e){t.setParent(e,i(e))}),t}setDefaultEdgeLabel(t){return e(t)||(t=n(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return c(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return l(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,u(n)||(n=``+n);var o=b(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!u(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);var s=x(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,v(this._preds[t],e),v(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?S(this._isDirected,arguments[0]):b(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?S(this._isDirected,arguments[0]):b(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?S(this._isDirected,arguments[0]):b(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],y(this._preds[t],e),y(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=c(n);return t?s(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=c(n);return t?s(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};_.prototype._nodeCount=0,_.prototype._edgeCount=0;function v(e,t){e[t]?e[t]++:e[t]=1}function y(e,t){--e[t]||delete e[t]}function b(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+g+a+g+(u(r)?m:r)}function x(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function S(e,t){return b(e,t.v,t.w,t.name)}export{_ as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-CFjPhJqf.js";import{h as t,m as n,n as r,r as i,t as a}from"./index-D8W5OEji.js";var o=e(t(),1),s=n(),c=({code:e,language:t,raw:n,className:c,startLine:l,lineNumbers:u,...d})=>{let{shikiTheme:f}=(0,o.useContext)(i),p=r(),[m,h]=(0,o.useState)(n);return(0,o.useEffect)(()=>{if(!p){h(n);return}let r=p.highlight({code:e,language:t,themes:f},e=>{h(e)});r&&h(r)},[e,t,f,p,n]),(0,s.jsx)(a,{className:c,language:t,lineNumbers:u,result:m,startLine:l,...d})};export{c as HighlightedCodeBlockBody};
1
+ import{o as e}from"./chunk-CFjPhJqf.js";import{h as t,m as n,n as r,r as i,t as a}from"./index-DXEtzDAV.js";var o=e(t(),1),s=n(),c=({code:e,language:t,raw:n,className:c,startLine:l,lineNumbers:u,...d})=>{let{shikiTheme:f}=(0,o.useContext)(i),p=r(),[m,h]=(0,o.useState)(n);return(0,o.useEffect)(()=>{if(!p){h(n);return}let r=p.highlight({code:e,language:t,themes:f},e=>{h(e)});r&&h(r)},[e,t,f,p,n]),(0,s.jsx)(a,{className:c,language:t,lineNumbers:u,result:m,startLine:l,...d})};export{c as HighlightedCodeBlockBody};