@i14ks/ccv 0.49.0 → 0.50.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.
- package/bundle/ccv.mjs +53 -3
- package/package.json +1 -1
- package/web/assets/MarkdownTextEditor-DoP0b52_.js +60 -0
- package/web/assets/{abnfDiagram-S7VZAUFO-C6rudl3G.js → abnfDiagram-S7VZAUFO-CApqnaGR.js} +1 -1
- package/web/assets/{architectureDiagram-YGSQEFNW-Chxd_j3W.js → architectureDiagram-YGSQEFNW-jwCcwggk.js} +1 -1
- package/web/assets/{blockDiagram-APKKGZFW-CX9y-KCE.js → blockDiagram-APKKGZFW-Bji4PkTF.js} +1 -1
- package/web/assets/{c4Diagram-KJ2TOQU5-SjVMVZLW.js → c4Diagram-KJ2TOQU5-BFRf3dTO.js} +1 -1
- package/web/assets/{chunk-2Q5K7J3B-D4joGaMo.js → chunk-2Q5K7J3B-DUFwqu3B.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-Bx6fCaId.js → chunk-5VM5RSS4-BNCdpRtw.js} +1 -1
- package/web/assets/{chunk-HFQBQIA3-GmYpzkM2.js → chunk-HFQBQIA3-D8sImu8E.js} +1 -1
- package/web/assets/{chunk-JWPE2WC7-YRiv3Zg6.js → chunk-JWPE2WC7-BhL2yBgo.js} +1 -1
- package/web/assets/{chunk-KQLB2F66-DTEa-Nv0.js → chunk-KQLB2F66-pFBglgtP.js} +2 -2
- package/web/assets/{chunk-KS47KZWR-DLIoy_uq.js → chunk-KS47KZWR-BrLOmWWS.js} +1 -1
- package/web/assets/{chunk-OY52VR5R-d0ASvNW1.js → chunk-OY52VR5R-Cgk3JXPf.js} +1 -1
- package/web/assets/{chunk-TU62E6Q5-Di5_cwgX.js → chunk-TU62E6Q5-e2yCDokg.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-B_JAqY4C.js → chunk-XXDRQBXY-DU6jFvHG.js} +1 -1
- package/web/assets/{classDiagram-v2-L25IHNXF-DB3TN6Gr.js → classDiagram-v2-L25IHNXF-Bt1zi6CS.js} +1 -1
- package/web/assets/{codemirror-C1bYpAmx.js → codemirror-CNxAt-Eg.js} +1 -1
- package/web/assets/{codemirrorImages-MC8VsJDU.js → codemirrorImages-C30a2wIG.js} +1 -1
- package/web/assets/{cose-bilkent-JH36ORCC-CSfL8Y8l.js → cose-bilkent-JH36ORCC-CYITjt4m.js} +1 -1
- package/web/assets/{cynefin-EF2NZ3EQ-Dav5gSV6.js → cynefin-EF2NZ3EQ-BiYmPyip.js} +1 -1
- package/web/assets/{cynefinDiagram-L36ESFBY-D7UuGAHO.js → cynefinDiagram-L36ESFBY-DiITK0W-.js} +1 -1
- package/web/assets/{dagre-SPEB5RXH-C45VrWYv.js → dagre-SPEB5RXH-BnOvnJrY.js} +1 -1
- package/web/assets/{diagram-3B7GL73J-DCOSOr3V.js → diagram-3B7GL73J-DnFw5yRA.js} +1 -1
- package/web/assets/{diagram-DNEMPZML-DYbsw7Q0.js → diagram-DNEMPZML-CLe-W-8E.js} +1 -1
- package/web/assets/{diagram-L3MUGCDN-Cf1adeNh.js → diagram-L3MUGCDN-xhFV1YT8.js} +1 -1
- package/web/assets/{diagram-LA4NIPWU-dsheOSjV.js → diagram-LA4NIPWU-S58Cgi0K.js} +1 -1
- package/web/assets/{diagram-MHCOC4E2-D8QLy-br.js → diagram-MHCOC4E2-fbSbD-Tu.js} +1 -1
- package/web/assets/{diagram-XPFHEONP-BIwbvAS3.js → diagram-XPFHEONP-C3K_xR1q.js} +1 -1
- package/web/assets/{ebnfDiagram-UZSYDL2S-Dfno1buw.js → ebnfDiagram-UZSYDL2S-BG_udZa4.js} +1 -1
- package/web/assets/{elk-XV6XMXQE-CPTpYM05.js → elk-XV6XMXQE-DE6K1qve.js} +1 -1
- package/web/assets/{erDiagram-EYBAPDEH-DIIeNZoS.js → erDiagram-EYBAPDEH-xkeusKpC.js} +1 -1
- package/web/assets/{flowDiagram-MALGAFMO-Dv_SGxd_.js → flowDiagram-MALGAFMO-OisK-T0f.js} +1 -1
- package/web/assets/{ganttDiagram-23REXITY-BVj7_X-p.js → ganttDiagram-23REXITY-DmQVS3ZV.js} +1 -1
- package/web/assets/{gitGraphDiagram-STJD7YCW-Dida84g9.js → gitGraphDiagram-STJD7YCW-Cll-SkVb.js} +1 -1
- package/web/assets/{index-CCcMvPPM.js → index-B2l2owfY.js} +1 -1
- package/web/assets/{index-D19W3mPS.js → index-BTQSusTZ.js} +1 -1
- package/web/assets/{index-6VtLhZfr.js → index-B_jwjnO_.js} +1 -1
- package/web/assets/{index-D2m7bnfK.js → index-Bta4Smbo.js} +1 -1
- package/web/assets/{index-BXS87hWE.js → index-BzBiXh1K.js} +1 -1
- package/web/assets/index-C0GRVSmD.css +1 -0
- package/web/assets/{index-3swuCbjs.js → index-CJzQgsOc.js} +1 -1
- package/web/assets/index-CM1F7OtV.js +172 -0
- package/web/assets/{index-DqN3Yjn2.js → index-CUm9rUfI.js} +1 -1
- package/web/assets/{index-BrzBT7tX.js → index-CXbAKkq5.js} +1 -1
- package/web/assets/{index-DObAlG3d.js → index-CYTyvY7n.js} +1 -1
- package/web/assets/{index-CrIvEt3W.js → index-CcKihMD9.js} +1 -1
- package/web/assets/{index-DEQgVEIp.js → index-CkV2xkfY.js} +1 -1
- package/web/assets/{index-D3KJ44QL.js → index-CkpIGiUh.js} +1 -1
- package/web/assets/{index-Cec-XFvp.js → index-D5xJiVmD.js} +1 -1
- package/web/assets/{index-DPlaluO4.js → index-DM3T56Jf.js} +1 -1
- package/web/assets/{index-CSlP1EYA.js → index-DXCiYt0O.js} +1 -1
- package/web/assets/{index-QlFQPxZP.js → index-Zq9V5ZB9.js} +1 -1
- package/web/assets/{index-rnuYD-5b.js → index-cu8Fcww3.js} +1 -1
- package/web/assets/{index-BBJdr5JT.js → index-fF3dLvWP.js} +1 -1
- package/web/assets/{index-6ji44meo.js → index-qOoKNKZw.js} +1 -1
- package/web/assets/{infoDiagram-KBXO4MBG-TDow-d_4.js → infoDiagram-KBXO4MBG-CFnvxUDW.js} +1 -1
- package/web/assets/{ishikawaDiagram-M35NCXHK-CLbrSa1y.js → ishikawaDiagram-M35NCXHK-CjJXkiZb.js} +1 -1
- package/web/assets/{journeyDiagram-OPLOXDXO-p3kvT_Eo.js → journeyDiagram-OPLOXDXO-CYBHLPC5.js} +1 -1
- package/web/assets/{kanban-definition-BZKZHSQY-pNNn3NfD.js → kanban-definition-BZKZHSQY-BzNwzCFX.js} +1 -1
- package/web/assets/{mermaid.core-DjpUkD1z.js → mermaid.core-CFBl9TP8.js} +4 -4
- package/web/assets/{mindmap-definition-I2QAS2VK-BqPuqnfQ.js → mindmap-definition-I2QAS2VK-X8WzviFV.js} +1 -1
- package/web/assets/{pegDiagram-FD4XPPHP-BeVWcZMC.js → pegDiagram-FD4XPPHP-kvO-a_98.js} +1 -1
- package/web/assets/{pieDiagram-J4AKIIQI-DqXZUVHj.js → pieDiagram-J4AKIIQI-BEiN8l-e.js} +1 -1
- package/web/assets/{quadrantDiagram-XTYBLID2-CUwRsDjZ.js → quadrantDiagram-XTYBLID2-Cf-t2xpS.js} +1 -1
- package/web/assets/{railroadDiagram-MRQ6NCDL-BzrKPnp_.js → railroadDiagram-MRQ6NCDL-Bou3xfYm.js} +1 -1
- package/web/assets/{requirementDiagram-Y7LWUY3S-DxRAPAAb.js → requirementDiagram-Y7LWUY3S-Ch1ghejU.js} +1 -1
- package/web/assets/{sankeyDiagram-WGJFYUXA-Bf96cqWy.js → sankeyDiagram-WGJFYUXA-DCjH5hxL.js} +1 -1
- package/web/assets/{sequenceDiagram-5NDRBG5M-COUQWvkl.js → sequenceDiagram-5NDRBG5M-DrspJAAy.js} +1 -1
- package/web/assets/{sizeCapture-INFHLROL-CnDTd2qA.js → sizeCapture-INFHLROL-BpOJNwe1.js} +1 -1
- package/web/assets/{stateDiagram-v2-FJ4FJNEA-Be14yvtF.js → stateDiagram-v2-FJ4FJNEA-RkYUtnsy.js} +1 -1
- package/web/assets/{swimlanes-UMQ2AFYF-BgwhOIJf.js → swimlanes-UMQ2AFYF-BR4cicEg.js} +1 -1
- package/web/assets/swimlanesDiagram-OMPLPG4O-DGwvhioW.js +8 -0
- package/web/assets/{timeline-definition-SEUHKTQE-DrzXj456.js → timeline-definition-SEUHKTQE-Bq2VoDLH.js} +1 -1
- package/web/assets/{usecaseDiagram-AFA6YXN4-Ptp1a8ek.js → usecaseDiagram-AFA6YXN4-BsB6aBKf.js} +1 -1
- package/web/assets/{vennDiagram-NNMJR3RB-84pzw-p8.js → vennDiagram-NNMJR3RB-8pOZirDr.js} +1 -1
- package/web/assets/{wardleyDiagram-S7YFUSEH-GlcuH79W.js → wardleyDiagram-S7YFUSEH-Dx-je9ls.js} +1 -1
- package/web/assets/{xychartDiagram-GGNKY7IX-CyOLgTKD.js → xychartDiagram-GGNKY7IX-mpETY7ui.js} +1 -1
- package/web/index.html +2 -2
- package/web/assets/MarkdownTextEditor-Dt2Iu87I.js +0 -60
- package/web/assets/index-BlgH7sOz.css +0 -1
- package/web/assets/index-DPTOk3jB.js +0 -166
- package/web/assets/swimlanesDiagram-OMPLPG4O-BvICHG_z.js +0 -8
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as We}from"./chunk-KS47KZWR-DLIoy_uq.js";import{c as Xe,d as $e}from"./chunk-KQLB2F66-DTEa-Nv0.js";import{_ as h,o as je,ax as ze,ay as Ct,ai as Ye,az as Ke}from"./mermaid.core-DjpUkD1z.js";import"./index-DPTOk3jB.js";import"./graph-Bn3Yngep.js";import"./_commonjsHelpers-CqkleIqs.js";class Ve{constructor(){throw new Error("Раскладка ELK в ccv недоступна — уберите layout: elk из диаграммы")}}var ht=h((t,e,{parentById:n})=>{const r=new Set;let s=t;if(t===e)return n[t]||"root";for(;s;){if(r.add(s),s===e)return s;s=n[s]}for(s=e;s;){if(r.has(s))return s;s=n[s]}return"root"},"findCommonAncestor"),Je="root";function q(t,e,{parentById:n}){let r=t;for(;(n[r]??Je)!==e;)r=n[r];return r}h(q,"childOnPath");function Bt(t,e){const n=t.map(()=>!1),r=new Map;t.forEach(({source:s,target:i},o)=>{if(s===i)return;const a=ht(s,i,e);if(a===s||a===i)return;const u=q(s,a,e),c=q(i,a,e),f=r.get(a)??[];f.push({index:o,from:u,to:c,collapsed:u!==s||c!==i}),r.set(a,f)});for(const s of r.values()){const i=new Map,o=[],a=new Map;for(const l of s){for(const g of[l.from,l.to])i.has(g)||(i.set(g,[]),o.push(g),a.set(g,0));i.get(l.from).push(l),a.set(l.to,a.get(l.to)+1)}const u=1,c=2,f=new Map,d=[...o.filter(l=>a.get(l)===0),...o];for(const l of d){if(f.has(l))continue;f.set(l,u);const g=[{node:l,next:0}];for(;g.length>0;){const m=g[g.length-1],E=i.get(m.node);if(m.next>=E.length){f.set(m.node,c),g.pop();continue}const y=E[m.next++],p=f.get(y.to);p===u?n[y.index]=y.collapsed:p===void 0&&(f.set(y.to,u),g.push({node:y.to,next:0}))}}}return n}h(Bt,"findSubgraphFeedbackEdges");function Q(t,e,{parentById:n}){let r=n[t];for(;r!==void 0;){if(r===e)return!0;r=n[r]}return!1}h(Q,"isInside");function Gt(t,e){const n=t.map((r,s)=>s);return t.forEach(({source:r,target:s},i)=>{const o=n.indexOf(i),a=n.findIndex((u,c)=>{const f=t[u];return c<o&&(f.target===s&&Q(r,f.source,e)||f.source===r&&Q(s,f.target,e))});a!==-1&&(n.splice(o,1),n.splice(a,0,i))}),n}h(Gt,"orderNestedEdgeEnds");var qe=6;function Ft(t,{measure:e}){var s,i;const n=(i=(s=t.config)==null?void 0:s.elk)==null?void 0:i.lineHops;if(n===!1)return;const r=t.edges.filter(o=>Array.isArray(o.points)&&o.points.length>=2).map(o=>({id:o.id,points:o.points,curve:o.curve,arrowTypeStart:o.arrowTypeStart,arrowTypeEnd:o.arrowTypeEnd}));We(e.groups.edgePaths,r,{enabled:!0,jumpRadius:qe,jumpStyle:n==="gap"?"gap":"arc"})}h(Ft,"applyElkLineJumps");var Qe={},Ze={},tn={},en={},C=1,nn=10,D=h((t,e,n=.5)=>{const r=t.width/2,s=t.height/2,i=t.x-r,o=t.x+r,a=t.y-s,u=t.y+s,c=Math.abs(e.x-i)<=n&&e.y>=a-n&&e.y<=u+n,f=Math.abs(e.x-o)<=n&&e.y>=a-n&&e.y<=u+n,d=Math.abs(e.y-a)<=n&&e.x>=i-n&&e.x<=o+n,l=Math.abs(e.y-u)<=n&&e.x>=i-n&&e.x<=o+n;return c||f||d||l},"onBorder"),rn=h((t,e,n)=>{const r=t.x,s=t.y,i=Math.abs(r-n.x),o=t.width/2;let a=n.x<e.x?o-i:o+i;const u=t.height/2,c=Math.abs(e.y-n.y),f=Math.abs(e.x-n.x);if(Math.abs(s-e.y)*o>Math.abs(r-e.x)*u){const d=n.y<e.y?e.y-u-s:s-u-e.y;a=f*d/c;const l={x:n.x<e.x?n.x+a:n.x-f+a,y:n.y<e.y?n.y+c-d:n.y-c+d};return f===0&&(l.x=e.x),c===0&&(l.y=e.y),l}else{n.x<e.x?a=e.x-o-r:a=r-o-e.x;const d=c*a/f;let l=n.x<e.x?n.x+f-a:n.x-f+a,g=n.y<e.y?n.y+d:n.y-d;return f===0&&(l=e.x),c===0&&(g=e.y),{x:l,y:g}}},"intersection"),B=h((t,e)=>{const n=t.x,r=t.y,s=Math.abs(e.x-n),i=Math.abs(e.y-r),o=t.width/2,a=t.height/2;return s>=o||i>=a},"outsideNode"),sn=h((t,e,n=nn)=>{const r=Math.abs(e.x-t.x),s=Math.abs(e.y-t.y),i=t.width/2,o=t.height/2;if(Math.abs(r-i)<C||Math.abs(s-o)<C){const a=e.x-t.x,u=e.y-t.y,c=Math.sqrt(a*a+u*u);if(c>0)return{x:t.x+a/c*(c+n),y:t.y+u/c*(c+n)}}return e},"ensureTrulyOutside"),on=h((t,e,n)=>{const r=Math.abs(e.x-t.x)<C,s=Math.abs(e.y-t.y)<C;return{x:r?e.x:e.x<t.x?t.x-t.width/4:t.x+t.width/4,y:s?e.y:n.y}},"makeInsidePoint"),an=h((t,e,n)=>{if(!(t!=null&&t.intersect))return null;const r=t.intersect(n);return!r||n.x<e.x&&r.x>e.x||n.x>e.x&&r.x<e.x||Math.hypot(n.x-r.x,n.y-r.y)<=C?null:r},"tryNodeIntersect"),cn=h((t,e,n)=>{const r=on(t,e,n);return rn(t,e,r)},"fallbackIntersection"),ln=20,_t=1e-6,K=h((t,e,n)=>{var o;const r=(o=t.intersect)==null?void 0:o.call(t,n);if(!r)return!1;const s=Math.hypot(n.x-e.x,n.y-e.y),i=Math.hypot(r.x-e.x,r.y-e.y);return s<=i+1e-9},"insideOutline"),un=h((t,e,n,r)=>{if(!(t!=null&&t.intersect))return null;const s=r.x-n.x,i=r.y-n.y;if(s===0&&i===0||Math.abs(s)>_t&&Math.abs(i)>_t)return null;const o={x:e.x,y:e.y},a=Math.abs(s)>Math.abs(i),u=h(d=>a?{x:d,y:n.y}:{x:n.x,y:d},"along");let c=a?o.x:o.y,f=a?n.x:n.y;if(!K(t,o,u(c)))return null;if(K(t,o,u(f)))return{...n};for(let d=0;d<ln;d++){const l=(c+f)/2;K(t,o,u(l))?c=l:f=l}return u(c)},"outlineAttachPoint"),U=h((t,e,n,r)=>{const s=sn(e,n);return an(t,e,s)??cn(e,s,r)},"computeNodeIntersection"),H=h((t,e,n,r=.1)=>{if(!(!n||t.length===0))if(e==="start")t.length>0&&Math.abs(t[0].x-n.x)<r&&Math.abs(t[0].y-n.y)<r?t.shift():t[0]=n;else{const s=t.length-1;t.length>0&&Math.abs(t[s].x-n.x)<r&&Math.abs(t[s].y-n.y)<r?t.pop():t[s]=n}},"replaceEndpoint"),Ut=8,Ht=h(t=>typeof t!="string"?0:Math.max(Ye[t]??0,Ke[t]??0),"markerPathOffset"),Tt={arrow_open:["none","none"],arrow_cross:["none","arrow_cross"],double_arrow_cross:["arrow_cross","arrow_cross"],arrow_point:["none","arrow_point"],double_arrow_point:["arrow_point","arrow_point"],arrow_circle:["none","arrow_circle"],double_arrow_circle:["arrow_circle","arrow_circle"]},R=12,Wt=`[top=${R},left=${R},bottom=${R},right=${R}]`,M=24,Xt=24,$t=50,N=15,L=10,ft={"spacing.baseValue":15,"spacing.nodeNode":15,"elk.aspectRatio":"1.6","elk.expandNodes":"true","elk.rectpacking.trybox":"true","elk.rectpacking.packing.compaction.rowHeightReevaluation":"true","elk.rectpacking.packing.compaction.iterations":10,"elk.rectpacking.whiteSpaceElimination.strategy":"EQUAL_BETWEEN_STRUCTURES","elk.rectpacking.widthApproximation.strategy":"SCANLINE"},hn=["nodeSize.constraints","nodeSize.minimum","elk.algorithm","elk.aspectRatio","elk.contentAlignment","elk.expandNodes","elk.padding",...Object.keys(ft)];function jt(t){for(const e of hn)delete t[e];t["spacing.baseValue"]=Xt,t["spacing.nodeNode"]=$t}h(jt,"clearContainerAlgorithmOptions");var Dt=new Set(["elk.layered","elk.box","elk.rectpacking","elk.stress","elk.force","elk.mrtree","elk.radial","elk.sporeOverlap"]);function dt(t,e){if(typeof t=="string"){if(!Dt.has(t)){e==null||e.warn(`Unknown container layout algorithm "${t}". Supported values: ${[...Dt].join(", ")}. Falling back to the diagram's layout algorithm.`);return}return t}}h(dt,"resolveContainerAlgorithm");function gt(t){switch(t){case"LR":return"RIGHT";case"RL":return"LEFT";case"TB":case"TD":return"DOWN";case"BT":return"UP";default:return"DOWN"}}h(gt,"dir2ElkDirection");function j(t){var e,n,r;return Ct(t.shape)?(((e=t.labelData)==null?void 0:e.width)??((r=(n=t.labels)==null?void 0:n[0])==null?void 0:r.width)??0)+(t.padding??0):0}h(j,"groupTitleWidth");function yt(t){return Ct(t.shape)?{"nodeSize.constraints":"[MINIMUM_SIZE, NODE_LABELS]","nodeSize.minimum":`(${j(t)}, 0)`}:{}}h(yt,"groupTitleSizeOptions");function zt(t,e,n,r){var d,l,g;const s=((d=t.labelData)==null?void 0:d.width)??0,i=t.padding??0,o=s+2*i,a=((l=t.labelData)==null?void 0:l.height)??0,u=xt(e==null?void 0:e.preset),c={...yt(t),"spacing.baseValue":Xt,"elk.layered.spacing.edgeNodeBetweenLayers":30,"elk.spacing.edgeEdge":20,"spacing.nodeNode":$t,"elk.padding":`[top=${M},left=${M},bottom=${M},right=${M}]`,"nodeLabels.placement":"[H_CENTER V_TOP, INSIDE]","elk.layered.mergeEdges":e==null?void 0:e.mergeEdges,"elk.layered.nodePlacement.bk.fixedAlignment":(e==null?void 0:e.nodePlacementAlignment)??u.alignment,"elk.layered.nodePlacement.strategy":(e==null?void 0:e.nodePlacementStrategy)??u.containerPlacement,"elk.layered.cycleBreaking.strategy":(e==null?void 0:e.cycleBreakingStrategy)??u.cycleBreaking,"elk.layered.nodePlacement.networkSimplex.nodeFlexibility":"PORT_POSITION","elk.spacing.portsSurrounding":Wt},f=dt((g=t.metadata)==null?void 0:g.algorithm,r);if(f){const m=a+N;if(c["nodeSize.constraints"]="[MINIMUM_SIZE, NODE_LABELS]",c["nodeSize.minimum"]=`(${o}, ${m+N})`,c["elk.algorithm"]=f,c["elk.hierarchyHandling"]="SEPARATE_CHILDREN",c["elk.aspectRatio"]="2.0",c["elk.contentAlignment"]="H_CENTER V_TOP",c["elk.expandNodes"]="true",c["elk.padding"]=`[top=${m},left=${N},bottom=${N},right=${N}]`,f==="elk.rectpacking"){const E=a+L;Object.assign(c,ft,{"elk.padding":`[top=${E},left=${L},bottom=${L},right=${L}]`,"nodeSize.minimum":`(${o}, ${E+L})`})}}else t.dir&&(c["elk.algorithm"]=n,c["elk.direction"]=gt(t.dir),c["elk.hierarchyHandling"]="SEPARATE_CHILDREN");return Object.assign(c,en),c}h(zt,"buildSubgraphLayoutOptions");function Yt(t,e){const n=new Set,r=new Map;for(const{id:s,parentId:i}of t){const o=r.get(i);o?o.push(s):r.set(i,[s])}for(const s of r.values()){const i=new Set(s),o=new Map(s.map(y=>[y,0])),a=new Map(s.map(y=>[y,[]])),u=[];for(const y of e){const p=y.source==null?void 0:String(y.source),x=y.target==null?void 0:String(y.target);!p||!x||p===x||!i.has(p)||!i.has(x)||(o.set(x,(o.get(x)??0)+1),a.get(p).push(x),a.get(x).push(p),u.push([p,x]))}const c=new Map;let f=0;for(const y of s){if(c.has(y))continue;const p=[y];for(c.set(y,f);p.length>0;){const x=p.pop();for(const w of a.get(x))c.has(w)||(c.set(w,f),p.push(w))}f++}const d=new Array(f).fill(!1);for(const y of s)(o.get(y)??0)===0&&(d[c.get(y)]=!0);if(!d.includes(!1))continue;const l=new Map(s.map(y=>[y,[]])),g=new Map(s.map(y=>[y,0])),m=h((y,p)=>{const x=new Set([y]),w=[y];for(;w.length>0;){const k=w.pop();if(k===p)return!0;for(const b of l.get(k))x.has(b)||(x.add(b),w.push(b))}return!1},"reaches");for(const[y,p]of u)m(p,y)||(l.get(y).push(p),g.set(p,(g.get(p)??0)+1));const E=new Array(f).fill(!1);for(const y of s){const p=c.get(y);!d[p]&&!E[p]&&g.get(y)===0&&(n.add(y),E[p]=!0)}}return n}h(Yt,"findCyclicEntryNodes");function Kt(t,e){var r;if(!((r=t.config.elk)!=null&&r.keepEntryNodeOnTop))return;const n=Yt(t.nodes,t.edges.map(s=>({source:s.start,target:s.end})));for(const s of n){const i=e[s];i&&(i.layoutOptions={...i.layoutOptions,"elk.layered.layering.layerConstraint":"FIRST"})}}h(Kt,"applyCyclicEntryConstraint");function Vt(t,e){const n=pt(e);return te(n),Le(t,n),{algorithm:n.algorithm}}h(Vt,"prepareLayoutForElk");async function Jt(t,e){const n=pt(e),r=qt(t,n),s=new Ve;n.log.info("Drawing flowchart using v4 renderer",s);const i=await fe(s,r.elkGraph,n.log);return de(t,i,r,n.log),ee(t.nodes),i}h(Jt,"runElkLayoutCore");function qt(t,e){var o;const n={},r=ne(t,e.algorithm,e.rootLayoutOptions),s=t.direction??"DOWN";r.layoutOptions["elk.direction"]=gt(s);const i=re(t.nodes,e.log);return mt(t.nodes,r,n,e),ae(t,r,n,e),ue(t,n,i,e),he(r,n,i,e.log),((o=t.config.elk)==null?void 0:o.orientFeedbackEdges)!==!1&&Qt(r,i),Zt(r,i),Kt(t,n),{elkGraph:r,nodeDb:n,parentLookupDb:i}}h(qt,"buildElkGraphFromLayoutData");function Qt(t,e){const n=Bt(t.edges.map(r=>({source:r.sources[0],target:r.targets[0]})),e);t.edges.forEach((r,s)=>{n[s]&&([r.sources,r.targets]=[r.targets,r.sources],r.layoutReversed=!0)})}h(Qt,"reverseSubgraphFeedbackEdges");function Zt(t,e){const n=Gt(t.edges.map(r=>({source:r.sources[0],target:r.targets[0]})),e);t.edges=n.map(r=>t.edges[r])}h(Zt,"orderEdgesByNesting");var On=Xe({afterPaint:Ft,prepareLayout:Vt,measureLayout:h((t,e)=>$e(t,e,{unwrapGroupLabels:!0}),"measureLayout"),runLayoutCore:Jt,paintOptions:{skipIntersect:!0}});function te(t){je(t.getConfig())}h(te,"syncHostConfig");function ee(t){const e=new Map(t.map(n=>[n.id,n]));t.sort((n,r)=>n.isGroup!==r.isGroup?n.isGroup?-1:1:n.isGroup&&r.isGroup?Z(n,e)-Z(r,e):0)}h(ee,"orderNodesForElkPaint");function Z(t,e){let n=0;const r=new Set;let s=t.parentId;for(;s&&!r.has(s);){r.add(s);const i=e.get(s);if(!(i!=null&&i.isGroup))break;n++,s=i.parentId}return n}h(Z,"getGroupDepth");function pt(t){var n,r,s;const e=t.helpers;if(!e)throw new Error("ELK layout requires Mermaid internal helpers");return{algorithm:((n=t.preparedLayout)==null?void 0:n.algorithm)??((r=t.options)==null?void 0:r.algorithm),rootLayoutOptions:(s=t.options)==null?void 0:s.rootLayoutOptions,common:e.common,getConfig:e.getConfig,interpolateToCurve:e.interpolateToCurve,log:e.log}}h(pt,"getElkLayoutContext");var V={default:{layering:"NETWORK_SIMPLEX",placement:"BRANDES_KOEPF",containerPlacement:"BRANDES_KOEPF",alignment:"BALANCED",cycleBreaking:"DEPTH_FIRST"},legacy:{layering:"NETWORK_SIMPLEX",placement:"BRANDES_KOEPF",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"GREEDY"},modelOrder:{layering:"NETWORK_SIMPLEX",placement:"NETWORK_SIMPLEX",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"GREEDY_MODEL_ORDER"},depthFirst:{layering:"NETWORK_SIMPLEX",placement:"NETWORK_SIMPLEX",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"DEPTH_FIRST"}};function xt(t){return t!==void 0&&Object.hasOwn(V,t)?V[t]:V.default}h(xt,"resolveElkPreset");function ne(t,e,n){var i,o,a,u,c,f,d,l,g;const r=xt((i=t.config.elk)==null?void 0:i.preset),s={id:"root",layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.algorithm":e,"elk.layered.nodePlacement.strategy":((o=t.config.elk)==null?void 0:o.nodePlacementStrategy)??r.placement,"elk.layered.nodePlacement.bk.fixedAlignment":((a=t.config.elk)==null?void 0:a.nodePlacementAlignment)??r.alignment,"elk.layered.mergeEdges":(u=t.config.elk)==null?void 0:u.mergeEdges,"elk.direction":"DOWN","spacing.baseValue":40,"elk.layered.crossingMinimization.forceNodeModelOrder":(c=t.config.elk)==null?void 0:c.forceNodeModelOrder,"elk.layered.considerModelOrder.strategy":(f=t.config.elk)==null?void 0:f.considerModelOrder,"elk.layered.unnecessaryBendpoints":!0,"elk.layered.cycleBreaking.strategy":((d=t.config.elk)==null?void 0:d.cycleBreakingStrategy)??r.cycleBreaking,"elk.layered.layering.strategy":((l=t.config.elk)==null?void 0:l.layeringStrategy)??r.layering,"elk.layered.layering.coffmanGraham.layerBound":(g=t.config.elk)==null?void 0:g.layeringLayerBound,"elk.layered.wrapping.multiEdge.improveCuts":!0,"elk.layered.wrapping.multiEdge.improveWrappedEdges":!0,"elk.layered.edgeRouting.selfLoopDistribution":"EQUALLY","elk.layered.mergeHierarchyEdges":!0,"elk.spacing.portsSurrounding":Wt},children:[],edges:[]};return e==="elk.rectpacking"&&Object.assign(s.layoutOptions,ft,{"elk.contentAlignment":"H_CENTER V_TOP","elk.padding":"[top=15,left=15,bottom=15,right=15]"}),n&&Object.assign(s.layoutOptions,n),Object.assign(s.layoutOptions,Qe,Ze,tn),s}h(ne,"createRootElkGraph");function re(t,e){const n={parentById:{},childrenById:{}},r=t.filter(s=>s.isGroup);return e.info("Subgraphs - ",r),r.forEach(s=>{t.filter(o=>o.parentId===s.id).forEach(o=>{var a,u;n.parentById[o.id]=s.id,(a=n.childrenById)[u=s.id]??(a[u]=[]),n.childrenById[s.id].push(o.id)})}),n}h(re,"addSubGraphs");function mt(t,e,n,r,s){const i=t.filter(o=>(o==null?void 0:o.parentId)===s);return r.log.info("addVertices APA12",i,s),i.forEach(o=>{se(e,t,o,n,r)}),e}h(mt,"addVertices");function se(t,e,n,r,s){const i=ie(n);t.children.push(i),r[n.id]=i,n.isGroup&&(i.children=[],mt(e,i,r,s,n.id),i.labelData=oe(n,s.getConfig()))}h(se,"addVertex");function ie(t){const e={...t};return delete e.domId,t.isGroup?e.children=[]:(e.width=t.width??0,e.height=t.height??0,t.spreadPorts&&(e.layoutOptions={...e.layoutOptions,"elk.portAlignment.default":"CENTER"})),e}h(ie,"createElkNode");function oe(t,e){var r,s;const n=t.labelData;return n||(t.labelBBox?{width:t.labelBBox.width,height:Math.max(0,t.labelBBox.height-2),wrappingWidth:t.wrappingWidth??((r=e.flowchart)==null?void 0:r.wrappingWidth)}:{width:0,height:0,wrappingWidth:t.wrappingWidth??((s=e.flowchart)==null?void 0:s.wrappingWidth)})}h(oe,"getMeasuredLabelData");function ae(t,e,n,r){r.log.info("abc78 DAGA edges = ",t);const s={};return t.edges.forEach(i=>{var l;const o=i.id;s[o]=(s[o]??-1)+1;const a=o;i.id=a,r.log.info("abc78 new link id to be used is",o,a,s[o]);const{source:u,target:c,sourceId:f,targetId:d}=le(i,n);r.log.debug("abc78 source and target",u,c),e.edges.push({...i,sources:[u],targets:[c],sourceId:f,targetId:d,labels:[{width:i.width??0,height:i.height??0,orgWidth:i.width??0,orgHeight:i.height??0,text:i.label??"",layoutOptions:{"edgeLabels.inline":"true","edgeLabels.placement":"CENTER"}},...(((l=r.rootLayoutOptions)==null?void 0:l["elk.algorithm"])??r.algorithm??"elk.layered")==="elk.layered"?ce(i):[]]})}),e}h(ae,"addEdgesToElkGraph");var fn=6;function ce(t){const e={startLeft:t.startLabelLeft,startRight:t.startLabelRight,endLeft:t.endLabelLeft,endRight:t.endLabelRight};return Object.entries(t.terminalLabelSizes??{}).map(([n,r])=>{const s=n.startsWith("start"),i=s?t.arrowTypeStart:t.arrowTypeEnd,o=i&&i!=="none"?fn:0;return{terminal:n,text:e[n],width:r.width+2*o,height:r.height+2*o,layoutOptions:{"edgeLabels.placement":s?"TAIL":"HEAD"}}})}h(ce,"terminalElkLabels");function le(t,e){const n=t.start,r=t.end,s=n,i=r,o=n?e[n]:void 0,a=r?e[r]:void 0;return!o||!a?{source:s,target:i}:{source:s,target:i,sourceId:n,targetId:r}}h(le,"getEdgeStartEndPoint");function ue(t,e,n,r){t.nodes.forEach(s=>{var o,a,u;const i=e[s.id];!i||n.childrenById[i.id]===void 0||(i.labels=[{text:i.label,width:((o=i==null?void 0:i.labelData)==null?void 0:o.width)??50,height:((a=i==null?void 0:i.labelData)==null?void 0:a.height)??50}],r.log.debug("UIO node label",(u=i==null?void 0:i.labelData)==null?void 0:u.width,i.padding),i.layoutOptions=zt(i,t.config.elk,r.algorithm,r.log),delete i.x,delete i.y,delete i.width,delete i.height)})}h(ue,"configureSubgraphNodes");function he(t,e,n,r){r.debug("APA01 processing edges, count:",t.edges.length),t.edges.forEach((s,i)=>{r.debug("APA01 processing edge",i,":",s);const o=s.sources[0],a=s.targets[0];if(r.debug("APA01 source:",o,"target:",a),r.debug("APA01 nodeDb[source]:",e[o]),r.debug("APA01 nodeDb[target]:",e[a]),e[o]&&e[a]&&e[o].parentId!==e[a].parentId){const u=ht(o,a,n);W(e,o,u,r),W(e,a,u,r)}})}h(he,"configureCrossHierarchyEdges");function W(t,e,n,r){var i;const s=t[e];s&&(s.layoutOptions??(s.layoutOptions={}),s.layoutOptions["elk.hierarchyHandling"]==="SEPARATE_CHILDREN"&&dt((i=s.metadata)==null?void 0:i.algorithm)&&(r.debug("Dropping explicit algorithm for node",s.id,"due to cross-boundary edges"),jt(s.layoutOptions),Object.assign(s.layoutOptions,yt(s))),s.layoutOptions["elk.hierarchyHandling"]="INCLUDE_CHILDREN",s.id!==n&&s.parentId&&W(t,s.parentId,n,r))}h(W,"setIncludeChildrenPolicy");async function fe(t,e,n){const r=globalThis.__mermaidProfiler;try{r==null||r.begin("layoutCore");let s;try{s=await t.layout(e)}finally{r==null||r.end()}return n.debug("APA01 after - success"),n.debug("APA01 layout result:",s),s}catch(s){throw n.error("ELK layout error:",s),s}}h(fe,"runElkLayout");function de(t,e,n,r){const s=new Map(t.nodes.map(i=>[i.id,i]));wt(e.children??[],n,s,0,0,0,r),bt(e.children??[],n,s,e),Ee(t,e,n,r)}h(de,"applyElkLayoutResult");function Et(t,e=new Set){for(const n of t.children??[])e.add(n.id),Et(n,e);return e}h(Et,"collectDescendantIds");function ge(t,e,n,r){var i,o;const s=[];for(const a of t.edges??[]){const u=((i=a.sources)==null?void 0:i[0])??a.start,c=((o=a.targets)==null?void 0:o[0])??a.end,f=e.has(u)&&e.has(c),d=u===r,l=c===r;if(!f&&!d&&!l)continue;const g=$(u,c,n.parentLookupDb,n.nodeDb);for(const m of a.sections??[]){const E=f?[m.startPoint,...m.bendPoints??[],m.endPoint]:[d?m.startPoint:null,l?m.endPoint:null];for(const y of E)y&&s.push({x:y.x+g.x,y:y.y+g.y})}}return s}h(ge,"internalEdgePoints");function bt(t,e,n,r={}){for(const s of t){if(!(s!=null&&s.isGroup))continue;const i=s.children??[];bt(i,e,n,r);const o=e.nodeDb[s.id],a=i.map(b=>e.nodeDb[b.id]).filter(b=>(b==null?void 0:b.offset)&&b.width&&b.height);if(!(o!=null&&o.offset)||a.length===0)continue;const u=ge(r,Et(s),e,s.id),c=[...a.map(b=>b.offset.posX),...a.map(b=>b.offset.posX+b.width),...u.map(b=>b.x)],f=[...a.map(b=>b.offset.posY),...a.map(b=>b.offset.posY+b.height),...u.map(b=>b.y)],d=o.offset,l=Math.max(d.posX,Math.min(...c)-M),g=Math.min(d.posX+o.width,Math.max(...c)+M),m=Math.min(d.posY+o.height,Math.max(...f)+M),E=d.posY,y=j(s);let p=l,x=g-l;if(x<y){p-=(y-x)/2,x=y;const b=d.posX+o.width;p=Math.max(d.posX,Math.min(p,b-x)),x=Math.min(x,o.width)}const w=m-E;if(w<=0||x<=0)continue;o.elkOrigin??(o.elkOrigin={posX:d.posX,posY:d.posY}),o.offset.posX=p,o.offset.width=x,o.offset.height=w,o.width=x,o.height=w,o.x=p+x/2,o.y=E+w/2;const k=n.get(s.id);k&&(k.x=o.x,k.y=o.y,k.width=x,k.height=w)}}h(bt,"evenGroupFrames");function wt(t,e,n,r,s,i,o){t.forEach(a=>{var l,g;if(!a)return;const u=e.nodeDb[a.id]??a,c=Math.max(a.width,a.labels&&((l=a.labels[0])==null?void 0:l.width)||0),f={posX:a.x+r,posY:a.y+s,x:r,y:s,depth:i,width:c,height:a.height};u.offset=f,u.x=f.posX+a.width/2,u.y=f.posY+a.height/2,u.width=a.width,u.height=a.height;const d=n.get(a.id);if(d){d.x=u.x,d.y=u.y,d.width=a.isGroup?Math.max(a.width,((g=a.labelData)==null?void 0:g.width)??0):a.width,d.height=a.height;const m=d;m.labelData=a.labelData,m.labels=a.labels}a.isGroup?(o.debug("Id abc88 subgraph = ",a.id,a.x,a.y,a.labelData),wt(a.children??[],e,n,f.posX,f.posY,i+1,o)):o.info("Id NODE = ",a.id,a.x,a.y,r,s,`translate(${u.x}, ${u.y})`)})}h(wt,"applyElkNodePositions");var dn=16,gn=30,_=.01;function T(t,e){const n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);if(n>_&&r<=_)return"h";if(r>_&&n<=_)return"v"}h(T,"axisOf");function ye(t){const e=[];let n=t;const r=tt(n);r&&(n=r.points,e.push(r.run));const s=[...n].reverse(),i=tt(s);return i&&(n=i.points.reverse(),e.push(i.run)),{points:n,runs:e}}h(ye,"straightenTerminalJogsWithRuns");function tt(t){if(t.length<5)return null;const[e,n,r,s]=t,i=T(e,n);if(!i||T(r,s)!==i||T(n,r)!==(i==="h"?"v":"h")||Math.hypot(n.x-e.x,n.y-e.y)>gn)return null;const o=Math.abs(i==="h"?r.y-n.y:r.x-n.x);if(o<_||o>dn||!(i==="h"?Math.sign(n.x-e.x)===Math.sign(s.x-r.x):Math.sign(n.y-e.y)===Math.sign(s.y-r.y)))return null;let u=3;for(;u+1<t.length&&T(t[u],t[u+1])===i;)u++;if(u===t.length-1)return null;const c=[...t];for(let d=2;d<=u;d++)c[d]=i==="h"?{x:t[d].x,y:e.y}:{x:e.x,y:t[d].y};const f={old:{a:t[2],b:t[u]},new:{a:c[2],b:c[u]}};return c.splice(1,2),{points:c,run:f}}h(tt,"straightenFront");function pe(t,e,n,r){const s=h((c,f,d)=>(f.x-c.x)*(d.y-c.y)-(f.y-c.y)*(d.x-c.x),"side"),i=s(n,r,t),o=s(n,r,e),a=s(t,e,n),u=s(t,e,r);return(i>0&&o<0||i<0&&o>0)&&(a>0&&u<0||a<0&&u>0)}h(pe,"segmentsCrossStrict");function et(t,e){let n=0;for(let r=0;r<t.length-1;r++)for(let s=0;s<e.length-1;s++)pe(t[r],t[r+1],e[s],e[s+1])&&n++;return n}h(et,"crossingCount");function xe(t,e,n){const r=n.x-e.x,s=n.y-e.y,i=r*r+s*s;return i===0?0:Math.max(0,Math.min(1,((t.x-e.x)*r+(t.y-e.y)*s)/i))}h(xe,"paramOnSegment");function nt(t,e,n){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}h(nt,"pointAtParam");function kt(t,e){let n=null;for(const r of e){const s=xe(t,r.old.a,r.old.b),i=nt(r.old.a,r.old.b,s),o=i.x-t.x,a=i.y-t.y,u=o*o+a*a;(!n||u<n.distSq)&&(n={distSq:u,point:nt(r.new.a,r.new.b,s)})}return(n==null?void 0:n.point)??null}h(kt,"projectLabelOntoStraightenedRun");function X(t,e,n){let r=0,s=1;const i=e.x-t.x,o=e.y-t.y;for(const[a,u]of[[-i,t.x-n.x1],[i,n.x2-t.x],[-o,t.y-n.y1],[o,n.y2-t.y]])if(a===0){if(u<0)return!1}else a<0?r=Math.max(r,u/a):s=Math.min(s,u/a);return r<s}h(X,"segmentHitsBox");var v=h((t,e)=>({x1:t.x-e.width/2,y1:t.y-e.height/2,x2:t.x+e.width/2,y2:t.y+e.height/2}),"labelBox");function me(t){const e=t.map(i=>i.points??[]),n=t.map(i=>i.x==null||i.y==null||!i.label||!i.width||!i.height?void 0:{centre:{x:i.x,y:i.y},size:{width:i.width,height:i.height}}),r=h((i,o)=>{const a=o&&v(o.centre,o.size);return!!a&&i.some((u,c)=>c<i.length-1&&X(u,i[c+1],a))},"covers"),s=[];for(const[i,o]of t.entries()){const a=e[i];if(a.length<5)continue;const{points:u,runs:c}=ye(a);if(u===a)continue;const f=n[i],d=f&&kt(f.centre,c),l=f&&d?{centre:d,size:f.size}:f;let g=0,m=0,E=0,y=0;for(const[p,x]of e.entries())p===i||x.length<2||(g+=et(a,x),m+=et(u,x),E+=Number(r(x,f))+Number(r(a,n[p])),y+=Number(r(x,l))+Number(r(u,n[p])));m>g||y>E||(o.points=u,e[i]=u,n[i]=l,s.push({edge:o,runs:c}))}return s}h(me,"straightenEdgeTerminals");function Ee(t,e,n,r){var c,f,d;const s=new Map(t.edges.map(l=>[l.id,l])),i=((c=t.config.elk)==null?void 0:c.straightenEdges)!==!1,o=new Map;for(const l of t.edges)delete l.terminalLabelCenters;const a=new Map(t.nodes.map(l=>[l.id,l])),u=new Set;if((f=e.edges)==null||f.forEach(l=>{var w,k,b,G,S;if(!((w=l.sections)!=null&&w.length))return;const g=n.nodeDb[((k=l.sources)==null?void 0:k[0])??l.start],m=n.nodeDb[((b=l.targets)==null?void 0:b[0])??l.end];if(!g||!m)return;const E=l.start??l.sourceId??((G=l.sources)==null?void 0:G[0]),y=l.end??l.targetId??((S=l.targets)==null?void 0:S[0]),p=$(E,y,n.parentLookupDb,n.nodeDb),x=l.sections[0];g.shape!=="rect33"&&rt(g,{x:x.startPoint.x+p.x,y:x.startPoint.y+p.y},a,u),m.shape!=="rect33"&&rt(m,{x:x.endPoint.x+p.x,y:x.endPoint.y+p.y},a,u)}),(d=e.edges)==null||d.forEach(l=>{var It,Mt,vt,At;const g=s.get(l.id);if(!g)return;const m=l.layoutReversed===!0;let E=((It=l.sources)==null?void 0:It[0])??l.start,y=((Mt=l.targets)==null?void 0:Mt[0])??l.end;m&&([E,y]=[y,E]);const p=n.nodeDb[E],x=n.nodeDb[y];if(!p||!x)return;if(!((vt=l.sections)!=null&&vt.length)){const O=h(A=>{var Lt,Rt;return{x:(((Lt=A.offset)==null?void 0:Lt.posX)??A.x??0)+(A.width??0)/2,y:(((Rt=A.offset)==null?void 0:Rt.posY)??A.y??0)+(A.height??0)/2}},"centre"),z=O(p),Y=O(x);p.x=z.x,p.y=z.y,x.x=Y.x,x.y=Y.y;const F=st([z,Y],p,x,r);g.points=F,g.curve="linear";const Pt=F[0],Nt=F[F.length-1];g.x=(Pt.x+Nt.x)/2,g.y=(Pt.y+Nt.y)/2,r.debug("APA18 no edge sections, using a straight line",l.id,g.points);return}const w=l.start??l.sourceId??E,k=l.end??l.targetId??y,b=$(w,k,n.parentLookupDb,n.nodeDb);r.debug("APA18 offset",b,w," ==> ",k,"edge:",l,p);const G=l.sections[0],S=Se(G,b);m&&S.reverse();const Ue={start:S[0],end:S[S.length-1]};p.x=p.offset.posX+p.width/2,p.y=p.offset.posY+p.height/2,x.x=x.offset.posX+x.width/2,x.y=x.offset.posY+x.height/2,p.shape!=="rect33"&&S.unshift({x:p.x,y:p.y}),x.shape!=="rect33"&&S.push({x:x.x,y:x.y});const He=st(S,p,x,r);g.points=Pe(Ne(He,I(x),ve(g),r),I(p),Ae(g),r),g.curve="rounded";const P=(At=l.labels)==null?void 0:At[0];P&&(g.x=P.x+b.x+P.width/2,g.y=P.y+b.y+P.height/2);for(const O of l.labels??[])!O.terminal||!O.x&&!O.y||(g.terminalLabelCenters??(g.terminalLabelCenters={}),g.terminalLabelCenters[O.terminal]={x:O.x+b.x+O.width/2,y:O.y+b.y+O.height/2});g.terminalLabelCenters&&o.set(g,Ue)}),i){const l=me(t.edges);for(const{edge:g,runs:m}of l){if(g.x==null||g.y==null)continue;const E=kt({x:g.x,y:g.y},m);E&&(g.x=E.x,g.y=E.y)}}for(const[l,g]of o)Oe(l,g);we(t.edges,t.nodes),ke(t.edges,t.nodes),be(t.edges)}h(Ee,"applyElkEdgeLayout");var yn=4;function be(t){const e=new Map;for(const n of t){if(n.x==null||n.y==null||!n.label||!n.width)continue;const r=[n.start??"",n.end??""].sort().join("\0"),s=e.get(r);s?s.push(n):e.set(r,[n])}for(const n of e.values()){if(n.length!==2)continue;const[r,s]=n;if(Math.abs(r.y-s.y)>Math.max(r.height??0,s.height??0))continue;const i=r.width/2+s.width/2+yn,o=s.x-r.x,a=i-Math.abs(o);if(a<=0)continue;const u=Math.sign(o)||1;r.x=r.x-u*a/2,s.x=s.x+u*a/2}}h(be,"separateOppositeEdgeLabels");var J=h((t,e)=>t.x1<e.x2&&e.x1<t.x2&&t.y1<e.y2&&e.y1<t.y2,"boxesOverlap");function Ot(t,e){const n=e.filter(c=>c.x!==void 0&&c.y!==void 0),r=h(c=>v({x:c.x,y:c.y},{width:c.width??0,height:c.height??0}),"boxOf"),s=n.filter(c=>!c.isGroup).map(r),i=n.filter(c=>c.isGroup).map(r).flatMap(({x1:c,y1:f,x2:d,y2:l})=>[[{x:c,y:f},{x:d,y:f}],[{x:d,y:f},{x:d,y:l}],[{x:d,y:l},{x:c,y:l}],[{x:c,y:l},{x:c,y:f}]]),o=t.filter(c=>c.label&&c.width&&c.height&&c.x!==void 0).map(c=>v({x:c.x,y:c.y},{width:c.width,height:c.height})),a=h((c,f=0)=>{const d={x1:c.x1-f,y1:c.y1-f,x2:c.x2+f,y2:c.y2+f};return i.some(([l,g])=>X(l,g,d))},"hitsFrame");return{hitsFrame:a,blocked:h((c,f,d,l,g=0)=>s.some(m=>J(c,m))||o.some(m=>J(c,m))||a(c,g)||t.some(m=>(m.points??[]).some((E,y,p)=>y<p.length-1&&!(m===f&&y===l)&&X(E,p[y+1],c)))||t.some(m=>Object.entries(m.terminalLabelCenters??{}).some(([E,y])=>{var x;const p=(x=m.terminalLabelSizes)==null?void 0:x[E];return!(m===f&&E===d)&&p!==void 0&&J(c,v(y,p))})),"blocked")}}h(Ot,"terminalLabelObstacles");function*St(t){for(const e of t){const n=e.points;if(!(!n||n.length<2||!e.terminalLabelCenters||!e.terminalLabelSizes))for(const[r,s]of Object.entries(e.terminalLabelCenters)){const i=e.terminalLabelSizes[r],o=r.startsWith("start"),a=o?0:n.length-2,[u,c]=[n[a],n[a+1]],f=Math.hypot(c.x-u.x,c.y-u.y);!i||f===0||(yield{edge:e,key:r,center:s,size:i,atStart:o,segment:a,from:u,to:c,length:f})}}}h(St,"placedTerminalLabels");var pn=2;function we(t,e){const{hitsFrame:n,blocked:r}=Ot(t,e);for(const{edge:s,key:i,center:o,size:a,atStart:u,segment:c,from:f,to:d,length:l}of St(t)){if(!n(v(o,a)))continue;const[g,m]=u?[d,f]:[f,d],E={x:(m.x-g.x)/l,y:(m.y-g.y)/l},y=(Math.abs(E.x)*a.width+Math.abs(E.y)*a.height)/2,p=h(w=>(w.x-m.x)*E.x+(w.y-m.y)*E.y,"along"),x=h(w=>p(w)+y<=0&&p(w)-y>=-l,"onSegment");for(let w=1;w<=l;w++){const k=[w,-w].map(b=>({x:o.x+b*E.x,y:o.y+b*E.y})).find(b=>x(b)&&!r(v(b,a),s,i,c,pn));if(k){s.terminalLabelCenters[i]=k;break}}}}h(we,"slideTerminalLabelsOffFrames");function ke(t,e){const{blocked:n}=Ot(t,e);for(const{edge:r,key:s,center:i,size:o,segment:a,from:u,to:c,length:f}of St(t)){const d={x:-(c.y-u.y)/f,y:(c.x-u.x)/f},l=(i.x-u.x)*d.x+(i.y-u.y)*d.y;if(l===0||l>0===s.endsWith("Right"))continue;const g={x:i.x-2*l*d.x,y:i.y-2*l*d.y};n(v(g,o),r,s,a)||(r.terminalLabelCenters[s]=g)}}h(ke,"putTerminalLabelsOnTheirSide");function Oe(t,e){const n=t.points;if(!(n!=null&&n.length)||!t.terminalLabelCenters)return;const r={start:{x:n[0].x-e.start.x,y:n[0].y-e.start.y},end:{x:n[n.length-1].x-e.end.x,y:n[n.length-1].y-e.end.y}};for(const[s,i]of Object.entries(t.terminalLabelCenters)){const o=s.startsWith("start")?r.start:r.end;t.terminalLabelCenters[s]={x:i.x+o.x,y:i.y+o.y}}}h(Oe,"followMovedEndpoints");function rt(t,e,n,r){const s=t.width??0,i=t.height??0,o=t.offset.posY,a=o+i,u=.5,c=Math.abs(e.y-o)<=u||Math.abs(e.y-a)<=u;if((c?s:i)>=2*R||r.has(t.id))return;r.add(t.id);const f=c?e.x-(t.offset.posX+s/2):e.y-(t.offset.posY+i/2);if(Math.abs(f)<.01)return;c?(t.offset.posX+=f,t.x=t.offset.posX+s/2):(t.offset.posY+=f,t.y=t.offset.posY+i/2);const d=n.get(t.id);d&&(d.x=t.offset.posX+s/2,d.y=t.offset.posY+i/2)}h(rt,"alignDegenerateNodeToAnchor");function Se(t,e){const n=t.startPoint,r=t.endPoint,i=(t.bendPoints?t.bendPoints:[]).map(o=>({x:o.x+e.x,y:o.y+e.y}));return[{x:n.x+e.x,y:n.y+e.y},...i,{x:r.x+e.x,y:r.y+e.y}]}h(Se,"createEdgePointsFromSection");function $(t,e,n,r){const s=ht(t,e,n);if(s===void 0||s==="root")return{x:0,y:0};const i=r[s],o=(i==null?void 0:i.elkOrigin)??(i==null?void 0:i.offset);return{x:(o==null?void 0:o.posX)??0,y:(o==null?void 0:o.posY)??0}}h($,"calcOffset");function st(t,e,n,r){const s=Array.isArray(t)?[...t]:[],i=I(n);r.debug("PPP cutter2: Points before cutter2:",JSON.stringify(t),"endBounds:",i,D(i,t[t.length-1]));let o;{const a=I(e),u=I(n),c=!!(e!=null&&e.isGroup),f=!!(n!=null&&n.isGroup),{candidate:d,centerApprox:l}=at(s,e,"start"),{candidate:g,centerApprox:m}=at(s,n,"end");let E=c&&D(a,d),y=f&&D(u,g);ct(s,"start",E&&l),ct(s,"end",y&&m),c&&!E&&(E=lt(s,a,"start")),f&&!y&&(y=lt(s,u,"end")),E||y?(E||Be(s,e,a,r),y||Ge(s,n,u,r),r.debug("PPP cutter2: skipping cutter2 due to on-border group endpoint(s)",{skipStart:E,skipEnd:y,startCenterApprox:l,endCenterApprox:m,startCandidate:d,endCandidate:g}),o=s):o=Fe(e,n,s,r)}if(r.debug("PPP cutter2: Points after cutter2:",JSON.stringify(o)),!Array.isArray(o)||o.length<2||Ie(o)){r.warn("POI cutter2: Invalid points from cutter2, falling back to prevPoints",o);const a=s.filter(u=>Number.isFinite(u==null?void 0:u.x)&&Number.isFinite(u==null?void 0:u.y));o=a.length>=2?a:s}return r.debug("UIO cutter2: Points after cutter2 (sanitized):",o),Me(o,r)}h(st,"sanitizeElkEdgePoints");function Ie(t){return t==null?void 0:t.some(e=>!Number.isFinite(e==null?void 0:e.x)||!Number.isFinite(e==null?void 0:e.y))}h(Ie,"hasInvalidPoint");function Me(t,e){const n=t.filter((r,s,i)=>{if(s===0)return!0;const o=i[s-1];return Math.abs(r.x-o.x)>1e-6||Math.abs(r.y-o.y)>1e-6});return n.length!==t.length&&e.debug("UIO cutter2: removed consecutive duplicate points",{before:t,after:n}),n}h(Me,"dedupeConsecutivePoints");function ve(t){return Ht(t.arrowTypeEnd)}h(ve,"getEndMarkerPathOffset");function Ae(t){return Ht(t.arrowTypeStart)}h(Ae,"getStartMarkerPathOffset");function Pe(t,e,n,r){if(n<=0||t.length<3)return t;const s=t[0],i=t[1],o=Math.hypot(i.x-s.x,i.y-s.y);if(o>=Math.max(Ut,n*2)||!D(e,i,1))return t;const a=[s,...t.slice(2)];return r.debug("UIO cutter2: removed short start marker segment",{before:t,after:a,markerOffset:n,segmentLength:o}),a}h(Pe,"ensureStartMarkerSegmentLength");function Ne(t,e,n,r){if(n<=0||t.length<3)return t;const s=t[t.length-1],i=t[t.length-2],o=Math.hypot(s.x-i.x,s.y-i.y);if(o>=Math.max(Ut,n*2)||!D(e,i,1))return t;const a=[...t.slice(0,-2),s];return r.debug("UIO cutter2: removed short end marker segment",{before:t,after:a,markerOffset:n,segmentLength:o}),a}h(Ne,"ensureEndMarkerSegmentLength");function Le(t,e){const n=t.edges.defaultInterpolate,r=t.edges.defaultStyle,s=e.getConfig();t.edges.forEach(i=>{const o=De(i,{defaultStyle:r,defaultInterpolate:n,confCurve:s.curve},e);Object.assign(i,o)})}h(Le,"applyElkEdgeRenderData");function Re(t){if(t.classes!==void 0)return t.classes;if(t.start&&t.end)return`flowchart-link LS_${t.start} LE_${t.end}`}h(Re,"buildFallbackEdgeClasses");function _e(t,e,n){let r="normal",s="solid",i=[],o=[];return t==="dotted"?(s="dotted",i=["fill:none","stroke-width:2px","stroke-dasharray:3"]):t==="thick"?(r="thick",i=["stroke-width: 3.5px","fill:none"]):(i=e??["fill:none"],n!==void 0&&(o=n)),{thickness:r,pattern:s,style:i,labelStyle:o}}h(_e,"computeStroke");function Te(t,e,n){return t!==void 0?t:e!==void 0?e:n}h(Te,"getCurve");function De(t,e,n){const r={};r.minlen=t.minlen??t.length??1,r.text=t.text??t.label,r.arrowhead=t.arrowhead??(t.type==="arrow_open"?"none":"normal");const s=Tt[t.type??"arrow_open"]??Tt.arrow_open;r.arrowTypeStart=t.arrowTypeStart??s[0],r.arrowTypeEnd=t.arrowTypeEnd??s[1],r.startLabelRight=t.startLabelRight,r.endLabelLeft=t.endLabelLeft;const i=_e(t.stroke,e.defaultStyle,e.defaultLabelStyle);r.thickness=t.thickness??i.thickness,r.pattern=t.pattern??i.pattern,r.style=t.style??i.style,r.labelStyle=t.labelStyle??i.labelStyle,r.classes=Re(t),r.curve=n.interpolateToCurve(Te(t.curve??t.interpolate,e.defaultInterpolate,e.confCurve),ze);const o=(r.text??"")!=="";return t.arrowheadStyle!==void 0?r.arrowheadStyle=t.arrowheadStyle:(o||t.style!==void 0)&&(r.arrowheadStyle="fill: #333"),r.labelpos=t.labelpos??(o?"c":void 0),r.labelType=t.labelType,r.label=(t.label??r.text??"").replace(n.common.lineBreakRegex,`
|
|
1
|
+
import{a as We}from"./chunk-KS47KZWR-BrLOmWWS.js";import{c as Xe,d as $e}from"./chunk-KQLB2F66-pFBglgtP.js";import{_ as h,o as je,ax as ze,ay as Ct,ai as Ye,az as Ke}from"./mermaid.core-CFBl9TP8.js";import"./index-CM1F7OtV.js";import"./graph-Bn3Yngep.js";import"./_commonjsHelpers-CqkleIqs.js";class Ve{constructor(){throw new Error("Раскладка ELK в ccv недоступна — уберите layout: elk из диаграммы")}}var ht=h((t,e,{parentById:n})=>{const r=new Set;let s=t;if(t===e)return n[t]||"root";for(;s;){if(r.add(s),s===e)return s;s=n[s]}for(s=e;s;){if(r.has(s))return s;s=n[s]}return"root"},"findCommonAncestor"),Je="root";function q(t,e,{parentById:n}){let r=t;for(;(n[r]??Je)!==e;)r=n[r];return r}h(q,"childOnPath");function Bt(t,e){const n=t.map(()=>!1),r=new Map;t.forEach(({source:s,target:i},o)=>{if(s===i)return;const a=ht(s,i,e);if(a===s||a===i)return;const u=q(s,a,e),c=q(i,a,e),f=r.get(a)??[];f.push({index:o,from:u,to:c,collapsed:u!==s||c!==i}),r.set(a,f)});for(const s of r.values()){const i=new Map,o=[],a=new Map;for(const l of s){for(const g of[l.from,l.to])i.has(g)||(i.set(g,[]),o.push(g),a.set(g,0));i.get(l.from).push(l),a.set(l.to,a.get(l.to)+1)}const u=1,c=2,f=new Map,d=[...o.filter(l=>a.get(l)===0),...o];for(const l of d){if(f.has(l))continue;f.set(l,u);const g=[{node:l,next:0}];for(;g.length>0;){const m=g[g.length-1],E=i.get(m.node);if(m.next>=E.length){f.set(m.node,c),g.pop();continue}const y=E[m.next++],p=f.get(y.to);p===u?n[y.index]=y.collapsed:p===void 0&&(f.set(y.to,u),g.push({node:y.to,next:0}))}}}return n}h(Bt,"findSubgraphFeedbackEdges");function Q(t,e,{parentById:n}){let r=n[t];for(;r!==void 0;){if(r===e)return!0;r=n[r]}return!1}h(Q,"isInside");function Gt(t,e){const n=t.map((r,s)=>s);return t.forEach(({source:r,target:s},i)=>{const o=n.indexOf(i),a=n.findIndex((u,c)=>{const f=t[u];return c<o&&(f.target===s&&Q(r,f.source,e)||f.source===r&&Q(s,f.target,e))});a!==-1&&(n.splice(o,1),n.splice(a,0,i))}),n}h(Gt,"orderNestedEdgeEnds");var qe=6;function Ft(t,{measure:e}){var s,i;const n=(i=(s=t.config)==null?void 0:s.elk)==null?void 0:i.lineHops;if(n===!1)return;const r=t.edges.filter(o=>Array.isArray(o.points)&&o.points.length>=2).map(o=>({id:o.id,points:o.points,curve:o.curve,arrowTypeStart:o.arrowTypeStart,arrowTypeEnd:o.arrowTypeEnd}));We(e.groups.edgePaths,r,{enabled:!0,jumpRadius:qe,jumpStyle:n==="gap"?"gap":"arc"})}h(Ft,"applyElkLineJumps");var Qe={},Ze={},tn={},en={},C=1,nn=10,D=h((t,e,n=.5)=>{const r=t.width/2,s=t.height/2,i=t.x-r,o=t.x+r,a=t.y-s,u=t.y+s,c=Math.abs(e.x-i)<=n&&e.y>=a-n&&e.y<=u+n,f=Math.abs(e.x-o)<=n&&e.y>=a-n&&e.y<=u+n,d=Math.abs(e.y-a)<=n&&e.x>=i-n&&e.x<=o+n,l=Math.abs(e.y-u)<=n&&e.x>=i-n&&e.x<=o+n;return c||f||d||l},"onBorder"),rn=h((t,e,n)=>{const r=t.x,s=t.y,i=Math.abs(r-n.x),o=t.width/2;let a=n.x<e.x?o-i:o+i;const u=t.height/2,c=Math.abs(e.y-n.y),f=Math.abs(e.x-n.x);if(Math.abs(s-e.y)*o>Math.abs(r-e.x)*u){const d=n.y<e.y?e.y-u-s:s-u-e.y;a=f*d/c;const l={x:n.x<e.x?n.x+a:n.x-f+a,y:n.y<e.y?n.y+c-d:n.y-c+d};return f===0&&(l.x=e.x),c===0&&(l.y=e.y),l}else{n.x<e.x?a=e.x-o-r:a=r-o-e.x;const d=c*a/f;let l=n.x<e.x?n.x+f-a:n.x-f+a,g=n.y<e.y?n.y+d:n.y-d;return f===0&&(l=e.x),c===0&&(g=e.y),{x:l,y:g}}},"intersection"),B=h((t,e)=>{const n=t.x,r=t.y,s=Math.abs(e.x-n),i=Math.abs(e.y-r),o=t.width/2,a=t.height/2;return s>=o||i>=a},"outsideNode"),sn=h((t,e,n=nn)=>{const r=Math.abs(e.x-t.x),s=Math.abs(e.y-t.y),i=t.width/2,o=t.height/2;if(Math.abs(r-i)<C||Math.abs(s-o)<C){const a=e.x-t.x,u=e.y-t.y,c=Math.sqrt(a*a+u*u);if(c>0)return{x:t.x+a/c*(c+n),y:t.y+u/c*(c+n)}}return e},"ensureTrulyOutside"),on=h((t,e,n)=>{const r=Math.abs(e.x-t.x)<C,s=Math.abs(e.y-t.y)<C;return{x:r?e.x:e.x<t.x?t.x-t.width/4:t.x+t.width/4,y:s?e.y:n.y}},"makeInsidePoint"),an=h((t,e,n)=>{if(!(t!=null&&t.intersect))return null;const r=t.intersect(n);return!r||n.x<e.x&&r.x>e.x||n.x>e.x&&r.x<e.x||Math.hypot(n.x-r.x,n.y-r.y)<=C?null:r},"tryNodeIntersect"),cn=h((t,e,n)=>{const r=on(t,e,n);return rn(t,e,r)},"fallbackIntersection"),ln=20,_t=1e-6,K=h((t,e,n)=>{var o;const r=(o=t.intersect)==null?void 0:o.call(t,n);if(!r)return!1;const s=Math.hypot(n.x-e.x,n.y-e.y),i=Math.hypot(r.x-e.x,r.y-e.y);return s<=i+1e-9},"insideOutline"),un=h((t,e,n,r)=>{if(!(t!=null&&t.intersect))return null;const s=r.x-n.x,i=r.y-n.y;if(s===0&&i===0||Math.abs(s)>_t&&Math.abs(i)>_t)return null;const o={x:e.x,y:e.y},a=Math.abs(s)>Math.abs(i),u=h(d=>a?{x:d,y:n.y}:{x:n.x,y:d},"along");let c=a?o.x:o.y,f=a?n.x:n.y;if(!K(t,o,u(c)))return null;if(K(t,o,u(f)))return{...n};for(let d=0;d<ln;d++){const l=(c+f)/2;K(t,o,u(l))?c=l:f=l}return u(c)},"outlineAttachPoint"),U=h((t,e,n,r)=>{const s=sn(e,n);return an(t,e,s)??cn(e,s,r)},"computeNodeIntersection"),H=h((t,e,n,r=.1)=>{if(!(!n||t.length===0))if(e==="start")t.length>0&&Math.abs(t[0].x-n.x)<r&&Math.abs(t[0].y-n.y)<r?t.shift():t[0]=n;else{const s=t.length-1;t.length>0&&Math.abs(t[s].x-n.x)<r&&Math.abs(t[s].y-n.y)<r?t.pop():t[s]=n}},"replaceEndpoint"),Ut=8,Ht=h(t=>typeof t!="string"?0:Math.max(Ye[t]??0,Ke[t]??0),"markerPathOffset"),Tt={arrow_open:["none","none"],arrow_cross:["none","arrow_cross"],double_arrow_cross:["arrow_cross","arrow_cross"],arrow_point:["none","arrow_point"],double_arrow_point:["arrow_point","arrow_point"],arrow_circle:["none","arrow_circle"],double_arrow_circle:["arrow_circle","arrow_circle"]},R=12,Wt=`[top=${R},left=${R},bottom=${R},right=${R}]`,M=24,Xt=24,$t=50,N=15,L=10,ft={"spacing.baseValue":15,"spacing.nodeNode":15,"elk.aspectRatio":"1.6","elk.expandNodes":"true","elk.rectpacking.trybox":"true","elk.rectpacking.packing.compaction.rowHeightReevaluation":"true","elk.rectpacking.packing.compaction.iterations":10,"elk.rectpacking.whiteSpaceElimination.strategy":"EQUAL_BETWEEN_STRUCTURES","elk.rectpacking.widthApproximation.strategy":"SCANLINE"},hn=["nodeSize.constraints","nodeSize.minimum","elk.algorithm","elk.aspectRatio","elk.contentAlignment","elk.expandNodes","elk.padding",...Object.keys(ft)];function jt(t){for(const e of hn)delete t[e];t["spacing.baseValue"]=Xt,t["spacing.nodeNode"]=$t}h(jt,"clearContainerAlgorithmOptions");var Dt=new Set(["elk.layered","elk.box","elk.rectpacking","elk.stress","elk.force","elk.mrtree","elk.radial","elk.sporeOverlap"]);function dt(t,e){if(typeof t=="string"){if(!Dt.has(t)){e==null||e.warn(`Unknown container layout algorithm "${t}". Supported values: ${[...Dt].join(", ")}. Falling back to the diagram's layout algorithm.`);return}return t}}h(dt,"resolveContainerAlgorithm");function gt(t){switch(t){case"LR":return"RIGHT";case"RL":return"LEFT";case"TB":case"TD":return"DOWN";case"BT":return"UP";default:return"DOWN"}}h(gt,"dir2ElkDirection");function j(t){var e,n,r;return Ct(t.shape)?(((e=t.labelData)==null?void 0:e.width)??((r=(n=t.labels)==null?void 0:n[0])==null?void 0:r.width)??0)+(t.padding??0):0}h(j,"groupTitleWidth");function yt(t){return Ct(t.shape)?{"nodeSize.constraints":"[MINIMUM_SIZE, NODE_LABELS]","nodeSize.minimum":`(${j(t)}, 0)`}:{}}h(yt,"groupTitleSizeOptions");function zt(t,e,n,r){var d,l,g;const s=((d=t.labelData)==null?void 0:d.width)??0,i=t.padding??0,o=s+2*i,a=((l=t.labelData)==null?void 0:l.height)??0,u=xt(e==null?void 0:e.preset),c={...yt(t),"spacing.baseValue":Xt,"elk.layered.spacing.edgeNodeBetweenLayers":30,"elk.spacing.edgeEdge":20,"spacing.nodeNode":$t,"elk.padding":`[top=${M},left=${M},bottom=${M},right=${M}]`,"nodeLabels.placement":"[H_CENTER V_TOP, INSIDE]","elk.layered.mergeEdges":e==null?void 0:e.mergeEdges,"elk.layered.nodePlacement.bk.fixedAlignment":(e==null?void 0:e.nodePlacementAlignment)??u.alignment,"elk.layered.nodePlacement.strategy":(e==null?void 0:e.nodePlacementStrategy)??u.containerPlacement,"elk.layered.cycleBreaking.strategy":(e==null?void 0:e.cycleBreakingStrategy)??u.cycleBreaking,"elk.layered.nodePlacement.networkSimplex.nodeFlexibility":"PORT_POSITION","elk.spacing.portsSurrounding":Wt},f=dt((g=t.metadata)==null?void 0:g.algorithm,r);if(f){const m=a+N;if(c["nodeSize.constraints"]="[MINIMUM_SIZE, NODE_LABELS]",c["nodeSize.minimum"]=`(${o}, ${m+N})`,c["elk.algorithm"]=f,c["elk.hierarchyHandling"]="SEPARATE_CHILDREN",c["elk.aspectRatio"]="2.0",c["elk.contentAlignment"]="H_CENTER V_TOP",c["elk.expandNodes"]="true",c["elk.padding"]=`[top=${m},left=${N},bottom=${N},right=${N}]`,f==="elk.rectpacking"){const E=a+L;Object.assign(c,ft,{"elk.padding":`[top=${E},left=${L},bottom=${L},right=${L}]`,"nodeSize.minimum":`(${o}, ${E+L})`})}}else t.dir&&(c["elk.algorithm"]=n,c["elk.direction"]=gt(t.dir),c["elk.hierarchyHandling"]="SEPARATE_CHILDREN");return Object.assign(c,en),c}h(zt,"buildSubgraphLayoutOptions");function Yt(t,e){const n=new Set,r=new Map;for(const{id:s,parentId:i}of t){const o=r.get(i);o?o.push(s):r.set(i,[s])}for(const s of r.values()){const i=new Set(s),o=new Map(s.map(y=>[y,0])),a=new Map(s.map(y=>[y,[]])),u=[];for(const y of e){const p=y.source==null?void 0:String(y.source),x=y.target==null?void 0:String(y.target);!p||!x||p===x||!i.has(p)||!i.has(x)||(o.set(x,(o.get(x)??0)+1),a.get(p).push(x),a.get(x).push(p),u.push([p,x]))}const c=new Map;let f=0;for(const y of s){if(c.has(y))continue;const p=[y];for(c.set(y,f);p.length>0;){const x=p.pop();for(const w of a.get(x))c.has(w)||(c.set(w,f),p.push(w))}f++}const d=new Array(f).fill(!1);for(const y of s)(o.get(y)??0)===0&&(d[c.get(y)]=!0);if(!d.includes(!1))continue;const l=new Map(s.map(y=>[y,[]])),g=new Map(s.map(y=>[y,0])),m=h((y,p)=>{const x=new Set([y]),w=[y];for(;w.length>0;){const k=w.pop();if(k===p)return!0;for(const b of l.get(k))x.has(b)||(x.add(b),w.push(b))}return!1},"reaches");for(const[y,p]of u)m(p,y)||(l.get(y).push(p),g.set(p,(g.get(p)??0)+1));const E=new Array(f).fill(!1);for(const y of s){const p=c.get(y);!d[p]&&!E[p]&&g.get(y)===0&&(n.add(y),E[p]=!0)}}return n}h(Yt,"findCyclicEntryNodes");function Kt(t,e){var r;if(!((r=t.config.elk)!=null&&r.keepEntryNodeOnTop))return;const n=Yt(t.nodes,t.edges.map(s=>({source:s.start,target:s.end})));for(const s of n){const i=e[s];i&&(i.layoutOptions={...i.layoutOptions,"elk.layered.layering.layerConstraint":"FIRST"})}}h(Kt,"applyCyclicEntryConstraint");function Vt(t,e){const n=pt(e);return te(n),Le(t,n),{algorithm:n.algorithm}}h(Vt,"prepareLayoutForElk");async function Jt(t,e){const n=pt(e),r=qt(t,n),s=new Ve;n.log.info("Drawing flowchart using v4 renderer",s);const i=await fe(s,r.elkGraph,n.log);return de(t,i,r,n.log),ee(t.nodes),i}h(Jt,"runElkLayoutCore");function qt(t,e){var o;const n={},r=ne(t,e.algorithm,e.rootLayoutOptions),s=t.direction??"DOWN";r.layoutOptions["elk.direction"]=gt(s);const i=re(t.nodes,e.log);return mt(t.nodes,r,n,e),ae(t,r,n,e),ue(t,n,i,e),he(r,n,i,e.log),((o=t.config.elk)==null?void 0:o.orientFeedbackEdges)!==!1&&Qt(r,i),Zt(r,i),Kt(t,n),{elkGraph:r,nodeDb:n,parentLookupDb:i}}h(qt,"buildElkGraphFromLayoutData");function Qt(t,e){const n=Bt(t.edges.map(r=>({source:r.sources[0],target:r.targets[0]})),e);t.edges.forEach((r,s)=>{n[s]&&([r.sources,r.targets]=[r.targets,r.sources],r.layoutReversed=!0)})}h(Qt,"reverseSubgraphFeedbackEdges");function Zt(t,e){const n=Gt(t.edges.map(r=>({source:r.sources[0],target:r.targets[0]})),e);t.edges=n.map(r=>t.edges[r])}h(Zt,"orderEdgesByNesting");var On=Xe({afterPaint:Ft,prepareLayout:Vt,measureLayout:h((t,e)=>$e(t,e,{unwrapGroupLabels:!0}),"measureLayout"),runLayoutCore:Jt,paintOptions:{skipIntersect:!0}});function te(t){je(t.getConfig())}h(te,"syncHostConfig");function ee(t){const e=new Map(t.map(n=>[n.id,n]));t.sort((n,r)=>n.isGroup!==r.isGroup?n.isGroup?-1:1:n.isGroup&&r.isGroup?Z(n,e)-Z(r,e):0)}h(ee,"orderNodesForElkPaint");function Z(t,e){let n=0;const r=new Set;let s=t.parentId;for(;s&&!r.has(s);){r.add(s);const i=e.get(s);if(!(i!=null&&i.isGroup))break;n++,s=i.parentId}return n}h(Z,"getGroupDepth");function pt(t){var n,r,s;const e=t.helpers;if(!e)throw new Error("ELK layout requires Mermaid internal helpers");return{algorithm:((n=t.preparedLayout)==null?void 0:n.algorithm)??((r=t.options)==null?void 0:r.algorithm),rootLayoutOptions:(s=t.options)==null?void 0:s.rootLayoutOptions,common:e.common,getConfig:e.getConfig,interpolateToCurve:e.interpolateToCurve,log:e.log}}h(pt,"getElkLayoutContext");var V={default:{layering:"NETWORK_SIMPLEX",placement:"BRANDES_KOEPF",containerPlacement:"BRANDES_KOEPF",alignment:"BALANCED",cycleBreaking:"DEPTH_FIRST"},legacy:{layering:"NETWORK_SIMPLEX",placement:"BRANDES_KOEPF",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"GREEDY"},modelOrder:{layering:"NETWORK_SIMPLEX",placement:"NETWORK_SIMPLEX",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"GREEDY_MODEL_ORDER"},depthFirst:{layering:"NETWORK_SIMPLEX",placement:"NETWORK_SIMPLEX",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"DEPTH_FIRST"}};function xt(t){return t!==void 0&&Object.hasOwn(V,t)?V[t]:V.default}h(xt,"resolveElkPreset");function ne(t,e,n){var i,o,a,u,c,f,d,l,g;const r=xt((i=t.config.elk)==null?void 0:i.preset),s={id:"root",layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.algorithm":e,"elk.layered.nodePlacement.strategy":((o=t.config.elk)==null?void 0:o.nodePlacementStrategy)??r.placement,"elk.layered.nodePlacement.bk.fixedAlignment":((a=t.config.elk)==null?void 0:a.nodePlacementAlignment)??r.alignment,"elk.layered.mergeEdges":(u=t.config.elk)==null?void 0:u.mergeEdges,"elk.direction":"DOWN","spacing.baseValue":40,"elk.layered.crossingMinimization.forceNodeModelOrder":(c=t.config.elk)==null?void 0:c.forceNodeModelOrder,"elk.layered.considerModelOrder.strategy":(f=t.config.elk)==null?void 0:f.considerModelOrder,"elk.layered.unnecessaryBendpoints":!0,"elk.layered.cycleBreaking.strategy":((d=t.config.elk)==null?void 0:d.cycleBreakingStrategy)??r.cycleBreaking,"elk.layered.layering.strategy":((l=t.config.elk)==null?void 0:l.layeringStrategy)??r.layering,"elk.layered.layering.coffmanGraham.layerBound":(g=t.config.elk)==null?void 0:g.layeringLayerBound,"elk.layered.wrapping.multiEdge.improveCuts":!0,"elk.layered.wrapping.multiEdge.improveWrappedEdges":!0,"elk.layered.edgeRouting.selfLoopDistribution":"EQUALLY","elk.layered.mergeHierarchyEdges":!0,"elk.spacing.portsSurrounding":Wt},children:[],edges:[]};return e==="elk.rectpacking"&&Object.assign(s.layoutOptions,ft,{"elk.contentAlignment":"H_CENTER V_TOP","elk.padding":"[top=15,left=15,bottom=15,right=15]"}),n&&Object.assign(s.layoutOptions,n),Object.assign(s.layoutOptions,Qe,Ze,tn),s}h(ne,"createRootElkGraph");function re(t,e){const n={parentById:{},childrenById:{}},r=t.filter(s=>s.isGroup);return e.info("Subgraphs - ",r),r.forEach(s=>{t.filter(o=>o.parentId===s.id).forEach(o=>{var a,u;n.parentById[o.id]=s.id,(a=n.childrenById)[u=s.id]??(a[u]=[]),n.childrenById[s.id].push(o.id)})}),n}h(re,"addSubGraphs");function mt(t,e,n,r,s){const i=t.filter(o=>(o==null?void 0:o.parentId)===s);return r.log.info("addVertices APA12",i,s),i.forEach(o=>{se(e,t,o,n,r)}),e}h(mt,"addVertices");function se(t,e,n,r,s){const i=ie(n);t.children.push(i),r[n.id]=i,n.isGroup&&(i.children=[],mt(e,i,r,s,n.id),i.labelData=oe(n,s.getConfig()))}h(se,"addVertex");function ie(t){const e={...t};return delete e.domId,t.isGroup?e.children=[]:(e.width=t.width??0,e.height=t.height??0,t.spreadPorts&&(e.layoutOptions={...e.layoutOptions,"elk.portAlignment.default":"CENTER"})),e}h(ie,"createElkNode");function oe(t,e){var r,s;const n=t.labelData;return n||(t.labelBBox?{width:t.labelBBox.width,height:Math.max(0,t.labelBBox.height-2),wrappingWidth:t.wrappingWidth??((r=e.flowchart)==null?void 0:r.wrappingWidth)}:{width:0,height:0,wrappingWidth:t.wrappingWidth??((s=e.flowchart)==null?void 0:s.wrappingWidth)})}h(oe,"getMeasuredLabelData");function ae(t,e,n,r){r.log.info("abc78 DAGA edges = ",t);const s={};return t.edges.forEach(i=>{var l;const o=i.id;s[o]=(s[o]??-1)+1;const a=o;i.id=a,r.log.info("abc78 new link id to be used is",o,a,s[o]);const{source:u,target:c,sourceId:f,targetId:d}=le(i,n);r.log.debug("abc78 source and target",u,c),e.edges.push({...i,sources:[u],targets:[c],sourceId:f,targetId:d,labels:[{width:i.width??0,height:i.height??0,orgWidth:i.width??0,orgHeight:i.height??0,text:i.label??"",layoutOptions:{"edgeLabels.inline":"true","edgeLabels.placement":"CENTER"}},...(((l=r.rootLayoutOptions)==null?void 0:l["elk.algorithm"])??r.algorithm??"elk.layered")==="elk.layered"?ce(i):[]]})}),e}h(ae,"addEdgesToElkGraph");var fn=6;function ce(t){const e={startLeft:t.startLabelLeft,startRight:t.startLabelRight,endLeft:t.endLabelLeft,endRight:t.endLabelRight};return Object.entries(t.terminalLabelSizes??{}).map(([n,r])=>{const s=n.startsWith("start"),i=s?t.arrowTypeStart:t.arrowTypeEnd,o=i&&i!=="none"?fn:0;return{terminal:n,text:e[n],width:r.width+2*o,height:r.height+2*o,layoutOptions:{"edgeLabels.placement":s?"TAIL":"HEAD"}}})}h(ce,"terminalElkLabels");function le(t,e){const n=t.start,r=t.end,s=n,i=r,o=n?e[n]:void 0,a=r?e[r]:void 0;return!o||!a?{source:s,target:i}:{source:s,target:i,sourceId:n,targetId:r}}h(le,"getEdgeStartEndPoint");function ue(t,e,n,r){t.nodes.forEach(s=>{var o,a,u;const i=e[s.id];!i||n.childrenById[i.id]===void 0||(i.labels=[{text:i.label,width:((o=i==null?void 0:i.labelData)==null?void 0:o.width)??50,height:((a=i==null?void 0:i.labelData)==null?void 0:a.height)??50}],r.log.debug("UIO node label",(u=i==null?void 0:i.labelData)==null?void 0:u.width,i.padding),i.layoutOptions=zt(i,t.config.elk,r.algorithm,r.log),delete i.x,delete i.y,delete i.width,delete i.height)})}h(ue,"configureSubgraphNodes");function he(t,e,n,r){r.debug("APA01 processing edges, count:",t.edges.length),t.edges.forEach((s,i)=>{r.debug("APA01 processing edge",i,":",s);const o=s.sources[0],a=s.targets[0];if(r.debug("APA01 source:",o,"target:",a),r.debug("APA01 nodeDb[source]:",e[o]),r.debug("APA01 nodeDb[target]:",e[a]),e[o]&&e[a]&&e[o].parentId!==e[a].parentId){const u=ht(o,a,n);W(e,o,u,r),W(e,a,u,r)}})}h(he,"configureCrossHierarchyEdges");function W(t,e,n,r){var i;const s=t[e];s&&(s.layoutOptions??(s.layoutOptions={}),s.layoutOptions["elk.hierarchyHandling"]==="SEPARATE_CHILDREN"&&dt((i=s.metadata)==null?void 0:i.algorithm)&&(r.debug("Dropping explicit algorithm for node",s.id,"due to cross-boundary edges"),jt(s.layoutOptions),Object.assign(s.layoutOptions,yt(s))),s.layoutOptions["elk.hierarchyHandling"]="INCLUDE_CHILDREN",s.id!==n&&s.parentId&&W(t,s.parentId,n,r))}h(W,"setIncludeChildrenPolicy");async function fe(t,e,n){const r=globalThis.__mermaidProfiler;try{r==null||r.begin("layoutCore");let s;try{s=await t.layout(e)}finally{r==null||r.end()}return n.debug("APA01 after - success"),n.debug("APA01 layout result:",s),s}catch(s){throw n.error("ELK layout error:",s),s}}h(fe,"runElkLayout");function de(t,e,n,r){const s=new Map(t.nodes.map(i=>[i.id,i]));wt(e.children??[],n,s,0,0,0,r),bt(e.children??[],n,s,e),Ee(t,e,n,r)}h(de,"applyElkLayoutResult");function Et(t,e=new Set){for(const n of t.children??[])e.add(n.id),Et(n,e);return e}h(Et,"collectDescendantIds");function ge(t,e,n,r){var i,o;const s=[];for(const a of t.edges??[]){const u=((i=a.sources)==null?void 0:i[0])??a.start,c=((o=a.targets)==null?void 0:o[0])??a.end,f=e.has(u)&&e.has(c),d=u===r,l=c===r;if(!f&&!d&&!l)continue;const g=$(u,c,n.parentLookupDb,n.nodeDb);for(const m of a.sections??[]){const E=f?[m.startPoint,...m.bendPoints??[],m.endPoint]:[d?m.startPoint:null,l?m.endPoint:null];for(const y of E)y&&s.push({x:y.x+g.x,y:y.y+g.y})}}return s}h(ge,"internalEdgePoints");function bt(t,e,n,r={}){for(const s of t){if(!(s!=null&&s.isGroup))continue;const i=s.children??[];bt(i,e,n,r);const o=e.nodeDb[s.id],a=i.map(b=>e.nodeDb[b.id]).filter(b=>(b==null?void 0:b.offset)&&b.width&&b.height);if(!(o!=null&&o.offset)||a.length===0)continue;const u=ge(r,Et(s),e,s.id),c=[...a.map(b=>b.offset.posX),...a.map(b=>b.offset.posX+b.width),...u.map(b=>b.x)],f=[...a.map(b=>b.offset.posY),...a.map(b=>b.offset.posY+b.height),...u.map(b=>b.y)],d=o.offset,l=Math.max(d.posX,Math.min(...c)-M),g=Math.min(d.posX+o.width,Math.max(...c)+M),m=Math.min(d.posY+o.height,Math.max(...f)+M),E=d.posY,y=j(s);let p=l,x=g-l;if(x<y){p-=(y-x)/2,x=y;const b=d.posX+o.width;p=Math.max(d.posX,Math.min(p,b-x)),x=Math.min(x,o.width)}const w=m-E;if(w<=0||x<=0)continue;o.elkOrigin??(o.elkOrigin={posX:d.posX,posY:d.posY}),o.offset.posX=p,o.offset.width=x,o.offset.height=w,o.width=x,o.height=w,o.x=p+x/2,o.y=E+w/2;const k=n.get(s.id);k&&(k.x=o.x,k.y=o.y,k.width=x,k.height=w)}}h(bt,"evenGroupFrames");function wt(t,e,n,r,s,i,o){t.forEach(a=>{var l,g;if(!a)return;const u=e.nodeDb[a.id]??a,c=Math.max(a.width,a.labels&&((l=a.labels[0])==null?void 0:l.width)||0),f={posX:a.x+r,posY:a.y+s,x:r,y:s,depth:i,width:c,height:a.height};u.offset=f,u.x=f.posX+a.width/2,u.y=f.posY+a.height/2,u.width=a.width,u.height=a.height;const d=n.get(a.id);if(d){d.x=u.x,d.y=u.y,d.width=a.isGroup?Math.max(a.width,((g=a.labelData)==null?void 0:g.width)??0):a.width,d.height=a.height;const m=d;m.labelData=a.labelData,m.labels=a.labels}a.isGroup?(o.debug("Id abc88 subgraph = ",a.id,a.x,a.y,a.labelData),wt(a.children??[],e,n,f.posX,f.posY,i+1,o)):o.info("Id NODE = ",a.id,a.x,a.y,r,s,`translate(${u.x}, ${u.y})`)})}h(wt,"applyElkNodePositions");var dn=16,gn=30,_=.01;function T(t,e){const n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);if(n>_&&r<=_)return"h";if(r>_&&n<=_)return"v"}h(T,"axisOf");function ye(t){const e=[];let n=t;const r=tt(n);r&&(n=r.points,e.push(r.run));const s=[...n].reverse(),i=tt(s);return i&&(n=i.points.reverse(),e.push(i.run)),{points:n,runs:e}}h(ye,"straightenTerminalJogsWithRuns");function tt(t){if(t.length<5)return null;const[e,n,r,s]=t,i=T(e,n);if(!i||T(r,s)!==i||T(n,r)!==(i==="h"?"v":"h")||Math.hypot(n.x-e.x,n.y-e.y)>gn)return null;const o=Math.abs(i==="h"?r.y-n.y:r.x-n.x);if(o<_||o>dn||!(i==="h"?Math.sign(n.x-e.x)===Math.sign(s.x-r.x):Math.sign(n.y-e.y)===Math.sign(s.y-r.y)))return null;let u=3;for(;u+1<t.length&&T(t[u],t[u+1])===i;)u++;if(u===t.length-1)return null;const c=[...t];for(let d=2;d<=u;d++)c[d]=i==="h"?{x:t[d].x,y:e.y}:{x:e.x,y:t[d].y};const f={old:{a:t[2],b:t[u]},new:{a:c[2],b:c[u]}};return c.splice(1,2),{points:c,run:f}}h(tt,"straightenFront");function pe(t,e,n,r){const s=h((c,f,d)=>(f.x-c.x)*(d.y-c.y)-(f.y-c.y)*(d.x-c.x),"side"),i=s(n,r,t),o=s(n,r,e),a=s(t,e,n),u=s(t,e,r);return(i>0&&o<0||i<0&&o>0)&&(a>0&&u<0||a<0&&u>0)}h(pe,"segmentsCrossStrict");function et(t,e){let n=0;for(let r=0;r<t.length-1;r++)for(let s=0;s<e.length-1;s++)pe(t[r],t[r+1],e[s],e[s+1])&&n++;return n}h(et,"crossingCount");function xe(t,e,n){const r=n.x-e.x,s=n.y-e.y,i=r*r+s*s;return i===0?0:Math.max(0,Math.min(1,((t.x-e.x)*r+(t.y-e.y)*s)/i))}h(xe,"paramOnSegment");function nt(t,e,n){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}h(nt,"pointAtParam");function kt(t,e){let n=null;for(const r of e){const s=xe(t,r.old.a,r.old.b),i=nt(r.old.a,r.old.b,s),o=i.x-t.x,a=i.y-t.y,u=o*o+a*a;(!n||u<n.distSq)&&(n={distSq:u,point:nt(r.new.a,r.new.b,s)})}return(n==null?void 0:n.point)??null}h(kt,"projectLabelOntoStraightenedRun");function X(t,e,n){let r=0,s=1;const i=e.x-t.x,o=e.y-t.y;for(const[a,u]of[[-i,t.x-n.x1],[i,n.x2-t.x],[-o,t.y-n.y1],[o,n.y2-t.y]])if(a===0){if(u<0)return!1}else a<0?r=Math.max(r,u/a):s=Math.min(s,u/a);return r<s}h(X,"segmentHitsBox");var v=h((t,e)=>({x1:t.x-e.width/2,y1:t.y-e.height/2,x2:t.x+e.width/2,y2:t.y+e.height/2}),"labelBox");function me(t){const e=t.map(i=>i.points??[]),n=t.map(i=>i.x==null||i.y==null||!i.label||!i.width||!i.height?void 0:{centre:{x:i.x,y:i.y},size:{width:i.width,height:i.height}}),r=h((i,o)=>{const a=o&&v(o.centre,o.size);return!!a&&i.some((u,c)=>c<i.length-1&&X(u,i[c+1],a))},"covers"),s=[];for(const[i,o]of t.entries()){const a=e[i];if(a.length<5)continue;const{points:u,runs:c}=ye(a);if(u===a)continue;const f=n[i],d=f&&kt(f.centre,c),l=f&&d?{centre:d,size:f.size}:f;let g=0,m=0,E=0,y=0;for(const[p,x]of e.entries())p===i||x.length<2||(g+=et(a,x),m+=et(u,x),E+=Number(r(x,f))+Number(r(a,n[p])),y+=Number(r(x,l))+Number(r(u,n[p])));m>g||y>E||(o.points=u,e[i]=u,n[i]=l,s.push({edge:o,runs:c}))}return s}h(me,"straightenEdgeTerminals");function Ee(t,e,n,r){var c,f,d;const s=new Map(t.edges.map(l=>[l.id,l])),i=((c=t.config.elk)==null?void 0:c.straightenEdges)!==!1,o=new Map;for(const l of t.edges)delete l.terminalLabelCenters;const a=new Map(t.nodes.map(l=>[l.id,l])),u=new Set;if((f=e.edges)==null||f.forEach(l=>{var w,k,b,G,S;if(!((w=l.sections)!=null&&w.length))return;const g=n.nodeDb[((k=l.sources)==null?void 0:k[0])??l.start],m=n.nodeDb[((b=l.targets)==null?void 0:b[0])??l.end];if(!g||!m)return;const E=l.start??l.sourceId??((G=l.sources)==null?void 0:G[0]),y=l.end??l.targetId??((S=l.targets)==null?void 0:S[0]),p=$(E,y,n.parentLookupDb,n.nodeDb),x=l.sections[0];g.shape!=="rect33"&&rt(g,{x:x.startPoint.x+p.x,y:x.startPoint.y+p.y},a,u),m.shape!=="rect33"&&rt(m,{x:x.endPoint.x+p.x,y:x.endPoint.y+p.y},a,u)}),(d=e.edges)==null||d.forEach(l=>{var It,Mt,vt,At;const g=s.get(l.id);if(!g)return;const m=l.layoutReversed===!0;let E=((It=l.sources)==null?void 0:It[0])??l.start,y=((Mt=l.targets)==null?void 0:Mt[0])??l.end;m&&([E,y]=[y,E]);const p=n.nodeDb[E],x=n.nodeDb[y];if(!p||!x)return;if(!((vt=l.sections)!=null&&vt.length)){const O=h(A=>{var Lt,Rt;return{x:(((Lt=A.offset)==null?void 0:Lt.posX)??A.x??0)+(A.width??0)/2,y:(((Rt=A.offset)==null?void 0:Rt.posY)??A.y??0)+(A.height??0)/2}},"centre"),z=O(p),Y=O(x);p.x=z.x,p.y=z.y,x.x=Y.x,x.y=Y.y;const F=st([z,Y],p,x,r);g.points=F,g.curve="linear";const Pt=F[0],Nt=F[F.length-1];g.x=(Pt.x+Nt.x)/2,g.y=(Pt.y+Nt.y)/2,r.debug("APA18 no edge sections, using a straight line",l.id,g.points);return}const w=l.start??l.sourceId??E,k=l.end??l.targetId??y,b=$(w,k,n.parentLookupDb,n.nodeDb);r.debug("APA18 offset",b,w," ==> ",k,"edge:",l,p);const G=l.sections[0],S=Se(G,b);m&&S.reverse();const Ue={start:S[0],end:S[S.length-1]};p.x=p.offset.posX+p.width/2,p.y=p.offset.posY+p.height/2,x.x=x.offset.posX+x.width/2,x.y=x.offset.posY+x.height/2,p.shape!=="rect33"&&S.unshift({x:p.x,y:p.y}),x.shape!=="rect33"&&S.push({x:x.x,y:x.y});const He=st(S,p,x,r);g.points=Pe(Ne(He,I(x),ve(g),r),I(p),Ae(g),r),g.curve="rounded";const P=(At=l.labels)==null?void 0:At[0];P&&(g.x=P.x+b.x+P.width/2,g.y=P.y+b.y+P.height/2);for(const O of l.labels??[])!O.terminal||!O.x&&!O.y||(g.terminalLabelCenters??(g.terminalLabelCenters={}),g.terminalLabelCenters[O.terminal]={x:O.x+b.x+O.width/2,y:O.y+b.y+O.height/2});g.terminalLabelCenters&&o.set(g,Ue)}),i){const l=me(t.edges);for(const{edge:g,runs:m}of l){if(g.x==null||g.y==null)continue;const E=kt({x:g.x,y:g.y},m);E&&(g.x=E.x,g.y=E.y)}}for(const[l,g]of o)Oe(l,g);we(t.edges,t.nodes),ke(t.edges,t.nodes),be(t.edges)}h(Ee,"applyElkEdgeLayout");var yn=4;function be(t){const e=new Map;for(const n of t){if(n.x==null||n.y==null||!n.label||!n.width)continue;const r=[n.start??"",n.end??""].sort().join("\0"),s=e.get(r);s?s.push(n):e.set(r,[n])}for(const n of e.values()){if(n.length!==2)continue;const[r,s]=n;if(Math.abs(r.y-s.y)>Math.max(r.height??0,s.height??0))continue;const i=r.width/2+s.width/2+yn,o=s.x-r.x,a=i-Math.abs(o);if(a<=0)continue;const u=Math.sign(o)||1;r.x=r.x-u*a/2,s.x=s.x+u*a/2}}h(be,"separateOppositeEdgeLabels");var J=h((t,e)=>t.x1<e.x2&&e.x1<t.x2&&t.y1<e.y2&&e.y1<t.y2,"boxesOverlap");function Ot(t,e){const n=e.filter(c=>c.x!==void 0&&c.y!==void 0),r=h(c=>v({x:c.x,y:c.y},{width:c.width??0,height:c.height??0}),"boxOf"),s=n.filter(c=>!c.isGroup).map(r),i=n.filter(c=>c.isGroup).map(r).flatMap(({x1:c,y1:f,x2:d,y2:l})=>[[{x:c,y:f},{x:d,y:f}],[{x:d,y:f},{x:d,y:l}],[{x:d,y:l},{x:c,y:l}],[{x:c,y:l},{x:c,y:f}]]),o=t.filter(c=>c.label&&c.width&&c.height&&c.x!==void 0).map(c=>v({x:c.x,y:c.y},{width:c.width,height:c.height})),a=h((c,f=0)=>{const d={x1:c.x1-f,y1:c.y1-f,x2:c.x2+f,y2:c.y2+f};return i.some(([l,g])=>X(l,g,d))},"hitsFrame");return{hitsFrame:a,blocked:h((c,f,d,l,g=0)=>s.some(m=>J(c,m))||o.some(m=>J(c,m))||a(c,g)||t.some(m=>(m.points??[]).some((E,y,p)=>y<p.length-1&&!(m===f&&y===l)&&X(E,p[y+1],c)))||t.some(m=>Object.entries(m.terminalLabelCenters??{}).some(([E,y])=>{var x;const p=(x=m.terminalLabelSizes)==null?void 0:x[E];return!(m===f&&E===d)&&p!==void 0&&J(c,v(y,p))})),"blocked")}}h(Ot,"terminalLabelObstacles");function*St(t){for(const e of t){const n=e.points;if(!(!n||n.length<2||!e.terminalLabelCenters||!e.terminalLabelSizes))for(const[r,s]of Object.entries(e.terminalLabelCenters)){const i=e.terminalLabelSizes[r],o=r.startsWith("start"),a=o?0:n.length-2,[u,c]=[n[a],n[a+1]],f=Math.hypot(c.x-u.x,c.y-u.y);!i||f===0||(yield{edge:e,key:r,center:s,size:i,atStart:o,segment:a,from:u,to:c,length:f})}}}h(St,"placedTerminalLabels");var pn=2;function we(t,e){const{hitsFrame:n,blocked:r}=Ot(t,e);for(const{edge:s,key:i,center:o,size:a,atStart:u,segment:c,from:f,to:d,length:l}of St(t)){if(!n(v(o,a)))continue;const[g,m]=u?[d,f]:[f,d],E={x:(m.x-g.x)/l,y:(m.y-g.y)/l},y=(Math.abs(E.x)*a.width+Math.abs(E.y)*a.height)/2,p=h(w=>(w.x-m.x)*E.x+(w.y-m.y)*E.y,"along"),x=h(w=>p(w)+y<=0&&p(w)-y>=-l,"onSegment");for(let w=1;w<=l;w++){const k=[w,-w].map(b=>({x:o.x+b*E.x,y:o.y+b*E.y})).find(b=>x(b)&&!r(v(b,a),s,i,c,pn));if(k){s.terminalLabelCenters[i]=k;break}}}}h(we,"slideTerminalLabelsOffFrames");function ke(t,e){const{blocked:n}=Ot(t,e);for(const{edge:r,key:s,center:i,size:o,segment:a,from:u,to:c,length:f}of St(t)){const d={x:-(c.y-u.y)/f,y:(c.x-u.x)/f},l=(i.x-u.x)*d.x+(i.y-u.y)*d.y;if(l===0||l>0===s.endsWith("Right"))continue;const g={x:i.x-2*l*d.x,y:i.y-2*l*d.y};n(v(g,o),r,s,a)||(r.terminalLabelCenters[s]=g)}}h(ke,"putTerminalLabelsOnTheirSide");function Oe(t,e){const n=t.points;if(!(n!=null&&n.length)||!t.terminalLabelCenters)return;const r={start:{x:n[0].x-e.start.x,y:n[0].y-e.start.y},end:{x:n[n.length-1].x-e.end.x,y:n[n.length-1].y-e.end.y}};for(const[s,i]of Object.entries(t.terminalLabelCenters)){const o=s.startsWith("start")?r.start:r.end;t.terminalLabelCenters[s]={x:i.x+o.x,y:i.y+o.y}}}h(Oe,"followMovedEndpoints");function rt(t,e,n,r){const s=t.width??0,i=t.height??0,o=t.offset.posY,a=o+i,u=.5,c=Math.abs(e.y-o)<=u||Math.abs(e.y-a)<=u;if((c?s:i)>=2*R||r.has(t.id))return;r.add(t.id);const f=c?e.x-(t.offset.posX+s/2):e.y-(t.offset.posY+i/2);if(Math.abs(f)<.01)return;c?(t.offset.posX+=f,t.x=t.offset.posX+s/2):(t.offset.posY+=f,t.y=t.offset.posY+i/2);const d=n.get(t.id);d&&(d.x=t.offset.posX+s/2,d.y=t.offset.posY+i/2)}h(rt,"alignDegenerateNodeToAnchor");function Se(t,e){const n=t.startPoint,r=t.endPoint,i=(t.bendPoints?t.bendPoints:[]).map(o=>({x:o.x+e.x,y:o.y+e.y}));return[{x:n.x+e.x,y:n.y+e.y},...i,{x:r.x+e.x,y:r.y+e.y}]}h(Se,"createEdgePointsFromSection");function $(t,e,n,r){const s=ht(t,e,n);if(s===void 0||s==="root")return{x:0,y:0};const i=r[s],o=(i==null?void 0:i.elkOrigin)??(i==null?void 0:i.offset);return{x:(o==null?void 0:o.posX)??0,y:(o==null?void 0:o.posY)??0}}h($,"calcOffset");function st(t,e,n,r){const s=Array.isArray(t)?[...t]:[],i=I(n);r.debug("PPP cutter2: Points before cutter2:",JSON.stringify(t),"endBounds:",i,D(i,t[t.length-1]));let o;{const a=I(e),u=I(n),c=!!(e!=null&&e.isGroup),f=!!(n!=null&&n.isGroup),{candidate:d,centerApprox:l}=at(s,e,"start"),{candidate:g,centerApprox:m}=at(s,n,"end");let E=c&&D(a,d),y=f&&D(u,g);ct(s,"start",E&&l),ct(s,"end",y&&m),c&&!E&&(E=lt(s,a,"start")),f&&!y&&(y=lt(s,u,"end")),E||y?(E||Be(s,e,a,r),y||Ge(s,n,u,r),r.debug("PPP cutter2: skipping cutter2 due to on-border group endpoint(s)",{skipStart:E,skipEnd:y,startCenterApprox:l,endCenterApprox:m,startCandidate:d,endCandidate:g}),o=s):o=Fe(e,n,s,r)}if(r.debug("PPP cutter2: Points after cutter2:",JSON.stringify(o)),!Array.isArray(o)||o.length<2||Ie(o)){r.warn("POI cutter2: Invalid points from cutter2, falling back to prevPoints",o);const a=s.filter(u=>Number.isFinite(u==null?void 0:u.x)&&Number.isFinite(u==null?void 0:u.y));o=a.length>=2?a:s}return r.debug("UIO cutter2: Points after cutter2 (sanitized):",o),Me(o,r)}h(st,"sanitizeElkEdgePoints");function Ie(t){return t==null?void 0:t.some(e=>!Number.isFinite(e==null?void 0:e.x)||!Number.isFinite(e==null?void 0:e.y))}h(Ie,"hasInvalidPoint");function Me(t,e){const n=t.filter((r,s,i)=>{if(s===0)return!0;const o=i[s-1];return Math.abs(r.x-o.x)>1e-6||Math.abs(r.y-o.y)>1e-6});return n.length!==t.length&&e.debug("UIO cutter2: removed consecutive duplicate points",{before:t,after:n}),n}h(Me,"dedupeConsecutivePoints");function ve(t){return Ht(t.arrowTypeEnd)}h(ve,"getEndMarkerPathOffset");function Ae(t){return Ht(t.arrowTypeStart)}h(Ae,"getStartMarkerPathOffset");function Pe(t,e,n,r){if(n<=0||t.length<3)return t;const s=t[0],i=t[1],o=Math.hypot(i.x-s.x,i.y-s.y);if(o>=Math.max(Ut,n*2)||!D(e,i,1))return t;const a=[s,...t.slice(2)];return r.debug("UIO cutter2: removed short start marker segment",{before:t,after:a,markerOffset:n,segmentLength:o}),a}h(Pe,"ensureStartMarkerSegmentLength");function Ne(t,e,n,r){if(n<=0||t.length<3)return t;const s=t[t.length-1],i=t[t.length-2],o=Math.hypot(s.x-i.x,s.y-i.y);if(o>=Math.max(Ut,n*2)||!D(e,i,1))return t;const a=[...t.slice(0,-2),s];return r.debug("UIO cutter2: removed short end marker segment",{before:t,after:a,markerOffset:n,segmentLength:o}),a}h(Ne,"ensureEndMarkerSegmentLength");function Le(t,e){const n=t.edges.defaultInterpolate,r=t.edges.defaultStyle,s=e.getConfig();t.edges.forEach(i=>{const o=De(i,{defaultStyle:r,defaultInterpolate:n,confCurve:s.curve},e);Object.assign(i,o)})}h(Le,"applyElkEdgeRenderData");function Re(t){if(t.classes!==void 0)return t.classes;if(t.start&&t.end)return`flowchart-link LS_${t.start} LE_${t.end}`}h(Re,"buildFallbackEdgeClasses");function _e(t,e,n){let r="normal",s="solid",i=[],o=[];return t==="dotted"?(s="dotted",i=["fill:none","stroke-width:2px","stroke-dasharray:3"]):t==="thick"?(r="thick",i=["stroke-width: 3.5px","fill:none"]):(i=e??["fill:none"],n!==void 0&&(o=n)),{thickness:r,pattern:s,style:i,labelStyle:o}}h(_e,"computeStroke");function Te(t,e,n){return t!==void 0?t:e!==void 0?e:n}h(Te,"getCurve");function De(t,e,n){const r={};r.minlen=t.minlen??t.length??1,r.text=t.text??t.label,r.arrowhead=t.arrowhead??(t.type==="arrow_open"?"none":"normal");const s=Tt[t.type??"arrow_open"]??Tt.arrow_open;r.arrowTypeStart=t.arrowTypeStart??s[0],r.arrowTypeEnd=t.arrowTypeEnd??s[1],r.startLabelRight=t.startLabelRight,r.endLabelLeft=t.endLabelLeft;const i=_e(t.stroke,e.defaultStyle,e.defaultLabelStyle);r.thickness=t.thickness??i.thickness,r.pattern=t.pattern??i.pattern,r.style=t.style??i.style,r.labelStyle=t.labelStyle??i.labelStyle,r.classes=Re(t),r.curve=n.interpolateToCurve(Te(t.curve??t.interpolate,e.defaultInterpolate,e.confCurve),ze);const o=(r.text??"")!=="";return t.arrowheadStyle!==void 0?r.arrowheadStyle=t.arrowheadStyle:(o||t.style!==void 0)&&(r.arrowheadStyle="fill: #333"),r.labelpos=t.labelpos??(o?"c":void 0),r.labelType=t.labelType,r.label=(t.label??r.text??"").replace(n.common.lineBreakRegex,`
|
|
2
2
|
`),r}h(De,"buildEdgeData");function Ce(t){return Math.max(t.width??0,j(t))}h(Ce,"getEffectiveGroupWidth");function I(t){const e=t!=null&&t.isGroup?Ce(t):t.width;return{x:t.offset.posX+t.width/2,y:t.offset.posY+t.height/2,width:e??0,height:t.height??0,padding:t.padding}}h(I,"boundsFor");function it(t,e,n=1e-6){return Math.abs(t-e)<n}h(it,"approxEq");function ot(t,e){return it(t.x,e.x??0)&&it(t.y,e.y??0)}h(ot,"isCenterApprox");function at(t,e,n){if(!(t!=null&&t.length))return{candidate:{x:e.x??0,y:e.y??0},centerApprox:!0};if(n==="start"){const r=t[0],s=ot(r,e);return{candidate:s&&t.length>1?t[1]:r,centerApprox:s}}else{const r=t[t.length-1],s=ot(r,e);return{candidate:s&&t.length>1?t[t.length-2]:r,centerApprox:s}}}h(at,"getCandidateBorderPoint");function ct(t,e,n){n&&(e==="start"?t.length>0&&t.shift():t.length>0&&t.pop())}h(ct,"dropAutoCenterPoint");function lt(t,e,n){const r=n==="start"?1:-1;let s=n==="start"?0:t.length-1;const i=s;for(;s>=0&&s<t.length&&!B(e,t[s]);)s+=r;if(s===i||s<0||s>=t.length)return!1;const o=t[s],a=t[s-r],u=o.x-a.x,c=o.y-a.y,f=u===0?1/0:(e.x+Math.sign(u)*e.width/2-a.x)/u,d=c===0?1/0:(e.y+Math.sign(c)*e.height/2-a.y)/c,l=Math.min(f,d),g={x:a.x+l*u,y:a.y+l*c};return n==="start"?t.splice(0,s,g):t.splice(s+1,t.length-s-1,g),!0}h(lt,"clipGroupEndpoint");function Be(t,e,n,r){let s=-1;for(const[i,o]of t.entries())if(B(n,o)){s=i;break}if(s!==-1){const i=t[s],o=t[0],a=U(e,n,i,o);H(t,"start",a),r.debug("UIO cutter2: start-only intersection applied",{startIntersection:a})}}h(Be,"applyStartIntersectionIfNeeded");function Ge(t,e,n,r){let s=-1;for(let i=t.length-1;i>=0;i--)if(B(n,t[i])){s=i;break}if(s!==-1){const i=t[s],o=t[t.length-1],a=U(e,n,i,o);H(t,"end",a),r.debug("UIO cutter2: end-only intersection applied",{endIntersection:a})}}h(Ge,"applyEndIntersectionIfNeeded");function ut(t,e,n,r,s){if(t!=null&&t.isGroup)return null;const i=n[r],o=n[r+s];return!i||!o?null:un(t,e,i,o)}h(ut,"attachAlongDepartureAxis");function Fe(t,e,n,r){const s=I(t),i=I(e);if(n.length===0)return[];const o=[...n],a=o[0],u=o[o.length-1];r.debug("PPP cutter2: bounds",{startBounds:s,endBounds:i}),r.debug("PPP cutter2: original points",n);let c=-1;for(const[l,g]of o.entries())c===-1&&B(s,g)&&(c=l);if(c!==-1){const l=o[c],g=ut(t,s,o,c,1)??U(t,s,l,a);r.debug("UIO cutter2: start intersection",g),H(o,"start",g)}let f=null,d=-1;for(let l=o.length-1;l>=0;l--)if(B(i,o[l])){f=o[l],d=l;break}if(!f&&o.length>1&&(f=o[o.length-2],d=o.length-2),f){const l=ut(e,i,o,d,-1)??U(e,i,f,u);r.debug("UIO cutter2: end intersection",{endIntersection:l,outsideIndexForEnd:d}),H(o,"end",l)}if(o.length>1){const l=o[o.length-1],g=o[o.length-2],m=Math.sqrt((l.x-g.x)**2+(l.y-g.y)**2);m<2&&(r.debug("UIO cutter2: trimming tail point (too close)",{distance:m,lastPoint:l,secondLastPoint:g}),o.pop())}return r.debug("UIO cutter2: final points",o),o}h(Fe,"cutter2");export{On as render};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Ut}from"./chunk-XXDRQBXY-B_JAqY4C.js";import{s as Kt}from"./chunk-TU62E6Q5-Di5_cwgX.js";import{_ as f,K as Tt,b as Zt,a as jt,s as qt,g as Wt,q as Ht,t as Qt,c as tt,l as F,m as Xt,z as Jt,y as $t,B as te,C as ee,D as se,L as ie,F as re,G as ae,M as ne,p as oe,r as le,k as ce,u as he}from"./mermaid.core-DjpUkD1z.js";import"./index-DPTOk3jB.js";import"./_commonjsHelpers-CqkleIqs.js";var Ot=(function(){var s=f(function(G,n,h,d){for(h=h||{},d=G.length;d--;h[G[d]]=n);return h},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],o=[2,2],l=[1,7],r=[1,9],c=[1,10],y=[1,11],g=[1,12],k=[1,30],N=[1,23],p=[1,24],b=[1,25],A=[1,26],v=[1,27],x=[1,19],T=[1,28],I=[1,29],C=[1,20],D=[1,18],L=[1,21],w=[1,22],Nt=[2,6],u=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],Z=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],V=[1,46],M=[1,47],j=[1,57],q=[43,51,53,54,55,74,75],W=[1,70],H=[1,68],B=[1,65],Q=[1,69],X=[1,71],et=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],st=[1,78],it=[1,77],rt=[1,76],xt=[69,70,71,72,73],Ct=[1,91],At=[6,9,45,50],z=[6,9,12,44,45,50,51,52],at=[1,101],nt=[1,100],ot=[1,99],J=[18,61],It=[1,110],Rt=[1,109],vt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",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",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:f(function(n,h,d,i,_,t,$){var e=t.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=t[e-1].concat(t[e]);break;case 4:this.$=t[e];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[e-4]),i.addEntity(t[e-2]),i.addRelationship(t[e-4],t[e],t[e-2],t[e-3]),this.$=[t[e-4],t[e-2]];break;case 8:i.addEntity(t[e-8]),i.addEntity(t[e-4]),i.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),i.setClass([t[e-8]],t[e-6]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-8],t[e-4]];break;case 9:i.addEntity(t[e-6]),i.addEntity(t[e-2]),i.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),i.setClass([t[e-6]],t[e-4]),this.$=[t[e-6],t[e-2]];break;case 10:i.addEntity(t[e-6]),i.addEntity(t[e-4]),i.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-6],t[e-4]];break;case 11:i.addEntity(t[e-3]),i.addAttributes(t[e-3],t[e-1]),this.$=[t[e-3]];break;case 12:i.addEntity(t[e-5]),i.addAttributes(t[e-5],t[e-1]),i.setClass([t[e-5]],t[e-3]),this.$=[t[e-5]];break;case 13:i.addEntity(t[e-2]),this.$=[t[e-2]];break;case 14:i.addEntity(t[e-4]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-4]];break;case 15:i.addEntity(t[e]),this.$=[t[e]];break;case 16:i.addEntity(t[e-2]),i.setClass([t[e-2]],t[e]),this.$=[t[e-2]];break;case 17:i.addEntity(t[e-6],t[e-4]),i.addAttributes(t[e-6],t[e-1]),this.$=[t[e-6]];break;case 18:i.addEntity(t[e-8],t[e-6]),i.addAttributes(t[e-8],t[e-1]),i.setClass([t[e-8]],t[e-3]),this.$=[t[e-8]];break;case 19:i.addEntity(t[e-5],t[e-3]),this.$=[t[e-5]];break;case 20:i.addEntity(t[e-7],t[e-5]),i.setClass([t[e-7]],t[e-2]),this.$=[t[e-7]];break;case 21:i.addEntity(t[e-3],t[e-1]);break;case 22:i.addEntity(t[e-5],t[e-3]),i.setClass([t[e-5]],t[e]);break;case 23:case 24:this.$=t[e].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[e].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[e]:(i.setDirection(t[e].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[e-2].id},t[e-1],{text:t[e-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-1],text:t[e-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-4],text:t[e-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[e];break;case 35:this.$=t[e-1]+" "+t[e];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[e-3],i.addClass(t[e-2],t[e-1]);break;case 41:case 42:case 63:case 72:this.$=[t[e]];break;case 43:case 44:this.$=t[e-2].concat([t[e]]);break;case 45:this.$=t[e-2],i.setClass(t[e-1],t[e]);break;case 46:this.$=t[e-3],i.addCssStyles(t[e-2],t[e-1]);break;case 47:this.$=[t[e]];break;case 48:t[e-2].push(t[e]),this.$=t[e-2];break;case 50:this.$=t[e-1]+t[e];break;case 58:case 84:case 85:this.$=t[e].replace(/"/g,"");break;case 64:t[e].push(t[e-1]),this.$=t[e];break;case 65:this.$={type:t[e-1],name:t[e]};break;case 66:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 67:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 68:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 69:case 71:case 74:this.$=t[e];break;case 70:this.$=t[e-1]+t[e];break;case 73:t[e-2].push(t[e]),this.$=t[e-2];break;case 75:this.$=t[e].replace(/"/g,"");break;case 76:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(a,o,{5:3}),{6:[1,4],7:5,8:6,9:l,10:8,21:r,23:c,25:y,27:g,28:13,29:14,30:15,31:16,32:17,34:k,37:N,38:p,39:b,40:A,41:v,43:x,46:T,47:I,51:C,53:D,54:L,55:w},s(a,Nt,{1:[2,1]}),s(u,[2,3]),s(u,[2,4]),s(u,[2,5]),s(u,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(u,[2,26]),s(u,[2,27]),s(u,[2,28]),s(u,[2,29]),s(u,[2,30]),s(u,o,{5:44}),s(Z,[2,58]),s(Z,[2,59]),s(Z,[2,60]),s(Z,[2,61]),s(Z,[2,62]),s(u,[2,36]),s(u,[2,37]),s(u,[2,38]),s(u,[2,39]),{15:45,43:V,44:M},{15:48,43:V,44:M},{15:49,43:V,44:M},{10:50,43:x,51:C,53:D,54:L,55:w},{10:51,43:x,51:C,53:D,54:L,55:w},{15:52,43:V,44:M},{17:53,18:[1,54],56:55,57:56,61:j},{10:58,43:x,51:C,53:D,54:L,55:w},{68:59,74:[1,60],75:[1,61]},s(q,[2,77]),s(q,[2,78]),s(q,[2,79]),s(q,[2,80]),s(q,[2,81]),s(u,[2,23]),s(u,[2,24]),s(u,[2,25]),{6:[1,63],7:5,8:6,9:l,10:8,21:r,23:c,25:y,27:g,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:k,37:N,38:p,39:b,40:A,41:v,43:x,46:T,47:I,51:C,53:D,54:L,55:w},{12:W,42:64,44:H,45:B,48:66,49:67,51:Q,52:X},s(et,[2,41]),s(et,[2,42]),{15:72,43:V,44:M,45:B},{12:W,42:73,44:H,45:B,48:66,49:67,51:Q,52:X},{6:st,9:it,19:[1,75],35:74,50:rt},{12:[1,79],14:[1,80]},s(u,[2,16],{67:35,11:81,16:[1,82],45:B,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},s(u,[2,13]),{17:84,18:[2,63],56:55,57:56,61:j},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},s(xt,[2,82]),s(xt,[2,83]),s(u,[2,31]),s(u,Nt),{6:st,9:it,35:90,45:Ct,50:rt},{43:[1,92],44:[1,93]},s(At,[2,47],{49:94,12:W,44:H,51:Q,52:X}),s(z,[2,49]),s(z,[2,54]),s(z,[2,55]),s(z,[2,56]),s(z,[2,57]),s(u,[2,45],{45:B}),{6:st,9:it,35:95,45:Ct,50:rt},s(u,[2,32]),{10:97,36:96,43:x,51:C,53:D,54:L,55:w},s(u,[2,51]),s(u,[2,52]),s(u,[2,53]),{13:98,43:at,53:nt,76:ot},{15:102,43:V,44:M},{10:103,43:x,51:C,53:D,54:L,55:w},{17:104,18:[1,105],56:55,57:56,61:j},s(u,[2,11]),{18:[2,64]},s(J,[2,65],{59:106,60:107,63:108,65:It,66:Rt}),s([18,61,65,66],[2,71]),{61:[2,70]},s(u,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(u,[2,40]),{12:W,44:H,48:113,49:67,51:Q,52:X},s(et,[2,43]),s(et,[2,44]),s(z,[2,50]),s(u,[2,46]),{10:115,20:[1,114],43:x,51:C,53:D,54:L,55:w},s(vt,[2,34]),s(u,[2,7]),s(u,[2,84]),s(u,[2,85]),s(u,[2,86]),{12:[1,116],45:B},{12:[1,118],14:[1,117]},{18:[1,119]},s(u,[2,14]),s(J,[2,66],{60:120,64:[1,121],66:Rt}),s(J,[2,67]),s(yt,[2,72]),s(J,[2,75]),s(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:j},{15:124,43:V,44:M},s(At,[2,48],{49:94,12:W,44:H,51:Q,52:X}),{6:st,9:it,35:125,50:rt},s(vt,[2,35]),{13:126,43:at,53:nt,76:ot},{15:127,43:V,44:M},{13:128,43:at,53:nt,76:ot},s(u,[2,12]),s(J,[2,68]),{63:129,65:It},{18:[1,130]},s(u,[2,19]),s(u,[2,22],{16:[1,131],45:B}),s(u,[2,33]),s(u,[2,10]),{12:[1,132],45:B},s(u,[2,9]),s(yt,[2,73]),s(u,[2,17]),{17:133,18:[1,134],56:55,57:56,61:j},{13:135,43:at,53:nt,76:ot},{18:[1,136]},s(u,[2,20]),s(u,[2,8]),s(u,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:f(function(n,h){if(h.recoverable)this.trace(n);else{var d=new Error(n);throw d.hash=h,d}},"parseError"),parse:f(function(n){var h=this,d=[0],i=[],_=[null],t=[],$=this.table,e="",ct=0,Dt=0,Ft=2,Lt=1,Yt=t.slice.call(arguments,1),m=Object.create(this.lexer),Y={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(Y.yy[kt]=this.yy[kt]);m.setInput(n,Y.yy),Y.yy.lexer=m,Y.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var mt=m.yylloc;t.push(mt);var Pt=m.options&&m.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zt(S){d.length=d.length-2*S,_.length=_.length-S,t.length=t.length-S}f(zt,"popStack");function wt(){var S;return S=i.pop()||m.lex()||Lt,typeof S!="number"&&(S instanceof Array&&(i=S,S=i.pop()),S=h.symbols_[S]||S),S}f(wt,"lex");for(var E,P,O,Et,U={},ht,R,Vt,ut;;){if(P=d[d.length-1],this.defaultActions[P]?O=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=wt()),O=$[P]&&$[P][E]),typeof O>"u"||!O.length||!O[0]){var St="";ut=[];for(ht in $[P])this.terminals_[ht]&&ht>Ft&&ut.push("'"+this.terminals_[ht]+"'");m.showPosition?St="Parse error on line "+(ct+1)+`:
|
|
1
|
+
import{g as Ut}from"./chunk-XXDRQBXY-DU6jFvHG.js";import{s as Kt}from"./chunk-TU62E6Q5-e2yCDokg.js";import{_ as f,K as Tt,b as Zt,a as jt,s as qt,g as Wt,q as Ht,t as Qt,c as tt,l as F,m as Xt,z as Jt,y as $t,B as te,C as ee,D as se,L as ie,F as re,G as ae,M as ne,p as oe,r as le,k as ce,u as he}from"./mermaid.core-CFBl9TP8.js";import"./index-CM1F7OtV.js";import"./_commonjsHelpers-CqkleIqs.js";var Ot=(function(){var s=f(function(G,n,h,d){for(h=h||{},d=G.length;d--;h[G[d]]=n);return h},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],o=[2,2],l=[1,7],r=[1,9],c=[1,10],y=[1,11],g=[1,12],k=[1,30],N=[1,23],p=[1,24],b=[1,25],A=[1,26],v=[1,27],x=[1,19],T=[1,28],I=[1,29],C=[1,20],D=[1,18],L=[1,21],w=[1,22],Nt=[2,6],u=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],dt=[1,36],pt=[1,37],ft=[1,38],bt=[1,39],gt=[1,40],Z=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],V=[1,46],M=[1,47],j=[1,57],q=[43,51,53,54,55,74,75],W=[1,70],H=[1,68],B=[1,65],Q=[1,69],X=[1,71],et=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],st=[1,78],it=[1,77],rt=[1,76],xt=[69,70,71,72,73],Ct=[1,91],At=[6,9,45,50],z=[6,9,12,44,45,50,51,52],at=[1,101],nt=[1,100],ot=[1,99],J=[18,61],It=[1,110],Rt=[1,109],vt=[20,43,51,53,54,55],yt=[18,61,64,66],_t={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",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",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:f(function(n,h,d,i,_,t,$){var e=t.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=t[e-1].concat(t[e]);break;case 4:this.$=t[e];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[e-4]),i.addEntity(t[e-2]),i.addRelationship(t[e-4],t[e],t[e-2],t[e-3]),this.$=[t[e-4],t[e-2]];break;case 8:i.addEntity(t[e-8]),i.addEntity(t[e-4]),i.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),i.setClass([t[e-8]],t[e-6]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-8],t[e-4]];break;case 9:i.addEntity(t[e-6]),i.addEntity(t[e-2]),i.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),i.setClass([t[e-6]],t[e-4]),this.$=[t[e-6],t[e-2]];break;case 10:i.addEntity(t[e-6]),i.addEntity(t[e-4]),i.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-6],t[e-4]];break;case 11:i.addEntity(t[e-3]),i.addAttributes(t[e-3],t[e-1]),this.$=[t[e-3]];break;case 12:i.addEntity(t[e-5]),i.addAttributes(t[e-5],t[e-1]),i.setClass([t[e-5]],t[e-3]),this.$=[t[e-5]];break;case 13:i.addEntity(t[e-2]),this.$=[t[e-2]];break;case 14:i.addEntity(t[e-4]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-4]];break;case 15:i.addEntity(t[e]),this.$=[t[e]];break;case 16:i.addEntity(t[e-2]),i.setClass([t[e-2]],t[e]),this.$=[t[e-2]];break;case 17:i.addEntity(t[e-6],t[e-4]),i.addAttributes(t[e-6],t[e-1]),this.$=[t[e-6]];break;case 18:i.addEntity(t[e-8],t[e-6]),i.addAttributes(t[e-8],t[e-1]),i.setClass([t[e-8]],t[e-3]),this.$=[t[e-8]];break;case 19:i.addEntity(t[e-5],t[e-3]),this.$=[t[e-5]];break;case 20:i.addEntity(t[e-7],t[e-5]),i.setClass([t[e-7]],t[e-2]),this.$=[t[e-7]];break;case 21:i.addEntity(t[e-3],t[e-1]);break;case 22:i.addEntity(t[e-5],t[e-3]),i.setClass([t[e-5]],t[e]);break;case 23:case 24:this.$=t[e].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[e].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[e]:(i.setDirection(t[e].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[e-2].id},t[e-1],{text:t[e-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-1],text:t[e-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-4],text:t[e-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[e];break;case 35:this.$=t[e-1]+" "+t[e];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[e-3],i.addClass(t[e-2],t[e-1]);break;case 41:case 42:case 63:case 72:this.$=[t[e]];break;case 43:case 44:this.$=t[e-2].concat([t[e]]);break;case 45:this.$=t[e-2],i.setClass(t[e-1],t[e]);break;case 46:this.$=t[e-3],i.addCssStyles(t[e-2],t[e-1]);break;case 47:this.$=[t[e]];break;case 48:t[e-2].push(t[e]),this.$=t[e-2];break;case 50:this.$=t[e-1]+t[e];break;case 58:case 84:case 85:this.$=t[e].replace(/"/g,"");break;case 64:t[e].push(t[e-1]),this.$=t[e];break;case 65:this.$={type:t[e-1],name:t[e]};break;case 66:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 67:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 68:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 69:case 71:case 74:this.$=t[e];break;case 70:this.$=t[e-1]+t[e];break;case 73:t[e-2].push(t[e]),this.$=t[e-2];break;case 75:this.$=t[e].replace(/"/g,"");break;case 76:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(a,o,{5:3}),{6:[1,4],7:5,8:6,9:l,10:8,21:r,23:c,25:y,27:g,28:13,29:14,30:15,31:16,32:17,34:k,37:N,38:p,39:b,40:A,41:v,43:x,46:T,47:I,51:C,53:D,54:L,55:w},s(a,Nt,{1:[2,1]}),s(u,[2,3]),s(u,[2,4]),s(u,[2,5]),s(u,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:dt,70:pt,71:ft,72:bt,73:gt}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(u,[2,26]),s(u,[2,27]),s(u,[2,28]),s(u,[2,29]),s(u,[2,30]),s(u,o,{5:44}),s(Z,[2,58]),s(Z,[2,59]),s(Z,[2,60]),s(Z,[2,61]),s(Z,[2,62]),s(u,[2,36]),s(u,[2,37]),s(u,[2,38]),s(u,[2,39]),{15:45,43:V,44:M},{15:48,43:V,44:M},{15:49,43:V,44:M},{10:50,43:x,51:C,53:D,54:L,55:w},{10:51,43:x,51:C,53:D,54:L,55:w},{15:52,43:V,44:M},{17:53,18:[1,54],56:55,57:56,61:j},{10:58,43:x,51:C,53:D,54:L,55:w},{68:59,74:[1,60],75:[1,61]},s(q,[2,77]),s(q,[2,78]),s(q,[2,79]),s(q,[2,80]),s(q,[2,81]),s(u,[2,23]),s(u,[2,24]),s(u,[2,25]),{6:[1,63],7:5,8:6,9:l,10:8,21:r,23:c,25:y,27:g,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:k,37:N,38:p,39:b,40:A,41:v,43:x,46:T,47:I,51:C,53:D,54:L,55:w},{12:W,42:64,44:H,45:B,48:66,49:67,51:Q,52:X},s(et,[2,41]),s(et,[2,42]),{15:72,43:V,44:M,45:B},{12:W,42:73,44:H,45:B,48:66,49:67,51:Q,52:X},{6:st,9:it,19:[1,75],35:74,50:rt},{12:[1,79],14:[1,80]},s(u,[2,16],{67:35,11:81,16:[1,82],45:B,69:dt,70:pt,71:ft,72:bt,73:gt}),{18:[1,83]},s(u,[2,13]),{17:84,18:[2,63],56:55,57:56,61:j},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:dt,70:pt,71:ft,72:bt,73:gt},s(xt,[2,82]),s(xt,[2,83]),s(u,[2,31]),s(u,Nt),{6:st,9:it,35:90,45:Ct,50:rt},{43:[1,92],44:[1,93]},s(At,[2,47],{49:94,12:W,44:H,51:Q,52:X}),s(z,[2,49]),s(z,[2,54]),s(z,[2,55]),s(z,[2,56]),s(z,[2,57]),s(u,[2,45],{45:B}),{6:st,9:it,35:95,45:Ct,50:rt},s(u,[2,32]),{10:97,36:96,43:x,51:C,53:D,54:L,55:w},s(u,[2,51]),s(u,[2,52]),s(u,[2,53]),{13:98,43:at,53:nt,76:ot},{15:102,43:V,44:M},{10:103,43:x,51:C,53:D,54:L,55:w},{17:104,18:[1,105],56:55,57:56,61:j},s(u,[2,11]),{18:[2,64]},s(J,[2,65],{59:106,60:107,63:108,65:It,66:Rt}),s([18,61,65,66],[2,71]),{61:[2,70]},s(u,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(u,[2,40]),{12:W,44:H,48:113,49:67,51:Q,52:X},s(et,[2,43]),s(et,[2,44]),s(z,[2,50]),s(u,[2,46]),{10:115,20:[1,114],43:x,51:C,53:D,54:L,55:w},s(vt,[2,34]),s(u,[2,7]),s(u,[2,84]),s(u,[2,85]),s(u,[2,86]),{12:[1,116],45:B},{12:[1,118],14:[1,117]},{18:[1,119]},s(u,[2,14]),s(J,[2,66],{60:120,64:[1,121],66:Rt}),s(J,[2,67]),s(yt,[2,72]),s(J,[2,75]),s(yt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:j},{15:124,43:V,44:M},s(At,[2,48],{49:94,12:W,44:H,51:Q,52:X}),{6:st,9:it,35:125,50:rt},s(vt,[2,35]),{13:126,43:at,53:nt,76:ot},{15:127,43:V,44:M},{13:128,43:at,53:nt,76:ot},s(u,[2,12]),s(J,[2,68]),{63:129,65:It},{18:[1,130]},s(u,[2,19]),s(u,[2,22],{16:[1,131],45:B}),s(u,[2,33]),s(u,[2,10]),{12:[1,132],45:B},s(u,[2,9]),s(yt,[2,73]),s(u,[2,17]),{17:133,18:[1,134],56:55,57:56,61:j},{13:135,43:at,53:nt,76:ot},{18:[1,136]},s(u,[2,20]),s(u,[2,8]),s(u,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:f(function(n,h){if(h.recoverable)this.trace(n);else{var d=new Error(n);throw d.hash=h,d}},"parseError"),parse:f(function(n){var h=this,d=[0],i=[],_=[null],t=[],$=this.table,e="",ct=0,Dt=0,Ft=2,Lt=1,Yt=t.slice.call(arguments,1),m=Object.create(this.lexer),Y={yy:{}};for(var kt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,kt)&&(Y.yy[kt]=this.yy[kt]);m.setInput(n,Y.yy),Y.yy.lexer=m,Y.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var mt=m.yylloc;t.push(mt);var Pt=m.options&&m.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function zt(S){d.length=d.length-2*S,_.length=_.length-S,t.length=t.length-S}f(zt,"popStack");function wt(){var S;return S=i.pop()||m.lex()||Lt,typeof S!="number"&&(S instanceof Array&&(i=S,S=i.pop()),S=h.symbols_[S]||S),S}f(wt,"lex");for(var E,P,O,Et,U={},ht,R,Vt,ut;;){if(P=d[d.length-1],this.defaultActions[P]?O=this.defaultActions[P]:((E===null||typeof E>"u")&&(E=wt()),O=$[P]&&$[P][E]),typeof O>"u"||!O.length||!O[0]){var St="";ut=[];for(ht in $[P])this.terminals_[ht]&&ht>Ft&&ut.push("'"+this.terminals_[ht]+"'");m.showPosition?St="Parse error on line "+(ct+1)+`:
|
|
2
2
|
`+m.showPosition()+`
|
|
3
3
|
Expecting `+ut.join(", ")+", got '"+(this.terminals_[E]||E)+"'":St="Parse error on line "+(ct+1)+": Unexpected "+(E==Lt?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(St,{text:m.match,token:this.terminals_[E]||E,line:m.yylineno,loc:mt,expected:ut})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+E);switch(O[0]){case 1:d.push(E),_.push(m.yytext),t.push(m.yylloc),d.push(O[1]),E=null,Dt=m.yyleng,e=m.yytext,ct=m.yylineno,mt=m.yylloc;break;case 2:if(R=this.productions_[O[1]][1],U.$=_[_.length-R],U._$={first_line:t[t.length-(R||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(R||1)].first_column,last_column:t[t.length-1].last_column},Pt&&(U._$.range=[t[t.length-(R||1)].range[0],t[t.length-1].range[1]]),Et=this.performAction.apply(U,[e,Dt,ct,Y.yy,O[1],_,t].concat(Yt)),typeof Et<"u")return Et;R&&(d=d.slice(0,-1*R*2),_=_.slice(0,-1*R),t=t.slice(0,-1*R)),d.push(this.productions_[O[1]][0]),_.push(U.$),t.push(U._$),Vt=$[d[d.length-2]][d[d.length-1]],d.push(Vt);break;case 3:return!0}}return!0},"parse")},Gt=(function(){var G={EOF:1,parseError:f(function(h,d){if(this.yy.parser)this.yy.parser.parseError(h,d);else throw new Error(h)},"parseError"),setInput:f(function(n,h){return this.yy=h||this.yy||{},this._input=n,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:f(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var h=n.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:f(function(n){var h=n.length,d=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var i=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),d.length-1&&(this.yylineno-=d.length-1);var _=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:d?(d.length===i.length?this.yylloc.first_column:0)+i[i.length-d.length].length-d[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(n){this.unput(this.match.slice(n))},"less"),pastInput:f(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var n=this.pastInput(),h=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Jt}from"./chunk-5VM5RSS4-
|
|
1
|
+
import{g as Jt}from"./chunk-5VM5RSS4-BNCdpRtw.js";import{g as Zt}from"./chunk-XXDRQBXY-DU6jFvHG.js";import{s as $t}from"./chunk-TU62E6Q5-e2yCDokg.js";import{_ as m,o as e1,l as $,c as Ce,p as t1,r as s1,u as at,b as i1,s as r1,q as a1,a as n1,g as u1,t as o1,m as l1,v as c1,J as h1,b9 as st,x as d1,y as it,k as rt,z as p1,ba as f1,A as g1,B as b1,C as k1,D as A1,E as m1,F as C1,G as S1}from"./mermaid.core-CFBl9TP8.js";import{c as T1}from"./chunk-HFQBQIA3-D8sImu8E.js";import{g as D1}from"./index-CM1F7OtV.js";var y1="flowchart-",x1=["laneRole","laneIndex","drawnExtent"];function zt(s){if(!s||typeof s!="object")return s;const i={...s};for(const n of x1)Reflect.deleteProperty(i,n);return i}m(zt,"withoutInternalKeys");var ze,E1=(ze=class{constructor(){this.vertexCounter=0,this.config=Ce(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=i1,this.setAccDescription=r1,this.setDiagramTitle=a1,this.getAccTitle=n1,this.getAccDescription=u1,this.getDiagramTitle=o1,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")}sanitizeText(i){return l1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const n of this.vertices.values())if(n.id===i)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,n,a,r,u,f,c={},b){var C,y;if(!i||i.trim().length===0)return;let o;if(b!==void 0){let S;b.includes(`
|
|
2
2
|
`)?S=b+`
|
|
3
3
|
`:S=`{
|
|
4
4
|
`+b+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as be,s as we,t as _e,q as De,a as Se,b as Ce,_ as l,c as dt,k as vt,d as Me,b5 as U,l as st,m as Ee,I as Ie,z as $e,u as Ae}from"./mermaid.core-DjpUkD1z.js";import{g as It}from"./_commonjsHelpers-CqkleIqs.js";import{t as Ye,m as Fe,a as Le,l as Oe,h as We,c as Zt,d as Qt,e as Pe,g as Ve,i as ze,j as Re,k as Ne,n as He,p as Be,q as Kt,r as Jt,s as te,u as ee,v as re}from"./d3-scale-4DPf7zan.js";import"./index-DPTOk3jB.js";function qe(t){return t}var Tt=1,At=2,Ft=3,xt=4,se=1e-6;function Ge(t){return"translate("+t+",0)"}function je(t){return"translate(0,"+t+")"}function Xe(t){return e=>+t(e)}function Ue(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),s=>+t(s)+e}function Ze(){return!this.__axis}function de(t,e){var s=[],r=null,i=null,g=6,y=6,b=3,S=typeof window<"u"&&window.devicePixelRatio>1?0:.5,L=t===Tt||t===xt?-1:1,_=t===xt||t===At?"x":"y",W=t===Tt||t===Ft?Ge:je;function w(D){var N=r??(e.ticks?e.ticks.apply(e,s):e.domain()),V=i??(e.tickFormat?e.tickFormat.apply(e,s):qe),k=Math.max(g,0)+b,M=e.range(),P=+M[0]+S,O=+M[M.length-1]+S,B=(e.bandwidth?Ue:Xe)(e.copy(),S),H=D.selection?D.selection():D,I=H.selectAll(".domain").data([null]),x=H.selectAll(".tick").data(N,e).order(),h=x.exit(),E=x.enter().append("g").attr("class","tick"),f=x.select("line"),T=x.select("text");I=I.merge(I.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),f=f.merge(E.append("line").attr("stroke","currentColor").attr(_+"2",L*g)),T=T.merge(E.append("text").attr("fill","currentColor").attr(_,L*k).attr("dy",t===Tt?"0em":t===Ft?"0.71em":"0.32em")),D!==H&&(I=I.transition(D),x=x.transition(D),f=f.transition(D),T=T.transition(D),h=h.transition(D).attr("opacity",se).attr("transform",function(v){return isFinite(v=B(v))?W(v+S):this.getAttribute("transform")}),E.attr("opacity",se).attr("transform",function(v){var p=this.parentNode.__axis;return W((p&&isFinite(p=p(v))?p:B(v))+S)})),h.remove(),I.attr("d",t===xt||t===At?y?"M"+L*y+","+P+"H"+S+"V"+O+"H"+L*y:"M"+S+","+P+"V"+O:y?"M"+P+","+L*y+"V"+S+"H"+O+"V"+L*y:"M"+P+","+S+"H"+O),x.attr("opacity",1).attr("transform",function(v){return W(B(v)+S)}),f.attr(_+"2",L*g),T.attr(_,L*k).text(V),H.filter(Ze).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===At?"start":t===xt?"end":"middle"),H.each(function(){this.__axis=B})}return w.scale=function(D){return arguments.length?(e=D,w):e},w.ticks=function(){return s=Array.from(arguments),w},w.tickArguments=function(D){return arguments.length?(s=D==null?[]:Array.from(D),w):s.slice()},w.tickValues=function(D){return arguments.length?(r=D==null?null:Array.from(D),w):r&&r.slice()},w.tickFormat=function(D){return arguments.length?(i=D,w):i},w.tickSize=function(D){return arguments.length?(g=y=+D,w):g},w.tickSizeInner=function(D){return arguments.length?(g=+D,w):g},w.tickSizeOuter=function(D){return arguments.length?(y=+D,w):y},w.tickPadding=function(D){return arguments.length?(b=+D,w):b},w.offset=function(D){return arguments.length?(S=+D,w):S},w}function Qe(t){return de(Tt,t)}function Ke(t){return de(Ft,t)}var bt={exports:{}},Je=bt.exports,ne;function tr(){return ne||(ne=1,(function(t,e){(function(s,r){t.exports=r()})(Je,(function(){var s="day";return function(r,i,g){var y=function(L){return L.add(4-L.isoWeekday(),s)},b=i.prototype;b.isoWeekYear=function(){return y(this).year()},b.isoWeek=function(L){if(!this.$utils().u(L))return this.add(7*(L-this.isoWeek()),s);var _,W,w,D,N=y(this),V=(_=this.isoWeekYear(),W=this.$u,w=(W?g.utc:g)().year(_).startOf("year"),D=4-w.isoWeekday(),w.isoWeekday()>4&&(D+=7),w.add(D,s));return N.diff(V,"week")+1},b.isoWeekday=function(L){return this.$utils().u(L)?this.day()||7:this.day(this.day()%7?L:L-7)};var S=b.startOf;b.startOf=function(L,_){var W=this.$utils(),w=!!W.u(_)||_;return W.p(L)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):S.bind(this)(L,_)}}}))})(bt)),bt.exports}var er=tr();const rr=It(er);var wt={exports:{}},sr=wt.exports,ie;function nr(){return ie||(ie=1,(function(t,e){(function(s,r){t.exports=r()})(sr,(function(){var s={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,g=/\d\d/,y=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,S={},L=function(k){return(k=+k)+(k>68?1900:2e3)},_=function(k){return function(M){this[k]=+M}},W=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=(function(M){if(!M||M==="Z")return 0;var P=M.match(/([+-]|\d\d)/g),O=60*P[1]+(+P[2]||0);return O===0?0:P[0]==="+"?-O:O})(k)}],w=function(k){var M=S[k];return M&&(M.indexOf?M:M.s.concat(M.f))},D=function(k,M){var P,O=S.meridiem;if(O){for(var B=1;B<=24;B+=1)if(k.indexOf(O(B,0,M))>-1){P=B>12;break}}else P=k===(M?"pm":"PM");return P},N={A:[b,function(k){this.afternoon=D(k,!1)}],a:[b,function(k){this.afternoon=D(k,!0)}],Q:[i,function(k){this.month=3*(k-1)+1}],S:[i,function(k){this.milliseconds=100*+k}],SS:[g,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[y,_("seconds")],ss:[y,_("seconds")],m:[y,_("minutes")],mm:[y,_("minutes")],H:[y,_("hours")],h:[y,_("hours")],HH:[y,_("hours")],hh:[y,_("hours")],D:[y,_("day")],DD:[g,_("day")],Do:[b,function(k){var M=S.ordinal,P=k.match(/\d+/);if(this.day=P[0],M)for(var O=1;O<=31;O+=1)M(O).replace(/\[|\]/g,"")===k&&(this.day=O)}],w:[y,_("week")],ww:[g,_("week")],M:[y,_("month")],MM:[g,_("month")],MMM:[b,function(k){var M=w("months"),P=(w("monthsShort")||M.map((function(O){return O.slice(0,3)}))).indexOf(k)+1;if(P<1)throw new Error;this.month=P%12||P}],MMMM:[b,function(k){var M=w("months").indexOf(k)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,_("year")],YY:[g,function(k){this.year=L(k)}],YYYY:[/\d{4}/,_("year")],Z:W,ZZ:W};function V(k){var M,P;M=k,P=S&&S.formats;for(var O=(k=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(f,T,v){var p=v&&v.toUpperCase();return T||P[v]||s[v]||P[p].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(a,d,m){return d||m.slice(1)}))}))).match(r),B=O.length,H=0;H<B;H+=1){var I=O[H],x=N[I],h=x&&x[0],E=x&&x[1];O[H]=E?{regex:h,parser:E}:I.replace(/^\[|\]$/g,"")}return function(f){for(var T={},v=0,p=0;v<B;v+=1){var a=O[v];if(typeof a=="string")p+=a.length;else{var d=a.regex,m=a.parser,u=f.slice(p),C=d.exec(u)[0];m.call(T,C),f=f.replace(C,"")}}return(function(n){var $=n.afternoon;if($!==void 0){var o=n.hours;$?o<12&&(n.hours+=12):o===12&&(n.hours=0),delete n.afternoon}})(T),T}}return function(k,M,P){P.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(L=k.parseTwoDigitYear);var O=M.prototype,B=O.parse;O.parse=function(H){var I=H.date,x=H.utc,h=H.args;this.$u=x;var E=h[1];if(typeof E=="string"){var f=h[2]===!0,T=h[3]===!0,v=f||T,p=h[2];T&&(p=h[2]),S=this.$locale(),!f&&p&&(S=P.Ls[p]),this.$d=(function(u,C,n,$){try{if(["x","X"].indexOf(C)>-1)return new Date((C==="X"?1e3:1)*u);var o=V(C)(u),G=o.year,c=o.month,A=o.day,Y=o.hours,R=o.minutes,F=o.seconds,q=o.milliseconds,z=o.zone,nt=o.week,at=new Date,yt=A||(G||c?1:at.getDate()),lt=G||at.getFullYear(),j=0;G&&!c||(j=c>0?c-1:at.getMonth());var K,Z=Y||0,ot=R||0,J=F||0,it=q||0;return z?new Date(Date.UTC(lt,j,yt,Z,ot,J,it+60*z.offset*1e3)):n?new Date(Date.UTC(lt,j,yt,Z,ot,J,it)):(K=new Date(lt,j,yt,Z,ot,J,it),nt&&(K=$(K).week(nt).toDate()),K)}catch{return new Date("")}})(I,E,x,P),this.init(),p&&p!==!0&&(this.$L=this.locale(p).$L),v&&I!=this.format(E)&&(this.$d=new Date("")),S={}}else if(E instanceof Array)for(var a=E.length,d=1;d<=a;d+=1){h[1]=E[d-1];var m=P.apply(this,h);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}d===a&&(this.$d=new Date(""))}else B.call(this,H)}}}))})(wt)),wt.exports}var ir=nr();const ar=It(ir);var _t={exports:{}},or=_t.exports,ae;function cr(){return ae||(ae=1,(function(t,e){(function(s,r){t.exports=r()})(or,(function(){return function(s,r){var i=r.prototype,g=i.format;i.format=function(y){var b=this,S=this.$locale();if(!this.isValid())return g.bind(this)(y);var L=this.$utils(),_=(y||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(W){switch(W){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return S.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return S.ordinal(b.week(),"W");case"w":case"ww":return L.s(b.week(),W==="w"?1:2,"0");case"W":case"WW":return L.s(b.isoWeek(),W==="W"?1:2,"0");case"k":case"kk":return L.s(String(b.$H===0?24:b.$H),W==="k"?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return W}}));return g.bind(this)(_)}}}))})(_t)),_t.exports}var lr=cr();const ur=It(lr);var Dt={exports:{}},dr=Dt.exports,oe;function fr(){return oe||(oe=1,(function(t,e){(function(s,r){t.exports=r()})(dr,(function(){var s,r,i=1e3,g=6e4,y=36e5,b=864e5,S=31536e6,L=2628e6,_=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,W=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,w={years:S,months:L,days:b,hours:y,minutes:g,seconds:i,milliseconds:1,weeks:6048e5},D=function(I){return I instanceof B},N=function(I,x,h){return new B(I,h,x.$l)},V=function(I){return r.p(I)+"s"},k=function(I){return I<0},M=function(I){return k(I)?Math.ceil(I):Math.floor(I)},P=function(I){return Math.abs(I)},O=function(I,x){return I?k(I)?{negative:!0,format:""+P(I)+x}:{negative:!1,format:""+I+x}:{negative:!1,format:""}},B=(function(){function I(h,E,f){var T=this;if(this.$d={},this.$l=f,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),E)return N(h*w[V(E)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(a){T.$d[V(a)]=h[a]})),this.calMilliseconds(),this;if(typeof h=="string"){var v=h.match(_);if(v){var p=v.slice(2).map((function(a){return a!=null?Number(a):0}));return this.$d.years=p[0],this.$d.months=p[1],this.$d.weeks=p[2],this.$d.days=p[3],this.$d.hours=p[4],this.$d.minutes=p[5],this.$d.seconds=p[6],this.calMilliseconds(),this}}return this}var x=I.prototype;return x.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(E,f){return E+(h.$d[f]||0)*w[f]}),0)},x.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/S),h%=S,this.$d.months=M(h/L),h%=L,this.$d.days=M(h/b),h%=b,this.$d.hours=M(h/y),h%=y,this.$d.minutes=M(h/g),h%=g,this.$d.seconds=M(h/i),h%=i,this.$d.milliseconds=h},x.toISOString=function(){var h=O(this.$d.years,"Y"),E=O(this.$d.months,"M"),f=+this.$d.days||0;this.$d.weeks&&(f+=7*this.$d.weeks);var T=O(f,"D"),v=O(this.$d.hours,"H"),p=O(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var d=O(a,"S"),m=h.negative||E.negative||T.negative||v.negative||p.negative||d.negative,u=v.format||p.format||d.format?"T":"",C=(m?"-":"")+"P"+h.format+E.format+T.format+u+v.format+p.format+d.format;return C==="P"||C==="-P"?"P0D":C},x.toJSON=function(){return this.toISOString()},x.format=function(h){var E=h||"YYYY-MM-DDTHH:mm:ss",f={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return E.replace(W,(function(T,v){return v||String(f[T])}))},x.as=function(h){return this.$ms/w[V(h)]},x.get=function(h){var E=this.$ms,f=V(h);return f==="milliseconds"?E%=1e3:E=f==="weeks"?M(E/w[f]):this.$d[f],E||0},x.add=function(h,E,f){var T;return T=E?h*w[V(E)]:D(h)?h.$ms:N(h,this).$ms,N(this.$ms+T*(f?-1:1),this)},x.subtract=function(h,E){return this.add(h,E,!0)},x.locale=function(h){var E=this.clone();return E.$l=h,E},x.clone=function(){return N(this.$ms,this)},x.humanize=function(h){return s().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},x.valueOf=function(){return this.asMilliseconds()},x.milliseconds=function(){return this.get("milliseconds")},x.asMilliseconds=function(){return this.as("milliseconds")},x.seconds=function(){return this.get("seconds")},x.asSeconds=function(){return this.as("seconds")},x.minutes=function(){return this.get("minutes")},x.asMinutes=function(){return this.as("minutes")},x.hours=function(){return this.get("hours")},x.asHours=function(){return this.as("hours")},x.days=function(){return this.get("days")},x.asDays=function(){return this.as("days")},x.weeks=function(){return this.get("weeks")},x.asWeeks=function(){return this.as("weeks")},x.months=function(){return this.get("months")},x.asMonths=function(){return this.as("months")},x.years=function(){return this.get("years")},x.asYears=function(){return this.as("years")},I})(),H=function(I,x,h){return I.add(x.years()*h,"y").add(x.months()*h,"M").add(x.days()*h,"d").add(x.hours()*h,"h").add(x.minutes()*h,"m").add(x.seconds()*h,"s").add(x.milliseconds()*h,"ms")};return function(I,x,h){s=h,r=h().$utils(),h.duration=function(T,v){var p=h.locale();return N(T,{$l:p},v)},h.isDuration=D;var E=x.prototype.add,f=x.prototype.subtract;x.prototype.add=function(T,v){return D(T)?H(this,T,1):E.bind(this)(T,v)},x.prototype.subtract=function(T,v){return D(T)?H(this,T,-1):f.bind(this)(T,v)}}}))})(Dt)),Dt.exports}var hr=fr();const mr=It(hr);var Lt=(function(){var t=l(function(p,a,d,m){for(d=d||{},m=p.length;m--;d[p[m]]=a);return d},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],s=[1,26],r=[1,27],i=[1,28],g=[1,29],y=[1,30],b=[1,31],S=[1,32],L=[1,33],_=[1,34],W=[1,9],w=[1,10],D=[1,11],N=[1,12],V=[1,13],k=[1,14],M=[1,15],P=[1,16],O=[1,19],B=[1,20],H=[1,21],I=[1,22],x=[1,23],h=[1,25],E=[1,35],f={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(a,d,m,u,C,n,$){var o=n.length-1;switch(C){case 1:return n[o-1];case 2:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:this.$=n[o];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=n[o].substr(18);break;case 19:u.TopAxis(),this.$=n[o].substr(8);break;case 20:u.setAxisFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 21:u.setTickInterval(n[o].substr(13)),this.$=n[o].substr(13);break;case 22:u.setExcludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 23:u.setIncludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 24:u.setTodayMarker(n[o].substr(12)),this.$=n[o].substr(12);break;case 27:u.setDiagramTitle(n[o].substr(6)),this.$=n[o].substr(6);break;case 28:this.$=n[o].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=n[o].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(n[o].substr(8)),this.$=n[o].substr(8);break;case 33:u.addTask(n[o-1],n[o]),this.$="task";break;case 34:this.$=n[o-1],u.setClickEvent(n[o-1],n[o],null);break;case 35:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],n[o]);break;case 36:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],null),u.setLink(n[o-2],n[o]);break;case 37:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-2],n[o-1]),u.setLink(n[o-3],n[o]);break;case 38:this.$=n[o-2],u.setClickEvent(n[o-2],n[o],null),u.setLink(n[o-2],n[o-1]);break;case 39:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-1],n[o]),u.setLink(n[o-3],n[o-2]);break;case 40:this.$=n[o-1],u.setLink(n[o-1],n[o]);break;case 41:case 47:this.$=n[o-1]+" "+n[o];break;case 42:case 43:case 45:this.$=n[o-2]+" "+n[o-1]+" "+n[o];break;case 44:case 46:this.$=n[o-3]+" "+n[o-2]+" "+n[o-1]+" "+n[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:l(function(a,d){if(d.recoverable)this.trace(a);else{var m=new Error(a);throw m.hash=d,m}},"parseError"),parse:l(function(a){var d=this,m=[0],u=[],C=[null],n=[],$=this.table,o="",G=0,c=0,A=2,Y=1,R=n.slice.call(arguments,1),F=Object.create(this.lexer),q={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(q.yy[z]=this.yy[z]);F.setInput(a,q.yy),q.yy.lexer=F,q.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var nt=F.yylloc;n.push(nt);var at=F.options&&F.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(Q){m.length=m.length-2*Q,C.length=C.length-Q,n.length=n.length-Q}l(yt,"popStack");function lt(){var Q;return Q=u.pop()||F.lex()||Y,typeof Q!="number"&&(Q instanceof Array&&(u=Q,Q=u.pop()),Q=d.symbols_[Q]||Q),Q}l(lt,"lex");for(var j,K,Z,ot,J={},it,tt,Ut,pt;;){if(K=m[m.length-1],this.defaultActions[K]?Z=this.defaultActions[K]:((j===null||typeof j>"u")&&(j=lt()),Z=$[K]&&$[K][j]),typeof Z>"u"||!Z.length||!Z[0]){var $t="";pt=[];for(it in $[K])this.terminals_[it]&&it>A&&pt.push("'"+this.terminals_[it]+"'");F.showPosition?$t="Parse error on line "+(G+1)+`:
|
|
1
|
+
import{g as be,s as we,t as _e,q as De,a as Se,b as Ce,_ as l,c as dt,k as vt,d as Me,b5 as U,l as st,m as Ee,I as Ie,z as $e,u as Ae}from"./mermaid.core-CFBl9TP8.js";import{g as It}from"./_commonjsHelpers-CqkleIqs.js";import{t as Ye,m as Fe,a as Le,l as Oe,h as We,c as Zt,d as Qt,e as Pe,g as Ve,i as ze,j as Re,k as Ne,n as He,p as Be,q as Kt,r as Jt,s as te,u as ee,v as re}from"./d3-scale-4DPf7zan.js";import"./index-CM1F7OtV.js";function qe(t){return t}var Tt=1,At=2,Ft=3,xt=4,se=1e-6;function Ge(t){return"translate("+t+",0)"}function je(t){return"translate(0,"+t+")"}function Xe(t){return e=>+t(e)}function Ue(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),s=>+t(s)+e}function Ze(){return!this.__axis}function de(t,e){var s=[],r=null,i=null,g=6,y=6,b=3,S=typeof window<"u"&&window.devicePixelRatio>1?0:.5,L=t===Tt||t===xt?-1:1,_=t===xt||t===At?"x":"y",W=t===Tt||t===Ft?Ge:je;function w(D){var N=r??(e.ticks?e.ticks.apply(e,s):e.domain()),V=i??(e.tickFormat?e.tickFormat.apply(e,s):qe),k=Math.max(g,0)+b,M=e.range(),P=+M[0]+S,O=+M[M.length-1]+S,B=(e.bandwidth?Ue:Xe)(e.copy(),S),H=D.selection?D.selection():D,I=H.selectAll(".domain").data([null]),x=H.selectAll(".tick").data(N,e).order(),h=x.exit(),E=x.enter().append("g").attr("class","tick"),f=x.select("line"),T=x.select("text");I=I.merge(I.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),f=f.merge(E.append("line").attr("stroke","currentColor").attr(_+"2",L*g)),T=T.merge(E.append("text").attr("fill","currentColor").attr(_,L*k).attr("dy",t===Tt?"0em":t===Ft?"0.71em":"0.32em")),D!==H&&(I=I.transition(D),x=x.transition(D),f=f.transition(D),T=T.transition(D),h=h.transition(D).attr("opacity",se).attr("transform",function(v){return isFinite(v=B(v))?W(v+S):this.getAttribute("transform")}),E.attr("opacity",se).attr("transform",function(v){var p=this.parentNode.__axis;return W((p&&isFinite(p=p(v))?p:B(v))+S)})),h.remove(),I.attr("d",t===xt||t===At?y?"M"+L*y+","+P+"H"+S+"V"+O+"H"+L*y:"M"+S+","+P+"V"+O:y?"M"+P+","+L*y+"V"+S+"H"+O+"V"+L*y:"M"+P+","+S+"H"+O),x.attr("opacity",1).attr("transform",function(v){return W(B(v)+S)}),f.attr(_+"2",L*g),T.attr(_,L*k).text(V),H.filter(Ze).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===At?"start":t===xt?"end":"middle"),H.each(function(){this.__axis=B})}return w.scale=function(D){return arguments.length?(e=D,w):e},w.ticks=function(){return s=Array.from(arguments),w},w.tickArguments=function(D){return arguments.length?(s=D==null?[]:Array.from(D),w):s.slice()},w.tickValues=function(D){return arguments.length?(r=D==null?null:Array.from(D),w):r&&r.slice()},w.tickFormat=function(D){return arguments.length?(i=D,w):i},w.tickSize=function(D){return arguments.length?(g=y=+D,w):g},w.tickSizeInner=function(D){return arguments.length?(g=+D,w):g},w.tickSizeOuter=function(D){return arguments.length?(y=+D,w):y},w.tickPadding=function(D){return arguments.length?(b=+D,w):b},w.offset=function(D){return arguments.length?(S=+D,w):S},w}function Qe(t){return de(Tt,t)}function Ke(t){return de(Ft,t)}var bt={exports:{}},Je=bt.exports,ne;function tr(){return ne||(ne=1,(function(t,e){(function(s,r){t.exports=r()})(Je,(function(){var s="day";return function(r,i,g){var y=function(L){return L.add(4-L.isoWeekday(),s)},b=i.prototype;b.isoWeekYear=function(){return y(this).year()},b.isoWeek=function(L){if(!this.$utils().u(L))return this.add(7*(L-this.isoWeek()),s);var _,W,w,D,N=y(this),V=(_=this.isoWeekYear(),W=this.$u,w=(W?g.utc:g)().year(_).startOf("year"),D=4-w.isoWeekday(),w.isoWeekday()>4&&(D+=7),w.add(D,s));return N.diff(V,"week")+1},b.isoWeekday=function(L){return this.$utils().u(L)?this.day()||7:this.day(this.day()%7?L:L-7)};var S=b.startOf;b.startOf=function(L,_){var W=this.$utils(),w=!!W.u(_)||_;return W.p(L)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):S.bind(this)(L,_)}}}))})(bt)),bt.exports}var er=tr();const rr=It(er);var wt={exports:{}},sr=wt.exports,ie;function nr(){return ie||(ie=1,(function(t,e){(function(s,r){t.exports=r()})(sr,(function(){var s={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,g=/\d\d/,y=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,S={},L=function(k){return(k=+k)+(k>68?1900:2e3)},_=function(k){return function(M){this[k]=+M}},W=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=(function(M){if(!M||M==="Z")return 0;var P=M.match(/([+-]|\d\d)/g),O=60*P[1]+(+P[2]||0);return O===0?0:P[0]==="+"?-O:O})(k)}],w=function(k){var M=S[k];return M&&(M.indexOf?M:M.s.concat(M.f))},D=function(k,M){var P,O=S.meridiem;if(O){for(var B=1;B<=24;B+=1)if(k.indexOf(O(B,0,M))>-1){P=B>12;break}}else P=k===(M?"pm":"PM");return P},N={A:[b,function(k){this.afternoon=D(k,!1)}],a:[b,function(k){this.afternoon=D(k,!0)}],Q:[i,function(k){this.month=3*(k-1)+1}],S:[i,function(k){this.milliseconds=100*+k}],SS:[g,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[y,_("seconds")],ss:[y,_("seconds")],m:[y,_("minutes")],mm:[y,_("minutes")],H:[y,_("hours")],h:[y,_("hours")],HH:[y,_("hours")],hh:[y,_("hours")],D:[y,_("day")],DD:[g,_("day")],Do:[b,function(k){var M=S.ordinal,P=k.match(/\d+/);if(this.day=P[0],M)for(var O=1;O<=31;O+=1)M(O).replace(/\[|\]/g,"")===k&&(this.day=O)}],w:[y,_("week")],ww:[g,_("week")],M:[y,_("month")],MM:[g,_("month")],MMM:[b,function(k){var M=w("months"),P=(w("monthsShort")||M.map((function(O){return O.slice(0,3)}))).indexOf(k)+1;if(P<1)throw new Error;this.month=P%12||P}],MMMM:[b,function(k){var M=w("months").indexOf(k)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,_("year")],YY:[g,function(k){this.year=L(k)}],YYYY:[/\d{4}/,_("year")],Z:W,ZZ:W};function V(k){var M,P;M=k,P=S&&S.formats;for(var O=(k=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(f,T,v){var p=v&&v.toUpperCase();return T||P[v]||s[v]||P[p].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(a,d,m){return d||m.slice(1)}))}))).match(r),B=O.length,H=0;H<B;H+=1){var I=O[H],x=N[I],h=x&&x[0],E=x&&x[1];O[H]=E?{regex:h,parser:E}:I.replace(/^\[|\]$/g,"")}return function(f){for(var T={},v=0,p=0;v<B;v+=1){var a=O[v];if(typeof a=="string")p+=a.length;else{var d=a.regex,m=a.parser,u=f.slice(p),C=d.exec(u)[0];m.call(T,C),f=f.replace(C,"")}}return(function(n){var $=n.afternoon;if($!==void 0){var o=n.hours;$?o<12&&(n.hours+=12):o===12&&(n.hours=0),delete n.afternoon}})(T),T}}return function(k,M,P){P.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(L=k.parseTwoDigitYear);var O=M.prototype,B=O.parse;O.parse=function(H){var I=H.date,x=H.utc,h=H.args;this.$u=x;var E=h[1];if(typeof E=="string"){var f=h[2]===!0,T=h[3]===!0,v=f||T,p=h[2];T&&(p=h[2]),S=this.$locale(),!f&&p&&(S=P.Ls[p]),this.$d=(function(u,C,n,$){try{if(["x","X"].indexOf(C)>-1)return new Date((C==="X"?1e3:1)*u);var o=V(C)(u),G=o.year,c=o.month,A=o.day,Y=o.hours,R=o.minutes,F=o.seconds,q=o.milliseconds,z=o.zone,nt=o.week,at=new Date,yt=A||(G||c?1:at.getDate()),lt=G||at.getFullYear(),j=0;G&&!c||(j=c>0?c-1:at.getMonth());var K,Z=Y||0,ot=R||0,J=F||0,it=q||0;return z?new Date(Date.UTC(lt,j,yt,Z,ot,J,it+60*z.offset*1e3)):n?new Date(Date.UTC(lt,j,yt,Z,ot,J,it)):(K=new Date(lt,j,yt,Z,ot,J,it),nt&&(K=$(K).week(nt).toDate()),K)}catch{return new Date("")}})(I,E,x,P),this.init(),p&&p!==!0&&(this.$L=this.locale(p).$L),v&&I!=this.format(E)&&(this.$d=new Date("")),S={}}else if(E instanceof Array)for(var a=E.length,d=1;d<=a;d+=1){h[1]=E[d-1];var m=P.apply(this,h);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}d===a&&(this.$d=new Date(""))}else B.call(this,H)}}}))})(wt)),wt.exports}var ir=nr();const ar=It(ir);var _t={exports:{}},or=_t.exports,ae;function cr(){return ae||(ae=1,(function(t,e){(function(s,r){t.exports=r()})(or,(function(){return function(s,r){var i=r.prototype,g=i.format;i.format=function(y){var b=this,S=this.$locale();if(!this.isValid())return g.bind(this)(y);var L=this.$utils(),_=(y||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(W){switch(W){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return S.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return S.ordinal(b.week(),"W");case"w":case"ww":return L.s(b.week(),W==="w"?1:2,"0");case"W":case"WW":return L.s(b.isoWeek(),W==="W"?1:2,"0");case"k":case"kk":return L.s(String(b.$H===0?24:b.$H),W==="k"?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return W}}));return g.bind(this)(_)}}}))})(_t)),_t.exports}var lr=cr();const ur=It(lr);var Dt={exports:{}},dr=Dt.exports,oe;function fr(){return oe||(oe=1,(function(t,e){(function(s,r){t.exports=r()})(dr,(function(){var s,r,i=1e3,g=6e4,y=36e5,b=864e5,S=31536e6,L=2628e6,_=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,W=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,w={years:S,months:L,days:b,hours:y,minutes:g,seconds:i,milliseconds:1,weeks:6048e5},D=function(I){return I instanceof B},N=function(I,x,h){return new B(I,h,x.$l)},V=function(I){return r.p(I)+"s"},k=function(I){return I<0},M=function(I){return k(I)?Math.ceil(I):Math.floor(I)},P=function(I){return Math.abs(I)},O=function(I,x){return I?k(I)?{negative:!0,format:""+P(I)+x}:{negative:!1,format:""+I+x}:{negative:!1,format:""}},B=(function(){function I(h,E,f){var T=this;if(this.$d={},this.$l=f,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),E)return N(h*w[V(E)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(a){T.$d[V(a)]=h[a]})),this.calMilliseconds(),this;if(typeof h=="string"){var v=h.match(_);if(v){var p=v.slice(2).map((function(a){return a!=null?Number(a):0}));return this.$d.years=p[0],this.$d.months=p[1],this.$d.weeks=p[2],this.$d.days=p[3],this.$d.hours=p[4],this.$d.minutes=p[5],this.$d.seconds=p[6],this.calMilliseconds(),this}}return this}var x=I.prototype;return x.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(E,f){return E+(h.$d[f]||0)*w[f]}),0)},x.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=M(h/S),h%=S,this.$d.months=M(h/L),h%=L,this.$d.days=M(h/b),h%=b,this.$d.hours=M(h/y),h%=y,this.$d.minutes=M(h/g),h%=g,this.$d.seconds=M(h/i),h%=i,this.$d.milliseconds=h},x.toISOString=function(){var h=O(this.$d.years,"Y"),E=O(this.$d.months,"M"),f=+this.$d.days||0;this.$d.weeks&&(f+=7*this.$d.weeks);var T=O(f,"D"),v=O(this.$d.hours,"H"),p=O(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var d=O(a,"S"),m=h.negative||E.negative||T.negative||v.negative||p.negative||d.negative,u=v.format||p.format||d.format?"T":"",C=(m?"-":"")+"P"+h.format+E.format+T.format+u+v.format+p.format+d.format;return C==="P"||C==="-P"?"P0D":C},x.toJSON=function(){return this.toISOString()},x.format=function(h){var E=h||"YYYY-MM-DDTHH:mm:ss",f={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return E.replace(W,(function(T,v){return v||String(f[T])}))},x.as=function(h){return this.$ms/w[V(h)]},x.get=function(h){var E=this.$ms,f=V(h);return f==="milliseconds"?E%=1e3:E=f==="weeks"?M(E/w[f]):this.$d[f],E||0},x.add=function(h,E,f){var T;return T=E?h*w[V(E)]:D(h)?h.$ms:N(h,this).$ms,N(this.$ms+T*(f?-1:1),this)},x.subtract=function(h,E){return this.add(h,E,!0)},x.locale=function(h){var E=this.clone();return E.$l=h,E},x.clone=function(){return N(this.$ms,this)},x.humanize=function(h){return s().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},x.valueOf=function(){return this.asMilliseconds()},x.milliseconds=function(){return this.get("milliseconds")},x.asMilliseconds=function(){return this.as("milliseconds")},x.seconds=function(){return this.get("seconds")},x.asSeconds=function(){return this.as("seconds")},x.minutes=function(){return this.get("minutes")},x.asMinutes=function(){return this.as("minutes")},x.hours=function(){return this.get("hours")},x.asHours=function(){return this.as("hours")},x.days=function(){return this.get("days")},x.asDays=function(){return this.as("days")},x.weeks=function(){return this.get("weeks")},x.asWeeks=function(){return this.as("weeks")},x.months=function(){return this.get("months")},x.asMonths=function(){return this.as("months")},x.years=function(){return this.get("years")},x.asYears=function(){return this.as("years")},I})(),H=function(I,x,h){return I.add(x.years()*h,"y").add(x.months()*h,"M").add(x.days()*h,"d").add(x.hours()*h,"h").add(x.minutes()*h,"m").add(x.seconds()*h,"s").add(x.milliseconds()*h,"ms")};return function(I,x,h){s=h,r=h().$utils(),h.duration=function(T,v){var p=h.locale();return N(T,{$l:p},v)},h.isDuration=D;var E=x.prototype.add,f=x.prototype.subtract;x.prototype.add=function(T,v){return D(T)?H(this,T,1):E.bind(this)(T,v)},x.prototype.subtract=function(T,v){return D(T)?H(this,T,-1):f.bind(this)(T,v)}}}))})(Dt)),Dt.exports}var hr=fr();const mr=It(hr);var Lt=(function(){var t=l(function(p,a,d,m){for(d=d||{},m=p.length;m--;d[p[m]]=a);return d},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],s=[1,26],r=[1,27],i=[1,28],g=[1,29],y=[1,30],b=[1,31],S=[1,32],L=[1,33],_=[1,34],W=[1,9],w=[1,10],D=[1,11],N=[1,12],V=[1,13],k=[1,14],M=[1,15],P=[1,16],O=[1,19],B=[1,20],H=[1,21],I=[1,22],x=[1,23],h=[1,25],E=[1,35],f={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(a,d,m,u,C,n,$){var o=n.length-1;switch(C){case 1:return n[o-1];case 2:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:this.$=n[o];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=n[o].substr(18);break;case 19:u.TopAxis(),this.$=n[o].substr(8);break;case 20:u.setAxisFormat(n[o].substr(11)),this.$=n[o].substr(11);break;case 21:u.setTickInterval(n[o].substr(13)),this.$=n[o].substr(13);break;case 22:u.setExcludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 23:u.setIncludes(n[o].substr(9)),this.$=n[o].substr(9);break;case 24:u.setTodayMarker(n[o].substr(12)),this.$=n[o].substr(12);break;case 27:u.setDiagramTitle(n[o].substr(6)),this.$=n[o].substr(6);break;case 28:this.$=n[o].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=n[o].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(n[o].substr(8)),this.$=n[o].substr(8);break;case 33:u.addTask(n[o-1],n[o]),this.$="task";break;case 34:this.$=n[o-1],u.setClickEvent(n[o-1],n[o],null);break;case 35:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],n[o]);break;case 36:this.$=n[o-2],u.setClickEvent(n[o-2],n[o-1],null),u.setLink(n[o-2],n[o]);break;case 37:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-2],n[o-1]),u.setLink(n[o-3],n[o]);break;case 38:this.$=n[o-2],u.setClickEvent(n[o-2],n[o],null),u.setLink(n[o-2],n[o-1]);break;case 39:this.$=n[o-3],u.setClickEvent(n[o-3],n[o-1],n[o]),u.setLink(n[o-3],n[o-2]);break;case 40:this.$=n[o-1],u.setLink(n[o-1],n[o]);break;case 41:case 47:this.$=n[o-1]+" "+n[o];break;case 42:case 43:case 45:this.$=n[o-2]+" "+n[o-1]+" "+n[o];break;case 44:case 46:this.$=n[o-3]+" "+n[o-2]+" "+n[o-1]+" "+n[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:s,13:r,14:i,15:g,16:y,17:b,18:S,19:18,20:L,21:_,22:W,23:w,24:D,25:N,26:V,27:k,28:M,29:P,30:O,31:B,33:H,35:I,36:x,37:24,38:h,40:E},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:l(function(a,d){if(d.recoverable)this.trace(a);else{var m=new Error(a);throw m.hash=d,m}},"parseError"),parse:l(function(a){var d=this,m=[0],u=[],C=[null],n=[],$=this.table,o="",G=0,c=0,A=2,Y=1,R=n.slice.call(arguments,1),F=Object.create(this.lexer),q={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(q.yy[z]=this.yy[z]);F.setInput(a,q.yy),q.yy.lexer=F,q.yy.parser=this,typeof F.yylloc>"u"&&(F.yylloc={});var nt=F.yylloc;n.push(nt);var at=F.options&&F.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(Q){m.length=m.length-2*Q,C.length=C.length-Q,n.length=n.length-Q}l(yt,"popStack");function lt(){var Q;return Q=u.pop()||F.lex()||Y,typeof Q!="number"&&(Q instanceof Array&&(u=Q,Q=u.pop()),Q=d.symbols_[Q]||Q),Q}l(lt,"lex");for(var j,K,Z,ot,J={},it,tt,Ut,pt;;){if(K=m[m.length-1],this.defaultActions[K]?Z=this.defaultActions[K]:((j===null||typeof j>"u")&&(j=lt()),Z=$[K]&&$[K][j]),typeof Z>"u"||!Z.length||!Z[0]){var $t="";pt=[];for(it in $[K])this.terminals_[it]&&it>A&&pt.push("'"+this.terminals_[it]+"'");F.showPosition?$t="Parse error on line "+(G+1)+`:
|
|
2
2
|
`+F.showPosition()+`
|
|
3
3
|
Expecting `+pt.join(", ")+", got '"+(this.terminals_[j]||j)+"'":$t="Parse error on line "+(G+1)+": Unexpected "+(j==Y?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError($t,{text:F.match,token:this.terminals_[j]||j,line:F.yylineno,loc:nt,expected:pt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+j);switch(Z[0]){case 1:m.push(j),C.push(F.yytext),n.push(F.yylloc),m.push(Z[1]),j=null,c=F.yyleng,o=F.yytext,G=F.yylineno,nt=F.yylloc;break;case 2:if(tt=this.productions_[Z[1]][1],J.$=C[C.length-tt],J._$={first_line:n[n.length-(tt||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(tt||1)].first_column,last_column:n[n.length-1].last_column},at&&(J._$.range=[n[n.length-(tt||1)].range[0],n[n.length-1].range[1]]),ot=this.performAction.apply(J,[o,c,G,q.yy,Z[1],C,n].concat(R)),typeof ot<"u")return ot;tt&&(m=m.slice(0,-1*tt*2),C=C.slice(0,-1*tt),n=n.slice(0,-1*tt)),m.push(this.productions_[Z[1]][0]),C.push(J.$),n.push(J._$),Ut=$[m[m.length-2]][m[m.length-1]],m.push(Ut);break;case 3:return!0}}return!0},"parse")},T=(function(){var p={EOF:1,parseError:l(function(d,m){if(this.yy.parser)this.yy.parser.parseError(d,m);else throw new Error(d)},"parseError"),setInput:l(function(a,d){return this.yy=d||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var d=a.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:l(function(a){var d=a.length,m=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var u=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),m.length-1&&(this.yylineno-=m.length-1);var C=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:m?(m.length===u.length?this.yylloc.first_column:0)+u[u.length-m.length].length-m[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(a){this.unput(this.match.slice(a))},"less"),pastInput:l(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var a=this.pastInput(),d=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
package/web/assets/{gitGraphDiagram-STJD7YCW-Dida84g9.js → gitGraphDiagram-STJD7YCW-Cll-SkVb.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{I as he}from"./chunk-2Q5K7J3B-D4joGaMo.js";import{p as $e}from"./chunk-JWPE2WC7-YRiv3Zg6.js";import{t as fe,q as ge,s as ue,g as ye,a as xe,b as me,_ as $,N as J,l as k,k as pe,c as z,u as be,O as we,z as ke,m as L,P as ve,Q as Ee,R as Ce}from"./mermaid.core-DjpUkD1z.js";import{p as Be}from"./cynefin-EF2NZ3EQ-Dav5gSV6.js";import"./index-DPTOk3jB.js";import"./_commonjsHelpers-CqkleIqs.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=Ee.gitGraph,D=$(()=>ve({...Te,...J().gitGraph}),"getConfig"),i=new he(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ce({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),Ie=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Se=$(function(){i.reset(),ke()},"clear"),Ae=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),Pe=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=$(function(){return i.records.currBranch},"getCurrentBranch"),We=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Re,commit:Ie,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Se,getBranchesAsObjArray:Ae,getBranches:De,getCommits:Pe,getCommitsArray:se,getCurrentBranch:qe,getDirection:We,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{$e(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Be("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,I=2,S=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Q=12,ee=new Set(["redux-color","redux-dark-color"]),Qe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),A=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Je=$(()=>{B.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Qe.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${A(s,S,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${A(s,S,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${A(s,S,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-I).attr("y",t.y+13.5).attr("width",h.width+2*I).attr("height",h.height+2*I),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{I as he}from"./chunk-2Q5K7J3B-DUFwqu3B.js";import{p as $e}from"./chunk-JWPE2WC7-BhL2yBgo.js";import{t as fe,q as ge,s as ue,g as ye,a as xe,b as me,_ as $,N as J,l as k,k as pe,c as z,u as be,O as we,z as ke,m as L,P as ve,Q as Ee,R as Ce}from"./mermaid.core-CFBl9TP8.js";import{p as Be}from"./cynefin-EF2NZ3EQ-BiYmPyip.js";import"./index-CM1F7OtV.js";import"./_commonjsHelpers-CqkleIqs.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=Ee.gitGraph,D=$(()=>ve({...Te,...J().gitGraph}),"getConfig"),i=new he(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ce({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),Ie=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Se=$(function(){i.reset(),ke()},"clear"),Ae=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),Pe=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=$(function(){return i.records.currBranch},"getCurrentBranch"),We=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Re,commit:Ie,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Se,getBranchesAsObjArray:Ae,getBranches:De,getCommits:Pe,getCommitsArray:se,getCurrentBranch:qe,getDirection:We,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{$e(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Be("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,I=2,S=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Q=12,ee=new Set(["redux-color","redux-dark-color"]),Qe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),A=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Je=$(()=>{B.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Qe.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${A(s,S,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${A(s,S,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${A(s,S,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-I).attr("y",t.y+13.5).attr("width",h.width+2*I).attr("height",h.height+2*I),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${o-n/2-M/2},${u+I}
|
|
3
3
|
${o-n/2-M/2},${u-I}
|
|
4
4
|
${t.posWithOffset-n/2-M},${u-x-I}
|