@juki-team/base-ui 1.5.11 → 1.5.13
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/dist/esm/ArrowForwardIcon-DelUFdaJ.js +1 -0
- package/dist/esm/{BarChart-D6_BRhr2.js → BarChart-D2X8Qu4u.js} +1 -1
- package/dist/esm/{CartesianChart-CWujTVm7.js → CartesianChart-DYpkf6Ou.js} +1 -1
- package/dist/esm/{ChangePasswordModal-Ds3TqD5C.js → ChangePasswordModal-yc4D7RMs.js} +1 -1
- package/dist/esm/{CodeEditor-CTnPGIiF.js → CodeEditor-Dxp5QnTB.js} +1 -1
- package/dist/esm/{CodeViewer-DKaZetL7.js → CodeViewer-BSZXIngC.js} +1 -1
- package/dist/esm/{Collapse-cx1sfcdL.js → Collapse-D-w5SKss.js} +1 -1
- package/dist/esm/{DataGrid-bZJxnNpn.js → DataGrid-BdFgb8IP.js} +1 -1
- package/dist/esm/DataViewer-DVVGkDSK.js +1 -0
- package/dist/esm/{DrawerView-uqDkkfN3.js → DrawerView-DCRvckZd.js} +1 -1
- package/dist/esm/{ExcalidrawButton-DP7IRqig.js → ExcalidrawButton-_a-eNbyb.js} +1 -1
- package/dist/esm/{GraphvizViewer-BGX2Z8KP.js → GraphvizViewer-B2-JVx0t.js} +1 -1
- package/dist/esm/{ImageLoaderCropper-BfIfmEdE.js → ImageLoaderCropper-wV-hPOjq.js} +1 -1
- package/dist/esm/{InputCellPhoneNumber-qovO8IT4.js → InputCellPhoneNumber-Bcl22QsC.js} +1 -1
- package/dist/esm/{InputColor-8DJM_wZR.js → InputColor-CHgGjI3f.js} +1 -1
- package/dist/esm/{LineChart-vXWysFNq.js → LineChart-ByKPkVhP.js} +1 -1
- package/dist/esm/{LoaderLayer-Cv80UCdL.js → LoaderLayer-ECtsj85k.js} +1 -1
- package/dist/esm/{MdMath-D4p_cWv8.js → MdMath-DljkRDxR.js} +1 -1
- package/dist/esm/{MdMathEditor-BC4QqqY5.js → MdMathEditor-Dvq5oODw.js} +1 -1
- package/dist/esm/{Popover-KQx_QYJY.js → Popover-CX8YffOd.js} +1 -1
- package/dist/esm/ReplyIcon-BNYBKbgb.js +1 -0
- package/dist/esm/{SettingsIcon-C3sN1TNw.js → SettingsIcon-B9nmP4lD.js} +1 -1
- package/dist/esm/{SlideDeck-BP-CNUhS.js → SlideDeck-C0n93gz0.js} +1 -1
- package/dist/esm/{TableEyeIcon-BFfTLgKU.js → TableEyeIcon-Mb5aFvN0.js} +1 -1
- package/dist/esm/{TableOfContents-Cg9pymLO.js → TableOfContents-BBAEZx6Z.js} +1 -1
- package/dist/esm/{Tooltip-k62JJg5n.js → Tooltip-DB0S1ErV.js} +1 -1
- package/dist/esm/{UserCodeEditor-LaT3CJvU.js → UserCodeEditor-B1d5gyVE.js} +2 -2
- package/dist/esm/{VirtualizedRowsFixed-CN-1w7u1.js → VirtualizedRowsFixed-ChX4ON0l.js} +1 -1
- package/dist/esm/{WorksheetAsSlides-DmGLDXtL.js → WorksheetAsSlides-CpiXbUML.js} +1 -1
- package/dist/esm/{WorksheetBodies-BYISk5yC.js → WorksheetBodies-CO67-rEz.js} +1 -1
- package/dist/esm/{WorksheetContents-IzJ6Cw_g.js → WorksheetContents-ClZpiXB-.js} +1 -1
- package/dist/esm/{WorksheetEditor-Dacb3EOk.js → WorksheetEditor-CjAvgOx6.js} +1 -1
- package/dist/esm/WorksheetNode-BgNNzY8I.js +1 -0
- package/dist/esm/{WorksheetViewer-BLFZouvt.js → WorksheetViewer-DVQitUzi.js} +1 -1
- package/dist/esm/{abnfDiagram-WEYOIA3C-BEp-BJ00.js → abnfDiagram-WEYOIA3C-CwJ1V2U1.js} +1 -1
- package/dist/esm/{arc-B4ps4Bee.js → arc-COK0VEkT.js} +1 -1
- package/dist/esm/{architectureDiagram-ZHVYKT53-BDbBQNmT.js → architectureDiagram-ZHVYKT53-CM6AQFKG.js} +1 -1
- package/dist/esm/{blockDiagram-RJAE7QA3-CYciK31K.js → blockDiagram-RJAE7QA3-CdSNo9Pe.js} +1 -1
- package/dist/esm/{c4Diagram-XDPPPE54-dye_nDtJ.js → c4Diagram-XDPPPE54-BhfYKASq.js} +1 -1
- package/dist/esm/channel-DWjyymG_.js +1 -0
- package/dist/esm/{chunk-2E7WHVMD-fBpaf8Ph.js → chunk-2E7WHVMD-CVBqw5fR.js} +1 -1
- package/dist/esm/{chunk-2Q5K7J3B-B1dv6ovr.js → chunk-2Q5K7J3B-CyZYeWxE.js} +1 -1
- package/dist/esm/{chunk-4EMNKR2T-B10soxeX.js → chunk-4EMNKR2T-D1yHHif8.js} +1 -1
- package/dist/esm/{chunk-55XCU76K-BhN5PLeC.js → chunk-55XCU76K-CvYWAV_o.js} +1 -1
- package/dist/esm/{chunk-5VM5RSS4-DEKr6tsK.js → chunk-5VM5RSS4-CS0kZLYA.js} +1 -1
- package/dist/esm/{chunk-JWPE2WC7-lyHCgozd.js → chunk-JWPE2WC7-Ct5OBLCL.js} +1 -1
- package/dist/esm/{chunk-NQOKRVIF-CLuzP2Xi.js → chunk-NQOKRVIF-D0-2mmH4.js} +1 -1
- package/dist/esm/{chunk-VQ5W62QI-MGNBKNlF.js → chunk-VQ5W62QI-CsGo0PTx.js} +1 -1
- package/dist/esm/{chunk-XXDRQBXY-CIB-Pv6R.js → chunk-XXDRQBXY-DPPGTM3w.js} +1 -1
- package/dist/esm/{chunk-ZCHMQSOR--e_zi_XA.js → chunk-ZCHMQSOR-Bvjutmxm.js} +1 -1
- package/dist/esm/{classDiagram-v2-4MYWR3UA-BU3oZLY5.js → classDiagram-v2-4MYWR3UA-J_cOAAHS.js} +1 -1
- package/dist/esm/{commons-BHuDJzTw.js → commons-iref2pEJ.js} +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/{cose-bilkent-JH36ORCC-DdSzxxt0.js → cose-bilkent-JH36ORCC-BHzp2aV0.js} +1 -1
- package/dist/esm/{cynefinDiagram-WF24UDRP-BbPVqiW_.js → cynefinDiagram-WF24UDRP-B3Y9mCh3.js} +1 -1
- package/dist/esm/{dagre-NK4GIZVX-DLhklBxm.js → dagre-NK4GIZVX-BSfh-C_i.js} +1 -1
- package/dist/esm/{diagram-CBK3MWTC-C2Pa6CcJ.js → diagram-CBK3MWTC-w-BT1S7I.js} +1 -1
- package/dist/esm/{diagram-I5XIIV2D-D-qVVyv1.js → diagram-I5XIIV2D-wMqo87b_.js} +1 -1
- package/dist/esm/{diagram-ODIL2UCW-QFqiGLCP.js → diagram-ODIL2UCW-DQhUXqDu.js} +1 -1
- package/dist/esm/{diagram-PFBEJUXE-UHmEOsHi.js → diagram-PFBEJUXE-BlCntZMJ.js} +1 -1
- package/dist/esm/{diagram-RJA3I4VV-CcSCqRS4.js → diagram-RJA3I4VV-Cev21A9i.js} +1 -1
- package/dist/esm/{diagram-TYUNFSNR-DcSxaQx8.js → diagram-TYUNFSNR-BiiLNoPs.js} +1 -1
- package/dist/esm/{ebnfDiagram-V4P3TTPT-DRA2NTIs.js → ebnfDiagram-V4P3TTPT-BWNnHl88.js} +1 -1
- package/dist/esm/{elk-QONTBCTQ-Bkv5Sf8G.js → elk-QONTBCTQ-DhvgoeNg.js} +1 -1
- package/dist/esm/{erDiagram-KYQIGQAA-Blb_MksM.js → erDiagram-KYQIGQAA-DkFGw08p.js} +1 -1
- package/dist/esm/flowDiagram-IUGLLWBU-B-Bxdnen.js +1 -0
- package/dist/esm/{ganttDiagram-R7GPNTJY-Do8IYgX5.js → ganttDiagram-R7GPNTJY-Bvr90Acy.js} +1 -1
- package/dist/esm/{gitGraphDiagram-PDYL7XHY-CAvv6VXj.js → gitGraphDiagram-PDYL7XHY-DHszoB7b.js} +1 -1
- package/dist/esm/helpers.js +1 -1
- package/dist/esm/{index-_kF3_0-k.js → index-2PTQqTnK.js} +1 -1
- package/dist/esm/{index-JPCp_Z3V.js → index-70SVfF-m.js} +1 -1
- package/dist/esm/{index-Dz8ISdDG.js → index-B5Soolr4.js} +1 -1
- package/dist/esm/index-BpcqEzEG.js +1 -0
- package/dist/esm/{index-L4hkrldv.js → index-DkZReaeM.js} +1 -1
- package/dist/esm/{infoDiagram-MVDRKAX5-CcsrNbMy.js → infoDiagram-MVDRKAX5-D05SjyVf.js} +1 -1
- package/dist/esm/{ishikawaDiagram-HPEHV2GE-BSefVZjI.js → ishikawaDiagram-HPEHV2GE-50RQ8Owd.js} +1 -1
- package/dist/esm/{journeyDiagram-BOSHW7O7-C3Y3fTW5.js → journeyDiagram-BOSHW7O7-DnHu8DYt.js} +1 -1
- package/dist/esm/{kanban-definition-FNSA4HC5-DqDHeqOc.js → kanban-definition-FNSA4HC5-BF3y0Q5O.js} +1 -1
- package/dist/esm/main.js +1 -1
- package/dist/esm/{mermaid.core-DKkN0L2R.js → mermaid.core-DRk6tt5W.js} +2 -2
- package/dist/esm/{mindmap-definition-6OY57UG3-BaT97m0e.js → mindmap-definition-6OY57UG3-D2VvQCn5.js} +1 -1
- package/dist/esm/{pegDiagram-ECIUJNBX-BHWXjV1h.js → pegDiagram-ECIUJNBX-LCa_e2vp.js} +1 -1
- package/dist/esm/{pieDiagram-GNMPY74T-tMRQX3HS.js → pieDiagram-GNMPY74T-BFxRc695.js} +1 -1
- package/dist/esm/{quadrantDiagram-D57K4MC3-CfbxRwkB.js → quadrantDiagram-D57K4MC3-m-v5Oved.js} +1 -1
- package/dist/esm/{railroadDiagram-Y72NRBL7-QMN2Zgh0.js → railroadDiagram-Y72NRBL7-CGhQNkt2.js} +1 -1
- package/dist/esm/{requirementDiagram-EQYSW5RA-5SA2oZMo.js → requirementDiagram-EQYSW5RA-D4TUJX2j.js} +1 -1
- package/dist/esm/{sankeyDiagram-SY24JHO5-BXdQgEr6.js → sankeyDiagram-SY24JHO5-qeunG13D.js} +1 -1
- package/dist/esm/{sequenceDiagram-BLEHNHQU-BvWgv_Hq.js → sequenceDiagram-BLEHNHQU-Bf8dSGiP.js} +1 -1
- package/dist/esm/server.js +1 -1
- package/dist/esm/settings-CBGV-lz3.js +1 -0
- package/dist/esm/settings.js +1 -1
- package/dist/esm/{sizeCapture-INFHLROL-CRBg4FIP.js → sizeCapture-INFHLROL-B0tQoQkY.js} +1 -1
- package/dist/esm/{stateDiagram-v2-A6IESKWZ-DOTqWcFT.js → stateDiagram-v2-A6IESKWZ-D-bM5qVN.js} +1 -1
- package/dist/esm/{swimlanes-B3ENRKFQ-Dt3HxqOR.js → swimlanes-B3ENRKFQ-DR9euVhL.js} +1 -1
- package/dist/esm/swimlanesDiagram-AYQRV4AK-D0-BBYnj.js +1 -0
- package/dist/esm/{timeline-definition-JXYKGLGB-ChogrVVw.js → timeline-definition-JXYKGLGB-ChsOD2es.js} +1 -1
- package/dist/esm/{types-BqWpd51k.js → types-DsZvEANP.js} +1 -1
- package/dist/esm/{usecaseDiagram-WPOLBNNX-DAMNLFuf.js → usecaseDiagram-WPOLBNNX-DZFg1Zof.js} +1 -1
- package/dist/esm/{vennDiagram-Q3Y3IDCW--qCUcJOu.js → vennDiagram-Q3Y3IDCW-DAW-dDy7.js} +1 -1
- package/dist/esm/{wardleyDiagram-IVAIDKWA-D0f1LOLT.js → wardleyDiagram-IVAIDKWA-B-gsebc8.js} +1 -1
- package/dist/esm/websocket-CdeP8N_S.js +1 -0
- package/dist/esm/{xychartDiagram-4URNHDU4-Bkx4mxlH.js → xychartDiagram-4URNHDU4-DS3Qm0VA.js} +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/CardList/DataViewerCard.d.ts +6 -2
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/CardList/types.d.ts +9 -6
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableHead/index.d.ts +2 -2
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableRow.d.ts +21 -0
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/ViewContainerRows.d.ts +0 -2
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/columnLayout.d.ts +23 -0
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/useScrollEdges.d.ts +13 -0
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/types.d.ts +12 -8
- package/dist/module-types/src/stores/websocket/topicChannels.d.ts +37 -0
- package/package.json +2 -2
- package/src/styles/components/atoms/_data-viewer.scss +34 -16
- package/dist/esm/ArrowForwardIcon-1RdVdC78.js +0 -1
- package/dist/esm/DataViewer-DpQqmjva.js +0 -1
- package/dist/esm/ReplyIcon-BlBLARCH.js +0 -1
- package/dist/esm/WorksheetNode-2B7Rld9L.js +0 -1
- package/dist/esm/channel-DdQBbu1U.js +0 -1
- package/dist/esm/flowDiagram-IUGLLWBU-CQaJ12bg.js +0 -1
- package/dist/esm/index-DTAG4nDF.js +0 -1
- package/dist/esm/settings-BONQQsPx.js +0 -1
- package/dist/esm/swimlanesDiagram-AYQRV4AK-cNbShXsw.js +0 -1
- package/dist/esm/websocket-B2hJys_Q.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as t}from"./chunk-5VM5RSS4-DEKr6tsK.js";import{g as e}from"./chunk-XXDRQBXY-CIB-Pv6R.js";import{s}from"./chunk-VQ5W62QI-MGNBKNlF.js";import{_ as i,q as n,l as r,c as a,r as o,t as u,u as l,b as c,s as d,v as h,a as p,g,x as m,m as f,y,J as b,z as A,A as E,k,B as x,C,D as S,E as T,F as _,G as D,H as v,I as F}from"./mermaid.core-DKkN0L2R.js";import{c as $}from"./chunk-55XCU76K-BhN5PLeC.js";import{c as L}from"./channel-DdQBbu1U.js";import"./index-DTAG4nDF.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-BHuDJzTw.js";import"./settings-BONQQsPx.js";import"./constants.js";import"./LoaderLayer-Cv80UCdL.js";import"./websocket-B2hJys_Q.js";import"./index-_kF3_0-k.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";var B={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},I=new Set([B.SHAPE_UNSUPPORTED,B.SHAPE_REMOVED,B.CONTAINMENT_VIOLATION]);new Set(Object.values(B).filter(t=>!I.has(t)));var w=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),M=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),N=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),R="roundedRect";function O(t){return t?w.get(t)??t:t}function V(t,e){for(const s of t)if(!s.isGroup){if(s.shape&&"squareRect"!==s.shape&&"rect"!==s.shape||(s.shape=R),M.has(s.shape)){const t=`shape "${s.shape}" was removed in v0.8.1, using "${R}"`;e?.emitError?e.emitError("SHAPE_REMOVED",t,{nodeId:s.id}):r.warn(`agentflow: ${t}`),s.shape=R;continue}if(!N.has(s.shape)){const t=`shape "${s.shape}" is not supported, using "${R}"`;e?.emitWarning?e.emitWarning("SHAPE_UNSUPPORTED",t,{nodeId:s.id}):r.warn(`agentflow: ${t}`),s.shape=R}}}i(O,"resolveShapeAlias"),i(V,"normaliseNodeShapes");var P=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),G=P.size,U=i(t=>`af-kind-${t}`,"kindClass"),j=[...P.keys()],z=i(t=>Math.max(1,t-G),"containerSlotCount"),W=i((t,e)=>{const s=G+t%z(e);return e>0?s%e:s},"containerSlot");function K(t,e,s){const i=a().themeVariables?.borderColorArray,n=Array.isArray(i)?i.length:0;let r=s.size;for(const i of t??[]){if(i.isGroup||"collapsedGroup"===i.shape){const t=s.get(String(i.id))??r++;i.colorIndex=W(t,n);continue}const t=e(String(i.id));t&&P.has(t)&&(i.cssClasses=`${i.cssClasses??""} ${U(t)}`.replace(/\s+/g," ").trim())}}i(K,"assignColorSlots");var Y="agentflow-",H=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),X=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),q={flow:"flowGroup"};function Q(t){if(Array.isArray(t))return t.map(t=>Q(t));if(null===t||"object"!=typeof t)return t;const e={};for(const s of Object.keys(t))"__proto__"!==s&&"constructor"!==s&&"prototype"!==s&&(e[s]=Q(t[s]));return e}function J(t){let e,s=!1,i=!1,n=0;const r=[];for(const a of t.split("\n")){if(void 0!==e){const t=a.length-a.trimStart().length;if(""===a.trim()||t>e){r.push(a);continue}e=void 0}let t=-1;for(let e=0;e<a.length;e++){const r=a[e];if(i)"\\"===r?e++:'"'===r&&(i=!1);else if(s)"'"===r&&(s=!1);else if('"'===r)i=!0;else if("'"===r)s=!0;else{if("#"===r&&(0===e||" "===a[e-1]||"\t"===a[e-1])){t=e;break}"["===r||"{"===r?n++:"]"!==r&&"}"!==r||(n=Math.max(0,n-1))}}if(s||i||n>0){r.push(a);continue}const o=t>=0?a.slice(0,t):a,u=t>=0?a.slice(t):"";/:\s*[>|][\d+-]*\s*$/.test(o)?(e=a.length-a.trimStart().length,r.push(a)):r.push(o.replace(/,([\t ]*)$/,"$1")+u)}return r.join("\n")}i(Q,"stripPrototypeKeys"),i(J,"stripLineTrailingCommas");var Z=class{constructor(){this.vertexCounter=0,this.config=a(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId="",this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=c,this.setAccDescription=d,this.setDiagramTitle=h,this.getAccTitle=p,this.getAccDescription=g,this.getDiagramTitle=m,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.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.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.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{i(this,"AgentFlowDB")}sanitizeText(t){return f.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(const e of this.vertices.values())if(e.id===t)return this.diagramId?`${this.diagramId}-${e.domId}`:e.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,e,s,i,n,r,o={},u,l){if(!t||0===t.trim().length)return;let c,d;if(void 0!==u){let t;t=u.includes("\n")?u+"\n":"{\n"+u+"\n}";try{c=y(t,{schema:b})??{}}catch(t){const e=u.includes("\n")?J(u):u;if(e!==u)try{c=y(e+"\n",{schema:b})??{}}catch{this.rethrowMetadataYamlError(t,u,l)}else this.rethrowMetadataYamlError(t,u,l)}c=Q(c)}if(c&&"string"==typeof c.shape){const t=c;d=t.shape;const e=O(d);e&&e!==d&&(t.shape=e)}const h=this.subGraphLookup.get(t);if(h&&c)return void(h.metadata={...h.metadata,...c});const p=this.connectors.get(t);if(p&&c)return void(p.metadata={...p.metadata,...c});if("connectors"===t)return;const g=this.edges.find(e=>e.id===t);if(g){const t=c;return void 0!==t?.animate&&(g.animate=t.animate),void 0!==t?.animation&&(g.animation=t.animation),void 0!==t?.curve&&(g.interpolate=t.curve),void(c&&(g.metadata={...g.metadata,...c}))}let m,f=this.vertices.get(t);if(void 0===f&&(f={id:t,labelType:"text",domId:Y+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,f)),this.vertexCounter++,void 0!==e?(this.config=a(),m=this.sanitizeText(e.text.trim()),f.labelType=e.type,m.startsWith('"')&&m.endsWith('"')&&(m=m.substring(1,m.length-1)),f.text=m):void 0===f.text&&(f.text=t),void 0!==s&&(f.type=s),null!=i&&i.forEach(t=>{f.styles.push(t)}),null!=n&&n.forEach(t=>{f.classes.push(t)}),void 0!==r&&(f.dir=r),void 0===f.props?f.props=o:void 0!==o&&Object.assign(f.props,o),c){if(f.metadata={...f.metadata,...c},c.shape){const t=d??c.shape;if("string"!=typeof t)throw this.positionedShapeError(`No such shape: ${JSON.stringify(t)}.`,l);if(t!==t.toLowerCase()||t.includes("_"))throw this.positionedShapeError(`No such shape: ${t}. Shape names should be lowercase.`,l);if(!A(c.shape))throw this.positionedShapeError(`No such shape: ${c.shape}.`,l);f.type=c?.shape}c?.label&&(f.text=this.sanitizeText(c.label),f.labelType=this.sanitizeNodeLabelType(c?.labelType))}}positionedShapeError(t,e){const s=new Error(t);if(!e)return s;const i=e.first_line+this.frontmatterLineOffset;return Object.assign(s,{hash:{text:"",token:null,line:i-1,loc:{first_line:i,last_line:e.last_line+this.frontmatterLineOffset,first_column:e.first_column,last_column:e.last_column},expected:[]}}),s}rethrowMetadataYamlError(t,e,s){const n=t;if(!n||"YAMLException"!==n.name||!n.mark||!s)throw t;let r;try{const t=!e.includes("\n"),a=t?"{\n"+e+"\n}":e+"\n",o=s.first_line+this.frontmatterLineOffset,u=s.first_column+2,l=i((e,s)=>t?{line:o,column:u+(1===e?s:0)}:{line:o+e,column:0===e?u+s:s},"toSource"),c=l(n.mark.line,n.mark.column),d=n.reason??(n.message??"").split("\n")[0].replace(/\s*\(\d+:\d+\)\s*$/,""),h=a.split("\n"),p=[];if(t)p.push(1);else for(let t=n.mark.line-1;t<=n.mark.line+1;t++)t<0||t>=h.length||t===h.length-1&&""===h[t]&&t!==n.mark.line||p.push(t);const g=Math.max(...p.map(t=>String(l(t,0).line).length)),m=[];for(const t of p){const e=l(t,0).line,s=` ${String(e).padStart(g)} | `;m.push(s+h[t].replace(/\t/g,"→")),t===n.mark.line&&m.push("-".repeat(s.length+n.mark.column)+"^")}r={message:`${d} (${c.line}:${c.column+1})\n\n${m.join("\n")}`,markLine:c.line-1,markColumn:c.column,hash:{text:"",token:null,line:c.line-1,loc:{first_line:c.line,last_line:c.line,first_column:c.column,last_column:c.column+1},expected:[]}}}catch{}throw r&&(n.message=r.message,n.mark.line=r.markLine,n.mark.column=r.markColumn,n.hash=r.hash),n}addSingleLink(t,e,s,i){const n={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};r.info("abc78 Got edge...",n);const a=s.text;if(void 0!==a&&(n.text=this.sanitizeText(a.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=this.sanitizeNodeLabelType(a.type)),void 0!==s&&(n.type=s.type,n.stroke=s.stroke,n.length=s.length>10?10:s.length,s.edgeSemantic&&(n.edgeSemantic=s.edgeSemantic)),i&&!this.edges.some(t=>t.id===i))n.id=i,n.isUserDefinedId=!0;else{const t=this.edges.filter(t=>t.start===n.start&&t.end===n.end);0===t.length?n.id=E(n.start,n.end,{counter:0,prefix:"L"}):n.id=E(n.start,n.end,{counter:t.length+1,prefix:"L"})}if(!(this.edges.length<(this.config.maxEdges??500)))throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);r.info("Pushing edge..."),this.edges.push(n)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,s){const i=this.isLinkData(s)?s.id.replace("@",""):void 0;r.info("addLink",t,e,i);for(const n of t)for(const r of e){const a=n===t[t.length-1],o=r===e[0];a&&o?this.addSingleLink(n,r,s,i):this.addSingleLink(n,r,s,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{if("default"!==t){if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} 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.)`);this.edges[t].interpolate=e}else this.edges.defaultInterpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} 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.)`);"default"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,(this.edges[t]?.style?.length??0)>0&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){const s=e.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(t=>{let e=this.classes.get(t);void 0===e&&(e={id:t,styles:[],textStyles:[]},this.classes.set(t,e)),null!=s&&s.forEach(t=>{if(/color/.exec(t)){const s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)})})}setDirection(t){this.direction=t.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"),"TD"===this.direction&&(this.direction="TB")}setClass(t,e){for(const s of t.split(",")){const t=this.vertices.get(s);t&&t.classes.push(e);const i=this.edges.find(t=>t.id===s);i&&i.classes.push(e);const n=this.subGraphLookup.get(s);n&&n.classes.push(e)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(const s of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(s):s,e)}}setClickFun(t,e,s){if("loose"!==a().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof s){i=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<i.length;t++){let e=i[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),i[t]=e}}0===i.length&&i.push(t);const n=this.vertices.get(t);n&&(n.haveCallback=!0,this.funs.push(()=>{const s=this.lookUpDomId(t),n=document.querySelector(`[id="${s}"]`);null!==n&&n.addEventListener("click",()=>{l.runFunc(e,...i)},!1)}))}setLink(t,e,s){t.split(",").forEach(t=>{const i=this.vertices.get(t);void 0!==i&&(i.link=l.formatUrl(e,this.config),i.linkTarget=s)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,s){t.split(",").forEach(t=>{this.setClickFun(t,e,s)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}isToolDefinition(t){return X.has(t.type)}getTools(){const t=[];for(const e of this.vertices.values())this.isToolDefinition(e)&&t.push(e);return t}getClasses(){return this.classes}setupToolTips(t){const e=$();k(t).select("svg").selectAll("g.node").on("mouseover",t=>{const s=k(t.currentTarget),i=s.attr("title");if(null===i)return;const n=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.bottom+"px"),e.html(x.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);k(t.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=a(),this.diagramId="",this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,C()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,e,s,n){let o=t?.text?.trim(),u=s?.text;t===s&&s?.text&&/\s/.exec(s.text)&&(o=void 0);const l=i(t=>{const e={boolean:{},number:{},string:{}},s=[];let i;return{nodeList:t.filter(function(t){const n=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(n in e?!e[n].hasOwnProperty(t)&&(e[n][t]=!0):!s.includes(t)&&s.push(t))}),dir:i}},"uniq")(e.flat()),c=l.nodeList;let d=l.dir;const h=a().flowchart??{};if(d=d??(h.inheritDir?this.getDirection()??a().direction??void 0:void 0),"gen-1"===this.version)for(let t=0;t<c.length;t++)c[t]=this.lookUpDomId(c[t]);o=o??"subGraph"+this.subCount,u=u||"",u=this.sanitizeText(u),this.subCount=this.subCount+1;const p={id:o,nodes:c.filter(t=>t!==o&&!this.globalNodes.has(t)),title:u.trim(),classes:[],dir:d,labelType:this.sanitizeNodeLabelType(s?.type),type:n??"flow"};r.info("Adding",p.id,p.nodes,p.dir),p.nodes=this.makeUniq(p,this.subGraphs).nodes;const g=this.getPosForId(o);if(-1!==g){const t=this.subGraphs[g];for(const e of p.nodes)t.nodes.includes(e)||t.nodes.push(e);p.title&&(t.title=p.title),p.dir&&(t.dir=p.dir),p.type&&(t.type=p.type),this.subGraphLookup.set(o,t)}else this.subGraphs.push(p),this.subGraphLookup.set(o,p);return o}addGlobal(t){for(const e of t.flat()){if("string"!=typeof e)continue;const t=e.trim();""!==t&&this.globalNodes.add(t)}for(const t of this.subGraphs)t.nodes=t.nodes.filter(t=>!this.globalNodes.has(t))}getPosForId(t){for(const[e,s]of this.subGraphs.entries())if(s.id===t)return e;return-1}indexNodes2(t,e){const s=this.subGraphs[e].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)return{result:!0,count:0};let i=0,n=1;for(;i<s.length;){const e=this.getPosForId(s[i]);if(e>=0){const s=this.indexNodes2(t,e);if(s.result)return{result:!0,count:n+s.count};n+=s.count}i+=1}return{result:!1,count:n}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}addConnector(t,e){const s=t?.text?.trim();if(!s)return"";const i=e?.text?.trim()??"",n=i.length>0?this.sanitizeText(i):s;let r=this.connectors.get(s);return r?i.length>0&&(r.text=n):(r={id:s,labelType:"text",domId:Y+s+"-"+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:n},this.connectors.set(s,r),this.vertices.set(s,r),this.vertexCounter++),s}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){return!!this.firstGraphFlag&&(this.firstGraphFlag=!1,!0)}computeEdgeSemantic(t,e){return"arrow_point"===t&&"normal"===e?"sequence":"arrow_cross"===t&&"normal"===e?"failure":"arrow_open"===t&&"dotted"===e?"reference":void 0}destructStartLink(t){let e="normal";return t.trim().includes(".")&&(e="dotted"),{type:"arrow_open",stroke:e}}countChar(t,e){const s=e.length;let i=0;for(let n=0;n<s;++n)e[n]===t&&++i;return i}destructEndLink(t){const e=t.trim();let s=e.slice(0,-1),i="arrow_open";switch(e.slice(-1)){case"x":i="arrow_cross";break;case">":i="arrow_point";break;case"-":case".":i="arrow_open",s=e}let n="normal",r=s.length-1;const a=this.countChar(".",s);return a>0&&(n="dotted",r=a),{type:i,stroke:n,length:r}}destructLink(t,e){const s=this.destructEndLink(t);let i;return e?(i=this.destructStartLink(e),i.stroke!==s.stroke?{type:"INVALID",stroke:"INVALID"}:(i.type=s.type,i.length=s.length,{...i,edgeSemantic:this.computeEdgeSemantic(i.type,i.stroke)})):{...s,edgeSemantic:this.computeEdgeSemantic(s.type,s.stroke)}}exists(t,e){for(const s of t)if(s.nodes.includes(e))return!0;return!1}makeUniq(t,e){const s=[];return t.nodes.forEach((i,n)=>{this.exists(e,i)||s.push(t.nodes[n])}),{nodes:s}}getTypeFromVertex(t){const e="string"==typeof t.type?O(t.type):t.type;switch(e){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",s="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":case"arrow_hierarchy":s=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),s=e}return{arrowTypeStart:e,arrowTypeEnd:s}}addNodeFromVertex(t,e,s,i,n,r){const a=s.get(t.id),o=i.get(t.id)??!1,u=this.findNode(e,t.id);if(u)u.cssStyles=t.styles,u.cssCompiledStyles=this.getCompiledStyles(t.classes),u.cssClasses=t.classes.join(" ");else{const s={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:a,padding:n.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:r,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),metadata:t.metadata};o?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:this.getTypeFromVertex(t),wrappingWidth:n.agentflow?.wrappingWidth,minWidth:n.agentflow?.minNodeWidth})}}getCompiledStyles(t){let e=[];for(const s of t){const t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}runPostParseValidators(){this.postParseValidationRun||(this.postParseValidationRun=!0)}getData(){this.runPostParseValidators();const t=a(),e=[],s=[],n=this.getSubGraphs(),r=new Map,o=new Map,u=new Set,l=new Map,c=i((t,e,s=new Set)=>{if(s.has(t))return;s.add(t);const i=this.subGraphLookup.get(t);if(i)for(const t of i.nodes)t===e||s.has(t)||(u.add(t),l.set(t,e),c(t,e,s))},"collectDescendants");for(const t of n)"collapsed"!==t.metadata?.view||u.has(t.id)||c(t.id,t.id);const d=i((t,e)=>{const s=new Set;let i=e;for(;void 0!==i&&!s.has(i);){if(i===t)return!0;s.add(i),i=r.get(i)}return!1},"wouldCloseContainmentCycle");for(let t=n.length-1;t>=0;t--){const e=n[t];if(!u.has(e.id)){e.nodes.length>0&&o.set(e.id,!0);for(const t of e.nodes)d(t,e.id)?this.emitWarning(B.CONTAINMENT_VIOLATION,`Container "${e.id}" cannot contain "${t}" because "${t}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:t}):r.set(t,e.id)}}for(let s=n.length-1;s>=0;s--){const i=n[s];if(u.has(i.id))continue;if("collapsed"===i.metadata?.view){const s={...i.metadata,containerType:i.type};e.push({id:i.id,label:i.title,labelStyle:"",labelType:i.labelType,parentId:r.get(i.id),padding:8,cssCompiledStyles:this.getCompiledStyles(i.classes),cssClasses:i.classes.join(" "),shape:"collapsedGroup",dir:i.dir,isGroup:!1,look:t.look,metadata:s})}else e.push({id:i.id,label:i.title,labelStyle:"",labelType:i.labelType,parentId:r.get(i.id),padding:8,cssCompiledStyles:this.getCompiledStyles(i.classes),cssClasses:i.classes.join(" "),shape:q[i.type??"flow"],dir:i.dir,isGroup:!0,look:t.look,metadata:i.metadata})}this.getVertices().forEach(s=>{u.has(s.id)||this.addNodeFromVertex(s,e,r,o,t,t.look||"classic")});const h=this.getEdges();h.forEach((e,i)=>{const n=l.get(e.start)??e.start,r=l.get(e.end)??e.end;if(n===r&&e.start!==e.end)return;const{arrowTypeStart:a,arrowTypeEnd:o}=this.destructEdgeType(e.type),u=[...h.defaultStyle??[]];e.style&&u.push(...e.style);const c={id:E(n,r,{counter:i,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:n,end:r,type:e.type??"normal",label:e.text,labelType:e.labelType,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":a,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":o,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:u,style:u,pattern:e.stroke,look:t.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve,metadata:e.metadata};s.push(c)}),V(e,this);const p=new Map,g=new Map;for(const t of n){const e=r.get(t.id);void 0!==e&&g.set(e,[...g.get(e)??[],t.id])}let m=0;const f=i(t=>{if(!p.has(t)){p.set(t,m++);for(const e of g.get(t)??[])f(e)}},"walkContainers");for(const t of n)void 0===r.get(t.id)&&f(t.id);const y=new Set(this.getConnectors().map(t=>t.id));return K(e,t=>{if(y.has(t))return"connector";const e=this.vertices.get(t);return e?this.deriveVertexKind(e,O(e.type)):void 0},p),{nodes:e,edges:s,other:{},config:t,connectors:this.getConnectors()}}defaultConfig(){return S.flowchart}deriveVertexKind(t,e){return this.isToolDefinition(t)?"tool":"hexagon"===e||"hex"===e?"action":"lean-right"===e||"lean_right"===e?"input":"lin-doc"===e||"lined-document"===e?"refdoc":"diamond"===e?"decision":"task"}getSemanticModel(){this.runPostParseValidators();const t=new Set(this.subGraphs.map(t=>t.id)),e=[],s=[];for(const[i,n]of this.vertices){if(t.has(i))continue;if(n.isConnector){const t={id:i};if(void 0!==n.text&&n.text!==i&&(t.title=n.text),n.metadata&&Object.keys(n.metadata).length>0){const e={};for(const[t,s]of Object.entries(n.metadata))H.has(t)||(e[t]=s);Object.keys(e).length>0&&(t.metadata=e)}s.push(t);continue}const r={id:i};void 0!==n.text&&(r.label=n.text);const a="string"==typeof n.type?O(n.type):n.type;if(void 0!==a&&(r.shape=a),r.vertexKind=this.deriveVertexKind(n,a),n.metadata&&Object.keys(n.metadata).length>0){const t={};for(const[e,s]of Object.entries(n.metadata))H.has(e)||(t[e]=s);Object.keys(t).length>0&&(r.metadata=t)}e.push(r)}const i={vertices:e,edges:this.edges.map(t=>{const e={start:t.start,end:t.end};return void 0!==t.id&&(e.id=t.id),"string"==typeof t.text&&t.text.length>0&&(e.label=t.text),void 0!==t.type&&(e.type=t.type),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.edgeSemantic&&(e.edgeSemantic=t.edgeSemantic),void 0!==t.length&&(e.length=t.length),t.metadata&&Object.keys(t.metadata).length>0&&(e.metadata={...t.metadata}),e}),subGraphs:this.subGraphs.map(t=>{const e={id:t.id,nodes:[...t.nodes]};if(void 0!==t.type&&(e.type=t.type),void 0!==t.title&&(e.title=t.title),void 0!==t.dir&&(e.direction=t.dir),t.metadata&&Object.keys(t.metadata).length>0){const s={};for(const[e,i]of Object.entries(t.metadata))H.has(e)||(s[e]=i);Object.keys(s).length>0&&(e.metadata=s)}return e}),connectors:s,diagnostics:this.diagnostics};return void 0!==this.direction&&(i.direction=this.direction),i}setFrontmatterLineOffset(t){this.frontmatterLineOffset=t??0}toElementPosition(t){const e=t?.first_line??0,s=t?.first_column??0,i=t?.last_line??e,n=t?.last_column??s,[r,a]=t?.range??[0,0];return{startLine:e+this.frontmatterLineOffset,startColumn:s,endLine:i+this.frontmatterLineOffset,endColumn:n,startIndex:r,endIndex:a}}pushMapping(t,e,s){if(!t)return;const i={id:t,type:e,position:this.toElementPosition(s)};return this.elementMappings.push(i),i}addVertexMapping(t,e,s,i){const n=this.pushMapping(t,"vertex",i);n&&null==s&&this.bareVertexMappings.add(n)}extendVertexMapping(t,e){if(!t||!e)return;const s=this.toElementPosition(e);for(let e=this.elementMappings.length-1;e>=0;e--){const i=this.elementMappings[e];if("vertex"===i.type&&i.id===t){this.bareVertexMappings.has(i)&&(i.type="attachment",this.bareVertexMappings.delete(i));return void((s.endLine>i.position.endLine||s.endLine===i.position.endLine&&s.endColumn>i.position.endColumn)&&(i.position.endLine=s.endLine,i.position.endColumn=s.endColumn,i.position.endIndex=s.endIndex))}}this.pushMapping(t,"attachment",e)}addEdgeMapping(t,e,s,i){const n=Array.isArray(e)?e.map(t=>"string"==typeof t?t:t?.id??"").filter(Boolean):[],r=n.length>0?n.join(">"):"edge";this.pushMapping(r,"edge",i)}addSubgraphMapping(t,e,s,i){const n=("string"==typeof t?t:t?.text)??"",r=this.toElementPosition(s),a=i?this.toElementPosition(i):r;n&&this.elementMappings.push({id:n,type:"subgraph",position:{startLine:r.startLine,startColumn:r.startColumn,endLine:a.endLine,endColumn:a.endColumn,startIndex:r.startIndex,endIndex:a.endIndex}})}addConnectorMapping(t,e,s,i){const n=t?.text?.trim()??"";if(!n)return;const r=this.toElementPosition(s),a=i?this.toElementPosition(i):r;this.elementMappings.push({id:n,type:"connector",position:{startLine:r.startLine,startColumn:r.startColumn,endLine:a.endLine,endColumn:a.endColumn,startIndex:r.startIndex,endIndex:a.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(t){return this.elementMappings.find(e=>e.id===t)}getElementsOnLine(t){return this.elementMappings.filter(e=>t>=e.position.startLine&&t<=e.position.endLine)}getElementAtPosition(t,e){const s=this.elementMappings.filter(s=>{const{startLine:i,startColumn:n,endLine:r,endColumn:a}=s.position;return!(t<i||t>r)&&(!(t===i&&e<n)&&!(t===r&&e>a))});if(0===s.length)return;const n=i(({position:t})=>[t.endLine-t.startLine,t.endColumn-t.startColumn],"span");return s.reduce((t,e)=>{const[s,i]=n(t),[r,a]=n(e);return r!==s?r<s?e:t:a<i?e:t})}getMappingStats(){let t=0,e=0,s=0,i=0,n=0;for(const r of this.elementMappings)"vertex"===r.type?t++:"edge"===r.type?e++:"subgraph"===r.type?s++:"connector"===r.type?i++:"attachment"===r.type&&n++;return{vertices:t,edges:e,subgraphs:s,connectors:i,attachments:n,totalElements:this.elementMappings.length}}emitDiagnostic(t,e,s,i){const n=i?.nodeId??i?.edgeId,a=n?this.getElementById(n):void 0,o={id:t,severity:e,message:s,...i?.nodeId?{nodeId:i.nodeId}:{},...i?.edgeId&&!i?.nodeId?{edgeId:i.edgeId}:{},...a?{position:a.position}:{}};if(this.diagnostics.some(t=>t.id===o.id&&t.severity===o.severity&&t.message===o.message&&t.nodeId===o.nodeId&&t.edgeId===o.edgeId))return;this.diagnostics.push(o);const u=`agentflow[${t}]: ${s}`;"error"===e?r.error(u):r.warn(u)}emitWarning(t,e,s){this.emitDiagnostic(t,"warning",e,s)}emitError(t,e,s){this.emitDiagnostic(t,"error",e,s)}getDiagnostics(){return[...this.diagnostics]}},tt={getClasses:i(function(t,e){return e.db.getClasses()},"getClasses"),draw:i(async function(t,i,n,c){r.debug("Drawing agentflow diagram",i);const{securityLevel:d,agentflow:h,layout:p}=a();c.db.setDiagramId(i),r.debug("Before getData: ");const g=c.db.getData();r.debug("Data: ",g);const m=e(i,d),f=c.db.getDirection();g.type=c.type,g.layoutAlgorithm=o(p),"dagre"===g.layoutAlgorithm&&"elk"===p&&r.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),g.direction=f,g.nodeSpacing=h?.nodeSpacing||50,g.rankSpacing=h?.rankSpacing||50,g.markers=["point","circle","cross","hierarchy"],g.diagramId=i,r.debug("REF1:",g),await u(g,m);const y=h?.diagramPadding??8;l.insertTitle(m,"agentflowTitleText",h?.titleTopMargin??0,c.db.getDiagramTitle()),s(m,y,"agentflow",h?.useMaxWidth??!0)},"draw")},et=function(){var t=i(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,5],s=[1,4],n=[1,3],r=[1,6],a=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],o=[2,2],u=[1,15],l=[1,16],c=[1,17],d=[1,18],h=[1,19],p=[1,26],g=[1,27],m=[1,28],f=[1,30],y=[1,31],b=[1,32],A=[1,55],E=[1,54],k=[1,34],x=[1,35],C=[1,36],S=[1,37],T=[1,38],_=[1,50],D=[1,52],v=[1,48],F=[1,53],$=[1,49],L=[1,56],B=[1,51],I=[1,57],w=[1,58],M=[1,39],N=[1,40],R=[1,41],O=[1,42],V=[1,43],P=[1,64],G=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],U=[1,70],j=[1,68],z=[1,67],W=[1,69],K=[8,9,10,12,78,80,81],Y=[1,88],H=[1,101],X=[1,106],q=[1,105],Q=[1,102],J=[1,98],Z=[1,104],tt=[1,100],et=[1,107],st=[1,103],it=[1,108],nt=[1,99],rt=[8,9,10,11,12,43,78,80,81],at=[8,9,10,11,12,43,49,78,80,81],ot=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],ut=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],lt=[47,63,92,105,108,109,112,114,117,118,119],ct=[1,131],dt=[1,132],ht=[1,134],pt=[1,133],gt=[47,63,65,77,92,105,108,109,112,114,117,118,119],mt=[1,143],ft=[1,157],yt=[1,158],bt=[1,159],At=[1,162],Et=[1,161],kt=[1,160],xt=[1,145],Ct=[1,147],St=[1,151],Tt=[1,139],_t=[1,140],Dt=[1,152],vt=[1,153],Ft=[1,154],$t=[1,155],Lt=[1,156],Bt=[1,163],It=[1,164],wt=[1,141],Mt=[1,142],Nt=[1,149],Rt=[1,144],Ot=[1,148],Vt=[1,146],Pt=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],Gt=[1,168],Ut=[1,170],jt=[8,9,10,12],zt=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],Wt=[1,190],Kt=[1,186],Yt=[1,187],Ht=[1,191],Xt=[1,188],qt=[1,189],Qt=[80,119,122],Jt=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],Zt=[11,109],te=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],ee=[1,269],se=[1,267],ie=[1,271],ne=[1,265],re=[1,266],ae=[1,268],oe=[1,270],ue=[1,272],le=[1,292],ce=[8,9,10,12,109],de=[8,9,10,11,12,63,87,108,109,112,113,114,115],he={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:"error",8:"COMMENT",9:"SEMI",10:"NEWLINE",11:"SPACE",12:"EOF",13:"GRAPH",14:"NODIR",15:"DIR",28:"flow",30:"SQS",32:"SQE",33:"end",35:"global",36:"connector",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"SHAPE_DATA",47:"AMP",49:"STYLE_SEPARATOR",51:"DOUBLECIRCLESTART",52:"DOUBLECIRCLEEND",53:"PS",54:"PE",55:"(-",56:"-)",57:"STADIUMSTART",58:"STADIUMEND",59:"SUBROUTINESTART",60:"SUBROUTINEEND",61:"VERTEX_WITH_PROPS_START",62:"NODE_STRING[field]",63:"COLON",64:"NODE_STRING[value]",65:"PIPE",66:"CYLINDERSTART",67:"CYLINDEREND",68:"DIAMOND_START",69:"DIAMOND_STOP",70:"TAGEND",71:"TRAPSTART",72:"TRAPEND",73:"INVTRAPSTART",74:"INVTRAPEND",77:"TESTSTR",78:"START_LINK",80:"LINK",81:"LINK_ID",83:"STR",84:"MD_STR",87:"STYLE",88:"LINKSTYLE",89:"CLASSDEF",90:"CLASS",91:"CLICK",92:"DOWN",93:"UP",96:"idString[vertex]",97:"idString[class]",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"STR[link]",103:"STR[tooltip]",105:"DEFAULT",107:"INTERPOLATE",108:"NUM",109:"COMMA",112:"NODE_STRING",113:"UNIT",114:"BRKT",115:"PCT",117:"MINUS",118:"MULT",119:"UNICODE_TEXT",120:"TEXT",121:"TAGSTART",122:"EDGE_TEXT",124:"direction_tb",125:"direction_bt",126:"direction_rl",127:"direction_lr",128:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:i(function(t,e,s,i,n,r,a){var o=r.length-1;switch(n){case 2:case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 3:(!Array.isArray(r[o])||r[o].length>0)&&r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 198:case 57:case 67:case 89:case 196:this.$=r[o];break;case 13:i.setDirection("TB"),this.$="TB";break;case 14:i.setDirection(r[o-1]),this.$=r[o-1];break;case 32:this.$=r[o-1].nodes;break;case 38:this.$=i.addSubGraph(r[o-6],r[o-1],r[o-4],"flow"),i.addSubgraphMapping&&i.addSubgraphMapping(r[o-6],r[o-4],a[o-8],a[o]);break;case 39:this.$=i.addSubGraph(r[o-7],r[o-1],r[o-5],"flow"),i.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,r[o-3],a[o-3]),i.addSubgraphMapping&&i.addSubgraphMapping(r[o-7],r[o-5],a[o-9],a[o]);break;case 40:this.$=i.addSubGraph(r[o-3],r[o-1],{text:"",type:"text"},"flow"),i.addSubgraphMapping&&i.addSubgraphMapping(r[o-3],{text:"",type:"text"},a[o-5],a[o]);break;case 41:this.$=i.addSubGraph(r[o-4],r[o-1],{text:"",type:"text"},"flow"),i.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,r[o-3],a[o-3]),i.addSubgraphMapping&&i.addSubgraphMapping(r[o-4],{text:"",type:"text"},a[o-6],a[o]);break;case 42:this.$=i.addSubGraph(void 0,r[o-1],void 0,"flow"),i.addSubgraphMapping&&i.addSubgraphMapping(void 0,void 0,a[o-3],a[o]);break;case 43:i.addGlobal(r[o-1]),this.$=[];break;case 44:this.$=i.addConnector(r[o-4],r[o-2]),i.addConnectorMapping&&i.addConnectorMapping(r[o-4],r[o-2],a[o-6],a[o]);break;case 45:this.$=i.addConnector(r[o-5],r[o-3]),i.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,r[o-1],a[o-1]),i.addConnectorMapping&&i.addConnectorMapping(r[o-5],r[o-3],a[o-7],a[o]);break;case 46:this.$=i.addConnector(r[o-1],{text:"",type:"text"}),i.addConnectorMapping&&i.addConnectorMapping(r[o-1],{text:"",type:"text"},a[o-3],a[o]);break;case 47:this.$=i.addConnector(r[o-2],{text:"",type:"text"}),i.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,r[o-1],a[o-1]),i.addConnectorMapping&&i.addConnectorMapping(r[o-2],{text:"",type:"text"},a[o-4],a[o]);break;case 49:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 50:case 51:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 56:case 148:this.$=r[o-1]+r[o];break;case 58:i.addVertex(r[o-1][r[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[o],a[o]),i.extendVertexMapping&&i.extendVertexMapping(r[o-1][r[o-1].length-1],a[o]),i.addLink(r[o-3].stmt,r[o-1],r[o-2]),i.addEdgeMapping&&i.addEdgeMapping(r[o-3].stmt,r[o-1],r[o-2],this._$),this.$={stmt:r[o-1],nodes:r[o-1].concat(r[o-3].nodes)};break;case 59:i.addLink(r[o-2].stmt,r[o],r[o-1]),i.addEdgeMapping&&i.addEdgeMapping(r[o-2].stmt,r[o],r[o-1],this._$),this.$={stmt:r[o],nodes:r[o].concat(r[o-2].nodes)};break;case 60:i.addLink(r[o-3].stmt,r[o-1],r[o-2]),i.addEdgeMapping&&i.addEdgeMapping(r[o-3].stmt,r[o-1],r[o-2],this._$),this.$={stmt:r[o-1],nodes:r[o-1].concat(r[o-3].nodes)};break;case 61:this.$={stmt:r[o-1],nodes:r[o-1]};break;case 62:i.addVertex(r[o-1][r[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[o],a[o]),i.extendVertexMapping&&i.extendVertexMapping(r[o-1][r[o-1].length-1],a[o]),this.$={stmt:r[o-1],nodes:r[o-1],shapeData:r[o]};break;case 63:this.$={stmt:r[o],nodes:r[o]};break;case 64:case 143:case 145:this.$=[r[o]];break;case 65:i.addVertex(r[o-5][r[o-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[o-4],a[o-4]),i.extendVertexMapping&&i.extendVertexMapping(r[o-5][r[o-5].length-1],a[o-4]),this.$=r[o-5].concat(r[o]);break;case 66:this.$=r[o-4].concat(r[o]);break;case 68:this.$=r[o-2],i.setClass(r[o-2],r[o]);break;case 69:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"square"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"square",this._$);break;case 70:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"doublecircle"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"doublecircle",this._$);break;case 71:this.$=r[o-5],i.addVertex(r[o-5],r[o-2],"circle"),i.addVertexMapping&&i.addVertexMapping(r[o-5],r[o-2],"circle",this._$);break;case 72:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"ellipse"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"ellipse",this._$);break;case 73:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"stadium"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"stadium",this._$);break;case 74:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"subroutine"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"subroutine",this._$);break;case 75:this.$=r[o-7],i.addVertex(r[o-7],r[o-1],"rect",void 0,void 0,void 0,Object.fromEntries([[r[o-5],r[o-3]]])),i.addVertexMapping&&i.addVertexMapping(r[o-7],r[o-1],"rect",this._$);break;case 76:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"cylinder"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"cylinder",this._$);break;case 77:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"round"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"round",this._$);break;case 78:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"diamond"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"diamond",this._$);break;case 79:this.$=r[o-5],i.addVertex(r[o-5],r[o-2],"hexagon"),i.addVertexMapping&&i.addVertexMapping(r[o-5],r[o-2],"hexagon",this._$);break;case 80:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"odd"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"odd",this._$);break;case 81:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"trapezoid"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"trapezoid",this._$);break;case 82:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"inv_trapezoid"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"inv_trapezoid",this._$);break;case 83:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"lean_right"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"lean_right",this._$);break;case 84:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"lean_left"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"lean_left",this._$);break;case 85:this.$=r[o],i.addVertex(r[o]),i.addVertexMapping&&i.addVertexMapping(r[o],void 0,void 0,this._$);break;case 86:r[o-1].text=r[o],this.$=r[o-1];break;case 87:case 88:r[o-2].text=r[o-1],this.$=r[o-2];break;case 90:var u=i.destructLink(r[o],r[o-2]);this.$={type:u.type,stroke:u.stroke,length:u.length,edgeSemantic:u.edgeSemantic,text:r[o-1]};break;case 91:u=i.destructLink(r[o],r[o-2]);this.$={type:u.type,stroke:u.stroke,length:u.length,edgeSemantic:u.edgeSemantic,text:r[o-1],id:r[o-3]};break;case 92:case 99:case 116:case 118:this.$={text:r[o],type:"text"};break;case 93:case 100:case 117:this.$={text:r[o-1].text+""+r[o],type:r[o-1].type};break;case 94:case 101:this.$={text:r[o],type:"string"};break;case 95:case 102:case 119:this.$={text:r[o],type:"markdown"};break;case 96:u=i.destructLink(r[o]);this.$={type:u.type,stroke:u.stroke,length:u.length,edgeSemantic:u.edgeSemantic};break;case 97:u=i.destructLink(r[o]);this.$={type:u.type,stroke:u.stroke,length:u.length,edgeSemantic:u.edgeSemantic,id:r[o-1]};break;case 98:this.$=r[o-1];break;case 120:this.$=r[o-4],i.addClass(r[o-2],r[o]);break;case 121:this.$=r[o-4],i.setClass(r[o-2],r[o]);break;case 122:case 130:this.$=r[o-1],i.setClickEvent(r[o-1],r[o]);break;case 123:case 131:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2]),i.setTooltip(r[o-3],r[o]);break;case 124:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 125:this.$=r[o-4],i.setClickEvent(r[o-4],r[o-3],r[o-2]),i.setTooltip(r[o-4],r[o]);break;case 126:this.$=r[o-2],i.setLink(r[o-2],r[o]);break;case 127:this.$=r[o-4],i.setLink(r[o-4],r[o-2]),i.setTooltip(r[o-4],r[o]);break;case 128:this.$=r[o-4],i.setLink(r[o-4],r[o-2],r[o]);break;case 129:this.$=r[o-6],i.setLink(r[o-6],r[o-4],r[o]),i.setTooltip(r[o-6],r[o-2]);break;case 132:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 133:this.$=r[o-3],i.setLink(r[o-3],r[o-2]),i.setTooltip(r[o-3],r[o]);break;case 134:this.$=r[o-3],i.setLink(r[o-3],r[o-2],r[o]);break;case 135:this.$=r[o-5],i.setLink(r[o-5],r[o-4],r[o]),i.setTooltip(r[o-5],r[o-2]);break;case 136:this.$=r[o-4],i.addVertex(r[o-2],void 0,void 0,r[o]);break;case 137:this.$=r[o-4],i.updateLink([r[o-2]],r[o]);break;case 138:this.$=r[o-4],i.updateLink(r[o-2],r[o]);break;case 139:this.$=r[o-8],i.updateLinkInterpolate([r[o-6]],r[o-2]),i.updateLink([r[o-6]],r[o]);break;case 140:this.$=r[o-8],i.updateLinkInterpolate(r[o-6],r[o-2]),i.updateLink(r[o-6],r[o]);break;case 141:this.$=r[o-6],i.updateLinkInterpolate([r[o-4]],r[o]);break;case 142:this.$=r[o-6],i.updateLinkInterpolate(r[o-4],r[o]);break;case 144:case 146:r[o-2].push(r[o]),this.$=r[o-2];break;case 197:case 199:this.$=r[o-1]+""+r[o];break;case 200:this.$={stmt:"dir",value:"TB"};break;case 201:this.$={stmt:"dir",value:"BT"};break;case 202:this.$={stmt:"dir",value:"RL"};break;case 203:this.$={stmt:"dir",value:"LR"};break;case 204:this.$={stmt:"dir",value:"TD"}}},"anonymous"),table:[{3:1,4:2,8:e,10:s,11:n,13:r},{1:[3]},t(a,o,{5:7}),{4:8,8:e,10:s,11:n,13:r},{4:9,8:e,10:s,11:n,13:r},{4:10,8:e,10:s,11:n,13:r},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:u,9:l,10:c,11:d,12:h,21:20,23:21,24:22,25:23,26:24,27:25,28:p,35:g,36:m,37:29,38:f,40:y,42:b,45:33,46:44,47:A,48:45,50:46,63:E,87:k,88:x,89:C,90:S,91:T,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w,124:M,125:N,126:R,127:O,128:V},t(a,[2,10]),t(a,[2,11]),t(a,[2,12]),t(a,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:P,16:59,19:62},t(G,[2,3]),t(G,[2,4]),t(G,[2,5]),t(G,[2,6]),t(G,[2,7]),t(G,[2,8]),t(G,[2,9]),{8:U,9:j,10:z,12:W,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:U,9:j,10:z,12:W,22:75},{8:U,9:j,10:z,12:W,22:76},{8:U,9:j,10:z,12:W,22:77},{8:U,9:j,10:z,12:W,22:78},{8:U,9:j,10:z,12:W,22:79},{8:U,9:j,10:z,11:[1,80],12:W,22:81},{8:U,9:j,10:z,12:W,22:82},{11:[1,83]},t(G,[2,48]),{39:[1,84]},{41:[1,85]},t(G,[2,51]),t(K,[2,63],{19:86,34:87,11:P,43:Y}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:H,47:X,63:q,83:[1,96],92:Q,98:[1,93],100:[1,94],104:95,108:J,109:Z,112:tt,114:et,117:st,118:it,119:nt,123:97},t(G,[2,200]),t(G,[2,201]),t(G,[2,202]),t(G,[2,203]),t(G,[2,204]),t(rt,[2,64]),t(rt,[2,67],{49:[1,109]}),t(at,[2,85],{116:122,30:[1,110],47:A,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:E,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:_,105:D,108:v,109:F,112:$,114:L,117:B,118:I,119:w}),t(ot,[2,196]),t(ot,[2,157]),t(ot,[2,158]),t(ot,[2,159]),t(ot,[2,160]),t(ot,[2,161]),t(ot,[2,162]),t(ot,[2,163]),t(ot,[2,164]),t(ot,[2,165]),t(ot,[2,166]),t(ot,[2,167]),t(a,[2,14]),t(a,[2,20]),t(a,[2,21]),{10:[1,123]},t(a,[2,23]),t(ut,[2,31],{19:124,11:P}),t(G,[2,32]),{45:125,46:44,47:A,48:45,50:46,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},t(G,[2,52]),t(G,[2,53]),t(G,[2,54]),t(G,[2,55]),t(lt,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:ct,84:dt,119:ht,122:pt},{78:[1,135],80:[1,136]},t(gt,[2,96]),t(G,[2,33]),t(G,[2,34]),t(G,[2,35]),t(G,[2,36]),t(G,[2,37]),{11:mt,13:ft,15:yt,28:bt,29:137,33:At,35:Et,36:kt,47:xt,63:Ct,78:St,83:Tt,84:_t,86:150,87:Dt,88:vt,89:Ft,90:$t,91:Lt,92:Bt,93:It,94:138,108:wt,112:Mt,114:Nt,117:Rt,118:Ot,119:Vt},t(Pt,o,{5:165}),t(Pt,o,{5:166}),{11:mt,13:ft,15:yt,28:bt,29:167,33:At,35:Et,36:kt,47:xt,63:Ct,78:St,83:Tt,84:_t,86:150,87:Dt,88:vt,89:Ft,90:$t,91:Lt,92:Bt,93:It,94:138,108:wt,112:Mt,114:Nt,117:Rt,118:Ot,119:Vt},t(G,[2,49]),t(G,[2,50]),t(K,[2,61],{47:Gt}),t(K,[2,62],{19:169,11:P,43:Ut}),t(rt,[2,57]),{47:A,50:171,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},{105:[1,172],106:173,108:[1,174]},{47:A,50:175,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},{47:A,50:176,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},t(jt,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},t(jt,[2,130],{123:181,11:[1,180],15:H,47:X,63:q,92:Q,108:J,109:Z,112:tt,114:et,117:st,118:it,119:nt}),t(jt,[2,132],{11:[1,182]}),t(zt,[2,198]),t(zt,[2,185]),t(zt,[2,186]),t(zt,[2,187]),t(zt,[2,188]),t(zt,[2,189]),t(zt,[2,190]),t(zt,[2,191]),t(zt,[2,192]),t(zt,[2,193]),t(zt,[2,194]),t(zt,[2,195]),{47:A,50:183,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},{31:184,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:192,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:194,53:[1,193],70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:195,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:196,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:197,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{112:[1,198]},{31:199,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:200,68:[1,201],70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:202,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:203,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:204,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},t(ot,[2,197]),t(a,[2,22]),t(ut,[2,30]),t(K,[2,59],{34:205,19:206,11:P,43:Y}),t(lt,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{80:[1,210],82:211,119:ht,122:pt},t(Qt,[2,92]),t(Qt,[2,94]),t(Qt,[2,95]),t(Qt,[2,183]),t(Qt,[2,184]),{79:212,82:130,83:ct,84:dt,119:ht,122:pt},t(gt,[2,97]),{8:U,9:j,10:z,11:mt,12:W,13:ft,15:yt,22:214,28:bt,30:[1,213],33:At,34:215,35:Et,36:kt,43:Y,47:xt,63:Ct,78:St,86:150,87:Dt,88:vt,89:Ft,90:$t,91:Lt,92:Bt,93:It,94:216,108:wt,112:Mt,114:Nt,117:Rt,118:Ot,119:Vt},t(Jt,[2,116]),t(Jt,[2,118]),t(Jt,[2,119]),t(Jt,[2,172]),t(Jt,[2,173]),t(Jt,[2,174]),t(Jt,[2,175]),t(Jt,[2,176]),t(Jt,[2,177]),t(Jt,[2,178]),t(Jt,[2,179]),t(Jt,[2,180]),t(Jt,[2,181]),t(Jt,[2,182]),t(Jt,[2,103]),t(Jt,[2,104]),t(Jt,[2,105]),t(Jt,[2,106]),t(Jt,[2,107]),t(Jt,[2,108]),t(Jt,[2,109]),t(Jt,[2,110]),t(Jt,[2,111]),t(Jt,[2,112]),t(Jt,[2,113]),t(Jt,[2,114]),t(Jt,[2,115]),{6:13,7:14,8:u,9:l,10:c,11:d,12:h,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,217],35:g,36:m,37:29,38:f,40:y,42:b,45:33,46:44,47:A,48:45,50:46,63:E,87:k,88:x,89:C,90:S,91:T,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w,124:M,125:N,126:R,127:O,128:V},{6:13,7:14,8:u,9:l,10:c,11:d,12:h,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,218],35:g,36:m,37:29,38:f,40:y,42:b,45:33,46:44,47:A,48:45,50:46,63:E,87:k,88:x,89:C,90:S,91:T,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w,124:M,125:N,126:R,127:O,128:V},{8:U,9:j,10:z,11:mt,12:W,13:ft,15:yt,22:220,28:bt,30:[1,219],33:At,34:221,35:Et,36:kt,43:Y,47:xt,63:Ct,78:St,86:150,87:Dt,88:vt,89:Ft,90:$t,91:Lt,92:Bt,93:It,94:216,108:wt,112:Mt,114:Nt,117:Rt,118:Ot,119:Vt},{11:P,19:222},{47:[1,223]},t(rt,[2,56]),{11:[1,224],47:A,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:122,117:B,118:I,119:w},{11:[1,225]},{11:[1,226],109:[1,227]},t(Zt,[2,143]),{11:[1,228],47:A,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:122,117:B,118:I,119:w},{11:[1,229],47:A,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:122,117:B,118:I,119:w},{83:[1,230]},t(jt,[2,124],{11:[1,231]}),t(jt,[2,126],{11:[1,232]}),{83:[1,233]},t(zt,[2,199]),{83:[1,234],101:[1,235]},t(rt,[2,68],{116:122,47:A,63:E,92:_,105:D,108:v,109:F,112:$,114:L,117:B,118:I,119:w}),{32:[1,236],70:Wt,85:237,119:Ht,120:Xt,121:qt},t(te,[2,99]),t(te,[2,101]),t(te,[2,102]),t(te,[2,168]),t(te,[2,169]),t(te,[2,170]),t(te,[2,171]),{52:[1,238],70:Wt,85:237,119:Ht,120:Xt,121:qt},{31:239,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{54:[1,240],70:Wt,85:237,119:Ht,120:Xt,121:qt},{56:[1,241],70:Wt,85:237,119:Ht,120:Xt,121:qt},{58:[1,242],70:Wt,85:237,119:Ht,120:Xt,121:qt},{60:[1,243],70:Wt,85:237,119:Ht,120:Xt,121:qt},{63:[1,244]},{67:[1,245],70:Wt,85:237,119:Ht,120:Xt,121:qt},{69:[1,246],70:Wt,85:237,119:Ht,120:Xt,121:qt},{31:247,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{32:[1,248],70:Wt,85:237,119:Ht,120:Xt,121:qt},{70:Wt,72:[1,249],74:[1,250],85:237,119:Ht,120:Xt,121:qt},{70:Wt,72:[1,252],74:[1,251],85:237,119:Ht,120:Xt,121:qt},t(K,[2,58],{19:169,11:P,43:Ut}),t(K,[2,60],{47:Gt}),t(lt,[2,88]),t(lt,[2,87]),{65:[1,253],70:Wt,85:237,119:Ht,120:Xt,121:qt},t(lt,[2,90]),t(Qt,[2,93]),{80:[1,254],82:211,119:ht,122:pt},{31:255,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},t(Pt,o,{5:256}),{8:U,9:j,10:z,12:W,22:257,43:Ut},t(Jt,[2,117]),t(G,[2,42]),t(G,[2,43]),{31:258,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},t(G,[2,46]),{8:U,9:j,10:z,12:W,22:259,43:Ut},{46:260,47:A,48:45,50:46,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},{11:P,19:261},{11:ee,63:se,87:ie,95:262,108:ne,110:263,111:264,112:re,113:ae,114:oe,115:ue},{11:ee,63:se,87:ie,95:273,107:[1,274],108:ne,110:263,111:264,112:re,113:ae,114:oe,115:ue},{11:ee,63:se,87:ie,95:275,107:[1,276],108:ne,110:263,111:264,112:re,113:ae,114:oe,115:ue},{108:[1,277]},{11:ee,63:se,87:ie,95:278,108:ne,110:263,111:264,112:re,113:ae,114:oe,115:ue},{47:A,50:279,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},t(jt,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},t(jt,[2,131]),t(jt,[2,133],{11:[1,283]}),t(jt,[2,134]),t(at,[2,69]),t(te,[2,100]),t(at,[2,70]),{54:[1,284],70:Wt,85:237,119:Ht,120:Xt,121:qt},t(at,[2,77]),t(at,[2,72]),t(at,[2,73]),t(at,[2,74]),{112:[1,285]},t(at,[2,76]),t(at,[2,78]),{69:[1,286],70:Wt,85:237,119:Ht,120:Xt,121:qt},t(at,[2,80]),t(at,[2,81]),t(at,[2,83]),t(at,[2,82]),t(at,[2,84]),t([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),t(lt,[2,91]),{32:[1,287],70:Wt,85:237,119:Ht,120:Xt,121:qt},{6:13,7:14,8:u,9:l,10:c,11:d,12:h,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,288],35:g,36:m,37:29,38:f,40:y,42:b,45:33,46:44,47:A,48:45,50:46,63:E,87:k,88:x,89:C,90:S,91:T,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w,124:M,125:N,126:R,127:O,128:V},t(Pt,o,{5:289}),{32:[1,290],70:Wt,85:237,119:Ht,120:Xt,121:qt},t(G,[2,47]),t(rt,[2,66]),{46:291,47:A,48:45,50:46,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},t(jt,[2,136],{109:le}),t(ce,[2,145],{111:293,11:ee,63:se,87:ie,108:ne,112:re,113:ae,114:oe,115:ue}),t(de,[2,147]),t(de,[2,149]),t(de,[2,150]),t(de,[2,151]),t(de,[2,152]),t(de,[2,153]),t(de,[2,154]),t(de,[2,155]),t(de,[2,156]),t(jt,[2,137],{109:le}),{11:[1,294]},t(jt,[2,138],{109:le}),{11:[1,295]},t(Zt,[2,144]),t(jt,[2,120],{109:le}),t(jt,[2,121],{116:122,47:A,63:E,92:_,105:D,108:v,109:F,112:$,114:L,117:B,118:I,119:w}),t(jt,[2,125]),t(jt,[2,127],{11:[1,296]}),t(jt,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:U,9:j,10:z,12:W,22:301,34:302,43:Y},t(G,[2,40]),{6:13,7:14,8:u,9:l,10:c,11:d,12:h,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,303],35:g,36:m,37:29,38:f,40:y,42:b,45:33,46:44,47:A,48:45,50:46,63:E,87:k,88:x,89:C,90:S,91:T,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w,124:M,125:N,126:R,127:O,128:V},{8:U,9:j,10:z,12:W,22:304,34:305,43:Y},t(rt,[2,65]),{11:ee,63:se,87:ie,108:ne,110:306,111:264,112:re,113:ae,114:oe,115:ue},t(de,[2,148]),{15:H,47:X,63:q,92:Q,104:307,108:J,109:Z,112:tt,114:et,117:st,118:it,119:nt,123:97},{15:H,47:X,63:q,92:Q,104:308,108:J,109:Z,112:tt,114:et,117:st,118:it,119:nt,123:97},{101:[1,309]},t(jt,[2,135]),t(at,[2,71]),{31:310,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},t(at,[2,79]),t(Pt,o,{5:311}),{8:U,9:j,10:z,12:W,22:312,43:Ut},t(G,[2,41]),t(G,[2,44]),{8:U,9:j,10:z,12:W,22:313,43:Ut},t(ce,[2,146],{111:293,11:ee,63:se,87:ie,108:ne,112:re,113:ae,114:oe,115:ue}),t(jt,[2,141],{123:181,11:[1,314],15:H,47:X,63:q,92:Q,108:J,109:Z,112:tt,114:et,117:st,118:it,119:nt}),t(jt,[2,142],{123:181,11:[1,315],15:H,47:X,63:q,92:Q,108:J,109:Z,112:tt,114:et,117:st,118:it,119:nt}),t(jt,[2,129]),{32:[1,316],70:Wt,85:237,119:Ht,120:Xt,121:qt},{6:13,7:14,8:u,9:l,10:c,11:d,12:h,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,317],35:g,36:m,37:29,38:f,40:y,42:b,45:33,46:44,47:A,48:45,50:46,63:E,87:k,88:x,89:C,90:S,91:T,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w,124:M,125:N,126:R,127:O,128:V},t(Pt,o,{5:318}),t(G,[2,45]),{11:ee,63:se,87:ie,95:319,108:ne,110:263,111:264,112:re,113:ae,114:oe,115:ue},{11:ee,63:se,87:ie,95:320,108:ne,110:263,111:264,112:re,113:ae,114:oe,115:ue},t(at,[2,75]),t(G,[2,38]),{6:13,7:14,8:u,9:l,10:c,11:d,12:h,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,321],35:g,36:m,37:29,38:f,40:y,42:b,45:33,46:44,47:A,48:45,50:46,63:E,87:k,88:x,89:C,90:S,91:T,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w,124:M,125:N,126:R,127:O,128:V},t(jt,[2,139],{109:le}),t(jt,[2,140],{109:le}),t(G,[2,39])],defaultActions:{},parseError:i(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:i(function(t){var e=this,s=[0],n=[],r=[null],a=[],o=this.table,u="",l=0,c=0,d=a.slice.call(arguments,1),h=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);h.setInput(t,p.yy),p.yy.lexer=h,p.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var m=h.yylloc;a.push(m);var f=h.options&&h.options.ranges;function y(){var t;return"number"!=typeof(t=n.pop()||h.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i(function(t){s.length=s.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),i(y,"lex");for(var b,A,E,k,x,C,S,T,_={};;){if(A=s[s.length-1],this.defaultActions[A]?E=this.defaultActions[A]:(null==b&&(b=y()),E=o[A]&&o[A][b]),void 0===E||!E.length||!E[0]){var D="";for(x in T=[],o[A])this.terminals_[x]&&x>2&&T.push("'"+this.terminals_[x]+"'");D=h.showPosition?"Parse error on line "+(l+1)+":\n"+h.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(D,{text:h.match,token:this.terminals_[b]||b,line:h.yylineno,loc:m,expected:T})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(E[0]){case 1:s.push(b),r.push(h.yytext),a.push(h.yylloc),s.push(E[1]),b=null,c=h.yyleng,u=h.yytext,l=h.yylineno,m=h.yylloc;break;case 2:if(C=this.productions_[E[1]][1],_.$=r[r.length-C],_._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},f&&(_._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(_,[u,c,l,p.yy,E[1],r,a].concat(d))))return k;C&&(s=s.slice(0,-1*C*2),r=r.slice(0,-1*C),a=a.slice(0,-1*C)),s.push(this.productions_[E[1]][0]),r.push(_.$),a.push(_._$),S=o[s[s.length-2]][s[s.length-1]],s.push(S);break;case 3:return!0}}return!0},"parse")},pe=function(){return{EOF:1,parseError:i(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:i(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:i(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:i(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;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),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:i(function(t){this.unput(this.match.slice(t))},"less"),pastInput:i(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:i(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){var t=this.next();return t||this.lex()},"lex"),begin:i(function(t){this.conditionStack.push(t)},"begin"),popState:i(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i(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:i(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:i(function(t){this.begin(t)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:i(function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),38;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),40;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",43;case 8:return this.pushState("shapeDataStr"),43;case 9:return this.popState(),43;case 10:const s=/\n\s*/g;return e.yytext=e.yytext.replace(s,"<br/>"),43;case 11:return 43;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 98;case 18:return 99;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 87;case 26:return 105;case 27:return 88;case 28:return 107;case 29:return 89;case 30:return 90;case 31:return 100;case 32:this.begin("click");break;case 34:return 91;case 35:return t.lex.firstGraph()&&this.begin("dir"),13;case 36:return 28;case 37:return 36;case 38:return 35;case 39:return 33;case 40:case 41:case 42:case 43:return 101;case 44:return this.popState(),14;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),15;case 55:return 124;case 56:return 125;case 57:return 126;case 58:return 127;case 59:return 128;case 60:return 81;case 61:return 108;case 62:case 99:return 114;case 63:return 49;case 64:return 63;case 65:case 100:return 47;case 66:return 9;case 67:return 109;case 68:case 98:return 118;case 69:return this.popState(),80;case 70:return this.pushState("edgeText"),78;case 71:return 122;case 72:return 80;case 73:case 87:case 113:break;case 74:return this.popState(),56;case 75:case 114:return"TEXT";case 76:return this.pushState("ellipseText"),55;case 77:return this.popState(),58;case 78:return this.pushState("text"),57;case 79:return this.popState(),60;case 80:return this.pushState("text"),59;case 81:return 61;case 82:return this.pushState("text"),70;case 83:return this.popState(),67;case 84:return this.pushState("text"),66;case 85:return this.popState(),52;case 86:return this.pushState("text"),51;case 88:return this.popState(),72;case 89:return this.popState(),74;case 90:return 120;case 91:return this.pushState("trapText"),71;case 92:return this.pushState("trapText"),73;case 93:return 121;case 94:return 70;case 95:return 93;case 96:return"SEP";case 97:return 92;case 101:return 8;case 102:return 112;case 103:return 117;case 104:return 119;case 105:return this.popState(),65;case 106:return this.pushState("text"),65;case 107:return this.popState(),54;case 108:return this.pushState("text"),53;case 109:return this.popState(),32;case 110:return this.pushState("text"),30;case 111:return this.popState(),69;case 112:return this.pushState("text"),68;case 115:return"QUOTE";case 116:return 10;case 117:return 11;case 118:return 12}},"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]*)/,/^(?:agentflow-beta\b)/,/^(?:flow\b)/,/^(?:connector\b)/,/^(?:global\b[ \t]*)/,/^(?:end\b[ \t]*)/,/^(?:_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*--+[x>]\s*)/,/^(?:\s*--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*-\.+-\s*)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|(?:[^\\\[\]\(\)\{\}\/%]+|(?!))+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:[ \t]*%%(?!\{)[^\n]*)/,/^(?:([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])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:(?:[^\[\]\(\)\{\}\|\"%]+|(?!))+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},href:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},click:{rules:[21,24,33,34,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},edgeText:{rules:[21,24,69,71,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},trapText:{rules:[21,24,76,78,80,84,86,87,88,89,90,91,92,106,108,110,112],inclusive:!1},ellipseText:{rules:[21,24,73,74,75,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},text:{rules:[21,24,76,77,78,79,80,83,84,85,86,91,92,105,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr:{rules:[3,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_title:{rules:[1,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},md_string:{rules:[19,20,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},string:{rules:[21,22,23,24,76,78,80,84,86,91,92,106,108,110,112],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,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,76,78,80,81,82,84,86,91,92,93,94,95,96,97,98,99,100,101,102,103,104,106,108,110,112,115,116,117,118],inclusive:!0}}}}();function ge(){this.yy={}}return he.lexer=pe,i(ge,"Parser"),ge.prototype=he,he.Parser=ge,new ge}();et.parser=et;var st=et,it=Object.assign({},st);it.parse=t=>{const e=t.replace(/}[^\S\n]*\n/g,"}\n");return st.parse(e)};var nt=it,rt=i(t=>{const{theme:e,bkgColorArray:s,borderColorArray:n}=t;if(!T(e,n))return"";const r=_(t.look),a=D(s),o=v(t.THEME_COLOR_LIMIT,n),u=i(t=>n[t%n.length],"border"),l=i(t=>a?`fill: ${s[t%s.length]};`:"","fill");let c="";for(const t of j){const e=P.get(t),s=`[data-look="${r}"].node.${U(t)}`;c+=`\n\n ${s} rect,\n ${s} path,\n ${s} polygon {\n stroke: ${u(e)};\n ${l(e)}\n }\n`}for(let t=0;t<z(o);t++){const e=W(t,o),s=`[data-look="${r}"][data-color-id="color-${e}"].cluster`,n=`[data-look="${r}"][data-color-id="color-${e}"].node`,a=i(t=>`${s} ${t}, ${n} ${t}`,"rule");c+=`\n\n ${a("rect")},\n ${a("path")} {\n stroke: ${u(e)};\n ${l(e)}\n }\n`}return c},"genColor"),at=i((t,e)=>{const s=L,i=s(t,"r"),n=s(t,"g"),r=s(t,"b");return F(i,n,r,e)},"fade"),ot=i(e=>`${rt(e)}\n .label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span {\n color: ${e.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: ${e.strokeWidth??1}px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n .node .katex path {\n fill: ${e.nodeTextColor||e.textColor};\n stroke: ${e.nodeTextColor||e.textColor};\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${e.lineColor} !important;\n stroke-width: 0;\n stroke: ${e.lineColor};\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePaths .path {\n stroke: ${e.lineColor};\n stroke-width: ${e.strokeWidth??2}px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n p {\n background-color: ${e.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${at(e.edgeLabelBackground,.5)};\n }\n\n .cluster rect {\n fill: ${e.clusterBkg};\n stroke: ${e.clusterBorder};\n stroke-width: 1px;\n }\n\n .flow-cluster rect {\n fill: none;\n stroke: ${e.clusterBorder};\n stroke-width: 0.75px;\n }\n\n .node .collapsed-indicator {\n fill: ${e.nodeBorder};\n stroke: none;\n stroke-width: 0;\n opacity: 0.5;\n }\n\n .node .collapsed-separator {\n stroke-width: 0.75px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .agentflowTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${e.edgeLabelBackground};\n p {\n background-color: ${e.edgeLabelBackground};\n padding: 2px;\n }\n .label rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n ${t()}\n`,"getStyles"),ut={parser:nt,get db(){return new Z},renderer:tt,styles:ot,init:i(t=>{t.agentflow??={},t.layout&&n({layout:t.layout}),t.flowchart??={},t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,n({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")};export{ut as diagram};
|
|
1
|
+
import{g as t}from"./chunk-5VM5RSS4-CS0kZLYA.js";import{g as e}from"./chunk-XXDRQBXY-DPPGTM3w.js";import{s}from"./chunk-VQ5W62QI-CsGo0PTx.js";import{_ as i,q as n,l as r,c as a,r as o,t as u,u as l,b as c,s as d,v as h,a as p,g,x as m,m as f,y,J as b,z as A,A as E,k,B as x,C,D as S,E as T,F as _,G as D,H as v,I as F}from"./mermaid.core-DRk6tt5W.js";import{c as $}from"./chunk-55XCU76K-CvYWAV_o.js";import{c as L}from"./channel-DWjyymG_.js";import"./index-BpcqEzEG.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-iref2pEJ.js";import"./settings-CBGV-lz3.js";import"./constants.js";import"./LoaderLayer-ECtsj85k.js";import"./websocket-CdeP8N_S.js";import"./index-2PTQqTnK.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";var B={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},I=new Set([B.SHAPE_UNSUPPORTED,B.SHAPE_REMOVED,B.CONTAINMENT_VIOLATION]);new Set(Object.values(B).filter(t=>!I.has(t)));var w=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),M=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),N=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),R="roundedRect";function O(t){return t?w.get(t)??t:t}function V(t,e){for(const s of t)if(!s.isGroup){if(s.shape&&"squareRect"!==s.shape&&"rect"!==s.shape||(s.shape=R),M.has(s.shape)){const t=`shape "${s.shape}" was removed in v0.8.1, using "${R}"`;e?.emitError?e.emitError("SHAPE_REMOVED",t,{nodeId:s.id}):r.warn(`agentflow: ${t}`),s.shape=R;continue}if(!N.has(s.shape)){const t=`shape "${s.shape}" is not supported, using "${R}"`;e?.emitWarning?e.emitWarning("SHAPE_UNSUPPORTED",t,{nodeId:s.id}):r.warn(`agentflow: ${t}`),s.shape=R}}}i(O,"resolveShapeAlias"),i(V,"normaliseNodeShapes");var P=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),G=P.size,U=i(t=>`af-kind-${t}`,"kindClass"),j=[...P.keys()],z=i(t=>Math.max(1,t-G),"containerSlotCount"),W=i((t,e)=>{const s=G+t%z(e);return e>0?s%e:s},"containerSlot");function K(t,e,s){const i=a().themeVariables?.borderColorArray,n=Array.isArray(i)?i.length:0;let r=s.size;for(const i of t??[]){if(i.isGroup||"collapsedGroup"===i.shape){const t=s.get(String(i.id))??r++;i.colorIndex=W(t,n);continue}const t=e(String(i.id));t&&P.has(t)&&(i.cssClasses=`${i.cssClasses??""} ${U(t)}`.replace(/\s+/g," ").trim())}}i(K,"assignColorSlots");var Y="agentflow-",H=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),X=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),q={flow:"flowGroup"};function Q(t){if(Array.isArray(t))return t.map(t=>Q(t));if(null===t||"object"!=typeof t)return t;const e={};for(const s of Object.keys(t))"__proto__"!==s&&"constructor"!==s&&"prototype"!==s&&(e[s]=Q(t[s]));return e}function J(t){let e,s=!1,i=!1,n=0;const r=[];for(const a of t.split("\n")){if(void 0!==e){const t=a.length-a.trimStart().length;if(""===a.trim()||t>e){r.push(a);continue}e=void 0}let t=-1;for(let e=0;e<a.length;e++){const r=a[e];if(i)"\\"===r?e++:'"'===r&&(i=!1);else if(s)"'"===r&&(s=!1);else if('"'===r)i=!0;else if("'"===r)s=!0;else{if("#"===r&&(0===e||" "===a[e-1]||"\t"===a[e-1])){t=e;break}"["===r||"{"===r?n++:"]"!==r&&"}"!==r||(n=Math.max(0,n-1))}}if(s||i||n>0){r.push(a);continue}const o=t>=0?a.slice(0,t):a,u=t>=0?a.slice(t):"";/:\s*[>|][\d+-]*\s*$/.test(o)?(e=a.length-a.trimStart().length,r.push(a)):r.push(o.replace(/,([\t ]*)$/,"$1")+u)}return r.join("\n")}i(Q,"stripPrototypeKeys"),i(J,"stripLineTrailingCommas");var Z=class{constructor(){this.vertexCounter=0,this.config=a(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId="",this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=c,this.setAccDescription=d,this.setDiagramTitle=h,this.getAccTitle=p,this.getAccDescription=g,this.getDiagramTitle=m,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.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.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.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{i(this,"AgentFlowDB")}sanitizeText(t){return f.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(const e of this.vertices.values())if(e.id===t)return this.diagramId?`${this.diagramId}-${e.domId}`:e.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,e,s,i,n,r,o={},u,l){if(!t||0===t.trim().length)return;let c,d;if(void 0!==u){let t;t=u.includes("\n")?u+"\n":"{\n"+u+"\n}";try{c=y(t,{schema:b})??{}}catch(t){const e=u.includes("\n")?J(u):u;if(e!==u)try{c=y(e+"\n",{schema:b})??{}}catch{this.rethrowMetadataYamlError(t,u,l)}else this.rethrowMetadataYamlError(t,u,l)}c=Q(c)}if(c&&"string"==typeof c.shape){const t=c;d=t.shape;const e=O(d);e&&e!==d&&(t.shape=e)}const h=this.subGraphLookup.get(t);if(h&&c)return void(h.metadata={...h.metadata,...c});const p=this.connectors.get(t);if(p&&c)return void(p.metadata={...p.metadata,...c});if("connectors"===t)return;const g=this.edges.find(e=>e.id===t);if(g){const t=c;return void 0!==t?.animate&&(g.animate=t.animate),void 0!==t?.animation&&(g.animation=t.animation),void 0!==t?.curve&&(g.interpolate=t.curve),void(c&&(g.metadata={...g.metadata,...c}))}let m,f=this.vertices.get(t);if(void 0===f&&(f={id:t,labelType:"text",domId:Y+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,f)),this.vertexCounter++,void 0!==e?(this.config=a(),m=this.sanitizeText(e.text.trim()),f.labelType=e.type,m.startsWith('"')&&m.endsWith('"')&&(m=m.substring(1,m.length-1)),f.text=m):void 0===f.text&&(f.text=t),void 0!==s&&(f.type=s),null!=i&&i.forEach(t=>{f.styles.push(t)}),null!=n&&n.forEach(t=>{f.classes.push(t)}),void 0!==r&&(f.dir=r),void 0===f.props?f.props=o:void 0!==o&&Object.assign(f.props,o),c){if(f.metadata={...f.metadata,...c},c.shape){const t=d??c.shape;if("string"!=typeof t)throw this.positionedShapeError(`No such shape: ${JSON.stringify(t)}.`,l);if(t!==t.toLowerCase()||t.includes("_"))throw this.positionedShapeError(`No such shape: ${t}. Shape names should be lowercase.`,l);if(!A(c.shape))throw this.positionedShapeError(`No such shape: ${c.shape}.`,l);f.type=c?.shape}c?.label&&(f.text=this.sanitizeText(c.label),f.labelType=this.sanitizeNodeLabelType(c?.labelType))}}positionedShapeError(t,e){const s=new Error(t);if(!e)return s;const i=e.first_line+this.frontmatterLineOffset;return Object.assign(s,{hash:{text:"",token:null,line:i-1,loc:{first_line:i,last_line:e.last_line+this.frontmatterLineOffset,first_column:e.first_column,last_column:e.last_column},expected:[]}}),s}rethrowMetadataYamlError(t,e,s){const n=t;if(!n||"YAMLException"!==n.name||!n.mark||!s)throw t;let r;try{const t=!e.includes("\n"),a=t?"{\n"+e+"\n}":e+"\n",o=s.first_line+this.frontmatterLineOffset,u=s.first_column+2,l=i((e,s)=>t?{line:o,column:u+(1===e?s:0)}:{line:o+e,column:0===e?u+s:s},"toSource"),c=l(n.mark.line,n.mark.column),d=n.reason??(n.message??"").split("\n")[0].replace(/\s*\(\d+:\d+\)\s*$/,""),h=a.split("\n"),p=[];if(t)p.push(1);else for(let t=n.mark.line-1;t<=n.mark.line+1;t++)t<0||t>=h.length||t===h.length-1&&""===h[t]&&t!==n.mark.line||p.push(t);const g=Math.max(...p.map(t=>String(l(t,0).line).length)),m=[];for(const t of p){const e=l(t,0).line,s=` ${String(e).padStart(g)} | `;m.push(s+h[t].replace(/\t/g,"→")),t===n.mark.line&&m.push("-".repeat(s.length+n.mark.column)+"^")}r={message:`${d} (${c.line}:${c.column+1})\n\n${m.join("\n")}`,markLine:c.line-1,markColumn:c.column,hash:{text:"",token:null,line:c.line-1,loc:{first_line:c.line,last_line:c.line,first_column:c.column,last_column:c.column+1},expected:[]}}}catch{}throw r&&(n.message=r.message,n.mark.line=r.markLine,n.mark.column=r.markColumn,n.hash=r.hash),n}addSingleLink(t,e,s,i){const n={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};r.info("abc78 Got edge...",n);const a=s.text;if(void 0!==a&&(n.text=this.sanitizeText(a.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=this.sanitizeNodeLabelType(a.type)),void 0!==s&&(n.type=s.type,n.stroke=s.stroke,n.length=s.length>10?10:s.length,s.edgeSemantic&&(n.edgeSemantic=s.edgeSemantic)),i&&!this.edges.some(t=>t.id===i))n.id=i,n.isUserDefinedId=!0;else{const t=this.edges.filter(t=>t.start===n.start&&t.end===n.end);0===t.length?n.id=E(n.start,n.end,{counter:0,prefix:"L"}):n.id=E(n.start,n.end,{counter:t.length+1,prefix:"L"})}if(!(this.edges.length<(this.config.maxEdges??500)))throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);r.info("Pushing edge..."),this.edges.push(n)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,s){const i=this.isLinkData(s)?s.id.replace("@",""):void 0;r.info("addLink",t,e,i);for(const n of t)for(const r of e){const a=n===t[t.length-1],o=r===e[0];a&&o?this.addSingleLink(n,r,s,i):this.addSingleLink(n,r,s,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{if("default"!==t){if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} 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.)`);this.edges[t].interpolate=e}else this.edges.defaultInterpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} 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.)`);"default"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,(this.edges[t]?.style?.length??0)>0&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){const s=e.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(t=>{let e=this.classes.get(t);void 0===e&&(e={id:t,styles:[],textStyles:[]},this.classes.set(t,e)),null!=s&&s.forEach(t=>{if(/color/.exec(t)){const s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)})})}setDirection(t){this.direction=t.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"),"TD"===this.direction&&(this.direction="TB")}setClass(t,e){for(const s of t.split(",")){const t=this.vertices.get(s);t&&t.classes.push(e);const i=this.edges.find(t=>t.id===s);i&&i.classes.push(e);const n=this.subGraphLookup.get(s);n&&n.classes.push(e)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(const s of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(s):s,e)}}setClickFun(t,e,s){if("loose"!==a().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof s){i=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<i.length;t++){let e=i[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),i[t]=e}}0===i.length&&i.push(t);const n=this.vertices.get(t);n&&(n.haveCallback=!0,this.funs.push(()=>{const s=this.lookUpDomId(t),n=document.querySelector(`[id="${s}"]`);null!==n&&n.addEventListener("click",()=>{l.runFunc(e,...i)},!1)}))}setLink(t,e,s){t.split(",").forEach(t=>{const i=this.vertices.get(t);void 0!==i&&(i.link=l.formatUrl(e,this.config),i.linkTarget=s)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,s){t.split(",").forEach(t=>{this.setClickFun(t,e,s)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}isToolDefinition(t){return X.has(t.type)}getTools(){const t=[];for(const e of this.vertices.values())this.isToolDefinition(e)&&t.push(e);return t}getClasses(){return this.classes}setupToolTips(t){const e=$();k(t).select("svg").selectAll("g.node").on("mouseover",t=>{const s=k(t.currentTarget),i=s.attr("title");if(null===i)return;const n=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.bottom+"px"),e.html(x.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);k(t.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=a(),this.diagramId="",this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,C()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,e,s,n){let o=t?.text?.trim(),u=s?.text;t===s&&s?.text&&/\s/.exec(s.text)&&(o=void 0);const l=i(t=>{const e={boolean:{},number:{},string:{}},s=[];let i;return{nodeList:t.filter(function(t){const n=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(n in e?!e[n].hasOwnProperty(t)&&(e[n][t]=!0):!s.includes(t)&&s.push(t))}),dir:i}},"uniq")(e.flat()),c=l.nodeList;let d=l.dir;const h=a().flowchart??{};if(d=d??(h.inheritDir?this.getDirection()??a().direction??void 0:void 0),"gen-1"===this.version)for(let t=0;t<c.length;t++)c[t]=this.lookUpDomId(c[t]);o=o??"subGraph"+this.subCount,u=u||"",u=this.sanitizeText(u),this.subCount=this.subCount+1;const p={id:o,nodes:c.filter(t=>t!==o&&!this.globalNodes.has(t)),title:u.trim(),classes:[],dir:d,labelType:this.sanitizeNodeLabelType(s?.type),type:n??"flow"};r.info("Adding",p.id,p.nodes,p.dir),p.nodes=this.makeUniq(p,this.subGraphs).nodes;const g=this.getPosForId(o);if(-1!==g){const t=this.subGraphs[g];for(const e of p.nodes)t.nodes.includes(e)||t.nodes.push(e);p.title&&(t.title=p.title),p.dir&&(t.dir=p.dir),p.type&&(t.type=p.type),this.subGraphLookup.set(o,t)}else this.subGraphs.push(p),this.subGraphLookup.set(o,p);return o}addGlobal(t){for(const e of t.flat()){if("string"!=typeof e)continue;const t=e.trim();""!==t&&this.globalNodes.add(t)}for(const t of this.subGraphs)t.nodes=t.nodes.filter(t=>!this.globalNodes.has(t))}getPosForId(t){for(const[e,s]of this.subGraphs.entries())if(s.id===t)return e;return-1}indexNodes2(t,e){const s=this.subGraphs[e].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)return{result:!0,count:0};let i=0,n=1;for(;i<s.length;){const e=this.getPosForId(s[i]);if(e>=0){const s=this.indexNodes2(t,e);if(s.result)return{result:!0,count:n+s.count};n+=s.count}i+=1}return{result:!1,count:n}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}addConnector(t,e){const s=t?.text?.trim();if(!s)return"";const i=e?.text?.trim()??"",n=i.length>0?this.sanitizeText(i):s;let r=this.connectors.get(s);return r?i.length>0&&(r.text=n):(r={id:s,labelType:"text",domId:Y+s+"-"+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:n},this.connectors.set(s,r),this.vertices.set(s,r),this.vertexCounter++),s}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){return!!this.firstGraphFlag&&(this.firstGraphFlag=!1,!0)}computeEdgeSemantic(t,e){return"arrow_point"===t&&"normal"===e?"sequence":"arrow_cross"===t&&"normal"===e?"failure":"arrow_open"===t&&"dotted"===e?"reference":void 0}destructStartLink(t){let e="normal";return t.trim().includes(".")&&(e="dotted"),{type:"arrow_open",stroke:e}}countChar(t,e){const s=e.length;let i=0;for(let n=0;n<s;++n)e[n]===t&&++i;return i}destructEndLink(t){const e=t.trim();let s=e.slice(0,-1),i="arrow_open";switch(e.slice(-1)){case"x":i="arrow_cross";break;case">":i="arrow_point";break;case"-":case".":i="arrow_open",s=e}let n="normal",r=s.length-1;const a=this.countChar(".",s);return a>0&&(n="dotted",r=a),{type:i,stroke:n,length:r}}destructLink(t,e){const s=this.destructEndLink(t);let i;return e?(i=this.destructStartLink(e),i.stroke!==s.stroke?{type:"INVALID",stroke:"INVALID"}:(i.type=s.type,i.length=s.length,{...i,edgeSemantic:this.computeEdgeSemantic(i.type,i.stroke)})):{...s,edgeSemantic:this.computeEdgeSemantic(s.type,s.stroke)}}exists(t,e){for(const s of t)if(s.nodes.includes(e))return!0;return!1}makeUniq(t,e){const s=[];return t.nodes.forEach((i,n)=>{this.exists(e,i)||s.push(t.nodes[n])}),{nodes:s}}getTypeFromVertex(t){const e="string"==typeof t.type?O(t.type):t.type;switch(e){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",s="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":case"arrow_hierarchy":s=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),s=e}return{arrowTypeStart:e,arrowTypeEnd:s}}addNodeFromVertex(t,e,s,i,n,r){const a=s.get(t.id),o=i.get(t.id)??!1,u=this.findNode(e,t.id);if(u)u.cssStyles=t.styles,u.cssCompiledStyles=this.getCompiledStyles(t.classes),u.cssClasses=t.classes.join(" ");else{const s={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:a,padding:n.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:r,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),metadata:t.metadata};o?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:this.getTypeFromVertex(t),wrappingWidth:n.agentflow?.wrappingWidth,minWidth:n.agentflow?.minNodeWidth})}}getCompiledStyles(t){let e=[];for(const s of t){const t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}runPostParseValidators(){this.postParseValidationRun||(this.postParseValidationRun=!0)}getData(){this.runPostParseValidators();const t=a(),e=[],s=[],n=this.getSubGraphs(),r=new Map,o=new Map,u=new Set,l=new Map,c=i((t,e,s=new Set)=>{if(s.has(t))return;s.add(t);const i=this.subGraphLookup.get(t);if(i)for(const t of i.nodes)t===e||s.has(t)||(u.add(t),l.set(t,e),c(t,e,s))},"collectDescendants");for(const t of n)"collapsed"!==t.metadata?.view||u.has(t.id)||c(t.id,t.id);const d=i((t,e)=>{const s=new Set;let i=e;for(;void 0!==i&&!s.has(i);){if(i===t)return!0;s.add(i),i=r.get(i)}return!1},"wouldCloseContainmentCycle");for(let t=n.length-1;t>=0;t--){const e=n[t];if(!u.has(e.id)){e.nodes.length>0&&o.set(e.id,!0);for(const t of e.nodes)d(t,e.id)?this.emitWarning(B.CONTAINMENT_VIOLATION,`Container "${e.id}" cannot contain "${t}" because "${t}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:t}):r.set(t,e.id)}}for(let s=n.length-1;s>=0;s--){const i=n[s];if(u.has(i.id))continue;if("collapsed"===i.metadata?.view){const s={...i.metadata,containerType:i.type};e.push({id:i.id,label:i.title,labelStyle:"",labelType:i.labelType,parentId:r.get(i.id),padding:8,cssCompiledStyles:this.getCompiledStyles(i.classes),cssClasses:i.classes.join(" "),shape:"collapsedGroup",dir:i.dir,isGroup:!1,look:t.look,metadata:s})}else e.push({id:i.id,label:i.title,labelStyle:"",labelType:i.labelType,parentId:r.get(i.id),padding:8,cssCompiledStyles:this.getCompiledStyles(i.classes),cssClasses:i.classes.join(" "),shape:q[i.type??"flow"],dir:i.dir,isGroup:!0,look:t.look,metadata:i.metadata})}this.getVertices().forEach(s=>{u.has(s.id)||this.addNodeFromVertex(s,e,r,o,t,t.look||"classic")});const h=this.getEdges();h.forEach((e,i)=>{const n=l.get(e.start)??e.start,r=l.get(e.end)??e.end;if(n===r&&e.start!==e.end)return;const{arrowTypeStart:a,arrowTypeEnd:o}=this.destructEdgeType(e.type),u=[...h.defaultStyle??[]];e.style&&u.push(...e.style);const c={id:E(n,r,{counter:i,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:n,end:r,type:e.type??"normal",label:e.text,labelType:e.labelType,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":a,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":o,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:u,style:u,pattern:e.stroke,look:t.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve,metadata:e.metadata};s.push(c)}),V(e,this);const p=new Map,g=new Map;for(const t of n){const e=r.get(t.id);void 0!==e&&g.set(e,[...g.get(e)??[],t.id])}let m=0;const f=i(t=>{if(!p.has(t)){p.set(t,m++);for(const e of g.get(t)??[])f(e)}},"walkContainers");for(const t of n)void 0===r.get(t.id)&&f(t.id);const y=new Set(this.getConnectors().map(t=>t.id));return K(e,t=>{if(y.has(t))return"connector";const e=this.vertices.get(t);return e?this.deriveVertexKind(e,O(e.type)):void 0},p),{nodes:e,edges:s,other:{},config:t,connectors:this.getConnectors()}}defaultConfig(){return S.flowchart}deriveVertexKind(t,e){return this.isToolDefinition(t)?"tool":"hexagon"===e||"hex"===e?"action":"lean-right"===e||"lean_right"===e?"input":"lin-doc"===e||"lined-document"===e?"refdoc":"diamond"===e?"decision":"task"}getSemanticModel(){this.runPostParseValidators();const t=new Set(this.subGraphs.map(t=>t.id)),e=[],s=[];for(const[i,n]of this.vertices){if(t.has(i))continue;if(n.isConnector){const t={id:i};if(void 0!==n.text&&n.text!==i&&(t.title=n.text),n.metadata&&Object.keys(n.metadata).length>0){const e={};for(const[t,s]of Object.entries(n.metadata))H.has(t)||(e[t]=s);Object.keys(e).length>0&&(t.metadata=e)}s.push(t);continue}const r={id:i};void 0!==n.text&&(r.label=n.text);const a="string"==typeof n.type?O(n.type):n.type;if(void 0!==a&&(r.shape=a),r.vertexKind=this.deriveVertexKind(n,a),n.metadata&&Object.keys(n.metadata).length>0){const t={};for(const[e,s]of Object.entries(n.metadata))H.has(e)||(t[e]=s);Object.keys(t).length>0&&(r.metadata=t)}e.push(r)}const i={vertices:e,edges:this.edges.map(t=>{const e={start:t.start,end:t.end};return void 0!==t.id&&(e.id=t.id),"string"==typeof t.text&&t.text.length>0&&(e.label=t.text),void 0!==t.type&&(e.type=t.type),void 0!==t.stroke&&(e.stroke=t.stroke),void 0!==t.edgeSemantic&&(e.edgeSemantic=t.edgeSemantic),void 0!==t.length&&(e.length=t.length),t.metadata&&Object.keys(t.metadata).length>0&&(e.metadata={...t.metadata}),e}),subGraphs:this.subGraphs.map(t=>{const e={id:t.id,nodes:[...t.nodes]};if(void 0!==t.type&&(e.type=t.type),void 0!==t.title&&(e.title=t.title),void 0!==t.dir&&(e.direction=t.dir),t.metadata&&Object.keys(t.metadata).length>0){const s={};for(const[e,i]of Object.entries(t.metadata))H.has(e)||(s[e]=i);Object.keys(s).length>0&&(e.metadata=s)}return e}),connectors:s,diagnostics:this.diagnostics};return void 0!==this.direction&&(i.direction=this.direction),i}setFrontmatterLineOffset(t){this.frontmatterLineOffset=t??0}toElementPosition(t){const e=t?.first_line??0,s=t?.first_column??0,i=t?.last_line??e,n=t?.last_column??s,[r,a]=t?.range??[0,0];return{startLine:e+this.frontmatterLineOffset,startColumn:s,endLine:i+this.frontmatterLineOffset,endColumn:n,startIndex:r,endIndex:a}}pushMapping(t,e,s){if(!t)return;const i={id:t,type:e,position:this.toElementPosition(s)};return this.elementMappings.push(i),i}addVertexMapping(t,e,s,i){const n=this.pushMapping(t,"vertex",i);n&&null==s&&this.bareVertexMappings.add(n)}extendVertexMapping(t,e){if(!t||!e)return;const s=this.toElementPosition(e);for(let e=this.elementMappings.length-1;e>=0;e--){const i=this.elementMappings[e];if("vertex"===i.type&&i.id===t){this.bareVertexMappings.has(i)&&(i.type="attachment",this.bareVertexMappings.delete(i));return void((s.endLine>i.position.endLine||s.endLine===i.position.endLine&&s.endColumn>i.position.endColumn)&&(i.position.endLine=s.endLine,i.position.endColumn=s.endColumn,i.position.endIndex=s.endIndex))}}this.pushMapping(t,"attachment",e)}addEdgeMapping(t,e,s,i){const n=Array.isArray(e)?e.map(t=>"string"==typeof t?t:t?.id??"").filter(Boolean):[],r=n.length>0?n.join(">"):"edge";this.pushMapping(r,"edge",i)}addSubgraphMapping(t,e,s,i){const n=("string"==typeof t?t:t?.text)??"",r=this.toElementPosition(s),a=i?this.toElementPosition(i):r;n&&this.elementMappings.push({id:n,type:"subgraph",position:{startLine:r.startLine,startColumn:r.startColumn,endLine:a.endLine,endColumn:a.endColumn,startIndex:r.startIndex,endIndex:a.endIndex}})}addConnectorMapping(t,e,s,i){const n=t?.text?.trim()??"";if(!n)return;const r=this.toElementPosition(s),a=i?this.toElementPosition(i):r;this.elementMappings.push({id:n,type:"connector",position:{startLine:r.startLine,startColumn:r.startColumn,endLine:a.endLine,endColumn:a.endColumn,startIndex:r.startIndex,endIndex:a.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(t){return this.elementMappings.find(e=>e.id===t)}getElementsOnLine(t){return this.elementMappings.filter(e=>t>=e.position.startLine&&t<=e.position.endLine)}getElementAtPosition(t,e){const s=this.elementMappings.filter(s=>{const{startLine:i,startColumn:n,endLine:r,endColumn:a}=s.position;return!(t<i||t>r)&&(!(t===i&&e<n)&&!(t===r&&e>a))});if(0===s.length)return;const n=i(({position:t})=>[t.endLine-t.startLine,t.endColumn-t.startColumn],"span");return s.reduce((t,e)=>{const[s,i]=n(t),[r,a]=n(e);return r!==s?r<s?e:t:a<i?e:t})}getMappingStats(){let t=0,e=0,s=0,i=0,n=0;for(const r of this.elementMappings)"vertex"===r.type?t++:"edge"===r.type?e++:"subgraph"===r.type?s++:"connector"===r.type?i++:"attachment"===r.type&&n++;return{vertices:t,edges:e,subgraphs:s,connectors:i,attachments:n,totalElements:this.elementMappings.length}}emitDiagnostic(t,e,s,i){const n=i?.nodeId??i?.edgeId,a=n?this.getElementById(n):void 0,o={id:t,severity:e,message:s,...i?.nodeId?{nodeId:i.nodeId}:{},...i?.edgeId&&!i?.nodeId?{edgeId:i.edgeId}:{},...a?{position:a.position}:{}};if(this.diagnostics.some(t=>t.id===o.id&&t.severity===o.severity&&t.message===o.message&&t.nodeId===o.nodeId&&t.edgeId===o.edgeId))return;this.diagnostics.push(o);const u=`agentflow[${t}]: ${s}`;"error"===e?r.error(u):r.warn(u)}emitWarning(t,e,s){this.emitDiagnostic(t,"warning",e,s)}emitError(t,e,s){this.emitDiagnostic(t,"error",e,s)}getDiagnostics(){return[...this.diagnostics]}},tt={getClasses:i(function(t,e){return e.db.getClasses()},"getClasses"),draw:i(async function(t,i,n,c){r.debug("Drawing agentflow diagram",i);const{securityLevel:d,agentflow:h,layout:p}=a();c.db.setDiagramId(i),r.debug("Before getData: ");const g=c.db.getData();r.debug("Data: ",g);const m=e(i,d),f=c.db.getDirection();g.type=c.type,g.layoutAlgorithm=o(p),"dagre"===g.layoutAlgorithm&&"elk"===p&&r.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),g.direction=f,g.nodeSpacing=h?.nodeSpacing||50,g.rankSpacing=h?.rankSpacing||50,g.markers=["point","circle","cross","hierarchy"],g.diagramId=i,r.debug("REF1:",g),await u(g,m);const y=h?.diagramPadding??8;l.insertTitle(m,"agentflowTitleText",h?.titleTopMargin??0,c.db.getDiagramTitle()),s(m,y,"agentflow",h?.useMaxWidth??!0)},"draw")},et=function(){var t=i(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,5],s=[1,4],n=[1,3],r=[1,6],a=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],o=[2,2],u=[1,15],l=[1,16],c=[1,17],d=[1,18],h=[1,19],p=[1,26],g=[1,27],m=[1,28],f=[1,30],y=[1,31],b=[1,32],A=[1,55],E=[1,54],k=[1,34],x=[1,35],C=[1,36],S=[1,37],T=[1,38],_=[1,50],D=[1,52],v=[1,48],F=[1,53],$=[1,49],L=[1,56],B=[1,51],I=[1,57],w=[1,58],M=[1,39],N=[1,40],R=[1,41],O=[1,42],V=[1,43],P=[1,64],G=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],U=[1,70],j=[1,68],z=[1,67],W=[1,69],K=[8,9,10,12,78,80,81],Y=[1,88],H=[1,101],X=[1,106],q=[1,105],Q=[1,102],J=[1,98],Z=[1,104],tt=[1,100],et=[1,107],st=[1,103],it=[1,108],nt=[1,99],rt=[8,9,10,11,12,43,78,80,81],at=[8,9,10,11,12,43,49,78,80,81],ot=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],ut=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],lt=[47,63,92,105,108,109,112,114,117,118,119],ct=[1,131],dt=[1,132],ht=[1,134],pt=[1,133],gt=[47,63,65,77,92,105,108,109,112,114,117,118,119],mt=[1,143],ft=[1,157],yt=[1,158],bt=[1,159],At=[1,162],Et=[1,161],kt=[1,160],xt=[1,145],Ct=[1,147],St=[1,151],Tt=[1,139],_t=[1,140],Dt=[1,152],vt=[1,153],Ft=[1,154],$t=[1,155],Lt=[1,156],Bt=[1,163],It=[1,164],wt=[1,141],Mt=[1,142],Nt=[1,149],Rt=[1,144],Ot=[1,148],Vt=[1,146],Pt=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],Gt=[1,168],Ut=[1,170],jt=[8,9,10,12],zt=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],Wt=[1,190],Kt=[1,186],Yt=[1,187],Ht=[1,191],Xt=[1,188],qt=[1,189],Qt=[80,119,122],Jt=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],Zt=[11,109],te=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],ee=[1,269],se=[1,267],ie=[1,271],ne=[1,265],re=[1,266],ae=[1,268],oe=[1,270],ue=[1,272],le=[1,292],ce=[8,9,10,12,109],de=[8,9,10,11,12,63,87,108,109,112,113,114,115],he={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:"error",8:"COMMENT",9:"SEMI",10:"NEWLINE",11:"SPACE",12:"EOF",13:"GRAPH",14:"NODIR",15:"DIR",28:"flow",30:"SQS",32:"SQE",33:"end",35:"global",36:"connector",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"SHAPE_DATA",47:"AMP",49:"STYLE_SEPARATOR",51:"DOUBLECIRCLESTART",52:"DOUBLECIRCLEEND",53:"PS",54:"PE",55:"(-",56:"-)",57:"STADIUMSTART",58:"STADIUMEND",59:"SUBROUTINESTART",60:"SUBROUTINEEND",61:"VERTEX_WITH_PROPS_START",62:"NODE_STRING[field]",63:"COLON",64:"NODE_STRING[value]",65:"PIPE",66:"CYLINDERSTART",67:"CYLINDEREND",68:"DIAMOND_START",69:"DIAMOND_STOP",70:"TAGEND",71:"TRAPSTART",72:"TRAPEND",73:"INVTRAPSTART",74:"INVTRAPEND",77:"TESTSTR",78:"START_LINK",80:"LINK",81:"LINK_ID",83:"STR",84:"MD_STR",87:"STYLE",88:"LINKSTYLE",89:"CLASSDEF",90:"CLASS",91:"CLICK",92:"DOWN",93:"UP",96:"idString[vertex]",97:"idString[class]",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"STR[link]",103:"STR[tooltip]",105:"DEFAULT",107:"INTERPOLATE",108:"NUM",109:"COMMA",112:"NODE_STRING",113:"UNIT",114:"BRKT",115:"PCT",117:"MINUS",118:"MULT",119:"UNICODE_TEXT",120:"TEXT",121:"TAGSTART",122:"EDGE_TEXT",124:"direction_tb",125:"direction_bt",126:"direction_rl",127:"direction_lr",128:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:i(function(t,e,s,i,n,r,a){var o=r.length-1;switch(n){case 2:case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 3:(!Array.isArray(r[o])||r[o].length>0)&&r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 198:case 57:case 67:case 89:case 196:this.$=r[o];break;case 13:i.setDirection("TB"),this.$="TB";break;case 14:i.setDirection(r[o-1]),this.$=r[o-1];break;case 32:this.$=r[o-1].nodes;break;case 38:this.$=i.addSubGraph(r[o-6],r[o-1],r[o-4],"flow"),i.addSubgraphMapping&&i.addSubgraphMapping(r[o-6],r[o-4],a[o-8],a[o]);break;case 39:this.$=i.addSubGraph(r[o-7],r[o-1],r[o-5],"flow"),i.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,r[o-3],a[o-3]),i.addSubgraphMapping&&i.addSubgraphMapping(r[o-7],r[o-5],a[o-9],a[o]);break;case 40:this.$=i.addSubGraph(r[o-3],r[o-1],{text:"",type:"text"},"flow"),i.addSubgraphMapping&&i.addSubgraphMapping(r[o-3],{text:"",type:"text"},a[o-5],a[o]);break;case 41:this.$=i.addSubGraph(r[o-4],r[o-1],{text:"",type:"text"},"flow"),i.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,r[o-3],a[o-3]),i.addSubgraphMapping&&i.addSubgraphMapping(r[o-4],{text:"",type:"text"},a[o-6],a[o]);break;case 42:this.$=i.addSubGraph(void 0,r[o-1],void 0,"flow"),i.addSubgraphMapping&&i.addSubgraphMapping(void 0,void 0,a[o-3],a[o]);break;case 43:i.addGlobal(r[o-1]),this.$=[];break;case 44:this.$=i.addConnector(r[o-4],r[o-2]),i.addConnectorMapping&&i.addConnectorMapping(r[o-4],r[o-2],a[o-6],a[o]);break;case 45:this.$=i.addConnector(r[o-5],r[o-3]),i.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,r[o-1],a[o-1]),i.addConnectorMapping&&i.addConnectorMapping(r[o-5],r[o-3],a[o-7],a[o]);break;case 46:this.$=i.addConnector(r[o-1],{text:"",type:"text"}),i.addConnectorMapping&&i.addConnectorMapping(r[o-1],{text:"",type:"text"},a[o-3],a[o]);break;case 47:this.$=i.addConnector(r[o-2],{text:"",type:"text"}),i.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,r[o-1],a[o-1]),i.addConnectorMapping&&i.addConnectorMapping(r[o-2],{text:"",type:"text"},a[o-4],a[o]);break;case 49:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 50:case 51:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 56:case 148:this.$=r[o-1]+r[o];break;case 58:i.addVertex(r[o-1][r[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[o],a[o]),i.extendVertexMapping&&i.extendVertexMapping(r[o-1][r[o-1].length-1],a[o]),i.addLink(r[o-3].stmt,r[o-1],r[o-2]),i.addEdgeMapping&&i.addEdgeMapping(r[o-3].stmt,r[o-1],r[o-2],this._$),this.$={stmt:r[o-1],nodes:r[o-1].concat(r[o-3].nodes)};break;case 59:i.addLink(r[o-2].stmt,r[o],r[o-1]),i.addEdgeMapping&&i.addEdgeMapping(r[o-2].stmt,r[o],r[o-1],this._$),this.$={stmt:r[o],nodes:r[o].concat(r[o-2].nodes)};break;case 60:i.addLink(r[o-3].stmt,r[o-1],r[o-2]),i.addEdgeMapping&&i.addEdgeMapping(r[o-3].stmt,r[o-1],r[o-2],this._$),this.$={stmt:r[o-1],nodes:r[o-1].concat(r[o-3].nodes)};break;case 61:this.$={stmt:r[o-1],nodes:r[o-1]};break;case 62:i.addVertex(r[o-1][r[o-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[o],a[o]),i.extendVertexMapping&&i.extendVertexMapping(r[o-1][r[o-1].length-1],a[o]),this.$={stmt:r[o-1],nodes:r[o-1],shapeData:r[o]};break;case 63:this.$={stmt:r[o],nodes:r[o]};break;case 64:case 143:case 145:this.$=[r[o]];break;case 65:i.addVertex(r[o-5][r[o-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[o-4],a[o-4]),i.extendVertexMapping&&i.extendVertexMapping(r[o-5][r[o-5].length-1],a[o-4]),this.$=r[o-5].concat(r[o]);break;case 66:this.$=r[o-4].concat(r[o]);break;case 68:this.$=r[o-2],i.setClass(r[o-2],r[o]);break;case 69:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"square"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"square",this._$);break;case 70:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"doublecircle"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"doublecircle",this._$);break;case 71:this.$=r[o-5],i.addVertex(r[o-5],r[o-2],"circle"),i.addVertexMapping&&i.addVertexMapping(r[o-5],r[o-2],"circle",this._$);break;case 72:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"ellipse"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"ellipse",this._$);break;case 73:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"stadium"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"stadium",this._$);break;case 74:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"subroutine"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"subroutine",this._$);break;case 75:this.$=r[o-7],i.addVertex(r[o-7],r[o-1],"rect",void 0,void 0,void 0,Object.fromEntries([[r[o-5],r[o-3]]])),i.addVertexMapping&&i.addVertexMapping(r[o-7],r[o-1],"rect",this._$);break;case 76:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"cylinder"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"cylinder",this._$);break;case 77:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"round"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"round",this._$);break;case 78:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"diamond"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"diamond",this._$);break;case 79:this.$=r[o-5],i.addVertex(r[o-5],r[o-2],"hexagon"),i.addVertexMapping&&i.addVertexMapping(r[o-5],r[o-2],"hexagon",this._$);break;case 80:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"odd"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"odd",this._$);break;case 81:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"trapezoid"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"trapezoid",this._$);break;case 82:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"inv_trapezoid"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"inv_trapezoid",this._$);break;case 83:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"lean_right"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"lean_right",this._$);break;case 84:this.$=r[o-3],i.addVertex(r[o-3],r[o-1],"lean_left"),i.addVertexMapping&&i.addVertexMapping(r[o-3],r[o-1],"lean_left",this._$);break;case 85:this.$=r[o],i.addVertex(r[o]),i.addVertexMapping&&i.addVertexMapping(r[o],void 0,void 0,this._$);break;case 86:r[o-1].text=r[o],this.$=r[o-1];break;case 87:case 88:r[o-2].text=r[o-1],this.$=r[o-2];break;case 90:var u=i.destructLink(r[o],r[o-2]);this.$={type:u.type,stroke:u.stroke,length:u.length,edgeSemantic:u.edgeSemantic,text:r[o-1]};break;case 91:u=i.destructLink(r[o],r[o-2]);this.$={type:u.type,stroke:u.stroke,length:u.length,edgeSemantic:u.edgeSemantic,text:r[o-1],id:r[o-3]};break;case 92:case 99:case 116:case 118:this.$={text:r[o],type:"text"};break;case 93:case 100:case 117:this.$={text:r[o-1].text+""+r[o],type:r[o-1].type};break;case 94:case 101:this.$={text:r[o],type:"string"};break;case 95:case 102:case 119:this.$={text:r[o],type:"markdown"};break;case 96:u=i.destructLink(r[o]);this.$={type:u.type,stroke:u.stroke,length:u.length,edgeSemantic:u.edgeSemantic};break;case 97:u=i.destructLink(r[o]);this.$={type:u.type,stroke:u.stroke,length:u.length,edgeSemantic:u.edgeSemantic,id:r[o-1]};break;case 98:this.$=r[o-1];break;case 120:this.$=r[o-4],i.addClass(r[o-2],r[o]);break;case 121:this.$=r[o-4],i.setClass(r[o-2],r[o]);break;case 122:case 130:this.$=r[o-1],i.setClickEvent(r[o-1],r[o]);break;case 123:case 131:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2]),i.setTooltip(r[o-3],r[o]);break;case 124:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 125:this.$=r[o-4],i.setClickEvent(r[o-4],r[o-3],r[o-2]),i.setTooltip(r[o-4],r[o]);break;case 126:this.$=r[o-2],i.setLink(r[o-2],r[o]);break;case 127:this.$=r[o-4],i.setLink(r[o-4],r[o-2]),i.setTooltip(r[o-4],r[o]);break;case 128:this.$=r[o-4],i.setLink(r[o-4],r[o-2],r[o]);break;case 129:this.$=r[o-6],i.setLink(r[o-6],r[o-4],r[o]),i.setTooltip(r[o-6],r[o-2]);break;case 132:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 133:this.$=r[o-3],i.setLink(r[o-3],r[o-2]),i.setTooltip(r[o-3],r[o]);break;case 134:this.$=r[o-3],i.setLink(r[o-3],r[o-2],r[o]);break;case 135:this.$=r[o-5],i.setLink(r[o-5],r[o-4],r[o]),i.setTooltip(r[o-5],r[o-2]);break;case 136:this.$=r[o-4],i.addVertex(r[o-2],void 0,void 0,r[o]);break;case 137:this.$=r[o-4],i.updateLink([r[o-2]],r[o]);break;case 138:this.$=r[o-4],i.updateLink(r[o-2],r[o]);break;case 139:this.$=r[o-8],i.updateLinkInterpolate([r[o-6]],r[o-2]),i.updateLink([r[o-6]],r[o]);break;case 140:this.$=r[o-8],i.updateLinkInterpolate(r[o-6],r[o-2]),i.updateLink(r[o-6],r[o]);break;case 141:this.$=r[o-6],i.updateLinkInterpolate([r[o-4]],r[o]);break;case 142:this.$=r[o-6],i.updateLinkInterpolate(r[o-4],r[o]);break;case 144:case 146:r[o-2].push(r[o]),this.$=r[o-2];break;case 197:case 199:this.$=r[o-1]+""+r[o];break;case 200:this.$={stmt:"dir",value:"TB"};break;case 201:this.$={stmt:"dir",value:"BT"};break;case 202:this.$={stmt:"dir",value:"RL"};break;case 203:this.$={stmt:"dir",value:"LR"};break;case 204:this.$={stmt:"dir",value:"TD"}}},"anonymous"),table:[{3:1,4:2,8:e,10:s,11:n,13:r},{1:[3]},t(a,o,{5:7}),{4:8,8:e,10:s,11:n,13:r},{4:9,8:e,10:s,11:n,13:r},{4:10,8:e,10:s,11:n,13:r},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:u,9:l,10:c,11:d,12:h,21:20,23:21,24:22,25:23,26:24,27:25,28:p,35:g,36:m,37:29,38:f,40:y,42:b,45:33,46:44,47:A,48:45,50:46,63:E,87:k,88:x,89:C,90:S,91:T,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w,124:M,125:N,126:R,127:O,128:V},t(a,[2,10]),t(a,[2,11]),t(a,[2,12]),t(a,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:P,16:59,19:62},t(G,[2,3]),t(G,[2,4]),t(G,[2,5]),t(G,[2,6]),t(G,[2,7]),t(G,[2,8]),t(G,[2,9]),{8:U,9:j,10:z,12:W,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:U,9:j,10:z,12:W,22:75},{8:U,9:j,10:z,12:W,22:76},{8:U,9:j,10:z,12:W,22:77},{8:U,9:j,10:z,12:W,22:78},{8:U,9:j,10:z,12:W,22:79},{8:U,9:j,10:z,11:[1,80],12:W,22:81},{8:U,9:j,10:z,12:W,22:82},{11:[1,83]},t(G,[2,48]),{39:[1,84]},{41:[1,85]},t(G,[2,51]),t(K,[2,63],{19:86,34:87,11:P,43:Y}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:H,47:X,63:q,83:[1,96],92:Q,98:[1,93],100:[1,94],104:95,108:J,109:Z,112:tt,114:et,117:st,118:it,119:nt,123:97},t(G,[2,200]),t(G,[2,201]),t(G,[2,202]),t(G,[2,203]),t(G,[2,204]),t(rt,[2,64]),t(rt,[2,67],{49:[1,109]}),t(at,[2,85],{116:122,30:[1,110],47:A,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:E,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:_,105:D,108:v,109:F,112:$,114:L,117:B,118:I,119:w}),t(ot,[2,196]),t(ot,[2,157]),t(ot,[2,158]),t(ot,[2,159]),t(ot,[2,160]),t(ot,[2,161]),t(ot,[2,162]),t(ot,[2,163]),t(ot,[2,164]),t(ot,[2,165]),t(ot,[2,166]),t(ot,[2,167]),t(a,[2,14]),t(a,[2,20]),t(a,[2,21]),{10:[1,123]},t(a,[2,23]),t(ut,[2,31],{19:124,11:P}),t(G,[2,32]),{45:125,46:44,47:A,48:45,50:46,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},t(G,[2,52]),t(G,[2,53]),t(G,[2,54]),t(G,[2,55]),t(lt,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:ct,84:dt,119:ht,122:pt},{78:[1,135],80:[1,136]},t(gt,[2,96]),t(G,[2,33]),t(G,[2,34]),t(G,[2,35]),t(G,[2,36]),t(G,[2,37]),{11:mt,13:ft,15:yt,28:bt,29:137,33:At,35:Et,36:kt,47:xt,63:Ct,78:St,83:Tt,84:_t,86:150,87:Dt,88:vt,89:Ft,90:$t,91:Lt,92:Bt,93:It,94:138,108:wt,112:Mt,114:Nt,117:Rt,118:Ot,119:Vt},t(Pt,o,{5:165}),t(Pt,o,{5:166}),{11:mt,13:ft,15:yt,28:bt,29:167,33:At,35:Et,36:kt,47:xt,63:Ct,78:St,83:Tt,84:_t,86:150,87:Dt,88:vt,89:Ft,90:$t,91:Lt,92:Bt,93:It,94:138,108:wt,112:Mt,114:Nt,117:Rt,118:Ot,119:Vt},t(G,[2,49]),t(G,[2,50]),t(K,[2,61],{47:Gt}),t(K,[2,62],{19:169,11:P,43:Ut}),t(rt,[2,57]),{47:A,50:171,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},{105:[1,172],106:173,108:[1,174]},{47:A,50:175,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},{47:A,50:176,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},t(jt,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},t(jt,[2,130],{123:181,11:[1,180],15:H,47:X,63:q,92:Q,108:J,109:Z,112:tt,114:et,117:st,118:it,119:nt}),t(jt,[2,132],{11:[1,182]}),t(zt,[2,198]),t(zt,[2,185]),t(zt,[2,186]),t(zt,[2,187]),t(zt,[2,188]),t(zt,[2,189]),t(zt,[2,190]),t(zt,[2,191]),t(zt,[2,192]),t(zt,[2,193]),t(zt,[2,194]),t(zt,[2,195]),{47:A,50:183,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},{31:184,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:192,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:194,53:[1,193],70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:195,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:196,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:197,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{112:[1,198]},{31:199,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:200,68:[1,201],70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:202,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:203,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{31:204,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},t(ot,[2,197]),t(a,[2,22]),t(ut,[2,30]),t(K,[2,59],{34:205,19:206,11:P,43:Y}),t(lt,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{80:[1,210],82:211,119:ht,122:pt},t(Qt,[2,92]),t(Qt,[2,94]),t(Qt,[2,95]),t(Qt,[2,183]),t(Qt,[2,184]),{79:212,82:130,83:ct,84:dt,119:ht,122:pt},t(gt,[2,97]),{8:U,9:j,10:z,11:mt,12:W,13:ft,15:yt,22:214,28:bt,30:[1,213],33:At,34:215,35:Et,36:kt,43:Y,47:xt,63:Ct,78:St,86:150,87:Dt,88:vt,89:Ft,90:$t,91:Lt,92:Bt,93:It,94:216,108:wt,112:Mt,114:Nt,117:Rt,118:Ot,119:Vt},t(Jt,[2,116]),t(Jt,[2,118]),t(Jt,[2,119]),t(Jt,[2,172]),t(Jt,[2,173]),t(Jt,[2,174]),t(Jt,[2,175]),t(Jt,[2,176]),t(Jt,[2,177]),t(Jt,[2,178]),t(Jt,[2,179]),t(Jt,[2,180]),t(Jt,[2,181]),t(Jt,[2,182]),t(Jt,[2,103]),t(Jt,[2,104]),t(Jt,[2,105]),t(Jt,[2,106]),t(Jt,[2,107]),t(Jt,[2,108]),t(Jt,[2,109]),t(Jt,[2,110]),t(Jt,[2,111]),t(Jt,[2,112]),t(Jt,[2,113]),t(Jt,[2,114]),t(Jt,[2,115]),{6:13,7:14,8:u,9:l,10:c,11:d,12:h,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,217],35:g,36:m,37:29,38:f,40:y,42:b,45:33,46:44,47:A,48:45,50:46,63:E,87:k,88:x,89:C,90:S,91:T,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w,124:M,125:N,126:R,127:O,128:V},{6:13,7:14,8:u,9:l,10:c,11:d,12:h,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,218],35:g,36:m,37:29,38:f,40:y,42:b,45:33,46:44,47:A,48:45,50:46,63:E,87:k,88:x,89:C,90:S,91:T,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w,124:M,125:N,126:R,127:O,128:V},{8:U,9:j,10:z,11:mt,12:W,13:ft,15:yt,22:220,28:bt,30:[1,219],33:At,34:221,35:Et,36:kt,43:Y,47:xt,63:Ct,78:St,86:150,87:Dt,88:vt,89:Ft,90:$t,91:Lt,92:Bt,93:It,94:216,108:wt,112:Mt,114:Nt,117:Rt,118:Ot,119:Vt},{11:P,19:222},{47:[1,223]},t(rt,[2,56]),{11:[1,224],47:A,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:122,117:B,118:I,119:w},{11:[1,225]},{11:[1,226],109:[1,227]},t(Zt,[2,143]),{11:[1,228],47:A,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:122,117:B,118:I,119:w},{11:[1,229],47:A,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:122,117:B,118:I,119:w},{83:[1,230]},t(jt,[2,124],{11:[1,231]}),t(jt,[2,126],{11:[1,232]}),{83:[1,233]},t(zt,[2,199]),{83:[1,234],101:[1,235]},t(rt,[2,68],{116:122,47:A,63:E,92:_,105:D,108:v,109:F,112:$,114:L,117:B,118:I,119:w}),{32:[1,236],70:Wt,85:237,119:Ht,120:Xt,121:qt},t(te,[2,99]),t(te,[2,101]),t(te,[2,102]),t(te,[2,168]),t(te,[2,169]),t(te,[2,170]),t(te,[2,171]),{52:[1,238],70:Wt,85:237,119:Ht,120:Xt,121:qt},{31:239,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{54:[1,240],70:Wt,85:237,119:Ht,120:Xt,121:qt},{56:[1,241],70:Wt,85:237,119:Ht,120:Xt,121:qt},{58:[1,242],70:Wt,85:237,119:Ht,120:Xt,121:qt},{60:[1,243],70:Wt,85:237,119:Ht,120:Xt,121:qt},{63:[1,244]},{67:[1,245],70:Wt,85:237,119:Ht,120:Xt,121:qt},{69:[1,246],70:Wt,85:237,119:Ht,120:Xt,121:qt},{31:247,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},{32:[1,248],70:Wt,85:237,119:Ht,120:Xt,121:qt},{70:Wt,72:[1,249],74:[1,250],85:237,119:Ht,120:Xt,121:qt},{70:Wt,72:[1,252],74:[1,251],85:237,119:Ht,120:Xt,121:qt},t(K,[2,58],{19:169,11:P,43:Ut}),t(K,[2,60],{47:Gt}),t(lt,[2,88]),t(lt,[2,87]),{65:[1,253],70:Wt,85:237,119:Ht,120:Xt,121:qt},t(lt,[2,90]),t(Qt,[2,93]),{80:[1,254],82:211,119:ht,122:pt},{31:255,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},t(Pt,o,{5:256}),{8:U,9:j,10:z,12:W,22:257,43:Ut},t(Jt,[2,117]),t(G,[2,42]),t(G,[2,43]),{31:258,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},t(G,[2,46]),{8:U,9:j,10:z,12:W,22:259,43:Ut},{46:260,47:A,48:45,50:46,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},{11:P,19:261},{11:ee,63:se,87:ie,95:262,108:ne,110:263,111:264,112:re,113:ae,114:oe,115:ue},{11:ee,63:se,87:ie,95:273,107:[1,274],108:ne,110:263,111:264,112:re,113:ae,114:oe,115:ue},{11:ee,63:se,87:ie,95:275,107:[1,276],108:ne,110:263,111:264,112:re,113:ae,114:oe,115:ue},{108:[1,277]},{11:ee,63:se,87:ie,95:278,108:ne,110:263,111:264,112:re,113:ae,114:oe,115:ue},{47:A,50:279,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},t(jt,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},t(jt,[2,131]),t(jt,[2,133],{11:[1,283]}),t(jt,[2,134]),t(at,[2,69]),t(te,[2,100]),t(at,[2,70]),{54:[1,284],70:Wt,85:237,119:Ht,120:Xt,121:qt},t(at,[2,77]),t(at,[2,72]),t(at,[2,73]),t(at,[2,74]),{112:[1,285]},t(at,[2,76]),t(at,[2,78]),{69:[1,286],70:Wt,85:237,119:Ht,120:Xt,121:qt},t(at,[2,80]),t(at,[2,81]),t(at,[2,83]),t(at,[2,82]),t(at,[2,84]),t([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),t(lt,[2,91]),{32:[1,287],70:Wt,85:237,119:Ht,120:Xt,121:qt},{6:13,7:14,8:u,9:l,10:c,11:d,12:h,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,288],35:g,36:m,37:29,38:f,40:y,42:b,45:33,46:44,47:A,48:45,50:46,63:E,87:k,88:x,89:C,90:S,91:T,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w,124:M,125:N,126:R,127:O,128:V},t(Pt,o,{5:289}),{32:[1,290],70:Wt,85:237,119:Ht,120:Xt,121:qt},t(G,[2,47]),t(rt,[2,66]),{46:291,47:A,48:45,50:46,63:E,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w},t(jt,[2,136],{109:le}),t(ce,[2,145],{111:293,11:ee,63:se,87:ie,108:ne,112:re,113:ae,114:oe,115:ue}),t(de,[2,147]),t(de,[2,149]),t(de,[2,150]),t(de,[2,151]),t(de,[2,152]),t(de,[2,153]),t(de,[2,154]),t(de,[2,155]),t(de,[2,156]),t(jt,[2,137],{109:le}),{11:[1,294]},t(jt,[2,138],{109:le}),{11:[1,295]},t(Zt,[2,144]),t(jt,[2,120],{109:le}),t(jt,[2,121],{116:122,47:A,63:E,92:_,105:D,108:v,109:F,112:$,114:L,117:B,118:I,119:w}),t(jt,[2,125]),t(jt,[2,127],{11:[1,296]}),t(jt,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:U,9:j,10:z,12:W,22:301,34:302,43:Y},t(G,[2,40]),{6:13,7:14,8:u,9:l,10:c,11:d,12:h,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,303],35:g,36:m,37:29,38:f,40:y,42:b,45:33,46:44,47:A,48:45,50:46,63:E,87:k,88:x,89:C,90:S,91:T,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w,124:M,125:N,126:R,127:O,128:V},{8:U,9:j,10:z,12:W,22:304,34:305,43:Y},t(rt,[2,65]),{11:ee,63:se,87:ie,108:ne,110:306,111:264,112:re,113:ae,114:oe,115:ue},t(de,[2,148]),{15:H,47:X,63:q,92:Q,104:307,108:J,109:Z,112:tt,114:et,117:st,118:it,119:nt,123:97},{15:H,47:X,63:q,92:Q,104:308,108:J,109:Z,112:tt,114:et,117:st,118:it,119:nt,123:97},{101:[1,309]},t(jt,[2,135]),t(at,[2,71]),{31:310,70:Wt,83:Kt,84:Yt,85:185,119:Ht,120:Xt,121:qt},t(at,[2,79]),t(Pt,o,{5:311}),{8:U,9:j,10:z,12:W,22:312,43:Ut},t(G,[2,41]),t(G,[2,44]),{8:U,9:j,10:z,12:W,22:313,43:Ut},t(ce,[2,146],{111:293,11:ee,63:se,87:ie,108:ne,112:re,113:ae,114:oe,115:ue}),t(jt,[2,141],{123:181,11:[1,314],15:H,47:X,63:q,92:Q,108:J,109:Z,112:tt,114:et,117:st,118:it,119:nt}),t(jt,[2,142],{123:181,11:[1,315],15:H,47:X,63:q,92:Q,108:J,109:Z,112:tt,114:et,117:st,118:it,119:nt}),t(jt,[2,129]),{32:[1,316],70:Wt,85:237,119:Ht,120:Xt,121:qt},{6:13,7:14,8:u,9:l,10:c,11:d,12:h,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,317],35:g,36:m,37:29,38:f,40:y,42:b,45:33,46:44,47:A,48:45,50:46,63:E,87:k,88:x,89:C,90:S,91:T,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w,124:M,125:N,126:R,127:O,128:V},t(Pt,o,{5:318}),t(G,[2,45]),{11:ee,63:se,87:ie,95:319,108:ne,110:263,111:264,112:re,113:ae,114:oe,115:ue},{11:ee,63:se,87:ie,95:320,108:ne,110:263,111:264,112:re,113:ae,114:oe,115:ue},t(at,[2,75]),t(G,[2,38]),{6:13,7:14,8:u,9:l,10:c,11:d,12:h,21:20,23:21,24:22,25:23,26:24,27:25,28:p,33:[1,321],35:g,36:m,37:29,38:f,40:y,42:b,45:33,46:44,47:A,48:45,50:46,63:E,87:k,88:x,89:C,90:S,91:T,92:_,105:D,108:v,109:F,112:$,114:L,116:47,117:B,118:I,119:w,124:M,125:N,126:R,127:O,128:V},t(jt,[2,139],{109:le}),t(jt,[2,140],{109:le}),t(G,[2,39])],defaultActions:{},parseError:i(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:i(function(t){var e=this,s=[0],n=[],r=[null],a=[],o=this.table,u="",l=0,c=0,d=a.slice.call(arguments,1),h=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);h.setInput(t,p.yy),p.yy.lexer=h,p.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var m=h.yylloc;a.push(m);var f=h.options&&h.options.ranges;function y(){var t;return"number"!=typeof(t=n.pop()||h.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i(function(t){s.length=s.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),i(y,"lex");for(var b,A,E,k,x,C,S,T,_={};;){if(A=s[s.length-1],this.defaultActions[A]?E=this.defaultActions[A]:(null==b&&(b=y()),E=o[A]&&o[A][b]),void 0===E||!E.length||!E[0]){var D="";for(x in T=[],o[A])this.terminals_[x]&&x>2&&T.push("'"+this.terminals_[x]+"'");D=h.showPosition?"Parse error on line "+(l+1)+":\n"+h.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(D,{text:h.match,token:this.terminals_[b]||b,line:h.yylineno,loc:m,expected:T})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(E[0]){case 1:s.push(b),r.push(h.yytext),a.push(h.yylloc),s.push(E[1]),b=null,c=h.yyleng,u=h.yytext,l=h.yylineno,m=h.yylloc;break;case 2:if(C=this.productions_[E[1]][1],_.$=r[r.length-C],_._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},f&&(_._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(_,[u,c,l,p.yy,E[1],r,a].concat(d))))return k;C&&(s=s.slice(0,-1*C*2),r=r.slice(0,-1*C),a=a.slice(0,-1*C)),s.push(this.productions_[E[1]][0]),r.push(_.$),a.push(_._$),S=o[s[s.length-2]][s[s.length-1]],s.push(S);break;case 3:return!0}}return!0},"parse")},pe=function(){return{EOF:1,parseError:i(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:i(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:i(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:i(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;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),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:i(function(t){this.unput(this.match.slice(t))},"less"),pastInput:i(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:i(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(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+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){var t=this.next();return t||this.lex()},"lex"),begin:i(function(t){this.conditionStack.push(t)},"begin"),popState:i(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i(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:i(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:i(function(t){this.begin(t)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:i(function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),38;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),40;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",43;case 8:return this.pushState("shapeDataStr"),43;case 9:return this.popState(),43;case 10:const s=/\n\s*/g;return e.yytext=e.yytext.replace(s,"<br/>"),43;case 11:return 43;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 98;case 18:return 99;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 87;case 26:return 105;case 27:return 88;case 28:return 107;case 29:return 89;case 30:return 90;case 31:return 100;case 32:this.begin("click");break;case 34:return 91;case 35:return t.lex.firstGraph()&&this.begin("dir"),13;case 36:return 28;case 37:return 36;case 38:return 35;case 39:return 33;case 40:case 41:case 42:case 43:return 101;case 44:return this.popState(),14;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),15;case 55:return 124;case 56:return 125;case 57:return 126;case 58:return 127;case 59:return 128;case 60:return 81;case 61:return 108;case 62:case 99:return 114;case 63:return 49;case 64:return 63;case 65:case 100:return 47;case 66:return 9;case 67:return 109;case 68:case 98:return 118;case 69:return this.popState(),80;case 70:return this.pushState("edgeText"),78;case 71:return 122;case 72:return 80;case 73:case 87:case 113:break;case 74:return this.popState(),56;case 75:case 114:return"TEXT";case 76:return this.pushState("ellipseText"),55;case 77:return this.popState(),58;case 78:return this.pushState("text"),57;case 79:return this.popState(),60;case 80:return this.pushState("text"),59;case 81:return 61;case 82:return this.pushState("text"),70;case 83:return this.popState(),67;case 84:return this.pushState("text"),66;case 85:return this.popState(),52;case 86:return this.pushState("text"),51;case 88:return this.popState(),72;case 89:return this.popState(),74;case 90:return 120;case 91:return this.pushState("trapText"),71;case 92:return this.pushState("trapText"),73;case 93:return 121;case 94:return 70;case 95:return 93;case 96:return"SEP";case 97:return 92;case 101:return 8;case 102:return 112;case 103:return 117;case 104:return 119;case 105:return this.popState(),65;case 106:return this.pushState("text"),65;case 107:return this.popState(),54;case 108:return this.pushState("text"),53;case 109:return this.popState(),32;case 110:return this.pushState("text"),30;case 111:return this.popState(),69;case 112:return this.pushState("text"),68;case 115:return"QUOTE";case 116:return 10;case 117:return 11;case 118:return 12}},"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]*)/,/^(?:agentflow-beta\b)/,/^(?:flow\b)/,/^(?:connector\b)/,/^(?:global\b[ \t]*)/,/^(?:end\b[ \t]*)/,/^(?:_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*--+[x>]\s*)/,/^(?:\s*--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*-\.+-\s*)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|(?:[^\\\[\]\(\)\{\}\/%]+|(?!))+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:[ \t]*%%(?!\{)[^\n]*)/,/^(?:([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])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:(?:[^\[\]\(\)\{\}\|\"%]+|(?!))+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},href:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},click:{rules:[21,24,33,34,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},edgeText:{rules:[21,24,69,71,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},trapText:{rules:[21,24,76,78,80,84,86,87,88,89,90,91,92,106,108,110,112],inclusive:!1},ellipseText:{rules:[21,24,73,74,75,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},text:{rules:[21,24,76,77,78,79,80,83,84,85,86,91,92,105,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr:{rules:[3,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_title:{rules:[1,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},md_string:{rules:[19,20,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},string:{rules:[21,22,23,24,76,78,80,84,86,91,92,106,108,110,112],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,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,76,78,80,81,82,84,86,91,92,93,94,95,96,97,98,99,100,101,102,103,104,106,108,110,112,115,116,117,118],inclusive:!0}}}}();function ge(){this.yy={}}return he.lexer=pe,i(ge,"Parser"),ge.prototype=he,he.Parser=ge,new ge}();et.parser=et;var st=et,it=Object.assign({},st);it.parse=t=>{const e=t.replace(/}[^\S\n]*\n/g,"}\n");return st.parse(e)};var nt=it,rt=i(t=>{const{theme:e,bkgColorArray:s,borderColorArray:n}=t;if(!T(e,n))return"";const r=_(t.look),a=D(s),o=v(t.THEME_COLOR_LIMIT,n),u=i(t=>n[t%n.length],"border"),l=i(t=>a?`fill: ${s[t%s.length]};`:"","fill");let c="";for(const t of j){const e=P.get(t),s=`[data-look="${r}"].node.${U(t)}`;c+=`\n\n ${s} rect,\n ${s} path,\n ${s} polygon {\n stroke: ${u(e)};\n ${l(e)}\n }\n`}for(let t=0;t<z(o);t++){const e=W(t,o),s=`[data-look="${r}"][data-color-id="color-${e}"].cluster`,n=`[data-look="${r}"][data-color-id="color-${e}"].node`,a=i(t=>`${s} ${t}, ${n} ${t}`,"rule");c+=`\n\n ${a("rect")},\n ${a("path")} {\n stroke: ${u(e)};\n ${l(e)}\n }\n`}return c},"genColor"),at=i((t,e)=>{const s=L,i=s(t,"r"),n=s(t,"g"),r=s(t,"b");return F(i,n,r,e)},"fade"),ot=i(e=>`${rt(e)}\n .label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span {\n color: ${e.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: ${e.strokeWidth??1}px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n .node .katex path {\n fill: ${e.nodeTextColor||e.textColor};\n stroke: ${e.nodeTextColor||e.textColor};\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${e.lineColor} !important;\n stroke-width: 0;\n stroke: ${e.lineColor};\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePaths .path {\n stroke: ${e.lineColor};\n stroke-width: ${e.strokeWidth??2}px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n p {\n background-color: ${e.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${at(e.edgeLabelBackground,.5)};\n }\n\n .cluster rect {\n fill: ${e.clusterBkg};\n stroke: ${e.clusterBorder};\n stroke-width: 1px;\n }\n\n .flow-cluster rect {\n fill: none;\n stroke: ${e.clusterBorder};\n stroke-width: 0.75px;\n }\n\n .node .collapsed-indicator {\n fill: ${e.nodeBorder};\n stroke: none;\n stroke-width: 0;\n opacity: 0.5;\n }\n\n .node .collapsed-separator {\n stroke-width: 0.75px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .agentflowTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${e.edgeLabelBackground};\n p {\n background-color: ${e.edgeLabelBackground};\n padding: 2px;\n }\n .label rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n ${t()}\n`,"getStyles"),ut={parser:nt,get db(){return new Z},renderer:tt,styles:ot,init:i(t=>{t.agentflow??={},t.layout&&n({layout:t.layout}),t.flowchart??={},t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,n({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")};export{ut as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,r,d as t}from"./chunk-2E7WHVMD-
|
|
1
|
+
import{g as e,r,d as t}from"./chunk-2E7WHVMD-CVBqw5fR.js";import{p as n}from"./chunk-JWPE2WC7-Ct5OBLCL.js";import{_ as s,l as a}from"./mermaid.core-DRk6tt5W.js";import{M as o,a as i}from"./cynefin-EF2NZ3EQ-CaJSaYBh.js";import"./index-BpcqEzEG.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-iref2pEJ.js";import"./settings-CBGV-lz3.js";import"./constants.js";import"./LoaderLayer-ECtsj85k.js";import"./websocket-CdeP8N_S.js";import"./index-2PTQqTnK.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";var p=i().RailroadEbnf.parser.LangiumParser,m=s(e=>{const r=e.alternatives.map(l);return 1===r.length?r[0]:{type:"choice",alternatives:r}},"transformChoice"),l=s(e=>{const r=e.elements.map(f);return 1===r.length?r[0]:{type:"sequence",elements:r}},"transformSequence"),c=s(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 m(e.element);case"EbnfOptional":return{type:"optional",element:m(e.element)};case"EbnfRepetition":return{type:"repetition",element:m(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),u=s((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:"-"},c(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),f=s(e=>e.postfixes.reduce((e,r)=>u(e,r),c(e.base)),"transformTerm"),y=s(e=>({name:e.name,definition:m(e.definition)}),"transformRule"),b=s(e=>{n(e,t),e.title&&t.setTitle(e.title),e.rules.map(e=>t.addRule(y(e)))},"populateDb"),d={parser:{parse:s(e=>{t.clear(),a.debug("[EBNF Parser] Starting Langium parse");const r=p.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new o(r);const n=r.value;a.debug("[EBNF Parser] Parsed rules:",n.rules.length),b(n),a.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:t}},db:t,renderer:r,styles:e};export{d as diagram};
|