@i14ks/ccv 0.43.1 → 0.45.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/THIRD-PARTY-NOTICES.md +1726 -62
- package/bundle/ccv.mjs +2813 -453
- package/package.json +1 -1
- package/web/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/web/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/web/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/web/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/web/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/web/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/web/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/web/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/web/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/web/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/web/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/web/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/web/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/web/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/web/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/web/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/web/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/web/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/web/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/web/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/web/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/web/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/web/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/web/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/web/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/web/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/web/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/web/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/web/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/web/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/web/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/web/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/web/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/web/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/web/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/web/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/web/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/web/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/web/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/web/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/web/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/web/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/web/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/web/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/web/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/web/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/web/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/web/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/web/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/web/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/web/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/web/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/web/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/web/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/web/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/web/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/web/assets/abnfDiagram-S7VZAUFO-CNj02zRV.js +1 -0
- package/web/assets/architectureDiagram-YGSQEFNW-UnapXBnq.js +36 -0
- package/web/assets/blockDiagram-APKKGZFW-By1mA1_j.js +140 -0
- package/web/assets/bpmnIcons-APHXDYXF-ByGoYv9M.js +1 -0
- package/web/assets/c4Diagram-KJ2TOQU5-DxR8Tp-K.js +38 -0
- package/web/assets/chunk-2Q5K7J3B-CfcIu3Ah.js +1 -0
- package/web/assets/chunk-5VM5RSS4-Ddk-Fv2Y.js +15 -0
- package/web/assets/chunk-HFQBQIA3-DqPjzTQu.js +1 -0
- package/web/assets/chunk-JWPE2WC7-VUIzkY_4.js +1 -0
- package/web/assets/chunk-KQLB2F66-Bi85gKHH.js +2 -0
- package/web/assets/chunk-KS47KZWR-BZwBvPDM.js +1 -0
- package/web/assets/chunk-OY52VR5R-B_DWv6kS.js +88 -0
- package/web/assets/chunk-TU62E6Q5-BZ5M8LNU.js +1 -0
- package/web/assets/chunk-XXDRQBXY-DcC5f1oO.js +1 -0
- package/web/assets/classDiagram-v2-L25IHNXF-CiZfI5zH.js +217 -0
- package/web/assets/{codemirror-DsTONvL-.js → codemirror-B_zWrnLp.js} +1 -1
- package/web/assets/cose-bilkent-JH36ORCC-OecldNrx.js +1 -0
- package/web/assets/cynefin-EF2NZ3EQ-BHDQXZEc.js +141 -0
- package/web/assets/cynefinDiagram-L36ESFBY-COnZzGKx.js +62 -0
- package/web/assets/cytoscape.esm-Bw5aGq32.js +332 -0
- package/web/assets/d3-scale-4DPf7zan.js +1 -0
- package/web/assets/dagre-SPEB5RXH-XxNubJTv.js +4 -0
- package/web/assets/diagram-3B7GL73J-BEpsszbY.js +200 -0
- package/web/assets/diagram-DNEMPZML-DAKChpAZ.js +24 -0
- package/web/assets/diagram-L3MUGCDN-CvDcHjXy.js +41 -0
- package/web/assets/diagram-LA4NIPWU-BO-n7J3S.js +24 -0
- package/web/assets/diagram-MHCOC4E2-BW8MchVY.js +3 -0
- package/web/assets/diagram-XPFHEONP-DjiEBmkx.js +30 -0
- package/web/assets/ebnfDiagram-UZSYDL2S-DKGunvzj.js +1 -0
- package/web/assets/elk-XV6XMXQE-b9lmTG03.js +2 -0
- package/web/assets/erDiagram-EYBAPDEH-DT_k1OGC.js +99 -0
- package/web/assets/flowDiagram-MALGAFMO-BUqGlWOn.js +213 -0
- package/web/assets/ganttDiagram-23REXITY-Cbr_kL7O.js +292 -0
- package/web/assets/gitGraphDiagram-STJD7YCW-Cw6S4Bcr.js +106 -0
- package/web/assets/graph-Bn3Yngep.js +1 -0
- package/web/assets/index-B1IBfUz9.css +1 -0
- package/web/assets/{index-M02GPU4M.js → index-B5vdEupB.js} +1 -1
- package/web/assets/{index-qP25soUp.js → index-BLmLDrEY.js} +1 -1
- package/web/assets/{index-CTOsqnj0.js → index-BO8effSp.js} +1 -1
- package/web/assets/index-BYJrmc8N.js +1 -0
- package/web/assets/{index-DIp8Svzr.js → index-B_SP1UWv.js} +1 -1
- package/web/assets/index-BdwT0-rx.js +152 -0
- package/web/assets/index-BoggcMUx.js +7 -0
- package/web/assets/{index-891wE-Rj.js → index-COYbUhJ2.js} +1 -1
- package/web/assets/index-CfWAy0wv.js +1 -0
- package/web/assets/{index-CKm4LyXr.js → index-Ch08lakn.js} +1 -1
- package/web/assets/index-Cl3pbMFT.js +1 -0
- package/web/assets/index-CnRY1mXR.js +1 -0
- package/web/assets/index-Ctc6whsQ.js +1 -0
- package/web/assets/{index-Duur5KBZ.js → index-D7DCXKEo.js} +1 -1
- package/web/assets/{index-uknuSOmh.js → index-DQnArn0a.js} +1 -1
- package/web/assets/{index-BMdxgpgr.js → index-DnFYUU1x.js} +1 -1
- package/web/assets/{index-eBfccJOZ.js → index-Du5Qar1T.js} +1 -1
- package/web/assets/{index-Cs3FSccd.js → index-DvFMS_gT.js} +4 -4
- package/web/assets/{index-1f2CtYmb.js → index-HQJZpoPE.js} +1 -1
- package/web/assets/{index-DvbV5juq.js → index-dkD_YPIB.js} +2 -2
- package/web/assets/{index-B5PgjCy2.js → index-qkpXZNl3.js} +1 -1
- package/web/assets/infoDiagram-KBXO4MBG-CusT957H.js +2 -0
- package/web/assets/ishikawaDiagram-M35NCXHK-DlxUISb3.js +70 -0
- package/web/assets/journeyDiagram-OPLOXDXO-B7X0y02x.js +139 -0
- package/web/assets/kanban-definition-BZKZHSQY-DzEKGEDz.js +89 -0
- package/web/assets/katex-DFbIS0RS.js +257 -0
- package/web/assets/katex-DxB02YXk.css +1 -0
- package/web/assets/katex-RYEII7GN.js +257 -0
- package/web/assets/mermaid.core-BM9CG8VU.js +312 -0
- package/web/assets/mindmap-definition-I2QAS2VK-DgE3KgdI.js +98 -0
- package/web/assets/pegDiagram-FD4XPPHP-2wTO2ZJT.js +1 -0
- package/web/assets/pieDiagram-J4AKIIQI-CKRDBux_.js +39 -0
- package/web/assets/quadrantDiagram-XTYBLID2-Ceg_KG7b.js +7 -0
- package/web/assets/railroadDiagram-MRQ6NCDL-DkyGV8eQ.js +1 -0
- package/web/assets/requirementDiagram-Y7LWUY3S-DEpWnvQ5.js +84 -0
- package/web/assets/sankeyDiagram-WGJFYUXA-D06-ObVT.js +40 -0
- package/web/assets/sequenceDiagram-5NDRBG5M-CNgwRsPl.js +169 -0
- package/web/assets/sizeCapture-INFHLROL-DLPIeXe1.js +1 -0
- package/web/assets/stateDiagram-v2-FJ4FJNEA-CjTQ5dpG.js +291 -0
- package/web/assets/swimlanes-UMQ2AFYF-eJkqG_t9.js +1 -0
- package/web/assets/swimlanesDiagram-OMPLPG4O-D-nejod0.js +8 -0
- package/web/assets/timeline-definition-SEUHKTQE-CUTdCFpH.js +120 -0
- package/web/assets/usecaseDiagram-AFA6YXN4-BHojL49I.js +370 -0
- package/web/assets/vennDiagram-NNMJR3RB-Bk5isaer.js +34 -0
- package/web/assets/wardleyDiagram-S7YFUSEH-DolRO_uR.js +78 -0
- package/web/assets/xychartDiagram-GGNKY7IX-V3IUgdp-.js +7 -0
- package/web/index.html +2 -2
- package/web/assets/index-B5TsjSo7.js +0 -135
- package/web/assets/index-BEknqxbE.js +0 -1
- package/web/assets/index-BieVw7oe.js +0 -1
- package/web/assets/index-C43uypKd.css +0 -1
- package/web/assets/index-CdCc_AYg.js +0 -1
- package/web/assets/index-DFrY42c9.js +0 -1
- package/web/assets/index-DSH6K6tq.js +0 -1
- package/web/assets/index-D_IqGnua.js +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as l,r as m,d as n}from"./chunk-OY52VR5R-B_DWv6kS.js";import{p}from"./chunk-JWPE2WC7-VUIzkY_4.js";import{_ as t,l as o}from"./mermaid.core-BM9CG8VU.js";import{M as u,a as f}from"./cynefin-EF2NZ3EQ-BHDQXZEc.js";import"./index-BdwT0-rx.js";import"./_commonjsHelpers-CqkleIqs.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:m,styles:l};export{S as diagram};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as We}from"./chunk-KS47KZWR-BZwBvPDM.js";import{c as Xe,d as $e}from"./chunk-KQLB2F66-Bi85gKHH.js";import{_ as h,o as je,ax as ze,ay as Ct,ai as Ye,az as Ke}from"./mermaid.core-BM9CG8VU.js";import"./index-BdwT0-rx.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
|
+
`),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};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import{g as Ut}from"./chunk-XXDRQBXY-DcC5f1oO.js";import{s as Kt}from"./chunk-TU62E6Q5-BZ5M8LNU.js";import{_ as f,H 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,I as ie,F as re,G as ae,K as ne,p as oe,r as le,k as ce,u as he}from"./mermaid.core-BM9CG8VU.js";import"./index-BdwT0-rx.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
|
+
`+m.showPosition()+`
|
|
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
|
+
`+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()+`
|
|
5
|
+
`+h+"^"},"showPosition"),test_match:f(function(n,h){var d,i,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),i=n[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(n[0].length),this.matched+=n[0],d=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var t in _)this[t]=_[t];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,h,d,i;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),t=0;t<_.length;t++)if(d=this._input.match(this.rules[_[t]]),d&&(!h||d[0].length>h[0].length)){if(h=d,i=t,this.options.backtrack_lexer){if(n=this.test_match(d,_[t]),n!==!1)return n;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(n=this.test_match(h,_[i]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var h=this.next();return h||this.lex()},"lex"),begin:f(function(h){this.conditionStack.push(h)},"begin"),popState:f(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:f(function(h){this.begin(h)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(h,d,i,_){switch(i){case 0:return this.begin("acc_title"),23;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),25;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin("block_bq");break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;case 32:return d.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;case 36:return this.popState(),9;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin("style"),41;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return d.yytext[0];case 82:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}};return G})();_t.lexer=Gt;function lt(){this.yy={}}return f(lt,"Parser"),lt.prototype=_t,_t.Parser=lt,new lt})();Ot.parser=Ot;var ue=Ot,K,de=(K=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Zt,this.getAccTitle=jt,this.setAccDescription=qt,this.getAccDescription=Wt,this.setDiagramTitle=Ht,this.getDiagramTitle=Qt,this.getConfig=f(()=>tt().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}addEntity(a,o=""){var l;return this.entities.has(a)?!((l=this.entities.get(a))!=null&&l.alias)&&o&&(this.entities.get(a).alias=o,F.info(`Add alias '${o}' to entity '${a}'`)):(this.entities.set(a,{id:`entity-${a}-${this.entities.size}`,label:a,attributes:[],alias:o,shape:"erBox",look:tt().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),F.info("Added new entity :",a)),this.entities.get(a)}getEntity(a){return this.entities.get(a)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(a,o){const l=this.addEntity(a);let r;for(r=o.length-1;r>=0;r--)o[r].keys||(o[r].keys=[]),o[r].comment||(o[r].comment=""),l.attributes.push(o[r]),F.debug("Added attribute ",o[r].name)}addRelationship(a,o,l,r){let c;if(this.subGraphLookup.has(a))c=a;else{const k=this.addEntity(a);if(!k)return;c=k.id}let y;if(this.subGraphLookup.has(l))y=l;else{const k=this.addEntity(l);if(!k)return;y=k.id}const g={entityA:c,roleA:o,entityB:y,relSpec:r};this.relationships.push(g),F.debug("Added new relationship :",g)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(a){this.direction=a}getCompiledStyles(a){let o=[];for(const l of a){const r=this.classes.get(l);r!=null&&r.styles&&(o=[...o,...r.styles??[]].map(c=>c.trim())),r!=null&&r.textStyles&&(o=[...o,...r.textStyles??[]].map(c=>c.trim()))}return o}addCssStyles(a,o){for(const l of a){const r=this.entities.get(l),c=this.subGraphLookup.get(l);if(o){if(r)for(const y of o)r.cssStyles.push(y);if(c){c.cssStyles||(c.cssStyles=[]);for(const y of o)c.cssStyles.push(y)}}}}addClass(a,o){a.forEach(l=>{let r=this.classes.get(l);r===void 0&&(r={id:l,styles:[],textStyles:[]},this.classes.set(l,r)),o&&o.forEach(function(c){if(/color/.exec(c)){const y=c.replace("fill","bgFill");r.textStyles.push(y)}r.styles.push(c)})})}addSubGraph(a,o,l){let r=a.text.trim(),c=l.text;const g=f(b=>{const A=new Set;let v;return{nodeList:b.filter(T=>{if(T!=null&&T.stmt)return T.stmt==="dir"&&(v=T.value),!1;if(typeof T!="string")return!1;const I=T.trim();return!I||A.has(I)?!1:(A.add(I),!0)}),dir:v}},"uniq")(o.flat()),k=g.nodeList,N=g.dir;r=r??"subGraph"+this.subCount,c=c||"",c=this.sanitizeText(c),this.subCount=this.subCount+1;const p={id:r,nodes:k,title:c.trim(),classes:[],cssStyles:[],dir:N,labelType:this.sanitizeNodeLabelType(l==null?void 0:l.type)};return F.info("Adding",p.id,p.nodes,p.dir),p.nodes=this.makeUniq(p,this.subGraphs).nodes,this.subGraphs.push(p),this.subGraphLookup.set(r,p),r}getSubGraphs(){return this.subGraphs}setClass(a,o){for(const l of a){const r=this.entities.get(l);if(r)for(const y of o)r.cssClasses+=" "+y;const c=this.subGraphLookup.get(l);if(c)for(const y of o)c.classes.push(y)}}subgraphNodeCache(a){const o=new Set;for(const l of a)for(const r of l.nodes)o.add(r);return o}makeUniq(a,o){const l=this.subgraphNodeCache(o),r=[];return a.nodes.forEach((c,y)=>{l.has(c)?F.warn(`Entity '${c}' already belongs to another subgraph and will be ignored`):r.push(a.nodes[y])}),{nodes:r}}sanitizeText(a){return Xt.sanitizeText(a,tt())}sanitizeNodeLabelType(a){switch(a){case"markdown":case"string":case"text":return a;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,Jt()}getData(){const a=[],o=[],l=tt(),r=this.getSubGraphs(),c=new Map,y=new Map;for(let p=r.length-1;p>=0;p--){const b=r[p];b.nodes.length>0&&y.set(b.id,!0);for(const A of b.nodes)c.set(A,b.id)}for(let p=r.length-1;p>=0;p--){const b=r[p];a.push({id:b.id,label:b.title,labelStyle:"",labelType:b.labelType,parentId:c.get(b.id),padding:8,cssCompiledStyles:this.getCompiledStyles(b.classes),cssStyles:b.cssStyles,cssClasses:b.classes.join(" "),shape:"rect",dir:b.dir,isGroup:!0,look:l.look})}const g=new Set(r.map(p=>p.id));let k=0;for(const p of this.entities.keys()){if(g.has(p))continue;const b=this.entities.get(p);b&&(b.cssCompiledStyles=this.getCompiledStyles(b.cssClasses.split(" ")),b.colorIndex=k++,a.push({...b,parentId:c.get(p),isGroup:!1}))}let N=0;for(const p of this.relationships){const b={id:$t(p.entityA,p.entityB,{prefix:"id",counter:N++}),type:"normal",curve:"basis",start:p.entityA,end:p.entityB,label:p.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:p.relSpec.cardB.toLowerCase(),arrowTypeEnd:p.relSpec.cardA.toLowerCase(),pattern:p.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:l.look,labelType:"markdown"};o.push(b)}return{nodes:a,edges:o,other:{},config:l,direction:this.direction}}},f(K,"ErDB"),K),Bt={};ne(Bt,{draw:()=>pe});var pe=f(async function(s,a,o,l){F.info("REF0:"),F.info("Drawing er diagram (unified)",a);const{securityLevel:r,er:c,layout:y}=tt(),g=l.db.getData(),k=Ut(a,r);g.type=l.type,g.layoutAlgorithm=oe(y),g.config.flowchart.nodeSpacing=(c==null?void 0:c.nodeSpacing)||140,g.config.flowchart.rankSpacing=(c==null?void 0:c.rankSpacing)||80,g.direction=l.db.getDirection();const{config:N}=g,{look:p}=N;p==="neo"?g.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:g.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],g.diagramId=a,await le(g,k);const b=k.selectAll('[id*="-background"]');Array.from(b).length>0&&b.each(function(){const v=ce(this),T=v.attr("id").replace("-background",""),I=k.select(`#${CSS.escape(T)}`);if(!I.empty()){const C=I.attr("transform");v.attr("transform",C)}});const A=8;he.insertTitle(k,"erDiagramTitleText",(c==null?void 0:c.titleTopMargin)??25,l.db.getDiagramTitle()),Kt(k,A,"erDiagram",(c==null?void 0:c.useMaxWidth)??!0)},"draw"),Mt=f((s,a)=>{const o=ae,l=o(s,"r"),r=o(s,"g"),c=o(s,"b");return re(l,r,c,a)},"fade"),fe=f(s=>{const{theme:a,bkgColorArray:o,borderColorArray:l}=s;if(!te(a,l))return"";const r=ee(s.look),c=se(o);let y="";for(let g=0;g<ie(l);g++){const k=l[g],N=c?`fill: ${o[g%o.length]};`:"";y+=`
|
|
7
|
+
|
|
8
|
+
[data-look="${r}"][data-color-id="color-${g}"].node path {
|
|
9
|
+
stroke: ${k};
|
|
10
|
+
${N}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-look="${r}"][data-color-id="color-${g}"].node rect {
|
|
14
|
+
stroke: ${k};
|
|
15
|
+
${N}
|
|
16
|
+
}
|
|
17
|
+
`}return y},"genColor"),be=f(s=>{const{look:a,theme:o,erEdgeLabelBackground:l,strokeWidth:r}=s;return`
|
|
18
|
+
${fe(s)}
|
|
19
|
+
.entityBox {
|
|
20
|
+
fill: ${s.mainBkg};
|
|
21
|
+
stroke: ${s.nodeBorder};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.relationshipLabelBox {
|
|
25
|
+
fill: ${s.tertiaryColor};
|
|
26
|
+
opacity: 0.7;
|
|
27
|
+
background-color: ${s.tertiaryColor};
|
|
28
|
+
rect {
|
|
29
|
+
opacity: 0.5;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.labelBkg {
|
|
34
|
+
background-color: ${Tt.has(o)&&l?l:Mt(s.tertiaryColor,.5)};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.edgeLabel {
|
|
38
|
+
background-color: ${Tt.has(o)&&l?l:s.edgeLabelBackground};
|
|
39
|
+
}
|
|
40
|
+
.edgeLabel .label rect {
|
|
41
|
+
fill: ${Tt.has(o)&&l?l:s.edgeLabelBackground};
|
|
42
|
+
}
|
|
43
|
+
.edgeLabel .label text {
|
|
44
|
+
fill: ${s.textColor};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.edgeLabel .label {
|
|
48
|
+
fill: ${s.nodeBorder};
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.label {
|
|
53
|
+
font-family: ${s.fontFamily};
|
|
54
|
+
color: ${s.nodeTextColor||s.textColor};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.edge-pattern-dashed {
|
|
58
|
+
stroke-dasharray: 8,8;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.node rect,
|
|
62
|
+
.node circle,
|
|
63
|
+
.node ellipse,
|
|
64
|
+
.node polygon
|
|
65
|
+
{
|
|
66
|
+
fill: ${s.mainBkg};
|
|
67
|
+
stroke: ${s.nodeBorder};
|
|
68
|
+
stroke-width: ${a==="neo"?r:"1px"};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.relationshipLine {
|
|
72
|
+
stroke: ${s.lineColor};
|
|
73
|
+
stroke-width: ${a==="neo"?r:"1px"};
|
|
74
|
+
fill: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.marker {
|
|
78
|
+
fill: none !important;
|
|
79
|
+
stroke: ${s.lineColor} !important;
|
|
80
|
+
stroke-width: 1;
|
|
81
|
+
}
|
|
82
|
+
[data-look=neo].labelBkg {
|
|
83
|
+
background-color: ${Mt(s.tertiaryColor,.5)};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cluster rect {
|
|
87
|
+
fill: ${s.clusterBkg??s.mainBkg};
|
|
88
|
+
stroke: ${s.clusterBorder??s.nodeBorder};
|
|
89
|
+
stroke-width: 1px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.cluster text {
|
|
93
|
+
fill: ${s.titleColor??s.textColor};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.cluster-label text {
|
|
97
|
+
fill: ${s.titleColor??s.textColor};
|
|
98
|
+
}
|
|
99
|
+
`},"getStyles"),ge=be,Se={parser:ue,get db(){return new de},renderer:Bt,styles:ge};export{Se as diagram};
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import{g as Jt}from"./chunk-5VM5RSS4-Ddk-Fv2Y.js";import{g as Zt}from"./chunk-XXDRQBXY-DcC5f1oO.js";import{s as $t}from"./chunk-TU62E6Q5-BZ5M8LNU.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-BM9CG8VU.js";import{c as T1}from"./chunk-HFQBQIA3-DqPjzTQu.js";import{p as D1}from"./index-BdwT0-rx.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
|
+
`)?S=b+`
|
|
3
|
+
`:S=`{
|
|
4
|
+
`+b+`
|
|
5
|
+
}`,o=zt(c1(S,{schema:h1}))}const D=this.subGraphLookup.get(i);if(D&&o){Object.keys(o).length>0&&(D.metadata={...D.metadata,...o});return}const T=this.edges.find(S=>S.id===i);if(T){const S=o;(S==null?void 0:S.animate)!==void 0&&(T.animate=S.animate),(S==null?void 0:S.animation)!==void 0&&(T.animation=S.animation),(S==null?void 0:S.curve)!==void 0&&(T.interpolate=S.curve),(S==null?void 0:S.step)!==void 0&&(st(S)?T.step=S.step:$.warn(`Ignoring step on edge ${i}: expected a positive integer`,S.step));return}let w,k=this.vertices.get(i);if(k===void 0&&(n===void 0&&a===void 0&&r!==void 0&&r!==null&&$.warn(`Style applied to unknown node "${i}". This may indicate a typo. The node will be created automatically.`),k={id:i,labelType:"text",domId:y1+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,k)),this.vertexCounter++,n!==void 0?(this.config=Ce(),w=this.sanitizeText(n.text.trim()),k.labelType=n.type,w.startsWith('"')&&w.endsWith('"')&&(w=w.substring(1,w.length-1)),k.text=w):k.text===void 0&&(k.text=i),a!==void 0&&(k.type=a),r!=null&&r.forEach(S=>{k.styles.push(S)}),u!=null&&u.forEach(S=>{k.classes.push(S)}),f!==void 0&&(k.dir=f),k.props===void 0?k.props=c:c!==void 0&&Object.assign(k.props,c),o!==void 0){if(o.shape){if(o.shape!==o.shape.toLowerCase()||o.shape.includes("_"))throw new Error(`No such shape: ${o.shape}. Shape names should be lowercase.`);if(!d1(o.shape))throw new Error(`No such shape: ${o.shape}.`);k.type=o==null?void 0:o.shape}o!=null&&o.label&&(k.text=o==null?void 0:o.label,k.labelType=this.sanitizeNodeLabelType(o==null?void 0:o.labelType)),o!=null&&o.icon&&(k.icon=o==null?void 0:o.icon,!((C=o.label)!=null&&C.trim())&&k.text===i&&(k.text="")),o!=null&&o.form&&(k.form=o==null?void 0:o.form),o!=null&&o.pos&&(k.pos=o==null?void 0:o.pos),o!=null&&o.img&&(k.img=o==null?void 0:o.img,!((y=o.label)!=null&&y.trim())&&k.text===i&&(k.text="")),o!=null&&o.constraint&&(k.constraint=o.constraint),o.w&&(k.assetWidth=Number(o.w)),o.h&&(k.assetHeight=Number(o.h))}}addSingleLink(i,n,a,r){const c={start:i,end:n,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};$.info("abc78 Got edge...",c);const b=a.text;if(b!==void 0&&(c.text=this.sanitizeText(b.text.trim()),c.text.startsWith('"')&&c.text.endsWith('"')&&(c.text=c.text.substring(1,c.text.length-1)),c.labelType=this.sanitizeNodeLabelType(b.type)),a!==void 0&&(c.type=a.type,c.stroke=a.stroke,c.length=a.length>10?10:a.length),r&&!this.edges.some(o=>o.id===r))c.id=r,c.isUserDefinedId=!0;else{const o=this.edges.filter(D=>D.start===c.start&&D.end===c.end);o.length===0?c.id=it(c.start,c.end,{counter:0,prefix:"L"}):c.id=it(c.start,c.end,{counter:o.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))$.info("Pushing edge..."),this.edges.push(c);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
|
|
6
|
+
|
|
7
|
+
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
|
8
|
+
You cannot set this config via configuration inside the diagram as it is a secure config.
|
|
9
|
+
You have to call mermaid.initialize.`)}isLinkData(i){return i!==null&&typeof i=="object"&&"id"in i&&typeof i.id=="string"}addLink(i,n,a){const r=this.isLinkData(a)?a.id.replace("@",""):void 0;$.info("addLink",i,n,r);for(const u of i)for(const f of n){const c=u===i[i.length-1],b=f===n[0];c&&b?this.addSingleLink(u,f,a,r):this.addSingleLink(u,f,a,void 0)}}updateLinkInterpolate(i,n){i.forEach(a=>{a==="default"?this.edges.defaultInterpolate=n:this.edges[a].interpolate=n})}updateLink(i,n){i.forEach(a=>{var r,u,f,c,b,o;if(typeof a=="number"&&a>=this.edges.length)throw new Error(`The index ${a} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);a==="default"?this.edges.defaultStyle=n:(this.edges[a].style=n,(((u=(r=this.edges[a])==null?void 0:r.style)==null?void 0:u.length)??0)>0&&!((c=(f=this.edges[a])==null?void 0:f.style)!=null&&c.some(D=>D==null?void 0:D.startsWith("fill")))&&((o=(b=this.edges[a])==null?void 0:b.style)==null||o.push("fill:none")))})}addClass(i,n){const a=n.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");i.split(",").forEach(r=>{let u=this.classes.get(r);u===void 0&&(u={id:r,styles:[],textStyles:[]},this.classes.set(r,u)),a!=null&&a.forEach(f=>{if(/color/.exec(f)){const c=f.replace("fill","bgFill");u.textStyles.push(c)}u.styles.push(f)})})}setDirection(i){this.direction=i.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(i,n){for(const a of i.split(",")){const r=this.vertices.get(a);r&&r.classes.push(n);const u=this.edges.find(c=>c.id===a);u&&u.classes.push(n);const f=this.subGraphLookup.get(a);f&&f.classes.push(n)}}setTooltip(i,n){if(n!==void 0){n=this.sanitizeText(n);for(const a of i.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(a):a,n)}}setClickFun(i,n,a){if(Ce().securityLevel!=="loose"||n===void 0)return;let r=[];if(typeof a=="string"){r=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let f=0;f<r.length;f++){let c=r[f].trim();c.startsWith('"')&&c.endsWith('"')&&(c=c.substr(1,c.length-2)),r[f]=c}}r.length===0&&r.push(i);const u=this.vertices.get(i);u&&(u.haveCallback=!0,this.funs.push(()=>{const f=this.lookUpDomId(i),c=document.querySelector(`[id="${f}"]`);c!==null&&c.addEventListener("click",()=>{at.runFunc(n,...r)},!1)}))}setLink(i,n,a){i.split(",").forEach(r=>{const u=this.vertices.get(r);u!==void 0&&(u.link=at.formatUrl(n,this.config),u.linkTarget=a)}),this.setClass(i,"clickable")}getTooltip(i){return this.tooltips.get(i)}setClickEvent(i,n,a){i.split(",").forEach(r=>{this.setClickFun(r,n,a)}),this.setClass(i,"clickable")}bindFunctions(i){this.funs.forEach(n=>{n(i)})}getDirection(){var i;return(i=this.direction)==null?void 0:i.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(i){const n=T1();rt(i).select("svg").selectAll("g.node").on("mouseover",u=>{var o;const f=rt(u.currentTarget),c=f.attr("title");if(c===null)return;const b=(o=u.currentTarget)==null?void 0:o.getBoundingClientRect();n.transition().duration(200).style("opacity",".9"),n.text(f.attr("title")).style("left",window.scrollX+b.left+(b.right-b.left)/2+"px").style("top",window.scrollY+b.bottom+"px"),n.html(D1.sanitize(c)),f.classed("hover",!0)}).on("mouseout",u=>{n.transition().duration(500).style("opacity",0),rt(u.currentTarget).classed("hover",!1)})}clear(i="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.droppedSubGraphMembers=[],this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=i,this.config=Ce(),p1()}setGen(i){this.version=i||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(i,n,a){let r=i.text.trim(),u=a.text;i===a&&/\s/.exec(a.text)&&(r=void 0);const c=m(C=>{const y={boolean:{},number:{},string:{}},S=[];let Z;return{nodeList:C.filter(function(j){const ee=typeof j;return j.stmt&&j.stmt==="dir"?(Z=j.value,!1):j.trim()===""?!1:ee in y?y[ee].hasOwnProperty(j)?!1:y[ee][j]=!0:S.includes(j)?!1:S.push(j)}),dir:Z}},"uniq")(n.flat()),b=c.nodeList;let o=c.dir;const D=Ce().flowchart??{};if(o=o??(D.inheritDir?this.getDirection()??Ce().direction??void 0:void 0),this.version==="gen-1")for(let C=0;C<b.length;C++)b[C]=this.lookUpDomId(b[C]);r=r??"subGraph"+this.subCount,u=u||"",u=this.sanitizeText(u),this.subCount=this.subCount+1;const T={id:r,nodes:b,title:u.trim(),classes:[],dir:o,labelType:this.sanitizeNodeLabelType(a==null?void 0:a.type)};$.info("Adding",T.id,T.nodes,T.dir);const w=this.makeUniq(T,this.subGraphs).nodes;this.recordDroppedMembers(T,w),T.nodes=w.filter(C=>C!==r);const k=this.subGraphs.find(C=>C.id===r);return k?k.nodes.push(...T.nodes):this.subGraphs.push(T),this.subGraphLookup.set(r,k??T),r}recordDroppedMembers(i,n){const a=new Set(n);for(const r of i.nodes){if(a.has(r)||r===i.id)continue;const u=this.subGraphs.find(f=>f.nodes.includes(r));u&&u.id!==i.id&&!this.isNestedIn(u.id,i)&&this.droppedSubGraphMembers.push({node:r,keptBy:u.id,droppedFrom:i.id})}}isNestedIn(i,n){var u;const a=new Set;let r=i;for(;r!==void 0&&!a.has(r);){if(n.nodes.includes(r))return!0;a.add(r);const f=r;r=(u=this.subGraphs.find(c=>c.nodes.includes(f)))==null?void 0:u.id}return!1}getPosForId(i){for(const[n,a]of this.subGraphs.entries())if(a.id===i)return n;return-1}indexNodes2(i,n){const a=this.subGraphs[n].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=n,this.subGraphs[n].id===i)return{result:!0,count:0};let r=0,u=1;for(;r<a.length;){const f=this.getPosForId(a[r]);if(f>=0){const c=this.indexNodes2(i,f);if(c.result)return{result:!0,count:u+c.count};u=u+c.count}r=r+1}return{result:!1,count:u}}getDepthFirstPos(i){return this.posCrossRef[i]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(i){let n=i.trim(),a="arrow_open";switch(n[0]){case"<":a="arrow_point",n=n.slice(1);break;case"x":a="arrow_cross",n=n.slice(1);break;case"o":a="arrow_circle",n=n.slice(1);break}let r="normal";return n.includes("=")&&(r="thick"),n.includes(".")&&(r="dotted"),{type:a,stroke:r}}countChar(i,n){const a=n.length;let r=0;for(let u=0;u<a;++u)n[u]===i&&++r;return r}destructEndLink(i){const n=i.trim();let a=n.slice(0,-1),r="arrow_open";switch(n.slice(-1)){case"x":r="arrow_cross",n.startsWith("x")&&(r="double_"+r,a=a.slice(1));break;case">":r="arrow_point",n.startsWith("<")&&(r="double_"+r,a=a.slice(1));break;case"o":r="arrow_circle",n.startsWith("o")&&(r="double_"+r,a=a.slice(1));break}let u="normal",f=a.length-1;a.startsWith("=")&&(u="thick"),a.startsWith("~")&&(u="invisible");const c=this.countChar(".",a);return c&&(u="dotted",f=c),{type:r,stroke:u,length:f}}destructLink(i,n){const a=this.destructEndLink(i);let r;if(n){if(r=this.destructStartLink(n),r.stroke!==a.stroke)return{type:"INVALID",stroke:"INVALID"};if(r.type==="arrow_open")r.type=a.type;else{if(r.type!==a.type)return{type:"INVALID",stroke:"INVALID"};r.type="double_"+r.type}return r.type==="double_arrow"&&(r.type="double_arrow_point"),r.length=a.length,r}return a}exists(i,n){for(const a of i)if(a.nodes.includes(n))return!0;return!1}makeUniq(i,n){const a=[];return i.nodes.forEach((r,u)=>{this.exists(n,r)||a.push(i.nodes[u])}),{nodes:a}}getTypeFromVertex(i){if(i.img)return"imageSquare";if(i.icon)return i.form==="circle"?"iconCircle":i.form==="square"?"iconSquare":i.form==="rounded"?"iconRounded":"icon";switch(i.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return i.type}}findNode(i,n){return i.find(a=>a.id===n)}destructEdgeType(i){let n="none",a="arrow_point";switch(i){case"arrow_point":case"arrow_circle":case"arrow_cross":a=i;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":n=i.replace("double_",""),a=n;break}return{arrowTypeStart:n,arrowTypeEnd:a}}addNodeFromVertex(i,n,a,r,u,f){var D,T;const c=a.get(i.id),b=r.get(i.id)??!1,o=this.findNode(n,i.id);if(o)o.cssStyles=i.styles,o.cssCompiledStyles=this.getCompiledStyles(i.classes),o.cssClasses=i.classes.join(" ");else{const w={id:i.id,label:i.text,labelType:i.labelType,labelStyle:"",parentId:c,padding:((D=u.flowchart)==null?void 0:D.padding)||8,cssStyles:i.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...i.classes]),cssClasses:"default "+i.classes.join(" "),dir:i.dir,domId:i.domId,look:f,link:i.link,linkTarget:i.linkTarget,tooltip:this.getTooltip(i.id),icon:i.icon,pos:i.pos,img:i.img,assetWidth:i.assetWidth,assetHeight:i.assetHeight,constraint:i.constraint};b?n.push({...w,isGroup:!0,shape:"rect"}):n.push({...w,isGroup:!1,shape:this.getTypeFromVertex(i),minWidth:(T=u.flowchart)==null?void 0:T.minNodeWidth})}}getCompiledStyles(i){let n=[];for(const a of i){const r=this.classes.get(a);r!=null&&r.styles&&(n=[...n,...r.styles??[]].map(u=>u.trim())),r!=null&&r.textStyles&&(n=[...n,...r.textStyles??[]].map(u=>u.trim()))}return n}getData(){var G,P,M;const i=Ce(),n=[],a=[],r=this.getSubGraphs(),u=new Map,f=new Map,c=new Map;for(const l of r)for(const d of l.nodes)this.subGraphLookup.has(d)&&c.set(d,l.id);const b=new Map,o=new Map;for(const l of r){const d=c.get(l.id);d!==void 0&&o.set(d,[...o.get(d)??[],l.id])}let D=0;const T=m(l=>{b.set(l,D++);for(const d of o.get(l)??[])T(d)},"walk");for(const l of r)c.has(l.id)||T(l.id);const w=m(l=>{var d,x;return((x=(d=this.subGraphLookup.get(l))==null?void 0:d.metadata)==null?void 0:x.view)==="collapsed"},"isCollapsed"),k=m(l=>{let d;const x=new Set;let B=l;for(;B!==void 0&&!x.has(B);)x.add(B),w(B)&&(d=B),B=c.get(B);return d},"outermostCollapsed"),C=new Set,y=new Map;for(const l of r){const d=k(l.id);if(d!==void 0){l.id!==d&&(C.add(l.id),y.set(l.id,d));for(const x of l.nodes)x!==d&&(C.add(x),y.set(x,d))}}for(let l=r.length-1;l>=0;l--){const d=r[l];if(!C.has(d.id)){d.nodes.length>0&&f.set(d.id,!0);for(const x of d.nodes)u.set(x,d.id)}}for(let l=r.length-1;l>=0;l--){const d=r[l];C.has(d.id)||(((G=d.metadata)==null?void 0:G.view)==="collapsed"?n.push({id:d.id,label:d.title,labelStyle:"",labelType:d.labelType,parentId:u.get(d.id),padding:8,cssCompiledStyles:this.getCompiledStyles(d.classes),cssClasses:d.classes.join(" "),shape:"collapsedGroup",dir:d.dir,isGroup:!1,look:i.look,colorIndex:b.get(d.id)}):n.push({id:d.id,label:d.title,labelStyle:"",labelType:d.labelType,parentId:u.get(d.id),padding:8,cssCompiledStyles:this.getCompiledStyles(d.classes),cssClasses:d.classes.join(" "),shape:"rect",dir:d.dir,isGroup:!0,look:i.look,colorIndex:b.get(d.id),metadata:d.metadata}))}this.getVertices().forEach(l=>{C.has(l.id)||this.addNodeFromVertex(l,n,u,f,i,i.look||"classic")});const Z=this.getEdges(),Se=Z.reduce((l,d)=>st(d)?Math.max(l,d.step):l,0),j=f1((P=i.flowchart)==null?void 0:P.stepDuration),ee=((M=i.flowchart)==null?void 0:M.stepNumbers)===!0?{showStepNumber:!0}:{};Z.forEach((l,d)=>{var Te;const{arrowTypeStart:x,arrowTypeEnd:B}=this.destructEdgeType(l.type),N=[...Z.defaultStyle??[]],fe=y.get(l.start)??l.start,ge=y.get(l.end)??l.end;if(fe===ge&&(y.has(l.start)||y.has(l.end)))return;l.style&&N.push(...l.style);const Ee={id:it(fe,ge,{counter:d,prefix:"L"},l.id),isUserDefinedId:l.isUserDefinedId,start:fe,end:ge,type:l.type??"normal",label:l.text,labelType:l.labelType,labelpos:"c",thickness:l.stroke,minlen:l.length,classes:(l==null?void 0:l.stroke)==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:(l==null?void 0:l.stroke)==="invisible"||(l==null?void 0:l.type)==="arrow_open"?"none":x,arrowTypeEnd:(l==null?void 0:l.stroke)==="invisible"||(l==null?void 0:l.type)==="arrow_open"?"none":B,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(l.classes),labelStyle:N,style:N,pattern:l.stroke,look:i.look,animate:l.animate,animation:l.animation,...st(l)?{step:l.step,stepCount:Se,stepDuration:j,...ee}:{},curve:l.interpolate||this.edges.defaultInterpolate||((Te=i.flowchart)==null?void 0:Te.curve)};a.push(Ee)});const O=this.droppedSubGraphMembers.length>0?{droppedSubGraphMembers:[...this.droppedSubGraphMembers]}:{};return{nodes:n,edges:a,other:O,config:i}}defaultConfig(){return g1.flowchart}},m(ze,"FlowDB"),ze),F1=m(function(s,i){return i.db.getClasses()},"getClasses"),_1=m(async function(s,i,n,a){var T;$.info("REF0:"),$.info("Drawing state diagram (v2)",i);const{securityLevel:r,flowchart:u,layout:f}=Ce();a.db.setDiagramId(i),$.debug("Before getData: ");const c=a.db.getData();$.debug("Data: ",c);const b=Zt(i,r),o=a.db.getDirection();c.type=a.type,c.layoutAlgorithm=t1(f),c.direction=o,c.nodeSpacing=(u==null?void 0:u.nodeSpacing)||50,c.rankSpacing=(u==null?void 0:u.rankSpacing)||50,c.markers=["point","circle","cross"],c.diagramId=i,$.debug("REF1:",c),await s1(c,b);const D=((T=c.config.flowchart)==null?void 0:T.diagramPadding)??8;at.insertTitle(b,"flowchartTitleText",(u==null?void 0:u.titleTopMargin)||0,a.db.getDiagramTitle()),$t(b,D,"flowchart",(u==null?void 0:u.useMaxWidth)||!1)},"draw"),v1={getClasses:F1,draw:_1},nt=(function(){var s=m(function(me,p,g,A){for(g=g||{},A=me.length;A--;g[me[A]]=p);return g},"o"),i=[1,4],n=[1,3],a=[1,5],r=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],u=[2,2],f=[1,13],c=[1,14],b=[1,15],o=[1,16],D=[1,23],T=[1,25],w=[1,26],k=[1,27],C=[1,50],y=[1,49],S=[1,29],Z=[1,30],Se=[1,31],j=[1,32],ee=[1,33],O=[1,45],G=[1,47],P=[1,43],M=[1,48],l=[1,44],d=[1,51],x=[1,46],B=[1,52],N=[1,53],fe=[1,34],ge=[1,35],Ee=[1,36],Te=[1,37],je=[1,38],be=[1,58],L=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],se=[1,62],ie=[1,61],re=[1,63],ke=[8,9,11,75,77,78],ut=[1,79],Fe=[1,92],_e=[1,97],ve=[1,96],Be=[1,93],Le=[1,89],Ve=[1,95],Ie=[1,91],we=[1,98],Re=[1,94],Ne=[1,99],Ge=[1,90],De=[8,9,10,11,40,75,77,78],W=[8,9,10,11,40,46,75,77,78],H=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],ot=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Pe=[44,60,89,102,105,106,109,111,114,115,116],lt=[1,122],ct=[1,123],Ke=[1,125],Ye=[1,124],ht=[44,60,62,74,89,102,105,106,109,111,114,115,116],dt=[1,134],pt=[1,148],ft=[1,149],gt=[1,150],bt=[1,151],kt=[1,136],At=[1,138],mt=[1,142],Ct=[1,143],St=[1,144],Tt=[1,145],Dt=[1,146],yt=[1,147],xt=[1,152],Et=[1,153],Ft=[1,132],_t=[1,133],vt=[1,140],Bt=[1,135],Lt=[1,139],Vt=[1,137],Qe=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],It=[1,155],wt=[1,157],R=[8,9,11],X=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],E=[1,177],K=[1,173],Y=[1,174],F=[1,178],_=[1,175],v=[1,176],Me=[77,116,119],V=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Rt=[1,205],Nt=[10,106],Ae=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],ae=[1,249],ne=[1,247],ue=[1,251],oe=[1,245],le=[1,246],ce=[1,248],he=[1,250],de=[1,252],Oe=[1,270],Gt=[8,9,11,106],te=[8,9,10,11,60,84,105,106,109,110,111,112],Je={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,5],[20,3],[20,4],[20,2],[20,2],[20,3],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:m(function(p,g,A,h,I,e,We){var t=e.length-1;switch(I){case 2:this.$=[];break;case 3:(!Array.isArray(e[t])||e[t].length>0)&&e[t-1].push(e[t]),this.$=e[t-1];break;case 4:case 185:this.$=e[t];break;case 11:h.setDirection("TB"),this.$="TB";break;case 12:h.setDirection(e[t-1]),this.$=e[t-1];break;case 27:this.$=e[t-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=h.addSubGraph(e[t-6],e[t-1],e[t-4]);break;case 34:this.$=h.addSubGraph(e[t-3],e[t-1],e[t-3]);break;case 35:this.$=h.addSubGraph(void 0,e[t-1],void 0);break;case 37:this.$=e[t].trim(),h.setAccTitle(this.$);break;case 38:case 39:this.$=e[t].trim(),h.setAccDescription(this.$);break;case 43:this.$=e[t-1]+e[t];break;case 44:this.$=e[t];break;case 45:h.addVertex(e[t-1][e[t-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t]),h.addLink(e[t-3].stmt,e[t-1],e[t-2]),this.$={stmt:e[t-1],nodes:e[t-1].concat(e[t-3].nodes)};break;case 46:h.addVertex(e[t-2][e[t-2].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t-1]),h.addLink(e[t-4].stmt,e[t-2],e[t-3]),this.$={stmt:e[t-2],nodes:e[t-2].concat(e[t-4].nodes)};break;case 47:h.addLink(e[t-2].stmt,e[t],e[t-1]),this.$={stmt:e[t],nodes:e[t].concat(e[t-2].nodes)};break;case 48:h.addLink(e[t-3].stmt,e[t-1],e[t-2]),this.$={stmt:e[t-1],nodes:e[t-1].concat(e[t-3].nodes)};break;case 49:this.$={stmt:e[t-1],nodes:e[t-1]};break;case 50:h.addVertex(e[t-1][e[t-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t]),this.$={stmt:e[t-1],nodes:e[t-1],shapeData:e[t]};break;case 51:h.addVertex(e[t-2][e[t-2].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t-1]),this.$={stmt:e[t-2],nodes:e[t-2],shapeData:e[t-1]};break;case 52:this.$={stmt:e[t],nodes:e[t]};break;case 53:this.$=[e[t]];break;case 54:h.addVertex(e[t-5][e[t-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t-4]),this.$=e[t-5].concat(e[t]);break;case 55:this.$=e[t-4].concat(e[t]);break;case 56:this.$=e[t];break;case 57:this.$=e[t-2],h.setClass(e[t-2],e[t]);break;case 58:this.$=e[t-3],h.addVertex(e[t-3],e[t-1],"square");break;case 59:this.$=e[t-3],h.addVertex(e[t-3],e[t-1],"doublecircle");break;case 60:this.$=e[t-5],h.addVertex(e[t-5],e[t-2],"circle");break;case 61:this.$=e[t-3],h.addVertex(e[t-3],e[t-1],"ellipse");break;case 62:this.$=e[t-3],h.addVertex(e[t-3],e[t-1],"stadium");break;case 63:this.$=e[t-3],h.addVertex(e[t-3],e[t-1],"subroutine");break;case 64:this.$=e[t-7],h.addVertex(e[t-7],e[t-1],"rect",void 0,void 0,void 0,Object.fromEntries([[e[t-5],e[t-3]]]));break;case 65:this.$=e[t-3],h.addVertex(e[t-3],e[t-1],"cylinder");break;case 66:this.$=e[t-3],h.addVertex(e[t-3],e[t-1],"round");break;case 67:this.$=e[t-3],h.addVertex(e[t-3],e[t-1],"diamond");break;case 68:this.$=e[t-5],h.addVertex(e[t-5],e[t-2],"hexagon");break;case 69:this.$=e[t-3],h.addVertex(e[t-3],e[t-1],"odd");break;case 70:this.$=e[t-3],h.addVertex(e[t-3],e[t-1],"trapezoid");break;case 71:this.$=e[t-3],h.addVertex(e[t-3],e[t-1],"inv_trapezoid");break;case 72:this.$=e[t-3],h.addVertex(e[t-3],e[t-1],"lean_right");break;case 73:this.$=e[t-3],h.addVertex(e[t-3],e[t-1],"lean_left");break;case 74:this.$=e[t],h.addVertex(e[t]);break;case 75:e[t-1].text=e[t],this.$=e[t-1];break;case 76:case 77:e[t-2].text=e[t-1],this.$=e[t-2];break;case 78:this.$=e[t];break;case 79:var U=h.destructLink(e[t],e[t-2]);this.$={type:U.type,stroke:U.stroke,length:U.length,text:e[t-1]};break;case 80:var U=h.destructLink(e[t],e[t-2]);this.$={type:U.type,stroke:U.stroke,length:U.length,text:e[t-1],id:e[t-3]};break;case 81:this.$={text:e[t],type:"text"};break;case 82:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 83:this.$={text:e[t],type:"string"};break;case 84:this.$={text:e[t],type:"markdown"};break;case 85:var U=h.destructLink(e[t]);this.$={type:U.type,stroke:U.stroke,length:U.length};break;case 86:var U=h.destructLink(e[t]);this.$={type:U.type,stroke:U.stroke,length:U.length,id:e[t-1]};break;case 87:this.$=e[t-1];break;case 88:this.$={text:e[t],type:"text"};break;case 89:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 90:this.$={text:e[t],type:"string"};break;case 91:case 106:this.$={text:e[t],type:"markdown"};break;case 103:this.$={text:e[t],type:"text"};break;case 104:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 105:this.$={text:e[t],type:"text"};break;case 107:this.$=e[t-4],h.addClass(e[t-2],e[t]);break;case 108:this.$=e[t-4],h.setClass(e[t-2],e[t]);break;case 109:case 117:this.$=e[t-1],h.setClickEvent(e[t-1],e[t]);break;case 110:case 118:this.$=e[t-3],h.setClickEvent(e[t-3],e[t-2]),h.setTooltip(e[t-3],e[t]);break;case 111:this.$=e[t-2],h.setClickEvent(e[t-2],e[t-1],e[t]);break;case 112:this.$=e[t-4],h.setClickEvent(e[t-4],e[t-3],e[t-2]),h.setTooltip(e[t-4],e[t]);break;case 113:this.$=e[t-2],h.setLink(e[t-2],e[t]);break;case 114:this.$=e[t-4],h.setLink(e[t-4],e[t-2]),h.setTooltip(e[t-4],e[t]);break;case 115:this.$=e[t-4],h.setLink(e[t-4],e[t-2],e[t]);break;case 116:this.$=e[t-6],h.setLink(e[t-6],e[t-4],e[t]),h.setTooltip(e[t-6],e[t-2]);break;case 119:this.$=e[t-1],h.setLink(e[t-1],e[t]);break;case 120:this.$=e[t-3],h.setLink(e[t-3],e[t-2]),h.setTooltip(e[t-3],e[t]);break;case 121:this.$=e[t-3],h.setLink(e[t-3],e[t-2],e[t]);break;case 122:this.$=e[t-5],h.setLink(e[t-5],e[t-4],e[t]),h.setTooltip(e[t-5],e[t-2]);break;case 123:this.$=e[t-4],h.addVertex(e[t-2],void 0,void 0,e[t]);break;case 124:this.$=e[t-4],h.updateLink([e[t-2]],e[t]);break;case 125:this.$=e[t-4],h.updateLink(e[t-2],e[t]);break;case 126:this.$=e[t-8],h.updateLinkInterpolate([e[t-6]],e[t-2]),h.updateLink([e[t-6]],e[t]);break;case 127:this.$=e[t-8],h.updateLinkInterpolate(e[t-6],e[t-2]),h.updateLink(e[t-6],e[t]);break;case 128:this.$=e[t-6],h.updateLinkInterpolate([e[t-4]],e[t]);break;case 129:this.$=e[t-6],h.updateLinkInterpolate(e[t-4],e[t]);break;case 130:case 132:this.$=[e[t]];break;case 131:case 133:e[t-2].push(e[t]),this.$=e[t-2];break;case 135:this.$=e[t-1]+e[t];break;case 183:this.$=e[t];break;case 184:this.$=e[t-1]+""+e[t];break;case 186:this.$=e[t-1]+""+e[t];break;case 187:this.$={stmt:"dir",value:"TB"};break;case 188:this.$={stmt:"dir",value:"BT"};break;case 189:this.$={stmt:"dir",value:"RL"};break;case 190:this.$={stmt:"dir",value:"LR"};break;case 191:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:i,10:n,12:a},{1:[3]},s(r,u,{5:6}),{4:7,9:i,10:n,12:a},{4:8,9:i,10:n,12:a},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:f,9:c,10:b,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:D,33:24,34:T,36:w,38:k,42:28,43:39,44:C,45:40,47:41,60:y,84:S,85:Z,86:Se,87:j,88:ee,89:O,102:G,105:P,106:M,109:l,111:d,113:42,114:x,115:B,116:N,121:fe,122:ge,123:Ee,124:Te,125:je},s(r,[2,9]),s(r,[2,10]),s(r,[2,11]),{8:[1,55],9:[1,56],10:be,15:54,18:57},s(L,[2,3]),s(L,[2,4]),s(L,[2,5]),s(L,[2,6]),s(L,[2,7]),s(L,[2,8]),{8:se,9:ie,11:re,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:se,9:ie,11:re,21:68},{8:se,9:ie,11:re,21:69},{8:se,9:ie,11:re,21:70},{8:se,9:ie,11:re,21:71},{8:se,9:ie,11:re,21:72},{8:se,9:ie,10:[1,73],11:re,21:74},s(L,[2,36]),{35:[1,75]},{37:[1,76]},s(L,[2,39]),s(ke,[2,52],{18:77,39:78,10:be,40:ut}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:Fe,44:_e,60:ve,80:[1,87],89:Be,95:[1,84],97:[1,85],101:86,105:Le,106:Ve,109:Ie,111:we,114:Re,115:Ne,116:Ge,120:88},s(L,[2,187]),s(L,[2,188]),s(L,[2,189]),s(L,[2,190]),s(L,[2,191]),s(De,[2,53]),s(De,[2,56],{46:[1,100]}),s(W,[2,74],{113:113,29:[1,101],44:C,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:y,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:O,102:G,105:P,106:M,109:l,111:d,114:x,115:B,116:N}),s(H,[2,183]),s(H,[2,144]),s(H,[2,145]),s(H,[2,146]),s(H,[2,147]),s(H,[2,148]),s(H,[2,149]),s(H,[2,150]),s(H,[2,151]),s(H,[2,152]),s(H,[2,153]),s(H,[2,154]),s(r,[2,12]),s(r,[2,18]),s(r,[2,19]),{9:[1,114]},s(ot,[2,26],{18:115,10:be}),s(L,[2,27]),{42:116,43:39,44:C,45:40,47:41,60:y,89:O,102:G,105:P,106:M,109:l,111:d,113:42,114:x,115:B,116:N},s(L,[2,40]),s(L,[2,41]),s(L,[2,42]),s(Pe,[2,78],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:lt,81:ct,116:Ke,119:Ye},{75:[1,126],77:[1,127]},s(ht,[2,85]),s(L,[2,28]),s(L,[2,29]),s(L,[2,30]),s(L,[2,31]),s(L,[2,32]),{10:dt,12:pt,14:ft,27:gt,28:128,32:bt,44:kt,60:At,75:mt,80:[1,130],81:[1,131],83:141,84:Ct,85:St,86:Tt,87:Dt,88:yt,89:xt,90:Et,91:129,105:Ft,109:_t,111:vt,114:Bt,115:Lt,116:Vt},s(Qe,u,{5:154}),s(L,[2,37]),s(L,[2,38]),s(ke,[2,49],{44:It}),s(ke,[2,50],{18:156,10:be,40:wt}),s(De,[2,44]),{44:C,47:158,60:y,89:O,102:G,105:P,106:M,109:l,111:d,113:42,114:x,115:B,116:N},{102:[1,159],103:160,105:[1,161]},{44:C,47:162,60:y,89:O,102:G,105:P,106:M,109:l,111:d,113:42,114:x,115:B,116:N},{44:C,47:163,60:y,89:O,102:G,105:P,106:M,109:l,111:d,113:42,114:x,115:B,116:N},s(R,[2,109],{10:[1,164],96:[1,165]}),{80:[1,166]},s(R,[2,117],{120:168,10:[1,167],14:Fe,44:_e,60:ve,89:Be,105:Le,106:Ve,109:Ie,111:we,114:Re,115:Ne,116:Ge}),s(R,[2,119],{10:[1,169]}),s(X,[2,185]),s(X,[2,172]),s(X,[2,173]),s(X,[2,174]),s(X,[2,175]),s(X,[2,176]),s(X,[2,177]),s(X,[2,178]),s(X,[2,179]),s(X,[2,180]),s(X,[2,181]),s(X,[2,182]),{44:C,47:170,60:y,89:O,102:G,105:P,106:M,109:l,111:d,113:42,114:x,115:B,116:N},{30:171,67:E,80:K,81:Y,82:172,116:F,117:_,118:v},{30:179,67:E,80:K,81:Y,82:172,116:F,117:_,118:v},{30:181,50:[1,180],67:E,80:K,81:Y,82:172,116:F,117:_,118:v},{30:182,67:E,80:K,81:Y,82:172,116:F,117:_,118:v},{30:183,67:E,80:K,81:Y,82:172,116:F,117:_,118:v},{30:184,67:E,80:K,81:Y,82:172,116:F,117:_,118:v},{109:[1,185]},{30:186,67:E,80:K,81:Y,82:172,116:F,117:_,118:v},{30:187,65:[1,188],67:E,80:K,81:Y,82:172,116:F,117:_,118:v},{30:189,67:E,80:K,81:Y,82:172,116:F,117:_,118:v},{30:190,67:E,80:K,81:Y,82:172,116:F,117:_,118:v},{30:191,67:E,80:K,81:Y,82:172,116:F,117:_,118:v},s(H,[2,184]),s(r,[2,20]),s(ot,[2,25]),s(ke,[2,47],{39:192,18:193,10:be,40:ut}),s(Pe,[2,75],{10:[1,194]}),{10:[1,195]},{30:196,67:E,80:K,81:Y,82:172,116:F,117:_,118:v},{77:[1,197],79:198,116:Ke,119:Ye},s(Me,[2,81]),s(Me,[2,83]),s(Me,[2,84]),s(Me,[2,170]),s(Me,[2,171]),{76:199,79:121,80:lt,81:ct,116:Ke,119:Ye},s(ht,[2,86]),{8:se,9:ie,10:dt,11:re,12:pt,14:ft,21:201,27:gt,29:[1,200],32:bt,44:kt,60:At,75:mt,83:141,84:Ct,85:St,86:Tt,87:Dt,88:yt,89:xt,90:Et,91:202,105:Ft,109:_t,111:vt,114:Bt,115:Lt,116:Vt},s(V,[2,103]),s(V,[2,105]),s(V,[2,106]),s(V,[2,159]),s(V,[2,160]),s(V,[2,161]),s(V,[2,162]),s(V,[2,163]),s(V,[2,164]),s(V,[2,165]),s(V,[2,166]),s(V,[2,167]),s(V,[2,168]),s(V,[2,169]),s(V,[2,92]),s(V,[2,93]),s(V,[2,94]),s(V,[2,95]),s(V,[2,96]),s(V,[2,97]),s(V,[2,98]),s(V,[2,99]),s(V,[2,100]),s(V,[2,101]),s(V,[2,102]),{6:11,7:12,8:f,9:c,10:b,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:D,32:[1,203],33:24,34:T,36:w,38:k,42:28,43:39,44:C,45:40,47:41,60:y,84:S,85:Z,86:Se,87:j,88:ee,89:O,102:G,105:P,106:M,109:l,111:d,113:42,114:x,115:B,116:N,121:fe,122:ge,123:Ee,124:Te,125:je},{10:be,18:204},s(ke,[2,51],{44:Rt}),s(De,[2,43]),{10:[1,206],44:C,60:y,89:O,102:G,105:P,106:M,109:l,111:d,113:113,114:x,115:B,116:N},{10:[1,207]},{10:[1,208],106:[1,209]},s(Nt,[2,130]),{10:[1,210],44:C,60:y,89:O,102:G,105:P,106:M,109:l,111:d,113:113,114:x,115:B,116:N},{10:[1,211],44:C,60:y,89:O,102:G,105:P,106:M,109:l,111:d,113:113,114:x,115:B,116:N},{80:[1,212]},s(R,[2,111],{10:[1,213]}),s(R,[2,113],{10:[1,214]}),{80:[1,215]},s(X,[2,186]),{80:[1,216],98:[1,217]},s(De,[2,57],{113:113,44:C,60:y,89:O,102:G,105:P,106:M,109:l,111:d,114:x,115:B,116:N}),{31:[1,218],67:E,82:219,116:F,117:_,118:v},s(Ae,[2,88]),s(Ae,[2,90]),s(Ae,[2,91]),s(Ae,[2,155]),s(Ae,[2,156]),s(Ae,[2,157]),s(Ae,[2,158]),{49:[1,220],67:E,82:219,116:F,117:_,118:v},{30:221,67:E,80:K,81:Y,82:172,116:F,117:_,118:v},{51:[1,222],67:E,82:219,116:F,117:_,118:v},{53:[1,223],67:E,82:219,116:F,117:_,118:v},{55:[1,224],67:E,82:219,116:F,117:_,118:v},{57:[1,225],67:E,82:219,116:F,117:_,118:v},{60:[1,226]},{64:[1,227],67:E,82:219,116:F,117:_,118:v},{66:[1,228],67:E,82:219,116:F,117:_,118:v},{30:229,67:E,80:K,81:Y,82:172,116:F,117:_,118:v},{31:[1,230],67:E,82:219,116:F,117:_,118:v},{67:E,69:[1,231],71:[1,232],82:219,116:F,117:_,118:v},{67:E,69:[1,234],71:[1,233],82:219,116:F,117:_,118:v},s(ke,[2,45],{18:235,10:be,40:wt}),s(ke,[2,48],{44:It}),s(Pe,[2,77]),s(Pe,[2,76]),{62:[1,236],67:E,82:219,116:F,117:_,118:v},s(Pe,[2,79]),s(Me,[2,82]),{77:[1,237],79:198,116:Ke,119:Ye},{30:238,67:E,80:K,81:Y,82:172,116:F,117:_,118:v},s(Qe,u,{5:239}),s(V,[2,104]),s(L,[2,35]),{43:240,44:C,45:40,47:41,60:y,89:O,102:G,105:P,106:M,109:l,111:d,113:42,114:x,115:B,116:N},{10:be,18:241},{10:ae,60:ne,84:ue,92:242,105:oe,107:243,108:244,109:le,110:ce,111:he,112:de},{10:ae,60:ne,84:ue,92:253,104:[1,254],105:oe,107:243,108:244,109:le,110:ce,111:he,112:de},{10:ae,60:ne,84:ue,92:255,104:[1,256],105:oe,107:243,108:244,109:le,110:ce,111:he,112:de},{105:[1,257]},{10:ae,60:ne,84:ue,92:258,105:oe,107:243,108:244,109:le,110:ce,111:he,112:de},{44:C,47:259,60:y,89:O,102:G,105:P,106:M,109:l,111:d,113:42,114:x,115:B,116:N},s(R,[2,110]),{80:[1,260]},{80:[1,261],98:[1,262]},s(R,[2,118]),s(R,[2,120],{10:[1,263]}),s(R,[2,121]),s(W,[2,58]),s(Ae,[2,89]),s(W,[2,59]),{51:[1,264],67:E,82:219,116:F,117:_,118:v},s(W,[2,66]),s(W,[2,61]),s(W,[2,62]),s(W,[2,63]),{109:[1,265]},s(W,[2,65]),s(W,[2,67]),{66:[1,266],67:E,82:219,116:F,117:_,118:v},s(W,[2,69]),s(W,[2,70]),s(W,[2,72]),s(W,[2,71]),s(W,[2,73]),s(ke,[2,46],{44:Rt}),s([10,44,60,89,102,105,106,109,111,114,115,116],[2,87]),s(Pe,[2,80]),{31:[1,267],67:E,82:219,116:F,117:_,118:v},{6:11,7:12,8:f,9:c,10:b,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:D,32:[1,268],33:24,34:T,36:w,38:k,42:28,43:39,44:C,45:40,47:41,60:y,84:S,85:Z,86:Se,87:j,88:ee,89:O,102:G,105:P,106:M,109:l,111:d,113:42,114:x,115:B,116:N,121:fe,122:ge,123:Ee,124:Te,125:je},s(De,[2,55]),{43:269,44:C,45:40,47:41,60:y,89:O,102:G,105:P,106:M,109:l,111:d,113:42,114:x,115:B,116:N},s(R,[2,123],{106:Oe}),s(Gt,[2,132],{108:271,10:ae,60:ne,84:ue,105:oe,109:le,110:ce,111:he,112:de}),s(te,[2,134]),s(te,[2,136]),s(te,[2,137]),s(te,[2,138]),s(te,[2,139]),s(te,[2,140]),s(te,[2,141]),s(te,[2,142]),s(te,[2,143]),s(R,[2,124],{106:Oe}),{10:[1,272]},s(R,[2,125],{106:Oe}),{10:[1,273]},s(Nt,[2,131]),s(R,[2,107],{106:Oe}),s(R,[2,108],{113:113,44:C,60:y,89:O,102:G,105:P,106:M,109:l,111:d,114:x,115:B,116:N}),s(R,[2,112]),s(R,[2,114],{10:[1,274]}),s(R,[2,115]),{98:[1,275]},{51:[1,276]},{62:[1,277]},{66:[1,278]},{8:se,9:ie,11:re,21:279},s(L,[2,34]),s(De,[2,54]),{10:ae,60:ne,84:ue,105:oe,107:280,108:244,109:le,110:ce,111:he,112:de},s(te,[2,135]),{14:Fe,44:_e,60:ve,89:Be,101:281,105:Le,106:Ve,109:Ie,111:we,114:Re,115:Ne,116:Ge,120:88},{14:Fe,44:_e,60:ve,89:Be,101:282,105:Le,106:Ve,109:Ie,111:we,114:Re,115:Ne,116:Ge,120:88},{98:[1,283]},s(R,[2,122]),s(W,[2,60]),{30:284,67:E,80:K,81:Y,82:172,116:F,117:_,118:v},s(W,[2,68]),s(Qe,u,{5:285}),s(Gt,[2,133],{108:271,10:ae,60:ne,84:ue,105:oe,109:le,110:ce,111:he,112:de}),s(R,[2,128],{120:168,10:[1,286],14:Fe,44:_e,60:ve,89:Be,105:Le,106:Ve,109:Ie,111:we,114:Re,115:Ne,116:Ge}),s(R,[2,129],{120:168,10:[1,287],14:Fe,44:_e,60:ve,89:Be,105:Le,106:Ve,109:Ie,111:we,114:Re,115:Ne,116:Ge}),s(R,[2,116]),{31:[1,288],67:E,82:219,116:F,117:_,118:v},{6:11,7:12,8:f,9:c,10:b,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:D,32:[1,289],33:24,34:T,36:w,38:k,42:28,43:39,44:C,45:40,47:41,60:y,84:S,85:Z,86:Se,87:j,88:ee,89:O,102:G,105:P,106:M,109:l,111:d,113:42,114:x,115:B,116:N,121:fe,122:ge,123:Ee,124:Te,125:je},{10:ae,60:ne,84:ue,92:290,105:oe,107:243,108:244,109:le,110:ce,111:he,112:de},{10:ae,60:ne,84:ue,92:291,105:oe,107:243,108:244,109:le,110:ce,111:he,112:de},s(W,[2,64]),s(L,[2,33]),s(R,[2,126],{106:Oe}),s(R,[2,127],{106:Oe})],defaultActions:{},parseError:m(function(p,g){if(g.recoverable)this.trace(p);else{var A=new Error(p);throw A.hash=g,A}},"parseError"),parse:m(function(p){var g=this,A=[0],h=[],I=[null],e=[],We=this.table,t="",U=0,Pt=0,qt=2,Mt=1,Ht=e.slice.call(arguments,1),z=Object.create(this.lexer),ye={yy:{}};for(var Ze in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ze)&&(ye.yy[Ze]=this.yy[Ze]);z.setInput(p,ye.yy),ye.yy.lexer=z,ye.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var $e=z.yylloc;e.push($e);var Xt=z.options&&z.options.ranges;typeof ye.yy.parseError=="function"?this.parseError=ye.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Qt(Q){A.length=A.length-2*Q,I.length=I.length-Q,e.length=e.length-Q}m(Qt,"popStack");function Ot(){var Q;return Q=h.pop()||z.lex()||Mt,typeof Q!="number"&&(Q instanceof Array&&(h=Q,Q=h.pop()),Q=g.symbols_[Q]||Q),Q}m(Ot,"lex");for(var q,xe,J,et,Ue={},He,pe,Ut,Xe;;){if(xe=A[A.length-1],this.defaultActions[xe]?J=this.defaultActions[xe]:((q===null||typeof q>"u")&&(q=Ot()),J=We[xe]&&We[xe][q]),typeof J>"u"||!J.length||!J[0]){var tt="";Xe=[];for(He in We[xe])this.terminals_[He]&&He>qt&&Xe.push("'"+this.terminals_[He]+"'");z.showPosition?tt="Parse error on line "+(U+1)+`:
|
|
10
|
+
`+z.showPosition()+`
|
|
11
|
+
Expecting `+Xe.join(", ")+", got '"+(this.terminals_[q]||q)+"'":tt="Parse error on line "+(U+1)+": Unexpected "+(q==Mt?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(tt,{text:z.match,token:this.terminals_[q]||q,line:z.yylineno,loc:$e,expected:Xe})}if(J[0]instanceof Array&&J.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xe+", token: "+q);switch(J[0]){case 1:A.push(q),I.push(z.yytext),e.push(z.yylloc),A.push(J[1]),q=null,Pt=z.yyleng,t=z.yytext,U=z.yylineno,$e=z.yylloc;break;case 2:if(pe=this.productions_[J[1]][1],Ue.$=I[I.length-pe],Ue._$={first_line:e[e.length-(pe||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(pe||1)].first_column,last_column:e[e.length-1].last_column},Xt&&(Ue._$.range=[e[e.length-(pe||1)].range[0],e[e.length-1].range[1]]),et=this.performAction.apply(Ue,[t,Pt,U,ye.yy,J[1],I,e].concat(Ht)),typeof et<"u")return et;pe&&(A=A.slice(0,-1*pe*2),I=I.slice(0,-1*pe),e=e.slice(0,-1*pe)),A.push(this.productions_[J[1]][0]),I.push(Ue.$),e.push(Ue._$),Ut=We[A[A.length-2]][A[A.length-1]],A.push(Ut);break;case 3:return!0}}return!0},"parse")},Yt=(function(){var me={EOF:1,parseError:m(function(g,A){if(this.yy.parser)this.yy.parser.parseError(g,A);else throw new Error(g)},"parseError"),setInput:m(function(p,g){return this.yy=g||this.yy||{},this._input=p,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:m(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var g=p.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:m(function(p){var g=p.length,A=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var h=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var I=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===h.length?this.yylloc.first_column:0)+h[h.length-A.length].length-A[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(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).
|
|
12
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:m(function(p){this.unput(this.match.slice(p))},"less"),pastInput:m(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var p=this.pastInput(),g=new Array(p.length+1).join("-");return p+this.upcomingInput()+`
|
|
13
|
+
`+g+"^"},"showPosition"),test_match:m(function(p,g){var A,h,I;if(this.options.backtrack_lexer&&(I={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(I.yylloc.range=this.yylloc.range.slice(0))),h=p[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],A=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var e in I)this[e]=I[e];return!1}return!1},"test_match"),next:m(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,g,A,h;this._more||(this.yytext="",this.match="");for(var I=this._currentRules(),e=0;e<I.length;e++)if(A=this._input.match(this.rules[I[e]]),A&&(!g||A[0].length>g[0].length)){if(g=A,h=e,this.options.backtrack_lexer){if(p=this.test_match(A,I[e]),p!==!1)return p;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(p=this.test_match(g,I[h]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
14
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:m(function(){var g=this.next();return g||this.lex()},"lex"),begin:m(function(g){this.conditionStack.push(g)},"begin"),popState:m(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:m(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:m(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:m(function(g){this.begin(g)},"pushState"),stateStackSize:m(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:m(function(g,A,h,I){switch(h){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),A.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const e=/\n\s*/g;return A.yytext=A.yytext.replace(e,"<br/>"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return g.lex.firstGraph()&&this.begin("dir"),12;case 36:return g.lex.firstGraph()&&this.begin("dir"),12;case 37:return g.lex.firstGraph()&&this.begin("dir"),12;case 38:return g.lex.firstGraph()&&this.begin("dir"),12;case 39:return 27;case 40:return 32;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return 98;case 45:return this.popState(),13;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return this.popState(),14;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:return 111;case 64:return 46;case 65:return 60;case 66:return 44;case 67:return 8;case 68:return 106;case 69:return 115;case 70:return this.popState(),77;case 71:return this.pushState("edgeText"),75;case 72:return 119;case 73:return this.popState(),77;case 74:return this.pushState("thickEdgeText"),75;case 75:return 119;case 76:return this.popState(),77;case 77:return this.pushState("dottedEdgeText"),75;case 78:return 119;case 79:return 77;case 80:return this.popState(),53;case 81:return"TEXT";case 82:return this.pushState("ellipseText"),52;case 83:return this.popState(),55;case 84:return this.pushState("text"),54;case 85:return this.popState(),57;case 86:return this.pushState("text"),56;case 87:return 58;case 88:return this.pushState("text"),67;case 89:return this.popState(),64;case 90:return this.pushState("text"),63;case 91:return this.popState(),49;case 92:return this.pushState("text"),48;case 93:return this.popState(),69;case 94:return this.popState(),71;case 95:return 117;case 96:return this.pushState("trapText"),68;case 97:return this.pushState("trapText"),70;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return"SEP";case 102:return 89;case 103:return 115;case 104:return 111;case 105:return 44;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;case 110:return this.pushState("text"),62;case 111:return this.popState(),51;case 112:return this.pushState("text"),50;case 113:return this.popState(),31;case 114:return this.pushState("text"),29;case 115:return this.popState(),66;case 116:return this.pushState("text"),65;case 117:return"TEXT";case 118:return"QUOTE";case 119:return 9;case 120:return 10;case 121:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:swimlane-beta\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"\[\]\(\)\{\}\|]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:[^\S\n\r]+)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}};return me})();Je.lexer=Yt;function qe(){this.yy={}}return m(qe,"Parser"),qe.prototype=Je,Je.Parser=qe,new qe})();nt.parser=nt;var Wt=nt,jt=Object.assign({},Wt);jt.parse=s=>{const i=s.replace(/}\s*\n/g,`}
|
|
15
|
+
`);return Wt.parse(i)};var B1=jt,L1=m(s=>{const{theme:i,bkgColorArray:n,borderColorArray:a}=s;if(!b1(i,a))return"";const r=k1(s.look),u=A1(n);let f="";for(let c=0;c<m1(s.THEME_COLOR_LIMIT,a);c++){const b=a[c%a.length],o=u?`fill: ${n[c%n.length]};`:"",D=`[data-look="${r}"][data-color-id="color-${c}"]`,T=m(k=>`${D}.node ${k}, ${D}.rough-node ${k}`,"collapsedRule"),w=m(k=>`${D}.swimlane.cluster .swimlane-title${k}, ${D}.swimlane.cluster .swimlane-body${k}`,"laneRule");f+=`
|
|
16
|
+
|
|
17
|
+
${D}.cluster:not(.swimlane) rect {
|
|
18
|
+
stroke: ${b};
|
|
19
|
+
${o}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
${D}.cluster:not(.swimlane) path {
|
|
23
|
+
stroke: ${b};
|
|
24
|
+
${o}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Lane, classic and neo. */
|
|
28
|
+
${D}.swimlane.cluster rect.swimlane-title,
|
|
29
|
+
${D}.swimlane.cluster rect.swimlane-body {
|
|
30
|
+
stroke: ${b};
|
|
31
|
+
${o}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Lane, handDrawn: roughjs emits the hachure fill first, then the outline. */
|
|
35
|
+
${w(" path:nth-of-type(2)")} {
|
|
36
|
+
stroke: ${b};
|
|
37
|
+
}
|
|
38
|
+
${u?`
|
|
39
|
+
/* A roughjs fill is drawn as lines, so the lane fill is a stroke here. */
|
|
40
|
+
${w(" path:first-of-type")} {
|
|
41
|
+
stroke: ${n[c%n.length]};
|
|
42
|
+
}
|
|
43
|
+
`:""}
|
|
44
|
+
${T(".collapsed-group")},
|
|
45
|
+
${T(".collapsed-group path")} {
|
|
46
|
+
stroke: ${b};
|
|
47
|
+
${o}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* The ellipsis dots and the separator take clusterBorder further down, so without
|
|
51
|
+
these the container is palette-coloured while its own markers are not. */
|
|
52
|
+
${T(".collapsed-indicator")} {
|
|
53
|
+
fill: ${b};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
${T(".collapsed-separator")} {
|
|
57
|
+
stroke: ${b};
|
|
58
|
+
}
|
|
59
|
+
`}return f},"genColor"),V1=m((s,i)=>{const n=S1,a=n(s,"r"),r=n(s,"g"),u=n(s,"b");return C1(a,r,u,i)},"fade"),I1=m(s=>`${L1(s)}
|
|
60
|
+
.label {
|
|
61
|
+
font-family: ${s.fontFamily};
|
|
62
|
+
color: ${s.nodeTextColor||s.textColor};
|
|
63
|
+
}
|
|
64
|
+
.cluster-label text {
|
|
65
|
+
fill: ${s.titleColor};
|
|
66
|
+
}
|
|
67
|
+
.cluster-label span {
|
|
68
|
+
color: ${s.titleColor};
|
|
69
|
+
}
|
|
70
|
+
.cluster-label span p {
|
|
71
|
+
background-color: transparent;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.label text,span {
|
|
75
|
+
fill: ${s.nodeTextColor||s.textColor};
|
|
76
|
+
color: ${s.nodeTextColor||s.textColor};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.node rect,
|
|
80
|
+
.node circle,
|
|
81
|
+
.node ellipse,
|
|
82
|
+
.node polygon,
|
|
83
|
+
.node path {
|
|
84
|
+
fill: ${s.mainBkg};
|
|
85
|
+
stroke: ${s.nodeBorder};
|
|
86
|
+
stroke-width: ${s.strokeWidth??1}px;
|
|
87
|
+
}
|
|
88
|
+
.rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
|
|
89
|
+
text-anchor: middle;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.node .katex path {
|
|
93
|
+
fill: #000;
|
|
94
|
+
stroke: #000;
|
|
95
|
+
stroke-width: 1px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
|
|
99
|
+
text-align: center;
|
|
100
|
+
}
|
|
101
|
+
.node.clickable {
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
.root .anchor path {
|
|
107
|
+
fill: ${s.lineColor} !important;
|
|
108
|
+
stroke-width: 0;
|
|
109
|
+
stroke: ${s.lineColor};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.arrowheadPath {
|
|
113
|
+
fill: ${s.arrowheadColor};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.edgePaths .path {
|
|
117
|
+
stroke: ${s.lineColor};
|
|
118
|
+
stroke-width: ${s.strokeWidth??2}px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.flowchart-link {
|
|
122
|
+
stroke: ${s.lineColor};
|
|
123
|
+
fill: none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.edgeLabel {
|
|
127
|
+
background-color: ${s.edgeLabelBackground};
|
|
128
|
+
p {
|
|
129
|
+
background-color: ${s.edgeLabelBackground};
|
|
130
|
+
}
|
|
131
|
+
rect {
|
|
132
|
+
opacity: 0.5;
|
|
133
|
+
background-color: ${s.edgeLabelBackground};
|
|
134
|
+
fill: ${s.edgeLabelBackground};
|
|
135
|
+
}
|
|
136
|
+
text-align: center;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* For html labels only */
|
|
140
|
+
.labelBkg {
|
|
141
|
+
background-color: ${V1(s.edgeLabelBackground,.5)};
|
|
142
|
+
// background-color:
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.cluster rect {
|
|
146
|
+
fill: ${s.clusterBkg};
|
|
147
|
+
stroke: ${s.clusterBorder};
|
|
148
|
+
stroke-width: 1px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.cluster text {
|
|
152
|
+
fill: ${s.titleColor};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.cluster span {
|
|
156
|
+
color: ${s.titleColor};
|
|
157
|
+
}
|
|
158
|
+
/* .cluster div {
|
|
159
|
+
color: ${s.titleColor};
|
|
160
|
+
} */
|
|
161
|
+
|
|
162
|
+
/* Collapsed subgraph node (@{ view: collapsed }) */
|
|
163
|
+
.node .collapsed-indicator {
|
|
164
|
+
fill: ${s.clusterBorder};
|
|
165
|
+
stroke: none;
|
|
166
|
+
opacity: 0.6;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.node .collapsed-separator {
|
|
170
|
+
stroke: ${s.clusterBorder};
|
|
171
|
+
stroke-width: 0.75px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
div.mermaidTooltip {
|
|
175
|
+
position: absolute;
|
|
176
|
+
text-align: center;
|
|
177
|
+
max-width: 200px;
|
|
178
|
+
padding: 2px;
|
|
179
|
+
font-family: ${s.fontFamily};
|
|
180
|
+
font-size: 12px;
|
|
181
|
+
background: ${s.tertiaryColor};
|
|
182
|
+
border: 1px solid ${s.border2};
|
|
183
|
+
border-radius: 2px;
|
|
184
|
+
pointer-events: none;
|
|
185
|
+
z-index: 100;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.flowchartTitleText {
|
|
189
|
+
text-anchor: middle;
|
|
190
|
+
font-size: 18px;
|
|
191
|
+
fill: ${s.textColor};
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
rect.text {
|
|
195
|
+
fill: none;
|
|
196
|
+
stroke-width: 0;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.icon-shape, .image-shape {
|
|
200
|
+
background-color: ${s.edgeLabelBackground};
|
|
201
|
+
p {
|
|
202
|
+
background-color: ${s.edgeLabelBackground};
|
|
203
|
+
padding: 2px;
|
|
204
|
+
}
|
|
205
|
+
.label rect {
|
|
206
|
+
opacity: 0.5;
|
|
207
|
+
background-color: ${s.edgeLabelBackground};
|
|
208
|
+
fill: ${s.edgeLabelBackground};
|
|
209
|
+
}
|
|
210
|
+
text-align: center;
|
|
211
|
+
}
|
|
212
|
+
${Jt()}
|
|
213
|
+
`,"getStyles"),w1=I1,Kt=m(({styles:s=w1}={})=>({parser:B1,get db(){return new E1},renderer:v1,styles:s,init:m(i=>{i.flowchart||(i.flowchart={}),i.flowchart.arrowMarkerAbsolute=i.arrowMarkerAbsolute,e1({flowchart:{arrowMarkerAbsolute:i.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),R1=Kt();const z1=Object.freeze(Object.defineProperty({__proto__:null,createFlowDiagram:Kt,diagram:R1},Symbol.toStringTag,{value:"Module"}));export{Kt as c,z1 as f,w1 as s};
|