pmx-canvas 0.9.3 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/extensions/pmx-canvas/runtime.json +1 -1
- package/.github/extensions/pmx-canvas/tools.json +9418 -2016
- package/CHANGELOG.md +54 -1
- package/dist/canvas/chunks/abnfDiagram-N423BO3Z-p8dtp6va.js +1 -0
- package/dist/canvas/chunks/architecture-TIHT7OUA-9tffvpsv.js +1 -0
- package/dist/canvas/chunks/architectureDiagram-T3A2C74G-5jhmxrzf.js +36 -0
- package/dist/canvas/chunks/blockDiagram-VBNYF7ZC-pw1fa9yb.js +132 -0
- package/dist/canvas/chunks/c4Diagram-5PPSVZJV-x07nq0tt.js +10 -0
- package/dist/canvas/chunks/classDiagram-JCYQIIEL-nc6g5x1r.js +1 -0
- package/dist/canvas/chunks/classDiagram-v2-OCEON4UE-0qnbpwvh.js +1 -0
- package/dist/canvas/chunks/cose-bilkent-JH36ORCC-nm39npq0.js +1 -0
- package/dist/canvas/chunks/cynefin-VYW2F7L2-ys8p46ts.js +1 -0
- package/dist/canvas/chunks/cynefinDiagram-MW4NZA55-vdxrwahz.js +62 -0
- package/dist/canvas/chunks/dagre-VZM6K2ZE-bqdm7wpd.js +4 -0
- package/dist/canvas/chunks/diagram-7IWD3JNH-gs5gpr93.js +30 -0
- package/dist/canvas/chunks/diagram-B4RE2ZJO-cgwjg47s.js +3 -0
- package/dist/canvas/chunks/diagram-LBJQPF4R-w3vahpav.js +24 -0
- package/dist/canvas/chunks/diagram-Q27KOJAE-42837z6h.js +24 -0
- package/dist/canvas/chunks/diagram-UB23O5K3-4fz83q59.js +41 -0
- package/dist/canvas/chunks/ebnfDiagram-BXEA7PRR-zphtgegj.js +1 -0
- package/dist/canvas/chunks/erDiagram-JOGREHBK-zvbbdxp4.js +85 -0
- package/dist/canvas/chunks/eventmodeling-45OFAUF4-v9q6dn4c.js +1 -0
- package/dist/canvas/chunks/flowDiagram-UKHOOZJN-yrr5z8tc.js +1 -0
- package/dist/canvas/chunks/ganttDiagram-PKOTCBZU-282jzycm.js +292 -0
- package/dist/canvas/chunks/gitGraph-TEB2WS4Q-kdwb8m0a.js +1 -0
- package/dist/canvas/chunks/gitGraphDiagram-DS77QQ5N-vqqy6p1b.js +106 -0
- package/dist/canvas/chunks/index-0rk4gp1g.js +2 -0
- package/dist/canvas/chunks/index-194m3hc3.js +2 -0
- package/dist/canvas/chunks/index-1r72hdzb.js +301 -0
- package/dist/canvas/chunks/index-353m7b0p.js +2 -0
- package/dist/canvas/chunks/index-3cy1bzwh.js +2 -0
- package/dist/canvas/chunks/index-5tv8v1hk.js +1 -0
- package/dist/canvas/chunks/index-6ceya556.js +332 -0
- package/dist/canvas/chunks/index-6qmsnxwy.js +4 -0
- package/dist/canvas/chunks/index-d3b3gqe9.js +2 -0
- package/dist/canvas/chunks/index-fjtdggjn.js +2 -0
- package/dist/canvas/chunks/index-g3pwnqeb.js +2 -0
- package/dist/canvas/chunks/index-gf4e0et4.js +2 -0
- package/dist/canvas/chunks/index-hj99nz1f.js +1 -0
- package/dist/canvas/chunks/index-nprm96xp.js +16 -0
- package/dist/canvas/chunks/index-qj8fxwsf.js +2 -0
- package/dist/canvas/chunks/index-r2fyc9w1.js +89 -0
- package/dist/canvas/chunks/index-rft2hcz5.js +2 -0
- package/dist/canvas/chunks/index-rh7nv68n.js +2 -0
- package/dist/canvas/chunks/index-s4j678gj.js +2 -0
- package/dist/canvas/chunks/index-tb1wf525.js +179 -0
- package/dist/canvas/chunks/index-vv56h019.js +2 -0
- package/dist/canvas/chunks/index-w2mra17t.js +207 -0
- package/dist/canvas/chunks/index-wgv7en21.js +232 -0
- package/dist/canvas/chunks/index-yw8h9vha.js +157 -0
- package/dist/canvas/chunks/info-DKCQHKI2-wpzs6sz3.js +1 -0
- package/dist/canvas/chunks/infoDiagram-6WML65LV-v1yvggqj.js +2 -0
- package/dist/canvas/chunks/ishikawaDiagram-WSZJBQD7-5hnq1a9p.js +70 -0
- package/dist/canvas/chunks/journeyDiagram-NVQOT4AX-zjcffveh.js +139 -0
- package/dist/canvas/chunks/kanban-definition-27J2QSJJ-dakqtfp1.js +89 -0
- package/dist/canvas/chunks/katex-dmg8k4zm.js +257 -0
- package/dist/canvas/chunks/mermaid.core-j2geswrd.js +12 -0
- package/dist/canvas/chunks/mindmap-definition-FAOFIHXS-142xhr3k.js +96 -0
- package/dist/canvas/chunks/packet-7NZHBO7P-xn439f0s.js +1 -0
- package/dist/canvas/chunks/pegDiagram-VL7TDLO6-5wvk7vsd.js +1 -0
- package/dist/canvas/chunks/pie-RZYD4A2V-0kf16rwh.js +1 -0
- package/dist/canvas/chunks/pieDiagram-7S7Q4E2Y-ztdhwycc.js +39 -0
- package/dist/canvas/chunks/quadrantDiagram-CIZ2JOQS-c5p9gmg6.js +7 -0
- package/dist/canvas/chunks/radar-I7S5WNFK-0g2pz36t.js +1 -0
- package/dist/canvas/chunks/railroad-3IZDKUUU-fcaran6j.js +1 -0
- package/dist/canvas/chunks/railroad-abnf-AHOZXSZD-wgdya41q.js +1 -0
- package/dist/canvas/chunks/railroad-ebnf-EBAXGLYW-gy07a4ka.js +1 -0
- package/dist/canvas/chunks/railroad-peg-LSFZ7HO6-ewk6wtkh.js +1 -0
- package/dist/canvas/chunks/railroadDiagram-AXF67PYL-xkmqkjwf.js +1 -0
- package/dist/canvas/chunks/requirementDiagram-LRYGKXZP-9wm2dyaw.js +84 -0
- package/dist/canvas/chunks/sankeyDiagram-W5VNT64P-2w19etgb.js +40 -0
- package/dist/canvas/chunks/sequenceDiagram-SI44F4Z6-0jn0vwmz.js +162 -0
- package/dist/canvas/chunks/sizeCapture-X5ZJPWSS-x75epwdq.js +1 -0
- package/dist/canvas/chunks/stateDiagram-OKZ733FA-schjpy6d.js +1 -0
- package/dist/canvas/chunks/stateDiagram-v2-UEYNNEHI-k8sfp2e7.js +1 -0
- package/dist/canvas/chunks/swimlanes-SLNWSIFB-gkw4xce3.js +1 -0
- package/dist/canvas/chunks/swimlanesDiagram-ULZ7WXOC-nqysw67j.js +8 -0
- package/dist/canvas/chunks/timeline-definition-Z64GVDOM-x7nkcy01.js +120 -0
- package/dist/canvas/chunks/treeView-QDETBFTQ-cesw6gp0.js +1 -0
- package/dist/canvas/chunks/treemap-6X3UGDF4-zdv4knp9.js +1 -0
- package/dist/canvas/chunks/vennDiagram-T6HMQDX7-x8dqn9yf.js +34 -0
- package/dist/canvas/chunks/wardley-OPB4EBWU-44pdddez.js +1 -0
- package/dist/canvas/chunks/wardleyDiagram-T6FBY63Y-t1j52t9r.js +78 -0
- package/dist/canvas/chunks/xychartDiagram-ELKLHX3M-38t16pme.js +7 -0
- package/dist/canvas/global.css +389 -229
- package/dist/canvas/index.js +141 -211
- package/dist/canvas/mcp-app.html +4205 -554
- package/dist/canvas/mermaid-entry.js +338 -338
- package/dist/canvas/surface-theme.css +6 -6
- package/dist/json-render/index.css +1 -1
- package/dist/json-render/index.js +49 -49
- package/dist/types/client/canvas/BarHint.d.ts +5 -3
- package/dist/types/client/canvas/CanvasNode.d.ts +0 -11
- package/dist/types/client/canvas/EdgeLayer.d.ts +1 -2
- package/dist/types/client/canvas/auto-fit.d.ts +4 -5
- package/dist/types/client/mermaid-entry.d.ts +1 -2
- package/dist/types/client/mermaid-render.d.ts +1 -0
- package/dist/types/client/nodes/BoardNode.d.ts +1 -1
- package/dist/types/client/nodes/ExtAppFrame.d.ts +7 -90
- package/dist/types/client/nodes/McpAppNode.d.ts +1 -25
- package/dist/types/client/nodes/MermaidNode.d.ts +1 -8
- package/dist/types/client/nodes/ViewerFrame.d.ts +29 -0
- package/dist/types/client/nodes/ViewerHost.d.ts +6 -0
- package/dist/types/client/nodes/iframe-document-url.d.ts +3 -9
- package/dist/types/client/nodes/primitive-copy.d.ts +5 -0
- package/dist/types/client/nodes/use-iframe-content-height.d.ts +1 -1
- package/dist/types/client/nodes/use-surface-frame.d.ts +4 -6
- package/dist/types/client/nodes/viewer-runtime-state.d.ts +2 -1
- package/dist/types/client/state/canvas-store.d.ts +3 -1
- package/dist/types/client/state/intent-bridge.d.ts +1 -0
- package/dist/types/client/state/presentation.d.ts +17 -6
- package/dist/types/json-render/server.d.ts +2 -1
- package/dist/types/mcp/canvas-access.d.ts +1 -12
- package/dist/types/mcp/resource-subscriptions.d.ts +7 -0
- package/dist/types/mcp/server.d.ts +2 -0
- package/dist/types/server/ax-wait.d.ts +1 -0
- package/dist/types/server/canvas-operations.d.ts +1 -0
- package/dist/types/server/canvas-state.d.ts +2 -0
- package/dist/types/server/index.d.ts +11 -6
- package/dist/types/server/operations/http.d.ts +10 -0
- package/dist/types/server/operations/index.d.ts +2 -2
- package/dist/types/server/operations/invoker.d.ts +4 -3
- package/dist/types/server/operations/mcp-contracts.d.ts +20 -0
- package/dist/types/server/operations/mcp.d.ts +2 -0
- package/dist/types/server/operations/ops/batch.d.ts +1 -0
- package/dist/types/server/operations/ops/boards.d.ts +0 -1
- package/dist/types/server/operations/registry.d.ts +2 -2
- package/dist/types/server/operations/types.d.ts +12 -2
- package/dist/types/server/server.d.ts +2 -0
- package/dist/types/server/tour-control.d.ts +13 -3
- package/dist/types/server/webpage-node.d.ts +1 -0
- package/dist/types/shared/ax-surface-protocol.d.ts +0 -9
- package/dist/types/shared/tour.d.ts +8 -0
- package/docs/api-reference.md +2 -2
- package/docs/cli.md +1 -1
- package/docs/design/Chrome.dc.html +32 -6
- package/docs/design/Types1.dc.html +3 -2
- package/docs/design/Types2.dc.html +1 -1
- package/docs/design/Types3.dc.html +1 -1
- package/docs/design/Zoom.dc.html +37 -60
- package/docs/design/canvas.json +1 -1
- package/docs/design.md +169 -4
- package/docs/http-api.md +82 -1
- package/docs/mcp.md +101 -21
- package/docs/node-types.md +38 -3
- package/docs/plans/plan-009-tech-debt-backlog.md +2 -2
- package/docs/plans/plan-019-post-0.9-roadmap.md +402 -13
- package/docs/product-vision-2026-09.md +9 -0
- package/docs/sdk.md +5 -2
- package/package.json +2 -2
- package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/plugin.json +1 -1
- package/plugins/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/tools.json +9418 -2016
- package/skills/pmx-canvas/SKILL.md +19 -21
- package/skills/pmx-canvas/references/full-reference.md +44 -6
- package/skills/pmx-canvas/references/installing-pmx-canvas.md +7 -7
- package/skills/published-consumer-e2e/scripts/run-published-consumer-e2e.sh +3 -5
- package/src/client/canvas/BarHint.tsx +6 -3
- package/src/client/canvas/CanvasNode.tsx +34 -47
- package/src/client/canvas/CanvasViewport.tsx +6 -7
- package/src/client/canvas/ContextMenu.tsx +63 -3
- package/src/client/canvas/EdgeLayer.tsx +365 -169
- package/src/client/canvas/ExpandedNodeOverlay.tsx +1 -2
- package/src/client/canvas/Presentation.tsx +53 -3
- package/src/client/canvas/ToolRail.tsx +2 -0
- package/src/client/canvas/TopBar.tsx +24 -9
- package/src/client/canvas/auto-fit.ts +9 -11
- package/src/client/canvas/canvas-area.ts +1 -1
- package/src/client/canvas/use-focus-trap.ts +6 -1
- package/src/client/mermaid-entry.ts +6 -20
- package/src/client/mermaid-render.ts +39 -0
- package/src/client/nodes/AxStepControls.tsx +45 -69
- package/src/client/nodes/BoardNode.tsx +65 -9
- package/src/client/nodes/ContextNode.tsx +88 -396
- package/src/client/nodes/ExtAppFrame.tsx +283 -1462
- package/src/client/nodes/FileNode.tsx +92 -81
- package/src/client/nodes/HtmlNode.tsx +8 -36
- package/src/client/nodes/LedgerNode.tsx +31 -17
- package/src/client/nodes/MarkdownNode.tsx +8 -17
- package/src/client/nodes/McpAppNode.tsx +48 -154
- package/src/client/nodes/MermaidNode.tsx +80 -69
- package/src/client/nodes/PromptNode.tsx +12 -14
- package/src/client/nodes/ResponseNode.tsx +8 -6
- package/src/client/nodes/StatusNode.tsx +22 -7
- package/src/client/nodes/StatusSummary.tsx +5 -3
- package/src/client/nodes/TraceNode.tsx +8 -8
- package/src/client/nodes/ViewerFrame.tsx +262 -0
- package/src/client/nodes/ViewerHost.tsx +41 -0
- package/src/client/nodes/WebpageNode.tsx +22 -24
- package/src/client/nodes/iframe-document-url.ts +20 -27
- package/src/client/nodes/primitive-copy.ts +97 -0
- package/src/client/nodes/use-iframe-content-height.ts +34 -10
- package/src/client/nodes/use-surface-frame.ts +22 -11
- package/src/client/nodes/viewer-runtime-state.ts +41 -35
- package/src/client/state/canvas-store.ts +18 -12
- package/src/client/state/intent-bridge.ts +1 -0
- package/src/client/state/presentation.ts +135 -15
- package/src/client/state/sse-bridge.ts +18 -19
- package/src/client/theme/global.css +389 -229
- package/src/client/theme/surface-theme.css +6 -6
- package/src/json-render/charts/tufte-components.tsx +44 -2
- package/src/json-render/renderer/index.css +62 -2
- package/src/json-render/renderer/index.tsx +31 -7
- package/src/json-render/server.ts +3 -2
- package/src/mcp/canvas-access.ts +6 -47
- package/src/mcp/resource-subscriptions.ts +181 -0
- package/src/mcp/server.ts +185 -219
- package/src/server/ax-wait.ts +21 -6
- package/src/server/board-export.ts +35 -24
- package/src/server/canvas-geometry.ts +1 -0
- package/src/server/canvas-operations.ts +6 -2
- package/src/server/canvas-state.ts +5 -0
- package/src/server/demo-state.json +106 -100
- package/src/server/html-primitives.ts +3 -9
- package/src/server/html-surface.ts +8 -0
- package/src/server/index.ts +30 -12
- package/src/server/operations/http.ts +69 -21
- package/src/server/operations/index.ts +8 -1
- package/src/server/operations/invoker.ts +53 -5
- package/src/server/operations/mcp-contracts.ts +354 -0
- package/src/server/operations/mcp.ts +153 -18
- package/src/server/operations/ops/ax-await.ts +18 -10
- package/src/server/operations/ops/ax-read.ts +2 -0
- package/src/server/operations/ops/ax-timeline.ts +2 -2
- package/src/server/operations/ops/batch.ts +27 -8
- package/src/server/operations/ops/boards.ts +1 -3
- package/src/server/operations/ops/nodes.ts +18 -3
- package/src/server/operations/ops/viewport.ts +11 -9
- package/src/server/operations/registry.ts +24 -4
- package/src/server/operations/types.ts +16 -2
- package/src/server/server.ts +17 -59
- package/src/server/tour-control.ts +66 -6
- package/src/server/webpage-node.ts +9 -4
- package/src/shared/ax-surface-protocol.ts +0 -11
- package/src/shared/content-height-reporter.ts +4 -3
- package/src/shared/tour.ts +8 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import{Cr,T}from"./index-6qmsnxwy.js";var ot={};Cr(ot,{AbnfAlternation:()=>du,AbnfConcatenation:()=>pu,AbnfElement:()=>Ks,AbnfGroup:()=>mu,AbnfNumVal:()=>hu,AbnfOptionalGroup:()=>yu,AbnfPrimary:()=>sn,AbnfRule:()=>Vs,AbnfRuleName:()=>gu,AbnfStringLiteral:()=>vu,AbstractMermaidTokenBuilder:()=>pe,AbstractMermaidValueConverter:()=>ze,Architecture:()=>Lt,ArchitectureGrammarGeneratedModule:()=>tf,Branch:()=>vi,Commit:()=>cn,CommonTokenBuilder:()=>PI,CommonValueConverter:()=>bt,Cynefin:()=>Or,CynefinGrammarGeneratedModule:()=>rf,DomainBlock:()=>Ti,DomainItem:()=>yo,EbnfChoice:()=>Tu,EbnfExceptionPostfix:()=>$u,EbnfGroup:()=>Ru,EbnfNonTerminal:()=>Au,EbnfOneOrMorePostfix:()=>Eu,EbnfOptional:()=>Cu,EbnfOptionalPostfix:()=>bu,EbnfPostfix:()=>Xn,EbnfPrimary:()=>Nr,EbnfRepetition:()=>_u,EbnfRule:()=>Ws,EbnfSequence:()=>Su,EbnfSpecial:()=>wu,EbnfTerm:()=>qs,EbnfTerminal:()=>Iu,EbnfZeroOrMorePostfix:()=>Nu,EmDataEntity:()=>on,EmFrame:()=>Pr,EmptyFileSystem:()=>le,EventModel:()=>Kt,EventModelingGeneratedModule:()=>nf,GitGraph:()=>Mr,GitGraphGrammarGeneratedModule:()=>af,Info:()=>na,InfoGrammarGeneratedModule:()=>sf,Merge:()=>fn,MermaidGeneratedSharedModule:()=>ue,Packet:()=>dn,PacketBlock:()=>pn,PacketGrammarGeneratedModule:()=>of,PegAny:()=>Pu,PegGroup:()=>ku,PegIdentifier:()=>Ou,PegLiteral:()=>Lu,PegOrderedChoice:()=>Mu,PegPrefix:()=>Hs,PegPrimary:()=>Jn,PegRule:()=>Ys,PegSequence:()=>Du,PegSuffix:()=>Xs,Pie:()=>Dr,PieGrammarGeneratedModule:()=>lf,PieSection:()=>$i,Radar:()=>kr,RadarGrammarGeneratedModule:()=>uf,Railroad:()=>mn,RailroadAbnf:()=>hn,RailroadAbnfGrammarGeneratedModule:()=>cf,RailroadChoiceExpr:()=>xu,RailroadEbnf:()=>yn,RailroadEbnfGrammarGeneratedModule:()=>ff,RailroadExpression:()=>Vt,RailroadGrammarGeneratedModule:()=>df,RailroadNonTerminalExpr:()=>Gu,RailroadOneOrMoreExpr:()=>Fu,RailroadOptionalExpr:()=>zu,RailroadPeg:()=>gn,RailroadPegGrammarGeneratedModule:()=>pf,RailroadRule:()=>Js,RailroadSequenceExpr:()=>ju,RailroadSpecialExpr:()=>Bu,RailroadTerminalExpr:()=>Uu,RailroadZeroOrMoreExpr:()=>Ku,Statement:()=>ln,Transition:()=>aa,TreeNode:()=>un,TreeView:()=>Zn,TreeViewGrammarGeneratedModule:()=>hf,Treemap:()=>vn,TreemapGrammarGeneratedModule:()=>mf,Wardley:()=>He,WardleyGrammarGeneratedModule:()=>yf,__name:()=>i,createDefaultCoreModule:()=>ae,createDefaultSharedCoreModule:()=>ie,inject:()=>W,isArchitecture:()=>Ey,isBranch:()=>Cy,isCommit:()=>by,isCynefin:()=>_y,isDomainBlock:()=>Sy,isDomainItem:()=>wy,isEmModelEntityType:()=>Iy,isEmResetFrame:()=>Lr,isGitGraph:()=>Ny,isInfo:()=>Py,isMerge:()=>ky,isPacket:()=>Oy,isPacketBlock:()=>Ly,isPie:()=>My,isPieSection:()=>Dy,isRailroad:()=>xy,isRailroadAbnf:()=>Gy,isRailroadEbnf:()=>Fy,isRailroadPeg:()=>zy,isTransition:()=>jy,isTreemap:()=>By,isWardley:()=>Uy,lib_exports:()=>Qe});var{create:nN,defineProperty:go,getOwnPropertyDescriptor:aN,getOwnPropertyNames:Gp,getPrototypeOf:iN}=Object,sN=Object.prototype.hasOwnProperty,i=(e,t)=>go(e,"name",{value:t,configurable:!0}),oN=(e,t)=>function(){return e&&(t=(0,e[Gp(e)[0]])(e=0)),t},Z=(e,t)=>function(){return t||(0,e[Gp(e)[0]])((t={exports:{}}).exports,t),t.exports},Cn=(e,t)=>{for(var r in t)go(e,r,{get:t[r],enumerable:!0})},Cl=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let a of Gp(t))if(!sN.call(e,a)&&a!==r)go(e,a,{get:()=>t[a],enumerable:!(n=aN(t,a))||n.enumerable})}return e},Vu=(e,t,r)=>(Cl(e,t,"default"),r&&Cl(r,t,"default")),Fp=(e,t,r)=>(r=e!=null?nN(iN(e)):{},Cl(t||!e||!e.__esModule?go(r,"default",{value:e,enumerable:!0}):r,e)),zp=(e)=>Cl(go({},"__esModule",{value:!0}),e),Wu={};Cn(Wu,{AnnotatedTextEdit:()=>_r,ChangeAnnotation:()=>On,ChangeAnnotationIdentifier:()=>tt,CodeAction:()=>Td,CodeActionContext:()=>vd,CodeActionKind:()=>gd,CodeActionTriggerKind:()=>Es,CodeDescription:()=>Yf,CodeLens:()=>$d,Color:()=>il,ColorInformation:()=>Uf,ColorPresentation:()=>Kf,Command:()=>kn,CompletionItem:()=>id,CompletionItemKind:()=>Qf,CompletionItemLabelDetails:()=>ad,CompletionItemTag:()=>td,CompletionList:()=>sd,CreateFile:()=>Ua,DeleteFile:()=>Va,Diagnostic:()=>Ts,DiagnosticRelatedInformation:()=>sl,DiagnosticSeverity:()=>qf,DiagnosticTag:()=>Hf,DocumentHighlight:()=>fd,DocumentHighlightKind:()=>cd,DocumentLink:()=>Ad,DocumentSymbol:()=>yd,DocumentUri:()=>zf,EOL:()=>xv,FoldingRange:()=>Wf,FoldingRangeKind:()=>Vf,FormattingOptions:()=>Rd,Hover:()=>od,InlayHint:()=>Pd,InlayHintKind:()=>ul,InlayHintLabelPart:()=>cl,InlineCompletionContext:()=>xd,InlineCompletionItem:()=>Od,InlineCompletionList:()=>Ld,InlineCompletionTriggerKind:()=>Md,InlineValueContext:()=>Nd,InlineValueEvaluatableExpression:()=>Id,InlineValueText:()=>Sd,InlineValueVariableLookup:()=>wd,InsertReplaceEdit:()=>rd,InsertTextFormat:()=>ed,InsertTextMode:()=>nd,Location:()=>vs,LocationLink:()=>Bf,MarkedString:()=>As,MarkupContent:()=>Wa,MarkupKind:()=>ll,OptionalVersionedTextDocumentIdentifier:()=>Rs,ParameterInformation:()=>ld,Position:()=>de,Range:()=>ne,RenameFile:()=>Ka,SelectedCompletionInfo:()=>Dd,SelectionRange:()=>Ed,SemanticTokenModifiers:()=>bd,SemanticTokenTypes:()=>Cd,SemanticTokens:()=>_d,SignatureInformation:()=>ud,StringValue:()=>kd,SymbolInformation:()=>md,SymbolKind:()=>dd,SymbolTag:()=>pd,TextDocument:()=>Fd,TextDocumentEdit:()=>$s,TextDocumentIdentifier:()=>Xf,TextDocumentItem:()=>Zf,TextEdit:()=>cr,URI:()=>al,VersionedTextDocumentIdentifier:()=>Jf,WorkspaceChange:()=>Dv,WorkspaceEdit:()=>ol,WorkspaceFolder:()=>Gd,WorkspaceSymbol:()=>hd,integer:()=>jf,uinteger:()=>gs});var zf,al,jf,gs,de,ne,vs,Bf,il,Uf,Kf,Vf,Wf,sl,qf,Hf,Yf,Ts,kn,cr,On,tt,_r,$s,Ua,Ka,Va,ol,ls,vf,Dv,Xf,Jf,Rs,Zf,ll,Wa,Qf,ed,td,rd,nd,ad,id,sd,As,od,ld,ud,cd,fd,dd,pd,md,hd,yd,gd,Es,vd,Td,$d,Rd,Ad,Ed,Cd,bd,_d,Sd,wd,Id,Nd,ul,cl,Pd,kd,Od,Ld,Md,Dd,xd,Gd,xv,Fd,Vy,b,vo=oN({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(r){return typeof r==="string"}i(t,"is"),e.is=t})(zf||(zf={})),function(e){function t(r){return typeof r==="string"}i(t,"is"),e.is=t}(al||(al={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r==="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t}(jf||(jf={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r==="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}i(t,"is"),e.is=t}(gs||(gs={})),function(e){function t(n,a){if(n===Number.MAX_VALUE)n=gs.MAX_VALUE;if(a===Number.MAX_VALUE)a=gs.MAX_VALUE;return{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return b.objectLiteral(a)&&b.uinteger(a.line)&&b.uinteger(a.character)}i(r,"is"),e.is=r}(de||(de={})),function(e){function t(n,a,s,o){if(b.uinteger(n)&&b.uinteger(a)&&b.uinteger(s)&&b.uinteger(o))return{start:de.create(n,a),end:de.create(s,o)};else if(de.is(n)&&de.is(a))return{start:n,end:a};else throw Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return b.objectLiteral(a)&&de.is(a.start)&&de.is(a.end)}i(r,"is"),e.is=r}(ne||(ne={})),function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return b.objectLiteral(a)&&ne.is(a.range)&&(b.string(a.uri)||b.undefined(a.uri))}i(r,"is"),e.is=r}(vs||(vs={})),function(e){function t(n,a,s,o){return{targetUri:n,targetRange:a,targetSelectionRange:s,originSelectionRange:o}}i(t,"create"),e.create=t;function r(n){let a=n;return b.objectLiteral(a)&&ne.is(a.targetRange)&&b.string(a.targetUri)&&ne.is(a.targetSelectionRange)&&(ne.is(a.originSelectionRange)||b.undefined(a.originSelectionRange))}i(r,"is"),e.is=r}(Bf||(Bf={})),function(e){function t(n,a,s,o){return{red:n,green:a,blue:s,alpha:o}}i(t,"create"),e.create=t;function r(n){let a=n;return b.objectLiteral(a)&&b.numberRange(a.red,0,1)&&b.numberRange(a.green,0,1)&&b.numberRange(a.blue,0,1)&&b.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r}(il||(il={})),function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){let a=n;return b.objectLiteral(a)&&ne.is(a.range)&&il.is(a.color)}i(r,"is"),e.is=r}(Uf||(Uf={})),function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){let a=n;return b.objectLiteral(a)&&b.string(a.label)&&(b.undefined(a.textEdit)||cr.is(a))&&(b.undefined(a.additionalTextEdits)||b.typedArray(a.additionalTextEdits,cr.is))}i(r,"is"),e.is=r}(Kf||(Kf={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(Vf||(Vf={})),function(e){function t(n,a,s,o,l,u){let c={startLine:n,endLine:a};if(b.defined(s))c.startCharacter=s;if(b.defined(o))c.endCharacter=o;if(b.defined(l))c.kind=l;if(b.defined(u))c.collapsedText=u;return c}i(t,"create"),e.create=t;function r(n){let a=n;return b.objectLiteral(a)&&b.uinteger(a.startLine)&&b.uinteger(a.startLine)&&(b.undefined(a.startCharacter)||b.uinteger(a.startCharacter))&&(b.undefined(a.endCharacter)||b.uinteger(a.endCharacter))&&(b.undefined(a.kind)||b.string(a.kind))}i(r,"is"),e.is=r}(Wf||(Wf={})),function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return b.defined(a)&&vs.is(a.location)&&b.string(a.message)}i(r,"is"),e.is=r}(sl||(sl={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(qf||(qf={})),function(e){e.Unnecessary=1,e.Deprecated=2}(Hf||(Hf={})),function(e){function t(r){let n=r;return b.objectLiteral(n)&&b.string(n.href)}i(t,"is"),e.is=t}(Yf||(Yf={})),function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};if(b.defined(s))c.severity=s;if(b.defined(o))c.code=o;if(b.defined(l))c.source=l;if(b.defined(u))c.relatedInformation=u;return c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return b.defined(s)&&ne.is(s.range)&&b.string(s.message)&&(b.number(s.severity)||b.undefined(s.severity))&&(b.integer(s.code)||b.string(s.code)||b.undefined(s.code))&&(b.undefined(s.codeDescription)||b.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(b.string(s.source)||b.undefined(s.source))&&(b.undefined(s.relatedInformation)||b.typedArray(s.relatedInformation,sl.is))}i(r,"is"),e.is=r}(Ts||(Ts={})),function(e){function t(n,a,...s){let o={title:n,command:a};if(b.defined(s)&&s.length>0)o.arguments=s;return o}i(t,"create"),e.create=t;function r(n){let a=n;return b.defined(a)&&b.string(a.title)&&b.string(a.command)}i(r,"is"),e.is=r}(kn||(kn={})),function(e){function t(s,o){return{range:s,newText:o}}i(t,"replace"),e.replace=t;function r(s,o){return{range:{start:s,end:s},newText:o}}i(r,"insert"),e.insert=r;function n(s){return{range:s,newText:""}}i(n,"del"),e.del=n;function a(s){let o=s;return b.objectLiteral(o)&&b.string(o.newText)&&ne.is(o.range)}i(a,"is"),e.is=a}(cr||(cr={})),function(e){function t(n,a,s){let o={label:n};if(a!==void 0)o.needsConfirmation=a;if(s!==void 0)o.description=s;return o}i(t,"create"),e.create=t;function r(n){let a=n;return b.objectLiteral(a)&&b.string(a.label)&&(b.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(b.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r}(On||(On={})),function(e){function t(r){let n=r;return b.string(n)}i(t,"is"),e.is=t}(tt||(tt={})),function(e){function t(s,o,l){return{range:s,newText:o,annotationId:l}}i(t,"replace"),e.replace=t;function r(s,o,l){return{range:{start:s,end:s},newText:o,annotationId:l}}i(r,"insert"),e.insert=r;function n(s,o){return{range:s,newText:"",annotationId:o}}i(n,"del"),e.del=n;function a(s){let o=s;return cr.is(o)&&(On.is(o.annotationId)||tt.is(o.annotationId))}i(a,"is"),e.is=a}(_r||(_r={})),function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return b.defined(a)&&Rs.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r}($s||($s={})),function(e){function t(n,a,s){let o={kind:"create",uri:n};if(a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0))o.options=a;if(s!==void 0)o.annotationId=s;return o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&b.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||b.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||b.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||tt.is(a.annotationId))}i(r,"is"),e.is=r}(Ua||(Ua={})),function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};if(s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0))l.options=s;if(o!==void 0)l.annotationId=o;return l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&b.string(a.oldUri)&&b.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||b.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||b.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||tt.is(a.annotationId))}i(r,"is"),e.is=r}(Ka||(Ka={})),function(e){function t(n,a,s){let o={kind:"delete",uri:n};if(a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0))o.options=a;if(s!==void 0)o.annotationId=s;return o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&b.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||b.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||b.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||tt.is(a.annotationId))}i(r,"is"),e.is=r}(Va||(Va={})),function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every((a)=>{if(b.string(a.kind))return Ua.is(a)||Ka.is(a)||Va.is(a);else return $s.is(a)}))}i(t,"is"),e.is=t}(ol||(ol={})),ls=class{static{i(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,a;if(r===void 0)n=cr.insert(e,t);else if(tt.is(r))a=r,n=_r.insert(e,t,r);else this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=_r.insert(e,t,a);if(this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0)n=cr.replace(e,t);else if(tt.is(r))a=r,n=_r.replace(e,t,r);else this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=_r.replace(e,t,a);if(this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0)r=cr.del(e);else if(tt.is(t))n=t,r=_r.del(e,t);else this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=_r.del(e,n);if(this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw Error("Text edit change is not configured to manage change annotations.")}},vf=class{static{i(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(tt.is(e))r=e;else r=this.nextId(),t=e;if(this._annotations[r]!==void 0)throw Error(`Id ${r} is already in use.`);if(t===void 0)throw Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Dv=class{static{i(this,"WorkspaceChange")}constructor(e){if(this._textEditChanges=Object.create(null),e!==void 0){if(this._workspaceEdit=e,e.documentChanges)this._changeAnnotations=new vf(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((t)=>{if($s.is(t)){let r=new ls(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}});else if(e.changes)Object.keys(e.changes).forEach((t)=>{let r=new ls(e.changes[t]);this._textEditChanges[t]=r})}else this._workspaceEdit={}}get edit(){if(this.initDocumentChanges(),this._changeAnnotations!==void 0)if(this._changeAnnotations.size===0)this._workspaceEdit.changeAnnotations=void 0;else this._workspaceEdit.changeAnnotations=this._changeAnnotations.all();return this._workspaceEdit}getTextEditChange(e){if(Rs.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error("Workspace edit is not configured for document changes.");let t={uri:e.uri,version:e.version},r=this._textEditChanges[t.uri];if(!r){let n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new ls(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new ls(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){if(this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0)this._changeAnnotations=new vf,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()}initChanges(){if(this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0)this._workspaceEdit.changes=Object.create(null)}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error("Workspace edit is not configured for document changes.");let n;if(On.is(t)||tt.is(t))n=t;else r=t;let a,s;if(n===void 0)a=Ua.create(e,r);else s=tt.is(n)?n:this._changeAnnotations.manage(n),a=Ua.create(e,r,s);if(this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error("Workspace edit is not configured for document changes.");let a;if(On.is(r)||tt.is(r))a=r;else n=r;let s,o;if(a===void 0)s=Ka.create(e,t,n);else o=tt.is(a)?a:this._changeAnnotations.manage(a),s=Ka.create(e,t,n,o);if(this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error("Workspace edit is not configured for document changes.");let n;if(On.is(t)||tt.is(t))n=t;else r=t;let a,s;if(n===void 0)a=Va.create(e,r);else s=tt.is(n)?n:this._changeAnnotations.manage(n),a=Va.create(e,r,s);if(this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}},function(e){function t(n){return{uri:n}}i(t,"create"),e.create=t;function r(n){let a=n;return b.defined(a)&&b.string(a.uri)}i(r,"is"),e.is=r}(Xf||(Xf={})),function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return b.defined(a)&&b.string(a.uri)&&b.integer(a.version)}i(r,"is"),e.is=r}(Jf||(Jf={})),function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return b.defined(a)&&b.string(a.uri)&&(a.version===null||b.integer(a.version))}i(r,"is"),e.is=r}(Rs||(Rs={})),function(e){function t(n,a,s,o){return{uri:n,languageId:a,version:s,text:o}}i(t,"create"),e.create=t;function r(n){let a=n;return b.defined(a)&&b.string(a.uri)&&b.string(a.languageId)&&b.integer(a.version)&&b.string(a.text)}i(r,"is"),e.is=r}(Zf||(Zf={})),function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){let n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t}(ll||(ll={})),function(e){function t(r){let n=r;return b.objectLiteral(r)&&ll.is(n.kind)&&b.string(n.value)}i(t,"is"),e.is=t}(Wa||(Wa={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(Qf||(Qf={})),function(e){e.PlainText=1,e.Snippet=2}(ed||(ed={})),function(e){e.Deprecated=1}(td||(td={})),function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){let a=n;return a&&b.string(a.newText)&&ne.is(a.insert)&&ne.is(a.replace)}i(r,"is"),e.is=r}(rd||(rd={})),function(e){e.asIs=1,e.adjustIndentation=2}(nd||(nd={})),function(e){function t(r){let n=r;return n&&(b.string(n.detail)||n.detail===void 0)&&(b.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t}(ad||(ad={})),function(e){function t(r){return{label:r}}i(t,"create"),e.create=t}(id||(id={})),function(e){function t(r,n){return{items:r?r:[],isIncomplete:!!n}}i(t,"create"),e.create=t}(sd||(sd={})),function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){let a=n;return b.string(a)||b.objectLiteral(a)&&b.string(a.language)&&b.string(a.value)}i(r,"is"),e.is=r}(As||(As={})),function(e){function t(r){let n=r;return!!n&&b.objectLiteral(n)&&(Wa.is(n.contents)||As.is(n.contents)||b.typedArray(n.contents,As.is))&&(r.range===void 0||ne.is(r.range))}i(t,"is"),e.is=t}(od||(od={})),function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t}(ld||(ld={})),function(e){function t(r,n,...a){let s={label:r};if(b.defined(n))s.documentation=n;if(b.defined(a))s.parameters=a;else s.parameters=[];return s}i(t,"create"),e.create=t}(ud||(ud={})),function(e){e.Text=1,e.Read=2,e.Write=3}(cd||(cd={})),function(e){function t(r,n){let a={range:r};if(b.number(n))a.kind=n;return a}i(t,"create"),e.create=t}(fd||(fd={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(dd||(dd={})),function(e){e.Deprecated=1}(pd||(pd={})),function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};if(o)l.containerName=o;return l}i(t,"create"),e.create=t}(md||(md={})),function(e){function t(r,n,a,s){return s!==void 0?{name:r,kind:n,location:{uri:a,range:s}}:{name:r,kind:n,location:{uri:a}}}i(t,"create"),e.create=t}(hd||(hd={})),function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};if(u!==void 0)c.children=u;return c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&b.string(a.name)&&b.number(a.kind)&&ne.is(a.range)&&ne.is(a.selectionRange)&&(a.detail===void 0||b.string(a.detail))&&(a.deprecated===void 0||b.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}i(r,"is"),e.is=r}(yd||(yd={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(gd||(gd={})),function(e){e.Invoked=1,e.Automatic=2}(Es||(Es={})),function(e){function t(n,a,s){let o={diagnostics:n};if(a!==void 0&&a!==null)o.only=a;if(s!==void 0&&s!==null)o.triggerKind=s;return o}i(t,"create"),e.create=t;function r(n){let a=n;return b.defined(a)&&b.typedArray(a.diagnostics,Ts.is)&&(a.only===void 0||b.typedArray(a.only,b.string))&&(a.triggerKind===void 0||a.triggerKind===Es.Invoked||a.triggerKind===Es.Automatic)}i(r,"is"),e.is=r}(vd||(vd={})),function(e){function t(n,a,s){let o={title:n},l=!0;if(typeof a==="string")l=!1,o.kind=a;else if(kn.is(a))o.command=a;else o.edit=a;if(l&&s!==void 0)o.kind=s;return o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&b.string(a.title)&&(a.diagnostics===void 0||b.typedArray(a.diagnostics,Ts.is))&&(a.kind===void 0||b.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||kn.is(a.command))&&(a.isPreferred===void 0||b.boolean(a.isPreferred))&&(a.edit===void 0||ol.is(a.edit))}i(r,"is"),e.is=r}(Td||(Td={})),function(e){function t(n,a){let s={range:n};if(b.defined(a))s.data=a;return s}i(t,"create"),e.create=t;function r(n){let a=n;return b.defined(a)&&ne.is(a.range)&&(b.undefined(a.command)||kn.is(a.command))}i(r,"is"),e.is=r}($d||($d={})),function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return b.defined(a)&&b.uinteger(a.tabSize)&&b.boolean(a.insertSpaces)}i(r,"is"),e.is=r}(Rd||(Rd={})),function(e){function t(n,a,s){return{range:n,target:a,data:s}}i(t,"create"),e.create=t;function r(n){let a=n;return b.defined(a)&&ne.is(a.range)&&(b.undefined(a.target)||b.string(a.target))}i(r,"is"),e.is=r}(Ad||(Ad={})),function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return b.objectLiteral(a)&&ne.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r}(Ed||(Ed={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(Cd||(Cd={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(bd||(bd={})),function(e){function t(r){let n=r;return b.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId==="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]==="number")}i(t,"is"),e.is=t}(_d||(_d={})),function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){let a=n;return a!==void 0&&a!==null&&ne.is(a.range)&&b.string(a.text)}i(r,"is"),e.is=r}(Sd||(Sd={})),function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){let a=n;return a!==void 0&&a!==null&&ne.is(a.range)&&b.boolean(a.caseSensitiveLookup)&&(b.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r}(wd||(wd={})),function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){let a=n;return a!==void 0&&a!==null&&ne.is(a.range)&&(b.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r}(Id||(Id={})),function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){let a=n;return b.defined(a)&&ne.is(n.stoppedLocation)}i(r,"is"),e.is=r}(Nd||(Nd={})),function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t}(ul||(ul={})),function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){let a=n;return b.objectLiteral(a)&&(a.tooltip===void 0||b.string(a.tooltip)||Wa.is(a.tooltip))&&(a.location===void 0||vs.is(a.location))&&(a.command===void 0||kn.is(a.command))}i(r,"is"),e.is=r}(cl||(cl={})),function(e){function t(n,a,s){let o={position:n,label:a};if(s!==void 0)o.kind=s;return o}i(t,"create"),e.create=t;function r(n){let a=n;return b.objectLiteral(a)&&de.is(a.position)&&(b.string(a.label)||b.typedArray(a.label,cl.is))&&(a.kind===void 0||ul.is(a.kind))&&a.textEdits===void 0||b.typedArray(a.textEdits,cr.is)&&(a.tooltip===void 0||b.string(a.tooltip)||Wa.is(a.tooltip))&&(a.paddingLeft===void 0||b.boolean(a.paddingLeft))&&(a.paddingRight===void 0||b.boolean(a.paddingRight))}i(r,"is"),e.is=r}(Pd||(Pd={})),function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t}(kd||(kd={})),function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t}(Od||(Od={})),function(e){function t(r){return{items:r}}i(t,"create"),e.create=t}(Ld||(Ld={})),function(e){e.Invoked=0,e.Automatic=1}(Md||(Md={})),function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t}(Dd||(Dd={})),function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t}(xd||(xd={})),function(e){function t(r){let n=r;return b.objectLiteral(n)&&al.is(n.uri)&&b.string(n.name)}i(t,"is"),e.is=t}(Gd||(Gd={})),xv=[`
|
|
2
|
+
`,`\r
|
|
3
|
+
`,"\r"],function(e){function t(s,o,l,u){return new Vy(s,o,l,u)}i(t,"create"),e.create=t;function r(s){let o=s;return b.defined(o)&&b.string(o.uri)&&(b.undefined(o.languageId)||b.string(o.languageId))&&b.uinteger(o.lineCount)&&b.func(o.getText)&&b.func(o.positionAt)&&b.func(o.offsetAt)?!0:!1}i(r,"is"),e.is=r;function n(s,o){let l=s.getText(),u=a(o,(f,d)=>{let m=f.range.start.line-d.range.start.line;if(m===0)return f.range.start.character-d.range.start.character;return m}),c=l.length;for(let f=u.length-1;f>=0;f--){let d=u[f],m=s.offsetAt(d.range.start),g=s.offsetAt(d.range.end);if(g<=c)l=l.substring(0,m)+d.newText+l.substring(g,l.length);else throw Error("Overlapping edit");c=m}return l}i(n,"applyEdits"),e.applyEdits=n;function a(s,o){if(s.length<=1)return s;let l=s.length/2|0,u=s.slice(0,l),c=s.slice(l);a(u,o),a(c,o);let f=0,d=0,m=0;while(f<u.length&&d<c.length)if(o(u[f],c[d])<=0)s[m++]=u[f++];else s[m++]=c[d++];while(f<u.length)s[m++]=u[f++];while(d<c.length)s[m++]=c[d++];return s}i(a,"mergeSort")}(Fd||(Fd={})),Vy=class{static{i(this,"FullTextDocument")}constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,r=!0;for(let n=0;n<t.length;n++){if(r)e.push(n),r=!1;let a=t.charAt(n);if(r=a==="\r"||a===`
|
|
4
|
+
`,a==="\r"&&n+1<t.length&&t.charAt(n+1)===`
|
|
5
|
+
`)n++}if(r&&t.length>0)e.push(t.length);this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,n=t.length;if(n===0)return de.create(0,e);while(r<n){let s=Math.floor((r+n)/2);if(t[s]>e)n=s;else r=s+1}let a=r-1;return de.create(a,e-t[a])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;else if(e.line<0)return 0;let r=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,n),r)}get lineCount(){return this.getLineOffsets().length}},function(e){let t=Object.prototype.toString;function r(g){return typeof g<"u"}i(r,"defined"),e.defined=r;function n(g){return typeof g>"u"}i(n,"undefined"),e.undefined=n;function a(g){return g===!0||g===!1}i(a,"boolean"),e.boolean=a;function s(g){return t.call(g)==="[object String]"}i(s,"string"),e.string=s;function o(g){return t.call(g)==="[object Number]"}i(o,"number"),e.number=o;function l(g,v,S){return t.call(g)==="[object Number]"&&v<=g&&g<=S}i(l,"numberRange"),e.numberRange=l;function u(g){return t.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}i(u,"integer"),e.integer=u;function c(g){return t.call(g)==="[object Number]"&&0<=g&&g<=2147483647}i(c,"uinteger"),e.uinteger=c;function f(g){return t.call(g)==="[object Function]"}i(f,"func"),e.func=f;function d(g){return g!==null&&typeof g==="object"}i(d,"objectLiteral"),e.objectLiteral=d;function m(g,v){return Array.isArray(g)&&g.every(v)}i(m,"typedArray"),e.typedArray=m}(b||(b={}))}}),fa=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t;function r(){if(t===void 0)throw Error("No runtime abstraction layer installed");return t}i(r,"RAL"),function(n){function a(s){if(s===void 0)throw Error("No runtime abstraction layer provided");t=s}i(a,"install"),n.install=a}(r||(r={})),e.default=r}}),To=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(u){return u===!0||u===!1}i(t,"boolean"),e.boolean=t;function r(u){return typeof u==="string"||u instanceof String}i(r,"string"),e.string=r;function n(u){return typeof u==="number"||u instanceof Number}i(n,"number"),e.number=n;function a(u){return u instanceof Error}i(a,"error"),e.error=a;function s(u){return typeof u==="function"}i(s,"func"),e.func=s;function o(u){return Array.isArray(u)}i(o,"array"),e.array=o;function l(u){return o(u)&&u.every((c)=>r(c))}i(l,"stringArray"),e.stringArray=l}}),ki=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var t=fa(),r;(function(s){let o={dispose(){}};s.None=function(){return o}})(r||(e.Event=r={}));var n=class{static{i(this,"CallbackList")}add(s,o=null,l){if(!this._callbacks)this._callbacks=[],this._contexts=[];if(this._callbacks.push(s),this._contexts.push(o),Array.isArray(l))l.push({dispose:i(()=>this.remove(s,o),"dispose")})}remove(s,o=null){if(!this._callbacks)return;let l=!1;for(let u=0,c=this._callbacks.length;u<c;u++)if(this._callbacks[u]===s)if(this._contexts[u]===o){this._callbacks.splice(u,1),this._contexts.splice(u,1);return}else l=!0;if(l)throw Error("When adding a listener with a context, you should remove it with the same context")}invoke(...s){if(!this._callbacks)return[];let o=[],l=this._callbacks.slice(0),u=this._contexts.slice(0);for(let c=0,f=l.length;c<f;c++)try{o.push(l[c].apply(u[c],s))}catch(d){(0,t.default)().console.error(d)}return o}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},a=class s{static{i(this,"Emitter")}constructor(o){this._options=o}get event(){if(!this._event)this._event=(o,l,u)=>{if(!this._callbacks)this._callbacks=new n;if(this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty())this._options.onFirstListenerAdd(this);this._callbacks.add(o,l);let c={dispose:i(()=>{if(!this._callbacks)return;if(this._callbacks.remove(o,l),c.dispose=s._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty())this._options.onLastListenerRemove(this)},"dispose")};if(Array.isArray(u))u.push(c);return c};return this._event}fire(o){if(this._callbacks)this._callbacks.invoke.call(this._callbacks,o)}dispose(){if(this._callbacks)this._callbacks.dispose(),this._callbacks=void 0}};e.Emitter=a,a._noop=function(){}}}),qu=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t=fa(),r=To(),n=ki(),a;(function(u){u.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),u.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n.Event.None});function c(f){let d=f;return d&&(d===u.None||d===u.Cancelled||r.boolean(d.isCancellationRequested)&&!!d.onCancellationRequested)}i(c,"is"),u.is=c})(a||(e.CancellationToken=a={}));var s=Object.freeze(function(u,c){let f=(0,t.default)().timer.setTimeout(u.bind(c),0);return{dispose(){f.dispose()}}}),o=class{static{i(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){if(!this._isCancelled){if(this._isCancelled=!0,this._emitter)this._emitter.fire(void 0),this.dispose()}}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){if(this._isCancelled)return s;if(!this._emitter)this._emitter=new n.Emitter;return this._emitter.event}dispose(){if(this._emitter)this._emitter.dispose(),this._emitter=void 0}},l=class{static{i(this,"CancellationTokenSource")}get token(){if(!this._token)this._token=new o;return this._token}cancel(){if(!this._token)this._token=a.Cancelled;else this._token.cancel()}dispose(){if(!this._token)this._token=a.None;else if(this._token instanceof o)this._token.dispose()}};e.CancellationTokenSource=l}}),Gv=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var t=To(),r;(function(h){h.ParseError=-32700,h.InvalidRequest=-32600,h.MethodNotFound=-32601,h.InvalidParams=-32602,h.InternalError=-32603,h.jsonrpcReservedErrorRangeStart=-32099,h.serverErrorStart=-32099,h.MessageWriteError=-32099,h.MessageReadError=-32098,h.PendingResponseRejected=-32097,h.ConnectionInactive=-32096,h.ServerNotInitialized=-32002,h.UnknownErrorCode=-32001,h.jsonrpcReservedErrorRangeEnd=-32000,h.serverErrorEnd=-32000})(r||(e.ErrorCodes=r={}));var n=class h extends Error{static{i(this,"ResponseError")}constructor(_,R,A){super(R);this.code=t.number(_)?_:r.UnknownErrorCode,this.data=A,Object.setPrototypeOf(this,h.prototype)}toJson(){let _={code:this.code,message:this.message};if(this.data!==void 0)_.data=this.data;return _}};e.ResponseError=n;var a=class h{static{i(this,"ParameterStructures")}constructor(_){this.kind=_}static is(_){return _===h.auto||_===h.byName||_===h.byPosition}toString(){return this.kind}};e.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");var s=class{static{i(this,"AbstractMessageSignature")}constructor(h,_){this.method=h,this.numberOfParams=_}get parameterStructures(){return a.auto}};e.AbstractMessageSignature=s;var o=class extends s{static{i(this,"RequestType0")}constructor(h){super(h,0)}};e.RequestType0=o;var l=class extends s{static{i(this,"RequestType")}constructor(h,_=a.auto){super(h,1);this._parameterStructures=_}get parameterStructures(){return this._parameterStructures}};e.RequestType=l;var u=class extends s{static{i(this,"RequestType1")}constructor(h,_=a.auto){super(h,1);this._parameterStructures=_}get parameterStructures(){return this._parameterStructures}};e.RequestType1=u;var c=class extends s{static{i(this,"RequestType2")}constructor(h){super(h,2)}};e.RequestType2=c;var f=class extends s{static{i(this,"RequestType3")}constructor(h){super(h,3)}};e.RequestType3=f;var d=class extends s{static{i(this,"RequestType4")}constructor(h){super(h,4)}};e.RequestType4=d;var m=class extends s{static{i(this,"RequestType5")}constructor(h){super(h,5)}};e.RequestType5=m;var g=class extends s{static{i(this,"RequestType6")}constructor(h){super(h,6)}};e.RequestType6=g;var v=class extends s{static{i(this,"RequestType7")}constructor(h){super(h,7)}};e.RequestType7=v;var S=class extends s{static{i(this,"RequestType8")}constructor(h){super(h,8)}};e.RequestType8=S;var I=class extends s{static{i(this,"RequestType9")}constructor(h){super(h,9)}};e.RequestType9=I;var P=class extends s{static{i(this,"NotificationType")}constructor(h,_=a.auto){super(h,1);this._parameterStructures=_}get parameterStructures(){return this._parameterStructures}};e.NotificationType=P;var N=class extends s{static{i(this,"NotificationType0")}constructor(h){super(h,0)}};e.NotificationType0=N;var E=class extends s{static{i(this,"NotificationType1")}constructor(h,_=a.auto){super(h,1);this._parameterStructures=_}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=E;var L=class extends s{static{i(this,"NotificationType2")}constructor(h){super(h,2)}};e.NotificationType2=L;var U=class extends s{static{i(this,"NotificationType3")}constructor(h){super(h,3)}};e.NotificationType3=U;var ee=class extends s{static{i(this,"NotificationType4")}constructor(h){super(h,4)}};e.NotificationType4=ee;var re=class extends s{static{i(this,"NotificationType5")}constructor(h){super(h,5)}};e.NotificationType5=re;var ve=class extends s{static{i(this,"NotificationType6")}constructor(h){super(h,6)}};e.NotificationType6=ve;var me=class extends s{static{i(this,"NotificationType7")}constructor(h){super(h,7)}};e.NotificationType7=me;var De=class extends s{static{i(this,"NotificationType8")}constructor(h){super(h,8)}};e.NotificationType8=De;var C=class extends s{static{i(this,"NotificationType9")}constructor(h){super(h,9)}};e.NotificationType9=C;var M;(function(h){function _(w){let O=w;return O&&t.string(O.method)&&(t.string(O.id)||t.number(O.id))}i(_,"isRequest"),h.isRequest=_;function R(w){let O=w;return O&&t.string(O.method)&&w.id===void 0}i(R,"isNotification"),h.isNotification=R;function A(w){let O=w;return O&&(O.result!==void 0||!!O.error)&&(t.string(O.id)||t.number(O.id)||O.id===null)}i(A,"isResponse"),h.isResponse=A})(M||(e.Message=M={}))}}),Fv=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var r;(function(s){s.None=0,s.First=1,s.AsOld=s.First,s.Last=2,s.AsNew=s.Last})(r||(e.Touch=r={}));var n=class{static{i(this,"LinkedMap")}constructor(){this[t]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(s){return this._map.has(s)}get(s,o=r.None){let l=this._map.get(s);if(!l)return;if(o!==r.None)this.touch(l,o);return l.value}set(s,o,l=r.None){let u=this._map.get(s);if(u){if(u.value=o,l!==r.None)this.touch(u,l)}else{switch(u={key:s,value:o,next:void 0,previous:void 0},l){case r.None:this.addItemLast(u);break;case r.First:this.addItemFirst(u);break;case r.Last:this.addItemLast(u);break;default:this.addItemLast(u);break}this._map.set(s,u),this._size++}return this}delete(s){return!!this.remove(s)}remove(s){let o=this._map.get(s);if(!o)return;return this._map.delete(s),this.removeItem(o),this._size--,o.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error("Invalid list");let s=this._head;return this._map.delete(s.key),this.removeItem(s),this._size--,s.value}forEach(s,o){let l=this._state,u=this._head;while(u){if(o)s.bind(o)(u.value,u.key,this);else s(u.value,u.key,this);if(this._state!==l)throw Error("LinkedMap got modified during iteration.");u=u.next}}keys(){let s=this._state,o=this._head,l={[Symbol.iterator]:()=>l,next:i(()=>{if(this._state!==s)throw Error("LinkedMap got modified during iteration.");if(o){let u={value:o.key,done:!1};return o=o.next,u}else return{value:void 0,done:!0}},"next")};return l}values(){let s=this._state,o=this._head,l={[Symbol.iterator]:()=>l,next:i(()=>{if(this._state!==s)throw Error("LinkedMap got modified during iteration.");if(o){let u={value:o.value,done:!1};return o=o.next,u}else return{value:void 0,done:!0}},"next")};return l}entries(){let s=this._state,o=this._head,l={[Symbol.iterator]:()=>l,next:i(()=>{if(this._state!==s)throw Error("LinkedMap got modified during iteration.");if(o){let u={value:[o.key,o.value],done:!1};return o=o.next,u}else return{value:void 0,done:!0}},"next")};return l}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(s){if(s>=this.size)return;if(s===0){this.clear();return}let o=this._head,l=this.size;while(o&&l>s)this._map.delete(o.key),o=o.next,l--;if(this._head=o,this._size=l,o)o.previous=void 0;this._state++}addItemFirst(s){if(!this._head&&!this._tail)this._tail=s;else if(!this._head)throw Error("Invalid list");else s.next=this._head,this._head.previous=s;this._head=s,this._state++}addItemLast(s){if(!this._head&&!this._tail)this._head=s;else if(!this._tail)throw Error("Invalid list");else s.previous=this._tail,this._tail.next=s;this._tail=s,this._state++}removeItem(s){if(s===this._head&&s===this._tail)this._head=void 0,this._tail=void 0;else if(s===this._head){if(!s.next)throw Error("Invalid list");s.next.previous=void 0,this._head=s.next}else if(s===this._tail){if(!s.previous)throw Error("Invalid list");s.previous.next=void 0,this._tail=s.previous}else{let{next:o,previous:l}=s;if(!o||!l)throw Error("Invalid list");o.previous=l,l.next=o}s.next=void 0,s.previous=void 0,this._state++}touch(s,o){if(!this._head||!this._tail)throw Error("Invalid list");if(o!==r.First&&o!==r.Last)return;if(o===r.First){if(s===this._head)return;let{next:l,previous:u}=s;if(s===this._tail)u.next=void 0,this._tail=u;else l.previous=u,u.next=l;s.previous=void 0,s.next=this._head,this._head.previous=s,this._head=s,this._state++}else if(o===r.Last){if(s===this._tail)return;let{next:l,previous:u}=s;if(s===this._head)l.previous=void 0,this._head=l;else l.previous=u,u.next=l;s.next=void 0,s.previous=this._tail,this._tail.next=s,this._tail=s,this._state++}}toJSON(){let s=[];return this.forEach((o,l)=>{s.push([l,o])}),s}fromJSON(s){this.clear();for(let[o,l]of s)this.set(o,l)}};e.LinkedMap=n;var a=class extends n{static{i(this,"LRUCache")}constructor(s,o=1){super();this._limit=s,this._ratio=Math.min(Math.max(0,o),1)}get limit(){return this._limit}set limit(s){this._limit=s,this.checkTrim()}get ratio(){return this._ratio}set ratio(s){this._ratio=Math.min(Math.max(0,s),1),this.checkTrim()}get(s,o=r.AsNew){return super.get(s,o)}peek(s){return super.get(s,r.None)}set(s,o){return super.set(s,o,r.Last),this.checkTrim(),this}checkTrim(){if(this.size>this._limit)this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=a}}),lN=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(r){function n(a){return{dispose:a}}i(n,"create"),r.create=n})(t||(e.Disposable=t={}))}}),uN=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=qu(),r;(function(l){l.Continue=0,l.Cancelled=1})(r||(r={}));var n=class{static{i(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(l){if(l.id===null)return;let u=new SharedArrayBuffer(4),c=new Int32Array(u,0,1);c[0]=r.Continue,this.buffers.set(l.id,u),l.$cancellationData=u}async sendCancellation(l,u){let c=this.buffers.get(u);if(c===void 0)return;let f=new Int32Array(c,0,1);Atomics.store(f,0,r.Cancelled)}cleanup(l){this.buffers.delete(l)}dispose(){this.buffers.clear()}};e.SharedArraySenderStrategy=n;var a=class{static{i(this,"SharedArrayBufferCancellationToken")}constructor(l){this.data=new Int32Array(l,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},s=class{static{i(this,"SharedArrayBufferCancellationTokenSource")}constructor(l){this.token=new a(l)}cancel(){}dispose(){}},o=class{static{i(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(l){let u=l.$cancellationData;if(u===void 0)return new t.CancellationTokenSource;return new s(u)}};e.SharedArrayReceiverStrategy=o}}),zv=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=fa(),r=class{static{i(this,"Semaphore")}constructor(n=1){if(n<=0)throw Error("Capacity must be greater than 0");this._capacity=n,this._active=0,this._waiting=[]}lock(n){return new Promise((a,s)=>{this._waiting.push({thunk:n,resolve:a,reject:s}),this.runNext()})}get active(){return this._active}runNext(){if(this._waiting.length===0||this._active===this._capacity)return;(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let n=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error("To many thunks active");try{let a=n.thunk();if(a instanceof Promise)a.then((s)=>{this._active--,n.resolve(s),this.runNext()},(s)=>{this._active--,n.reject(s),this.runNext()});else this._active--,n.resolve(a),this.runNext()}catch(a){this._active--,n.reject(a),this.runNext()}}};e.Semaphore=r}}),cN=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var t=fa(),r=To(),n=ki(),a=zv(),s;(function(c){function f(d){let m=d;return m&&r.func(m.listen)&&r.func(m.dispose)&&r.func(m.onError)&&r.func(m.onClose)&&r.func(m.onPartialMessage)}i(f,"is"),c.is=f})(s||(e.MessageReader=s={}));var o=class{static{i(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter,this.partialMessageEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(c){this.errorEmitter.fire(this.asError(c))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(c){this.partialMessageEmitter.fire(c)}asError(c){if(c instanceof Error)return c;else return Error(`Reader received error. Reason: ${r.string(c.message)?c.message:"unknown"}`)}};e.AbstractMessageReader=o;var l;(function(c){function f(d){let m,g,v,S=new Map,I,P=new Map;if(d===void 0||typeof d==="string")m=d??"utf-8";else{if(m=d.charset??"utf-8",d.contentDecoder!==void 0)v=d.contentDecoder,S.set(v.name,v);if(d.contentDecoders!==void 0)for(let N of d.contentDecoders)S.set(N.name,N);if(d.contentTypeDecoder!==void 0)I=d.contentTypeDecoder,P.set(I.name,I);if(d.contentTypeDecoders!==void 0)for(let N of d.contentTypeDecoders)P.set(N.name,N)}if(I===void 0)I=(0,t.default)().applicationJson.decoder,P.set(I.name,I);return{charset:m,contentDecoder:v,contentDecoders:S,contentTypeDecoder:I,contentTypeDecoders:P}}i(f,"fromOptions"),c.fromOptions=f})(l||(l={}));var u=class extends o{static{i(this,"ReadableStreamMessageReader")}constructor(c,f){super();this.readable=c,this.options=l.fromOptions(f),this.buffer=(0,t.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new a.Semaphore(1)}set partialMessageTimeout(c){this._partialMessageTimeout=c}get partialMessageTimeout(){return this._partialMessageTimeout}listen(c){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=c;let f=this.readable.onData((d)=>{this.onData(d)});return this.readable.onError((d)=>this.fireError(d)),this.readable.onClose(()=>this.fireClose()),f}onData(c){try{this.buffer.append(c);while(!0){if(this.nextMessageLength===-1){let d=this.buffer.tryReadHeaders(!0);if(!d)return;let m=d.get("content-length");if(!m){this.fireError(Error(`Header must provide a Content-Length property.
|
|
6
|
+
${JSON.stringify(Object.fromEntries(d))}`));return}let g=parseInt(m);if(isNaN(g)){this.fireError(Error(`Content-Length value must be a number. Got ${m}`));return}this.nextMessageLength=g}let f=this.buffer.tryReadBody(this.nextMessageLength);if(f===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let d=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(f):f,m=await this.options.contentTypeDecoder.decode(d,this.options);this.callback(m)}).catch((d)=>{this.fireError(d)})}}catch(f){this.fireError(f)}}clearPartialMessageTimer(){if(this.partialMessageTimer)this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0}setPartialMessageTimer(){if(this.clearPartialMessageTimer(),this._partialMessageTimeout<=0)return;this.partialMessageTimer=(0,t.default)().timer.setTimeout((c,f)=>{if(this.partialMessageTimer=void 0,c===this.messageToken)this.firePartialMessage({messageToken:c,waitingTime:f}),this.setPartialMessageTimer()},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout)}};e.ReadableStreamMessageReader=u}}),fN=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=fa(),r=To(),n=zv(),a=ki(),s="Content-Length: ",o=`\r
|
|
7
|
+
`,l;(function(d){function m(g){let v=g;return v&&r.func(v.dispose)&&r.func(v.onClose)&&r.func(v.onError)&&r.func(v.write)}i(m,"is"),d.is=m})(l||(e.MessageWriter=l={}));var u=class{static{i(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(d,m,g){this.errorEmitter.fire([this.asError(d),m,g])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(d){if(d instanceof Error)return d;else return Error(`Writer received error. Reason: ${r.string(d.message)?d.message:"unknown"}`)}};e.AbstractMessageWriter=u;var c;(function(d){function m(g){if(g===void 0||typeof g==="string")return{charset:g??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder};else return{charset:g.charset??"utf-8",contentEncoder:g.contentEncoder,contentTypeEncoder:g.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}i(m,"fromOptions"),d.fromOptions=m})(c||(c={}));var f=class extends u{static{i(this,"WriteableStreamMessageWriter")}constructor(d,m){super();this.writable=d,this.options=c.fromOptions(m),this.errorCount=0,this.writeSemaphore=new n.Semaphore(1),this.writable.onError((g)=>this.fireError(g)),this.writable.onClose(()=>this.fireClose())}async write(d){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(d,this.options).then((g)=>{if(this.options.contentEncoder!==void 0)return this.options.contentEncoder.encode(g);else return g}).then((g)=>{let v=[];return v.push(s,g.byteLength.toString(),o),v.push(o),this.doWrite(d,v,g)},(g)=>{throw this.fireError(g),g}))}async doWrite(d,m,g){try{return await this.writable.write(m.join(""),"ascii"),this.writable.write(g)}catch(v){return this.handleError(v,d),Promise.reject(v)}}handleError(d,m){this.errorCount++,this.fireError(d,m,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=f}}),dN=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=13,r=10,n=`\r
|
|
8
|
+
`,a=class{static{i(this,"AbstractMessageBuffer")}constructor(s="utf-8"){this._encoding=s,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(s){let o=typeof s==="string"?this.fromString(s,this._encoding):s;this._chunks.push(o),this._totalLength+=o.byteLength}tryReadHeaders(s=!1){if(this._chunks.length===0)return;let o=0,l=0,u=0,c=0;e:while(l<this._chunks.length){let g=this._chunks[l];u=0;t:while(u<g.length){switch(g[u]){case t:switch(o){case 0:o=1;break;case 2:o=3;break;default:o=0}break;case r:switch(o){case 1:o=2;break;case 3:o=4,u++;break e;default:o=0}break;default:o=0}u++}c+=g.byteLength,l++}if(o!==4)return;let f=this._read(c+u),d=new Map,m=this.toString(f,"ascii").split(n);if(m.length<2)return d;for(let g=0;g<m.length-2;g++){let v=m[g],S=v.indexOf(":");if(S===-1)throw Error(`Message header must separate key and value using ':'
|
|
9
|
+
${v}`);let I=v.substr(0,S),P=v.substr(S+1).trim();d.set(s?I.toLowerCase():I,P)}return d}tryReadBody(s){if(this._totalLength<s)return;return this._read(s)}get numberOfBytes(){return this._totalLength}_read(s){if(s===0)return this.emptyBuffer();if(s>this._totalLength)throw Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===s){let c=this._chunks[0];return this._chunks.shift(),this._totalLength-=s,this.asNative(c)}if(this._chunks[0].byteLength>s){let c=this._chunks[0],f=this.asNative(c,s);return this._chunks[0]=c.slice(s),this._totalLength-=s,f}let o=this.allocNative(s),l=0,u=0;while(s>0){let c=this._chunks[u];if(c.byteLength>s){let f=c.slice(0,s);o.set(f,l),l+=s,this._chunks[u]=c.slice(s),this._totalLength-=s,s-=s}else o.set(c,l),l+=c.byteLength,this._chunks.shift(),this._totalLength-=c.byteLength,s-=c.byteLength}return o}};e.AbstractMessageBuffer=a}}),pN=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var t=fa(),r=To(),n=Gv(),a=Fv(),s=ki(),o=qu(),l;(function(h){h.type=new n.NotificationType("$/cancelRequest")})(l||(l={}));var u;(function(h){function _(R){return typeof R==="string"||typeof R==="number"}i(_,"is"),h.is=_})(u||(e.ProgressToken=u={}));var c;(function(h){h.type=new n.NotificationType("$/progress")})(c||(c={}));var f=class{static{i(this,"ProgressType")}constructor(){}};e.ProgressType=f;var d;(function(h){function _(R){return r.func(R)}i(_,"is"),h.is=_})(d||(d={})),e.NullLogger=Object.freeze({error:i(()=>{},"error"),warn:i(()=>{},"warn"),info:i(()=>{},"info"),log:i(()=>{},"log")});var m;(function(h){h[h.Off=0]="Off",h[h.Messages=1]="Messages",h[h.Compact=2]="Compact",h[h.Verbose=3]="Verbose"})(m||(e.Trace=m={}));var g;(function(h){h.Off="off",h.Messages="messages",h.Compact="compact",h.Verbose="verbose"})(g||(e.TraceValues=g={})),function(h){function _(A){if(!r.string(A))return h.Off;switch(A=A.toLowerCase(),A){case"off":return h.Off;case"messages":return h.Messages;case"compact":return h.Compact;case"verbose":return h.Verbose;default:return h.Off}}i(_,"fromString"),h.fromString=_;function R(A){switch(A){case h.Off:return"off";case h.Messages:return"messages";case h.Compact:return"compact";case h.Verbose:return"verbose";default:return"off"}}i(R,"toString"),h.toString=R}(m||(e.Trace=m={}));var v;(function(h){h.Text="text",h.JSON="json"})(v||(e.TraceFormat=v={})),function(h){function _(R){if(!r.string(R))return h.Text;if(R=R.toLowerCase(),R==="json")return h.JSON;else return h.Text}i(_,"fromString"),h.fromString=_}(v||(e.TraceFormat=v={}));var S;(function(h){h.type=new n.NotificationType("$/setTrace")})(S||(e.SetTraceNotification=S={}));var I;(function(h){h.type=new n.NotificationType("$/logTrace")})(I||(e.LogTraceNotification=I={}));var P;(function(h){h[h.Closed=1]="Closed",h[h.Disposed=2]="Disposed",h[h.AlreadyListening=3]="AlreadyListening"})(P||(e.ConnectionErrors=P={}));var N=class h extends Error{static{i(this,"ConnectionError")}constructor(_,R){super(R);this.code=_,Object.setPrototypeOf(this,h.prototype)}};e.ConnectionError=N;var E;(function(h){function _(R){let A=R;return A&&r.func(A.cancelUndispatched)}i(_,"is"),h.is=_})(E||(e.ConnectionStrategy=E={}));var L;(function(h){function _(R){let A=R;return A&&(A.kind===void 0||A.kind==="id")&&r.func(A.createCancellationTokenSource)&&(A.dispose===void 0||r.func(A.dispose))}i(_,"is"),h.is=_})(L||(e.IdCancellationReceiverStrategy=L={}));var U;(function(h){function _(R){let A=R;return A&&A.kind==="request"&&r.func(A.createCancellationTokenSource)&&(A.dispose===void 0||r.func(A.dispose))}i(_,"is"),h.is=_})(U||(e.RequestCancellationReceiverStrategy=U={}));var ee;(function(h){h.Message=Object.freeze({createCancellationTokenSource(R){return new o.CancellationTokenSource}});function _(R){return L.is(R)||U.is(R)}i(_,"is"),h.is=_})(ee||(e.CancellationReceiverStrategy=ee={}));var re;(function(h){h.Message=Object.freeze({sendCancellation(R,A){return R.sendNotification(l.type,{id:A})},cleanup(R){}});function _(R){let A=R;return A&&r.func(A.sendCancellation)&&r.func(A.cleanup)}i(_,"is"),h.is=_})(re||(e.CancellationSenderStrategy=re={}));var ve;(function(h){h.Message=Object.freeze({receiver:ee.Message,sender:re.Message});function _(R){let A=R;return A&&ee.is(A.receiver)&&re.is(A.sender)}i(_,"is"),h.is=_})(ve||(e.CancellationStrategy=ve={}));var me;(function(h){function _(R){let A=R;return A&&r.func(A.handleMessage)}i(_,"is"),h.is=_})(me||(e.MessageStrategy=me={}));var De;(function(h){function _(R){let A=R;return A&&(ve.is(A.cancellationStrategy)||E.is(A.connectionStrategy)||me.is(A.messageStrategy))}i(_,"is"),h.is=_})(De||(e.ConnectionOptions=De={}));var C;(function(h){h[h.New=1]="New",h[h.Listening=2]="Listening",h[h.Closed=3]="Closed",h[h.Disposed=4]="Disposed"})(C||(C={}));function M(h,_,R,A){let w=R!==void 0?R:e.NullLogger,O=0,B=0,G=0,z="2.0",Y=void 0,Q=new Map,X=void 0,je=new Map,he=new Map,Ve,We=new a.LinkedMap,Be=new Map,lt=new Set,st=new Map,ce=m.Off,ir=v.Text,ke,jt=C.New,ka=new s.Emitter,Bi=new s.Emitter,Ui=new s.Emitter,Ki=new s.Emitter,Vi=new s.Emitter,Bt=A&&A.cancellationStrategy?A.cancellationStrategy:ve.Message;function Oa(y){if(y===null)throw Error("Can't send requests with id null since the response can't be correlated.");return"req-"+y.toString()}i(Oa,"createRequestQueueKey");function Wi(y){if(y===null)return"res-unknown-"+(++G).toString();else return"res-"+y.toString()}i(Wi,"createResponseQueueKey");function qi(){return"not-"+(++B).toString()}i(qi,"createNotificationQueueKey");function Hi(y,k){if(n.Message.isRequest(k))y.set(Oa(k.id),k);else if(n.Message.isResponse(k))y.set(Wi(k.id),k);else y.set(qi(),k)}i(Hi,"addMessageToQueue");function La(y){return}i(La,"cancelUndispatched");function Ma(){return jt===C.Listening}i(Ma,"isListening");function Da(){return jt===C.Closed}i(Da,"isClosed");function sr(){return jt===C.Disposed}i(sr,"isDisposed");function xa(){if(jt===C.New||jt===C.Listening)jt=C.Closed,Bi.fire(void 0)}i(xa,"closeHandler");function Yi(y){ka.fire([y,void 0,void 0])}i(Yi,"readErrorHandler");function Xi(y){ka.fire(y)}i(Xi,"writeErrorHandler"),h.onClose(xa),h.onError(Yi),_.onClose(xa),_.onError(Xi);function Ga(){if(Ve||We.size===0)return;Ve=(0,t.default)().timer.setImmediate(()=>{Ve=void 0,Ji()})}i(Ga,"triggerMessageQueue");function Fa(y){if(n.Message.isRequest(y))Zi(y);else if(n.Message.isNotification(y))es(y);else if(n.Message.isResponse(y))Qi(y);else ts(y)}i(Fa,"handleMessage");function Ji(){if(We.size===0)return;let y=We.shift();try{let k=A?.messageStrategy;if(me.is(k))k.handleMessage(y,Fa);else Fa(y)}finally{Ga()}}i(Ji,"processMessageQueue");let Fo=i((y)=>{try{if(n.Message.isNotification(y)&&y.method===l.type.method){let k=y.params.id,x=Oa(k),F=We.get(x);if(n.Message.isRequest(F)){let Te=A?.connectionStrategy,Oe=Te&&Te.cancelUndispatched?Te.cancelUndispatched(F,La):La(F);if(Oe&&(Oe.error!==void 0||Oe.result!==void 0)){We.delete(x),st.delete(k),Oe.id=F.id,Zr(Oe,y.method,Date.now()),_.write(Oe).catch(()=>w.error("Sending response for canceled message failed."));return}}let Ee=st.get(k);if(Ee!==void 0){Ee.cancel(),In(y);return}else lt.add(k)}Hi(We,y)}finally{Ga()}},"callback");function Zi(y){if(sr())return;function k(se,we,ye){let qe={jsonrpc:z,id:y.id};if(se instanceof n.ResponseError)qe.error=se.toJson();else qe.result=se===void 0?null:se;Zr(qe,we,ye),_.write(qe).catch(()=>w.error("Sending response failed."))}i(k,"reply");function x(se,we,ye){let qe={jsonrpc:z,id:y.id,error:se.toJson()};Zr(qe,we,ye),_.write(qe).catch(()=>w.error("Sending response failed."))}i(x,"replyError");function F(se,we,ye){if(se===void 0)se=null;let qe={jsonrpc:z,id:y.id,result:se};Zr(qe,we,ye),_.write(qe).catch(()=>w.error("Sending response failed."))}i(F,"replySuccess"),as(y);let Ee=Q.get(y.method),Te,Oe;if(Ee)Te=Ee.type,Oe=Ee.handler;let xe=Date.now();if(Oe||Y){let se=y.id??String(Date.now()),we=L.is(Bt.receiver)?Bt.receiver.createCancellationTokenSource(se):Bt.receiver.createCancellationTokenSource(y);if(y.id!==null&<.has(y.id))we.cancel();if(y.id!==null)st.set(se,we);try{let ye;if(Oe)if(y.params===void 0){if(Te!==void 0&&Te.numberOfParams!==0){x(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${y.method} defines ${Te.numberOfParams} params but received none.`),y.method,xe);return}ye=Oe(we.token)}else if(Array.isArray(y.params)){if(Te!==void 0&&Te.parameterStructures===n.ParameterStructures.byName){x(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by name but received parameters by position`),y.method,xe);return}ye=Oe(...y.params,we.token)}else{if(Te!==void 0&&Te.parameterStructures===n.ParameterStructures.byPosition){x(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${y.method} defines parameters by position but received parameters by name`),y.method,xe);return}ye=Oe(y.params,we.token)}else if(Y)ye=Y(y.method,y.params,we.token);let qe=ye;if(!ye)st.delete(se),F(ye,y.method,xe);else if(qe.then)qe.then((ut)=>{st.delete(se),k(ut,y.method,xe)},(ut)=>{if(st.delete(se),ut instanceof n.ResponseError)x(ut,y.method,xe);else if(ut&&r.string(ut.message))x(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed with message: ${ut.message}`),y.method,xe);else x(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed unexpectedly without providing any details.`),y.method,xe)});else st.delete(se),k(ye,y.method,xe)}catch(ye){if(st.delete(se),ye instanceof n.ResponseError)k(ye,y.method,xe);else if(ye&&r.string(ye.message))x(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed with message: ${ye.message}`),y.method,xe);else x(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${y.method} failed unexpectedly without providing any details.`),y.method,xe)}}else x(new n.ResponseError(n.ErrorCodes.MethodNotFound,`Unhandled method ${y.method}`),y.method,xe)}i(Zi,"handleRequest");function Qi(y){if(sr())return;if(y.id===null)if(y.error)w.error(`Received response message without id: Error is:
|
|
10
|
+
${JSON.stringify(y.error,void 0,4)}`);else w.error("Received response message without id. No further error information provided.");else{let k=y.id,x=Be.get(k);if(is(y,x),x!==void 0){Be.delete(k);try{if(y.error){let F=y.error;x.reject(new n.ResponseError(F.code,F.message,F.data))}else if(y.result!==void 0)x.resolve(y.result);else throw Error("Should never happen.")}catch(F){if(F.message)w.error(`Response handler '${x.method}' failed with message: ${F.message}`);else w.error(`Response handler '${x.method}' failed unexpectedly.`)}}}}i(Qi,"handleResponse");function es(y){if(sr())return;let k=void 0,x;if(y.method===l.type.method){let F=y.params.id;lt.delete(F),In(y);return}else{let F=je.get(y.method);if(F)x=F.handler,k=F.type}if(x||X)try{if(In(y),x)if(y.params===void 0){if(k!==void 0){if(k.numberOfParams!==0&&k.parameterStructures!==n.ParameterStructures.byName)w.error(`Notification ${y.method} defines ${k.numberOfParams} params but received none.`)}x()}else if(Array.isArray(y.params)){let F=y.params;if(y.method===c.type.method&&F.length===2&&u.is(F[0]))x({token:F[0],value:F[1]});else{if(k!==void 0){if(k.parameterStructures===n.ParameterStructures.byName)w.error(`Notification ${y.method} defines parameters by name but received parameters by position`);if(k.numberOfParams!==y.params.length)w.error(`Notification ${y.method} defines ${k.numberOfParams} params but received ${F.length} arguments`)}x(...F)}}else{if(k!==void 0&&k.parameterStructures===n.ParameterStructures.byPosition)w.error(`Notification ${y.method} defines parameters by position but received parameters by name`);x(y.params)}else if(X)X(y.method,y.params)}catch(F){if(F.message)w.error(`Notification handler '${y.method}' failed with message: ${F.message}`);else w.error(`Notification handler '${y.method}' failed unexpectedly.`)}else Ui.fire(y)}i(es,"handleNotification");function ts(y){if(!y){w.error("Received empty message.");return}w.error(`Received message which is neither a response nor a notification message:
|
|
11
|
+
${JSON.stringify(y,null,4)}`);let k=y;if(r.string(k.id)||r.number(k.id)){let x=k.id,F=Be.get(x);if(F)F.reject(Error("The received response has neither a result nor an error property."))}}i(ts,"handleInvalidMessage");function Ot(y){if(y===void 0||y===null)return;switch(ce){case m.Verbose:return JSON.stringify(y,null,4);case m.Compact:return JSON.stringify(y);default:return}}i(Ot,"stringifyTrace");function rs(y){if(ce===m.Off||!ke)return;if(ir===v.Text){let k=void 0;if((ce===m.Verbose||ce===m.Compact)&&y.params)k=`Params: ${Ot(y.params)}
|
|
12
|
+
|
|
13
|
+
`;ke.log(`Sending request '${y.method} - (${y.id})'.`,k)}else or("send-request",y)}i(rs,"traceSendingRequest");function ns(y){if(ce===m.Off||!ke)return;if(ir===v.Text){let k=void 0;if(ce===m.Verbose||ce===m.Compact)if(y.params)k=`Params: ${Ot(y.params)}
|
|
14
|
+
|
|
15
|
+
`;else k=`No parameters provided.
|
|
16
|
+
|
|
17
|
+
`;ke.log(`Sending notification '${y.method}'.`,k)}else or("send-notification",y)}i(ns,"traceSendingNotification");function Zr(y,k,x){if(ce===m.Off||!ke)return;if(ir===v.Text){let F=void 0;if(ce===m.Verbose||ce===m.Compact){if(y.error&&y.error.data)F=`Error data: ${Ot(y.error.data)}
|
|
18
|
+
|
|
19
|
+
`;else if(y.result)F=`Result: ${Ot(y.result)}
|
|
20
|
+
|
|
21
|
+
`;else if(y.error===void 0)F=`No result returned.
|
|
22
|
+
|
|
23
|
+
`}ke.log(`Sending response '${k} - (${y.id})'. Processing request took ${Date.now()-x}ms`,F)}else or("send-response",y)}i(Zr,"traceSendingResponse");function as(y){if(ce===m.Off||!ke)return;if(ir===v.Text){let k=void 0;if((ce===m.Verbose||ce===m.Compact)&&y.params)k=`Params: ${Ot(y.params)}
|
|
24
|
+
|
|
25
|
+
`;ke.log(`Received request '${y.method} - (${y.id})'.`,k)}else or("receive-request",y)}i(as,"traceReceivedRequest");function In(y){if(ce===m.Off||!ke||y.method===I.type.method)return;if(ir===v.Text){let k=void 0;if(ce===m.Verbose||ce===m.Compact)if(y.params)k=`Params: ${Ot(y.params)}
|
|
26
|
+
|
|
27
|
+
`;else k=`No parameters provided.
|
|
28
|
+
|
|
29
|
+
`;ke.log(`Received notification '${y.method}'.`,k)}else or("receive-notification",y)}i(In,"traceReceivedNotification");function is(y,k){if(ce===m.Off||!ke)return;if(ir===v.Text){let x=void 0;if(ce===m.Verbose||ce===m.Compact){if(y.error&&y.error.data)x=`Error data: ${Ot(y.error.data)}
|
|
30
|
+
|
|
31
|
+
`;else if(y.result)x=`Result: ${Ot(y.result)}
|
|
32
|
+
|
|
33
|
+
`;else if(y.error===void 0)x=`No result returned.
|
|
34
|
+
|
|
35
|
+
`}if(k){let F=y.error?` Request failed: ${y.error.message} (${y.error.code}).`:"";ke.log(`Received response '${k.method} - (${y.id})' in ${Date.now()-k.timerStart}ms.${F}`,x)}else ke.log(`Received response ${y.id} without active response promise.`,x)}else or("receive-response",y)}i(is,"traceReceivedResponse");function or(y,k){if(!ke||ce===m.Off)return;let x={isLSPMessage:!0,type:y,message:k,timestamp:Date.now()};ke.log(x)}i(or,"logLSPMessage");function Er(){if(Da())throw new N(P.Closed,"Connection is closed.");if(sr())throw new N(P.Disposed,"Connection is disposed.")}i(Er,"throwIfClosedOrDisposed");function ss(){if(Ma())throw new N(P.AlreadyListening,"Connection is already listening")}i(ss,"throwIfListening");function os(){if(!Ma())throw Error("Call listen() first.")}i(os,"throwIfNotListening");function br(y){if(y===void 0)return null;else return y}i(br,"undefinedToNull");function za(y){if(y===null)return;else return y}i(za,"nullToUndefined");function p(y){return y!==void 0&&y!==null&&!Array.isArray(y)&&typeof y==="object"}i(p,"isNamedParam");function fe(y,k){switch(y){case n.ParameterStructures.auto:if(p(k))return za(k);else return[br(k)];case n.ParameterStructures.byName:if(!p(k))throw Error("Received parameters by name but param is not an object literal.");return za(k);case n.ParameterStructures.byPosition:return[br(k)];default:throw Error(`Unknown parameter structure ${y.toString()}`)}}i(fe,"computeSingleParam");function Se(y,k){let x,F=y.numberOfParams;switch(F){case 0:x=void 0;break;case 1:x=fe(y.parameterStructures,k[0]);break;default:x=[];for(let Ee=0;Ee<k.length&&Ee<F;Ee++)x.push(br(k[Ee]));if(k.length<F)for(let Ee=k.length;Ee<F;Ee++)x.push(null);break}return x}i(Se,"computeMessageParams");let J={sendNotification:i((y,...k)=>{Er();let x,F;if(r.string(y)){x=y;let Te=k[0],Oe=0,xe=n.ParameterStructures.auto;if(n.ParameterStructures.is(Te))Oe=1,xe=Te;let se=k.length,we=se-Oe;switch(we){case 0:F=void 0;break;case 1:F=fe(xe,k[Oe]);break;default:if(xe===n.ParameterStructures.byName)throw Error(`Received ${we} parameters for 'by Name' notification parameter structure.`);F=k.slice(Oe,se).map((ye)=>br(ye));break}}else{let Te=k;x=y.method,F=Se(y,Te)}let Ee={jsonrpc:z,method:x,params:F};return ns(Ee),_.write(Ee).catch((Te)=>{throw w.error("Sending notification failed."),Te})},"sendNotification"),onNotification:i((y,k)=>{Er();let x;if(r.func(y))X=y;else if(k)if(r.string(y))x=y,je.set(y,{type:void 0,handler:k});else x=y.method,je.set(y.method,{type:y,handler:k});return{dispose:i(()=>{if(x!==void 0)je.delete(x);else X=void 0},"dispose")}},"onNotification"),onProgress:i((y,k,x)=>{if(he.has(k))throw Error(`Progress handler for token ${k} already registered`);return he.set(k,x),{dispose:i(()=>{he.delete(k)},"dispose")}},"onProgress"),sendProgress:i((y,k,x)=>J.sendNotification(c.type,{token:k,value:x}),"sendProgress"),onUnhandledProgress:Ki.event,sendRequest:i((y,...k)=>{Er(),os();let x,F,Ee=void 0;if(r.string(y)){x=y;let se=k[0],we=k[k.length-1],ye=0,qe=n.ParameterStructures.auto;if(n.ParameterStructures.is(se))ye=1,qe=se;let ut=k.length;if(o.CancellationToken.is(we))ut=ut-1,Ee=we;let lr=ut-ye;switch(lr){case 0:F=void 0;break;case 1:F=fe(qe,k[ye]);break;default:if(qe===n.ParameterStructures.byName)throw Error(`Received ${lr} parameters for 'by Name' request parameter structure.`);F=k.slice(ye,ut).map((rN)=>br(rN));break}}else{let se=k;x=y.method,F=Se(y,se);let we=y.numberOfParams;Ee=o.CancellationToken.is(se[we])?se[we]:void 0}let Te=O++,Oe;if(Ee)Oe=Ee.onCancellationRequested(()=>{let se=Bt.sender.sendCancellation(J,Te);if(se===void 0)return w.log(`Received no promise from cancellation strategy when cancelling id ${Te}`),Promise.resolve();else return se.catch(()=>{w.log(`Sending cancellation messages for id ${Te} failed`)})});let xe={jsonrpc:z,id:Te,method:x,params:F};if(rs(xe),typeof Bt.sender.enableCancellation==="function")Bt.sender.enableCancellation(xe);return new Promise(async(se,we)=>{let ye=i((lr)=>{se(lr),Bt.sender.cleanup(Te),Oe?.dispose()},"resolveWithCleanup"),qe=i((lr)=>{we(lr),Bt.sender.cleanup(Te),Oe?.dispose()},"rejectWithCleanup"),ut={method:x,timerStart:Date.now(),resolve:ye,reject:qe};try{await _.write(xe),Be.set(Te,ut)}catch(lr){throw w.error("Sending request failed."),ut.reject(new n.ResponseError(n.ErrorCodes.MessageWriteError,lr.message?lr.message:"Unknown reason")),lr}})},"sendRequest"),onRequest:i((y,k)=>{Er();let x=null;if(d.is(y))x=void 0,Y=y;else if(r.string(y)){if(x=null,k!==void 0)x=y,Q.set(y,{handler:k,type:void 0})}else if(k!==void 0)x=y.method,Q.set(y.method,{type:y,handler:k});return{dispose:i(()=>{if(x===null)return;if(x!==void 0)Q.delete(x);else Y=void 0},"dispose")}},"onRequest"),hasPendingResponse:i(()=>Be.size>0,"hasPendingResponse"),trace:i(async(y,k,x)=>{let F=!1,Ee=v.Text;if(x!==void 0)if(r.boolean(x))F=x;else F=x.sendNotification||!1,Ee=x.traceFormat||v.Text;if(ce=y,ir=Ee,ce===m.Off)ke=void 0;else ke=k;if(F&&!Da()&&!sr())await J.sendNotification(S.type,{value:m.toString(y)})},"trace"),onError:ka.event,onClose:Bi.event,onUnhandledNotification:Ui.event,onDispose:Vi.event,end:i(()=>{_.end()},"end"),dispose:i(()=>{if(sr())return;jt=C.Disposed,Vi.fire(void 0);let y=new n.ResponseError(n.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let k of Be.values())k.reject(y);if(Be=new Map,st=new Map,lt=new Set,We=new a.LinkedMap,r.func(_.dispose))_.dispose();if(r.func(h.dispose))h.dispose()},"dispose"),listen:i(()=>{Er(),ss(),jt=C.Listening,h.listen(Fo)},"listen"),inspect:i(()=>{(0,t.default)().console.log("inspect")},"inspect")};return J.onNotification(I.type,(y)=>{if(ce===m.Off||!ke)return;let k=ce===m.Verbose||ce===m.Compact;ke.log(y.message,k?y.verbose:void 0)}),J.onNotification(c.type,(y)=>{let k=he.get(y.token);if(k)k(y.value);else Ki.fire(y)}),J}i(M,"createMessageConnection"),e.createMessageConnection=M}});var zd=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=Gv();Object.defineProperty(e,"Message",{enumerable:!0,get:i(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:i(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:i(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:i(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:i(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:i(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:i(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:i(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:i(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:i(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:i(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:i(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:i(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:i(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:i(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:i(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:i(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:i(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:i(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:i(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:i(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:i(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:i(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:i(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:i(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:i(function(){return t.ParameterStructures},"get")});var r=Fv();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:i(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:i(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:i(function(){return r.Touch},"get")});var n=lN();Object.defineProperty(e,"Disposable",{enumerable:!0,get:i(function(){return n.Disposable},"get")});var a=ki();Object.defineProperty(e,"Event",{enumerable:!0,get:i(function(){return a.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:i(function(){return a.Emitter},"get")});var s=qu();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:i(function(){return s.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:i(function(){return s.CancellationToken},"get")});var o=uN();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:i(function(){return o.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:i(function(){return o.SharedArrayReceiverStrategy},"get")});var l=cN();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:i(function(){return l.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:i(function(){return l.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:i(function(){return l.ReadableStreamMessageReader},"get")});var u=fN();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:i(function(){return u.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:i(function(){return u.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:i(function(){return u.WriteableStreamMessageWriter},"get")});var c=dN();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:i(function(){return c.AbstractMessageBuffer},"get")});var f=pN();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:i(function(){return f.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:i(function(){return f.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:i(function(){return f.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:i(function(){return f.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:i(function(){return f.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:i(function(){return f.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:i(function(){return f.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:i(function(){return f.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:i(function(){return f.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:i(function(){return f.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:i(function(){return f.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:i(function(){return f.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:i(function(){return f.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:i(function(){return f.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:i(function(){return f.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:i(function(){return f.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:i(function(){return f.MessageStrategy},"get")});var d=fa();e.RAL=d.default}}),mN=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=zd(),r=class u extends t.AbstractMessageBuffer{static{i(this,"MessageBuffer")}constructor(c="utf-8"){super(c);this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return u.emptyBuffer}fromString(c,f){return new TextEncoder().encode(c)}toString(c,f){if(f==="ascii")return this.asciiDecoder.decode(c);else return new TextDecoder(f).decode(c)}asNative(c,f){if(f===void 0)return c;else return c.slice(0,f)}allocNative(c){return new Uint8Array(c)}};r.emptyBuffer=new Uint8Array(0);var n=class{static{i(this,"ReadableStreamWrapper")}constructor(u){this.socket=u,this._onData=new t.Emitter,this._messageListener=(c)=>{c.data.arrayBuffer().then((d)=>{this._onData.fire(new Uint8Array(d))},()=>{(0,t.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(u){return this.socket.addEventListener("close",u),t.Disposable.create(()=>this.socket.removeEventListener("close",u))}onError(u){return this.socket.addEventListener("error",u),t.Disposable.create(()=>this.socket.removeEventListener("error",u))}onEnd(u){return this.socket.addEventListener("end",u),t.Disposable.create(()=>this.socket.removeEventListener("end",u))}onData(u){return this._onData.event(u)}},a=class{static{i(this,"WritableStreamWrapper")}constructor(u){this.socket=u}onClose(u){return this.socket.addEventListener("close",u),t.Disposable.create(()=>this.socket.removeEventListener("close",u))}onError(u){return this.socket.addEventListener("error",u),t.Disposable.create(()=>this.socket.removeEventListener("error",u))}onEnd(u){return this.socket.addEventListener("end",u),t.Disposable.create(()=>this.socket.removeEventListener("end",u))}write(u,c){if(typeof u==="string"){if(c!==void 0&&c!=="utf-8")throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${c}`);this.socket.send(u)}else this.socket.send(u);return Promise.resolve()}end(){this.socket.close()}},s=new TextEncoder,o=Object.freeze({messageBuffer:Object.freeze({create:i((u)=>new r(u),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:i((u,c)=>{if(c.charset!=="utf-8")throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${c.charset}`);return Promise.resolve(s.encode(JSON.stringify(u,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:i((u,c)=>{if(!(u instanceof Uint8Array))throw Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(c.charset).decode(u)))},"decode")})}),stream:Object.freeze({asReadableStream:i((u)=>new n(u),"asReadableStream"),asWritableStream:i((u)=>new a(u),"asWritableStream")}),console,timer:Object.freeze({setTimeout(u,c,...f){let d=setTimeout(u,c,...f);return{dispose:i(()=>clearTimeout(d),"dispose")}},setImmediate(u,...c){let f=setTimeout(u,0,...c);return{dispose:i(()=>clearTimeout(f),"dispose")}},setInterval(u,c,...f){let d=setInterval(u,c,...f);return{dispose:i(()=>clearInterval(d),"dispose")}}})});function l(){return o}i(l,"RIL"),function(u){function c(){t.RAL.install(o)}i(c,"install"),u.install=c}(l||(l={})),e.default=l}}),Oi=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?function(u,c,f,d){if(d===void 0)d=f;var m=Object.getOwnPropertyDescriptor(c,f);if(!m||("get"in m?!c.__esModule:m.writable||m.configurable))m={enumerable:!0,get:i(function(){return c[f]},"get")};Object.defineProperty(u,d,m)}:function(u,c,f,d){if(d===void 0)d=f;u[d]=c[f]}),r=e&&e.__exportStar||function(u,c){for(var f in u)if(f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f))t(c,u,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0;var n=mN();n.default.install();var a=zd();r(zd(),e);var s=class extends a.AbstractMessageReader{static{i(this,"BrowserMessageReader")}constructor(u){super();this._onData=new a.Emitter,this._messageListener=(c)=>{this._onData.fire(c.data)},u.addEventListener("error",(c)=>this.fireError(c)),u.onmessage=this._messageListener}listen(u){return this._onData.event(u)}};e.BrowserMessageReader=s;var o=class extends a.AbstractMessageWriter{static{i(this,"BrowserMessageWriter")}constructor(u){super();this.port=u,this.errorCount=0,u.addEventListener("error",(c)=>this.fireError(c))}write(u){try{return this.port.postMessage(u),Promise.resolve()}catch(c){return this.handleError(c,u),Promise.reject(c)}}handleError(u,c){this.errorCount++,this.fireError(u,c,this.errorCount)}end(){}};e.BrowserMessageWriter=o;function l(u,c,f,d){if(f===void 0)f=a.NullLogger;if(a.ConnectionStrategy.is(d))d={connectionStrategy:d};return(0,a.createMessageConnection)(u,c,f,d)}i(l,"createMessageConnection"),e.createMessageConnection=l}}),Wy=Z({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){t.exports=Oi()}}),Ne=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=Oi(),r;(function(u){u.clientToServer="clientToServer",u.serverToClient="serverToClient",u.both="both"})(r||(e.MessageDirection=r={}));var n=class{static{i(this,"RegistrationType")}constructor(u){this.method=u}};e.RegistrationType=n;var a=class extends t.RequestType0{static{i(this,"ProtocolRequestType0")}constructor(u){super(u)}};e.ProtocolRequestType0=a;var s=class extends t.RequestType{static{i(this,"ProtocolRequestType")}constructor(u){super(u,t.ParameterStructures.byName)}};e.ProtocolRequestType=s;var o=class extends t.NotificationType0{static{i(this,"ProtocolNotificationType0")}constructor(u){super(u)}};e.ProtocolNotificationType0=o;var l=class extends t.NotificationType{static{i(this,"ProtocolNotificationType")}constructor(u){super(u,t.ParameterStructures.byName)}};e.ProtocolNotificationType=l}}),jp=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(f){return f===!0||f===!1}i(t,"boolean"),e.boolean=t;function r(f){return typeof f==="string"||f instanceof String}i(r,"string"),e.string=r;function n(f){return typeof f==="number"||f instanceof Number}i(n,"number"),e.number=n;function a(f){return f instanceof Error}i(a,"error"),e.error=a;function s(f){return typeof f==="function"}i(s,"func"),e.func=s;function o(f){return Array.isArray(f)}i(o,"array"),e.array=o;function l(f){return o(f)&&f.every((d)=>r(d))}i(l,"stringArray"),e.stringArray=l;function u(f,d){return Array.isArray(f)&&f.every(d)}i(u,"typedArray"),e.typedArray=u;function c(f){return f!==null&&typeof f==="object"}i(c,"objectLiteral"),e.objectLiteral=c}}),hN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=Ne(),r;(function(n){n.method="textDocument/implementation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ImplementationRequest=r={}))}}),yN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=Ne(),r;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.TypeDefinitionRequest=r={}))}}),gN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t=Ne(),r;(function(a){a.method="workspace/workspaceFolders",a.messageDirection=t.MessageDirection.serverToClient,a.type=new t.ProtocolRequestType0(a.method)})(r||(e.WorkspaceFoldersRequest=r={}));var n;(function(a){a.method="workspace/didChangeWorkspaceFolders",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolNotificationType(a.method)})(n||(e.DidChangeWorkspaceFoldersNotification=n={}))}}),vN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=Ne(),r;(function(n){n.method="workspace/configuration",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ConfigurationRequest=r={}))}}),TN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t=Ne(),r;(function(a){a.method="textDocument/documentColor",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.DocumentColorRequest=r={}));var n;(function(a){a.method="textDocument/colorPresentation",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.ColorPresentationRequest=n={}))}}),$N=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t=Ne(),r;(function(a){a.method="textDocument/foldingRange",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.FoldingRangeRequest=r={}));var n;(function(a){a.method="workspace/foldingRange/refresh",a.messageDirection=t.MessageDirection.serverToClient,a.type=new t.ProtocolRequestType0(a.method)})(n||(e.FoldingRangeRefreshRequest=n={}))}}),RN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=Ne(),r;(function(n){n.method="textDocument/declaration",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.DeclarationRequest=r={}))}}),AN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=Ne(),r;(function(n){n.method="textDocument/selectionRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.SelectionRangeRequest=r={}))}}),EN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t=Oi(),r=Ne(),n;(function(o){o.type=new t.ProgressType;function l(u){return u===o.type}i(l,"is"),o.is=l})(n||(e.WorkDoneProgress=n={}));var a;(function(o){o.method="window/workDoneProgress/create",o.messageDirection=r.MessageDirection.serverToClient,o.type=new r.ProtocolRequestType(o.method)})(a||(e.WorkDoneProgressCreateRequest=a={}));var s;(function(o){o.method="window/workDoneProgress/cancel",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolNotificationType(o.method)})(s||(e.WorkDoneProgressCancelNotification=s={}))}}),CN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t=Ne(),r;(function(s){s.method="textDocument/prepareCallHierarchy",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(r||(e.CallHierarchyPrepareRequest=r={}));var n;(function(s){s.method="callHierarchy/incomingCalls",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(n||(e.CallHierarchyIncomingCallsRequest=n={}));var a;(function(s){s.method="callHierarchy/outgoingCalls",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(a||(e.CallHierarchyOutgoingCallsRequest=a={}))}}),bN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t=Ne(),r;(function(u){u.Relative="relative"})(r||(e.TokenFormat=r={}));var n;(function(u){u.method="textDocument/semanticTokens",u.type=new t.RegistrationType(u.method)})(n||(e.SemanticTokensRegistrationType=n={}));var a;(function(u){u.method="textDocument/semanticTokens/full",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method),u.registrationMethod=n.method})(a||(e.SemanticTokensRequest=a={}));var s;(function(u){u.method="textDocument/semanticTokens/full/delta",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method),u.registrationMethod=n.method})(s||(e.SemanticTokensDeltaRequest=s={}));var o;(function(u){u.method="textDocument/semanticTokens/range",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method),u.registrationMethod=n.method})(o||(e.SemanticTokensRangeRequest=o={}));var l;(function(u){u.method="workspace/semanticTokens/refresh",u.messageDirection=t.MessageDirection.serverToClient,u.type=new t.ProtocolRequestType0(u.method)})(l||(e.SemanticTokensRefreshRequest=l={}))}}),_N=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=Ne(),r;(function(n){n.method="window/showDocument",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ShowDocumentRequest=r={}))}}),SN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=Ne(),r;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.LinkedEditingRangeRequest=r={}))}}),wN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t=Ne(),r;(function(c){c.file="file",c.folder="folder"})(r||(e.FileOperationPatternKind=r={}));var n;(function(c){c.method="workspace/willCreateFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method)})(n||(e.WillCreateFilesRequest=n={}));var a;(function(c){c.method="workspace/didCreateFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolNotificationType(c.method)})(a||(e.DidCreateFilesNotification=a={}));var s;(function(c){c.method="workspace/willRenameFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method)})(s||(e.WillRenameFilesRequest=s={}));var o;(function(c){c.method="workspace/didRenameFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolNotificationType(c.method)})(o||(e.DidRenameFilesNotification=o={}));var l;(function(c){c.method="workspace/didDeleteFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolNotificationType(c.method)})(l||(e.DidDeleteFilesNotification=l={}));var u;(function(c){c.method="workspace/willDeleteFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method)})(u||(e.WillDeleteFilesRequest=u={}))}}),IN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=Ne(),r;(function(s){s.document="document",s.project="project",s.group="group",s.scheme="scheme",s.global="global"})(r||(e.UniquenessLevel=r={}));var n;(function(s){s.$import="import",s.$export="export",s.local="local"})(n||(e.MonikerKind=n={}));var a;(function(s){s.method="textDocument/moniker",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(a||(e.MonikerRequest=a={}))}}),NN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=Ne(),r;(function(s){s.method="textDocument/prepareTypeHierarchy",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(r||(e.TypeHierarchyPrepareRequest=r={}));var n;(function(s){s.method="typeHierarchy/supertypes",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(n||(e.TypeHierarchySupertypesRequest=n={}));var a;(function(s){s.method="typeHierarchy/subtypes",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(a||(e.TypeHierarchySubtypesRequest=a={}))}}),PN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t=Ne(),r;(function(a){a.method="textDocument/inlineValue",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.InlineValueRequest=r={}));var n;(function(a){a.method="workspace/inlineValue/refresh",a.messageDirection=t.MessageDirection.serverToClient,a.type=new t.ProtocolRequestType0(a.method)})(n||(e.InlineValueRefreshRequest=n={}))}}),kN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t=Ne(),r;(function(s){s.method="textDocument/inlayHint",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(r||(e.InlayHintRequest=r={}));var n;(function(s){s.method="inlayHint/resolve",s.messageDirection=t.MessageDirection.clientToServer,s.type=new t.ProtocolRequestType(s.method)})(n||(e.InlayHintResolveRequest=n={}));var a;(function(s){s.method="workspace/inlayHint/refresh",s.messageDirection=t.MessageDirection.serverToClient,s.type=new t.ProtocolRequestType0(s.method)})(a||(e.InlayHintRefreshRequest=a={}))}}),ON=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t=Oi(),r=jp(),n=Ne(),a;(function(c){function f(d){let m=d;return m&&r.boolean(m.retriggerRequest)}i(f,"is"),c.is=f})(a||(e.DiagnosticServerCancellationData=a={}));var s;(function(c){c.Full="full",c.Unchanged="unchanged"})(s||(e.DocumentDiagnosticReportKind=s={}));var o;(function(c){c.method="textDocument/diagnostic",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method),c.partialResult=new t.ProgressType})(o||(e.DocumentDiagnosticRequest=o={}));var l;(function(c){c.method="workspace/diagnostic",c.messageDirection=n.MessageDirection.clientToServer,c.type=new n.ProtocolRequestType(c.method),c.partialResult=new t.ProgressType})(l||(e.WorkspaceDiagnosticRequest=l={}));var u;(function(c){c.method="workspace/diagnostic/refresh",c.messageDirection=n.MessageDirection.serverToClient,c.type=new n.ProtocolRequestType0(c.method)})(u||(e.DiagnosticRefreshRequest=u={}))}}),LN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;var t=(vo(),zp(Wu)),r=jp(),n=Ne(),a;(function(v){v.Markup=1,v.Code=2;function S(I){return I===1||I===2}i(S,"is"),v.is=S})(a||(e.NotebookCellKind=a={}));var s;(function(v){function S(N,E){let L={executionOrder:N};if(E===!0||E===!1)L.success=E;return L}i(S,"create"),v.create=S;function I(N){let E=N;return r.objectLiteral(E)&&t.uinteger.is(E.executionOrder)&&(E.success===void 0||r.boolean(E.success))}i(I,"is"),v.is=I;function P(N,E){if(N===E)return!0;if(N===null||N===void 0||E===null||E===void 0)return!1;return N.executionOrder===E.executionOrder&&N.success===E.success}i(P,"equals"),v.equals=P})(s||(e.ExecutionSummary=s={}));var o;(function(v){function S(E,L){return{kind:E,document:L}}i(S,"create"),v.create=S;function I(E){let L=E;return r.objectLiteral(L)&&a.is(L.kind)&&t.DocumentUri.is(L.document)&&(L.metadata===void 0||r.objectLiteral(L.metadata))}i(I,"is"),v.is=I;function P(E,L){let U=new Set;if(E.document!==L.document)U.add("document");if(E.kind!==L.kind)U.add("kind");if(E.executionSummary!==L.executionSummary)U.add("executionSummary");if((E.metadata!==void 0||L.metadata!==void 0)&&!N(E.metadata,L.metadata))U.add("metadata");if((E.executionSummary!==void 0||L.executionSummary!==void 0)&&!s.equals(E.executionSummary,L.executionSummary))U.add("executionSummary");return U}i(P,"diff"),v.diff=P;function N(E,L){if(E===L)return!0;if(E===null||E===void 0||L===null||L===void 0)return!1;if(typeof E!==typeof L)return!1;if(typeof E!=="object")return!1;let U=Array.isArray(E),ee=Array.isArray(L);if(U!==ee)return!1;if(U&&ee){if(E.length!==L.length)return!1;for(let re=0;re<E.length;re++)if(!N(E[re],L[re]))return!1}if(r.objectLiteral(E)&&r.objectLiteral(L)){let re=Object.keys(E),ve=Object.keys(L);if(re.length!==ve.length)return!1;if(re.sort(),ve.sort(),!N(re,ve))return!1;for(let me=0;me<re.length;me++){let De=re[me];if(!N(E[De],L[De]))return!1}}return!0}i(N,"equalsMetadata")})(o||(e.NotebookCell=o={}));var l;(function(v){function S(P,N,E,L){return{uri:P,notebookType:N,version:E,cells:L}}i(S,"create"),v.create=S;function I(P){let N=P;return r.objectLiteral(N)&&r.string(N.uri)&&t.integer.is(N.version)&&r.typedArray(N.cells,o.is)}i(I,"is"),v.is=I})(l||(e.NotebookDocument=l={}));var u;(function(v){v.method="notebookDocument/sync",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.RegistrationType(v.method)})(u||(e.NotebookDocumentSyncRegistrationType=u={}));var c;(function(v){v.method="notebookDocument/didOpen",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.ProtocolNotificationType(v.method),v.registrationMethod=u.method})(c||(e.DidOpenNotebookDocumentNotification=c={}));var f;(function(v){function S(P){let N=P;return r.objectLiteral(N)&&t.uinteger.is(N.start)&&t.uinteger.is(N.deleteCount)&&(N.cells===void 0||r.typedArray(N.cells,o.is))}i(S,"is"),v.is=S;function I(P,N,E){let L={start:P,deleteCount:N};if(E!==void 0)L.cells=E;return L}i(I,"create"),v.create=I})(f||(e.NotebookCellArrayChange=f={}));var d;(function(v){v.method="notebookDocument/didChange",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.ProtocolNotificationType(v.method),v.registrationMethod=u.method})(d||(e.DidChangeNotebookDocumentNotification=d={}));var m;(function(v){v.method="notebookDocument/didSave",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.ProtocolNotificationType(v.method),v.registrationMethod=u.method})(m||(e.DidSaveNotebookDocumentNotification=m={}));var g;(function(v){v.method="notebookDocument/didClose",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.ProtocolNotificationType(v.method),v.registrationMethod=u.method})(g||(e.DidCloseNotebookDocumentNotification=g={}))}}),MN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;var t=Ne(),r;(function(n){n.method="textDocument/inlineCompletion",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.InlineCompletionRequest=r={}))}}),DN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceSymbolRequest=e.CodeActionResolveRequest=e.CodeActionRequest=e.DocumentSymbolRequest=e.DocumentHighlightRequest=e.ReferencesRequest=e.DefinitionRequest=e.SignatureHelpRequest=e.SignatureHelpTriggerKind=e.HoverRequest=e.CompletionResolveRequest=e.CompletionRequest=e.CompletionTriggerKind=e.PublishDiagnosticsNotification=e.WatchKind=e.RelativePattern=e.FileChangeType=e.DidChangeWatchedFilesNotification=e.WillSaveTextDocumentWaitUntilRequest=e.WillSaveTextDocumentNotification=e.TextDocumentSaveReason=e.DidSaveTextDocumentNotification=e.DidCloseTextDocumentNotification=e.DidChangeTextDocumentNotification=e.TextDocumentContentChangeEvent=e.DidOpenTextDocumentNotification=e.TextDocumentSyncKind=e.TelemetryEventNotification=e.LogMessageNotification=e.ShowMessageRequest=e.ShowMessageNotification=e.MessageType=e.DidChangeConfigurationNotification=e.ExitNotification=e.ShutdownRequest=e.InitializedNotification=e.InitializeErrorCodes=e.InitializeRequest=e.WorkDoneProgressOptions=e.TextDocumentRegistrationOptions=e.StaticRegistrationOptions=e.PositionEncodingKind=e.FailureHandlingKind=e.ResourceOperationKind=e.UnregistrationRequest=e.RegistrationRequest=e.DocumentSelector=e.NotebookCellTextDocumentFilter=e.NotebookDocumentFilter=e.TextDocumentFilter=void 0,e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.WillRenameFilesRequest=e.DidRenameFilesNotification=e.WillCreateFilesRequest=e.DidCreateFilesNotification=e.FileOperationPatternKind=e.LinkedEditingRangeRequest=e.ShowDocumentRequest=e.SemanticTokensRegistrationType=e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.TokenFormat=e.CallHierarchyPrepareRequest=e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=e.SelectionRangeRequest=e.DeclarationRequest=e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=e.ColorPresentationRequest=e.DocumentColorRequest=e.ConfigurationRequest=e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=e.TypeDefinitionRequest=e.ImplementationRequest=e.ApplyWorkspaceEditRequest=e.ExecuteCommandRequest=e.PrepareRenameRequest=e.RenameRequest=e.PrepareSupportDefaultBehavior=e.DocumentOnTypeFormattingRequest=e.DocumentRangesFormattingRequest=e.DocumentRangeFormattingRequest=e.DocumentFormattingRequest=e.DocumentLinkResolveRequest=e.DocumentLinkRequest=e.CodeLensRefreshRequest=e.CodeLensResolveRequest=e.CodeLensRequest=e.WorkspaceSymbolResolveRequest=void 0,e.InlineCompletionRequest=e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=e.InlineValueRefreshRequest=e.InlineValueRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchySubtypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=Ne(),r=(vo(),zp(Wu)),n=jp(),a=hN();Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:i(function(){return a.ImplementationRequest},"get")});var s=yN();Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:i(function(){return s.TypeDefinitionRequest},"get")});var o=gN();Object.defineProperty(e,"WorkspaceFoldersRequest",{enumerable:!0,get:i(function(){return o.WorkspaceFoldersRequest},"get")}),Object.defineProperty(e,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:i(function(){return o.DidChangeWorkspaceFoldersNotification},"get")});var l=vN();Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:i(function(){return l.ConfigurationRequest},"get")});var u=TN();Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:i(function(){return u.DocumentColorRequest},"get")}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:i(function(){return u.ColorPresentationRequest},"get")});var c=$N();Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:i(function(){return c.FoldingRangeRequest},"get")}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:i(function(){return c.FoldingRangeRefreshRequest},"get")});var f=RN();Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:i(function(){return f.DeclarationRequest},"get")});var d=AN();Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:i(function(){return d.SelectionRangeRequest},"get")});var m=EN();Object.defineProperty(e,"WorkDoneProgress",{enumerable:!0,get:i(function(){return m.WorkDoneProgress},"get")}),Object.defineProperty(e,"WorkDoneProgressCreateRequest",{enumerable:!0,get:i(function(){return m.WorkDoneProgressCreateRequest},"get")}),Object.defineProperty(e,"WorkDoneProgressCancelNotification",{enumerable:!0,get:i(function(){return m.WorkDoneProgressCancelNotification},"get")});var g=CN();Object.defineProperty(e,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:i(function(){return g.CallHierarchyIncomingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:i(function(){return g.CallHierarchyOutgoingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyPrepareRequest",{enumerable:!0,get:i(function(){return g.CallHierarchyPrepareRequest},"get")});var v=bN();Object.defineProperty(e,"TokenFormat",{enumerable:!0,get:i(function(){return v.TokenFormat},"get")}),Object.defineProperty(e,"SemanticTokensRequest",{enumerable:!0,get:i(function(){return v.SemanticTokensRequest},"get")}),Object.defineProperty(e,"SemanticTokensDeltaRequest",{enumerable:!0,get:i(function(){return v.SemanticTokensDeltaRequest},"get")}),Object.defineProperty(e,"SemanticTokensRangeRequest",{enumerable:!0,get:i(function(){return v.SemanticTokensRangeRequest},"get")}),Object.defineProperty(e,"SemanticTokensRefreshRequest",{enumerable:!0,get:i(function(){return v.SemanticTokensRefreshRequest},"get")}),Object.defineProperty(e,"SemanticTokensRegistrationType",{enumerable:!0,get:i(function(){return v.SemanticTokensRegistrationType},"get")});var S=_N();Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:i(function(){return S.ShowDocumentRequest},"get")});var I=SN();Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:i(function(){return I.LinkedEditingRangeRequest},"get")});var P=wN();Object.defineProperty(e,"FileOperationPatternKind",{enumerable:!0,get:i(function(){return P.FileOperationPatternKind},"get")}),Object.defineProperty(e,"DidCreateFilesNotification",{enumerable:!0,get:i(function(){return P.DidCreateFilesNotification},"get")}),Object.defineProperty(e,"WillCreateFilesRequest",{enumerable:!0,get:i(function(){return P.WillCreateFilesRequest},"get")}),Object.defineProperty(e,"DidRenameFilesNotification",{enumerable:!0,get:i(function(){return P.DidRenameFilesNotification},"get")}),Object.defineProperty(e,"WillRenameFilesRequest",{enumerable:!0,get:i(function(){return P.WillRenameFilesRequest},"get")}),Object.defineProperty(e,"DidDeleteFilesNotification",{enumerable:!0,get:i(function(){return P.DidDeleteFilesNotification},"get")}),Object.defineProperty(e,"WillDeleteFilesRequest",{enumerable:!0,get:i(function(){return P.WillDeleteFilesRequest},"get")});var N=IN();Object.defineProperty(e,"UniquenessLevel",{enumerable:!0,get:i(function(){return N.UniquenessLevel},"get")}),Object.defineProperty(e,"MonikerKind",{enumerable:!0,get:i(function(){return N.MonikerKind},"get")}),Object.defineProperty(e,"MonikerRequest",{enumerable:!0,get:i(function(){return N.MonikerRequest},"get")});var E=NN();Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:i(function(){return E.TypeHierarchyPrepareRequest},"get")}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:i(function(){return E.TypeHierarchySubtypesRequest},"get")}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:i(function(){return E.TypeHierarchySupertypesRequest},"get")});var L=PN();Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:i(function(){return L.InlineValueRequest},"get")}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:i(function(){return L.InlineValueRefreshRequest},"get")});var U=kN();Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:i(function(){return U.InlayHintRequest},"get")}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:i(function(){return U.InlayHintResolveRequest},"get")}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:i(function(){return U.InlayHintRefreshRequest},"get")});var ee=ON();Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:i(function(){return ee.DiagnosticServerCancellationData},"get")}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:i(function(){return ee.DocumentDiagnosticReportKind},"get")}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:i(function(){return ee.DocumentDiagnosticRequest},"get")}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:i(function(){return ee.WorkspaceDiagnosticRequest},"get")}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:i(function(){return ee.DiagnosticRefreshRequest},"get")});var re=LN();Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:i(function(){return re.NotebookCellKind},"get")}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:i(function(){return re.ExecutionSummary},"get")}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:i(function(){return re.NotebookCell},"get")}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:i(function(){return re.NotebookDocument},"get")}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:i(function(){return re.NotebookDocumentSyncRegistrationType},"get")}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:i(function(){return re.DidOpenNotebookDocumentNotification},"get")}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:i(function(){return re.NotebookCellArrayChange},"get")}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:i(function(){return re.DidChangeNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:i(function(){return re.DidSaveNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:i(function(){return re.DidCloseNotebookDocumentNotification},"get")});var ve=MN();Object.defineProperty(e,"InlineCompletionRequest",{enumerable:!0,get:i(function(){return ve.InlineCompletionRequest},"get")});var me;(function(p){function fe(Se){let J=Se;return n.string(J)||(n.string(J.language)||n.string(J.scheme)||n.string(J.pattern))}i(fe,"is"),p.is=fe})(me||(e.TextDocumentFilter=me={}));var De;(function(p){function fe(Se){let J=Se;return n.objectLiteral(J)&&(n.string(J.notebookType)||n.string(J.scheme)||n.string(J.pattern))}i(fe,"is"),p.is=fe})(De||(e.NotebookDocumentFilter=De={}));var C;(function(p){function fe(Se){let J=Se;return n.objectLiteral(J)&&(n.string(J.notebook)||De.is(J.notebook))&&(J.language===void 0||n.string(J.language))}i(fe,"is"),p.is=fe})(C||(e.NotebookCellTextDocumentFilter=C={}));var M;(function(p){function fe(Se){if(!Array.isArray(Se))return!1;for(let J of Se)if(!n.string(J)&&!me.is(J)&&!C.is(J))return!1;return!0}i(fe,"is"),p.is=fe})(M||(e.DocumentSelector=M={}));var h;(function(p){p.method="client/registerCapability",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolRequestType(p.method)})(h||(e.RegistrationRequest=h={}));var _;(function(p){p.method="client/unregisterCapability",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolRequestType(p.method)})(_||(e.UnregistrationRequest=_={}));var R;(function(p){p.Create="create",p.Rename="rename",p.Delete="delete"})(R||(e.ResourceOperationKind=R={}));var A;(function(p){p.Abort="abort",p.Transactional="transactional",p.TextOnlyTransactional="textOnlyTransactional",p.Undo="undo"})(A||(e.FailureHandlingKind=A={}));var w;(function(p){p.UTF8="utf-8",p.UTF16="utf-16",p.UTF32="utf-32"})(w||(e.PositionEncodingKind=w={}));var O;(function(p){function fe(Se){let J=Se;return J&&n.string(J.id)&&J.id.length>0}i(fe,"hasId"),p.hasId=fe})(O||(e.StaticRegistrationOptions=O={}));var B;(function(p){function fe(Se){let J=Se;return J&&(J.documentSelector===null||M.is(J.documentSelector))}i(fe,"is"),p.is=fe})(B||(e.TextDocumentRegistrationOptions=B={}));var G;(function(p){function fe(J){let y=J;return n.objectLiteral(y)&&(y.workDoneProgress===void 0||n.boolean(y.workDoneProgress))}i(fe,"is"),p.is=fe;function Se(J){let y=J;return y&&n.boolean(y.workDoneProgress)}i(Se,"hasWorkDoneProgress"),p.hasWorkDoneProgress=Se})(G||(e.WorkDoneProgressOptions=G={}));var z;(function(p){p.method="initialize",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(z||(e.InitializeRequest=z={}));var Y;(function(p){p.unknownProtocolVersion=1})(Y||(e.InitializeErrorCodes=Y={}));var Q;(function(p){p.method="initialized",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(Q||(e.InitializedNotification=Q={}));var X;(function(p){p.method="shutdown",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType0(p.method)})(X||(e.ShutdownRequest=X={}));var je;(function(p){p.method="exit",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType0(p.method)})(je||(e.ExitNotification=je={}));var he;(function(p){p.method="workspace/didChangeConfiguration",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(he||(e.DidChangeConfigurationNotification=he={}));var Ve;(function(p){p.Error=1,p.Warning=2,p.Info=3,p.Log=4,p.Debug=5})(Ve||(e.MessageType=Ve={}));var We;(function(p){p.method="window/showMessage",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolNotificationType(p.method)})(We||(e.ShowMessageNotification=We={}));var Be;(function(p){p.method="window/showMessageRequest",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolRequestType(p.method)})(Be||(e.ShowMessageRequest=Be={}));var lt;(function(p){p.method="window/logMessage",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolNotificationType(p.method)})(lt||(e.LogMessageNotification=lt={}));var st;(function(p){p.method="telemetry/event",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolNotificationType(p.method)})(st||(e.TelemetryEventNotification=st={}));var ce;(function(p){p.None=0,p.Full=1,p.Incremental=2})(ce||(e.TextDocumentSyncKind=ce={}));var ir;(function(p){p.method="textDocument/didOpen",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(ir||(e.DidOpenTextDocumentNotification=ir={}));var ke;(function(p){function fe(J){let y=J;return y!==void 0&&y!==null&&typeof y.text==="string"&&y.range!==void 0&&(y.rangeLength===void 0||typeof y.rangeLength==="number")}i(fe,"isIncremental"),p.isIncremental=fe;function Se(J){let y=J;return y!==void 0&&y!==null&&typeof y.text==="string"&&y.range===void 0&&y.rangeLength===void 0}i(Se,"isFull"),p.isFull=Se})(ke||(e.TextDocumentContentChangeEvent=ke={}));var jt;(function(p){p.method="textDocument/didChange",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(jt||(e.DidChangeTextDocumentNotification=jt={}));var ka;(function(p){p.method="textDocument/didClose",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(ka||(e.DidCloseTextDocumentNotification=ka={}));var Bi;(function(p){p.method="textDocument/didSave",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(Bi||(e.DidSaveTextDocumentNotification=Bi={}));var Ui;(function(p){p.Manual=1,p.AfterDelay=2,p.FocusOut=3})(Ui||(e.TextDocumentSaveReason=Ui={}));var Ki;(function(p){p.method="textDocument/willSave",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(Ki||(e.WillSaveTextDocumentNotification=Ki={}));var Vi;(function(p){p.method="textDocument/willSaveWaitUntil",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Vi||(e.WillSaveTextDocumentWaitUntilRequest=Vi={}));var Bt;(function(p){p.method="workspace/didChangeWatchedFiles",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(Bt||(e.DidChangeWatchedFilesNotification=Bt={}));var Oa;(function(p){p.Created=1,p.Changed=2,p.Deleted=3})(Oa||(e.FileChangeType=Oa={}));var Wi;(function(p){function fe(Se){let J=Se;return n.objectLiteral(J)&&(r.URI.is(J.baseUri)||r.WorkspaceFolder.is(J.baseUri))&&n.string(J.pattern)}i(fe,"is"),p.is=fe})(Wi||(e.RelativePattern=Wi={}));var qi;(function(p){p.Create=1,p.Change=2,p.Delete=4})(qi||(e.WatchKind=qi={}));var Hi;(function(p){p.method="textDocument/publishDiagnostics",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolNotificationType(p.method)})(Hi||(e.PublishDiagnosticsNotification=Hi={}));var La;(function(p){p.Invoked=1,p.TriggerCharacter=2,p.TriggerForIncompleteCompletions=3})(La||(e.CompletionTriggerKind=La={}));var Ma;(function(p){p.method="textDocument/completion",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Ma||(e.CompletionRequest=Ma={}));var Da;(function(p){p.method="completionItem/resolve",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Da||(e.CompletionResolveRequest=Da={}));var sr;(function(p){p.method="textDocument/hover",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(sr||(e.HoverRequest=sr={}));var xa;(function(p){p.Invoked=1,p.TriggerCharacter=2,p.ContentChange=3})(xa||(e.SignatureHelpTriggerKind=xa={}));var Yi;(function(p){p.method="textDocument/signatureHelp",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Yi||(e.SignatureHelpRequest=Yi={}));var Xi;(function(p){p.method="textDocument/definition",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Xi||(e.DefinitionRequest=Xi={}));var Ga;(function(p){p.method="textDocument/references",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Ga||(e.ReferencesRequest=Ga={}));var Fa;(function(p){p.method="textDocument/documentHighlight",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Fa||(e.DocumentHighlightRequest=Fa={}));var Ji;(function(p){p.method="textDocument/documentSymbol",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Ji||(e.DocumentSymbolRequest=Ji={}));var Fo;(function(p){p.method="textDocument/codeAction",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Fo||(e.CodeActionRequest=Fo={}));var Zi;(function(p){p.method="codeAction/resolve",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Zi||(e.CodeActionResolveRequest=Zi={}));var Qi;(function(p){p.method="workspace/symbol",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Qi||(e.WorkspaceSymbolRequest=Qi={}));var es;(function(p){p.method="workspaceSymbol/resolve",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(es||(e.WorkspaceSymbolResolveRequest=es={}));var ts;(function(p){p.method="textDocument/codeLens",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(ts||(e.CodeLensRequest=ts={}));var Ot;(function(p){p.method="codeLens/resolve",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Ot||(e.CodeLensResolveRequest=Ot={}));var rs;(function(p){p.method="workspace/codeLens/refresh",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolRequestType0(p.method)})(rs||(e.CodeLensRefreshRequest=rs={}));var ns;(function(p){p.method="textDocument/documentLink",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(ns||(e.DocumentLinkRequest=ns={}));var Zr;(function(p){p.method="documentLink/resolve",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Zr||(e.DocumentLinkResolveRequest=Zr={}));var as;(function(p){p.method="textDocument/formatting",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(as||(e.DocumentFormattingRequest=as={}));var In;(function(p){p.method="textDocument/rangeFormatting",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(In||(e.DocumentRangeFormattingRequest=In={}));var is;(function(p){p.method="textDocument/rangesFormatting",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(is||(e.DocumentRangesFormattingRequest=is={}));var or;(function(p){p.method="textDocument/onTypeFormatting",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(or||(e.DocumentOnTypeFormattingRequest=or={}));var Er;(function(p){p.Identifier=1})(Er||(e.PrepareSupportDefaultBehavior=Er={}));var ss;(function(p){p.method="textDocument/rename",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(ss||(e.RenameRequest=ss={}));var os;(function(p){p.method="textDocument/prepareRename",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(os||(e.PrepareRenameRequest=os={}));var br;(function(p){p.method="workspace/executeCommand",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(br||(e.ExecuteCommandRequest=br={}));var za;(function(p){p.method="workspace/applyEdit",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolRequestType("workspace/applyEdit")})(za||(e.ApplyWorkspaceEditRequest=za={}))}}),xN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var t=Oi();function r(n,a,s,o){if(t.ConnectionStrategy.is(o))o={connectionStrategy:o};return(0,t.createMessageConnection)(n,a,s,o)}i(r,"createProtocolConnection"),e.createProtocolConnection=r}}),GN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){var t=e&&e.__createBinding||(Object.create?function(s,o,l,u){if(u===void 0)u=l;var c=Object.getOwnPropertyDescriptor(o,l);if(!c||("get"in c?!o.__esModule:c.writable||c.configurable))c={enumerable:!0,get:i(function(){return o[l]},"get")};Object.defineProperty(s,u,c)}:function(s,o,l,u){if(u===void 0)u=l;s[u]=o[l]}),r=e&&e.__exportStar||function(s,o){for(var l in s)if(l!=="default"&&!Object.prototype.hasOwnProperty.call(o,l))t(o,s,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,r(Oi(),e),r((vo(),zp(Wu)),e),r(Ne(),e),r(DN(),e);var n=xN();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:i(function(){return n.createProtocolConnection},"get")});var a;(function(s){s.lspReservedErrorRangeStart=-32899,s.RequestFailed=-32803,s.ServerCancelled=-32802,s.ContentModified=-32801,s.RequestCancelled=-32800,s.lspReservedErrorRangeEnd=-32800})(a||(e.LSPErrorCodes=a={}))}}),FN=Z({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?function(s,o,l,u){if(u===void 0)u=l;var c=Object.getOwnPropertyDescriptor(o,l);if(!c||("get"in c?!o.__esModule:c.writable||c.configurable))c={enumerable:!0,get:i(function(){return o[l]},"get")};Object.defineProperty(s,u,c)}:function(s,o,l,u){if(u===void 0)u=l;s[u]=o[l]}),r=e&&e.__exportStar||function(s,o){for(var l in s)if(l!=="default"&&!Object.prototype.hasOwnProperty.call(o,l))t(o,s,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=Wy();r(Wy(),e),r(GN(),e);function a(s,o,l,u){return(0,n.createMessageConnection)(s,o,l,u)}i(a,"createProtocolConnection"),e.createProtocolConnection=a}}),Qe={};Cn(Qe,{AbstractAstReflection:()=>Kp,AbstractCstNode:()=>Wh,AbstractLangiumParser:()=>Hh,AbstractParserErrorMessageProvider:()=>_w,AbstractThreadedAsyncParser:()=>mz,AstUtils:()=>Vp,BiMap:()=>lu,Cancellation:()=>Re,CompositeCstNodeImpl:()=>Uc,ContextCache:()=>Xc,CstNodeBuilder:()=>Ew,CstUtils:()=>Bp,DEFAULT_TOKENIZE_OPTIONS:()=>dy,DONE_RESULT:()=>ct,DatatypeSymbol:()=>au,DefaultAstNodeDescriptionProvider:()=>rI,DefaultAstNodeLocator:()=>aI,DefaultAsyncParser:()=>AI,DefaultCommentProvider:()=>RI,DefaultConfigurationProvider:()=>iI,DefaultDocumentBuilder:()=>sI,DefaultDocumentValidator:()=>tI,DefaultHydrator:()=>CI,DefaultIndexManager:()=>oI,DefaultJsonSerializer:()=>Jw,DefaultLangiumDocumentFactory:()=>Bw,DefaultLangiumDocuments:()=>Uw,DefaultLangiumProfiler:()=>Tz,DefaultLexer:()=>py,DefaultLexerErrorMessageProvider:()=>uI,DefaultLinker:()=>Kw,DefaultNameProvider:()=>Vw,DefaultReferenceDescriptionProvider:()=>nI,DefaultReferences:()=>Ww,DefaultScopeComputation:()=>qw,DefaultScopeProvider:()=>Xw,DefaultServiceRegistry:()=>Zw,DefaultTokenBuilder:()=>Wc,DefaultValueConverter:()=>ty,DefaultWorkspaceLock:()=>EI,DefaultWorkspaceManager:()=>lI,Deferred:()=>Wr,Disposable:()=>sa,DisposableCache:()=>Yc,DocumentCache:()=>Yw,DocumentState:()=>te,DocumentValidator:()=>Mt,EMPTY_SCOPE:()=>cz,EMPTY_STREAM:()=>Ri,EmptyFileSystem:()=>le,EmptyFileSystemProvider:()=>SI,ErrorWithLocation:()=>rc,GrammarAST:()=>Uv,GrammarUtils:()=>Rm,IndentationAwareLexer:()=>yz,IndentationAwareTokenBuilder:()=>_I,JSDocDocumentationProvider:()=>$I,LangiumCompletionParser:()=>Sw,LangiumParser:()=>bw,LangiumParserErrorMessageProvider:()=>Yh,LeafCstNodeImpl:()=>nu,LexingMode:()=>ra,MapScope:()=>uz,Module:()=>$p,MultiMap:()=>qr,MultiMapScope:()=>Hw,OperationCancelled:()=>hr,ParserWorker:()=>hz,ProfilingTask:()=>II,Reduction:()=>Qs,RefResolving:()=>xn,RegExpUtils:()=>Em,RootCstNodeImpl:()=>qh,SimpleCache:()=>oy,StreamImpl:()=>mr,StreamScope:()=>yp,TextDocument:()=>su,TreeStreamImpl:()=>Ai,URI:()=>St,UriTrie:()=>iy,UriUtils:()=>dt,VALIDATE_EACH_NODE:()=>eI,ValidationCategory:()=>uu,ValidationRegistry:()=>Qw,ValueConverter:()=>dr,WorkspaceCache:()=>ly,assertCondition:()=>Am,assertUnreachable:()=>bn,createCompletionParser:()=>Zh,createDefaultCoreModule:()=>ae,createDefaultSharedCoreModule:()=>ie,createGrammarConfig:()=>jm,createLangiumParser:()=>Qh,createParser:()=>Kc,delayNextTick:()=>qc,diagnosticData:()=>ta,eagerLoad:()=>$y,getDiagnosticRange:()=>cy,indentationBuilderDefaultOptions:()=>Ap,inject:()=>W,interruptAndCheck:()=>Ze,isAstNode:()=>Ue,isAstNodeDescription:()=>Up,isAstNodeWithComment:()=>uy,isCompositeCstNode:()=>Gr,isIMultiModeLexerDefinition:()=>Qc,isJSDoc:()=>hy,isLeafCstNode:()=>da,isLinkingError:()=>Gn,isMultiReference:()=>yr,isNamed:()=>sy,isOperationCancelled:()=>Pa,isReference:()=>ft,isRootCstNode:()=>Hu,isTokenTypeArray:()=>Zc,isTokenTypeDictionary:()=>cu,loadGrammarFromJson:()=>et,parseJSDoc:()=>my,prepareLangiumParser:()=>ey,setInterruptionPeriod:()=>ry,startCancelableOperation:()=>Hc,stream:()=>ge,toDiagnosticData:()=>fy,toDiagnosticSeverity:()=>Us});var Bp={};Cn(Bp,{DefaultNameRegexp:()=>ym,RangeComparison:()=>pr,compareRange:()=>mm,findCommentNode:()=>gm,findDeclarationNodeAtOffset:()=>lT,findLeafNodeAtOffset:()=>tc,findLeafNodeBeforeOffset:()=>vm,flattenCst:()=>oT,getDatatypeNode:()=>sT,getInteriorNodes:()=>fT,getNextNode:()=>uT,getPreviousNode:()=>$m,getStartlineNode:()=>cT,inRange:()=>hm,isChildNode:()=>pm,isCommentNode:()=>jl,streamCst:()=>_i,toDocumentSegment:()=>Si,tokenToRange:()=>eo});function Ue(e){return typeof e==="object"&&e!==null&&typeof e.$type==="string"}i(Ue,"isAstNode");function ft(e){return typeof e==="object"&&e!==null&&typeof e.$refText==="string"&&"ref"in e}i(ft,"isReference");function yr(e){return typeof e==="object"&&e!==null&&typeof e.$refText==="string"&&"items"in e}i(yr,"isMultiReference");function Up(e){return typeof e==="object"&&e!==null&&typeof e.name==="string"&&typeof e.type==="string"&&typeof e.path==="string"}i(Up,"isAstNodeDescription");function Gn(e){return typeof e==="object"&&e!==null&&typeof e.info==="object"&&typeof e.message==="string"}i(Gn,"isLinkingError");var Kp=class{static{i(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw Error(`Type ${e.container.$type||"undefined"} not found.`);let r=t.properties[e.property]?.referenceType;if(!r)throw Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){let t=this.types[e];if(!t)return{name:e,properties:{},superTypes:[]};return t}isInstance(e,t){return Ue(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];if(!r)r=this.subtypes[e]={};let n=r[t];if(n!==void 0)return n;else{let a=this.types[e],s=a?a.superTypes.some((o)=>this.isSubtype(o,t)):!1;return r[t]=s,s}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;else{let r=this.getAllTypes(),n=[];for(let a of r)if(this.isSubtype(a,e))n.push(a);return this.allSubtypes[e]=n,n}}};function Gr(e){return typeof e==="object"&&e!==null&&Array.isArray(e.content)}i(Gr,"isCompositeCstNode");function da(e){return typeof e==="object"&&e!==null&&typeof e.tokenType==="object"}i(da,"isLeafCstNode");function Hu(e){return Gr(e)&&typeof e.fullText==="string"}i(Hu,"isRootCstNode");var mr=class e{static{i(this,"StreamImpl")}constructor(t,r){this.startFn=t,this.nextFn=r}iterator(){let t={state:this.startFn(),next:i(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){let t=this.iterator();return Boolean(t.next().done)}count(){let t=this.iterator(),r=0,n=t.next();while(!n.done)r++,n=t.next();return r}toArray(){let t=[],r=this.iterator(),n;do if(n=r.next(),n.value!==void 0)t.push(n.value);while(!n.done);return t}toSet(){return new Set(this)}toMap(t,r){let n=this.map((a)=>[t?t(a):a,r?r(a):a]);return new Map(n)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),(r)=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return ct})}join(t=","){let r=this.iterator(),n="",a,s=!1;do{if(a=r.next(),!a.done){if(s)n+=t;n+=jv(a.value)}s=!0}while(!a.done);return n}indexOf(t,r=0){let n=this.iterator(),a=0,s=n.next();while(!s.done){if(a>=r&&s.value===t)return a;s=n.next(),a++}return-1}every(t){let r=this.iterator(),n=r.next();while(!n.done){if(!t(n.value))return!1;n=r.next()}return!0}some(t){let r=this.iterator(),n=r.next();while(!n.done){if(t(n.value))return!0;n=r.next()}return!1}forEach(t){let r=this.iterator(),n=0,a=r.next();while(!a.done)t(a.value,n),a=r.next(),n++}map(t){return new e(this.startFn,(r)=>{let{done:n,value:a}=this.nextFn(r);if(n)return ct;else return{done:!1,value:t(a)}})}filter(t){return new e(this.startFn,(r)=>{let n;do if(n=this.nextFn(r),!n.done&&t(n.value))return n;while(!n.done);return ct})}nonNullable(){return this.filter((t)=>t!==void 0&&t!==null)}reduce(t,r){let n=this.iterator(),a=r,s=n.next();while(!s.done){if(a===void 0)a=s.value;else a=t(a,s.value);s=n.next()}return a}reduceRight(t,r){return this.recursiveReduce(this.iterator(),t,r)}recursiveReduce(t,r,n){let a=t.next();if(a.done)return n;let s=this.recursiveReduce(t,r,n);if(s===void 0)return a.value;return r(s,a.value)}find(t){let r=this.iterator(),n=r.next();while(!n.done){if(t(n.value))return n.value;n=r.next()}return}findIndex(t){let r=this.iterator(),n=0,a=r.next();while(!a.done){if(t(a.value))return n;a=r.next(),n++}return-1}includes(t){let r=this.iterator(),n=r.next();while(!n.done){if(n.value===t)return!0;n=r.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),(r)=>{do{if(r.iterator){let s=r.iterator.next();if(s.done)r.iterator=void 0;else return s}let{done:n,value:a}=this.nextFn(r.this);if(!n){let s=t(a);if(Zs(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(r.iterator);return ct})}flat(t){if(t===void 0)t=1;if(t<=0)return this;let r=t>1?this.flat(t-1):this;return new e(()=>({this:r.startFn()}),(n)=>{do{if(n.iterator){let o=n.iterator.next();if(o.done)n.iterator=void 0;else return o}let{done:a,value:s}=r.nextFn(n.this);if(!a)if(Zs(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(n.iterator);return ct})}head(){let r=this.iterator().next();if(r.done)return;return r.value}tail(t=1){return new e(()=>{let r=this.startFn();for(let n=0;n<t;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(t){return new e(()=>({size:0,state:this.startFn()}),(r)=>{if(r.size++,r.size>t)return ct;return this.nextFn(r.state)})}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),(r)=>{let n;do if(n=this.nextFn(r.internalState),!n.done){let a=t?t(n.value):n.value;if(!r.set.has(a))return r.set.add(a),n}while(!n.done);return ct})}exclude(t,r){let n=new Set;for(let a of t){let s=r?r(a):a;n.add(s)}return this.filter((a)=>{let s=r?r(a):a;return!n.has(s)})}};function jv(e){if(typeof e==="string")return e;if(typeof e>"u")return"undefined";if(typeof e.toString==="function")return e.toString();return Object.prototype.toString.call(e)}i(jv,"toString");function Zs(e){return!!e&&typeof e[Symbol.iterator]==="function"}i(Zs,"isIterable");var Ri=new mr(()=>{return},()=>ct),ct=Object.freeze({done:!0,value:void 0});function ge(...e){if(e.length===1){let t=e[0];if(t instanceof mr)return t;if(Zs(t))return new mr(()=>t[Symbol.iterator](),(r)=>r.next());if(typeof t.length==="number")return new mr(()=>({index:0}),(r)=>{if(r.index<t.length)return{done:!1,value:t[r.index++]};else return ct})}if(e.length>1)return new mr(()=>({collIndex:0,arrIndex:0}),(t)=>{do{if(t.iterator){let r=t.iterator.next();if(!r.done)return r;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){let r=e[t.collIndex++];if(Zs(r))t.iterator=r[Symbol.iterator]();else if(r&&typeof r.length==="number")t.array=r}}while(t.iterator||t.array||t.collIndex<e.length);return ct});return Ri}i(ge,"stream");var Ai=class extends mr{static{i(this,"TreeStreamImpl")}constructor(e,t,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),(n)=>{if(n.pruned)n.iterators.pop(),n.pruned=!1;while(n.iterators.length>0){let s=n.iterators[n.iterators.length-1].next();if(s.done)n.iterators.pop();else return n.iterators.push(t(s.value)[Symbol.iterator]()),s}return ct})}iterator(){let e={state:this.startFn(),next:i(()=>this.nextFn(e.state),"next"),prune:i(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},Qs;(function(e){function t(s){return s.reduce((o,l)=>o+l,0)}i(t,"sum"),e.sum=t;function r(s){return s.reduce((o,l)=>o*l,0)}i(r,"product"),e.product=r;function n(s){return s.reduce((o,l)=>Math.min(o,l))}i(n,"min"),e.min=n;function a(s){return s.reduce((o,l)=>Math.max(o,l))}i(a,"max"),e.max=a})(Qs||(Qs={}));var Vp={};Cn(Vp,{assignMandatoryProperties:()=>Wp,copyAstNode:()=>Sl,findRootNode:()=>mi,getContainerOfType:()=>pa,getDocument:()=>Ht,getReferenceNodes:()=>bl,hasContainerOfType:()=>Bv,linkContentToContainer:()=>Ei,streamAllContents:()=>Hr,streamAst:()=>Yt,streamContents:()=>$o,streamReferences:()=>Ci});function Ei(e,t={}){for(let[r,n]of Object.entries(e))if(!r.startsWith("$")){if(Array.isArray(n))n.forEach((a,s)=>{if(Ue(a)){if(a.$container=e,a.$containerProperty=r,a.$containerIndex=s,t.deep)Ei(a,t)}});else if(Ue(n)){if(n.$container=e,n.$containerProperty=r,t.deep)Ei(n,t)}}}i(Ei,"linkContentToContainer");function pa(e,t){let r=e;while(r){if(t(r))return r;r=r.$container}return}i(pa,"getContainerOfType");function Bv(e,t){let r=e;while(r){if(t(r))return!0;r=r.$container}return!1}i(Bv,"hasContainerOfType");function Ht(e){let r=mi(e).$document;if(!r)throw Error("AST node has no document.");return r}i(Ht,"getDocument");function mi(e){while(e.$container)e=e.$container;return e}i(mi,"findRootNode");function bl(e){if(ft(e))return e.ref?[e.ref]:[];else if(yr(e))return e.items.map((t)=>t.ref);return[]}i(bl,"getReferenceNodes");function $o(e,t){if(!e)throw Error("Node must be an AstNode.");let r=t?.range;return new mr(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),(n)=>{while(n.keyIndex<n.keys.length){let a=n.keys[n.keyIndex];if(!a.startsWith("$")){let s=e[a];if(Ue(s)){if(n.keyIndex++,_l(s,r))return{done:!1,value:s}}else if(Array.isArray(s)){while(n.arrayIndex<s.length){let o=n.arrayIndex++,l=s[o];if(Ue(l)&&_l(l,r))return{done:!1,value:l}}n.arrayIndex=0}}n.keyIndex++}return ct})}i($o,"streamContents");function Hr(e,t){if(!e)throw Error("Root node must be an AstNode.");return new Ai(e,(r)=>$o(r,t))}i(Hr,"streamAllContents");function Yt(e,t){if(!e)throw Error("Root node must be an AstNode.");else if(t?.range&&!_l(e,t.range))return new Ai(e,()=>[]);return new Ai(e,(r)=>$o(r,t),{includeRoot:!0})}i(Yt,"streamAst");function _l(e,t){if(!t)return!0;let r=e.$cstNode?.range;if(!r)return!1;return hm(r,t)}i(_l,"isAstNodeInRange");function Ci(e){return new mr(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),(t)=>{while(t.keyIndex<t.keys.length){let r=t.keys[t.keyIndex];if(!r.startsWith("$")){let n=e[r];if(ft(n)||yr(n))return t.keyIndex++,{done:!1,value:{reference:n,container:e,property:r}};else if(Array.isArray(n)){while(t.arrayIndex<n.length){let a=t.arrayIndex++,s=n[a];if(ft(s)||yr(n))return{done:!1,value:{reference:s,container:e,property:r,index:a}}}t.arrayIndex=0}}t.keyIndex++}return ct})}i(Ci,"streamReferences");function Wp(e,t){let r=e.getTypeMetaData(t.$type),n=t;for(let a of Object.values(r.properties))if(a.defaultValue!==void 0&&n[a.name]===void 0)n[a.name]=qp(a.defaultValue)}i(Wp,"assignMandatoryProperties");function qp(e){if(Array.isArray(e))return[...e.map(qp)];else return e}i(qp,"copyDefaultValue");function Sl(e,t,r){let n={$type:e.$type};if(r)r.set(e,n),r.set(n,e);for(let[a,s]of Object.entries(e))if(!a.startsWith("$"))if(Ue(s))n[a]=Sl(s,t,r);else if(ft(s))n[a]=t(n,a,s.$refNode,s.$refText,s);else if(Array.isArray(s)){let o=[];for(let l of s)if(Ue(l))o.push(Sl(l,t,r));else if(ft(l))o.push(t(n,a,l.$refNode,l.$refText,l));else o.push(l);n[a]=o}else n[a]=s;return Ei(n,{deep:!0}),n}i(Sl,"copyAstNode");var Uv={};Cn(Uv,{AbstractElement:()=>Tt,AbstractParserRule:()=>Is,AbstractRule:()=>Ya,AbstractType:()=>_t,Action:()=>en,Alternatives:()=>Ns,ArrayLiteral:()=>wl,ArrayType:()=>Il,Assignment:()=>tn,BooleanLiteral:()=>Nl,CharacterRange:()=>rn,Condition:()=>nn,Conjunction:()=>Ps,CrossReference:()=>an,Disjunction:()=>ks,EndOfFile:()=>Pl,Grammar:()=>wr,GrammarImport:()=>kl,Group:()=>Fn,InferredType:()=>Ol,InfixRule:()=>fr,InfixRuleOperatorList:()=>Os,InfixRuleOperators:()=>Ll,Interface:()=>Xa,Keyword:()=>Ja,LangiumGrammarAstReflection:()=>dm,LangiumGrammarTerminals:()=>zN,NamedArgument:()=>Za,NegatedToken:()=>zn,Negation:()=>Ml,NumberLiteral:()=>Dl,Parameter:()=>Qa,ParameterReference:()=>xl,ParserRule:()=>Ut,ReferenceType:()=>Ls,RegexToken:()=>jn,ReturnType:()=>Gl,RuleCall:()=>Bn,SimpleType:()=>fi,StringLiteral:()=>Fl,TerminalAlternatives:()=>Un,TerminalElement:()=>$t,TerminalGroup:()=>Kn,TerminalRule:()=>Ir,TerminalRuleCall:()=>Vn,Type:()=>Ms,TypeAttribute:()=>Wn,TypeDefinition:()=>qn,UnionType:()=>zl,UnorderedGroup:()=>Ds,UntilToken:()=>Hn,ValueLiteral:()=>Yn,Wildcard:()=>di,isAbstractElement:()=>Yu,isAbstractParserRule:()=>ma,isAbstractRule:()=>Kv,isAbstractType:()=>Vv,isAction:()=>Tn,isAlternatives:()=>Xu,isArrayLiteral:()=>Wv,isArrayType:()=>Hp,isAssignment:()=>Fr,isBooleanLiteral:()=>Yp,isCharacterRange:()=>Xp,isCondition:()=>qv,isConjunction:()=>Jp,isCrossReference:()=>ha,isDisjunction:()=>Zp,isEndOfFile:()=>Qp,isGrammar:()=>Hv,isGrammarImport:()=>Yv,isGroup:()=>ya,isInferredType:()=>Ro,isInfixRule:()=>bi,isInfixRuleOperatorList:()=>Xv,isInfixRuleOperators:()=>Jv,isInterface:()=>em,isKeyword:()=>zr,isNamedArgument:()=>Zv,isNegatedToken:()=>tm,isNegation:()=>rm,isNumberLiteral:()=>Qv,isParameter:()=>eT,isParameterReference:()=>nm,isParserRule:()=>mt,isReferenceType:()=>am,isRegexToken:()=>im,isReturnType:()=>sm,isRuleCall:()=>jr,isSimpleType:()=>Ju,isStringLiteral:()=>tT,isTerminalAlternatives:()=>om,isTerminalElement:()=>rT,isTerminalGroup:()=>lm,isTerminalRule:()=>Ft,isTerminalRuleCall:()=>Zu,isType:()=>Qu,isTypeAttribute:()=>nT,isTypeDefinition:()=>aT,isUnionType:()=>um,isUnorderedGroup:()=>ec,isUntilToken:()=>cm,isValueLiteral:()=>iT,isWildcard:()=>fm,reflection:()=>K});var zN={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},Tt={$type:"AbstractElement",cardinality:"cardinality"};function Yu(e){return K.isInstance(e,Tt.$type)}i(Yu,"isAbstractElement");var Is={$type:"AbstractParserRule"};function ma(e){return K.isInstance(e,Is.$type)}i(ma,"isAbstractParserRule");var Ya={$type:"AbstractRule"};function Kv(e){return K.isInstance(e,Ya.$type)}i(Kv,"isAbstractRule");var _t={$type:"AbstractType"};function Vv(e){return K.isInstance(e,_t.$type)}i(Vv,"isAbstractType");var en={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Tn(e){return K.isInstance(e,en.$type)}i(Tn,"isAction");var Ns={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function Xu(e){return K.isInstance(e,Ns.$type)}i(Xu,"isAlternatives");var wl={$type:"ArrayLiteral",elements:"elements"};function Wv(e){return K.isInstance(e,wl.$type)}i(Wv,"isArrayLiteral");var Il={$type:"ArrayType",elementType:"elementType"};function Hp(e){return K.isInstance(e,Il.$type)}i(Hp,"isArrayType");var tn={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Fr(e){return K.isInstance(e,tn.$type)}i(Fr,"isAssignment");var Nl={$type:"BooleanLiteral",true:"true"};function Yp(e){return K.isInstance(e,Nl.$type)}i(Yp,"isBooleanLiteral");var rn={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Xp(e){return K.isInstance(e,rn.$type)}i(Xp,"isCharacterRange");var nn={$type:"Condition"};function qv(e){return K.isInstance(e,nn.$type)}i(qv,"isCondition");var Ps={$type:"Conjunction",left:"left",right:"right"};function Jp(e){return K.isInstance(e,Ps.$type)}i(Jp,"isConjunction");var an={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function ha(e){return K.isInstance(e,an.$type)}i(ha,"isCrossReference");var ks={$type:"Disjunction",left:"left",right:"right"};function Zp(e){return K.isInstance(e,ks.$type)}i(Zp,"isDisjunction");var Pl={$type:"EndOfFile",cardinality:"cardinality"};function Qp(e){return K.isInstance(e,Pl.$type)}i(Qp,"isEndOfFile");var wr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function Hv(e){return K.isInstance(e,wr.$type)}i(Hv,"isGrammar");var kl={$type:"GrammarImport",path:"path"};function Yv(e){return K.isInstance(e,kl.$type)}i(Yv,"isGrammarImport");var Fn={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function ya(e){return K.isInstance(e,Fn.$type)}i(ya,"isGroup");var Ol={$type:"InferredType",name:"name"};function Ro(e){return K.isInstance(e,Ol.$type)}i(Ro,"isInferredType");var fr={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function bi(e){return K.isInstance(e,fr.$type)}i(bi,"isInfixRule");var Os={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function Xv(e){return K.isInstance(e,Os.$type)}i(Xv,"isInfixRuleOperatorList");var Ll={$type:"InfixRuleOperators",precedences:"precedences"};function Jv(e){return K.isInstance(e,Ll.$type)}i(Jv,"isInfixRuleOperators");var Xa={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function em(e){return K.isInstance(e,Xa.$type)}i(em,"isInterface");var Ja={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function zr(e){return K.isInstance(e,Ja.$type)}i(zr,"isKeyword");var Za={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function Zv(e){return K.isInstance(e,Za.$type)}i(Zv,"isNamedArgument");var zn={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function tm(e){return K.isInstance(e,zn.$type)}i(tm,"isNegatedToken");var Ml={$type:"Negation",value:"value"};function rm(e){return K.isInstance(e,Ml.$type)}i(rm,"isNegation");var Dl={$type:"NumberLiteral",value:"value"};function Qv(e){return K.isInstance(e,Dl.$type)}i(Qv,"isNumberLiteral");var Qa={$type:"Parameter",name:"name"};function eT(e){return K.isInstance(e,Qa.$type)}i(eT,"isParameter");var xl={$type:"ParameterReference",parameter:"parameter"};function nm(e){return K.isInstance(e,xl.$type)}i(nm,"isParameterReference");var Ut={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function mt(e){return K.isInstance(e,Ut.$type)}i(mt,"isParserRule");var Ls={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function am(e){return K.isInstance(e,Ls.$type)}i(am,"isReferenceType");var jn={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function im(e){return K.isInstance(e,jn.$type)}i(im,"isRegexToken");var Gl={$type:"ReturnType",name:"name"};function sm(e){return K.isInstance(e,Gl.$type)}i(sm,"isReturnType");var Bn={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function jr(e){return K.isInstance(e,Bn.$type)}i(jr,"isRuleCall");var fi={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Ju(e){return K.isInstance(e,fi.$type)}i(Ju,"isSimpleType");var Fl={$type:"StringLiteral",value:"value"};function tT(e){return K.isInstance(e,Fl.$type)}i(tT,"isStringLiteral");var Un={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function om(e){return K.isInstance(e,Un.$type)}i(om,"isTerminalAlternatives");var $t={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function rT(e){return K.isInstance(e,$t.$type)}i(rT,"isTerminalElement");var Kn={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function lm(e){return K.isInstance(e,Kn.$type)}i(lm,"isTerminalGroup");var Ir={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function Ft(e){return K.isInstance(e,Ir.$type)}i(Ft,"isTerminalRule");var Vn={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Zu(e){return K.isInstance(e,Vn.$type)}i(Zu,"isTerminalRuleCall");var Ms={$type:"Type",name:"name",type:"type"};function Qu(e){return K.isInstance(e,Ms.$type)}i(Qu,"isType");var Wn={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function nT(e){return K.isInstance(e,Wn.$type)}i(nT,"isTypeAttribute");var qn={$type:"TypeDefinition"};function aT(e){return K.isInstance(e,qn.$type)}i(aT,"isTypeDefinition");var zl={$type:"UnionType",types:"types"};function um(e){return K.isInstance(e,zl.$type)}i(um,"isUnionType");var Ds={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function ec(e){return K.isInstance(e,Ds.$type)}i(ec,"isUnorderedGroup");var Hn={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function cm(e){return K.isInstance(e,Hn.$type)}i(cm,"isUntilToken");var Yn={$type:"ValueLiteral"};function iT(e){return K.isInstance(e,Yn.$type)}i(iT,"isValueLiteral");var di={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function fm(e){return K.isInstance(e,di.$type)}i(fm,"isWildcard");var dm=class extends Kp{static{i(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments);this.types={AbstractElement:{name:Tt.$type,properties:{cardinality:{name:Tt.cardinality}},superTypes:[]},AbstractParserRule:{name:Is.$type,properties:{},superTypes:[Ya.$type,_t.$type]},AbstractRule:{name:Ya.$type,properties:{},superTypes:[]},AbstractType:{name:_t.$type,properties:{},superTypes:[]},Action:{name:en.$type,properties:{cardinality:{name:en.cardinality},feature:{name:en.feature},inferredType:{name:en.inferredType},operator:{name:en.operator},type:{name:en.type,referenceType:_t.$type}},superTypes:[Tt.$type]},Alternatives:{name:Ns.$type,properties:{cardinality:{name:Ns.cardinality},elements:{name:Ns.elements,defaultValue:[]}},superTypes:[Tt.$type]},ArrayLiteral:{name:wl.$type,properties:{elements:{name:wl.elements,defaultValue:[]}},superTypes:[Yn.$type]},ArrayType:{name:Il.$type,properties:{elementType:{name:Il.elementType}},superTypes:[qn.$type]},Assignment:{name:tn.$type,properties:{cardinality:{name:tn.cardinality},feature:{name:tn.feature},operator:{name:tn.operator},predicate:{name:tn.predicate},terminal:{name:tn.terminal}},superTypes:[Tt.$type]},BooleanLiteral:{name:Nl.$type,properties:{true:{name:Nl.true,defaultValue:!1}},superTypes:[nn.$type,Yn.$type]},CharacterRange:{name:rn.$type,properties:{cardinality:{name:rn.cardinality},left:{name:rn.left},lookahead:{name:rn.lookahead},parenthesized:{name:rn.parenthesized,defaultValue:!1},right:{name:rn.right}},superTypes:[$t.$type]},Condition:{name:nn.$type,properties:{},superTypes:[]},Conjunction:{name:Ps.$type,properties:{left:{name:Ps.left},right:{name:Ps.right}},superTypes:[nn.$type]},CrossReference:{name:an.$type,properties:{cardinality:{name:an.cardinality},deprecatedSyntax:{name:an.deprecatedSyntax,defaultValue:!1},isMulti:{name:an.isMulti,defaultValue:!1},terminal:{name:an.terminal},type:{name:an.type,referenceType:_t.$type}},superTypes:[Tt.$type]},Disjunction:{name:ks.$type,properties:{left:{name:ks.left},right:{name:ks.right}},superTypes:[nn.$type]},EndOfFile:{name:Pl.$type,properties:{cardinality:{name:Pl.cardinality}},superTypes:[Tt.$type]},Grammar:{name:wr.$type,properties:{imports:{name:wr.imports,defaultValue:[]},interfaces:{name:wr.interfaces,defaultValue:[]},isDeclared:{name:wr.isDeclared,defaultValue:!1},name:{name:wr.name},rules:{name:wr.rules,defaultValue:[]},types:{name:wr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:kl.$type,properties:{path:{name:kl.path}},superTypes:[]},Group:{name:Fn.$type,properties:{cardinality:{name:Fn.cardinality},elements:{name:Fn.elements,defaultValue:[]},guardCondition:{name:Fn.guardCondition},predicate:{name:Fn.predicate}},superTypes:[Tt.$type]},InferredType:{name:Ol.$type,properties:{name:{name:Ol.name}},superTypes:[_t.$type]},InfixRule:{name:fr.$type,properties:{call:{name:fr.call},dataType:{name:fr.dataType},inferredType:{name:fr.inferredType},name:{name:fr.name},operators:{name:fr.operators},parameters:{name:fr.parameters,defaultValue:[]},returnType:{name:fr.returnType,referenceType:_t.$type}},superTypes:[Is.$type]},InfixRuleOperatorList:{name:Os.$type,properties:{associativity:{name:Os.associativity},operators:{name:Os.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Ll.$type,properties:{precedences:{name:Ll.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Xa.$type,properties:{attributes:{name:Xa.attributes,defaultValue:[]},name:{name:Xa.name},superTypes:{name:Xa.superTypes,defaultValue:[],referenceType:_t.$type}},superTypes:[_t.$type]},Keyword:{name:Ja.$type,properties:{cardinality:{name:Ja.cardinality},predicate:{name:Ja.predicate},value:{name:Ja.value}},superTypes:[Tt.$type]},NamedArgument:{name:Za.$type,properties:{calledByName:{name:Za.calledByName,defaultValue:!1},parameter:{name:Za.parameter,referenceType:Qa.$type},value:{name:Za.value}},superTypes:[]},NegatedToken:{name:zn.$type,properties:{cardinality:{name:zn.cardinality},lookahead:{name:zn.lookahead},parenthesized:{name:zn.parenthesized,defaultValue:!1},terminal:{name:zn.terminal}},superTypes:[$t.$type]},Negation:{name:Ml.$type,properties:{value:{name:Ml.value}},superTypes:[nn.$type]},NumberLiteral:{name:Dl.$type,properties:{value:{name:Dl.value}},superTypes:[Yn.$type]},Parameter:{name:Qa.$type,properties:{name:{name:Qa.name}},superTypes:[]},ParameterReference:{name:xl.$type,properties:{parameter:{name:xl.parameter,referenceType:Qa.$type}},superTypes:[nn.$type]},ParserRule:{name:Ut.$type,properties:{dataType:{name:Ut.dataType},definition:{name:Ut.definition},entry:{name:Ut.entry,defaultValue:!1},fragment:{name:Ut.fragment,defaultValue:!1},inferredType:{name:Ut.inferredType},name:{name:Ut.name},parameters:{name:Ut.parameters,defaultValue:[]},returnType:{name:Ut.returnType,referenceType:_t.$type}},superTypes:[Is.$type]},ReferenceType:{name:Ls.$type,properties:{isMulti:{name:Ls.isMulti,defaultValue:!1},referenceType:{name:Ls.referenceType}},superTypes:[qn.$type]},RegexToken:{name:jn.$type,properties:{cardinality:{name:jn.cardinality},lookahead:{name:jn.lookahead},parenthesized:{name:jn.parenthesized,defaultValue:!1},regex:{name:jn.regex}},superTypes:[$t.$type]},ReturnType:{name:Gl.$type,properties:{name:{name:Gl.name}},superTypes:[]},RuleCall:{name:Bn.$type,properties:{arguments:{name:Bn.arguments,defaultValue:[]},cardinality:{name:Bn.cardinality},predicate:{name:Bn.predicate},rule:{name:Bn.rule,referenceType:Ya.$type}},superTypes:[Tt.$type]},SimpleType:{name:fi.$type,properties:{primitiveType:{name:fi.primitiveType},stringType:{name:fi.stringType},typeRef:{name:fi.typeRef,referenceType:_t.$type}},superTypes:[qn.$type]},StringLiteral:{name:Fl.$type,properties:{value:{name:Fl.value}},superTypes:[Yn.$type]},TerminalAlternatives:{name:Un.$type,properties:{cardinality:{name:Un.cardinality},elements:{name:Un.elements,defaultValue:[]},lookahead:{name:Un.lookahead},parenthesized:{name:Un.parenthesized,defaultValue:!1}},superTypes:[$t.$type]},TerminalElement:{name:$t.$type,properties:{cardinality:{name:$t.cardinality},lookahead:{name:$t.lookahead},parenthesized:{name:$t.parenthesized,defaultValue:!1}},superTypes:[Tt.$type]},TerminalGroup:{name:Kn.$type,properties:{cardinality:{name:Kn.cardinality},elements:{name:Kn.elements,defaultValue:[]},lookahead:{name:Kn.lookahead},parenthesized:{name:Kn.parenthesized,defaultValue:!1}},superTypes:[$t.$type]},TerminalRule:{name:Ir.$type,properties:{definition:{name:Ir.definition},fragment:{name:Ir.fragment,defaultValue:!1},hidden:{name:Ir.hidden,defaultValue:!1},name:{name:Ir.name},type:{name:Ir.type}},superTypes:[Ya.$type]},TerminalRuleCall:{name:Vn.$type,properties:{cardinality:{name:Vn.cardinality},lookahead:{name:Vn.lookahead},parenthesized:{name:Vn.parenthesized,defaultValue:!1},rule:{name:Vn.rule,referenceType:Ir.$type}},superTypes:[$t.$type]},Type:{name:Ms.$type,properties:{name:{name:Ms.name},type:{name:Ms.type}},superTypes:[_t.$type]},TypeAttribute:{name:Wn.$type,properties:{defaultValue:{name:Wn.defaultValue},isOptional:{name:Wn.isOptional,defaultValue:!1},name:{name:Wn.name},type:{name:Wn.type}},superTypes:[]},TypeDefinition:{name:qn.$type,properties:{},superTypes:[]},UnionType:{name:zl.$type,properties:{types:{name:zl.types,defaultValue:[]}},superTypes:[qn.$type]},UnorderedGroup:{name:Ds.$type,properties:{cardinality:{name:Ds.cardinality},elements:{name:Ds.elements,defaultValue:[]}},superTypes:[Tt.$type]},UntilToken:{name:Hn.$type,properties:{cardinality:{name:Hn.cardinality},lookahead:{name:Hn.lookahead},parenthesized:{name:Hn.parenthesized,defaultValue:!1},terminal:{name:Hn.terminal}},superTypes:[$t.$type]},ValueLiteral:{name:Yn.$type,properties:{},superTypes:[]},Wildcard:{name:di.$type,properties:{cardinality:{name:di.cardinality},lookahead:{name:di.lookahead},parenthesized:{name:di.parenthesized,defaultValue:!1}},superTypes:[$t.$type]}}}},K=new dm;function sT(e){let t=e,r=!1;while(t){let n=pa(t.grammarSource,mt);if(n&&n.dataType)t=t.container,r=!0;else if(r)return t;else return}return}i(sT,"getDatatypeNode");function _i(e){return new Ai(e,(t)=>{if(Gr(t))return t.content;else return[]},{includeRoot:!0})}i(_i,"streamCst");function oT(e){return _i(e).filter(da)}i(oT,"flattenCst");function pm(e,t){while(e.container)if(e=e.container,e===t)return!0;return!1}i(pm,"isChildNode");function eo(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}i(eo,"tokenToRange");function Si(e){if(!e)return;let{offset:t,end:r,range:n}=e;return{range:n,offset:t,end:r,length:r-t}}i(Si,"toDocumentSegment");var pr;(function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside",e[e.Outside=5]="Outside"})(pr||(pr={}));function mm(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return pr.Before;else if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return pr.After;let r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,n=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;if(r&&n)return pr.Inside;else if(r)return pr.OverlapBack;else if(n)return pr.OverlapFront;else return pr.Outside}i(mm,"compareRange");function hm(e,t){return mm(e,t)>pr.After}i(hm,"inRange");var ym=/^[\w\p{L}]$/u;function lT(e,t,r=ym){if(e){if(t>0){let n=t-e.offset,a=e.text.charAt(n);if(!r.test(a))t--}return tc(e,t)}return}i(lT,"findDeclarationNodeAtOffset");function gm(e,t){if(e){let r=$m(e,!0);if(r&&jl(r,t))return r;if(Hu(e)){let n=e.content.findIndex((a)=>!a.hidden);for(let a=n-1;a>=0;a--){let s=e.content[a];if(jl(s,t))return s}}}return}i(gm,"findCommentNode");function jl(e,t){return da(e)&&t.includes(e.tokenType.name)}i(jl,"isCommentNode");function tc(e,t){if(da(e))return e;else if(Gr(e)){let r=Tm(e,t,!1);if(r)return tc(r,t)}return}i(tc,"findLeafNodeAtOffset");function vm(e,t){if(da(e))return e;else if(Gr(e)){let r=Tm(e,t,!0);if(r)return vm(r,t)}return}i(vm,"findLeafNodeBeforeOffset");function Tm(e,t,r){let n=0,a=e.content.length-1,s=void 0;while(n<=a){let o=Math.floor((n+a)/2),l=e.content[o];if(l.offset<=t&&l.end>t)return l;if(l.end<=t)s=r?l:void 0,n=o+1;else a=o-1}return s}i(Tm,"binarySearch");function $m(e,t=!0){while(e.container){let r=e.container,n=r.content.indexOf(e);while(n>0){n--;let a=r.content[n];if(t||!a.hidden)return a}e=r}return}i($m,"getPreviousNode");function uT(e,t=!0){while(e.container){let r=e.container,n=r.content.indexOf(e),a=r.content.length-1;while(n<a){n++;let s=r.content[n];if(t||!s.hidden)return s}e=r}return}i(uT,"getNextNode");function cT(e){if(e.range.start.character===0)return e;let t=e.range.start.line,r=e,n;while(e.container){let a=e.container,s=n??a.content.indexOf(e);if(s===0)e=a,n=void 0;else n=s-1,e=a.content[n];if(e.range.start.line!==t)break;r=e}return r}i(cT,"getStartlineNode");function fT(e,t){let r=dT(e,t);if(!r)return[];return r.parent.content.slice(r.a+1,r.b)}i(fT,"getInteriorNodes");function dT(e,t){let r=jd(e),n=jd(t),a;for(let s=0;s<r.length&&s<n.length;s++){let o=r[s],l=n[s];if(o.parent===l.parent)a={parent:o.parent,a:o.index,b:l.index};else break}return a}i(dT,"getCommonParent");function jd(e){let t=[];while(e.container){let r=e.container,n=r.content.indexOf(e);t.push({parent:r,index:n}),e=r}return t.reverse()}i(jd,"getParentChain");var Rm={};Cn(Rm,{findAssignment:()=>Lm,findNameAssignment:()=>uc,findNodeForKeyword:()=>Om,findNodeForProperty:()=>sc,findNodesForKeyword:()=>TT,findNodesForKeywordInternal:()=>lc,findNodesForProperty:()=>km,getActionAtElement:()=>Dm,getActionType:()=>Gm,getAllReachableRules:()=>ic,getAllRulesUsedForCrossReferences:()=>vT,getCrossReferenceTerminal:()=>Nm,getEntryRule:()=>Sm,getExplicitRuleType:()=>Eo,getHiddenRules:()=>wm,getRuleType:()=>Fm,getRuleTypeName:()=>CT,getTypeName:()=>oa,isArrayCardinality:()=>RT,isArrayOperator:()=>AT,isCommentTerminal:()=>Pm,isDataType:()=>ET,isDataTypeRule:()=>Ao,isOptionalCardinality:()=>$T,terminalRegex:()=>Co});var rc=class extends Error{static{i(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function bn(e,t="Error: Got unexpected value."){throw Error(t)}i(bn,"assertUnreachable");function Am(e,t="Error: Condition is violated."){if(!e)throw Error(t)}i(Am,"assertCondition");var Em={};Cn(Em,{NEWLINE_REGEXP:()=>mT,escapeRegExp:()=>Li,getTerminalParts:()=>yT,isMultilineComment:()=>Cm,isWhitespace:()=>ac,partialMatches:()=>bm,partialRegExp:()=>_m,whitespaceCharacters:()=>gT});function q(e){return e.charCodeAt(0)}i(q,"cc");function fl(e,t){if(Array.isArray(e))e.forEach(function(r){t.push(r)});else t.push(e)}i(fl,"insertToSet");function qa(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}i(qa,"addFlag");function Ln(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}i(Ln,"ASSERT_EXISTS");function Cs(){throw Error("Internal Error - Should never get here!")}i(Cs,"ASSERT_NEVER_REACH_HERE");function Bd(e){return e.type==="Character"}i(Bd,"isCharacter");var Bl=[];for(let e=q("0");e<=q("9");e++)Bl.push(e);var Ul=[q("_")].concat(Bl);for(let e=q("a");e<=q("z");e++)Ul.push(e);for(let e=q("A");e<=q("Z");e++)Ul.push(e);var qy=[q(" "),q("\f"),q(`
|
|
36
|
+
`),q("\r"),q("\t"),q("\v"),q("\t"),q(" "),q(" "),q(" "),q(" "),q(" "),q(" "),q(" "),q(" "),q(" "),q(" "),q(" "),q(" "),q(" "),q("\u2028"),q("\u2029"),q(" "),q(" "),q(" "),q("\uFEFF")],jN=/[0-9a-fA-F]/,zo=/[0-9]/,BN=/[1-9]/,pT=class{static{i(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let t=this.disjunction();this.consumeChar("/");let r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};while(this.isRegExpFlag())switch(this.popChar()){case"g":qa(r,"global");break;case"i":qa(r,"ignoreCase");break;case"m":qa(r,"multiLine");break;case"u":qa(r,"unicode");break;case"y":qa(r,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;e.push(this.alternative());while(this.peekChar()==="|")this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;while(this.isTerm())e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){if(this.isAssertion())return this.assertion();else return this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}Ln(t);let r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return Cs()}quantifier(e=!1){let t=void 0,r=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":let n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let a;if(this.isDigit())a=this.integerIncludingZero(),t={atLeast:n,atMost:a};else t={atLeast:n,atMost:1/0};this.consumeChar("}");break}if(e===!0&&t===void 0)return;Ln(t);break}if(e===!0&&t===void 0)return;if(Ln(t)){if(this.peekChar(0)==="?")this.consumeChar("?"),t.greedy=!1;else t.greedy=!0;return t.type="Quantifier",t.loc=this.loc(r),t}}atom(){let e,t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter())e=this.patternCharacter();if(Ln(e)){if(e.loc=this.loc(t),this.isQuantifier())e.quantifier=this.quantifier();return e}return Cs()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[q(`
|
|
37
|
+
`),q("\r"),q("\u2028"),q("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=Bl;break;case"D":e=Bl,t=!0;break;case"s":e=qy;break;case"S":e=qy,t=!0;break;case"w":e=Ul;break;case"W":e=Ul,t=!0;break}if(Ln(e))return{type:"Set",value:e,complement:t};return Cs()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=q("\f");break;case"n":e=q(`
|
|
38
|
+
`);break;case"r":e=q("\r");break;case"t":e=q("\t");break;case"v":e=q("\v");break}if(Ln(e))return{type:"Character",value:e};return Cs()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:q("\x00")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:q(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
39
|
+
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:q(e)}}}characterClass(){let e=[],t=!1;if(this.consumeChar("["),this.peekChar(0)==="^")this.consumeChar("^"),t=!0;while(this.isClassAtom()){let r=this.classAtom(),n=r.type==="Character";if(Bd(r)&&this.isRangeDash()){this.consumeChar("-");let a=this.classAtom(),s=a.type==="Character";if(Bd(a)){if(a.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:a.value})}else fl(r.value,e),e.push(q("-")),fl(a.value,e)}else fl(r.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
|
|
40
|
+
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:q("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}let t=this.disjunction();this.consumeChar(")");let r={type:"Group",capturing:e,value:t};if(e)r.idx=this.groupIdx;return r}positiveInteger(){let e=this.popChar();if(BN.test(e)===!1)throw Error("Expecting a positive integer");while(zo.test(this.peekChar(0)))e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(zo.test(e)===!1)throw Error("Expecting an integer");while(zo.test(this.peekChar(0)))e+=this.popChar();return parseInt(e,10)}patternCharacter(){let e=this.popChar();switch(e){case`
|
|
41
|
+
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:q(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return zo.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
|
|
42
|
+
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!"||this.peekChar(2)==="<"&&(this.peekChar(3)==="="||this.peekChar(3)==="!"));default:return!1}}isQuantifier(){let e=this.saveState();try{return this.quantifier(!0)!==void 0}catch(t){return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
|
|
43
|
+
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let t="";for(let n=0;n<e;n++){let a=this.popChar();if(jN.test(a)===!1)throw Error("Expecting a HexDecimal digits");t+=a}return{type:"Character",value:parseInt(t,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},nc=class{static{i(this,"BaseRegExpVisitor")}visitChildren(e){for(let t in e){let r=e[t];if(e.hasOwnProperty(t)){if(r.type!==void 0)this.visit(r);else if(Array.isArray(r))r.forEach((n)=>{this.visit(n)},this)}}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},mT=/\r?\n/gm,hT=new pT,UN=class extends nc{static{i(this,"TerminalRegExpVisitor")}constructor(){super(...arguments);this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[]}visitCharacter(e){let t=String.fromCharCode(e.value);if(!this.multiline&&t===`
|
|
44
|
+
`)this.multiline=!0;if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=Li(t);if(this.endRegexpStack.push(r),this.isStarting)this.startRegexp+=r}}visitSet(e){if(!this.multiline){let t=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(t);this.multiline=Boolean(`
|
|
45
|
+
`.match(r))}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let t=this.regex.substring(e.loc.begin,e.loc.end);if(this.endRegexpStack.push(t),this.isStarting)this.startRegexp+=t}}visitChildren(e){if(e.type==="Group"){if(e.quantifier)return}super.visitChildren(e)}},Qn=new UN;function yT(e){try{if(typeof e!=="string")e=e.source;e=`/${e}/`;let t=hT.pattern(e),r=[];for(let n of t.value.value)Qn.reset(e),Qn.visit(n),r.push({start:Qn.startRegexp,end:Qn.endRegex});return r}catch{return[]}}i(yT,"getTerminalParts");function Cm(e){try{if(typeof e==="string")e=new RegExp(e);return e=e.toString(),Qn.reset(e),Qn.visit(hT.pattern(e)),Qn.multiline}catch{return!1}}i(Cm,"isMultilineComment");var gT=`\f
|
|
46
|
+
\r \v \u2028\u2029 \uFEFF`.split("");function ac(e){let t=typeof e==="string"?new RegExp(e):e;return gT.some((r)=>t.test(r))}i(ac,"isWhitespace");function Li(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(Li,"escapeRegExp");function bm(e,t){let r=_m(e),n=t.match(r);return!!n&&n[0].length>0}i(bm,"partialMatches");function _m(e){if(typeof e==="string")e=new RegExp(e);let t=e,r=e.source,n=0;function a(){let s="",o;function l(c){s+=r.substr(n,c),n+=c}i(l,"appendRaw");function u(c){s+="(?:"+r.substr(n,c)+"|$)",n+=c}i(u,"appendOptional");while(n<r.length)switch(r[n]){case"\\":switch(r[n+1]){case"c":u(3);break;case"x":u(4);break;case"u":if(t.unicode)if(r[n+2]==="{")u(r.indexOf("}",n)-n+1);else u(6);else u(2);break;case"p":case"P":if(t.unicode)u(r.indexOf("}",n)-n+1);else u(2);break;case"k":u(r.indexOf(">",n)-n+1);break;default:u(2);break}break;case"[":o=/\[(?:\\.|.)*?\]/g,o.lastIndex=n,o=o.exec(r)||[],u(o[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":l(1);break;case"{":if(o=/\{\d+,?\d*\}/g,o.lastIndex=n,o=o.exec(r),o)l(o[0].length);else u(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":s+="(?:",n+=3,s+=a()+"|$)";break;case"=":s+="(?=",n+=3,s+=a()+")";break;case"!":o=n,n+=3,a(),s+=r.substr(o,n-o);break;case"<":switch(r[n+3]){case"=":case"!":o=n,n+=4,a(),s+=r.substr(o,n-o);break;default:l(r.indexOf(">",n)-n+1),s+=a()+"|$)";break}break}else l(1),s+=a()+"|$)";break;case")":return++n,s;default:u(1);break}return s}return i(a,"process"),new RegExp(a(),e.flags)}i(_m,"partialRegExp");function Sm(e){return e.rules.find((t)=>mt(t)&&t.entry)}i(Sm,"getEntryRule");function wm(e){return e.rules.filter((t)=>Ft(t)&&t.hidden)}i(wm,"getHiddenRules");function ic(e,t){let r=new Set,n=Sm(e);if(!n)return new Set(e.rules);let a=[n].concat(wm(e));for(let o of a)Im(o,r,t);let s=new Set;for(let o of e.rules)if(r.has(o.name)||Ft(o)&&o.hidden)s.add(o);return s}i(ic,"getAllReachableRules");function Im(e,t,r){t.add(e.name),Hr(e).forEach((n)=>{if(jr(n)||r&&Zu(n)){let a=n.rule.ref;if(a&&!t.has(a.name))Im(a,t,r)}})}i(Im,"ruleDfs");function vT(e){let t=new Set;return Hr(e).forEach((r)=>{if(ha(r)){if(mt(r.type.ref))t.add(r.type.ref);if(Ro(r.type.ref)&&mt(r.type.ref.$container))t.add(r.type.ref.$container)}}),t}i(vT,"getAllRulesUsedForCrossReferences");function Nm(e){if(e.terminal)return e.terminal;else if(e.type.ref)return uc(e.type.ref)?.terminal;return}i(Nm,"getCrossReferenceTerminal");function Pm(e){return e.hidden&&!ac(Co(e))}i(Pm,"isCommentTerminal");function km(e,t){if(!e||!t)return[];return oc(e,t,e.astNode,!0)}i(km,"findNodesForProperty");function sc(e,t,r){if(!e||!t)return;let n=oc(e,t,e.astNode,!0);if(n.length===0)return;if(r!==void 0)r=Math.max(0,Math.min(r,n.length-1));else r=0;return n[r]}i(sc,"findNodeForProperty");function oc(e,t,r,n){if(!n){let a=pa(e.grammarSource,Fr);if(a&&a.feature===t)return[e]}if(Gr(e)&&e.astNode===r)return e.content.flatMap((a)=>oc(a,t,r,!1));return[]}i(oc,"findNodesForPropertyInternal");function TT(e,t){if(!e)return[];return lc(e,t,e?.astNode)}i(TT,"findNodesForKeyword");function Om(e,t,r){if(!e)return;let n=lc(e,t,e?.astNode);if(n.length===0)return;if(r!==void 0)r=Math.max(0,Math.min(r,n.length-1));else r=0;return n[r]}i(Om,"findNodeForKeyword");function lc(e,t,r){if(e.astNode!==r)return[];if(zr(e.grammarSource)&&e.grammarSource.value===t)return[e];let n=_i(e).iterator(),a,s=[];do if(a=n.next(),!a.done){let o=a.value;if(o.astNode===r){if(zr(o.grammarSource)&&o.grammarSource.value===t)s.push(o)}else n.prune()}while(!a.done);return s}i(lc,"findNodesForKeywordInternal");function Lm(e){let t=e.astNode;while(t===e.container?.astNode){let r=pa(e.grammarSource,Fr);if(r)return r;e=e.container}return}i(Lm,"findAssignment");function uc(e){let t=e;if(Ro(t))if(Tn(t.$container))t=t.$container.$container;else if(ma(t.$container))t=t.$container;else bn(t.$container);return Mm(e,t,new Map)}i(uc,"findNameAssignment");function Mm(e,t,r){function n(a,s){let o=void 0;if(!pa(a,Fr))o=Mm(s,s,r);return r.set(e,o),o}if(i(n,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(let a of Hr(t))if(Fr(a)&&a.feature.toLowerCase()==="name")return r.set(e,a),a;else if(jr(a)&&mt(a.rule.ref))return n(a,a.rule.ref);else if(Ju(a)&&a.typeRef?.ref)return n(a,a.typeRef.ref);return}i(Mm,"findNameAssignmentInternal");function Dm(e){let t=e.$container;if(ya(t)){let r=t.elements,n=r.indexOf(e);for(let a=n-1;a>=0;a--){let s=r[a];if(Tn(s))return s;else{let o=Hr(r[a]).find(Tn);if(o)return o}}}if(Yu(t))return Dm(t);else return}i(Dm,"getActionAtElement");function $T(e,t){return e==="?"||e==="*"||ya(t)&&Boolean(t.guardCondition)}i($T,"isOptionalCardinality");function RT(e){return e==="*"||e==="+"}i(RT,"isArrayCardinality");function AT(e){return e==="+="}i(AT,"isArrayOperator");function Ao(e){return xm(e,new Set)}i(Ao,"isDataTypeRule");function xm(e,t){if(t.has(e))return!0;else t.add(e);for(let r of Hr(e))if(jr(r)){if(!r.rule.ref)return!1;if(mt(r.rule.ref)&&!xm(r.rule.ref,t))return!1;if(bi(r.rule.ref))return!1}else if(Fr(r))return!1;else if(Tn(r))return!1;return Boolean(e.definition)}i(xm,"isDataTypeRuleInternal");function ET(e){return Kl(e.type,new Set)}i(ET,"isDataType");function Kl(e,t){if(t.has(e))return!0;else t.add(e);if(Hp(e))return!1;else if(am(e))return!1;else if(um(e))return e.types.every((r)=>Kl(r,t));else if(Ju(e))if(e.primitiveType!==void 0)return!0;else if(e.stringType!==void 0)return!0;else if(e.typeRef!==void 0){let r=e.typeRef.ref;if(Qu(r))return Kl(r.type,t);else return!1}else return!1;else return!1}i(Kl,"isDataTypeInternal");function Eo(e){if(Ft(e))return;if(e.inferredType)return e.inferredType.name;else if(e.dataType)return e.dataType;else if(e.returnType){let t=e.returnType.ref;if(t)return t.name}return}i(Eo,"getExplicitRuleType");function oa(e){if(ma(e))return mt(e)&&Ao(e)?e.name:Eo(e)??e.name;else if(em(e)||Qu(e)||sm(e))return e.name;else if(Tn(e)){let t=Gm(e);if(t)return t}else if(Ro(e))return e.name;throw Error("Cannot get name of Unknown Type")}i(oa,"getTypeName");function Gm(e){if(e.inferredType)return e.inferredType.name;else if(e.type?.ref)return oa(e.type.ref);return}i(Gm,"getActionType");function CT(e){if(Ft(e))return e.type?.name??"string";else return mt(e)&&Ao(e)?e.name:Eo(e)??e.name}i(CT,"getRuleTypeName");function Fm(e){if(Ft(e))return e.type?.name??"string";else return Eo(e)??e.name}i(Fm,"getRuleType");function Co(e){let t={s:!1,i:!1,u:!1},r=ga(e.definition,t),n=Object.entries(t).filter(([,a])=>a).map(([a])=>a).join("");return new RegExp(r,n)}i(Co,"terminalRegex");var zm=/[\s\S]/.source;function ga(e,t){if(om(e))return bT(e);else if(lm(e))return _T(e);else if(Xp(e))return IT(e);else if(Zu(e)){let r=e.rule.ref;if(!r)throw Error("Missing rule reference.");return gr(ga(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else if(tm(e))return wT(e);else if(cm(e))return ST(e);else if(im(e)){let r=e.regex.lastIndexOf("/"),n=e.regex.substring(1,r),a=e.regex.substring(r+1);if(t)t.i=a.includes("i"),t.s=a.includes("s"),t.u=a.includes("u");return gr(n,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}else if(fm(e))return gr(zm,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});else throw Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}i(ga,"abstractElementToRegex");function bT(e){return gr(e.elements.map((t)=>ga(t)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i(bT,"terminalAlternativesToRegex");function _T(e){return gr(e.elements.map((t)=>ga(t)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i(_T,"terminalGroupToRegex");function ST(e){return gr(`${zm}*?${ga(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}i(ST,"untilTokenToRegex");function wT(e){return gr(`(?!${ga(e.terminal)})${zm}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}i(wT,"negateTokenToRegex");function IT(e){if(e.right)return gr(`[${dl(e.left)}-${dl(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1});return gr(dl(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i(IT,"characterRangeToRegex");function dl(e){return Li(e.value)}i(dl,"keywordToRegex");function gr(e,t){if(t.parenthesized||t.lookahead||t.wrap!==!1)e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`;if(t.cardinality)return`${e}${t.cardinality}`;return e}i(gr,"withCardinality");function jm(e){let t=[],r=e.Grammar;for(let n of r.rules)if(Ft(n)&&Pm(n)&&Cm(Co(n)))t.push(n.name);return{multilineCommentRules:t,nameRegexp:ym}}i(jm,"createGrammarConfig");var KN=typeof global=="object"&&global&&global.Object===Object&&global,NT=KN,VN=typeof self=="object"&&self&&self.Object===Object&&self,WN=NT||VN||Function("return this")(),Tr=WN,qN=Tr.Symbol,xt=qN,PT=Object.prototype,{hasOwnProperty:HN,toString:YN}=PT,us=xt?xt.toStringTag:void 0;function kT(e){var t=HN.call(e,us),r=e[us];try{e[us]=void 0;var n=!0}catch(s){}var a=YN.call(e);if(n)if(t)e[us]=r;else delete e[us];return a}i(kT,"getRawTag");var XN=kT,JN=Object.prototype,ZN=JN.toString;function OT(e){return ZN.call(e)}i(OT,"objectToString");var QN=OT,eP="[object Null]",tP="[object Undefined]",Hy=xt?xt.toStringTag:void 0;function LT(e){if(e==null)return e===void 0?tP:eP;return Hy&&Hy in Object(e)?XN(e):QN(e)}i(LT,"baseGetTag");var _n=LT;function MT(e){return e!=null&&typeof e=="object"}i(MT,"isObjectLike");var rr=MT,rP="[object Symbol]";function DT(e){return typeof e=="symbol"||rr(e)&&_n(e)==rP}i(DT,"isSymbol");var cc=DT;function xT(e,t){var r=-1,n=e==null?0:e.length,a=Array(n);while(++r<n)a[r]=t(e[r],r,e);return a}i(xT,"arrayMap");var bo=xT,nP=Array.isArray,oe=nP,aP=1/0,Yy=xt?xt.prototype:void 0,Xy=Yy?Yy.toString:void 0;function Bm(e){if(typeof e=="string")return e;if(oe(e))return bo(e,Bm)+"";if(cc(e))return Xy?Xy.call(e):"";var t=e+"";return t=="0"&&1/e==-aP?"-0":t}i(Bm,"baseToString");var iP=Bm,sP=/\s/;function GT(e){var t=e.length;while(t--&&sP.test(e.charAt(t)));return t}i(GT,"trimmedEndIndex");var oP=GT,lP=/^\s+/;function FT(e){return e?e.slice(0,oP(e)+1).replace(lP,""):e}i(FT,"baseTrim");var uP=FT;function zT(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}i(zT,"isObject");var Gt=zT,Jy=NaN,cP=/^[-+]0x[0-9a-f]+$/i,fP=/^0b[01]+$/i,dP=/^0o[0-7]+$/i,pP=parseInt;function jT(e){if(typeof e=="number")return e;if(cc(e))return Jy;if(Gt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Gt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=uP(e);var r=fP.test(e);return r||dP.test(e)?pP(e.slice(2),r?2:8):cP.test(e)?Jy:+e}i(jT,"toNumber");var mP=jT,Zy=1/0,hP=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;function BT(e){if(!e)return e===0?e:0;if(e=mP(e),e===Zy||e===-Zy){var t=e<0?-1:1;return t*hP}return e===e?e:0}i(BT,"toFinite");var yP=BT;function UT(e){var t=yP(e),r=t%1;return t===t?r?t-r:t:0}i(UT,"toInteger");var _o=UT;function KT(e){return e}i(KT,"identity");var So=KT,gP="[object AsyncFunction]",vP="[object Function]",TP="[object GeneratorFunction]",$P="[object Proxy]";function VT(e){if(!Gt(e))return!1;var t=_n(e);return t==vP||t==TP||t==gP||t==$P}i(VT,"isFunction");var Yr=VT,RP=Tr["__core-js_shared__"],Tf=RP,Qy=function(){var e=/[^.]+$/.exec(Tf&&Tf.keys&&Tf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function WT(e){return!!Qy&&Qy in e}i(WT,"isMasked");var AP=WT,EP=Function.prototype,CP=EP.toString;function qT(e){if(e!=null){try{return CP.call(e)}catch(t){}try{return e+""}catch(t){}}return""}i(qT,"toSource");var va=qT,bP=/[\\^$.*+?()[\]{}|]/g,_P=/^\[object .+?Constructor\]$/,SP=Function.prototype,wP=Object.prototype,IP=SP.toString,NP=wP.hasOwnProperty,PP=RegExp("^"+IP.call(NP).replace(bP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function HT(e){if(!Gt(e)||AP(e))return!1;var t=Yr(e)?PP:_P;return t.test(va(e))}i(HT,"baseIsNative");var kP=HT;function YT(e,t){return e==null?void 0:e[t]}i(YT,"getValue");var OP=YT;function XT(e,t){var r=OP(e,t);return kP(r)?r:void 0}i(XT,"getNative");var Ta=XT,LP=Ta(Tr,"WeakMap"),Ud=LP,eg=Object.create,MP=function(){function e(){}return i(e,"object"),function(t){if(!Gt(t))return{};if(eg)return eg(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),DP=MP;function JT(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}i(JT,"apply");var xP=JT;function ZT(){}i(ZT,"noop");var Je=ZT;function QT(e,t){var r=-1,n=e.length;t||(t=Array(n));while(++r<n)t[r]=e[r];return t}i(QT,"copyArray");var GP=QT,FP=800,zP=16,jP=Date.now;function e$(e){var t=0,r=0;return function(){var n=jP(),a=zP-(n-r);if(r=n,a>0){if(++t>=FP)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}i(e$,"shortOut");var BP=e$;function t$(e){return function(){return e}}i(t$,"constant");var UP=t$,KP=function(){try{var e=Ta(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Vl=KP,VP=!Vl?So:function(e,t){return Vl(e,"toString",{configurable:!0,enumerable:!1,value:UP(t),writable:!0})},WP=VP,qP=BP(WP),HP=qP;function r$(e,t){var r=-1,n=e==null?0:e.length;while(++r<n)if(t(e[r],r,e)===!1)break;return e}i(r$,"arrayEach");var n$=r$;function a$(e,t,r,n){var a=e.length,s=r+(n?1:-1);while(n?s--:++s<a)if(t(e[s],s,e))return s;return-1}i(a$,"baseFindIndex");var i$=a$;function s$(e){return e!==e}i(s$,"baseIsNaN");var YP=s$;function o$(e,t,r){var n=r-1,a=e.length;while(++n<a)if(e[n]===t)return n;return-1}i(o$,"strictIndexOf");var XP=o$;function l$(e,t,r){return t===t?XP(e,t,r):i$(e,YP,r)}i(l$,"baseIndexOf");var Um=l$;function u$(e,t){var r=e==null?0:e.length;return!!r&&Um(e,t,0)>-1}i(u$,"arrayIncludes");var c$=u$,JP=9007199254740991,ZP=/^(?:0|[1-9]\d*)$/;function f$(e,t){var r=typeof e;return t=t==null?JP:t,!!t&&(r=="number"||r!="symbol"&&ZP.test(e))&&(e>-1&&e%1==0&&e<t)}i(f$,"isIndex");var fc=f$;function d$(e,t,r){if(t=="__proto__"&&Vl)Vl(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0});else e[t]=r}i(d$,"baseAssignValue");var Km=d$;function p$(e,t){return e===t||e!==e&&t!==t}i(p$,"eq");var wo=p$,QP=Object.prototype,ek=QP.hasOwnProperty;function m$(e,t,r){var n=e[t];if(!(ek.call(e,t)&&wo(n,r))||r===void 0&&!(t in e))Km(e,t,r)}i(m$,"assignValue");var dc=m$;function h$(e,t,r,n){var a=!r;r||(r={});var s=-1,o=t.length;while(++s<o){var l=t[s],u=n?n(r[l],e[l],l,r,e):void 0;if(u===void 0)u=e[l];if(a)Km(r,l,u);else dc(r,l,u)}return r}i(h$,"copyObject");var Io=h$,tg=Math.max;function y$(e,t,r){return t=tg(t===void 0?e.length-1:t,0),function(){var n=arguments,a=-1,s=tg(n.length-t,0),o=Array(s);while(++a<s)o[a]=n[t+a];a=-1;var l=Array(t+1);while(++a<t)l[a]=n[a];return l[t]=r(o),xP(e,this,l)}}i(y$,"overRest");var tk=y$;function g$(e,t){return HP(tk(e,t,So),e+"")}i(g$,"baseRest");var Vm=g$,rk=9007199254740991;function v$(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=rk}i(v$,"isLength");var Wm=v$;function T$(e){return e!=null&&Wm(e.length)&&!Yr(e)}i(T$,"isArrayLike");var $r=T$;function $$(e,t,r){if(!Gt(r))return!1;var n=typeof t;if(n=="number"?$r(r)&&fc(t,r.length):n=="string"&&(t in r))return wo(r[t],e);return!1}i($$,"isIterateeCall");var pc=$$;function R$(e){return Vm(function(t,r){var n=-1,a=r.length,s=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;if(s=e.length>3&&typeof s=="function"?(a--,s):void 0,o&&pc(r[0],r[1],o))s=a<3?void 0:s,a=1;t=Object(t);while(++n<a){var l=r[n];if(l)e(t,l,n,s)}return t})}i(R$,"createAssigner");var nk=R$,ak=Object.prototype;function A$(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ak;return e===r}i(A$,"isPrototype");var No=A$;function E$(e,t){var r=-1,n=Array(e);while(++r<e)n[r]=t(r);return n}i(E$,"baseTimes");var ik=E$,sk="[object Arguments]";function C$(e){return rr(e)&&_n(e)==sk}i(C$,"baseIsArguments");var rg=C$,b$=Object.prototype,{hasOwnProperty:ok,propertyIsEnumerable:lk}=b$,uk=rg(function(){return arguments}())?rg:function(e){return rr(e)&&ok.call(e,"callee")&&!lk.call(e,"callee")},mc=uk;function _$(){return!1}i(_$,"stubFalse");var ck=_$,S$=typeof ot=="object"&&ot&&!ot.nodeType&&ot,ng=S$&&typeof Ke=="object"&&Ke&&!Ke.nodeType&&Ke,fk=ng&&ng.exports===S$,ag=fk?Tr.Buffer:void 0,dk=ag?ag.isBuffer:void 0,pk=dk||ck,to=pk,mk="[object Arguments]",hk="[object Array]",yk="[object Boolean]",gk="[object Date]",vk="[object Error]",Tk="[object Function]",$k="[object Map]",Rk="[object Number]",Ak="[object Object]",Ek="[object RegExp]",Ck="[object Set]",bk="[object String]",_k="[object WeakMap]",Sk="[object ArrayBuffer]",wk="[object DataView]",Ik="[object Float32Array]",Nk="[object Float64Array]",Pk="[object Int8Array]",kk="[object Int16Array]",Ok="[object Int32Array]",Lk="[object Uint8Array]",Mk="[object Uint8ClampedArray]",Dk="[object Uint16Array]",xk="[object Uint32Array]",Ce={};Ce[Ik]=Ce[Nk]=Ce[Pk]=Ce[kk]=Ce[Ok]=Ce[Lk]=Ce[Mk]=Ce[Dk]=Ce[xk]=!0;Ce[mk]=Ce[hk]=Ce[Sk]=Ce[yk]=Ce[wk]=Ce[gk]=Ce[vk]=Ce[Tk]=Ce[$k]=Ce[Rk]=Ce[Ak]=Ce[Ek]=Ce[Ck]=Ce[bk]=Ce[_k]=!1;function w$(e){return rr(e)&&Wm(e.length)&&!!Ce[_n(e)]}i(w$,"baseIsTypedArray");var Gk=w$;function I$(e){return function(t){return e(t)}}i(I$,"baseUnary");var Po=I$,N$=typeof ot=="object"&&ot&&!ot.nodeType&&ot,xs=N$&&typeof Ke=="object"&&Ke&&!Ke.nodeType&&Ke,Fk=xs&&xs.exports===N$,$f=Fk&&NT.process,zk=function(){try{var e=xs&&xs.require&&xs.require("util").types;if(e)return e;return $f&&$f.binding&&$f.binding("util")}catch(t){}}(),$n=zk,ig=$n&&$n.isTypedArray,jk=ig?Po(ig):Gk,qm=jk,Bk=Object.prototype,Uk=Bk.hasOwnProperty;function P$(e,t){var r=oe(e),n=!r&&mc(e),a=!r&&!n&&to(e),s=!r&&!n&&!a&&qm(e),o=r||n||a||s,l=o?ik(e.length,String):[],u=l.length;for(var c in e)if((t||Uk.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||fc(c,u))))l.push(c);return l}i(P$,"arrayLikeKeys");var k$=P$;function O$(e,t){return function(r){return e(t(r))}}i(O$,"overArg");var L$=O$,Kk=L$(Object.keys,Object),Vk=Kk,Wk=Object.prototype,qk=Wk.hasOwnProperty;function M$(e){if(!No(e))return Vk(e);var t=[];for(var r in Object(e))if(qk.call(e,r)&&r!="constructor")t.push(r);return t}i(M$,"baseKeys");var D$=M$;function x$(e){return $r(e)?k$(e):D$(e)}i(x$,"keys");var wt=x$,Hk=Object.prototype,Yk=Hk.hasOwnProperty,Xk=nk(function(e,t){if(No(t)||$r(t)){Io(t,wt(t),e);return}for(var r in t)if(Yk.call(t,r))dc(e,r,t[r])}),It=Xk;function G$(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}i(G$,"nativeKeysIn");var Jk=G$,Zk=Object.prototype,Qk=Zk.hasOwnProperty;function F$(e){if(!Gt(e))return Jk(e);var t=No(e),r=[];for(var n in e)if(!(n=="constructor"&&(t||!Qk.call(e,n))))r.push(n);return r}i(F$,"baseKeysIn");var eO=F$;function z$(e){return $r(e)?k$(e,!0):eO(e)}i(z$,"keysIn");var hc=z$,tO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rO=/^\w*$/;function j$(e,t){if(oe(e))return!1;var r=typeof e;if(r=="number"||r=="symbol"||r=="boolean"||e==null||cc(e))return!0;return rO.test(e)||!tO.test(e)||t!=null&&e in Object(t)}i(j$,"isKey");var Hm=j$,nO=Ta(Object,"create"),ro=nO;function B$(){this.__data__=ro?ro(null):{},this.size=0}i(B$,"hashClear");var aO=B$;function U$(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}i(U$,"hashDelete");var iO=U$,sO="__lodash_hash_undefined__",oO=Object.prototype,lO=oO.hasOwnProperty;function K$(e){var t=this.__data__;if(ro){var r=t[e];return r===sO?void 0:r}return lO.call(t,e)?t[e]:void 0}i(K$,"hashGet");var uO=K$,cO=Object.prototype,fO=cO.hasOwnProperty;function V$(e){var t=this.__data__;return ro?t[e]!==void 0:fO.call(t,e)}i(V$,"hashHas");var dO=V$,pO="__lodash_hash_undefined__";function W$(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ro&&t===void 0?pO:t,this}i(W$,"hashSet");var mO=W$;function $a(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}i($a,"Hash");$a.prototype.clear=aO;$a.prototype.delete=iO;$a.prototype.get=uO;$a.prototype.has=dO;$a.prototype.set=mO;var sg=$a;function q$(){this.__data__=[],this.size=0}i(q$,"listCacheClear");var hO=q$;function H$(e,t){var r=e.length;while(r--)if(wo(e[r][0],t))return r;return-1}i(H$,"assocIndexOf");var yc=H$,yO=Array.prototype,gO=yO.splice;function Y$(e){var t=this.__data__,r=yc(t,e);if(r<0)return!1;var n=t.length-1;if(r==n)t.pop();else gO.call(t,r,1);return--this.size,!0}i(Y$,"listCacheDelete");var vO=Y$;function X$(e){var t=this.__data__,r=yc(t,e);return r<0?void 0:t[r][1]}i(X$,"listCacheGet");var TO=X$;function J$(e){return yc(this.__data__,e)>-1}i(J$,"listCacheHas");var $O=J$;function Z$(e,t){var r=this.__data__,n=yc(r,e);if(n<0)++this.size,r.push([e,t]);else r[n][1]=t;return this}i(Z$,"listCacheSet");var RO=Z$;function Ra(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}i(Ra,"ListCache");Ra.prototype.clear=hO;Ra.prototype.delete=vO;Ra.prototype.get=TO;Ra.prototype.has=$O;Ra.prototype.set=RO;var gc=Ra,AO=Ta(Tr,"Map"),no=AO;function Q$(){this.size=0,this.__data__={hash:new sg,map:new(no||gc),string:new sg}}i(Q$,"mapCacheClear");var EO=Q$;function eR(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}i(eR,"isKeyable");var CO=eR;function tR(e,t){var r=e.__data__;return CO(t)?r[typeof t=="string"?"string":"hash"]:r.map}i(tR,"getMapData");var vc=tR;function rR(e){var t=vc(this,e).delete(e);return this.size-=t?1:0,t}i(rR,"mapCacheDelete");var bO=rR;function nR(e){return vc(this,e).get(e)}i(nR,"mapCacheGet");var _O=nR;function aR(e){return vc(this,e).has(e)}i(aR,"mapCacheHas");var SO=aR;function iR(e,t){var r=vc(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}i(iR,"mapCacheSet");var wO=iR;function Aa(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}i(Aa,"MapCache");Aa.prototype.clear=EO;Aa.prototype.delete=bO;Aa.prototype.get=_O;Aa.prototype.has=SO;Aa.prototype.set=wO;var Tc=Aa,IO="Expected a function";function $c(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw TypeError(IO);var r=i(function(){var n=arguments,a=t?t.apply(this,n):n[0],s=r.cache;if(s.has(a))return s.get(a);var o=e.apply(this,n);return r.cache=s.set(a,o)||s,o},"memoized");return r.cache=new($c.Cache||Tc),r}i($c,"memoize");$c.Cache=Tc;var NO=$c,PO=500;function sR(e){var t=NO(e,function(n){if(r.size===PO)r.clear();return n}),r=t.cache;return t}i(sR,"memoizeCapped");var kO=sR,OO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,LO=/\\(\\)?/g,MO=kO(function(e){var t=[];if(e.charCodeAt(0)===46)t.push("");return e.replace(OO,function(r,n,a,s){t.push(a?s.replace(LO,"$1"):n||r)}),t}),DO=MO;function oR(e){return e==null?"":iP(e)}i(oR,"toString");var xO=oR;function lR(e,t){if(oe(e))return e;return Hm(e,t)?[e]:DO(xO(e))}i(lR,"castPath");var Rc=lR,GO=1/0;function uR(e){if(typeof e=="string"||cc(e))return e;var t=e+"";return t=="0"&&1/e==-GO?"-0":t}i(uR,"toKey");var ko=uR;function cR(e,t){t=Rc(t,e);var r=0,n=t.length;while(e!=null&&r<n)e=e[ko(t[r++])];return r&&r==n?e:void 0}i(cR,"baseGet");var Ym=cR;function fR(e,t,r){var n=e==null?void 0:Ym(e,t);return n===void 0?r:n}i(fR,"get");var FO=fR;function dR(e,t){var r=-1,n=t.length,a=e.length;while(++r<n)e[a+r]=t[r];return e}i(dR,"arrayPush");var Xm=dR,og=xt?xt.isConcatSpreadable:void 0;function pR(e){return oe(e)||mc(e)||!!(og&&e&&e[og])}i(pR,"isFlattenable");var zO=pR;function Jm(e,t,r,n,a){var s=-1,o=e.length;r||(r=zO),a||(a=[]);while(++s<o){var l=e[s];if(t>0&&r(l))if(t>1)Jm(l,t-1,r,n,a);else Xm(a,l);else if(!n)a[a.length]=l}return a}i(Jm,"baseFlatten");var Zm=Jm;function mR(e){var t=e==null?0:e.length;return t?Zm(e,1):[]}i(mR,"flatten");var Xt=mR,jO=L$(Object.getPrototypeOf,Object),hR=jO;function yR(e,t,r){var n=-1,a=e.length;if(t<0)t=-t>a?0:a+t;if(r=r>a?a:r,r<0)r+=a;a=t>r?0:r-t>>>0,t>>>=0;var s=Array(a);while(++n<a)s[n]=e[n+t];return s}i(yR,"baseSlice");var gR=yR;function vR(e,t,r,n){var a=-1,s=e==null?0:e.length;if(n&&s)r=e[++a];while(++a<s)r=t(r,e[a],a,e);return r}i(vR,"arrayReduce");var BO=vR;function TR(){this.__data__=new gc,this.size=0}i(TR,"stackClear");var UO=TR;function $R(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}i($R,"stackDelete");var KO=$R;function RR(e){return this.__data__.get(e)}i(RR,"stackGet");var VO=RR;function AR(e){return this.__data__.has(e)}i(AR,"stackHas");var WO=AR,qO=200;function ER(e,t){var r=this.__data__;if(r instanceof gc){var n=r.__data__;if(!no||n.length<qO-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Tc(n)}return r.set(e,t),this.size=r.size,this}i(ER,"stackSet");var HO=ER;function Ea(e){var t=this.__data__=new gc(e);this.size=t.size}i(Ea,"Stack");Ea.prototype.clear=UO;Ea.prototype.delete=KO;Ea.prototype.get=VO;Ea.prototype.has=WO;Ea.prototype.set=HO;var Gs=Ea;function CR(e,t){return e&&Io(t,wt(t),e)}i(CR,"baseAssign");var YO=CR;function bR(e,t){return e&&Io(t,hc(t),e)}i(bR,"baseAssignIn");var XO=bR,_R=typeof ot=="object"&&ot&&!ot.nodeType&&ot,lg=_R&&typeof Ke=="object"&&Ke&&!Ke.nodeType&&Ke,JO=lg&&lg.exports===_R,ug=JO?Tr.Buffer:void 0,cg=ug?ug.allocUnsafe:void 0;function SR(e,t){if(t)return e.slice();var r=e.length,n=cg?cg(r):new e.constructor(r);return e.copy(n),n}i(SR,"cloneBuffer");var ZO=SR;function wR(e,t){var r=-1,n=e==null?0:e.length,a=0,s=[];while(++r<n){var o=e[r];if(t(o,r,e))s[a++]=o}return s}i(wR,"arrayFilter");var Qm=wR;function IR(){return[]}i(IR,"stubArray");var NR=IR,QO=Object.prototype,e0=QO.propertyIsEnumerable,fg=Object.getOwnPropertySymbols,t0=!fg?NR:function(e){if(e==null)return[];return e=Object(e),Qm(fg(e),function(t){return e0.call(e,t)})},eh=t0;function PR(e,t){return Io(e,eh(e),t)}i(PR,"copySymbols");var r0=PR,n0=Object.getOwnPropertySymbols,a0=!n0?NR:function(e){var t=[];while(e)Xm(t,eh(e)),e=hR(e);return t},kR=a0;function OR(e,t){return Io(e,kR(e),t)}i(OR,"copySymbolsIn");var i0=OR;function LR(e,t,r){var n=t(e);return oe(e)?n:Xm(n,r(e))}i(LR,"baseGetAllKeys");var MR=LR;function DR(e){return MR(e,wt,eh)}i(DR,"getAllKeys");var Kd=DR;function xR(e){return MR(e,hc,kR)}i(xR,"getAllKeysIn");var GR=xR,s0=Ta(Tr,"DataView"),Vd=s0,o0=Ta(Tr,"Promise"),Wd=o0,l0=Ta(Tr,"Set"),hi=l0,dg="[object Map]",u0="[object Object]",pg="[object Promise]",mg="[object Set]",hg="[object WeakMap]",yg="[object DataView]",c0=va(Vd),f0=va(no),d0=va(Wd),p0=va(hi),m0=va(Ud),Mn=_n;if(Vd&&Mn(new Vd(new ArrayBuffer(1)))!=yg||no&&Mn(new no)!=dg||Wd&&Mn(Wd.resolve())!=pg||hi&&Mn(new hi)!=mg||Ud&&Mn(new Ud)!=hg)Mn=i(function(e){var t=_n(e),r=t==u0?e.constructor:void 0,n=r?va(r):"";if(n)switch(n){case c0:return yg;case f0:return dg;case d0:return pg;case p0:return mg;case m0:return hg}return t},"getTag");var wi=Mn,h0=Object.prototype,y0=h0.hasOwnProperty;function FR(e){var t=e.length,r=new e.constructor(t);if(t&&typeof e[0]=="string"&&y0.call(e,"index"))r.index=e.index,r.input=e.input;return r}i(FR,"initCloneArray");var g0=FR,v0=Tr.Uint8Array,Wl=v0;function zR(e){var t=new e.constructor(e.byteLength);return new Wl(t).set(new Wl(e)),t}i(zR,"cloneArrayBuffer");var th=zR;function jR(e,t){var r=t?th(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}i(jR,"cloneDataView");var T0=jR,$0=/\w*$/;function BR(e){var t=new e.constructor(e.source,$0.exec(e));return t.lastIndex=e.lastIndex,t}i(BR,"cloneRegExp");var R0=BR,gg=xt?xt.prototype:void 0,vg=gg?gg.valueOf:void 0;function UR(e){return vg?Object(vg.call(e)):{}}i(UR,"cloneSymbol");var A0=UR;function KR(e,t){var r=t?th(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}i(KR,"cloneTypedArray");var E0=KR,C0="[object Boolean]",b0="[object Date]",_0="[object Map]",S0="[object Number]",w0="[object RegExp]",I0="[object Set]",N0="[object String]",P0="[object Symbol]",k0="[object ArrayBuffer]",O0="[object DataView]",L0="[object Float32Array]",M0="[object Float64Array]",D0="[object Int8Array]",x0="[object Int16Array]",G0="[object Int32Array]",F0="[object Uint8Array]",z0="[object Uint8ClampedArray]",j0="[object Uint16Array]",B0="[object Uint32Array]";function VR(e,t,r){var n=e.constructor;switch(t){case k0:return th(e);case C0:case b0:return new n(+e);case O0:return T0(e,r);case L0:case M0:case D0:case x0:case G0:case F0:case z0:case j0:case B0:return E0(e,r);case _0:return new n;case S0:case N0:return new n(e);case w0:return R0(e);case I0:return new n;case P0:return A0(e)}}i(VR,"initCloneByTag");var U0=VR;function WR(e){return typeof e.constructor=="function"&&!No(e)?DP(hR(e)):{}}i(WR,"initCloneObject");var K0=WR,V0="[object Map]";function qR(e){return rr(e)&&wi(e)==V0}i(qR,"baseIsMap");var W0=qR,Tg=$n&&$n.isMap,q0=Tg?Po(Tg):W0,H0=q0,Y0="[object Set]";function HR(e){return rr(e)&&wi(e)==Y0}i(HR,"baseIsSet");var X0=HR,$g=$n&&$n.isSet,J0=$g?Po($g):X0,Z0=J0,Q0=1,eL=2,tL=4,YR="[object Arguments]",rL="[object Array]",nL="[object Boolean]",aL="[object Date]",iL="[object Error]",XR="[object Function]",sL="[object GeneratorFunction]",oL="[object Map]",lL="[object Number]",JR="[object Object]",uL="[object RegExp]",cL="[object Set]",fL="[object String]",dL="[object Symbol]",pL="[object WeakMap]",mL="[object ArrayBuffer]",hL="[object DataView]",yL="[object Float32Array]",gL="[object Float64Array]",vL="[object Int8Array]",TL="[object Int16Array]",$L="[object Int32Array]",RL="[object Uint8Array]",AL="[object Uint8ClampedArray]",EL="[object Uint16Array]",CL="[object Uint32Array]",$e={};$e[YR]=$e[rL]=$e[mL]=$e[hL]=$e[nL]=$e[aL]=$e[yL]=$e[gL]=$e[vL]=$e[TL]=$e[$L]=$e[oL]=$e[lL]=$e[JR]=$e[uL]=$e[cL]=$e[fL]=$e[dL]=$e[RL]=$e[AL]=$e[EL]=$e[CL]=!0;$e[iL]=$e[XR]=$e[pL]=!1;function Fs(e,t,r,n,a,s){var o,l=t&Q0,u=t&eL,c=t&tL;if(r)o=a?r(e,n,a,s):r(e);if(o!==void 0)return o;if(!Gt(e))return e;var f=oe(e);if(f){if(o=g0(e),!l)return GP(e,o)}else{var d=wi(e),m=d==XR||d==sL;if(to(e))return ZO(e,l);if(d==JR||d==YR||m&&!a){if(o=u||m?{}:K0(e),!l)return u?i0(e,XO(o,e)):r0(e,YO(o,e))}else{if(!$e[d])return a?e:{};o=U0(e,d,l)}}s||(s=new Gs);var g=s.get(e);if(g)return g;if(s.set(e,o),Z0(e))e.forEach(function(I){o.add(Fs(I,t,r,I,e,s))});else if(H0(e))e.forEach(function(I,P){o.set(P,Fs(I,t,r,P,e,s))});var v=c?u?GR:Kd:u?hc:wt,S=f?void 0:v(e);return n$(S||e,function(I,P){if(S)P=I,I=e[P];dc(o,P,Fs(I,t,r,P,e,s))}),o}i(Fs,"baseClone");var bL=Fs,_L=4;function ZR(e){return bL(e,_L)}i(ZR,"clone");var at=ZR;function QR(e){var t=-1,r=e==null?0:e.length,n=0,a=[];while(++t<r){var s=e[t];if(s)a[n++]=s}return a}i(QR,"compact");var Oo=QR,SL="__lodash_hash_undefined__";function eA(e){return this.__data__.set(e,SL),this}i(eA,"setCacheAdd");var wL=eA;function tA(e){return this.__data__.has(e)}i(tA,"setCacheHas");var IL=tA;function ao(e){var t=-1,r=e==null?0:e.length;this.__data__=new Tc;while(++t<r)this.add(e[t])}i(ao,"SetCache");ao.prototype.add=ao.prototype.push=wL;ao.prototype.has=IL;var rh=ao;function rA(e,t){var r=-1,n=e==null?0:e.length;while(++r<n)if(t(e[r],r,e))return!0;return!1}i(rA,"arraySome");var nA=rA;function aA(e,t){return e.has(t)}i(aA,"cacheHas");var nh=aA,NL=1,PL=2;function iA(e,t,r,n,a,s){var o=r&NL,l=e.length,u=t.length;if(l!=u&&!(o&&u>l))return!1;var c=s.get(e),f=s.get(t);if(c&&f)return c==t&&f==e;var d=-1,m=!0,g=r&PL?new rh:void 0;s.set(e,t),s.set(t,e);while(++d<l){var v=e[d],S=t[d];if(n)var I=o?n(S,v,d,t,e,s):n(v,S,d,e,t,s);if(I!==void 0){if(I)continue;m=!1;break}if(g){if(!nA(t,function(P,N){if(!nh(g,N)&&(v===P||a(v,P,r,n,s)))return g.push(N)})){m=!1;break}}else if(!(v===S||a(v,S,r,n,s))){m=!1;break}}return s.delete(e),s.delete(t),m}i(iA,"equalArrays");var sA=iA;function oA(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}i(oA,"mapToArray");var kL=oA;function lA(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}i(lA,"setToArray");var ah=lA,OL=1,LL=2,ML="[object Boolean]",DL="[object Date]",xL="[object Error]",GL="[object Map]",FL="[object Number]",zL="[object RegExp]",jL="[object Set]",BL="[object String]",UL="[object Symbol]",KL="[object ArrayBuffer]",VL="[object DataView]",Rg=xt?xt.prototype:void 0,Rf=Rg?Rg.valueOf:void 0;function uA(e,t,r,n,a,s,o){switch(r){case VL:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case KL:if(e.byteLength!=t.byteLength||!s(new Wl(e),new Wl(t)))return!1;return!0;case ML:case DL:case FL:return wo(+e,+t);case xL:return e.name==t.name&&e.message==t.message;case zL:case BL:return e==t+"";case GL:var l=kL;case jL:var u=n&OL;if(l||(l=ah),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;n|=LL,o.set(e,t);var f=sA(l(e),l(t),n,a,s,o);return o.delete(e),f;case UL:if(Rf)return Rf.call(e)==Rf.call(t)}return!1}i(uA,"equalByTag");var WL=uA,qL=1,HL=Object.prototype,YL=HL.hasOwnProperty;function cA(e,t,r,n,a,s){var o=r&qL,l=Kd(e),u=l.length,c=Kd(t),f=c.length;if(u!=f&&!o)return!1;var d=u;while(d--){var m=l[d];if(!(o?m in t:YL.call(t,m)))return!1}var g=s.get(e),v=s.get(t);if(g&&v)return g==t&&v==e;var S=!0;s.set(e,t),s.set(t,e);var I=o;while(++d<u){m=l[d];var P=e[m],N=t[m];if(n)var E=o?n(N,P,m,t,e,s):n(P,N,m,e,t,s);if(!(E===void 0?P===N||a(P,N,r,n,s):E)){S=!1;break}I||(I=m=="constructor")}if(S&&!I){var L=e.constructor,U=t.constructor;if(L!=U&&(("constructor"in e)&&("constructor"in t))&&!(typeof L=="function"&&L instanceof L&&typeof U=="function"&&U instanceof U))S=!1}return s.delete(e),s.delete(t),S}i(cA,"equalObjects");var XL=cA,JL=1,Ag="[object Arguments]",Eg="[object Array]",jo="[object Object]",ZL=Object.prototype,Cg=ZL.hasOwnProperty;function fA(e,t,r,n,a,s){var o=oe(e),l=oe(t),u=o?Eg:wi(e),c=l?Eg:wi(t);u=u==Ag?jo:u,c=c==Ag?jo:c;var f=u==jo,d=c==jo,m=u==c;if(m&&to(e)){if(!to(t))return!1;o=!0,f=!1}if(m&&!f)return s||(s=new Gs),o||qm(e)?sA(e,t,r,n,a,s):WL(e,t,u,r,n,a,s);if(!(r&JL)){var g=f&&Cg.call(e,"__wrapped__"),v=d&&Cg.call(t,"__wrapped__");if(g||v){var S=g?e.value():e,I=v?t.value():t;return s||(s=new Gs),a(S,I,r,n,s)}}if(!m)return!1;return s||(s=new Gs),XL(e,t,r,n,a,s)}i(fA,"baseIsEqualDeep");var QL=fA;function ih(e,t,r,n,a){if(e===t)return!0;if(e==null||t==null||!rr(e)&&!rr(t))return e!==e&&t!==t;return QL(e,t,r,n,ih,a)}i(ih,"baseIsEqual");var dA=ih,eM=1,tM=2;function pA(e,t,r,n){var a=r.length,s=a,o=!n;if(e==null)return!s;e=Object(e);while(a--){var l=r[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}while(++a<s){l=r[a];var u=l[0],c=e[u],f=l[1];if(o&&l[2]){if(c===void 0&&!(u in e))return!1}else{var d=new Gs;if(n)var m=n(c,f,u,e,t,d);if(!(m===void 0?dA(f,c,eM|tM,n,d):m))return!1}}return!0}i(pA,"baseIsMatch");var rM=pA;function mA(e){return e===e&&!Gt(e)}i(mA,"isStrictComparable");var hA=mA;function yA(e){var t=wt(e),r=t.length;while(r--){var n=t[r],a=e[n];t[r]=[n,a,hA(a)]}return t}i(yA,"getMatchData");var nM=yA;function gA(e,t){return function(r){if(r==null)return!1;return r[e]===t&&(t!==void 0||(e in Object(r)))}}i(gA,"matchesStrictComparable");var vA=gA;function TA(e){var t=nM(e);if(t.length==1&&t[0][2])return vA(t[0][0],t[0][1]);return function(r){return r===e||rM(r,e,t)}}i(TA,"baseMatches");var aM=TA;function $A(e,t){return e!=null&&t in Object(e)}i($A,"baseHasIn");var iM=$A;function RA(e,t,r){t=Rc(t,e);var n=-1,a=t.length,s=!1;while(++n<a){var o=ko(t[n]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}if(s||++n!=a)return s;return a=e==null?0:e.length,!!a&&Wm(a)&&fc(o,a)&&(oe(e)||mc(e))}i(RA,"hasPath");var AA=RA;function EA(e,t){return e!=null&&AA(e,t,iM)}i(EA,"hasIn");var sM=EA,oM=1,lM=2;function CA(e,t){if(Hm(e)&&hA(t))return vA(ko(e),t);return function(r){var n=FO(r,e);return n===void 0&&n===t?sM(r,e):dA(t,n,oM|lM)}}i(CA,"baseMatchesProperty");var uM=CA;function bA(e){return function(t){return t==null?void 0:t[e]}}i(bA,"baseProperty");var cM=bA;function _A(e){return function(t){return Ym(t,e)}}i(_A,"basePropertyDeep");var fM=_A;function SA(e){return Hm(e)?cM(ko(e)):fM(e)}i(SA,"property");var dM=SA;function wA(e){if(typeof e=="function")return e;if(e==null)return So;if(typeof e=="object")return oe(e)?uM(e[0],e[1]):aM(e);return dM(e)}i(wA,"baseIteratee");var Rr=wA;function IA(e,t,r,n){var a=-1,s=e==null?0:e.length;while(++a<s){var o=e[a];t(n,o,r(o),e)}return n}i(IA,"arrayAggregator");var pM=IA;function NA(e){return function(t,r,n){var a=-1,s=Object(t),o=n(t),l=o.length;while(l--){var u=o[e?l:++a];if(r(s[u],u,s)===!1)break}return t}}i(NA,"createBaseFor");var mM=NA,hM=mM(),yM=hM;function PA(e,t){return e&&yM(e,t,wt)}i(PA,"baseForOwn");var gM=PA;function kA(e,t){return function(r,n){if(r==null)return r;if(!$r(r))return e(r,n);var a=r.length,s=t?a:-1,o=Object(r);while(t?s--:++s<a)if(n(o[s],s,o)===!1)break;return r}}i(kA,"createBaseEach");var vM=kA,TM=vM(gM),Ca=TM;function OA(e,t,r,n){return Ca(e,function(a,s,o){t(n,a,r(a),o)}),n}i(OA,"baseAggregator");var $M=OA;function LA(e,t){return function(r,n){var a=oe(r)?pM:$M,s=t?t():{};return a(r,e,Rr(n,2),s)}}i(LA,"createAggregator");var RM=LA,MA=Object.prototype,AM=MA.hasOwnProperty,EM=Vm(function(e,t){e=Object(e);var r=-1,n=t.length,a=n>2?t[2]:void 0;if(a&&pc(t[0],t[1],a))n=1;while(++r<n){var s=t[r],o=hc(s),l=-1,u=o.length;while(++l<u){var c=o[l],f=e[c];if(f===void 0||wo(f,MA[c])&&!AM.call(e,c))e[c]=s[c]}}return e}),sh=EM;function DA(e){return rr(e)&&$r(e)}i(DA,"isArrayLikeObject");var bg=DA;function xA(e,t,r){var n=-1,a=e==null?0:e.length;while(++n<a)if(r(t,e[n]))return!0;return!1}i(xA,"arrayIncludesWith");var GA=xA,CM=200;function FA(e,t,r,n){var a=-1,s=c$,o=!0,l=e.length,u=[],c=t.length;if(!l)return u;if(r)t=bo(t,Po(r));if(n)s=GA,o=!1;else if(t.length>=CM)s=nh,o=!1,t=new rh(t);e:while(++a<l){var f=e[a],d=r==null?f:r(f);if(f=n||f!==0?f:0,o&&d===d){var m=c;while(m--)if(t[m]===d)continue e;u.push(f)}else if(!s(t,d,n))u.push(f)}return u}i(FA,"baseDifference");var bM=FA,_M=Vm(function(e,t){return bg(e)?bM(e,Zm(t,1,bg,!0)):[]}),Ac=_M;function zA(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}i(zA,"last");var la=zA;function jA(e,t,r){var n=e==null?0:e.length;if(!n)return[];return t=r||t===void 0?1:_o(t),gR(e,t<0?0:t,n)}i(jA,"drop");var rt=jA;function BA(e,t,r){var n=e==null?0:e.length;if(!n)return[];return t=r||t===void 0?1:_o(t),t=n-t,gR(e,0,t<0?0:t)}i(BA,"dropRight");var io=BA;function UA(e){return typeof e=="function"?e:So}i(UA,"castFunction");var SM=UA;function KA(e,t){var r=oe(e)?n$:Ca;return r(e,SM(t))}i(KA,"forEach");var H=KA;function VA(e,t){var r=-1,n=e==null?0:e.length;while(++r<n)if(!t(e[r],r,e))return!1;return!0}i(VA,"arrayEvery");var wM=VA;function WA(e,t){var r=!0;return Ca(e,function(n,a,s){return r=!!t(n,a,s),r}),r}i(WA,"baseEvery");var IM=WA;function qA(e,t,r){var n=oe(e)?wM:IM;if(r&&pc(e,t,r))t=void 0;return n(e,Rr(t,3))}i(qA,"every");var tr=qA;function HA(e,t){var r=[];return Ca(e,function(n,a,s){if(t(n,a,s))r.push(n)}),r}i(HA,"baseFilter");var YA=HA;function XA(e,t){var r=oe(e)?Qm:YA;return r(e,Rr(t,3))}i(XA,"filter");var zt=XA;function JA(e){return function(t,r,n){var a=Object(t);if(!$r(t)){var s=Rr(r,3);t=wt(t),r=i(function(l){return s(a[l],l,a)},"predicate")}var o=e(t,r,n);return o>-1?a[s?t[o]:o]:void 0}}i(JA,"createFind");var NM=JA,PM=Math.max;function ZA(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:_o(r);if(a<0)a=PM(n+a,0);return i$(e,Rr(t,3),a)}i(ZA,"findIndex");var kM=ZA,OM=NM(kM),Ii=OM;function QA(e){return e&&e.length?e[0]:void 0}i(QA,"head");var nr=QA;function eE(e,t){var r=-1,n=$r(e)?Array(e.length):[];return Ca(e,function(a,s,o){n[++r]=t(a,s,o)}),n}i(eE,"baseMap");var LM=eE;function tE(e,t){var r=oe(e)?bo:LM;return r(e,Rr(t,3))}i(tE,"map");var j=tE;function rE(e,t){return Zm(j(e,t),1)}i(rE,"flatMap");var Dt=rE,MM=Object.prototype,DM=MM.hasOwnProperty,xM=RM(function(e,t,r){if(DM.call(e,r))e[r].push(t);else Km(e,r,[t])}),GM=xM,FM=Object.prototype,zM=FM.hasOwnProperty;function nE(e,t){return e!=null&&zM.call(e,t)}i(nE,"baseHas");var jM=nE;function aE(e,t){return e!=null&&AA(e,t,jM)}i(aE,"has");var V=aE,BM="[object String]";function iE(e){return typeof e=="string"||!oe(e)&&rr(e)&&_n(e)==BM}i(iE,"isString");var Rt=iE;function sE(e,t){return bo(t,function(r){return e[r]})}i(sE,"baseValues");var UM=sE;function oE(e){return e==null?[]:UM(e,wt(e))}i(oE,"values");var Ye=oE,KM=Math.max;function lE(e,t,r,n){e=$r(e)?e:Ye(e),r=r&&!n?_o(r):0;var a=e.length;if(r<0)r=KM(a+r,0);return Rt(e)?r<=a&&e.indexOf(t,r)>-1:!!a&&Um(e,t,r)>-1}i(lE,"includes");var vt=lE,VM=Math.max;function uE(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:_o(r);if(a<0)a=VM(n+a,0);return Um(e,t,a)}i(uE,"indexOf");var _g=uE,WM="[object Map]",qM="[object Set]",HM=Object.prototype,YM=HM.hasOwnProperty;function cE(e){if(e==null)return!0;if($r(e)&&(oe(e)||typeof e=="string"||typeof e.splice=="function"||to(e)||qm(e)||mc(e)))return!e.length;var t=wi(e);if(t==WM||t==qM)return!e.size;if(No(e))return!D$(e).length;for(var r in e)if(YM.call(e,r))return!1;return!0}i(cE,"isEmpty");var Ae=cE,XM="[object RegExp]";function fE(e){return rr(e)&&_n(e)==XM}i(fE,"baseIsRegExp");var JM=fE,Sg=$n&&$n.isRegExp,ZM=Sg?Po(Sg):JM,Br=ZM;function dE(e){return e===void 0}i(dE,"isUndefined");var Ur=dE,QM="Expected a function";function pE(e){if(typeof e!="function")throw TypeError(QM);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}i(pE,"negate");var eD=pE;function mE(e,t,r,n){if(!Gt(e))return e;t=Rc(t,e);var a=-1,s=t.length,o=s-1,l=e;while(l!=null&&++a<s){var u=ko(t[a]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(a!=o){var f=l[u];if(c=n?n(f,u,l):void 0,c===void 0)c=Gt(f)?f:fc(t[a+1])?[]:{}}dc(l,u,c),l=l[u]}return e}i(mE,"baseSet");var tD=mE;function hE(e,t,r){var n=-1,a=t.length,s={};while(++n<a){var o=t[n],l=Ym(e,o);if(r(l,o))tD(s,Rc(o,e),l)}return s}i(hE,"basePickBy");var rD=hE;function yE(e,t){if(e==null)return{};var r=bo(GR(e),function(n){return[n]});return t=Rr(t),rD(e,r,function(n,a){return t(n,a[0])})}i(yE,"pickBy");var ar=yE;function gE(e,t,r,n,a){return a(e,function(s,o,l){r=n?(n=!1,s):t(r,s,o,l)}),r}i(gE,"baseReduce");var nD=gE;function vE(e,t,r){var n=oe(e)?BO:nD,a=arguments.length<3;return n(e,Rr(t,4),r,a,Ca)}i(vE,"reduce");var Nt=vE;function TE(e,t){var r=oe(e)?Qm:YA;return r(e,eD(Rr(t,3)))}i(TE,"reject");var Ec=TE;function $E(e,t){var r;return Ca(e,function(n,a,s){return r=t(n,a,s),!r}),!!r}i($E,"baseSome");var aD=$E;function RE(e,t,r){var n=oe(e)?nA:aD;if(r&&pc(e,t,r))t=void 0;return n(e,Rr(t,3))}i(RE,"some");var AE=RE,iD=1/0,sD=!(hi&&1/ah(new hi([,-0]))[1]==iD)?Je:function(e){return new hi(e)},oD=sD,lD=200;function EE(e,t,r){var n=-1,a=c$,s=e.length,o=!0,l=[],u=l;if(r)o=!1,a=GA;else if(s>=lD){var c=t?null:oD(e);if(c)return ah(c);o=!1,a=nh,u=new rh}else u=t?[]:l;e:while(++n<s){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,o&&d===d){var m=u.length;while(m--)if(u[m]===d)continue e;if(t)u.push(d);l.push(f)}else if(!a(u,d,r)){if(u!==l)u.push(d);l.push(f)}}return l}i(EE,"baseUniq");var uD=EE;function CE(e){return e&&e.length?uD(e):[]}i(CE,"uniq");var oh=CE;function ql(e){if(console&&console.error)console.error(`Error: ${e}`)}i(ql,"PRINT_ERROR");function lh(e){if(console&&console.warn)console.warn(`Warning: ${e}`)}i(lh,"PRINT_WARNING");function uh(e){let t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}i(uh,"timer");function ch(e){function t(){}i(t,"FakeConstructor"),t.prototype=e;let r=new t;function n(){return typeof r.bar}return i(n,"fakeAccess"),n(),n(),e;(0,eval)(e)}i(ch,"toFastProperties");function bE(e){if(_E(e))return e.LABEL;else return e.name}i(bE,"tokenLabel");function _E(e){return Rt(e.LABEL)&&e.LABEL!==""}i(_E,"hasTokenLabel");var Ar=class{static{i(this,"AbstractProduction")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),H(this.definition,(t)=>{t.accept(e)})}},ht=class extends Ar{static{i(this,"NonTerminal")}constructor(e){super([]);this.idx=1,It(this,ar(e,(t)=>t!==void 0))}set definition(e){}get definition(){if(this.referencedRule!==void 0)return this.referencedRule.definition;return[]}accept(e){e.visit(this)}},Mi=class extends Ar{static{i(this,"Rule")}constructor(e){super(e.definition);this.orgText="",It(this,ar(e,(t)=>t!==void 0))}},At=class extends Ar{static{i(this,"Alternative")}constructor(e){super(e.definition);this.ignoreAmbiguities=!1,It(this,ar(e,(t)=>t!==void 0))}},nt=class extends Ar{static{i(this,"Option")}constructor(e){super(e.definition);this.idx=1,It(this,ar(e,(t)=>t!==void 0))}},Pt=class extends Ar{static{i(this,"RepetitionMandatory")}constructor(e){super(e.definition);this.idx=1,It(this,ar(e,(t)=>t!==void 0))}},kt=class extends Ar{static{i(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition);this.idx=1,It(this,ar(e,(t)=>t!==void 0))}},Le=class extends Ar{static{i(this,"Repetition")}constructor(e){super(e.definition);this.idx=1,It(this,ar(e,(t)=>t!==void 0))}},Et=class extends Ar{static{i(this,"RepetitionWithSeparator")}constructor(e){super(e.definition);this.idx=1,It(this,ar(e,(t)=>t!==void 0))}},Ct=class extends Ar{static{i(this,"Alternation")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition);this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,It(this,ar(e,(t)=>t!==void 0))}},_e=class{static{i(this,"Terminal")}constructor(e){this.idx=1,It(this,ar(e,(t)=>t!==void 0))}accept(e){e.visit(this)}};function SE(e){return j(e,zs)}i(SE,"serializeGrammar");function zs(e){function t(r){return j(r,zs)}if(i(t,"convertDefinition"),e instanceof ht){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(Rt(e.label))r.label=e.label;return r}else if(e instanceof At)return{type:"Alternative",definition:t(e.definition)};else if(e instanceof nt)return{type:"Option",idx:e.idx,definition:t(e.definition)};else if(e instanceof Pt)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};else if(e instanceof kt)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:zs(new _e({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof Et)return{type:"RepetitionWithSeparator",idx:e.idx,separator:zs(new _e({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof Le)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};else if(e instanceof Ct)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};else if(e instanceof _e){let r={type:"Terminal",name:e.terminalType.name,label:bE(e.terminalType),idx:e.idx};if(Rt(e.label))r.terminalLabel=e.label;let n=e.terminalType.PATTERN;if(e.terminalType.PATTERN)r.pattern=Br(n)?n.source:n;return r}else if(e instanceof Mi)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};else throw Error("non exhaustive match")}i(zs,"serializeProduction");var Di=class{static{i(this,"GAstVisitor")}visit(e){let t=e;switch(t.constructor){case ht:return this.visitNonTerminal(t);case At:return this.visitAlternative(t);case nt:return this.visitOption(t);case Pt:return this.visitRepetitionMandatory(t);case kt:return this.visitRepetitionMandatoryWithSeparator(t);case Et:return this.visitRepetitionWithSeparator(t);case Le:return this.visitRepetition(t);case Ct:return this.visitAlternation(t);case _e:return this.visitTerminal(t);case Mi:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function wE(e){return e instanceof At||e instanceof nt||e instanceof Le||e instanceof Pt||e instanceof kt||e instanceof Et||e instanceof _e||e instanceof Mi}i(wE,"isSequenceProd");function so(e,t=[]){if(e instanceof nt||e instanceof Le||e instanceof Et)return!0;if(e instanceof Ct)return AE(e.definition,(n)=>so(n,t));else if(e instanceof ht&&vt(t,e))return!1;else if(e instanceof Ar){if(e instanceof ht)t.push(e);return tr(e.definition,(n)=>so(n,t))}else return!1}i(so,"isOptionalProd");function IE(e){return e instanceof Ct}i(IE,"isBranchingProd");function Wt(e){if(e instanceof ht)return"SUBRULE";else if(e instanceof nt)return"OPTION";else if(e instanceof Ct)return"OR";else if(e instanceof Pt)return"AT_LEAST_ONE";else if(e instanceof kt)return"AT_LEAST_ONE_SEP";else if(e instanceof Et)return"MANY_SEP";else if(e instanceof Le)return"MANY";else if(e instanceof _e)return"CONSUME";else throw Error("non exhaustive match")}i(Wt,"getProductionDslName");var Cc=class{static{i(this,"RestWalker")}walk(e,t=[]){H(e.definition,(r,n)=>{let a=rt(e.definition,n+1);if(r instanceof ht)this.walkProdRef(r,a,t);else if(r instanceof _e)this.walkTerminal(r,a,t);else if(r instanceof At)this.walkFlat(r,a,t);else if(r instanceof nt)this.walkOption(r,a,t);else if(r instanceof Pt)this.walkAtLeastOne(r,a,t);else if(r instanceof kt)this.walkAtLeastOneSep(r,a,t);else if(r instanceof Et)this.walkManySep(r,a,t);else if(r instanceof Le)this.walkMany(r,a,t);else if(r instanceof Ct)this.walkOr(r,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){let n=t.concat(r);this.walk(e,n)}walkOption(e,t,r){let n=t.concat(r);this.walk(e,n)}walkAtLeastOne(e,t,r){let n=[new nt({definition:e.definition})].concat(t,r);this.walk(e,n)}walkAtLeastOneSep(e,t,r){let n=qd(e,t,r);this.walk(e,n)}walkMany(e,t,r){let n=[new nt({definition:e.definition})].concat(t,r);this.walk(e,n)}walkManySep(e,t,r){let n=qd(e,t,r);this.walk(e,n)}walkOr(e,t,r){let n=t.concat(r);H(e.definition,(a)=>{let s=new At({definition:[a]});this.walk(s,n)})}};function qd(e,t,r){return[new nt({definition:[new _e({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}i(qd,"restForRepetitionWithSeparator");function xi(e){if(e instanceof ht)return xi(e.referencedRule);else if(e instanceof _e)return kE(e);else if(wE(e))return NE(e);else if(IE(e))return PE(e);else throw Error("non exhaustive match")}i(xi,"first");function NE(e){let t=[],r=e.definition,n=0,a=r.length>n,s,o=!0;while(a&&o)s=r[n],o=so(s),t=t.concat(xi(s)),n=n+1,a=r.length>n;return oh(t)}i(NE,"firstForSequence");function PE(e){let t=j(e.definition,(r)=>xi(r));return oh(Xt(t))}i(PE,"firstForBranching");function kE(e){return[e.terminalType]}i(kE,"firstForTerminal");var OE="_~IN~_",cD=class extends Cc{static{i(this,"ResyncFollowsWalker")}constructor(e){super();this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){let n=ME(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(r),s=new At({definition:a}),o=xi(s);this.follows[n]=o}};function LE(e){let t={};return H(e,(r)=>{let n=new cD(r).startWalking();It(t,n)}),t}i(LE,"computeAllProdsFollows");function ME(e,t){return e.name+t+OE}i(ME,"buildBetweenProdsFollowPrefix");var pl={},fD=new pT;function Lo(e){let t=e.toString();if(pl.hasOwnProperty(t))return pl[t];else{let r=fD.pattern(t);return pl[t]=r,r}}i(Lo,"getRegExpAst");function DE(){pl={}}i(DE,"clearRegExpParserCache");var xE="Complement Sets are not supported for first char optimization",Hl=`Unable to use "first char" lexer optimizations:
|
|
47
|
+
`;function GE(e,t=!1){try{let r=Lo(e);return Yl(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===xE){if(t)lh(`${Hl} Unable to optimize: < ${e.toString()} >
|
|
48
|
+
Complement Sets cannot be automatically optimized.
|
|
49
|
+
This will disable the lexer's first char optimizations.
|
|
50
|
+
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`)}else{let n="";if(t)n=`
|
|
51
|
+
This will disable the lexer's first char optimizations.
|
|
52
|
+
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`;ql(`${Hl}
|
|
53
|
+
Failed parsing: < ${e.toString()} >
|
|
54
|
+
Using the @chevrotain/regexp-to-ast library
|
|
55
|
+
Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}i(GE,"getOptimizedStartCodesIndices");function Yl(e,t,r){switch(e.type){case"Disjunction":for(let a=0;a<e.value.length;a++)Yl(e.value[a],t,r);break;case"Alternative":let n=e.value;for(let a=0;a<n.length;a++){let s=n[a];switch(s.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}let o=s;switch(o.type){case"Character":bs(o.value,t,r);break;case"Set":if(o.complement===!0)throw Error(xE);H(o.value,(u)=>{if(typeof u==="number")bs(u,t,r);else{let c=u;if(r===!0)for(let f=c.from;f<=c.to;f++)bs(f,t,r);else{for(let f=c.from;f<=c.to&&f<Ss;f++)bs(f,t,r);if(c.to>=Ss){let f=c.from>=Ss?c.from:Ss,d=c.to,m=Kr(f),g=Kr(d);for(let v=m;v<=g;v++)t[v]=v}}}});break;case"Group":Yl(o.value,t,r);break;default:throw Error("Non Exhaustive Match")}let l=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&Xl(o)===!1||o.type!=="Group"&&l===!1)break}break;default:throw Error("non exhaustive match!")}return Ye(t)}i(Yl,"firstCharOptimizedIndices");function bs(e,t,r){let n=Kr(e);if(t[n]=n,r===!0)FE(e,t)}i(bs,"addOptimizedIdxToResult");function FE(e,t){let r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){let a=Kr(n.charCodeAt(0));t[a]=a}else{let a=r.toLowerCase();if(a!==r){let s=Kr(a.charCodeAt(0));t[s]=s}}}i(FE,"handleIgnoreCase");function Hd(e,t){return Ii(e.value,(r)=>{if(typeof r==="number")return vt(t,r);else{let n=r;return Ii(t,(a)=>n.from<=a&&a<=n.to)!==void 0}})}i(Hd,"findCode");function Xl(e){let t=e.quantifier;if(t&&t.atLeast===0)return!0;if(!e.value)return!1;return oe(e.value)?tr(e.value,Xl):Xl(e.value)}i(Xl,"isWholeOptional");var dD=class extends nc{static{i(this,"CharCodeFinder")}constructor(e){super();this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found===!0)return;switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return;case"Lookbehind":this.visitLookbehind(e);return;case"NegativeLookbehind":this.visitNegativeLookbehind(e);return}super.visitChildren(e)}visitCharacter(e){if(vt(this.targetCharCodes,e.value))this.found=!0}visitSet(e){if(e.complement){if(Hd(e,this.targetCharCodes)===void 0)this.found=!0}else if(Hd(e,this.targetCharCodes)!==void 0)this.found=!0}};function bc(e,t){if(t instanceof RegExp){let r=Lo(t),n=new dD(e);return n.visit(r),n.found}else return Ii(t,(r)=>vt(e,r.charCodeAt(0)))!==void 0}i(bc,"canMatchCharCode");var ua="PATTERN",_s="defaultMode",Bo="modes";function zE(e,t){t=sh(t,{debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
|
|
56
|
+
`],tracer:i((N,E)=>E(),"tracer")});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{oC()});let n;r("Reject Lexer.NA",()=>{n=Ec(e,(N)=>N[ua]===pt.NA)});let a=!1,s;r("Transform Patterns",()=>{a=!1,s=j(n,(N)=>{let E=N[ua];if(Br(E)){let L=E.source;if(L.length===1&&L!=="^"&&L!=="$"&&L!=="."&&!E.ignoreCase)return L;else if(L.length===2&&L[0]==="\\"&&!vt(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],L[1]))return L[1];else return Yd(E)}else if(Yr(E))return a=!0,{exec:E};else if(typeof E==="object")return a=!0,E;else if(typeof E==="string")if(E.length===1)return E;else{let L=E.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),U=new RegExp(L);return Yd(U)}else throw Error("non exhaustive match")})});let o,l,u,c,f;r("misc mapping",()=>{o=j(n,(N)=>N.tokenTypeIdx),l=j(n,(N)=>{let E=N.GROUP;if(E===pt.SKIPPED)return;else if(Rt(E))return E;else if(Ur(E))return!1;else throw Error("non exhaustive match")}),u=j(n,(N)=>{let E=N.LONGER_ALT;if(E)return oe(E)?j(E,(U)=>_g(n,U)):[_g(n,E)]}),c=j(n,(N)=>N.PUSH_MODE),f=j(n,(N)=>V(N,"POP_MODE"))});let d;r("Line Terminator Handling",()=>{let N=ph(t.lineTerminatorCharacters);if(d=j(n,(E)=>!1),t.positionTracking!=="onlyOffset")d=j(n,(E)=>{if(V(E,"LINE_BREAKS"))return!!E.LINE_BREAKS;else return dh(E,N)===!1&&bc(N,E.PATTERN)})});let m,g,v,S;r("Misc Mapping #2",()=>{m=j(n,fh),g=j(s,iC),v=Nt(n,(N,E)=>{let L=E.GROUP;if(Rt(L)&&L!==pt.SKIPPED)N[L]=[];return N},{}),S=j(s,(N,E)=>({pattern:s[E],longerAlt:u[E],canLineTerminator:d[E],isCustom:m[E],short:g[E],group:l[E],push:c[E],pop:f[E],tokenTypeIdx:o[E],tokenType:n[E]}))});let I=!0,P=[];if(!t.safeMode)r("First Char Optimization",()=>{P=Nt(n,(N,E,L)=>{if(typeof E.PATTERN==="string"){let U=E.PATTERN.charCodeAt(0),ee=Kr(U);ml(N,ee,S[L])}else if(oe(E.START_CHARS_HINT)){let U;H(E.START_CHARS_HINT,(ee)=>{let re=typeof ee==="string"?ee.charCodeAt(0):ee,ve=Kr(re);if(U!==ve)U=ve,ml(N,ve,S[L])})}else if(Br(E.PATTERN))if(E.PATTERN.unicode){if(I=!1,t.ensureOptimizations)ql(`${Hl} Unable to analyze < ${E.PATTERN.toString()} > pattern.
|
|
57
|
+
The regexp unicode flag is not currently supported by the regexp-to-ast library.
|
|
58
|
+
This will disable the lexer's first char optimizations.
|
|
59
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`)}else{let U=GE(E.PATTERN,t.ensureOptimizations);if(Ae(U))I=!1;H(U,(ee)=>{ml(N,ee,S[L])})}else{if(t.ensureOptimizations)ql(`${Hl} TokenType: <${E.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
|
|
60
|
+
This will disable the lexer's first char optimizations.
|
|
61
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`);I=!1}return N},[])});return{emptyGroups:v,patternIdxToConfig:S,charCodeToPatternIdxToConfig:P,hasCustom:a,canBeOptimized:I}}i(zE,"analyzeTokenTypes");function jE(e,t){let r=[],n=UE(e);r=r.concat(n.errors);let a=KE(n.valid),s=a.valid;return r=r.concat(a.errors),r=r.concat(BE(s)),r=r.concat(XE(s)),r=r.concat(JE(s,t)),r=r.concat(ZE(s)),r}i(jE,"validatePatterns");function BE(e){let t=[],r=zt(e,(n)=>Br(n[ua]));return t=t.concat(VE(r)),t=t.concat(qE(r)),t=t.concat(HE(r)),t=t.concat(YE(r)),t=t.concat(WE(r)),t}i(BE,"validateRegExpPattern");function UE(e){let t=zt(e,(a)=>!V(a,ua)),r=j(t,(a)=>({message:"Token Type: ->"+a.name+"<- missing static 'PATTERN' property",type:Me.MISSING_PATTERN,tokenTypes:[a]})),n=Ac(e,t);return{errors:r,valid:n}}i(UE,"findMissingPatterns");function KE(e){let t=zt(e,(a)=>{let s=a[ua];return!Br(s)&&!Yr(s)&&!V(s,"exec")&&!Rt(s)}),r=j(t,(a)=>({message:"Token Type: ->"+a.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Me.INVALID_PATTERN,tokenTypes:[a]})),n=Ac(e,t);return{errors:r,valid:n}}i(KE,"findInvalidPatterns");var pD=/[^\\][$]/;function VE(e){class t extends nc{static{i(this,"EndAnchorFinder")}constructor(){super(...arguments);this.found=!1}visitEndAnchor(a){this.found=!0}}let r=zt(e,(a)=>{let s=a.PATTERN;try{let o=Lo(s),l=new t;return l.visit(o),l.found}catch(o){return pD.test(s.source)}});return j(r,(a)=>({message:`Unexpected RegExp Anchor Error:
|
|
62
|
+
Token Type: ->`+a.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
|
|
63
|
+
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Me.EOI_ANCHOR_FOUND,tokenTypes:[a]}))}i(VE,"findEndOfInputAnchor");function WE(e){let t=zt(e,(n)=>n.PATTERN.test(""));return j(t,(n)=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Me.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}i(WE,"findEmptyMatchRegExps");var mD=/[^\\[][\^]|^\^/;function qE(e){class t extends nc{static{i(this,"StartAnchorFinder")}constructor(){super(...arguments);this.found=!1}visitStartAnchor(a){this.found=!0}}let r=zt(e,(a)=>{let s=a.PATTERN;try{let o=Lo(s),l=new t;return l.visit(o),l.found}catch(o){return mD.test(s.source)}});return j(r,(a)=>({message:`Unexpected RegExp Anchor Error:
|
|
64
|
+
Token Type: ->`+a.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
|
|
65
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Me.SOI_ANCHOR_FOUND,tokenTypes:[a]}))}i(qE,"findStartOfInputAnchor");function HE(e){let t=zt(e,(n)=>{let a=n[ua];return a instanceof RegExp&&(a.multiline||a.global)});return j(t,(n)=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Me.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}i(HE,"findUnsupportedFlags");function YE(e){let t=[],r=j(e,(s)=>Nt(e,(o,l)=>{if(s.PATTERN.source===l.PATTERN.source&&!vt(t,l)&&l.PATTERN!==pt.NA)return t.push(l),o.push(l),o;return o},[]));r=Oo(r);let n=zt(r,(s)=>s.length>1);return j(n,(s)=>{let o=j(s,(u)=>u.name);return{message:`The same RegExp pattern ->${nr(s).PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:Me.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}i(YE,"findDuplicatePatterns");function XE(e){let t=zt(e,(n)=>{if(!V(n,"GROUP"))return!1;let a=n.GROUP;return a!==pt.SKIPPED&&a!==pt.NA&&!Rt(a)});return j(t,(n)=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Me.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}i(XE,"findInvalidGroupType");function JE(e,t){let r=zt(e,(a)=>a.PUSH_MODE!==void 0&&!vt(t,a.PUSH_MODE));return j(r,(a)=>({message:`Token Type: ->${a.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${a.PUSH_MODE}<-which does not exist`,type:Me.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[a]}))}i(JE,"findModesThatDoNotExist");function ZE(e){let t=[],r=Nt(e,(n,a,s)=>{let o=a.PATTERN;if(o===pt.NA)return n;if(Rt(o))n.push({str:o,idx:s,tokenType:a});else if(Br(o)&&eC(o))n.push({str:o.source,idx:s,tokenType:a});return n},[]);return H(e,(n,a)=>{H(r,({str:s,idx:o,tokenType:l})=>{if(a<o&&QE(s,n.PATTERN)){let u=`Token: ->${l.name}<- can never be matched.
|
|
66
|
+
Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
|
|
67
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:u,type:Me.UNREACHABLE_PATTERN,tokenTypes:[n,l]})}})}),t}i(ZE,"findUnreachablePatterns");function QE(e,t){if(Br(t)){if(tC(t))return!1;let r=t.exec(e);return r!==null&&r.index===0}else if(Yr(t))return t(e,0,[],{});else if(V(t,"exec"))return t.exec(e,0,[],{});else if(typeof t==="string")return t===e;else throw Error("non exhaustive match")}i(QE,"tryToMatchStrToPattern");function eC(e){return Ii([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(r)=>e.source.indexOf(r)!==-1)===void 0}i(eC,"noMetaChar");function tC(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}i(tC,"usesLookAheadOrBehind");function Yd(e){let t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}i(Yd,"addStickyFlag");function rC(e,t,r){let n=[];if(!V(e,_s))n.push({message:"A MultiMode Lexer cannot be initialized without a <"+_s+`> property in its definition
|
|
68
|
+
`,type:Me.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE});if(!V(e,Bo))n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Bo+`> property in its definition
|
|
69
|
+
`,type:Me.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY});if(V(e,Bo)&&V(e,_s)&&!V(e.modes,e.defaultMode))n.push({message:`A MultiMode Lexer cannot be initialized with a ${_s}: <${e.defaultMode}>which does not exist
|
|
70
|
+
`,type:Me.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST});if(V(e,Bo))H(e.modes,(a,s)=>{H(a,(o,l)=>{if(Ur(o))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${s}> at index: <${l}>
|
|
71
|
+
`,type:Me.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(V(o,"LONGER_ALT")){let u=oe(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT];H(u,(c)=>{if(!Ur(c)&&!vt(a,c))n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${c.name}> on token <${o.name}> outside of mode <${s}>
|
|
72
|
+
`,type:Me.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})});return n}i(rC,"performRuntimeChecks");function nC(e,t,r){let n=[],a=!1,s=Oo(Xt(Ye(e.modes))),o=Ec(s,(u)=>u[ua]===pt.NA),l=ph(r);if(t)H(o,(u)=>{let c=dh(u,l);if(c!==!1){let d={message:sC(u,c),type:c.issue,tokenType:u};n.push(d)}else if(V(u,"LINE_BREAKS")){if(u.LINE_BREAKS===!0)a=!0}else if(bc(l,u.PATTERN))a=!0});if(t&&!a)n.push({message:`Warning: No LINE_BREAKS Found.
|
|
73
|
+
This Lexer has been defined to track line and column information,
|
|
74
|
+
But none of the Token Types can be identified as matching a line terminator.
|
|
75
|
+
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
|
|
76
|
+
for details.`,type:Me.NO_LINE_BREAKS_FLAGS});return n}i(nC,"performWarningRuntimeChecks");function aC(e){let t={},r=wt(e);return H(r,(n)=>{let a=e[n];if(oe(a))t[n]=[];else throw Error("non exhaustive match")}),t}i(aC,"cloneEmptyGroups");function fh(e){let t=e.PATTERN;if(Br(t))return!1;else if(Yr(t))return!0;else if(V(t,"exec"))return!0;else if(Rt(t))return!1;else throw Error("non exhaustive match")}i(fh,"isCustomPattern");function iC(e){if(Rt(e)&&e.length===1)return e.charCodeAt(0);else return!1}i(iC,"isShortPattern");var hD={test:i(function(e){let t=e.length;for(let r=this.lastIndex;r<t;r++){let n=e.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;else if(n===13){if(e.charCodeAt(r+1)===10)this.lastIndex=r+2;else this.lastIndex=r+1;return!0}}return!1},"test"),lastIndex:0};function dh(e,t){if(V(e,"LINE_BREAKS"))return!1;else if(Br(e.PATTERN)){try{bc(t,e.PATTERN)}catch(r){return{issue:Me.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else if(Rt(e.PATTERN))return!1;else if(fh(e))return{issue:Me.CUSTOM_LINE_BREAK};else throw Error("non exhaustive match")}i(dh,"checkLineBreaksIssues");function sC(e,t){if(t.issue===Me.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
|
|
77
|
+
The problem is in the <${e.name}> Token Type
|
|
78
|
+
Root cause: ${t.errMsg}.
|
|
79
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;else if(t.issue===Me.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
|
|
80
|
+
The problem is in the <${e.name}> Token Type
|
|
81
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;else throw Error("non exhaustive match")}i(sC,"buildLineBreakIssueMessage");function ph(e){return j(e,(r)=>{if(Rt(r))return r.charCodeAt(0);else return r})}i(ph,"getCharCodes");function ml(e,t,r){if(e[t]===void 0)e[t]=[r];else e[t].push(r)}i(ml,"addToMapOfArrays");var Ss=256,hl=[];function Kr(e){return e<Ss?e:hl[e]}i(Kr,"charCodeToOptimizedIndex");function oC(){if(Ae(hl)){hl=Array(65536);for(let e=0;e<65536;e++)hl[e]=e>255?255+~~(e/255):e}}i(oC,"initCharCodeToOptimizedIndexMap");function Gi(e,t){let r=e.tokenTypeIdx;if(r===t.tokenTypeIdx)return!0;else return t.isParent===!0&&t.categoryMatchesMap[r]===!0}i(Gi,"tokenStructuredMatcher");function oo(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}i(oo,"tokenStructuredMatcherNoCategories");var wg=1,lC={};function Fi(e){let t=uC(e);cC(t),dC(t),fC(t),H(t,(r)=>{r.isParent=r.categoryMatches.length>0})}i(Fi,"augmentTokenTypes");function uC(e){let t=at(e),r=e,n=!0;while(n){r=Oo(Xt(j(r,(s)=>s.CATEGORIES)));let a=Ac(r,t);if(t=t.concat(a),Ae(a))n=!1;else r=a}return t}i(uC,"expandCategories");function cC(e){H(e,(t)=>{if(!hh(t))lC[wg]=t,t.tokenTypeIdx=wg++;if(Xd(t)&&!oe(t.CATEGORIES))t.CATEGORIES=[t.CATEGORIES];if(!Xd(t))t.CATEGORIES=[];if(!pC(t))t.categoryMatches=[];if(!mC(t))t.categoryMatchesMap={}})}i(cC,"assignTokenDefaultProps");function fC(e){H(e,(t)=>{t.categoryMatches=[],H(t.categoryMatchesMap,(r,n)=>{t.categoryMatches.push(lC[n].tokenTypeIdx)})})}i(fC,"assignCategoriesTokensProp");function dC(e){H(e,(t)=>{mh([],t)})}i(dC,"assignCategoriesMapProp");function mh(e,t){H(e,(r)=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),H(t.CATEGORIES,(r)=>{let n=e.concat(t);if(!vt(n,r))mh(n,r)})}i(mh,"singleAssignCategoriesToksMap");function hh(e){return V(e,"tokenTypeIdx")}i(hh,"hasShortKeyProperty");function Xd(e){return V(e,"CATEGORIES")}i(Xd,"hasCategoriesProperty");function pC(e){return V(e,"categoryMatches")}i(pC,"hasExtendingTokensTypesProperty");function mC(e){return V(e,"categoryMatchesMap")}i(mC,"hasExtendingTokensTypesMapProperty");function hC(e){return V(e,"tokenTypeIdx")}i(hC,"isTokenType");var Jd={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,a,s){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}},Me;(function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Me||(Me={}));var ws={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
|
|
82
|
+
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Jd,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(ws);var pt=class{static{i(this,"Lexer")}constructor(e,t=ws){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(n,a)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=Array(this.traceInitIndent+1).join("\t");if(this.traceInitIndent<this.traceInitMaxIdent)console.log(`${s}--> <${n}>`);let{time:o,value:l}=uh(a),u=o>10?console.warn:console.log;if(this.traceInitIndent<this.traceInitMaxIdent)u(`${s}<-- <${n}> time: ${o}ms`);return this.traceInitIndent--,l}else return a()},typeof t==="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
|
|
83
|
+
a boolean 2nd argument is no longer supported`);this.config=It({},ws,t);let r=this.config.traceInitPerf;if(r===!0)this.traceInitMaxIdent=1/0,this.traceInitPerf=!0;else if(typeof r==="number")this.traceInitMaxIdent=r,this.traceInitPerf=!0;this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let n,a=!0;if(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===ws.lineTerminatorsPattern)this.config.lineTerminatorsPattern=hD;else if(this.config.lineTerminatorCharacters===ws.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
|
|
84
|
+
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');if(this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),oe(e))n={modes:{defaultMode:at(e)},defaultMode:_s};else a=!1,n=at(e)}),this.config.skipValidations===!1)this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(rC(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(nC(n,this.trackStartLines,this.config.lineTerminatorCharacters))});n.modes=n.modes?n.modes:{},H(n.modes,(o,l)=>{n.modes[l]=Ec(o,(u)=>Ur(u))});let s=wt(n.modes);if(H(n.modes,(o,l)=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1)this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(jE(o,s))});if(Ae(this.lexerDefinitionErrors)){Fi(o);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=zE(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=u.charCodeToPatternIdxToConfig,this.emptyGroups=It({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=u.canBeOptimized}})}),this.defaultMode=n.defaultMode,!Ae(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let l=j(this.lexerDefinitionErrors,(u)=>u.message).join(`-----------------------
|
|
85
|
+
`);throw Error(`Errors detected in definition of Lexer:
|
|
86
|
+
`+l)}H(this.lexerDefinitionWarning,(o)=>{lh(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(a)this.handleModes=Je;if(this.trackStartLines===!1)this.computeNewColumn=So;if(this.trackEndLines===!1)this.updateTokenEndLineColumnLocation=Je;if(/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);if(this.hasCustom)this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom;else this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let o=Nt(this.canModeBeOptimized,(l,u,c)=>{if(u===!1)l.push(c);return l},[]);if(t.ensureOptimizations&&!Ae(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized.
|
|
87
|
+
Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
|
|
88
|
+
Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{DE()}),this.TRACE_INIT("toFastProperties",()=>{ch(this)})})}tokenize(e,t=this.defaultMode){if(!Ae(this.lexerDefinitionErrors)){let n=j(this.lexerDefinitionErrors,(a)=>a.message).join(`-----------------------
|
|
89
|
+
`);throw Error(`Unable to Tokenize because Errors detected in definition of Lexer:
|
|
90
|
+
`+n)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,n,a,s,o,l,u,c,f,d,m,g,v,S,I,P=e,N=P.length,E=0,L=0,U=this.hasCustom?0:Math.floor(e.length/10),ee=Array(U),re=[],ve=this.trackStartLines?1:void 0,me=this.trackStartLines?1:void 0,De=aC(this.emptyGroups),C=this.trackStartLines,M=this.config.lineTerminatorsPattern,h=0,_=[],R=[],A=[],w=[];Object.freeze(w);let O=!1,B=i((Q)=>{if(A.length===1&&Q.tokenType.PUSH_MODE===void 0){let X=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Q);re.push({offset:Q.startOffset,line:Q.startLine,column:Q.startColumn,length:Q.image.length,message:X})}else{A.pop();let X=la(A);_=this.patternIdxToConfig[X],R=this.charCodeToPatternIdxToConfig[X],h=_.length;let je=this.canModeBeOptimized[X]&&this.config.safeMode===!1;if(R&&je)O=!0;else O=!1}},"pop_mode");function G(Q){A.push(Q),R=this.charCodeToPatternIdxToConfig[Q],_=this.patternIdxToConfig[Q],h=_.length,h=_.length;let X=this.canModeBeOptimized[Q]&&this.config.safeMode===!1;if(R&&X)O=!0;else O=!1}i(G,"push_mode"),G.call(this,t);let z,Y=this.config.recoveryEnabled;while(E<N){l=null,f=-1;let Q=P.charCodeAt(E),X;if(O){let he=Kr(Q),Ve=R[he];X=Ve!==void 0?Ve:w}else X=_;let je=X.length;for(r=0;r<je;r++){z=X[r];let he=z.pattern;u=null;let Ve=z.short;if(Ve!==!1){if(Q===Ve)f=1,l=he}else if(z.isCustom===!0)if(I=he.exec(P,E,ee,De),I!==null){if(l=I[0],f=l.length,I.payload!==void 0)u=I.payload}else l=null;else he.lastIndex=E,f=this.matchLength(he,e,E);if(f!==-1){if(o=z.longerAlt,o!==void 0){l=e.substring(E,E+f);let We=o.length;for(a=0;a<We;a++){let Be=_[o[a]],lt=Be.pattern;if(c=null,Be.isCustom===!0)if(I=lt.exec(P,E,ee,De),I!==null){if(s=I[0],I.payload!==void 0)c=I.payload}else s=null;else lt.lastIndex=E,s=this.match(lt,e,E);if(s&&s.length>l.length){l=s,f=s.length,u=c,z=Be;break}}}break}}if(f!==-1){if(d=z.group,d!==void 0)if(l=l!==null?l:e.substring(E,E+f),m=z.tokenTypeIdx,g=this.createTokenInstance(l,E,m,z.tokenType,ve,me,f),this.handlePayload(g,u),d===!1)L=this.addToken(ee,L,g);else De[d].push(g);if(C===!0&&z.canLineTerminator===!0){let he=0,Ve,We;M.lastIndex=0;do if(l=l!==null?l:e.substring(E,E+f),Ve=M.test(l),Ve===!0)We=M.lastIndex-1,he++;while(Ve===!0);if(he!==0)ve=ve+he,me=f-We,this.updateTokenEndLineColumnLocation(g,d,We,he,ve,me,f);else me=this.computeNewColumn(me,f)}else me=this.computeNewColumn(me,f);E=E+f,this.handleModes(z,B,G,g)}else{let he=E,Ve=ve,We=me,Be=Y===!1;while(Be===!1&&E<N){E++;for(n=0;n<h;n++){let lt=_[n],{pattern:st,short:ce}=lt;if(ce!==!1){if(P.charCodeAt(E)===ce)Be=!0}else if(lt.isCustom===!0)Be=st.exec(P,E,ee,De)!==null;else st.lastIndex=E,Be=st.exec(e)!==null;if(Be===!0)break}}if(v=E-he,me=this.computeNewColumn(me,v),S=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(P,he,v,Ve,We,la(A)),re.push({offset:he,line:Ve,column:We,length:v,message:S}),Y===!1)break}}if(!this.hasCustom)ee.length=L;return{tokens:ee,groups:De,errors:re}}handleModes(e,t,r,n){if(e.pop===!0){let a=e.push;if(t(n),a!==void 0)r.call(this,a)}else if(e.push!==void 0)r.call(this,e.push)}updateTokenEndLineColumnLocation(e,t,r,n,a,s,o){let l,u;if(t!==void 0){if(l=r===o-1,u=l?-1:0,!(n===1&&l===!0))e.endLine=a+u,e.endColumn=s-1+-u}}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,r,n){return{image:e,startOffset:t,tokenTypeIdx:r,tokenType:n}}createStartOnlyToken(e,t,r,n,a,s){return{image:e,startOffset:t,startLine:a,startColumn:s,tokenTypeIdx:r,tokenType:n}}createFullToken(e,t,r,n,a,s,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:a,endLine:a,startColumn:s,endColumn:s+o-1,tokenTypeIdx:r,tokenType:n}}addTokenUsingPush(e,t,r){return e.push(r),t}addTokenUsingMemberAccess(e,t,r){return e[t]=r,t++,t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){if(t!==null)e.payload=t}match(e,t,r){if(e.test(t)===!0)return t.substring(r,e.lastIndex);return null}matchLength(e,t,r){if(e.test(t)===!0)return e.lastIndex-r;return-1}};pt.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";pt.NA=/NOT_APPLICABLE/;function ia(e){if(yh(e))return e.LABEL;else return e.name}i(ia,"tokenLabel");function yh(e){return Rt(e.LABEL)&&e.LABEL!==""}i(yh,"hasTokenLabel");var yD="parent",Ig="categories",Ng="label",Pg="group",kg="push_mode",Og="pop_mode",Lg="longer_alt",Mg="line_breaks",Dg="start_chars_hint";function yi(e){return yC(e)}i(yi,"createToken");function yC(e){let t=e.pattern,r={};if(r.name=e.name,!Ur(t))r.PATTERN=t;if(V(e,yD))throw`The parent property is no longer supported.
|
|
91
|
+
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;if(V(e,Ig))r.CATEGORIES=e[Ig];if(Fi([r]),V(e,Ng))r.LABEL=e[Ng];if(V(e,Pg))r.GROUP=e[Pg];if(V(e,Og))r.POP_MODE=e[Og];if(V(e,kg))r.PUSH_MODE=e[kg];if(V(e,Lg))r.LONGER_ALT=e[Lg];if(V(e,Mg))r.LINE_BREAKS=e[Mg];if(V(e,Dg))r.START_CHARS_HINT=e[Dg];return r}i(yC,"createTokenInternal");var Rn=yi({name:"EOF",pattern:pt.NA});Fi([Rn]);function Mo(e,t,r,n,a,s,o,l){return{image:t,startOffset:r,endOffset:n,startLine:a,endLine:s,startColumn:o,endColumn:l,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}i(Mo,"createTokenInstance");function gh(e,t){return Gi(e,t)}i(gh,"tokenMatcher");var pi={buildMismatchTokenMessage({expected:e,actual:t,previous:r,ruleName:n}){return`Expecting ${yh(e)?`--> ${ia(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:a}){let l=`
|
|
92
|
+
but found: '`+nr(t).image+"'";if(n)return"Expecting: "+n+l;else{let u=Nt(e,(m,g)=>m.concat(g),[]),c=j(u,(m)=>`[${j(m,(g)=>ia(g)).join(", ")}]`);return`Expecting: one of these possible Token sequences:
|
|
93
|
+
${j(c,(m,g)=>` ${g+1}. ${m}`).join(`
|
|
94
|
+
`)}`+l}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){let o=`
|
|
95
|
+
but found: '`+nr(t).image+"'";if(r)return"Expecting: "+r+o;else return`Expecting: expecting at least one iteration which starts with one of these possible Token sequences::
|
|
96
|
+
<${j(e,(c)=>`[${j(c,(f)=>ia(f)).join(",")}]`).join(" ,")}>`+o}};Object.freeze(pi);var gD={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
|
|
97
|
+
inside top level rule: ->`+e.name+"<-"}},ea={buildDuplicateFoundError(e,t){function r(f){if(f instanceof _e)return f.terminalType.name;else if(f instanceof ht)return f.nonTerminalName;else return""}i(r,"getExtraProductionArgument");let n=e.name,a=nr(t),s=a.idx,o=Wt(a),l=r(a),u=s>0,c=`->${o}${u?s:""}<- ${l?`with argument: ->${l}<-`:""}
|
|
98
|
+
appears more than once (${t.length} times) in the top level rule: ->${n}<-.
|
|
99
|
+
For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
|
|
100
|
+
`;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,`
|
|
101
|
+
`),c},buildNamespaceConflictError(e){return`Namespace conflict found in grammar.
|
|
102
|
+
The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.
|
|
103
|
+
To resolve this make sure each Terminal and Non-Terminal names are unique
|
|
104
|
+
This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
|
|
105
|
+
and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=j(e.prefixPath,(a)=>ia(a)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix
|
|
106
|
+
in <OR${r}> inside <${e.topLevelRule.name}> Rule,
|
|
107
|
+
<${t}> may appears as a prefix path in all these alternatives.
|
|
108
|
+
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
|
|
109
|
+
For Further details.`},buildAlternationAmbiguityError(e){let t=e.alternation.idx===0?"":e.alternation.idx,r=e.prefixPath.length===0,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${t}> inside <${e.topLevelRule.name}> Rule,
|
|
110
|
+
`;if(r)n+=`These alternatives are all empty (match no tokens), making them indistinguishable.
|
|
111
|
+
Only the last alternative may be empty.
|
|
112
|
+
`;else{let a=j(e.prefixPath,(s)=>ia(s)).join(", ");n+=`<${a}> may appears as a prefix path in all these alternatives.
|
|
113
|
+
`}return n+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
114
|
+
For Further details.`,n},buildEmptyRepetitionError(e){let t=Wt(e.repetition);if(e.repetition.idx!==0)t+=e.repetition.idx;return`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.
|
|
115
|
+
This could lead to an infinite loop.`},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
|
|
116
|
+
Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives:
|
|
117
|
+
<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
|
|
118
|
+
has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name,r=j(e.leftRecursionPath,(s)=>s.name),n=`${t} --> ${r.concat([t]).join(" --> ")}`;return`Left Recursion found in grammar.
|
|
119
|
+
rule: <${t}> can be invoked from itself (directly or indirectly)
|
|
120
|
+
without consuming any Tokens. The grammar path that causes this is:
|
|
121
|
+
${n}
|
|
122
|
+
To fix this refactor your grammar to remove the left recursion.
|
|
123
|
+
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;if(e.topLevelRule instanceof Mi)t=e.topLevelRule.name;else t=e.topLevelRule;return`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function gC(e,t){let r=new vD(e,t);return r.resolveRefs(),r.errors}i(gC,"resolveGrammar");var vD=class extends Di{static{i(this,"GastRefResolverVisitor")}constructor(e,t){super();this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){H(Ye(this.nameToTopRule),(e)=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(!t){let r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:yt.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}else e.referencedRule=t}},TD=class extends Cc{static{i(this,"AbstractNextPossibleTokensWalker")}constructor(e,t){super();this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=at(this.path.ruleStack).reverse(),this.occurrenceStack=at(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){if(!this.found)super.walk(e,t)}walkProdRef(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}}updateExpectedNext(){if(Ae(this.ruleStack))this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0;else this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop()}},$D=class extends TD{static{i(this,"NextAfterTokenWalker")}constructor(e,t){super(e,t);this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let n=t.concat(r),a=new At({definition:n});this.possibleTokTypes=xi(a),this.found=!0}}},_c=class extends Cc{static{i(this,"AbstractNextTerminalAfterProductionWalker")}constructor(e,t){super();this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},RD=class extends _c{static{i(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){if(e.idx===this.occurrence){let n=nr(t.concat(r));if(this.result.isEndOfRule=n===void 0,n instanceof _e)this.result.token=n.terminalType,this.result.occurrence=n.idx}else super.walkMany(e,t,r)}},xg=class extends _c{static{i(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){if(e.idx===this.occurrence){let n=nr(t.concat(r));if(this.result.isEndOfRule=n===void 0,n instanceof _e)this.result.token=n.terminalType,this.result.occurrence=n.idx}else super.walkManySep(e,t,r)}},AD=class extends _c{static{i(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){let n=nr(t.concat(r));if(this.result.isEndOfRule=n===void 0,n instanceof _e)this.result.token=n.terminalType,this.result.occurrence=n.idx}else super.walkAtLeastOne(e,t,r)}},Gg=class extends _c{static{i(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){let n=nr(t.concat(r));if(this.result.isEndOfRule=n===void 0,n instanceof _e)this.result.token=n.terminalType,this.result.occurrence=n.idx}else super.walkAtLeastOneSep(e,t,r)}};function Jl(e,t,r=[]){r=at(r);let n=[],a=0;function s(l){return l.concat(rt(e,a+1))}i(s,"remainingPathWith");function o(l){let u=Jl(s(l),t,r);return n.concat(u)}i(o,"getAlternativesForProd");while(r.length<t&&a<e.length){let l=e[a];if(l instanceof At)return o(l.definition);else if(l instanceof ht)return o(l.definition);else if(l instanceof nt)n=o(l.definition);else if(l instanceof Pt){let u=l.definition.concat([new Le({definition:l.definition})]);return o(u)}else if(l instanceof kt){let u=[new At({definition:l.definition}),new Le({definition:[new _e({terminalType:l.separator})].concat(l.definition)})];return o(u)}else if(l instanceof Et){let u=l.definition.concat([new Le({definition:[new _e({terminalType:l.separator})].concat(l.definition)})]);n=o(u)}else if(l instanceof Le){let u=l.definition.concat([new Le({definition:l.definition})]);n=o(u)}else if(l instanceof Ct)return H(l.definition,(u)=>{if(Ae(u.definition)===!1)n=o(u.definition)}),n;else if(l instanceof _e)r.push(l.terminalType);else throw Error("non exhaustive match");a++}return n.push({partialPath:r,suffixDef:rt(e,a)}),n}i(Jl,"possiblePathsFrom");function vh(e,t,r,n){let s=["EXIT_NONE_TERMINAL"],o="EXIT_ALTERNATIVE",l=!1,u=t.length,c=u-n-1,f=[],d=[];d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});while(!Ae(d)){let m=d.pop();if(m==="EXIT_ALTERNATIVE"){if(l&&la(d).idx<=c)d.pop();continue}let{def:g,idx:v,ruleStack:S,occurrenceStack:I}=m;if(Ae(g))continue;let P=g[0];if(P==="EXIT_NONE_TERMINAL"){let N={idx:v,def:rt(g),ruleStack:io(S),occurrenceStack:io(I)};d.push(N)}else if(P instanceof _e)if(v<u-1){let N=v+1,E=t[N];if(r(E,P.terminalType)){let L={idx:N,def:rt(g),ruleStack:S,occurrenceStack:I};d.push(L)}}else if(v===u-1)f.push({nextTokenType:P.terminalType,nextTokenOccurrence:P.idx,ruleStack:S,occurrenceStack:I}),l=!0;else throw Error("non exhaustive match");else if(P instanceof ht){let N=at(S);N.push(P.nonTerminalName);let E=at(I);E.push(P.idx);let L={idx:v,def:P.definition.concat(s,rt(g)),ruleStack:N,occurrenceStack:E};d.push(L)}else if(P instanceof nt){let N={idx:v,def:rt(g),ruleStack:S,occurrenceStack:I};d.push(N),d.push("EXIT_ALTERNATIVE");let E={idx:v,def:P.definition.concat(rt(g)),ruleStack:S,occurrenceStack:I};d.push(E)}else if(P instanceof Pt){let N=new Le({definition:P.definition,idx:P.idx}),E=P.definition.concat([N],rt(g)),L={idx:v,def:E,ruleStack:S,occurrenceStack:I};d.push(L)}else if(P instanceof kt){let N=new _e({terminalType:P.separator}),E=new Le({definition:[N].concat(P.definition),idx:P.idx}),L=P.definition.concat([E],rt(g)),U={idx:v,def:L,ruleStack:S,occurrenceStack:I};d.push(U)}else if(P instanceof Et){let N={idx:v,def:rt(g),ruleStack:S,occurrenceStack:I};d.push(N),d.push("EXIT_ALTERNATIVE");let E=new _e({terminalType:P.separator}),L=new Le({definition:[E].concat(P.definition),idx:P.idx}),U=P.definition.concat([L],rt(g)),ee={idx:v,def:U,ruleStack:S,occurrenceStack:I};d.push(ee)}else if(P instanceof Le){let N={idx:v,def:rt(g),ruleStack:S,occurrenceStack:I};d.push(N),d.push("EXIT_ALTERNATIVE");let E=new Le({definition:P.definition,idx:P.idx}),L=P.definition.concat([E],rt(g)),U={idx:v,def:L,ruleStack:S,occurrenceStack:I};d.push(U)}else if(P instanceof Ct)for(let N=P.definition.length-1;N>=0;N--){let E=P.definition[N],L={idx:v,def:E.definition.concat(rt(g)),ruleStack:S,occurrenceStack:I};d.push(L),d.push("EXIT_ALTERNATIVE")}else if(P instanceof At)d.push({idx:v,def:P.definition.concat(rt(g)),ruleStack:S,occurrenceStack:I});else if(P instanceof Mi)d.push(vC(P,v,S,I));else throw Error("non exhaustive match")}return f}i(vh,"nextPossibleTokensAfter");function vC(e,t,r,n){let a=at(r);a.push(e.name);let s=at(n);return s.push(1),{idx:t,def:e.definition,ruleStack:a,occurrenceStack:s}}i(vC,"expandTopLevelRule");var Ie;(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(Ie||(Ie={}));function Sc(e){if(e instanceof nt||e==="Option")return Ie.OPTION;else if(e instanceof Le||e==="Repetition")return Ie.REPETITION;else if(e instanceof Pt||e==="RepetitionMandatory")return Ie.REPETITION_MANDATORY;else if(e instanceof kt||e==="RepetitionMandatoryWithSeparator")return Ie.REPETITION_MANDATORY_WITH_SEPARATOR;else if(e instanceof Et||e==="RepetitionWithSeparator")return Ie.REPETITION_WITH_SEPARATOR;else if(e instanceof Ct||e==="Alternation")return Ie.ALTERNATION;else throw Error("non exhaustive match")}i(Sc,"getProdType");function Zd(e){let{occurrence:t,rule:r,prodType:n,maxLookahead:a}=e,s=Sc(n);if(s===Ie.ALTERNATION)return Do(t,r,a);else return xo(t,r,s,a)}i(Zd,"getLookaheadPaths");function TC(e,t,r,n,a,s){let o=Do(e,t,r),l=$h(o)?oo:Gi;return s(o,n,l,a)}i(TC,"buildLookaheadFuncForOr");function $C(e,t,r,n,a,s){let o=xo(e,t,a,r),l=$h(o)?oo:Gi;return s(o[0],l,n)}i($C,"buildLookaheadFuncForOptionalProd");function RC(e,t,r,n){let a=e.length,s=tr(e,(o)=>tr(o,(l)=>l.length===1));if(t)return function(o){let l=j(o,(u)=>u.GATE);for(let u=0;u<a;u++){let c=e[u],f=c.length,d=l[u];if(d!==void 0&&d.call(this)===!1)continue;e:for(let m=0;m<f;m++){let g=c[m],v=g.length;for(let S=0;S<v;S++){let I=this.LA(S+1);if(r(I,g[S])===!1)continue e}return u}}return};else if(s&&!n){let o=j(e,(u)=>Xt(u)),l=Nt(o,(u,c,f)=>(H(c,(d)=>{if(!V(u,d.tokenTypeIdx))u[d.tokenTypeIdx]=f;H(d.categoryMatches,(m)=>{if(!V(u,m))u[m]=f})}),u),{});return function(){let u=this.LA(1);return l[u.tokenTypeIdx]}}else return function(){for(let o=0;o<a;o++){let l=e[o],u=l.length;e:for(let c=0;c<u;c++){let f=l[c],d=f.length;for(let m=0;m<d;m++){let g=this.LA(m+1);if(r(g,f[m])===!1)continue e}return o}}return}}i(RC,"buildAlternativesLookAheadFunc");function AC(e,t,r){let n=tr(e,(s)=>s.length===1),a=e.length;if(n&&!r){let s=Xt(e);if(s.length===1&&Ae(s[0].categoryMatches)){let l=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===l}}else{let o=Nt(s,(l,u,c)=>(l[u.tokenTypeIdx]=!0,H(u.categoryMatches,(f)=>{l[f]=!0}),l),[]);return function(){let l=this.LA(1);return o[l.tokenTypeIdx]===!0}}}else return function(){e:for(let s=0;s<a;s++){let o=e[s],l=o.length;for(let u=0;u<l;u++){let c=this.LA(u+1);if(t(c,o[u])===!1)continue e}return!0}return!1}}i(AC,"buildSingleAlternativeLookaheadFunction");var ED=class extends Cc{static{i(this,"RestDefinitionFinderWalker")}constructor(e,t,r){super();this.topProd=e,this.targetOccurrence=t,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,r,n){if(e.idx===this.targetOccurrence&&this.targetProdType===t)return this.restDef=r.concat(n),!0;return!1}walkOption(e,t,r){if(!this.checkIsTarget(e,Ie.OPTION,t,r))super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){if(!this.checkIsTarget(e,Ie.REPETITION_MANDATORY,t,r))super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){if(!this.checkIsTarget(e,Ie.REPETITION_MANDATORY_WITH_SEPARATOR,t,r))super.walkOption(e,t,r)}walkMany(e,t,r){if(!this.checkIsTarget(e,Ie.REPETITION,t,r))super.walkOption(e,t,r)}walkManySep(e,t,r){if(!this.checkIsTarget(e,Ie.REPETITION_WITH_SEPARATOR,t,r))super.walkOption(e,t,r)}},EC=class extends Di{static{i(this,"InsideDefinitionFinderVisitor")}constructor(e,t,r){super();this.targetOccurrence=e,this.targetProdType=t,this.targetRef=r,this.result=[]}checkIsTarget(e,t){if(e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef))this.result=e.definition}visitOption(e){this.checkIsTarget(e,Ie.OPTION)}visitRepetition(e){this.checkIsTarget(e,Ie.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Ie.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Ie.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Ie.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Ie.ALTERNATION)}};function Qd(e){let t=Array(e);for(let r=0;r<e;r++)t[r]=[];return t}i(Qd,"initializeArrayOfArrays");function yl(e){let t=[""];for(let r=0;r<e.length;r++){let n=e[r],a=[];for(let s=0;s<t.length;s++){let o=t[s];a.push(o+"_"+n.tokenTypeIdx);for(let l=0;l<n.categoryMatches.length;l++){let u="_"+n.categoryMatches[l];a.push(o+u)}}t=a}return t}i(yl,"pathToHashKeys");function CC(e,t,r){for(let n=0;n<e.length;n++){if(n===r)continue;let a=e[n];for(let s=0;s<t.length;s++){let o=t[s];if(a[o]===!0)return!1}}return!0}i(CC,"isUniquePrefixHash");function Th(e,t){let r=j(e,(o)=>Jl([o],1)),n=Qd(r.length),a=j(r,(o)=>{let l={};return H(o,(u)=>{let c=yl(u.partialPath);H(c,(f)=>{l[f]=!0})}),l}),s=r;for(let o=1;o<=t;o++){let l=s;s=Qd(l.length);for(let u=0;u<l.length;u++){let c=l[u];for(let f=0;f<c.length;f++){let d=c[f].partialPath,m=c[f].suffixDef,g=yl(d);if(CC(a,g,u)||Ae(m)||d.length===t){let S=n[u];if(Zl(S,d)===!1){S.push(d);for(let I=0;I<g.length;I++){let P=g[I];a[u][P]=!0}}}else{let S=Jl(m,o+1,d);s[u]=s[u].concat(S),H(S,(I)=>{let P=yl(I.partialPath);H(P,(N)=>{a[u][N]=!0})})}}}}return n}i(Th,"lookAheadSequenceFromAlternatives");function Do(e,t,r,n){let a=new EC(e,Ie.ALTERNATION,n);return t.accept(a),Th(a.result,r)}i(Do,"getLookaheadPathsForOr");function xo(e,t,r,n){let a=new EC(e,r);t.accept(a);let s=a.result,l=new ED(t,e,r).startWalking(),u=new At({definition:s}),c=new At({definition:l});return Th([u,c],n)}i(xo,"getLookaheadPathsForOptionalProd");function Zl(e,t){e:for(let r=0;r<e.length;r++){let n=e[r];if(n.length!==t.length)continue;for(let a=0;a<n.length;a++){let s=t[a],o=n[a];if((s===o||o.categoryMatchesMap[s.tokenTypeIdx]!==void 0)===!1)continue e}return!0}return!1}i(Zl,"containsPath");function bC(e,t){return e.length<t.length&&tr(e,(r,n)=>{let a=t[n];return r===a||a.categoryMatchesMap[r.tokenTypeIdx]})}i(bC,"isStrictPrefixOfPath");function $h(e){return tr(e,(t)=>tr(t,(r)=>tr(r,(n)=>Ae(n.categoryMatches))))}i($h,"areTokenCategoriesNotUsed");function _C(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return j(t,(r)=>Object.assign({type:yt.CUSTOM_LOOKAHEAD_VALIDATION},r))}i(_C,"validateLookahead");function SC(e,t,r,n){let a=Dt(e,(u)=>wC(u,r)),s=GC(e,t,r),o=Dt(e,(u)=>LC(u,r)),l=Dt(e,(u)=>NC(u,e,n,r));return a.concat(s,o,l)}i(SC,"validateGrammar");function wC(e,t){let r=new CD;e.accept(r);let n=r.allProductions,a=GM(n,IC),s=ar(a,(l)=>l.length>1);return j(Ye(s),(l)=>{let u=nr(l),c=t.buildDuplicateFoundError(e,l),f=Wt(u),d={message:c,type:yt.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:f,occurrence:u.idx},m=Rh(u);if(m)d.parameter=m;return d})}i(wC,"validateDuplicateProductions");function IC(e){return`${Wt(e)}_#_${e.idx}_#_${Rh(e)}`}i(IC,"identifyProductionForDuplicates");function Rh(e){if(e instanceof _e)return e.terminalType.name;else if(e instanceof ht)return e.nonTerminalName;else return""}i(Rh,"getExtraProductionArgument");var CD=class extends Di{static{i(this,"OccurrenceValidationCollector")}constructor(){super(...arguments);this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function NC(e,t,r,n){let a=[];if(Nt(t,(o,l)=>{if(l.name===e.name)return o+1;return o},0)>1){let o=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});a.push({message:o,type:yt.DUPLICATE_RULE_NAME,ruleName:e.name})}return a}i(NC,"validateRuleDoesNotAlreadyExist");function PC(e,t,r){let n=[],a;if(!vt(t,e))a=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:a,type:yt.INVALID_RULE_OVERRIDE,ruleName:e});return n}i(PC,"validateRuleIsOverridden");function Ah(e,t,r,n=[]){let a=[],s=js(t.definition);if(Ae(s))return[];else{let o=e.name;if(vt(s,e))a.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:yt.LEFT_RECURSION,ruleName:o});let u=Ac(s,n.concat([e])),c=Dt(u,(f)=>{let d=at(n);return d.push(f),Ah(e,f,r,d)});return a.concat(c)}}i(Ah,"validateNoLeftRecursion");function js(e){let t=[];if(Ae(e))return t;let r=nr(e);if(r instanceof ht)t.push(r.referencedRule);else if(r instanceof At||r instanceof nt||r instanceof Pt||r instanceof kt||r instanceof Et||r instanceof Le)t=t.concat(js(r.definition));else if(r instanceof Ct)t=Xt(j(r.definition,(s)=>js(s.definition)));else if(r instanceof _e);else throw Error("non exhaustive match");let n=so(r),a=e.length>1;if(n&&a){let s=rt(e);return t.concat(js(s))}else return t}i(js,"getFirstNoneTerminal");var Eh=class extends Di{static{i(this,"OrCollector")}constructor(){super(...arguments);this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function kC(e,t){let r=new Eh;e.accept(r);let n=r.alternations;return Dt(n,(s)=>{let o=io(s.definition);return Dt(o,(l,u)=>{let c=vh([l],[],Gi,1);if(Ae(c))return[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:s,emptyChoiceIdx:u}),type:yt.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:s.idx,alternative:u+1}];else return[]})})}i(kC,"validateEmptyOrAlternative");function OC(e,t,r){let n=new Eh;e.accept(n);let a=n.alternations;return a=Ec(a,(o)=>o.ignoreAmbiguities===!0),Dt(a,(o)=>{let l=o.idx,u=o.maxLookahead||t,c=Do(l,e,u,o),f=DC(c,o,e,r),d=xC(c,o,e,r);return f.concat(d)})}i(OC,"validateAmbiguousAlternationAlternatives");var bD=class extends Di{static{i(this,"RepetitionCollector")}constructor(){super(...arguments);this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function LC(e,t){let r=new Eh;e.accept(r);let n=r.alternations;return Dt(n,(s)=>{if(s.definition.length>255)return[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:s}),type:yt.TOO_MANY_ALTS,ruleName:e.name,occurrence:s.idx}];else return[]})}i(LC,"validateTooManyAlts");function MC(e,t,r){let n=[];return H(e,(a)=>{let s=new bD;a.accept(s);let o=s.allProductions;H(o,(l)=>{let u=Sc(l),c=l.maxLookahead||t,f=l.idx,m=xo(f,a,u,c)[0];if(Ae(Xt(m))){let g=r.buildEmptyRepetitionError({topLevelRule:a,repetition:l});n.push({message:g,type:yt.NO_NON_EMPTY_LOOKAHEAD,ruleName:a.name})}})}),n}i(MC,"validateSomeNonEmptyLookaheadPath");function DC(e,t,r,n){let a=[],s=Nt(e,(l,u,c)=>{if(t.definition[c].ignoreAmbiguities===!0)return l;return H(u,(f)=>{let d=[c];if(H(e,(m,g)=>{if(c!==g&&Zl(m,f)&&t.definition[g].ignoreAmbiguities!==!0)d.push(g)}),d.length>1&&!Zl(a,f))a.push(f),l.push({alts:d,path:f})}),l},[]);return j(s,(l)=>{let u=j(l.alts,(f)=>f+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:u,prefixPath:l.path}),type:yt.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:l.alts}})}i(DC,"checkAlternativesAmbiguities");function xC(e,t,r,n){let a=Nt(e,(o,l,u)=>{let c=j(l,(f)=>({idx:u,path:f}));return o.concat(c)},[]);return Oo(Dt(a,(o)=>{if(t.definition[o.idx].ignoreAmbiguities===!0)return[];let{idx:u,path:c}=o,f=zt(a,(m)=>t.definition[m.idx].ignoreAmbiguities!==!0&&m.idx<u&&bC(m.path,c));return j(f,(m)=>{let g=[m.idx+1,u+1],v=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:g,prefixPath:m.path}),type:yt.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:v,alternatives:g}})}))}i(xC,"checkPrefixAlternativesAmbiguities");function GC(e,t,r){let n=[],a=j(t,(s)=>s.name);return H(e,(s)=>{let o=s.name;if(vt(a,o)){let l=r.buildNamespaceConflictError(s);n.push({message:l,type:yt.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),n}i(GC,"checkTerminalAndNoneTerminalsNameSpace");function FC(e){let t=sh(e,{errMsgProvider:gD}),r={};return H(e.rules,(n)=>{r[n.name]=n}),gC(r,t.errMsgProvider)}i(FC,"resolveGrammar");function zC(e){return e=sh(e,{errMsgProvider:ea}),SC(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}i(zC,"validateGrammar");var jC="MismatchedTokenException",BC="NoViableAltException",UC="EarlyExitException",KC="NotAllInputParsedException",VC=[jC,BC,UC,KC];Object.freeze(VC);function lo(e){return vt(VC,e.name)}i(lo,"isRecognitionException");var wc=class extends Error{static{i(this,"RecognitionException")}constructor(e,t){super(e);if(this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)}},WC=class extends wc{static{i(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t);this.previousToken=r,this.name=jC}},_D=class extends wc{static{i(this,"NoViableAltException")}constructor(e,t,r){super(e,t);this.previousToken=r,this.name=BC}},SD=class extends wc{static{i(this,"NotAllInputParsedException")}constructor(e,t){super(e,t);this.name=KC}},wD=class extends wc{static{i(this,"EarlyExitException")}constructor(e,t,r){super(e,t);this.previousToken=r,this.name=UC}},Af={},qC="InRuleRecoveryException",ID=class extends Error{static{i(this,"InRuleRecoveryException")}constructor(e){super(e);this.name=qC}},ND=class{static{i(this,"Recoverable")}initRecoverable(e){if(this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=V(e,"recoveryEnabled")?e.recoveryEnabled:Vr.recoveryEnabled,this.recoveryEnabled)this.attemptInRepetitionRecovery=HC}getTokenToInsert(e){let t=Mo(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,n){let a=this.findReSyncTokenType(),s=this.exportLexerState(),o=[],l=!1,u=this.LA(1),c=this.LA(1),f=i(()=>{let d=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:d,ruleName:this.getCurrRuleFullName()}),g=new WC(m,u,this.LA(0));g.resyncedTokens=io(o),this.SAVE_ERROR(g)},"generateErrorMessage");while(!l)if(this.tokenMatcher(c,n)){f();return}else if(r.call(this)){f(),e.apply(this,t);return}else if(this.tokenMatcher(c,a))l=!0;else c=this.SKIP_TOKEN(),this.addToResyncTokens(c,o);this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,r){if(r===!1)return!1;if(this.tokenMatcher(this.LA(1),e))return!1;if(this.isBackTracking())return!1;if(this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))return!1;return!0}getFollowsForInRuleRecovery(e,t){let r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new ID("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if(Ae(t))return!1;let r=this.LA(1);return Ii(t,(a)=>this.tokenMatcher(r,a))!==void 0}canRecoverWithSingleTokenDeletion(e){if(!this.canTokenTypeBeDeletedInRecovery(e))return!1;return this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return vt(r,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;while(!0){let n=Ii(e,(a)=>gh(t,a));if(n!==void 0)return n;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Af;let e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return j(e,(r,n)=>{if(n===0)return Af;return{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[n],inRule:this.shortRuleNameToFullName(e[n-1])}})}flattenFollowSet(){let e=j(this.buildFullFollowKeyStack(),(t)=>this.getFollowSetFromFollowKey(t));return Xt(e)}getFollowSetFromFollowKey(e){if(e===Af)return[Rn];let t=e.ruleName+e.idxInCallingRule+OE+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){if(!this.tokenMatcher(e,Rn))t.push(e);return t}reSyncTo(e){let t=[],r=this.LA(1);while(this.tokenMatcher(r,e)===!1)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return io(t)}attemptInRepetitionRecovery(e,t,r,n,a,s,o){}getCurrentGrammarPath(e,t){let r=this.getHumanReadableRuleStack(),n=at(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:n,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return j(this.RULE_STACK,(e)=>this.shortRuleNameToFullName(e))}};function HC(e,t,r,n,a,s,o){let l=this.getKeyForAutomaticLookahead(n,a),u=this.firstAfterRepMap[l];if(u===void 0){let m=this.getCurrRuleFullName(),g=this.getGAstProductions()[m];u=new s(g,a).startWalking(),this.firstAfterRepMap[l]=u}let c=u.token,f=u.occurrence,d=u.isEndOfRule;if(this.RULE_STACK.length===1&&d&&c===void 0)c=Rn,f=1;if(c===void 0||f===void 0)return;if(this.shouldInRepetitionRecoveryBeTried(c,f,o))this.tryInRepetitionRecovery(e,t,r,c)}i(HC,"attemptInRepetitionRecovery");var PD=4,Sn=8,kD=8,YC=1<<Sn,XC=2<<Sn,ep=3<<Sn,tp=4<<Sn,rp=5<<Sn,gl=6<<Sn;function vl(e,t,r){return r|t|e}i(vl,"getKeyForAutomaticLookahead");var Sj=32-kD,Ch=class{static{i(this,"LLkLookaheadStrategy")}constructor(e){var t;this.maxLookahead=(t=e===null||e===void 0?void 0:e.maxLookahead)!==null&&t!==void 0?t:Vr.maxLookahead}validate(e){let t=this.validateNoLeftRecursion(e.rules);if(Ae(t)){let r=this.validateEmptyOrAlternatives(e.rules),n=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),a=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...r,...n,...a]}return t}validateNoLeftRecursion(e){return Dt(e,(t)=>Ah(t,t,ea))}validateEmptyOrAlternatives(e){return Dt(e,(t)=>kC(t,ea))}validateAmbiguousAlternationAlternatives(e,t){return Dt(e,(r)=>OC(r,t,ea))}validateSomeNonEmptyLookaheadPath(e,t){return MC(e,t,ea)}buildLookaheadForAlternation(e){return TC(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,RC)}buildLookaheadForOptional(e){return $C(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Sc(e.prodType),AC)}},OD=class{static{i(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=V(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Vr.dynamicTokensEnabled,this.maxLookahead=V(e,"maxLookahead")?e.maxLookahead:Vr.maxLookahead,this.lookaheadStrategy=V(e,"lookaheadStrategy")?e.lookaheadStrategy:new Ch({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){H(e,(t)=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{let{alternation:r,repetition:n,option:a,repetitionMandatory:s,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=JC(t);H(r,(u)=>{let c=u.idx===0?"":u.idx;this.TRACE_INIT(`${Wt(u)}${c}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:t,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),d=vl(this.fullRuleNameToShort[t.name],YC,u.idx);this.setLaFuncCache(d,f)})}),H(n,(u)=>{this.computeLookaheadFunc(t,u.idx,ep,"Repetition",u.maxLookahead,Wt(u))}),H(a,(u)=>{this.computeLookaheadFunc(t,u.idx,XC,"Option",u.maxLookahead,Wt(u))}),H(s,(u)=>{this.computeLookaheadFunc(t,u.idx,tp,"RepetitionMandatory",u.maxLookahead,Wt(u))}),H(o,(u)=>{this.computeLookaheadFunc(t,u.idx,gl,"RepetitionMandatoryWithSeparator",u.maxLookahead,Wt(u))}),H(l,(u)=>{this.computeLookaheadFunc(t,u.idx,rp,"RepetitionWithSeparator",u.maxLookahead,Wt(u))})})})}computeLookaheadFunc(e,t,r,n,a,s){this.TRACE_INIT(`${s}${t===0?"":t}`,()=>{let o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n}),l=vl(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(l,o)})}getKeyForAutomaticLookahead(e,t){let r=this.getLastExplicitRuleShortName();return vl(r,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},LD=class extends Di{static{i(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments);this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},Uo=new LD;function JC(e){Uo.reset(),e.accept(Uo);let t=Uo.dslMethods;return Uo.reset(),t}i(JC,"collectMethods");function np(e,t){if(isNaN(e.startOffset)===!0)e.startOffset=t.startOffset,e.endOffset=t.endOffset;else if(e.endOffset<t.endOffset===!0)e.endOffset=t.endOffset}i(np,"setNodeLocationOnlyOffset");function ap(e,t){if(isNaN(e.startOffset)===!0)e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine;else if(e.endOffset<t.endOffset===!0)e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine}i(ap,"setNodeLocationFull");function ZC(e,t,r){if(e.children[r]===void 0)e.children[r]=[t];else e.children[r].push(t)}i(ZC,"addTerminalToCst");function QC(e,t,r){if(e.children[t]===void 0)e.children[t]=[r];else e.children[t].push(r)}i(QC,"addNoneTerminalToCst");var MD="name";function bh(e,t){Object.defineProperty(e,MD,{enumerable:!1,configurable:!0,writable:!1,value:t})}i(bh,"defineNameProp");function eb(e,t){let r=wt(e),n=r.length;for(let a=0;a<n;a++){let s=r[a],o=e[s],l=o.length;for(let u=0;u<l;u++){let c=o[u];if(c.tokenTypeIdx===void 0)this[c.name](c.children,t)}}}i(eb,"defaultVisit");function tb(e,t){let r=i(function(){},"derivedConstructor");bh(r,e+"BaseSemantics");let n={visit:i(function(a,s){if(oe(a))a=a[0];if(Ur(a))return;return this[a.name](a.children,s)},"visit"),validateVisitor:i(function(){let a=nb(this,t);if(!Ae(a)){let s=j(a,(o)=>o.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
|
|
124
|
+
${s.join(`
|
|
125
|
+
|
|
126
|
+
`).replace(/\n/g,`
|
|
127
|
+
`)}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}i(tb,"createBaseSemanticVisitorConstructor");function rb(e,t,r){let n=i(function(){},"derivedConstructor");bh(n,e+"BaseSemanticsWithDefaults");let a=Object.create(r.prototype);return H(t,(s)=>{a[s]=eb}),n.prototype=a,n.prototype.constructor=n,n}i(rb,"createBaseVisitorConstructorWithDefaults");var ip;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(ip||(ip={}));function nb(e,t){return ab(e,t)}i(nb,"validateVisitor");function ab(e,t){let r=zt(t,(a)=>Yr(e[a])===!1),n=j(r,(a)=>({msg:`Missing visitor method: <${a}> on ${e.constructor.name} CST Visitor.`,type:ip.MISSING_METHOD,methodName:a}));return Oo(n)}i(ab,"validateMissingCstMethods");var DD=class{static{i(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=V(e,"nodeLocationTracking")?e.nodeLocationTracking:Vr.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Je,this.cstFinallyStateUpdate=Je,this.cstPostTerminal=Je,this.cstPostNonTerminal=Je,this.cstPostRule=Je;else if(/full/i.test(this.nodeLocationTracking))if(this.recoveryEnabled)this.setNodeLocationFromToken=ap,this.setNodeLocationFromNode=ap,this.cstPostRule=Je,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery;else this.setNodeLocationFromToken=Je,this.setNodeLocationFromNode=Je,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular;else if(/onlyOffset/i.test(this.nodeLocationTracking))if(this.recoveryEnabled)this.setNodeLocationFromToken=np,this.setNodeLocationFromNode=np,this.cstPostRule=Je,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery;else this.setNodeLocationFromToken=Je,this.setNodeLocationFromNode=Je,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular;else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Je,this.setNodeLocationFromNode=Je,this.cstPostRule=Je,this.setInitialNodeLocation=Je;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),r=e.location;if(r.startOffset<=t.startOffset===!0)r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn;else r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN}cstPostRuleOnlyOffset(e){let t=this.LA(0),r=e.location;if(r.startOffset<=t.startOffset===!0)r.endOffset=t.endOffset;else r.startOffset=NaN}cstPostTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];ZC(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];QC(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(Ur(this.baseCstVisitorConstructor)){let e=tb(this.className,wt(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Ur(this.baseCstVisitorWithDefaultsConstructor)){let e=rb(this.className,wt(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},xD=class{static{i(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){if(this.currIdx<=this.tokVector.length-2)return this.consumeToken(),this.LA(1);else return Ql}LA(e){let t=this.currIdx+e;if(t<0||this.tokVectorLength<=t)return Ql;else return this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}};var GD=class{static{i(this,"RecognizerApi")}ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,r=eu){if(vt(this.definedRulesNames,e)){let s={message:ea.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:yt.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);let n=this.defineRule(e,t,r);return this[e]=n,n}OVERRIDE_RULE(e,t,r=eu){let n=PC(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);let a=this.defineRule(e,t,r);return this[e]=a,a}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);let r=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if(lo(n))return!1;else throw n}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return SE(Ye(this.gastProductionsCache))}},FD=class{static{i(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=oo,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},V(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
|
|
128
|
+
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
|
|
129
|
+
For Further details.`);if(oe(e)){if(Ae(e))throw Error(`A Token Vocabulary cannot be empty.
|
|
130
|
+
Note that the first argument for the parser constructor
|
|
131
|
+
is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset==="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
|
|
132
|
+
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
|
|
133
|
+
For Further details.`)}if(oe(e))this.tokensMap=Nt(e,(a,s)=>(a[s.name]=s,a),{});else if(V(e,"modes")&&tr(Xt(Ye(e.modes)),hC)){let a=Xt(Ye(e.modes)),s=oh(a);this.tokensMap=Nt(s,(o,l)=>(o[l.name]=l,o),{})}else if(Gt(e))this.tokensMap=at(e);else throw Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Rn;let r=V(e,"modes")?Xt(Ye(e.modes)):Ye(e),n=tr(r,(a)=>Ae(a.categoryMatches));this.tokenMatcher=n?oo:Gi,Fi(Ye(this.tokensMap))}defineRule(e,t,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'
|
|
134
|
+
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let n=V(r,"resyncEnabled")?r.resyncEnabled:eu.resyncEnabled,a=V(r,"recoveryValueFunc")?r.recoveryValueFunc:eu.recoveryValueFunc,s=this.ruleShortNameIdx<<PD+Sn;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let o;if(this.outputCst===!0)o=i(function(...c){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,c);let f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry");else o=i(function(...c){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,c)}catch(f){return this.invokeRuleCatch(f,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst");return Object.assign(o,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,r){let n=this.RULE_STACK.length===1,a=t&&!this.isBackTracking()&&this.recoveryEnabled;if(lo(e)){let s=e;if(a){let o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o))if(s.resyncedTokens=this.reSyncTo(o),this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];return l.recoveredNode=!0,l}else return r(e);else{if(this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];l.recoveredNode=!0,s.partialCstResult=l}throw s}}else if(n)return this.moveToTerminatedState(),r(e);else throw s}else throw e}optionInternal(e,t){let r=this.getKeyForAutomaticLookahead(XC,t);return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),a;if(typeof e!=="function"){a=e.DEF;let s=e.GATE;if(s!==void 0){let o=n;n=i(()=>s.call(this)&&o.call(this),"lookAheadFunc")}}else a=e;if(n.call(this)===!0)return a.call(this);return}atLeastOneInternal(e,t){let r=this.getKeyForAutomaticLookahead(tp,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),a;if(typeof t!=="function"){a=t.DEF;let s=t.GATE;if(s!==void 0){let o=n;n=i(()=>s.call(this)&&o.call(this),"lookAheadFunc")}}else a=t;if(n.call(this)===!0){let s=this.doSingleRepetition(a);while(n.call(this)===!0&&s===!0)s=this.doSingleRepetition(a)}else throw this.raiseEarlyExitException(e,Ie.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],n,tp,e,AD)}atLeastOneSepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(gl,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let{DEF:n,SEP:a}=t;if(this.getLaFuncFromCache(r).call(this)===!0){n.call(this);let o=i(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");while(this.tokenMatcher(this.LA(1),a)===!0)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,o,n,Gg],o,gl,e,Gg)}else throw this.raiseEarlyExitException(e,Ie.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let r=this.getKeyForAutomaticLookahead(ep,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),a;if(typeof t!=="function"){a=t.DEF;let o=t.GATE;if(o!==void 0){let l=n;n=i(()=>o.call(this)&&l.call(this),"lookaheadFunction")}}else a=t;let s=!0;while(n.call(this)===!0&&s===!0)s=this.doSingleRepetition(a);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],n,ep,e,RD,s)}manySepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(rp,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let{DEF:n,SEP:a}=t;if(this.getLaFuncFromCache(r).call(this)===!0){n.call(this);let o=i(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");while(this.tokenMatcher(this.LA(1),a)===!0)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,o,n,xg],o,rp,e,xg)}}repetitionSepSecondInternal(e,t,r,n,a){while(r())this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,a],r,gl,e,a)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let r=this.getKeyForAutomaticLookahead(YC,t),n=oe(e)?e:e.DEF,s=this.getLaFuncFromCache(r).call(this,n);if(s!==void 0)return n[s].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new SD(t,e))}}subruleInternal(e,t,r){let n;try{let a=r!==void 0?r.ARGS:void 0;return this.subruleIdx=t,n=e.apply(this,a),this.cstPostNonTerminal(n,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),n}catch(a){throw this.subruleInternalError(a,r,e.ruleName)}}subruleInternalError(e,t,r){if(lo(e)&&e.partialCstResult!==void 0)this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:r),delete e.partialCstResult;throw e}consumeInternal(e,t,r){let n;try{let a=this.LA(1);if(this.tokenMatcher(a,e)===!0)this.consumeToken(),n=a;else this.consumeInternalError(e,a,r)}catch(a){n=this.consumeInternalRecovery(e,t,a)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,n),n}consumeInternalError(e,t,r){let n,a=this.LA(0);if(r!==void 0&&r.ERR_MSG)n=r.ERR_MSG;else n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:a,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new WC(n,t,a))}consumeInternalRecovery(e,t,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){let n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(a){if(a.name===qC)throw r;else throw a}}else throw r}saveRecogState(){let e=this.errors,t=at(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Rn)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},zD=class{static{i(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=V(e,"errorMessageProvider")?e.errorMessageProvider:Vr.errorMessageProvider}SAVE_ERROR(e){if(lo(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:at(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;else throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return at(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){let n=this.getCurrRuleFullName(),a=this.getGAstProductions()[n],o=xo(e,a,t,this.maxLookahead)[0],l=[];for(let c=1;c<=this.maxLookahead;c++)l.push(this.LA(c));let u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:l,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new wD(u,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let r=this.getCurrRuleFullName(),n=this.getGAstProductions()[r],a=Do(e,n,this.maxLookahead),s=[];for(let u=1;u<=this.maxLookahead;u++)s.push(this.LA(u));let o=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:s,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new _D(l,this.LA(1),o))}},jD=class{static{i(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){let r=this.gastProductionsCache[e];if(Ur(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return vh([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let t=nr(e.ruleStack),n=this.getGAstProductions()[t];return new $D(n,e).startWalking()}},Ic={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Ic);var Fg=!0,zg=Math.pow(2,Sn)-1,ib=yi({name:"RECORDING_PHASE_TOKEN",pattern:pt.NA});Fi([ib]);var sb=Mo(ib,`This IToken indicates the Parser is in Recording Phase
|
|
135
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(sb);var BD={name:`This CSTNode indicates the Parser is in Recording Phase
|
|
136
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},UD=class{static{i(this,"GastRecorder")}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let t=e>0?e:"";this[`CONSUME${t}`]=function(r,n){return this.consumeInternalRecord(r,e,n)},this[`SUBRULE${t}`]=function(r,n){return this.subruleInternalRecord(r,e,n)},this[`OPTION${t}`]=function(r){return this.optionInternalRecord(r,e)},this[`OR${t}`]=function(r){return this.orInternalRecord(r,e)},this[`MANY${t}`]=function(r){this.manyInternalRecord(e,r)},this[`MANY_SEP${t}`]=function(r){this.manySepFirstInternalRecord(e,r)},this[`AT_LEAST_ONE${t}`]=function(r){this.atLeastOneInternalRecord(e,r)},this[`AT_LEAST_ONE_SEP${t}`]=function(r){this.atLeastOneSepFirstInternalRecord(e,r)}}this.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},this.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let e=this;for(let t=0;t<10;t++){let r=t>0?t:"";delete e[`CONSUME${r}`],delete e[`SUBRULE${r}`],delete e[`OPTION${r}`],delete e[`OR${r}`],delete e[`MANY${r}`],delete e[`MANY_SEP${r}`],delete e[`AT_LEAST_ONE${r}`],delete e[`AT_LEAST_ONE_SEP${r}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Ql}topLevelRuleRecord(e,t){try{let r=new Mi({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(r){if(r.KNOWN_RECORDER_ERROR!==!0)try{r.message=r.message+`
|
|
137
|
+
This error was thrown during the "grammar recording phase" For more info see:
|
|
138
|
+
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch(n){throw r}throw r}}optionInternalRecord(e,t){return Ha.call(this,nt,e,t)}atLeastOneInternalRecord(e,t){Ha.call(this,Pt,t,e)}atLeastOneSepFirstInternalRecord(e,t){Ha.call(this,kt,t,e,Fg)}manyInternalRecord(e,t){Ha.call(this,Le,t,e)}manySepFirstInternalRecord(e,t){Ha.call(this,Et,t,e,Fg)}orInternalRecord(e,t){return ob.call(this,e,t)}subruleInternalRecord(e,t,r){if(uo(t),!e||V(e,"ruleName")===!1){let o=Error(`<SUBRULE${sp(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
|
|
139
|
+
inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}let n=la(this.recordingProdStack),a=e.ruleName,s=new ht({idx:t,nonTerminalName:a,label:r===null||r===void 0?void 0:r.LABEL,referencedRule:void 0});return n.definition.push(s),this.outputCst?BD:Ic}consumeInternalRecord(e,t,r){if(uo(t),!hh(e)){let s=Error(`<CONSUME${sp(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
|
|
140
|
+
inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let n=la(this.recordingProdStack),a=new _e({idx:t,terminalType:e,label:r===null||r===void 0?void 0:r.LABEL});return n.definition.push(a),sb}};function Ha(e,t,r,n=!1){uo(r);let a=la(this.recordingProdStack),s=Yr(t)?t:t.DEF,o=new e({definition:[],idx:r});if(n)o.separator=t.SEP;if(V(t,"MAX_LOOKAHEAD"))o.maxLookahead=t.MAX_LOOKAHEAD;return this.recordingProdStack.push(o),s.call(this),a.definition.push(o),this.recordingProdStack.pop(),Ic}i(Ha,"recordProd");function ob(e,t){uo(t);let r=la(this.recordingProdStack),n=oe(e)===!1,a=n===!1?e:e.DEF,s=new Ct({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});if(V(e,"MAX_LOOKAHEAD"))s.maxLookahead=e.MAX_LOOKAHEAD;let o=AE(a,(l)=>Yr(l.GATE));return s.hasPredicates=o,r.definition.push(s),H(a,(l)=>{let u=new At({definition:[]});if(s.definition.push(u),V(l,"IGNORE_AMBIGUITIES"))u.ignoreAmbiguities=l.IGNORE_AMBIGUITIES;else if(V(l,"GATE"))u.ignoreAmbiguities=!0;this.recordingProdStack.push(u),l.ALT.call(this),this.recordingProdStack.pop()}),Ic}i(ob,"recordOrProd");function sp(e){return e===0?"":`${e}`}i(sp,"getIdxSuffix");function uo(e){if(e<0||e>zg){let t=Error(`Invalid DSL Method idx value: <${e}>
|
|
141
|
+
Idx value must be a none negative value smaller than ${zg+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}i(uo,"assertMethodIdxIsValid");var KD=class{static{i(this,"PerformanceTracer")}initPerformanceTracer(e){if(V(e,"traceInitPerf")){let t=e.traceInitPerf,r=typeof t==="number";this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Vr.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let r=Array(this.traceInitIndent+1).join("\t");if(this.traceInitIndent<this.traceInitMaxIdent)console.log(`${r}--> <${e}>`);let{time:n,value:a}=uh(t),s=n>10?console.warn:console.log;if(this.traceInitIndent<this.traceInitMaxIdent)s(`${r}<-- <${e}> time: ${n}ms`);return this.traceInitIndent--,a}else return t()}};function lb(e,t){t.forEach((r)=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach((a)=>{if(a==="constructor")return;let s=Object.getOwnPropertyDescriptor(n,a);if(s&&(s.get||s.set))Object.defineProperty(e.prototype,a,s);else e.prototype[a]=r.prototype[a]})})}i(lb,"applyMixins");var Ql=Mo(Rn,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Ql);var Vr=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:pi,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),eu=Object.freeze({recoveryValueFunc:i(()=>{return},"recoveryValueFunc"),resyncEnabled:!0}),yt;(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(yt||(yt={}));function op(e=void 0){return function(){return e}}i(op,"EMPTY_ALT");var _h=class e{static{i(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{ch(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),H(this.definedRulesNames,(a)=>{let o=this[a].originalGrammarAction,l;this.TRACE_INIT(`${a} Rule`,()=>{l=this.topLevelRuleRecord(a,o)}),this.gastProductionsCache[a]=l})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=FC({rules:Ye(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(Ae(n)&&this.skipValidations===!1){let a=zC({rules:Ye(this.gastProductionsCache),tokenTypes:Ye(this.tokensMap),errMsgProvider:ea,grammarName:r}),s=_C({lookaheadStrategy:this.lookaheadStrategy,rules:Ye(this.gastProductionsCache),tokenTypes:Ye(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(a,s)}}),Ae(this.definitionErrors)){if(this.recoveryEnabled)this.TRACE_INIT("computeAllProdsFollows",()=>{let a=LE(Ye(this.gastProductionsCache));this.resyncFollows=a});this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var a,s;(s=(a=this.lookaheadStrategy).initialize)===null||s===void 0||s.call(a,{rules:Ye(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Ye(this.gastProductionsCache))})}if(!e.DEFER_DEFINITION_ERRORS_HANDLING&&!Ae(this.definitionErrors))throw t=j(this.definitionErrors,(a)=>a.message),Error(`Parser Definition Errors detected:
|
|
142
|
+
${t.join(`
|
|
143
|
+
-------------------------------
|
|
144
|
+
`)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(t,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),V(r,"ignoredIssues"))throw Error(`The <ignoredIssues> IParserConfig property has been deprecated.
|
|
145
|
+
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
|
|
146
|
+
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
|
|
147
|
+
For further details.`);this.skipValidations=V(r,"skipValidations")?r.skipValidations:Vr.skipValidations}};_h.DEFER_DEFINITION_ERRORS_HANDLING=!1;lb(_h,[ND,OD,DD,xD,FD,GD,zD,jD,UD,KD]);var VD=class extends _h{static{i(this,"EmbeddedActionsParser")}constructor(e,t=Vr){let r=at(t);r.outputCst=!1;super(e,r)}};function ub(e,t){var r=-1,n=e==null?0:e.length,a=Array(n);while(++r<n)a[r]=t(e[r],r,e);return a}i(ub,"arrayMap");var cb=ub;function fb(){this.__data__=[],this.size=0}i(fb,"listCacheClear");var WD=fb;function db(e,t){return e===t||e!==e&&t!==t}i(db,"eq");var pb=db;function mb(e,t){var r=e.length;while(r--)if(pb(e[r][0],t))return r;return-1}i(mb,"assocIndexOf");var Nc=mb,qD=Array.prototype,HD=qD.splice;function hb(e){var t=this.__data__,r=Nc(t,e);if(r<0)return!1;var n=t.length-1;if(r==n)t.pop();else HD.call(t,r,1);return--this.size,!0}i(hb,"listCacheDelete");var YD=hb;function yb(e){var t=this.__data__,r=Nc(t,e);return r<0?void 0:t[r][1]}i(yb,"listCacheGet");var XD=yb;function gb(e){return Nc(this.__data__,e)>-1}i(gb,"listCacheHas");var JD=gb;function vb(e,t){var r=this.__data__,n=Nc(r,e);if(n<0)++this.size,r.push([e,t]);else r[n][1]=t;return this}i(vb,"listCacheSet");var ZD=vb;function ba(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}i(ba,"ListCache");ba.prototype.clear=WD;ba.prototype.delete=YD;ba.prototype.get=XD;ba.prototype.has=JD;ba.prototype.set=ZD;var Pc=ba;function Tb(){this.__data__=new Pc,this.size=0}i(Tb,"stackClear");var QD=Tb;function $b(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}i($b,"stackDelete");var ex=$b;function Rb(e){return this.__data__.get(e)}i(Rb,"stackGet");var tx=Rb;function Ab(e){return this.__data__.has(e)}i(Ab,"stackHas");var rx=Ab,nx=typeof global=="object"&&global&&global.Object===Object&&global,Eb=nx,ax=typeof self=="object"&&self&&self.Object===Object&&self,ix=Eb||ax||Function("return this")(),Xr=ix,sx=Xr.Symbol,vr=sx,Cb=Object.prototype,{hasOwnProperty:ox,toString:lx}=Cb,cs=vr?vr.toStringTag:void 0;function bb(e){var t=ox.call(e,cs),r=e[cs];try{e[cs]=void 0;var n=!0}catch(s){}var a=lx.call(e);if(n)if(t)e[cs]=r;else delete e[cs];return a}i(bb,"getRawTag");var ux=bb,cx=Object.prototype,fx=cx.toString;function _b(e){return fx.call(e)}i(_b,"objectToString");var dx=_b,px="[object Null]",mx="[object Undefined]",jg=vr?vr.toStringTag:void 0;function Sb(e){if(e==null)return e===void 0?mx:px;return jg&&jg in Object(e)?ux(e):dx(e)}i(Sb,"baseGetTag");var zi=Sb;function wb(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}i(wb,"isObject");var Sh=wb,hx="[object AsyncFunction]",yx="[object Function]",gx="[object GeneratorFunction]",vx="[object Proxy]";function Ib(e){if(!Sh(e))return!1;var t=zi(e);return t==yx||t==gx||t==hx||t==vx}i(Ib,"isFunction");var Nb=Ib,Tx=Xr["__core-js_shared__"],Ef=Tx,Bg=function(){var e=/[^.]+$/.exec(Ef&&Ef.keys&&Ef.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Pb(e){return!!Bg&&Bg in e}i(Pb,"isMasked");var $x=Pb,Rx=Function.prototype,Ax=Rx.toString;function kb(e){if(e!=null){try{return Ax.call(e)}catch(t){}try{return e+""}catch(t){}}return""}i(kb,"toSource");var _a=kb,Ex=/[\\^$.*+?()[\]{}|]/g,Cx=/^\[object .+?Constructor\]$/,bx=Function.prototype,_x=Object.prototype,Sx=bx.toString,wx=_x.hasOwnProperty,Ix=RegExp("^"+Sx.call(wx).replace(Ex,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ob(e){if(!Sh(e)||$x(e))return!1;var t=Nb(e)?Ix:Cx;return t.test(_a(e))}i(Ob,"baseIsNative");var Nx=Ob;function Lb(e,t){return e==null?void 0:e[t]}i(Lb,"getValue");var Px=Lb;function Mb(e,t){var r=Px(e,t);return Nx(r)?r:void 0}i(Mb,"getNative");var ji=Mb,kx=ji(Xr,"Map"),co=kx,Ox=ji(Object,"create"),fo=Ox;function Db(){this.__data__=fo?fo(null):{},this.size=0}i(Db,"hashClear");var Lx=Db;function xb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}i(xb,"hashDelete");var Mx=xb,Dx="__lodash_hash_undefined__",xx=Object.prototype,Gx=xx.hasOwnProperty;function Gb(e){var t=this.__data__;if(fo){var r=t[e];return r===Dx?void 0:r}return Gx.call(t,e)?t[e]:void 0}i(Gb,"hashGet");var Fx=Gb,zx=Object.prototype,jx=zx.hasOwnProperty;function Fb(e){var t=this.__data__;return fo?t[e]!==void 0:jx.call(t,e)}i(Fb,"hashHas");var Bx=Fb,Ux="__lodash_hash_undefined__";function zb(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=fo&&t===void 0?Ux:t,this}i(zb,"hashSet");var Kx=zb;function Sa(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}i(Sa,"Hash");Sa.prototype.clear=Lx;Sa.prototype.delete=Mx;Sa.prototype.get=Fx;Sa.prototype.has=Bx;Sa.prototype.set=Kx;var Ug=Sa;function jb(){this.size=0,this.__data__={hash:new Ug,map:new(co||Pc),string:new Ug}}i(jb,"mapCacheClear");var Vx=jb;function Bb(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}i(Bb,"isKeyable");var Wx=Bb;function Ub(e,t){var r=e.__data__;return Wx(t)?r[typeof t=="string"?"string":"hash"]:r.map}i(Ub,"getMapData");var kc=Ub;function Kb(e){var t=kc(this,e).delete(e);return this.size-=t?1:0,t}i(Kb,"mapCacheDelete");var qx=Kb;function Vb(e){return kc(this,e).get(e)}i(Vb,"mapCacheGet");var Hx=Vb;function Wb(e){return kc(this,e).has(e)}i(Wb,"mapCacheHas");var Yx=Wb;function qb(e,t){var r=kc(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}i(qb,"mapCacheSet");var Xx=qb;function wa(e){var t=-1,r=e==null?0:e.length;this.clear();while(++t<r){var n=e[t];this.set(n[0],n[1])}}i(wa,"MapCache");wa.prototype.clear=Vx;wa.prototype.delete=qx;wa.prototype.get=Hx;wa.prototype.has=Yx;wa.prototype.set=Xx;var Oc=wa,Jx=200;function Hb(e,t){var r=this.__data__;if(r instanceof Pc){var n=r.__data__;if(!co||n.length<Jx-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Oc(n)}return r.set(e,t),this.size=r.size,this}i(Hb,"stackSet");var Zx=Hb;function Ia(e){var t=this.__data__=new Pc(e);this.size=t.size}i(Ia,"Stack");Ia.prototype.clear=QD;Ia.prototype.delete=ex;Ia.prototype.get=tx;Ia.prototype.has=rx;Ia.prototype.set=Zx;var Tl=Ia,Qx="__lodash_hash_undefined__";function Yb(e){return this.__data__.set(e,Qx),this}i(Yb,"setCacheAdd");var e1=Yb;function Xb(e){return this.__data__.has(e)}i(Xb,"setCacheHas");var t1=Xb;function po(e){var t=-1,r=e==null?0:e.length;this.__data__=new Oc;while(++t<r)this.add(e[t])}i(po,"SetCache");po.prototype.add=po.prototype.push=e1;po.prototype.has=t1;var Jb=po;function Zb(e,t){var r=-1,n=e==null?0:e.length;while(++r<n)if(t(e[r],r,e))return!0;return!1}i(Zb,"arraySome");var r1=Zb;function Qb(e,t){return e.has(t)}i(Qb,"cacheHas");var e_=Qb,n1=1,a1=2;function t_(e,t,r,n,a,s){var o=r&n1,l=e.length,u=t.length;if(l!=u&&!(o&&u>l))return!1;var c=s.get(e),f=s.get(t);if(c&&f)return c==t&&f==e;var d=-1,m=!0,g=r&a1?new Jb:void 0;s.set(e,t),s.set(t,e);while(++d<l){var v=e[d],S=t[d];if(n)var I=o?n(S,v,d,t,e,s):n(v,S,d,e,t,s);if(I!==void 0){if(I)continue;m=!1;break}if(g){if(!r1(t,function(P,N){if(!e_(g,N)&&(v===P||a(v,P,r,n,s)))return g.push(N)})){m=!1;break}}else if(!(v===S||a(v,S,r,n,s))){m=!1;break}}return s.delete(e),s.delete(t),m}i(t_,"equalArrays");var r_=t_,i1=Xr.Uint8Array,Kg=i1;function n_(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}i(n_,"mapToArray");var s1=n_;function a_(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}i(a_,"setToArray");var wh=a_,o1=1,l1=2,u1="[object Boolean]",c1="[object Date]",f1="[object Error]",d1="[object Map]",p1="[object Number]",m1="[object RegExp]",h1="[object Set]",y1="[object String]",g1="[object Symbol]",v1="[object ArrayBuffer]",T1="[object DataView]",Vg=vr?vr.prototype:void 0,Cf=Vg?Vg.valueOf:void 0;function i_(e,t,r,n,a,s,o){switch(r){case T1:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case v1:if(e.byteLength!=t.byteLength||!s(new Kg(e),new Kg(t)))return!1;return!0;case u1:case c1:case p1:return pb(+e,+t);case f1:return e.name==t.name&&e.message==t.message;case m1:case y1:return e==t+"";case d1:var l=s1;case h1:var u=n&o1;if(l||(l=wh),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;n|=l1,o.set(e,t);var f=r_(l(e),l(t),n,a,s,o);return o.delete(e),f;case g1:if(Cf)return Cf.call(e)==Cf.call(t)}return!1}i(i_,"equalByTag");var $1=i_;function s_(e,t){var r=-1,n=t.length,a=e.length;while(++r<n)e[a+r]=t[r];return e}i(s_,"arrayPush");var o_=s_,R1=Array.isArray,gt=R1;function l_(e,t,r){var n=t(e);return gt(e)?n:o_(n,r(e))}i(l_,"baseGetAllKeys");var A1=l_;function u_(e,t){var r=-1,n=e==null?0:e.length,a=0,s=[];while(++r<n){var o=e[r];if(t(o,r,e))s[a++]=o}return s}i(u_,"arrayFilter");var c_=u_;function f_(){return[]}i(f_,"stubArray");var E1=f_,C1=Object.prototype,b1=C1.propertyIsEnumerable,Wg=Object.getOwnPropertySymbols,_1=!Wg?E1:function(e){if(e==null)return[];return e=Object(e),c_(Wg(e),function(t){return b1.call(e,t)})},S1=_1;function d_(e,t){var r=-1,n=Array(e);while(++r<e)n[r]=t(r);return n}i(d_,"baseTimes");var w1=d_;function p_(e){return e!=null&&typeof e=="object"}i(p_,"isObjectLike");var Ni=p_,I1="[object Arguments]";function m_(e){return Ni(e)&&zi(e)==I1}i(m_,"baseIsArguments");var qg=m_,h_=Object.prototype,{hasOwnProperty:N1,propertyIsEnumerable:P1}=h_,k1=qg(function(){return arguments}())?qg:function(e){return Ni(e)&&N1.call(e,"callee")&&!P1.call(e,"callee")},Lc=k1;function y_(){return!1}i(y_,"stubFalse");var O1=y_,g_=typeof ot=="object"&&ot&&!ot.nodeType&&ot,Hg=g_&&typeof Ke=="object"&&Ke&&!Ke.nodeType&&Ke,L1=Hg&&Hg.exports===g_,Yg=L1?Xr.Buffer:void 0,M1=Yg?Yg.isBuffer:void 0,D1=M1||O1,tu=D1,x1=9007199254740991,G1=/^(?:0|[1-9]\d*)$/;function v_(e,t){var r=typeof e;return t=t==null?x1:t,!!t&&(r=="number"||r!="symbol"&&G1.test(e))&&(e>-1&&e%1==0&&e<t)}i(v_,"isIndex");var T_=v_,F1=9007199254740991;function $_(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=F1}i($_,"isLength");var Ih=$_,z1="[object Arguments]",j1="[object Array]",B1="[object Boolean]",U1="[object Date]",K1="[object Error]",V1="[object Function]",W1="[object Map]",q1="[object Number]",H1="[object Object]",Y1="[object RegExp]",X1="[object Set]",J1="[object String]",Z1="[object WeakMap]",Q1="[object ArrayBuffer]",eG="[object DataView]",tG="[object Float32Array]",rG="[object Float64Array]",nG="[object Int8Array]",aG="[object Int16Array]",iG="[object Int32Array]",sG="[object Uint8Array]",oG="[object Uint8ClampedArray]",lG="[object Uint16Array]",uG="[object Uint32Array]",be={};be[tG]=be[rG]=be[nG]=be[aG]=be[iG]=be[sG]=be[oG]=be[lG]=be[uG]=!0;be[z1]=be[j1]=be[Q1]=be[B1]=be[eG]=be[U1]=be[K1]=be[V1]=be[W1]=be[q1]=be[H1]=be[Y1]=be[X1]=be[J1]=be[Z1]=!1;function R_(e){return Ni(e)&&Ih(e.length)&&!!be[zi(e)]}i(R_,"baseIsTypedArray");var cG=R_;function A_(e){return function(t){return e(t)}}i(A_,"baseUnary");var fG=A_,E_=typeof ot=="object"&&ot&&!ot.nodeType&&ot,Bs=E_&&typeof Ke=="object"&&Ke&&!Ke.nodeType&&Ke,dG=Bs&&Bs.exports===E_,bf=dG&&Eb.process,pG=function(){try{var e=Bs&&Bs.require&&Bs.require("util").types;if(e)return e;return bf&&bf.binding&&bf.binding("util")}catch(t){}}(),Xg=pG,Jg=Xg&&Xg.isTypedArray,mG=Jg?fG(Jg):cG,Nh=mG,hG=Object.prototype,yG=hG.hasOwnProperty;function C_(e,t){var r=gt(e),n=!r&&Lc(e),a=!r&&!n&&tu(e),s=!r&&!n&&!a&&Nh(e),o=r||n||a||s,l=o?w1(e.length,String):[],u=l.length;for(var c in e)if((t||yG.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||T_(c,u))))l.push(c);return l}i(C_,"arrayLikeKeys");var gG=C_,vG=Object.prototype;function b_(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||vG;return e===r}i(b_,"isPrototype");var __=b_;function S_(e,t){return function(r){return e(t(r))}}i(S_,"overArg");var TG=S_,$G=TG(Object.keys,Object),RG=$G,AG=Object.prototype,EG=AG.hasOwnProperty;function w_(e){if(!__(e))return RG(e);var t=[];for(var r in Object(e))if(EG.call(e,r)&&r!="constructor")t.push(r);return t}i(w_,"baseKeys");var I_=w_;function N_(e){return e!=null&&Ih(e.length)&&!Nb(e)}i(N_,"isArrayLike");var Mc=N_;function P_(e){return Mc(e)?gG(e):I_(e)}i(P_,"keys");var Ph=P_;function k_(e){return A1(e,Ph,S1)}i(k_,"getAllKeys");var Zg=k_,CG=1,bG=Object.prototype,_G=bG.hasOwnProperty;function O_(e,t,r,n,a,s){var o=r&CG,l=Zg(e),u=l.length,c=Zg(t),f=c.length;if(u!=f&&!o)return!1;var d=u;while(d--){var m=l[d];if(!(o?m in t:_G.call(t,m)))return!1}var g=s.get(e),v=s.get(t);if(g&&v)return g==t&&v==e;var S=!0;s.set(e,t),s.set(t,e);var I=o;while(++d<u){m=l[d];var P=e[m],N=t[m];if(n)var E=o?n(N,P,m,t,e,s):n(P,N,m,e,t,s);if(!(E===void 0?P===N||a(P,N,r,n,s):E)){S=!1;break}I||(I=m=="constructor")}if(S&&!I){var L=e.constructor,U=t.constructor;if(L!=U&&(("constructor"in e)&&("constructor"in t))&&!(typeof L=="function"&&L instanceof L&&typeof U=="function"&&U instanceof U))S=!1}return s.delete(e),s.delete(t),S}i(O_,"equalObjects");var SG=O_,wG=ji(Xr,"DataView"),lp=wG,IG=ji(Xr,"Promise"),up=IG,NG=ji(Xr,"Set"),gi=NG,PG=ji(Xr,"WeakMap"),cp=PG,Qg="[object Map]",kG="[object Object]",ev="[object Promise]",tv="[object Set]",rv="[object WeakMap]",nv="[object DataView]",OG=_a(lp),LG=_a(co),MG=_a(up),DG=_a(gi),xG=_a(cp),Dn=zi;if(lp&&Dn(new lp(new ArrayBuffer(1)))!=nv||co&&Dn(new co)!=Qg||up&&Dn(up.resolve())!=ev||gi&&Dn(new gi)!=tv||cp&&Dn(new cp)!=rv)Dn=i(function(e){var t=zi(e),r=t==kG?e.constructor:void 0,n=r?_a(r):"";if(n)switch(n){case OG:return nv;case LG:return Qg;case MG:return ev;case DG:return tv;case xG:return rv}return t},"getTag");var fp=Dn,GG=1,av="[object Arguments]",iv="[object Array]",Ko="[object Object]",FG=Object.prototype,sv=FG.hasOwnProperty;function L_(e,t,r,n,a,s){var o=gt(e),l=gt(t),u=o?iv:fp(e),c=l?iv:fp(t);u=u==av?Ko:u,c=c==av?Ko:c;var f=u==Ko,d=c==Ko,m=u==c;if(m&&tu(e)){if(!tu(t))return!1;o=!0,f=!1}if(m&&!f)return s||(s=new Tl),o||Nh(e)?r_(e,t,r,n,a,s):$1(e,t,u,r,n,a,s);if(!(r&GG)){var g=f&&sv.call(e,"__wrapped__"),v=d&&sv.call(t,"__wrapped__");if(g||v){var S=g?e.value():e,I=v?t.value():t;return s||(s=new Tl),a(S,I,r,n,s)}}if(!m)return!1;return s||(s=new Tl),SG(e,t,r,n,a,s)}i(L_,"baseIsEqualDeep");var zG=L_;function kh(e,t,r,n,a){if(e===t)return!0;if(e==null||t==null||!Ni(e)&&!Ni(t))return e!==e&&t!==t;return zG(e,t,r,n,kh,a)}i(kh,"baseIsEqual");var M_=kh,jG=1,BG=2;function D_(e,t,r,n){var a=r.length,s=a,o=!n;if(e==null)return!s;e=Object(e);while(a--){var l=r[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}while(++a<s){l=r[a];var u=l[0],c=e[u],f=l[1];if(o&&l[2]){if(c===void 0&&!(u in e))return!1}else{var d=new Tl;if(n)var m=n(c,f,u,e,t,d);if(!(m===void 0?M_(f,c,jG|BG,n,d):m))return!1}}return!0}i(D_,"baseIsMatch");var UG=D_;function x_(e){return e===e&&!Sh(e)}i(x_,"isStrictComparable");var G_=x_;function F_(e){var t=Ph(e),r=t.length;while(r--){var n=t[r],a=e[n];t[r]=[n,a,G_(a)]}return t}i(F_,"getMatchData");var KG=F_;function z_(e,t){return function(r){if(r==null)return!1;return r[e]===t&&(t!==void 0||(e in Object(r)))}}i(z_,"matchesStrictComparable");var j_=z_;function B_(e){var t=KG(e);if(t.length==1&&t[0][2])return j_(t[0][0],t[0][1]);return function(r){return r===e||UG(r,e,t)}}i(B_,"baseMatches");var VG=B_,WG="[object Symbol]";function U_(e){return typeof e=="symbol"||Ni(e)&&zi(e)==WG}i(U_,"isSymbol");var Dc=U_,qG=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,HG=/^\w*$/;function K_(e,t){if(gt(e))return!1;var r=typeof e;if(r=="number"||r=="symbol"||r=="boolean"||e==null||Dc(e))return!0;return HG.test(e)||!qG.test(e)||t!=null&&e in Object(t)}i(K_,"isKey");var Oh=K_,YG="Expected a function";function xc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw TypeError(YG);var r=i(function(){var n=arguments,a=t?t.apply(this,n):n[0],s=r.cache;if(s.has(a))return s.get(a);var o=e.apply(this,n);return r.cache=s.set(a,o)||s,o},"memoized");return r.cache=new(xc.Cache||Oc),r}i(xc,"memoize");xc.Cache=Oc;var XG=xc,JG=500;function V_(e){var t=XG(e,function(n){if(r.size===JG)r.clear();return n}),r=t.cache;return t}i(V_,"memoizeCapped");var ZG=V_,QG=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eF=/\\(\\)?/g,tF=ZG(function(e){var t=[];if(e.charCodeAt(0)===46)t.push("");return e.replace(QG,function(r,n,a,s){t.push(a?s.replace(eF,"$1"):n||r)}),t}),rF=tF,nF=1/0,ov=vr?vr.prototype:void 0,lv=ov?ov.toString:void 0;function Lh(e){if(typeof e=="string")return e;if(gt(e))return cb(e,Lh)+"";if(Dc(e))return lv?lv.call(e):"";var t=e+"";return t=="0"&&1/e==-nF?"-0":t}i(Lh,"baseToString");var aF=Lh;function W_(e){return e==null?"":aF(e)}i(W_,"toString");var iF=W_;function q_(e,t){if(gt(e))return e;return Oh(e,t)?[e]:rF(iF(e))}i(q_,"castPath");var H_=q_,sF=1/0;function Y_(e){if(typeof e=="string"||Dc(e))return e;var t=e+"";return t=="0"&&1/e==-sF?"-0":t}i(Y_,"toKey");var Gc=Y_;function X_(e,t){t=H_(t,e);var r=0,n=t.length;while(e!=null&&r<n)e=e[Gc(t[r++])];return r&&r==n?e:void 0}i(X_,"baseGet");var J_=X_;function Z_(e,t,r){var n=e==null?void 0:J_(e,t);return n===void 0?r:n}i(Z_,"get");var oF=Z_;function Q_(e,t){return e!=null&&t in Object(e)}i(Q_,"baseHasIn");var lF=Q_;function eS(e,t,r){t=H_(t,e);var n=-1,a=t.length,s=!1;while(++n<a){var o=Gc(t[n]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}if(s||++n!=a)return s;return a=e==null?0:e.length,!!a&&Ih(a)&&T_(o,a)&&(gt(e)||Lc(e))}i(eS,"hasPath");var uF=eS;function tS(e,t){return e!=null&&uF(e,t,lF)}i(tS,"hasIn");var cF=tS,fF=1,dF=2;function rS(e,t){if(Oh(e)&&G_(t))return j_(Gc(e),t);return function(r){var n=oF(r,e);return n===void 0&&n===t?cF(r,e):M_(t,n,fF|dF)}}i(rS,"baseMatchesProperty");var pF=rS;function nS(e){return e}i(nS,"identity");var Mh=nS;function aS(e){return function(t){return t==null?void 0:t[e]}}i(aS,"baseProperty");var mF=aS;function iS(e){return function(t){return J_(t,e)}}i(iS,"basePropertyDeep");var hF=iS;function sS(e){return Oh(e)?mF(Gc(e)):hF(e)}i(sS,"property");var yF=sS;function oS(e){if(typeof e=="function")return e;if(e==null)return Mh;if(typeof e=="object")return gt(e)?pF(e[0],e[1]):VG(e);return yF(e)}i(oS,"baseIteratee");var Fc=oS;function lS(e){return function(t,r,n){var a=-1,s=Object(t),o=n(t),l=o.length;while(l--){var u=o[e?l:++a];if(r(s[u],u,s)===!1)break}return t}}i(lS,"createBaseFor");var gF=lS,vF=gF(),TF=vF;function uS(e,t){return e&&TF(e,t,Ph)}i(uS,"baseForOwn");var $F=uS;function cS(e,t){return function(r,n){if(r==null)return r;if(!Mc(r))return e(r,n);var a=r.length,s=t?a:-1,o=Object(r);while(t?s--:++s<a)if(n(o[s],s,o)===!1)break;return r}}i(cS,"createBaseEach");var RF=cS,AF=RF($F),zc=AF;function fS(e,t){var r=-1,n=Mc(e)?Array(e.length):[];return zc(e,function(a,s,o){n[++r]=t(a,s,o)}),n}i(fS,"baseMap");var EF=fS;function dS(e,t){var r=gt(e)?cb:EF;return r(e,Fc(t,3))}i(dS,"map");var xr=dS;function pS(e,t){var r=[];return zc(e,function(n,a,s){if(t(n,a,s))r.push(n)}),r}i(pS,"baseFilter");var CF=pS;function mS(e,t){var r=gt(e)?c_:CF;return r(e,Fc(t,3))}i(mS,"filter");var bF=mS;function ca(e,t,r){return`${e.name}_${t}_${r}`}i(ca,"buildATNKey");var An=1,_F=2,hS=4,yS=5,Go=7,SF=8,wF=9,IF=10,NF=11,gS=12,Dh=class{static{i(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},xh=class extends Dh{static{i(this,"AtomTransition")}constructor(e,t){super(e);this.tokenType=t}},vS=class extends Dh{static{i(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},Gh=class extends Dh{static{i(this,"RuleTransition")}constructor(e,t,r){super(e);this.rule=t,this.followState=r}isEpsilon(){return!0}};function TS(e){let t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};$S(t,e);let r=e.length;for(let n=0;n<r;n++){let a=e[n],s=wn(t,a,a);if(s===void 0)continue;PS(t,a,s)}return t}i(TS,"createATN");function $S(e,t){let r=t.length;for(let n=0;n<r;n++){let a=t[n],s=Xe(e,a,void 0,{type:_F}),o=Xe(e,a,void 0,{type:Go});s.stop=o,e.ruleToStartState.set(a,s),e.ruleToStopState.set(a,o)}}i($S,"createRuleStartAndStopATNStates");function Fh(e,t,r){if(r instanceof _e)return jc(e,t,r.terminalType,r);else if(r instanceof ht)return NS(e,t,r);else if(r instanceof Ct)return bS(e,t,r);else if(r instanceof nt)return _S(e,t,r);else if(r instanceof Le)return RS(e,t,r);else if(r instanceof Et)return AS(e,t,r);else if(r instanceof Pt)return ES(e,t,r);else if(r instanceof kt)return CS(e,t,r);else return wn(e,t,r)}i(Fh,"atom");function RS(e,t,r){let n=Xe(e,t,r,{type:yS});Jr(e,n);let a=Na(e,t,n,r,wn(e,t,r));return jh(e,t,r,a)}i(RS,"repetition");function AS(e,t,r){let n=Xe(e,t,r,{type:yS});Jr(e,n);let a=Na(e,t,n,r,wn(e,t,r)),s=jc(e,t,r.separator,r);return jh(e,t,r,a,s)}i(AS,"repetitionSep");function ES(e,t,r){let n=Xe(e,t,r,{type:hS});Jr(e,n);let a=Na(e,t,n,r,wn(e,t,r));return zh(e,t,r,a)}i(ES,"repetitionMandatory");function CS(e,t,r){let n=Xe(e,t,r,{type:hS});Jr(e,n);let a=Na(e,t,n,r,wn(e,t,r)),s=jc(e,t,r.separator,r);return zh(e,t,r,a,s)}i(CS,"repetitionMandatorySep");function bS(e,t,r){let n=Xe(e,t,r,{type:An});Jr(e,n);let a=xr(r.definition,(o)=>Fh(e,t,o));return Na(e,t,n,r,...a)}i(bS,"alternation");function _S(e,t,r){let n=Xe(e,t,r,{type:An});Jr(e,n);let a=Na(e,t,n,r,wn(e,t,r));return SS(e,t,r,a)}i(_S,"option");function wn(e,t,r){let n=bF(xr(r.definition,(a)=>Fh(e,t,a)),(a)=>a!==void 0);if(n.length===1)return n[0];else if(n.length===0)return;else return IS(e,n)}i(wn,"block");function zh(e,t,r,n,a){let{left:s,right:o}=n,l=Xe(e,t,r,{type:NF});Jr(e,l);let u=Xe(e,t,r,{type:gS});if(s.loopback=l,u.loopback=l,e.decisionMap[ca(t,a?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=l,Ge(o,l),a===void 0)Ge(l,s),Ge(l,u);else Ge(l,u),Ge(l,a.left),Ge(a.right,s);return{left:s,right:u}}i(zh,"plus");function jh(e,t,r,n,a){let{left:s,right:o}=n,l=Xe(e,t,r,{type:IF});Jr(e,l);let u=Xe(e,t,r,{type:gS}),c=Xe(e,t,r,{type:wF});if(l.loopback=c,u.loopback=c,Ge(l,s),Ge(l,u),Ge(o,c),a!==void 0)Ge(c,u),Ge(c,a.left),Ge(a.right,s);else Ge(c,l);return e.decisionMap[ca(t,a?"RepetitionWithSeparator":"Repetition",r.idx)]=l,{left:l,right:u}}i(jh,"star");function SS(e,t,r,n){let{left:a,right:s}=n;return Ge(a,s),e.decisionMap[ca(t,"Option",r.idx)]=a,n}i(SS,"optional");function Jr(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}i(Jr,"defineDecisionState");function Na(e,t,r,n,...a){let s=Xe(e,t,n,{type:SF,start:r});r.end=s;for(let l of a)if(l!==void 0)Ge(r,l.left),Ge(l.right,s);else Ge(r,s);let o={left:r,right:s};return e.decisionMap[ca(t,wS(n),n.idx)]=r,o}i(Na,"makeAlts");function wS(e){if(e instanceof Ct)return"Alternation";else if(e instanceof nt)return"Option";else if(e instanceof Le)return"Repetition";else if(e instanceof Et)return"RepetitionWithSeparator";else if(e instanceof Pt)return"RepetitionMandatory";else if(e instanceof kt)return"RepetitionMandatoryWithSeparator";else throw Error("Invalid production type encountered")}i(wS,"getProdType");function IS(e,t){let r=t.length;for(let s=0;s<r-1;s++){let o=t[s],l;if(o.left.transitions.length===1)l=o.left.transitions[0];let u=l instanceof Gh,c=l,f=t[s+1].left;if(o.left.type===An&&o.right.type===An&&l!==void 0&&(u&&c.followState===o.right||l.target===o.right)){if(u)c.followState=f;else l.target=f;kS(e,o.right)}else Ge(o.right,f)}let n=t[0],a=t[r-1];return{left:n.left,right:a.right}}i(IS,"makeBlock");function jc(e,t,r,n){let a=Xe(e,t,n,{type:An}),s=Xe(e,t,n,{type:An});return Bc(a,new xh(s,r)),{left:a,right:s}}i(jc,"tokenRef");function NS(e,t,r){let n=r.referencedRule,a=e.ruleToStartState.get(n),s=Xe(e,t,r,{type:An}),o=Xe(e,t,r,{type:An}),l=new Gh(a,n,o);return Bc(s,l),{left:s,right:o}}i(NS,"ruleRef");function PS(e,t,r){let n=e.ruleToStartState.get(t);Ge(n,r.left);let a=e.ruleToStopState.get(t);return Ge(r.right,a),{left:n,right:a}}i(PS,"buildRuleHandle");function Ge(e,t){let r=new vS(t);Bc(e,r)}i(Ge,"epsilon");function Xe(e,t,r,n){let a=Object.assign({atn:e,production:r,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},n);return e.states.push(a),a}i(Xe,"newState");function Bc(e,t){if(e.transitions.length===0)e.epsilonOnlyTransitions=t.isEpsilon();e.transitions.push(t)}i(Bc,"addTransition");function kS(e,t){e.states.splice(e.states.indexOf(t),1)}i(kS,"removeState");var ru={},dp=class{static{i(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let t=Bh(e);if(!(t in this.map))this.map[t]=this.configs.length,this.configs.push(e)}get elements(){return this.configs}get alts(){return xr(this.configs,(e)=>e.alt)}get key(){let e="";for(let t in this.map)e+=t+":";return e}};function Bh(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map((r)=>r.stateNumber.toString()).join("_")}`}i(Bh,"getATNConfigKey");function OS(e,t,r){var n=-1,a=e.length;while(++n<a){var s=e[n],o=t(s);if(o!=null&&(l===void 0?o===o&&!Dc(o):r(o,l)))var l=o,u=s}return u}i(OS,"baseExtremum");var PF=OS;function LS(e,t){return e<t}i(LS,"baseLt");var kF=LS;function MS(e){return e&&e.length?PF(e,Mh,kF):void 0}i(MS,"min");var OF=MS,uv=vr?vr.isConcatSpreadable:void 0;function DS(e){return gt(e)||Lc(e)||!!(uv&&e&&e[uv])}i(DS,"isFlattenable");var LF=DS;function Uh(e,t,r,n,a){var s=-1,o=e.length;r||(r=LF),a||(a=[]);while(++s<o){var l=e[s];if(t>0&&r(l))if(t>1)Uh(l,t-1,r,n,a);else o_(a,l);else if(!n)a[a.length]=l}return a}i(Uh,"baseFlatten");var xS=Uh;function GS(e,t){return xS(xr(e,t),1)}i(GS,"flatMap");var MF=GS;function FS(e,t,r,n){var a=e.length,s=r+(n?1:-1);while(n?s--:++s<a)if(t(e[s],s,e))return s;return-1}i(FS,"baseFindIndex");var DF=FS;function zS(e){return e!==e}i(zS,"baseIsNaN");var xF=zS;function jS(e,t,r){var n=r-1,a=e.length;while(++n<a)if(e[n]===t)return n;return-1}i(jS,"strictIndexOf");var GF=jS;function BS(e,t,r){return t===t?GF(e,t,r):DF(e,xF,r)}i(BS,"baseIndexOf");var FF=BS;function US(e,t){var r=e==null?0:e.length;return!!r&&FF(e,t,0)>-1}i(US,"arrayIncludes");var zF=US;function KS(e,t,r){var n=-1,a=e==null?0:e.length;while(++n<a)if(r(t,e[n]))return!0;return!1}i(KS,"arrayIncludesWith");var jF=KS;function VS(){}i(VS,"noop");var BF=VS,UF=1/0,KF=!(gi&&1/wh(new gi([,-0]))[1]==UF)?BF:function(e){return new gi(e)},VF=KF,WF=200;function WS(e,t,r){var n=-1,a=zF,s=e.length,o=!0,l=[],u=l;if(r)o=!1,a=jF;else if(s>=WF){var c=t?null:VF(e);if(c)return wh(c);o=!1,a=e_,u=new Jb}else u=t?[]:l;e:while(++n<s){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,o&&d===d){var m=u.length;while(m--)if(u[m]===d)continue e;if(t)u.push(d);l.push(f)}else if(!a(u,d,r)){if(u!==l)u.push(d);l.push(f)}}return l}i(WS,"baseUniq");var qF=WS;function qS(e,t){return e&&e.length?qF(e,Fc(t,2)):[]}i(qS,"uniqBy");var HF=qS;function HS(e){var t=e==null?0:e.length;return t?xS(e,1):[]}i(HS,"flatten");var YF=HS;function YS(e,t){var r=-1,n=e==null?0:e.length;while(++r<n)if(t(e[r],r,e)===!1)break;return e}i(YS,"arrayEach");var XF=YS;function XS(e){return typeof e=="function"?e:Mh}i(XS,"castFunction");var JF=XS;function JS(e,t){var r=gt(e)?XF:zc;return r(e,JF(t))}i(JS,"forEach");var _f=JS,ZF="[object Map]",QF="[object Set]",ez=Object.prototype,tz=ez.hasOwnProperty;function ZS(e){if(e==null)return!0;if(Mc(e)&&(gt(e)||typeof e=="string"||typeof e.splice=="function"||tu(e)||Nh(e)||Lc(e)))return!e.length;var t=fp(e);if(t==ZF||t==QF)return!e.size;if(__(e))return!I_(e).length;for(var r in e)if(tz.call(e,r))return!1;return!0}i(ZS,"isEmpty");var rz=ZS;function QS(e,t,r,n){var a=-1,s=e==null?0:e.length;if(n&&s)r=e[++a];while(++a<s)r=t(r,e[a],a,e);return r}i(QS,"arrayReduce");var nz=QS;function ew(e,t,r,n,a){return a(e,function(s,o,l){r=n?(n=!1,s):t(r,s,o,l)}),r}i(ew,"baseReduce");var az=ew;function tw(e,t,r){var n=gt(e)?nz:az,a=arguments.length<3;return n(e,Fc(t,4),r,a,zc)}i(tw,"reduce");var cv=tw;function rw(e,t){let r={};return(n)=>{let a=n.toString(),s=r[a];if(s!==void 0)return s;else return s={atnStartState:e,decision:t,states:{}},r[a]=s,s}}i(rw,"createDFACache");var nw=class{static{i(this,"PredicateSet")}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="",t=this.predicates.length;for(let r=0;r<t;r++)e+=this.predicates[r]===!0?"1":"0";return e}};var fv=new nw,iz=class extends Ch{static{i(this,"LLStarLookaheadStrategy")}constructor(e){var t;super();this.logging=(t=e===null||e===void 0?void 0:e.logging)!==null&&t!==void 0?t:(r)=>console.log(r)}initialize(e){this.atn=TS(e.rules),this.dfas=aw(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:a}=e,s=this.dfas,o=this.logging,l=ca(r,"Alternation",t),c=this.atn.decisionMap[l].decision,f=xr(Zd({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),(d)=>xr(d,(m)=>m[0]));if(pp(f,!1)&&!a){let d=cv(f,(m,g,v)=>(_f(g,(S)=>{if(S)m[S.tokenTypeIdx]=v,_f(S.categoryMatches,(I)=>{m[I]=v})}),m),{});if(n)return function(m){var g;let v=this.LA(1),S=d[v.tokenTypeIdx];if(m!==void 0&&S!==void 0){let I=(g=m[S])===null||g===void 0?void 0:g.GATE;if(I!==void 0&&I.call(this)===!1)return}return S};else return function(){let m=this.LA(1);return d[m.tokenTypeIdx]}}else if(n)return function(d){let m=new nw,g=d===void 0?0:d.length;for(let S=0;S<g;S++){let I=d===null||d===void 0?void 0:d[S].GATE;m.set(S,I===void 0||I.call(this))}let v=$l.call(this,s,c,m,o);return typeof v==="number"?v:void 0};else return function(){let d=$l.call(this,s,c,fv,o);return typeof d==="number"?d:void 0}}buildLookaheadForOptional(e){let{prodOccurrence:t,rule:r,prodType:n,dynamicTokensEnabled:a}=e,s=this.dfas,o=this.logging,l=ca(r,n,t),c=this.atn.decisionMap[l].decision,f=xr(Zd({maxLookahead:1,occurrence:t,prodType:n,rule:r}),(d)=>xr(d,(m)=>m[0]));if(pp(f)&&f[0][0]&&!a){let d=f[0],m=YF(d);if(m.length===1&&rz(m[0].categoryMatches)){let v=m[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===v}}else{let g=cv(m,(v,S)=>{if(S!==void 0)v[S.tokenTypeIdx]=!0,_f(S.categoryMatches,(I)=>{v[I]=!0});return v},{});return function(){let v=this.LA(1);return g[v.tokenTypeIdx]===!0}}}return function(){let d=$l.call(this,s,c,fv,o);return typeof d==="object"?!1:d===0}}};function pp(e,t=!0){let r=new Set;for(let n of e){let a=new Set;for(let s of n){if(s===void 0)if(t)break;else return!1;let o=[s.tokenTypeIdx].concat(s.categoryMatches);for(let l of o)if(r.has(l)){if(!a.has(l))return!1}else r.add(l),a.add(l)}}return!0}i(pp,"isLL1Sequence");function aw(e){let t=e.decisionStates.length,r=Array(t);for(let n=0;n<t;n++)r[n]=rw(e.decisionStates[n],n);return r}i(aw,"initATNSimulator");function $l(e,t,r,n){let a=e[t](r),s=a.start;if(s===void 0){let l=hw(a.atnStartState);s=Vh(a,Kh(l)),a.start=s}return iw.apply(this,[a,s,r,n])}i($l,"adaptivePredict");function iw(e,t,r,n){let a=t,s=1,o=[],l=this.LA(s++);while(!0){let u=fw(a,l);if(u===void 0)u=sw.apply(this,[e,a,l,s,r,n]);if(u===ru)return cw(o,a,l);if(u.isAcceptState===!0)return u.prediction;a=u,o.push(l),l=this.LA(s++)}}i(iw,"performLookahead");function sw(e,t,r,n,a,s){let o=dw(t.configs,r,a);if(o.size===0)return mp(e,t,r,ru),ru;let l=Kh(o),u=mw(o,a);if(u!==void 0)l.isAcceptState=!0,l.prediction=u,l.configs.uniqueAlt=u;else if(Tw(o)){let c=OF(o.alts);l.isAcceptState=!0,l.prediction=c,l.configs.uniqueAlt=c,ow.apply(this,[e,n,o.alts,s])}return l=mp(e,t,r,l),l}i(sw,"computeLookaheadTarget");function ow(e,t,r,n){let a=[];for(let c=1;c<=t;c++)a.push(this.LA(c).tokenType);let s=e.atnStartState,{rule:o,production:l}=s,u=lw({topLevelRule:o,ambiguityIndices:r,production:l,prefixPath:a});n(u)}i(ow,"reportLookaheadAmbiguity");function lw(e){let t=xr(e.prefixPath,(a)=>ia(a)).join(", "),r=e.production.idx===0?"":e.production.idx,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${uw(e.production)}${r}> inside <${e.topLevelRule.name}> Rule,
|
|
148
|
+
<${t}> may appears as a prefix path in all these alternatives.
|
|
149
|
+
`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
|
150
|
+
For Further details.`,n}i(lw,"buildAmbiguityError");function uw(e){if(e instanceof ht)return"SUBRULE";else if(e instanceof nt)return"OPTION";else if(e instanceof Ct)return"OR";else if(e instanceof Pt)return"AT_LEAST_ONE";else if(e instanceof kt)return"AT_LEAST_ONE_SEP";else if(e instanceof Et)return"MANY_SEP";else if(e instanceof Le)return"MANY";else if(e instanceof _e)return"CONSUME";else throw Error("non exhaustive match")}i(uw,"getProductionDslName");function cw(e,t,r){let n=MF(t.configs.elements,(s)=>s.state.transitions),a=HF(n.filter((s)=>s instanceof xh).map((s)=>s.tokenType),(s)=>s.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:a,tokenPath:e}}i(cw,"buildAdaptivePredictError");function fw(e,t){return e.edges[t.tokenTypeIdx]}i(fw,"getExistingTargetState");function dw(e,t,r){let n=new dp,a=[];for(let o of e.elements){if(r.is(o.alt)===!1)continue;if(o.state.type===Go){a.push(o);continue}let l=o.state.transitions.length;for(let u=0;u<l;u++){let c=o.state.transitions[u],f=pw(c,t);if(f!==void 0)n.add({state:f,alt:o.alt,stack:o.stack})}}let s;if(a.length===0&&n.size===1)s=n;if(s===void 0){s=new dp;for(let o of n.elements)mo(o,s)}if(a.length>0&&!gw(s))for(let o of a)s.add(o);return s}i(dw,"computeReachSet");function pw(e,t){if(e instanceof xh&&gh(t,e.tokenType))return e.target;return}i(pw,"getReachableTarget");function mw(e,t){let r;for(let n of e.elements)if(t.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}i(mw,"getUniqueAlt");function Kh(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}i(Kh,"newDFAState");function mp(e,t,r,n){return n=Vh(e,n),t.edges[r.tokenTypeIdx]=n,n}i(mp,"addDFAEdge");function Vh(e,t){if(t===ru)return t;let r=t.configs.key,n=e.states[r];if(n!==void 0)return n;return t.configs.finalize(),e.states[r]=t,t}i(Vh,"addDFAState");function hw(e){let t=new dp,r=e.transitions.length;for(let n=0;n<r;n++){let s={state:e.transitions[n].target,alt:n,stack:[]};mo(s,t)}return t}i(hw,"computeStartState");function mo(e,t){let r=e.state;if(r.type===Go){if(e.stack.length>0){let a=[...e.stack],o={state:a.pop(),alt:e.alt,stack:a};mo(o,t)}else t.add(e);return}if(!r.epsilonOnlyTransitions)t.add(e);let n=r.transitions.length;for(let a=0;a<n;a++){let s=r.transitions[a],o=yw(e,s);if(o!==void 0)mo(o,t)}}i(mo,"closure");function yw(e,t){if(t instanceof vS)return{state:t.target,alt:e.alt,stack:e.stack};else if(t instanceof Gh){let r=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:r}}return}i(yw,"getEpsilonTarget");function gw(e){for(let t of e.elements)if(t.state.type===Go)return!0;return!1}i(gw,"hasConfigInRuleStopState");function vw(e){for(let t of e.elements)if(t.state.type!==Go)return!1;return!0}i(vw,"allConfigsInRuleStopStates");function Tw(e){if(vw(e))return!0;let t=$w(e.elements);return Rw(t)&&!Aw(t)}i(Tw,"hasConflictTerminatingPrediction");function $w(e){let t=new Map;for(let r of e){let n=Bh(r,!1),a=t.get(n);if(a===void 0)a={},t.set(n,a);a[r.alt]=!0}return t}i($w,"getConflictingAltSets");function Rw(e){for(let t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}i(Rw,"hasConflictingAltSet");function Aw(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}i(Aw,"hasStateAssociatedWithOneAlt");vo();var Ew=class{static{i(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new qh(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new Uc;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){let r=new nu(e.startOffset,e.image.length,eo(e),e.tokenType,!t);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){let t=e.container;if(t){let r=t.content.indexOf(e);if(r>=0)t.content.splice(r,1)}}addHiddenNodes(e){let t=[];for(let a of e){let s=new nu(a.startOffset,a.image.length,eo(a),a.tokenType,!0);s.root=this.rootNode,t.push(s)}let r=this.current,n=!1;if(r.content.length>0){r.content.push(...t);return}while(r.container){let a=r.container.content.indexOf(r);if(a>0){r.container.content.splice(a,0,...t),n=!0;break}r=r.container}if(!n)this.rootNode.content.unshift(...t)}construct(e){let t=this.current;if(typeof e.$type==="string"&&!e.$infix)this.current.astNode=e;e.$cstNode=t;let r=this.nodeStack.pop();if(r?.content.length===0)this.removeNode(r)}},Wh=class{static{i(this,"AbstractCstNode")}get hidden(){return!1}get astNode(){let e=typeof this._astNode?.$type==="string"?this._astNode:this.container?.astNode;if(!e)throw Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},nu=class extends Wh{static{i(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,r,n,a=!1){super();this._hidden=a,this._offset=e,this._tokenType=n,this._length=t,this._range=r}},Uc=class extends Wh{static{i(this,"CompositeCstNodeImpl")}constructor(){super(...arguments);this.content=new sz(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){let e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===void 0){let{range:r}=e,{range:n}=t;this._rangeCache={start:r.start,end:n.end.line<r.start.line?r.start:n.end}}return this._rangeCache}else return{start:de.create(0,0),end:de.create(0,0)}}get firstNonHiddenNode(){for(let e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},sz=class e extends Array{static{i(this,"CstNodeContainer")}constructor(t){super();this.parent=t,Object.setPrototypeOf(this,e.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,r,...n){return this.addParents(n),super.splice(t,r,...n)}addParents(t){for(let r of t)r.container=this.parent}},qh=class extends Uc{static{i(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super();this._text="",this._text=e??""}},au=Symbol("Datatype");function Rl(e){return e.$type===au}i(Rl,"isDataTypeNode");var dv="",Cw=i((e)=>e.endsWith(dv)?e:e+dv,"withRuleSuffix"),Hh=class{static{i(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let t=this.lexer.definition,r=e.LanguageMetaData.mode==="production";if(e.shared.profilers.LangiumProfiler?.isActive("parsing"))this.wrapper=new lz(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId));else this.wrapper=new ww(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},bw=class extends Hh{static{i(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e);this.nodeBuilder=new Ew,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){let r=this.computeRuleType(e),n=void 0;if(bi(e))n=e.name,this.registerPrecedenceMap(e);let a=this.wrapper.DEFINE_RULE(Cw(e.name),this.startImplementation(r,n,t).bind(this));if(this.allRules.set(e.name,a),mt(e)&&e.entry)this.mainRule=a;return a}registerPrecedenceMap(e){let t=e.name,r=new Map;for(let n=0;n<e.operators.precedences.length;n++){let a=e.operators.precedences[n];for(let s of a.operators)r.set(s.value,{precedence:n,rightAssoc:a.associativity==="right"})}this.operatorPrecedence.set(t,r)}computeRuleType(e){if(bi(e))return oa(e);else if(e.fragment)return;else if(Ao(e))return au;else return oa(e)}parse(e,t={}){this.nodeBuilder.buildRootNode(e);let r=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=r.tokens;let n=t.rule?this.allRules.get(t.rule):this.mainRule;if(!n)throw Error(t.rule?`No rule found with name '${t.rule}'`:"No main rule available.");let a=this.doParse(n);return this.nodeBuilder.addHiddenNodes(r.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,Ei(a,{deep:!0}),{value:a,lexerErrors:r.errors,lexerReport:r.report,parserErrors:this.wrapper.errors}}doParse(e){let t=this.wrapper.rule(e);if(this.stack.length>0)t=this.construct();if(t===void 0)throw Error("No result from parser");else if(this.stack.length>0)throw Error("Parser stack is not empty after parsing");return t}startImplementation(e,t,r){return(n)=>{let a=!this.isRecording()&&e!==void 0;if(a){let s={$type:e};if(this.stack.push(s),e===au)s.value="";else if(t!==void 0)s.$infixName=t}return r(n),a?this.construct():void 0}}extractHiddenTokens(e){let t=this.lexerResult.hidden;if(!t.length)return[];let r=e.startOffset;for(let n=0;n<t.length;n++)if(t[n].startOffset>r)return t.splice(0,n);return t.splice(0,t.length)}consume(e,t,r){let n=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(n)){let a=this.extractHiddenTokens(n);this.nodeBuilder.addHiddenNodes(a);let s=this.nodeBuilder.buildLeafNode(n,r),{assignment:o,crossRef:l}=this.getAssignment(r),u=this.current;if(o){let c=zr(r)?n.image:this.converter.convert(n.image,s);this.assign(o.operator,o.feature,c,s,l)}else if(Rl(u)){let c=n.image;if(!zr(r))c=this.converter.convert(c,s).toString();u.value+=c}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset==="number"&&!isNaN(e.endOffset)}subrule(e,t,r,n,a){let s;if(!this.isRecording()&&!r)s=this.nodeBuilder.buildCompositeNode(n);let o;try{o=this.wrapper.wrapSubrule(e,t,a)}finally{if(!this.isRecording()){if(o===void 0&&!r)o=this.construct();if(o!==void 0&&s&&s.length>0)this.performSubruleAssignment(o,n,s)}}}performSubruleAssignment(e,t,r){let{assignment:n,crossRef:a}=this.getAssignment(t);if(n)this.assign(n.operator,n.feature,e,r,a);else if(!n){let s=this.current;if(Rl(s))s.value+=e.toString();else if(typeof e==="object"&&e){let l=this.assignWithoutOverride(e,s);this.stack.pop(),this.stack.push(l)}}}action(e,t){if(!this.isRecording()){let r=this.current;if(t.feature&&t.operator){r=this.construct(),this.nodeBuilder.removeNode(r.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(r.$cstNode);let a={$type:e};this.stack.push(a),this.assign(t.operator,t.feature,r,r.$cstNode)}else r.$type=e}}construct(){if(this.isRecording())return;let e=this.stack.pop();if(this.nodeBuilder.construct(e),"$infixName"in e)return this.constructInfix(e,this.operatorPrecedence.get(e.$infixName));else if(Rl(e))return this.converter.convert(e.value,e.$cstNode);else Wp(this.astReflection,e);return e}constructInfix(e,t){let r=e.parts;if(!Array.isArray(r)||r.length===0)return;let n=e.operators;if(!Array.isArray(n)||r.length<2)return r[0];let a=0,s=-1;for(let v=0;v<n.length;v++){let S=n[v],I=t.get(S)??{precedence:1/0,rightAssoc:!1};if(I.precedence>s)s=I.precedence,a=v;else if(I.precedence===s){if(!I.rightAssoc)a=v}}let o=n.slice(0,a),l=n.slice(a+1),u=r.slice(0,a+1),c=r.slice(a+1),f={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:o},d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:l},m=this.constructInfix(f,t),g=this.constructInfix(d,t);return{$type:e.$type,$cstNode:e.$cstNode,left:m,operator:n[a],right:g}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=pa(e,Fr);this.assignmentMap.set(e,{assignment:t,crossRef:t&&ha(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,r,n,a){let s=this.current,o;if(a==="single"&&typeof r==="string")o=this.linker.buildReference(s,t,n,r);else if(a==="multi"&&typeof r==="string")o=this.linker.buildMultiReference(s,t,n,r);else o=r;switch(e){case"=":{s[t]=o;break}case"?=":{s[t]=!0;break}case"+=":{if(!Array.isArray(s[t]))s[t]=[];s[t].push(o)}}}assignWithoutOverride(e,t){for(let[n,a]of Object.entries(t)){let s=e[n];if(s===void 0)e[n]=a;else if(Array.isArray(s)&&Array.isArray(a))a.push(...s),e[n]=a}let r=e.$cstNode;if(r)r.astNode=void 0,e.$cstNode=void 0;return e}get definitionErrors(){return this.wrapper.definitionErrors}},_w=class{static{i(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return pi.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return pi.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return pi.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return pi.buildEarlyExitMessage(e)}},Yh=class extends _w{static{i(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},Sw=class extends Hh{static{i(this,"LangiumCompletionParser")}constructor(){super(...arguments);this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){return}parse(e){this.resetState();let t=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){let r=this.wrapper.DEFINE_RULE(Cw(e.name),this.startImplementation(t).bind(this));if(this.allRules.set(e.name,r),e.entry)this.mainRule=r;return r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return(t)=>{let r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,r){if(this.wrapper.wrapConsume(e,t),!this.isRecording())this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1}subrule(e,t,r,n,a){this.before(n),this.wrapper.wrapSubrule(e,t,a),this.after(n)}before(e){if(!this.isRecording())this.elementStack.push(e)}after(e){if(!this.isRecording()){let t=this.elementStack.lastIndexOf(e);if(t>=0)this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},oz={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Yh},ww=class extends VD{static{i(this,"ChevrotainWrapper")}constructor(e,t){let r=t&&"maxLookahead"in t;super(e,{...oz,lookaheadStrategy:r?new Ch({maxLookahead:t.maxLookahead}):new iz({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,r){return this.RULE(e,t,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,r){return this.subrule(e,t,{ARGS:[r]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},lz=class extends ww{static{i(this,"ProfilerWrapper")}constructor(e,t,r){super(e,t);this.task=r}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,r){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,r)}finally{this.task.stopSubTask(this.ruleName(t))}}};function Kc(e,t,r){return Iw({parser:t,tokens:r,ruleNames:new Map},e),t}i(Kc,"createParser");function Iw(e,t){let r=ic(t,!1),n=ge(t.rules).filter(mt).filter((s)=>r.has(s));for(let s of n){let o={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(s,En(o,s.definition))}let a=ge(t.rules).filter(bi).filter((s)=>r.has(s));for(let s of a)e.parser.rule(s,Nw(e,s))}i(Iw,"buildRules");function Nw(e,t){let r=t.call.rule.ref;if(!r)throw Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if(Ft(r))throw Error("Cannot use terminal rule in infix expression");let n=t.operators.precedences.flatMap((g)=>g.operators),a={$type:"Group",elements:[]},s={$container:a,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},o={$container:a,$type:"Group",elements:[],cardinality:"*"};a.elements.push(s,o);let u={$container:o,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},c={...s,$container:o};o.elements.push(u,c);let d=n.map((g)=>e.tokens[g.value]).map((g,v)=>({ALT:i(()=>e.parser.consume(v,g,u),"ALT")})),m;return(g)=>{m??(m=Vc(e,r)),e.parser.subrule(0,m,!1,s,g),e.parser.many(0,{DEF:i(()=>{e.parser.alternatives(0,d),e.parser.subrule(1,m,!1,c,g)},"DEF")})}}i(Nw,"buildInfixRule");function En(e,t,r=!1){let n;if(zr(t))n=xw(e,t);else if(Tn(t))n=Pw(e,t);else if(Fr(t))n=En(e,t.terminal);else if(ha(t))n=Xh(e,t);else if(jr(t))n=kw(e,t);else if(Xu(t))n=Lw(e,t);else if(ec(t))n=Mw(e,t);else if(ya(t))n=Dw(e,t);else if(Qp(t)){let a=e.consume++;n=i(()=>e.parser.consume(a,Rn,t),"method")}else throw new rc(t.$cstNode,`Unexpected element type: ${t.$type}`);return Jh(e,r?void 0:ho(t),n,t.cardinality)}i(En,"buildElement");function Pw(e,t){let r=oa(t);return()=>e.parser.action(r,t)}i(Pw,"buildAction");function kw(e,t){let r=t.rule.ref;if(ma(r)){let n=e.subrule++,a=mt(r)&&r.fragment,s=t.arguments.length>0?Ow(r,t.arguments):()=>({}),o;return(l)=>{o??(o=Vc(e,r)),e.parser.subrule(n,o,a,t,s(l))}}else if(Ft(r)){let n=e.consume++,a=iu(e,r.name);return()=>e.parser.consume(n,a,t)}else if(!r)throw new rc(t.$cstNode,`Undefined rule: ${t.rule.$refText}`);else bn(r)}i(kw,"buildRuleCall");function Ow(e,t){if(t.some((n)=>n.calledByName)){let n=t.map((a)=>({parameterName:a.parameter?.ref?.name,predicate:qt(a.value)}));return(a)=>{let s={};for(let{parameterName:o,predicate:l}of n)if(o)s[o]=l(a);return s}}else{let n=t.map((a)=>qt(a.value));return(a)=>{let s={};for(let o=0;o<n.length;o++)if(o<e.parameters.length){let l=e.parameters[o].name,u=n[o];s[l]=u(a)}return s}}}i(Ow,"buildRuleCallPredicate");function qt(e){if(Zp(e)){let t=qt(e.left),r=qt(e.right);return(n)=>t(n)||r(n)}else if(Jp(e)){let t=qt(e.left),r=qt(e.right);return(n)=>t(n)&&r(n)}else if(rm(e)){let t=qt(e.value);return(r)=>!t(r)}else if(nm(e)){let t=e.parameter.ref.name;return(r)=>r!==void 0&&r[t]===!0}else if(Yp(e)){let t=Boolean(e.true);return()=>t}bn(e)}i(qt,"buildPredicate");function Lw(e,t){if(t.elements.length===1)return En(e,t.elements[0]);else{let r=[];for(let a of t.elements){let s={ALT:En(e,a,!0)},o=ho(a);if(o)s.GATE=qt(o);r.push(s)}let n=e.or++;return(a)=>e.parser.alternatives(n,r.map((s)=>{let o={ALT:i(()=>s.ALT(a),"ALT")},l=s.GATE;if(l)o.GATE=()=>l(a);return o}))}}i(Lw,"buildAlternatives");function Mw(e,t){if(t.elements.length===1)return En(e,t.elements[0]);let r=[];for(let l of t.elements){let u={ALT:En(e,l,!0)},c=ho(l);if(c)u.GATE=qt(c);r.push(u)}let n=e.or++,a=i((l,u)=>{let c=u.getRuleStack().join("-");return`uGroup_${l}_${c}`},"idFunc"),s=i((l)=>e.parser.alternatives(n,r.map((u,c)=>{let f={ALT:i(()=>!0,"ALT")},d=e.parser;f.ALT=()=>{if(u.ALT(l),!d.isRecording()){let g=a(n,d);if(!d.unorderedGroups.get(g))d.unorderedGroups.set(g,[]);let v=d.unorderedGroups.get(g);if(typeof v?.[c]>"u")v[c]=!0}};let m=u.GATE;if(m)f.GATE=()=>m(l);else f.GATE=()=>!d.unorderedGroups.get(a(n,d))?.[c];return f})),"alternatives"),o=Jh(e,ho(t),s,"*");return(l)=>{if(o(l),!e.parser.isRecording())e.parser.unorderedGroups.delete(a(n,e.parser))}}i(Mw,"buildUnorderedGroup");function Dw(e,t){let r=t.elements.map((n)=>En(e,n));return(n)=>r.forEach((a)=>a(n))}i(Dw,"buildGroup");function ho(e){if(ya(e))return e.guardCondition;return}i(ho,"getGuardCondition");function Xh(e,t,r=t.terminal){if(!r){if(!t.type.ref)throw Error("Could not resolve reference to type: "+t.type.$refText);let a=uc(t.type.ref)?.terminal;if(!a)throw Error("Could not find name assignment for type: "+oa(t.type.ref));return Xh(e,t,a)}else if(jr(r)&&mt(r.rule.ref)){let n=r.rule.ref,a=e.subrule++,s;return(o)=>{s??(s=Vc(e,n)),e.parser.subrule(a,s,!1,t,o)}}else if(jr(r)&&Ft(r.rule.ref)){let n=e.consume++,a=iu(e,r.rule.ref.name);return()=>e.parser.consume(n,a,t)}else if(zr(r)){let n=e.consume++,a=iu(e,r.value);return()=>e.parser.consume(n,a,t)}else throw Error("Could not build cross reference parser")}i(Xh,"buildCrossReference");function xw(e,t){let r=e.consume++,n=e.tokens[t.value];if(!n)throw Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(r,n,t)}i(xw,"buildKeyword");function Jh(e,t,r,n){let a=t&&qt(t);if(!n)if(a){let s=e.or++;return(o)=>e.parser.alternatives(s,[{ALT:i(()=>r(o),"ALT"),GATE:i(()=>a(o),"GATE")},{ALT:op(),GATE:i(()=>!a(o),"GATE")}])}else return r;if(n==="*"){let s=e.many++;return(o)=>e.parser.many(s,{DEF:i(()=>r(o),"DEF"),GATE:a?()=>a(o):void 0})}else if(n==="+"){let s=e.many++;if(a){let o=e.or++;return(l)=>e.parser.alternatives(o,[{ALT:i(()=>e.parser.atLeastOne(s,{DEF:i(()=>r(l),"DEF")}),"ALT"),GATE:i(()=>a(l),"GATE")},{ALT:op(),GATE:i(()=>!a(l),"GATE")}])}else return(o)=>e.parser.atLeastOne(s,{DEF:i(()=>r(o),"DEF")})}else if(n==="?"){let s=e.optional++;return(o)=>e.parser.optional(s,{DEF:i(()=>r(o),"DEF"),GATE:a?()=>a(o):void 0})}else bn(n)}i(Jh,"wrap");function Vc(e,t){let r=Gw(e,t),n=e.parser.getRule(r);if(!n)throw Error(`Rule "${r}" not found."`);return n}i(Vc,"getRule");function Gw(e,t){if(ma(t))return t.name;else if(e.ruleNames.has(t))return e.ruleNames.get(t);else{let r=t,n=r.$container,a=t.$type;while(!mt(n)){if(ya(n)||Xu(n)||ec(n))a=n.elements.indexOf(r).toString()+":"+a;r=n,n=n.$container}return a=n.name+":"+a,e.ruleNames.set(t,a),a}}i(Gw,"getRuleName");function iu(e,t){let r=e.tokens[t];if(!r)throw Error(`Token "${t}" not found."`);return r}i(iu,"getToken");function Zh(e){let t=e.Grammar,r=e.parser.Lexer,n=new Sw(e);return Kc(t,n,r.definition),n.finalize(),n}i(Zh,"createCompletionParser");function Qh(e){let t=ey(e);return t.finalize(),t}i(Qh,"createLangiumParser");function ey(e){let t=e.Grammar,r=e.parser.Lexer,n=new bw(e);return Kc(t,n,r.definition)}i(ey,"prepareLangiumParser");var Wc=class{static{i(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){let r=ge(ic(e,!1)),n=this.buildTerminalTokens(r),a=this.buildKeywordTokens(r,n,t);return a.push(...n),a}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(Ft).filter((t)=>!t.fragment).map((t)=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(e){let t=Co(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,n={name:e.name,PATTERN:r};if(typeof r==="function")n.LINE_BREAKS=!0;if(e.hidden)n.GROUP=ac(t)?pt.SKIPPED:"hidden";return n}requiresCustomPattern(e){if(e.flags.includes("u")||e.flags.includes("s"))return!0;else return!1}regexPatternFunction(e){let t=new RegExp(e,e.flags+"y");return(r,n)=>(t.lastIndex=n,t.exec(r))}buildKeywordTokens(e,t,r){return e.filter(ma).flatMap((n)=>Hr(n).filter(zr)).distinct((n)=>n.value).toArray().sort((n,a)=>a.value.length-n.value.length).map((n)=>this.buildKeywordToken(n,t,Boolean(r?.caseInsensitive)))}buildKeywordToken(e,t,r){let n=this.buildKeywordPattern(e,r),a={name:e.value,PATTERN:n,LONGER_ALT:this.findLongerAlt(e,t)};if(typeof n==="function")a.LINE_BREAKS=!0;return a}buildKeywordPattern(e,t){return t?new RegExp(Li(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((r,n)=>{let a=n?.PATTERN;if(a?.source&&bm("^"+a.source+"$",e.value))r.push(n);return r},[])}},ty=class{static{i(this,"DefaultValueConverter")}convert(e,t){let r=t.grammarSource;if(ha(r))r=Nm(r);if(jr(r)){let n=r.rule.ref;if(!n)throw Error("This cst node was not parsed by a rule.");return this.runConverter(n,e,t)}return e}runConverter(e,t,r){switch(e.name.toUpperCase()){case"INT":return dr.convertInt(t);case"STRING":return dr.convertString(t);case"ID":return dr.convertID(t)}switch(Fm(e)?.toLowerCase()){case"number":return dr.convertNumber(t);case"boolean":return dr.convertBoolean(t);case"bigint":return dr.convertBigint(t);case"date":return dr.convertDate(t);default:return t}}},dr;(function(e){function t(c){let f="";for(let d=1;d<c.length-1;d++){let m=c.charAt(d);if(m==="\\"){let g=c.charAt(++d);f+=r(g)}else f+=m}return f}i(t,"convertString"),e.convertString=t;function r(c){switch(c){case"b":return"\b";case"f":return"\f";case"n":return`
|
|
151
|
+
`;case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\x00";default:return c}}i(r,"convertEscapeCharacter");function n(c){if(c.charAt(0)==="^")return c.substring(1);else return c}i(n,"convertID"),e.convertID=n;function a(c){return parseInt(c)}i(a,"convertInt"),e.convertInt=a;function s(c){return BigInt(c)}i(s,"convertBigint"),e.convertBigint=s;function o(c){return new Date(c)}i(o,"convertDate"),e.convertDate=o;function l(c){return Number(c)}i(l,"convertNumber"),e.convertNumber=l;function u(c){return c.toLowerCase()==="true"}i(u,"convertBoolean"),e.convertBoolean=u})(dr||(dr={}));var Re={};Vu(Re,Fp(qu(),1));function qc(){return new Promise((e)=>{if(typeof setImmediate>"u")setTimeout(e,0);else setImmediate(e)})}i(qc,"delayNextTick");var Al=0,Fw=10;function Hc(){return Al=performance.now(),new Re.CancellationTokenSource}i(Hc,"startCancelableOperation");function ry(e){Fw=e}i(ry,"setInterruptionPeriod");var hr=Symbol("OperationCancelled");function Pa(e){return e===hr}i(Pa,"isOperationCancelled");async function Ze(e){if(e===Re.CancellationToken.None)return;let t=performance.now();if(t-Al>=Fw)Al=t,await qc(),Al=performance.now();if(e.isCancellationRequested)throw hr}i(Ze,"interruptAndCheck");var Wr=class{static{i(this,"Deferred")}constructor(){this.promise=new Promise((e,t)=>{this.resolve=(r)=>(e(r),this),this.reject=(r)=>(t(r),this)})}},pv=class e{static{i(this,"FullTextDocument")}constructor(t,r,n,a){this._uri=t,this._languageId=r,this._version=n,this._content=a,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content}update(t,r){for(let n of t)if(e.isIncremental(n)){let a=ay(n.range),s=this.offsetAt(a.start),o=this.offsetAt(a.end);this._content=this._content.substring(0,s)+n.text+this._content.substring(o,this._content.length);let l=Math.max(a.start.line,0),u=Math.max(a.end.line,0),c=this._lineOffsets,f=hp(n.text,!1,s);if(u-l===f.length)for(let m=0,g=f.length;m<g;m++)c[m+l+1]=f[m];else if(f.length<1e4)c.splice(l+1,u-l,...f);else this._lineOffsets=c=c.slice(0,l+1).concat(f,c.slice(u+1));let d=n.text.length-(o-s);if(d!==0)for(let m=l+1+f.length,g=c.length;m<g;m++)c[m]=c[m]+d}else if(e.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw Error("Unknown change event received");this._version=r}getLineOffsets(){if(this._lineOffsets===void 0)this._lineOffsets=hp(this._content,!0);return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let r=this.getLineOffsets(),n=0,a=r.length;if(a===0)return{line:0,character:t};while(n<a){let o=Math.floor((n+a)/2);if(r[o]>t)a=o;else n=o+1}let s=n-1;return t=this.ensureBeforeEOL(t,r[s]),{line:s,character:t-r[s]}}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;else if(t.line<0)return 0;let n=r[t.line];if(t.character<=0)return n;let a=t.line+1<r.length?r[t.line+1]:this._content.length,s=Math.min(n+t.character,a);return this.ensureBeforeEOL(s,n)}ensureBeforeEOL(t,r){while(t>r&&ny(this._content.charCodeAt(t-1)))t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let r=t;return r!==void 0&&r!==null&&typeof r.text==="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength==="number")}static isFull(t){let r=t;return r!==void 0&&r!==null&&typeof r.text==="string"&&r.range===void 0&&r.rangeLength===void 0}},su;(function(e){function t(a,s,o,l){return new pv(a,s,o,l)}i(t,"create"),e.create=t;function r(a,s,o){if(a instanceof pv)return a.update(s,o),a;else throw Error("TextDocument.update: document must be created by TextDocument.create")}i(r,"update"),e.update=r;function n(a,s){let o=a.getText(),l=ou(s.map(zw),(f,d)=>{let m=f.range.start.line-d.range.start.line;if(m===0)return f.range.start.character-d.range.start.character;return m}),u=0,c=[];for(let f of l){let d=a.offsetAt(f.range.start);if(d<u)throw Error("Overlapping edit");else if(d>u)c.push(o.substring(u,d));if(f.newText.length)c.push(f.newText);u=a.offsetAt(f.range.end)}return c.push(o.substr(u)),c.join("")}i(n,"applyEdits"),e.applyEdits=n})(su||(su={}));function ou(e,t){if(e.length<=1)return e;let r=e.length/2|0,n=e.slice(0,r),a=e.slice(r);ou(n,t),ou(a,t);let s=0,o=0,l=0;while(s<n.length&&o<a.length)if(t(n[s],a[o])<=0)e[l++]=n[s++];else e[l++]=a[o++];while(s<n.length)e[l++]=n[s++];while(o<a.length)e[l++]=a[o++];return e}i(ou,"mergeSort");function hp(e,t,r=0){let n=t?[r]:[];for(let a=0;a<e.length;a++){let s=e.charCodeAt(a);if(ny(s)){if(s===13&&a+1<e.length&&e.charCodeAt(a+1)===10)a++;n.push(r+a+1)}}return n}i(hp,"computeLineOffsets");function ny(e){return e===13||e===10}i(ny,"isEOL");function ay(e){let{start:t,end:r}=e;if(t.line>r.line||t.line===r.line&&t.character>r.character)return{start:r,end:t};return e}i(ay,"getWellformedRange");function zw(e){let t=ay(e.range);if(t!==e.range)return{newText:e.newText,range:t};return e}i(zw,"getWellformedEdit");var jw;(()=>{var e={975:(C)=>{function M(R){if(typeof R!="string")throw TypeError("Path must be a string. Received "+JSON.stringify(R))}i(M,"e");function h(R,A){for(var w,O="",B=0,G=-1,z=0,Y=0;Y<=R.length;++Y){if(Y<R.length)w=R.charCodeAt(Y);else{if(w===47)break;w=47}if(w===47){if(G===Y-1||z===1);else if(G!==Y-1&&z===2){if(O.length<2||B!==2||O.charCodeAt(O.length-1)!==46||O.charCodeAt(O.length-2)!==46){if(O.length>2){var Q=O.lastIndexOf("/");if(Q!==O.length-1){Q===-1?(O="",B=0):B=(O=O.slice(0,Q)).length-1-O.lastIndexOf("/"),G=Y,z=0;continue}}else if(O.length===2||O.length===1){O="",B=0,G=Y,z=0;continue}}A&&(O.length>0?O+="/..":O="..",B=2)}else O.length>0?O+="/"+R.slice(G+1,Y):O=R.slice(G+1,Y),B=Y-G-1;G=Y,z=0}else w===46&&z!==-1?++z:z=-1}return O}i(h,"r");var _={resolve:i(function(){for(var R,A="",w=!1,O=arguments.length-1;O>=-1&&!w;O--){var B;O>=0?B=arguments[O]:(R===void 0&&(R=process.cwd()),B=R),M(B),B.length!==0&&(A=B+"/"+A,w=B.charCodeAt(0)===47)}return A=h(A,!w),w?A.length>0?"/"+A:"/":A.length>0?A:"."},"resolve"),normalize:i(function(R){if(M(R),R.length===0)return".";var A=R.charCodeAt(0)===47,w=R.charCodeAt(R.length-1)===47;return(R=h(R,!A)).length!==0||A||(R="."),R.length>0&&w&&(R+="/"),A?"/"+R:R},"normalize"),isAbsolute:i(function(R){return M(R),R.length>0&&R.charCodeAt(0)===47},"isAbsolute"),join:i(function(){if(arguments.length===0)return".";for(var R,A=0;A<arguments.length;++A){var w=arguments[A];M(w),w.length>0&&(R===void 0?R=w:R+="/"+w)}return R===void 0?".":_.normalize(R)},"join"),relative:i(function(R,A){if(M(R),M(A),R===A)return"";if((R=_.resolve(R))===(A=_.resolve(A)))return"";for(var w=1;w<R.length&&R.charCodeAt(w)===47;++w);for(var O=R.length,B=O-w,G=1;G<A.length&&A.charCodeAt(G)===47;++G);for(var z=A.length-G,Y=B<z?B:z,Q=-1,X=0;X<=Y;++X){if(X===Y){if(z>Y){if(A.charCodeAt(G+X)===47)return A.slice(G+X+1);if(X===0)return A.slice(G+X)}else B>Y&&(R.charCodeAt(w+X)===47?Q=X:X===0&&(Q=0));break}var je=R.charCodeAt(w+X);if(je!==A.charCodeAt(G+X))break;je===47&&(Q=X)}var he="";for(X=w+Q+1;X<=O;++X)X!==O&&R.charCodeAt(X)!==47||(he.length===0?he+="..":he+="/..");return he.length>0?he+A.slice(G+Q):(G+=Q,A.charCodeAt(G)===47&&++G,A.slice(G))},"relative"),_makeLong:i(function(R){return R},"_makeLong"),dirname:i(function(R){if(M(R),R.length===0)return".";for(var A=R.charCodeAt(0),w=A===47,O=-1,B=!0,G=R.length-1;G>=1;--G)if((A=R.charCodeAt(G))===47){if(!B){O=G;break}}else B=!1;return O===-1?w?"/":".":w&&O===1?"//":R.slice(0,O)},"dirname"),basename:i(function(R,A){if(A!==void 0&&typeof A!="string")throw TypeError('"ext" argument must be a string');M(R);var w,O=0,B=-1,G=!0;if(A!==void 0&&A.length>0&&A.length<=R.length){if(A.length===R.length&&A===R)return"";var z=A.length-1,Y=-1;for(w=R.length-1;w>=0;--w){var Q=R.charCodeAt(w);if(Q===47){if(!G){O=w+1;break}}else Y===-1&&(G=!1,Y=w+1),z>=0&&(Q===A.charCodeAt(z)?--z==-1&&(B=w):(z=-1,B=Y))}return O===B?B=Y:B===-1&&(B=R.length),R.slice(O,B)}for(w=R.length-1;w>=0;--w)if(R.charCodeAt(w)===47){if(!G){O=w+1;break}}else B===-1&&(G=!1,B=w+1);return B===-1?"":R.slice(O,B)},"basename"),extname:i(function(R){M(R);for(var A=-1,w=0,O=-1,B=!0,G=0,z=R.length-1;z>=0;--z){var Y=R.charCodeAt(z);if(Y!==47)O===-1&&(B=!1,O=z+1),Y===46?A===-1?A=z:G!==1&&(G=1):A!==-1&&(G=-1);else if(!B){w=z+1;break}}return A===-1||O===-1||G===0||G===1&&A===O-1&&A===w+1?"":R.slice(A,O)},"extname"),format:i(function(R){if(R===null||typeof R!="object")throw TypeError('The "pathObject" argument must be of type Object. Received type '+typeof R);return function(A,w){var O=w.dir||w.root,B=w.base||(w.name||"")+(w.ext||"");return O?O===w.root?O+B:O+"/"+B:B}(0,R)},"format"),parse:i(function(R){M(R);var A={root:"",dir:"",base:"",ext:"",name:""};if(R.length===0)return A;var w,O=R.charCodeAt(0),B=O===47;B?(A.root="/",w=1):w=0;for(var G=-1,z=0,Y=-1,Q=!0,X=R.length-1,je=0;X>=w;--X)if((O=R.charCodeAt(X))!==47)Y===-1&&(Q=!1,Y=X+1),O===46?G===-1?G=X:je!==1&&(je=1):G!==-1&&(je=-1);else if(!Q){z=X+1;break}return G===-1||Y===-1||je===0||je===1&&G===Y-1&&G===z+1?Y!==-1&&(A.base=A.name=z===0&&B?R.slice(1,Y):R.slice(z,Y)):(z===0&&B?(A.name=R.slice(1,G),A.base=R.slice(1,Y)):(A.name=R.slice(z,G),A.base=R.slice(z,Y)),A.ext=R.slice(G,Y)),z>0?A.dir=R.slice(0,z-1):B&&(A.dir="/"),A},"parse"),sep:"/",delimiter:":",win32:null,posix:null};_.posix=_,C.exports=_}},t={};function r(C){var M=t[C];if(M!==void 0)return M.exports;var h=t[C]={exports:{}};return e[C](h,h.exports,r),h.exports}i(r,"r"),r.d=(C,M)=>{for(var h in M)r.o(M,h)&&!r.o(C,h)&&Object.defineProperty(C,h,{enumerable:!0,get:M[h]})},r.o=(C,M)=>Object.prototype.hasOwnProperty.call(C,M),r.r=(C)=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(C,"__esModule",{value:!0})};var n={};let a;if(r.r(n),r.d(n,{URI:i(()=>m,"URI"),Utils:i(()=>De,"Utils")}),typeof process=="object")a=process.platform==="win32";else if(typeof navigator=="object")a=navigator.userAgent.indexOf("Windows")>=0;let s=/^\w[\w\d+.-]*$/,o=/^\//,l=/^\/\//;function u(C,M){if(!C.scheme&&M)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${C.authority}", path: "${C.path}", query: "${C.query}", fragment: "${C.fragment}"}`);if(C.scheme&&!s.test(C.scheme))throw Error("[UriError]: Scheme contains illegal characters.");if(C.path){if(C.authority){if(!o.test(C.path))throw Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(C.path))throw Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}i(u,"a");let c="",f="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class m{static{i(this,"l")}static isUri(C){return C instanceof m||!!C&&typeof C.authority=="string"&&typeof C.fragment=="string"&&typeof C.path=="string"&&typeof C.query=="string"&&typeof C.scheme=="string"&&typeof C.fsPath=="string"&&typeof C.with=="function"&&typeof C.toString=="function"}scheme;authority;path;query;fragment;constructor(C,M,h,_,R,A=!1){typeof C=="object"?(this.scheme=C.scheme||c,this.authority=C.authority||c,this.path=C.path||c,this.query=C.query||c,this.fragment=C.fragment||c):(this.scheme=function(w,O){return w||O?w:"file"}(C,A),this.authority=M||c,this.path=function(w,O){switch(w){case"https":case"http":case"file":O?O[0]!==f&&(O=f+O):O=f}return O}(this.scheme,h||c),this.query=_||c,this.fragment=R||c,u(this,A))}get fsPath(){return N(this,!1)}with(C){if(!C)return this;let{scheme:M,authority:h,path:_,query:R,fragment:A}=C;return M===void 0?M=this.scheme:M===null&&(M=c),h===void 0?h=this.authority:h===null&&(h=c),_===void 0?_=this.path:_===null&&(_=c),R===void 0?R=this.query:R===null&&(R=c),A===void 0?A=this.fragment:A===null&&(A=c),M===this.scheme&&h===this.authority&&_===this.path&&R===this.query&&A===this.fragment?this:new v(M,h,_,R,A)}static parse(C,M=!1){let h=d.exec(C);return h?new v(h[2]||c,ee(h[4]||c),ee(h[5]||c),ee(h[7]||c),ee(h[9]||c),M):new v(c,c,c,c,c)}static file(C){let M=c;if(a&&(C=C.replace(/\\/g,f)),C[0]===f&&C[1]===f){let h=C.indexOf(f,2);h===-1?(M=C.substring(2),C=f):(M=C.substring(2,h),C=C.substring(h)||f)}return new v("file",M,C,c,c)}static from(C){let M=new v(C.scheme,C.authority,C.path,C.query,C.fragment);return u(M,!0),M}toString(C=!1){return E(this,C)}toJSON(){return this}static revive(C){if(C){if(C instanceof m)return C;{let M=new v(C);return M._formatted=C.external,M._fsPath=C._sep===g?C.fsPath:null,M}}return C}}let g=a?1:void 0;class v extends m{static{i(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=N(this,!1)),this._fsPath}toString(C=!1){return C?E(this,!0):(this._formatted||(this._formatted=E(this,!1)),this._formatted)}toJSON(){let C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=g),this._formatted&&(C.external=this._formatted),this.path&&(C.path=this.path),this.scheme&&(C.scheme=this.scheme),this.authority&&(C.authority=this.authority),this.query&&(C.query=this.query),this.fragment&&(C.fragment=this.fragment),C}}let S={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function I(C,M,h){let _,R=-1;for(let A=0;A<C.length;A++){let w=C.charCodeAt(A);if(w>=97&&w<=122||w>=65&&w<=90||w>=48&&w<=57||w===45||w===46||w===95||w===126||M&&w===47||h&&w===91||h&&w===93||h&&w===58)R!==-1&&(_+=encodeURIComponent(C.substring(R,A)),R=-1),_!==void 0&&(_+=C.charAt(A));else{_===void 0&&(_=C.substr(0,A));let O=S[w];O!==void 0?(R!==-1&&(_+=encodeURIComponent(C.substring(R,A)),R=-1),_+=O):R===-1&&(R=A)}}return R!==-1&&(_+=encodeURIComponent(C.substring(R))),_!==void 0?_:C}i(I,"m");function P(C){let M;for(let h=0;h<C.length;h++){let _=C.charCodeAt(h);_===35||_===63?(M===void 0&&(M=C.substr(0,h)),M+=S[_]):M!==void 0&&(M+=C[h])}return M!==void 0?M:C}i(P,"y");function N(C,M){let h;return h=C.authority&&C.path.length>1&&C.scheme==="file"?`//${C.authority}${C.path}`:C.path.charCodeAt(0)===47&&(C.path.charCodeAt(1)>=65&&C.path.charCodeAt(1)<=90||C.path.charCodeAt(1)>=97&&C.path.charCodeAt(1)<=122)&&C.path.charCodeAt(2)===58?M?C.path.substr(1):C.path[1].toLowerCase()+C.path.substr(2):C.path,a&&(h=h.replace(/\//g,"\\")),h}i(N,"v");function E(C,M){let h=M?P:I,_="",{scheme:R,authority:A,path:w,query:O,fragment:B}=C;if(R&&(_+=R,_+=":"),(A||R==="file")&&(_+=f,_+=f),A){let G=A.indexOf("@");if(G!==-1){let z=A.substr(0,G);A=A.substr(G+1),G=z.lastIndexOf(":"),G===-1?_+=h(z,!1,!1):(_+=h(z.substr(0,G),!1,!1),_+=":",_+=h(z.substr(G+1),!1,!0)),_+="@"}A=A.toLowerCase(),G=A.lastIndexOf(":"),G===-1?_+=h(A,!1,!0):(_+=h(A.substr(0,G),!1,!0),_+=A.substr(G))}if(w){if(w.length>=3&&w.charCodeAt(0)===47&&w.charCodeAt(2)===58){let G=w.charCodeAt(1);G>=65&&G<=90&&(w=`/${String.fromCharCode(G+32)}:${w.substr(3)}`)}else if(w.length>=2&&w.charCodeAt(1)===58){let G=w.charCodeAt(0);G>=65&&G<=90&&(w=`${String.fromCharCode(G+32)}:${w.substr(2)}`)}_+=h(w,!0,!1)}return O&&(_+="?",_+=h(O,!1,!1)),B&&(_+="#",_+=M?B:I(B,!1,!1)),_}i(E,"b");function L(C){try{return decodeURIComponent(C)}catch{return C.length>3?C.substr(0,3)+L(C.substr(3)):C}}i(L,"C");let U=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ee(C){return C.match(U)?C.replace(U,(M)=>L(M)):C}i(ee,"w");var re=r(975);let ve=re.posix||re,me="/";var De;(function(C){C.joinPath=function(M,...h){return M.with({path:ve.join(M.path,...h)})},C.resolvePath=function(M,...h){let _=M.path,R=!1;_[0]!==me&&(_=me+_,R=!0);let A=ve.resolve(_,...h);return R&&A[0]===me&&!M.authority&&(A=A.substring(1)),M.with({path:A})},C.dirname=function(M){if(M.path.length===0||M.path===me)return M;let h=ve.dirname(M.path);return h.length===1&&h.charCodeAt(0)===46&&(h=""),M.with({path:h})},C.basename=function(M){return ve.basename(M.path)},C.extname=function(M){return ve.extname(M.path)}})(De||(De={})),jw=n})();var{URI:St,Utils:fs}=jw,dt;(function(e){e.basename=fs.basename,e.dirname=fs.dirname,e.extname=fs.extname,e.joinPath=fs.joinPath,e.resolvePath=fs.resolvePath;let t=typeof process==="object"&&process?.platform==="win32";function r(o,l){return o?.toString()===l?.toString()}i(r,"equals"),e.equals=r;function n(o,l){let u=typeof o==="string"?St.parse(o).path:o.path,c=typeof l==="string"?St.parse(l).path:l.path,f=u.split("/").filter((S)=>S.length>0),d=c.split("/").filter((S)=>S.length>0);if(t){let S=/^[A-Z]:$/;if(f[0]&&S.test(f[0]))f[0]=f[0].toLowerCase();if(d[0]&&S.test(d[0]))d[0]=d[0].toLowerCase();if(f[0]!==d[0])return c.substring(1)}let m=0;for(;m<f.length;m++)if(f[m]!==d[m])break;let g="../".repeat(f.length-m),v=d.slice(m).join("/");return g+v}i(n,"relative"),e.relative=n;function a(o){return St.parse(o.toString()).toString()}i(a,"normalize"),e.normalize=a;function s(o,l){let u=typeof o==="string"?o:o.path,c=typeof l==="string"?l:l.path;if(c.charAt(c.length-1)==="/")c=c.slice(0,-1);if(u.charAt(u.length-1)==="/")u=u.slice(0,-1);if(c===u)return!0;if(c.length<u.length)return!1;if(c.charAt(u.length)!=="/")return!1;return c.startsWith(u)}i(s,"contains"),e.contains=s})(dt||(dt={}));var iy=class{static{i(this,"UriTrie")}constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return dt.normalize(e)}clear(){this.root.children.clear()}insert(e,t){let r=this.getNode(this.normalizeUri(e),!0);r.element=t}delete(e){let t=this.getNode(this.normalizeUri(e),!1);if(t?.parent)t.parent.children.delete(t.name)}has(e){return this.getNode(this.normalizeUri(e),!1)?.element!==void 0}hasNode(e){return this.getNode(this.normalizeUri(e),!1)!==void 0}find(e){return this.getNode(this.normalizeUri(e),!1)?.element}findNode(e){let t=this.normalizeUri(e),r=this.getNode(t,!1);if(!r)return;return{name:r.name,uri:dt.joinPath(St.parse(t),r.name).toString(),element:r.element}}findChildren(e){let t=this.normalizeUri(e),r=this.getNode(t,!1);if(!r)return[];return Array.from(r.children.values()).map((n)=>({name:n.name,uri:dt.joinPath(St.parse(t),n.name).toString(),element:n.element}))}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(dt.normalize(e),!1);if(!t)return[];return this.collectValues(t)}getNode(e,t){let r=e.split("/");if(e.charAt(e.length-1)==="/")r.pop();let n=this.root;for(let a of r){let s=n.children.get(a);if(!s)if(t)s={name:a,children:new Map,parent:n},n.children.set(a,s);else return;n=s}return n}collectValues(e){let t=[];if(e.element)t.push(e.element);for(let r of e.children.values())t.push(...this.collectValues(r));return t}},te;(function(e){e[e.Changed=0]="Changed",e[e.Parsed=1]="Parsed",e[e.IndexedContent=2]="IndexedContent",e[e.ComputedScopes=3]="ComputedScopes",e[e.Linked=4]="Linked",e[e.IndexedReferences=5]="IndexedReferences",e[e.Validated=6]="Validated"})(te||(te={}));var Bw=class{static{i(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=Re.CancellationToken.None){let r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){if(t=t??St.parse(e.uri),Re.CancellationToken.is(r))return this.createAsync(t,e,r);else return this.create(t,e,r)}fromString(e,t,r){if(Re.CancellationToken.is(r))return this.createAsync(t,e,r);else return this.create(t,e,r)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,r){if(typeof t==="string"){let n=this.parse(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}else if("$model"in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{let n=this.parse(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}async createAsync(e,t,r){if(typeof t==="string"){let n=await this.parseAsync(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}else{let n=await this.parseAsync(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}createLangiumDocument(e,t,r,n){let a;if(r)a={parseResult:e,uri:t,state:te.Parsed,references:[],textDocument:r};else{let s=this.createTextDocumentGetter(t,n);a={parseResult:e,uri:t,state:te.Parsed,references:[],get textDocument(){return s()}}}return e.value.$document=a,a}async update(e,t){let r=e.parseResult.value.$cstNode?.root.fullText,n=this.textDocuments?.get(e.uri.toString()),a=n?n.getText():await this.fileSystemProvider.readFile(e.uri);if(n)Object.defineProperty(e,"textDocument",{value:n});else{let s=this.createTextDocumentGetter(e.uri,a);Object.defineProperty(e,"textDocument",{get:s})}if(r!==a)e.parseResult=await this.parseAsync(e.uri,a,t),e.parseResult.value.$document=e;return e.state=te.Parsed,e}parse(e,t,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,r)}parseAsync(e,t,r){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,r)}createTextDocumentGetter(e,t){let r=this.serviceRegistry,n=void 0;return()=>n??(n=su.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}},Uw=class{static{i(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new iy,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return ge(this.documentTrie.all())}addDocument(e){let t=e.uri.toString();if(this.documentTrie.has(t))throw Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){let t=e.toString();return this.documentTrie.find(t)}getDocuments(e){let t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let r=this.getDocument(e);if(r)return r;return r=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(r),r}createDocument(e,t,r){if(r)return this.langiumDocumentFactory.fromString(t,e,r).then((n)=>(this.addDocument(n),n));else{let n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let t=e.toString(),r=this.documentTrie.find(t);if(r)this.documentBuilder().resetToState(r,te.Changed);return r}deleteDocument(e){let t=e.toString(),r=this.documentTrie.find(t);if(r)r.state=te.Changed,this.documentTrie.delete(t);return r}deleteDocuments(e){let t=e.toString(),r=this.documentTrie.findAll(t);for(let n of r)n.state=te.Changed;return this.documentTrie.delete(t),r}},xn=Symbol("RefResolving"),Kw=class{static{i(this,"DefaultLinker")}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=Re.CancellationToken.None){if(this.profiler?.isActive("linking")){let r=this.profiler.createTask("linking",this.languageId);r.start();try{for(let n of Yt(e.parseResult.value))await Ze(t),Ci(n).forEach((a)=>{let s=`${n.$type}:${a.property}`;r.startSubTask(s);try{this.doLink(a,e)}finally{r.stopSubTask(s)}})}finally{r.stop()}}else for(let r of Yt(e.parseResult.value))await Ze(t),Ci(r).forEach((n)=>this.doLink(n,e))}doLink(e,t){let r=e.reference;if("_ref"in r&&r._ref===void 0){r._ref=xn;try{let n=this.getCandidate(e);if(Gn(n))r._ref=n;else{r._nodeDescription=n;let a=this.loadAstNode(n);r._ref=a??this.createLinkingError(e,n)}}catch(n){console.error(`An error occurred while resolving reference to '${r.$refText}':`,n);let a=n.message??String(n);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${a}`}}t.references.push(r)}else if("_items"in r&&r._items===void 0){r._items=xn;try{let n=this.getCandidates(e),a=[];if(Gn(n))r._linkingError=n;else for(let s of n){let o=this.loadAstNode(s);if(o)a.push({ref:o,$nodeDescription:s})}r._items=a}catch(n){r._linkingError={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${n}`},r._items=[]}t.references.push(r)}}unlink(e){for(let t of e.references)if("_ref"in t)t._ref=void 0,delete t._nodeDescription;else if("_items"in t)t._items=void 0,delete t._linkingError;e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let r=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct((n)=>`${n.documentUri}#${n.path}`).toArray();return r.length>0?r:this.createLinkingError(e)}buildReference(e,t,r,n){let a=this,s={$refNode:r,$refText:n,_ref:void 0,get ref(){if(Ue(this._ref))return this._ref;else if(Up(this._nodeDescription)){let o=a.loadAstNode(this._nodeDescription);this._ref=o??a.createLinkingError({reference:s,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){this._ref=xn;let o=mi(e).$document,l=a.getLinkedNode({reference:s,container:e,property:t});if(l.error&&o&&o.state<te.ComputedScopes)return this._ref=void 0;this._ref=l.node??l.error,this._nodeDescription=l.descr,o?.references.push(this)}else if(this._ref===xn)a.throwCyclicReferenceError(e,t,n);return Ue(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return Gn(this._ref)?this._ref:void 0}};return s}buildMultiReference(e,t,r,n){let a=this,s={$refNode:r,$refText:n,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;else if(this._items===void 0){this._items=xn;let o=mi(e).$document,l=a.getCandidates({reference:s,container:e,property:t}),u=[];if(Gn(l))this._linkingError=l;else for(let c of l){let f=a.loadAstNode(c);if(f)u.push({ref:f,$nodeDescription:c})}this._items=u,o?.references.push(this)}else if(this._items===xn)a.throwCyclicReferenceError(e,t,n);return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError)return this._linkingError;if(this.items.length>0)return;else return this._linkingError=a.createLinkingError({reference:s,container:e,property:t})}};return s}throwCyclicReferenceError(e,t,r){throw Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${r}')`)}getLinkedNode(e){try{let t=this.getCandidate(e);if(Gn(t))return{error:t};let r=this.loadAstNode(t);if(r)return{node:r,descr:t};else return{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);let r=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${r}`}}}}loadAstNode(e){if(e.node)return e.node;let t=this.langiumDocuments().getDocument(e.documentUri);if(!t)return;return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){let r=mi(e.container).$document;if(r&&r.state<te.ComputedScopes)console.warn(`Attempted reference resolution before document reached ComputedScopes state (${r.uri}).`);let n=this.reflection.getReferenceType(e);return{info:e,message:`Could not resolve reference to ${n} named '${e.reference.$refText}'.`,targetDescription:t}}};function sy(e){return typeof e.name==="string"}i(sy,"isNamed");var Vw=class{static{i(this,"DefaultNameProvider")}getName(e){if(sy(e))return e.name;return}getNameNode(e){return sc(e.$cstNode,"name")}},Ww=class{static{i(this,"DefaultReferences")}constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator,this.documents=e.shared.workspace.LangiumDocuments,this.hasMultiReference=Yt(e.Grammar).some((t)=>ha(t)&&t.isMulti)}findDeclarations(e){if(e){let t=Lm(e),r=e.astNode;if(t&&r){let n=r[t.feature];if(ft(n)||yr(n))return bl(n);else if(Array.isArray(n)){for(let a of n)if((ft(a)||yr(a))&&a.$refNode&&a.$refNode.offset<=e.offset&&a.$refNode.end>=e.end)return bl(a)}}if(r){let n=this.nameProvider.getNameNode(r);if(n&&(n===e||pm(e,n)))return this.getSelfNodes(r)}}return[]}getSelfNodes(e){if(!this.hasMultiReference)return[e];else{let t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),r=this.getNodeFromReferenceDescription(t.head());if(r){for(let n of Ci(r))if(yr(n.reference)&&n.reference.items.some((a)=>a.ref===e))return n.reference.items.map((a)=>a.ref)}return[e]}}getNodeFromReferenceDescription(e){if(!e)return;let t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath);return}findDeclarationNodes(e){let t=this.findDeclarations(e),r=[];for(let n of t){let a=this.nameProvider.getNameNode(n)??n.$cstNode;if(a)r.push(a)}return r}findReferences(e,t){let r=[];if(t.includeDeclaration)r.push(...this.getSelfReferences(e));let n=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));if(t.documentUri)n=n.filter((a)=>dt.equals(a.sourceUri,t.documentUri));return r.push(...n),ge(r)}getSelfReferences(e){let t=this.getSelfNodes(e),r=[];for(let n of t){let a=this.nameProvider.getNameNode(n);if(a){let s=Ht(n),o=this.nodeLocator.getAstNodePath(n);r.push({sourceUri:s.uri,sourcePath:o,targetUri:s.uri,targetPath:o,segment:Si(a),local:!0})}}return r}},qr=class{static{i(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(let[t,r]of e)this.add(t,r)}get size(){return Qs.sum(ge(this.map.values()).map((e)=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);else{let r=this.map.get(e);if(r){let n=r.indexOf(t);if(n>=0){if(r.length===1)this.map.delete(e);else r.splice(n,1);return!0}}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?ge(t):Ri}has(e,t){if(t===void 0)return this.map.has(e);else{let r=this.map.get(e);if(r)return r.indexOf(t)>=0;return!1}}add(e,t){if(this.map.has(e))this.map.get(e).push(t);else this.map.set(e,[t]);return this}addAll(e,t){if(this.map.has(e))this.map.get(e).push(...t);else this.map.set(e,Array.from(t));return this}forEach(e){this.map.forEach((t,r)=>t.forEach((n)=>e(n,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return ge(this.map.entries()).flatMap(([e,t])=>t.map((r)=>[e,r]))}keys(){return ge(this.map.keys())}values(){return ge(this.map.values()).flat()}entriesGroupedByKey(){return ge(this.map.entries())}},lu=class{static{i(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.inverse.delete(t),!0;return!1}},qw=class{static{i(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=Re.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=$o,n=Re.CancellationToken.None){let a=[];this.addExportedSymbol(e,a,t);for(let s of r(e))await Ze(n),this.addExportedSymbol(s,a,t);return a}addExportedSymbol(e,t,r){let n=this.nameProvider.getName(e);if(n)t.push(this.descriptions.createDescription(e,n,r))}async collectLocalSymbols(e,t=Re.CancellationToken.None){let r=e.parseResult.value,n=new qr;for(let a of Hr(r))await Ze(t),this.addLocalSymbol(a,e,n);return n}addLocalSymbol(e,t,r){let n=e.$container;if(n){let a=this.nameProvider.getName(e);if(a)r.add(n,this.descriptions.createDescription(e,a,t))}}},yp=class{static{i(this,"StreamScope")}constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0}getAllElements(){if(this.outerScope)return this.elements.concat(this.outerScope.getAllElements());else return this.elements}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.find((n)=>n.name.toLowerCase()===t):this.elements.find((n)=>n.name===e);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e);return}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.filter((n)=>n.name.toLowerCase()===t):this.elements.filter((n)=>n.name===e);if((this.concatOuterScope||r.isEmpty())&&this.outerScope)return r.concat(this.outerScope.getElements(e));else return r}},uz=class{static{i(this,"MapScope")}constructor(e,t,r){this.elements=new Map,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let n of e){let a=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(a,n)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e);return}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t),n=r?[r]:[];if((this.concatOuterScope||n.length>0)&&this.outerScope)return ge(n).concat(this.outerScope.getElements(e));else return ge(n)}getAllElements(){let e=ge(this.elements.values());if(this.outerScope)e=e.concat(this.outerScope.getAllElements());return e}},Hw=class{static{i(this,"MultiMapScope")}constructor(e,t,r){this.elements=new qr,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let n of e){let a=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.add(a,n)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t)[0];if(r)return r;if(this.outerScope)return this.outerScope.getElement(e);return}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);if((this.concatOuterScope||r.length===0)&&this.outerScope)return ge(r).concat(this.outerScope.getElements(e));else return ge(r)}getAllElements(){let e=ge(this.elements.values());if(this.outerScope)e=e.concat(this.outerScope.getAllElements());return e}},cz={getElement(){return},getElements(){return Ri},getAllElements(){return Ri}},Yc=class{static{i(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach((e)=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw Error("This cache has already been disposed")}},oy=class extends Yc{static{i(this,"SimpleCache")}constructor(){super(...arguments);this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);else if(t){let r=t();return this.cache.set(e,r),r}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},Xc=class extends Yc{static{i(this,"ContextCache")}constructor(e){super();this.cache=new Map,this.converter=e??((t)=>t)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){this.throwIfDisposed();let n=this.cacheForContext(e);if(n.has(t))return n.get(t);else if(r){let a=r();return n.set(t,a),a}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){let t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){let t=this.converter(e),r=this.cache.get(t);if(!r)r=new Map,this.cache.set(t,r);return r}};var Yw=class extends Xc{static{i(this,"DocumentCache")}constructor(e,t){super((r)=>r.toString());if(t)this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,(r)=>{this.clear(r.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{for(let a of n)this.clear(a)}));else this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{let a=r.concat(n);for(let s of a)this.clear(s)}))}},ly=class extends oy{static{i(this,"WorkspaceCache")}constructor(e,t){super();if(t)this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{if(n.length>0)this.clear()}));else this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},Xw=class{static{i(this,"DefaultScopeProvider")}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new ly(e.shared)}getScope(e){let t=[],r=this.reflection.getReferenceType(e),n=Ht(e.container).localSymbols;if(n){let s=e.container;do{if(n.has(s))t.push(n.getStream(s).filter((o)=>this.reflection.isSubtype(o.type,r)));s=s.$container}while(s)}let a=this.getGlobalScope(r,e);for(let s=t.length-1;s>=0;s--)a=this.createScope(t[s],a);return a}createScope(e,t,r){return new yp(ge(e),t,r)}createScopeForNodes(e,t,r){let n=ge(e).map((a)=>{let s=this.nameProvider.getName(a);if(s)return this.descriptions.createDescription(a,s);return}).nonNullable();return new yp(n,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new Hw(this.indexManager.allElements(e)))}};function uy(e){return typeof e.$comment==="string"}i(uy,"isAstNodeWithComment");function gp(e){return typeof e==="object"&&!!e&&(("$ref"in e)||("$error"in e))}i(gp,"isIntermediateReference");var Jw=class{static{i(this,"DefaultJsonSerializer")}constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let r=t??{},n=t?.replacer,a=i((o,l)=>this.replacer(o,l,r),"defaultReplacer"),s=n?(o,l)=>n(o,l,a):a;try{return this.currentDocument=Ht(e),JSON.stringify(e,s,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let r=t??{},n=JSON.parse(e);return this.linkNode(n,n,r),n}replacer(e,t,{refText:r,sourceText:n,textRegions:a,comments:s,uriConverter:o}){if(this.ignoreProperties.has(e))return;else if(ft(t)){let l=t.ref,u=r?t.$refText:void 0;if(l){let c=Ht(l),f="";if(this.currentDocument&&this.currentDocument!==c)if(o)f=o(c.uri,l);else f=c.uri.toString();let d=this.astNodeLocator.getAstNodePath(l);return{$ref:`${f}#${d}`,$refText:u}}else return{$error:t.error?.message??"Could not resolve reference",$refText:u}}else if(yr(t)){let l=r?t.$refText:void 0,u=[];for(let c of t.items){let f=c.ref,d=Ht(c.ref),m="";if(this.currentDocument&&this.currentDocument!==d)if(o)m=o(d.uri,f);else m=d.uri.toString();let g=this.astNodeLocator.getAstNodePath(f);u.push(`${m}#${g}`)}return{$refs:u,$refText:l}}else if(Ue(t)){let l=void 0;if(a){if(l=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&l?.$textRegion)l.$textRegion.documentURI=this.currentDocument?.uri.toString()}if(n&&!e)l??(l={...t}),l.$sourceText=t.$cstNode?.text;if(s){l??(l={...t});let u=this.commentProvider.getComment(t);if(u)l.$comment=u.replace(/\r/g,"")}return l??t}else return t}addAstNodeRegionWithAssignmentsTo(e){let t=i((r)=>({offset:r.offset,end:r.end,length:r.length,range:r.range}),"createDocumentSegment");if(e.$cstNode){let r=e.$textRegion=t(e.$cstNode),n=r.assignments={};return Object.keys(e).filter((a)=>!a.startsWith("$")).forEach((a)=>{let s=km(e.$cstNode,a).map(t);if(s.length!==0)n[a]=s}),e}return}linkNode(e,t,r,n,a,s){for(let[l,u]of Object.entries(e))if(Array.isArray(u))for(let c=0;c<u.length;c++){let f=u[c];if(gp(f))u[c]=this.reviveReference(e,l,t,f,r);else if(Ue(f))this.linkNode(f,t,r,e,l,c)}else if(gp(u))e[l]=this.reviveReference(e,l,t,u,r);else if(Ue(u))this.linkNode(u,t,r,e,l);let o=e;o.$container=n,o.$containerProperty=a,o.$containerIndex=s}reviveReference(e,t,r,n,a){let{$refText:s,$error:o}=n,l;if(n.$ref){let u=this.getRefNode(r,n.$ref,a.uriConverter);if(Ue(u)){if(!s)s=this.nameProvider.getName(u);return{$refText:s??"",ref:u}}else o=u}else if(n.$refs){let u=[];for(let c of n.$refs){let f=this.getRefNode(r,c,a.uriConverter);if(Ue(f))u.push({ref:f})}if(u.length===0)l={$refText:s??"",items:u},o??(o="Could not resolve multi-reference");else return{$refText:s??"",items:u}}if(o)return l??(l={$refText:s??"",ref:void 0}),l.error={info:{container:e,property:t,reference:l},message:o},l;else return}getRefNode(e,t,r){try{let n=t.indexOf("#");if(n===0){let l=this.astNodeLocator.getAstNode(e,t.substring(1));if(!l)return"Could not resolve path: "+t;return l}if(n<0){let l=r?r(t):St.parse(t),u=this.langiumDocuments.getDocument(l);if(!u)return"Could not find document for URI: "+t;return u.parseResult.value}let a=r?r(t.substring(0,n)):St.parse(t.substring(0,n)),s=this.langiumDocuments.getDocument(a);if(!s)return"Could not find document for URI: "+t;if(n===t.length-1)return s.parseResult.value;let o=this.astNodeLocator.getAstNode(s.parseResult.value,t.substring(n+1));if(!o)return"Could not resolve URI: "+t;return o}catch(n){return String(n)}}},Zw=class{static{i(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){let t=e.LanguageMetaData;for(let r of t.fileExtensions){if(this.fileExtensionMap.has(r))console.warn(`The file extension ${r} is used by multiple languages. It is now assigned to '${t.languageId}'.`);this.fileExtensionMap.set(r,e)}if(t.fileNames)for(let r of t.fileNames){if(this.fileNameMap.has(r))console.warn(`The file name ${r} is used by multiple languages. It is now assigned to '${t.languageId}'.`);this.fileNameMap.set(r,e)}this.languageIdMap.set(t.languageId,e)}getServices(e){if(this.languageIdMap.size===0)throw Error("The service registry is empty. Use `register` to register the services of a language.");let t=this.textDocuments?.get(e)?.languageId;if(t!==void 0){let s=this.languageIdMap.get(t);if(s)return s}let r=dt.extname(e),n=dt.basename(e),a=this.fileNameMap.get(n)??this.fileExtensionMap.get(r);if(!a)if(t)throw Error(`The service registry contains no services for the extension '${r}' for language '${t}'.`);else throw Error(`The service registry contains no services for the extension '${r}'.`);return a}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}};function ta(e){return{code:e}}i(ta,"diagnosticData");var uu;(function(e){e.defaults=["fast","slow","built-in"],e.all=e.defaults})(uu||(uu={}));var Qw=class{static{i(this,"ValidationRegistry")}constructor(e){this.entries=new qr,this.knownCategories=new Set(uu.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,r="fast"){if(r==="built-in")throw Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(r);for(let[n,a]of Object.entries(e)){let s=a;if(Array.isArray(s))for(let o of s){let l={check:this.wrapValidationException(o,t),category:r};this.addEntry(n,l)}else if(typeof s==="function"){let o={check:this.wrapValidationException(s,t),category:r};this.addEntry(n,o)}else bn(s)}}wrapValidationException(e,t){return async(r,n,a)=>{await this.handleException(()=>e.call(t,r,n,a),"An error occurred during validation",n,r)}}async handleException(e,t,r,n){try{await e()}catch(a){if(Pa(a))throw a;if(console.error(`${t}:`,a),a instanceof Error&&a.stack)console.error(a.stack);let s=a instanceof Error?a.message:String(a);r("error",`${t}: ${s}`,{node:n})}}addEntry(e,t){if(e==="AstNode"){this.entries.add("AstNode",t);return}for(let r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=ge(this.entries.get(e)).concat(this.entries.get("AstNode"));if(t)r=r.filter((n)=>t.includes(n.category));return r.map((n)=>n.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(e,t,r){return async(n,a,s,o)=>{await this.handleException(()=>e.call(r,n,a,s,o),t,a,n)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},eI=Object.freeze({validateNode:!0,validateChildren:!0}),tI=class{static{i(this,"DefaultDocumentValidator")}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},r=Re.CancellationToken.None){let n=e.parseResult,a=[];if(await Ze(r),!t.categories||t.categories.includes("built-in")){if(this.processLexingErrors(n,a,t),t.stopAfterLexingErrors&&a.some((s)=>s.data?.code===Mt.LexingError))return a;if(this.processParsingErrors(n,a,t),t.stopAfterParsingErrors&&a.some((s)=>s.data?.code===Mt.ParsingError))return a;if(this.processLinkingErrors(e,a,t),t.stopAfterLinkingErrors&&a.some((s)=>s.data?.code===Mt.LinkingError))return a}try{a.push(...await this.validateAst(n.value,t,r))}catch(s){if(Pa(s))throw s;console.error("An error occurred during validation:",s)}return await Ze(r),a}processLexingErrors(e,t,r){let n=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let a of n){let s=a.severity??"error",o={severity:Us(s),range:{start:{line:a.line-1,character:a.column-1},end:{line:a.line-1,character:a.column+a.length-1}},message:a.message,data:fy(s),source:this.getSource()};t.push(o)}}processParsingErrors(e,t,r){for(let n of e.parserErrors){let a=void 0;if(isNaN(n.token.startOffset)){if("previousToken"in n){let s=n.previousToken;if(!isNaN(s.startOffset)){let o={line:s.endLine-1,character:s.endColumn};a={start:o,end:o}}else{let o={line:0,character:0};a={start:o,end:o}}}}else a=eo(n.token);if(a){let s={severity:Us("error"),range:a,message:n.message,data:ta(Mt.ParsingError),source:this.getSource()};t.push(s)}}}processLinkingErrors(e,t,r){for(let n of e.references){let a=n.error;if(a){let s={node:a.info.container,range:n.$refNode?.range,property:a.info.property,index:a.info.index,data:{code:Mt.LinkingError,containerType:a.info.container.$type,property:a.info.property,refText:a.info.reference.$refText}};t.push(this.toDiagnostic("error",a.message,s))}}}async validateAst(e,t,r=Re.CancellationToken.None){let n=[],a=i((s,o,l)=>{n.push(this.toDiagnostic(s,o,l))},"acceptor");return await this.validateAstBefore(e,t,a,r),await this.validateAstNodes(e,t,a,r),await this.validateAstAfter(e,t,a,r),n}async validateAstBefore(e,t,r,n=Re.CancellationToken.None){let a=this.validationRegistry.checksBefore;for(let s of a)await Ze(n),await s(e,r,t.categories??[],n)}async validateAstNodes(e,t,r,n=Re.CancellationToken.None){if(this.profiler?.isActive("validating")){let a=this.profiler.createTask("validating",this.languageId);a.start();try{let s=Yt(e).iterator();for(let o of s){a.startSubTask(o.$type);let l=this.validateSingleNodeOptions(o,t);if(l.validateNode)try{let u=this.validationRegistry.getChecks(o.$type,t.categories);for(let c of u)await c(o,r,n)}finally{a.stopSubTask(o.$type)}if(!l.validateChildren)s.prune()}}finally{a.stop()}}else{let a=Yt(e).iterator();for(let s of a){await Ze(n);let o=this.validateSingleNodeOptions(s,t);if(o.validateNode){let l=this.validationRegistry.getChecks(s.$type,t.categories);for(let u of l)await u(s,r,n)}if(!o.validateChildren)a.prune()}}}validateSingleNodeOptions(e,t){return eI}async validateAstAfter(e,t,r,n=Re.CancellationToken.None){let a=this.validationRegistry.checksAfter;for(let s of a)await Ze(n),await s(e,r,t.categories??[],n)}toDiagnostic(e,t,r){return{message:t,range:cy(r),severity:Us(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};function cy(e){if(e.range)return e.range;let t;if(typeof e.property==="string")t=sc(e.node.$cstNode,e.property,e.index);else if(typeof e.keyword==="string")t=Om(e.node.$cstNode,e.keyword,e.index);if(t??(t=e.node.$cstNode),!t)return{start:{line:0,character:0},end:{line:0,character:0}};return t.range}i(cy,"getDiagnosticRange");function Us(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw Error("Invalid diagnostic severity: "+e)}}i(Us,"toDiagnosticSeverity");function fy(e){switch(e){case"error":return ta(Mt.LexingError);case"warning":return ta(Mt.LexingWarning);case"info":return ta(Mt.LexingInfo);case"hint":return ta(Mt.LexingHint);default:throw Error("Invalid diagnostic severity: "+e)}}i(fy,"toDiagnosticData");var Mt;(function(e){e.LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"})(Mt||(Mt={}));var rI=class{static{i(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){let n=r??Ht(e);t??(t=this.nameProvider.getName(e));let a=this.astNodeLocator.getAstNodePath(e);if(!t)throw Error(`Node at path ${a} has no name.`);let s,o=i(()=>s??(s=Si(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return o()},selectionSegment:Si(e.$cstNode),type:e.$type,documentUri:n.uri,path:a}}},nI=class{static{i(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Re.CancellationToken.None){let r=[],n=e.parseResult.value;for(let a of Yt(n))await Ze(t),Ci(a).forEach((s)=>{if(!s.reference.error)r.push(...this.createInfoDescriptions(s))});return r}createInfoDescriptions(e){let t=e.reference;if(t.error||!t.$refNode)return[];let r=[];if(ft(t)&&t.$nodeDescription)r=[t.$nodeDescription];else if(yr(t))r=t.items.map((l)=>l.$nodeDescription).filter((l)=>l!==void 0);let n=Ht(e.container).uri,a=this.nodeLocator.getAstNodePath(e.container),s=[],o=Si(t.$refNode);for(let l of r)s.push({sourceUri:n,sourcePath:a,targetUri:l.documentUri,targetPath:l.path,segment:o,local:dt.equals(l.documentUri,n)});return s}},aI=class{static{i(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){let t=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return t+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw Error("Missing '$containerProperty' in AST node.");if(t!==void 0)return e+this.indexSeparator+t;return e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((n,a)=>{if(!n||a.length===0)return n;let s=a.indexOf(this.indexSeparator);if(s>0){let o=a.substring(0,s),l=parseInt(a.substring(s+1));return n[o]?.[l]}return n[a]},e)}},Jc={};Vu(Jc,Fp(ki(),1));var iI=class{static{i(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new Wr,this.onConfigurationSectionUpdateEmitter=new Jc.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){let t=this.serviceRegistry.all;e.register({section:t.map((r)=>this.toSectionName(r.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let t=this.serviceRegistry.all.map((n)=>({section:this.toSectionName(n.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((n,a)=>{this.updateSectionConfiguration(n.section,r[a])})}}this._ready.resolve()}updateConfiguration(e){if(typeof e.settings!=="object"||e.settings===null)return;Object.entries(e.settings).forEach(([t,r])=>{this.updateSectionConfiguration(t,r),this.onConfigurationSectionUpdateEmitter.fire({section:t,configuration:r})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;let r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},Vo=Fp(FN(),1),sa;(function(e){function t(r){return{dispose:i(async()=>await r(),"dispose")}}i(t,"create"),e.create=t})(sa||(sa={}));var sI=class{static{i(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new qr,this.documentPhaseListeners=new qr,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=te.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},r=Re.CancellationToken.None){for(let n of e){let a=n.uri.toString();if(n.state===te.Validated){if(typeof t.validation==="boolean"&&t.validation)this.resetToState(n,te.IndexedReferences);else if(typeof t.validation==="object"){let s=this.findMissingValidationCategories(n,t);if(s.length>0)this.buildState.set(a,{completed:!1,options:{validation:{categories:s}},result:this.buildState.get(a)?.result}),n.state=te.IndexedReferences}}else this.buildState.delete(a)}this.currentState=te.Changed,await this.emitUpdate(e.map((n)=>n.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=Re.CancellationToken.None){this.currentState=te.Changed;let n=[];for(let l of t){let u=this.langiumDocuments.deleteDocuments(l);for(let c of u)n.push(c.uri),this.cleanUpDeleted(c)}let a=(await Promise.all(e.map((l)=>this.findChangedUris(l)))).flat();for(let l of a){let u=this.langiumDocuments.getDocument(l);if(u===void 0)u=this.langiumDocumentFactory.fromModel({$type:"INVALID"},l),u.state=te.Changed,this.langiumDocuments.addDocument(u);this.resetToState(u,te.Changed)}let s=ge(a).concat(n).map((l)=>l.toString()).toSet();this.langiumDocuments.all.filter((l)=>!s.has(l.uri.toString())&&this.shouldRelink(l,s)).forEach((l)=>this.resetToState(l,te.ComputedScopes)),await this.emitUpdate(a,n),await Ze(r);let o=this.sortDocuments(this.langiumDocuments.all.filter((l)=>l.state<te.Validated||!this.buildState.get(l.uri.toString())?.completed||this.resultsAreIncomplete(l,this.updateBuildOptions)).toArray());await this.buildDocuments(o,this.updateBuildOptions,r)}resultsAreIncomplete(e,t){return this.findMissingValidationCategories(e,t).length>=1}findMissingValidationCategories(e,t){let r=this.buildState.get(e.uri.toString()),n=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),a=r?.result?.validationChecks?new Set(r?.result?.validationChecks):r?.completed?n:new Set,s=t===void 0||t.validation===!0?n:typeof t.validation==="object"?t.validation.categories??n:[];return ge(s).filter((o)=>!a.has(o)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let r=await this.fileSystemProvider.stat(e);if(r.isDirectory)return await this.workspaceManager().searchFolder(e);else if(this.workspaceManager().shouldIncludeEntry(r))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map((r)=>r(e,t)))}sortDocuments(e){let t=0,r=e.length-1;while(t<r){while(t<e.length&&this.hasTextDocument(e[t]))t++;while(r>=0&&!this.hasTextDocument(e[r]))r--;if(t<r)[e[t],e[r]]=[e[r],e[t]]}return e}hasTextDocument(e){return Boolean(this.textDocuments?.get(e.uri))}shouldRelink(e,t){if(e.references.some((r)=>r.error!==void 0))return!0;return this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),sa.create(()=>{let t=this.updateListeners.indexOf(e);if(t>=0)this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case te.Changed:case te.Parsed:this.indexManager.removeContent(e.uri);case te.IndexedContent:e.localSymbols=void 0;case te.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case te.Linked:this.indexManager.removeReferences(e.uri);case te.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case te.Validated:}if(e.state>t)e.state=t}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=te.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,te.Parsed,r,(s)=>this.langiumDocumentFactory.update(s,r)),await this.runCancelable(e,te.IndexedContent,r,(s)=>this.indexManager.updateContent(s,r)),await this.runCancelable(e,te.ComputedScopes,r,async(s)=>{let o=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.localSymbols=await o.collectLocalSymbols(s,r)});let n=e.filter((s)=>this.shouldLink(s));await this.runCancelable(n,te.Linked,r,(s)=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,r)),await this.runCancelable(n,te.IndexedReferences,r,(s)=>this.indexManager.updateReferences(s,r));let a=e.filter((s)=>{if(this.shouldValidate(s))return!0;else return this.markAsCompleted(s),!1});await this.runCancelable(a,te.Validated,r,async(s)=>{await this.validate(s,r),this.markAsCompleted(s)})}markAsCompleted(e){let t=this.buildState.get(e.uri.toString());if(t)t.completed=!0}prepareBuild(e,t){for(let r of e){let n=r.uri.toString(),a=this.buildState.get(n);if(!a||a.completed)this.buildState.set(n,{completed:!1,options:t,result:a?.result})}}async runCancelable(e,t,r,n){for(let s of e)if(s.state<t)await Ze(r),await n(s),s.state=t,await this.notifyDocumentPhase(s,t,r);let a=e.filter((s)=>s.state===t);await this.notifyBuildPhase(a,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),sa.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),sa.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let n=void 0;if(t&&"path"in t)n=t;else r=t;if(r??(r=Re.CancellationToken.None),n)return this.awaitDocumentState(e,n,r);else return this.awaitBuilderState(e,r)}awaitDocumentState(e,t,r){let n=this.langiumDocuments.getDocument(t);if(!n)return Promise.reject(new Vo.ResponseError(Vo.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`));else if(n.state>=e)return Promise.resolve(t);else if(r.isCancellationRequested)return Promise.reject(hr);else if(this.currentState>=e&&e>n.state)return Promise.reject(new Vo.ResponseError(Vo.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${te[n.state]}, requiring ${te[e]}, but workspace state is already ${te[this.currentState]}. Returning undefined.`));return new Promise((a,s)=>{let o=this.onDocumentPhase(e,(u)=>{if(dt.equals(u.uri,t))o.dispose(),l.dispose(),a(u.uri)}),l=r.onCancellationRequested(()=>{o.dispose(),l.dispose(),s(hr)})})}awaitBuilderState(e,t){if(this.currentState>=e)return Promise.resolve();else if(t.isCancellationRequested)return Promise.reject(hr);return new Promise((r,n)=>{let a=this.onBuildPhase(e,()=>{a.dispose(),s.dispose(),r()}),s=t.onCancellationRequested(()=>{a.dispose(),s.dispose(),n(hr)})})}async notifyDocumentPhase(e,t,r){let a=this.documentPhaseListeners.get(t).slice();for(let s of a)try{await Ze(r),await s(e,r)}catch(o){if(!Pa(o))throw o}}async notifyBuildPhase(e,t,r){if(e.length===0)return;let a=this.buildPhaseListeners.get(t).slice();for(let s of a)await Ze(r),await s(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){let r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,n=this.getBuildOptions(e),a=typeof n.validation==="object"?{...n.validation}:{};a.categories=this.findMissingValidationCategories(e,n);let s=await r.validateDocument(e,a,t);if(e.diagnostics)e.diagnostics.push(...s);else e.diagnostics=s;let o=this.buildState.get(e.uri.toString());if(o)if(o.result??(o.result={}),o.result.validationChecks)o.result.validationChecks=ge(o.result.validationChecks).concat(a.categories).distinct().toArray();else o.result.validationChecks=[...a.categories]}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},oI=class{static{i(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new Xc,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=Ht(e).uri,n=[];return this.referenceIndex.forEach((a)=>{a.forEach((s)=>{if(dt.equals(s.targetUri,r)&&s.targetPath===t)n.push(s)})}),ge(n)}allElements(e,t){let r=ge(this.symbolIndex.keys());if(t)r=r.filter((n)=>!t||t.has(n));return r.map((n)=>this.getFileDescriptions(n,e)).flat()}getFileDescriptions(e,t){if(!t)return this.symbolIndex.get(e)??[];return this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter((a)=>this.astReflection.isSubtype(a.type,t)))}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){let t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=Re.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),a=e.uri.toString();this.symbolIndex.set(a,n),this.symbolByTypeIndex.clear(a)}async updateReferences(e,t=Re.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){let r=this.referenceIndex.get(e.uri.toString());if(!r)return!1;return r.some((n)=>!n.local&&t.has(n.targetUri.toString()))}},lI=class{static{i(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new Wr,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write((t)=>this.initializeWorkspace(this.folders??[],t))}async initializeWorkspace(e,t=Re.CancellationToken.None){let r=await this.performStartup(e);await Ze(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){let t=[],r=i((s)=>{if(t.push(s),!this.langiumDocuments.hasDocument(s.uri))this.langiumDocuments.addDocument(s)},"collector");await this.loadAdditionalDocuments(e,r);let n=[];await Promise.all(e.map((s)=>this.getRootFolder(s)).map(async(s)=>this.traverseFolder(s,n)));let a=ge(n).distinct((s)=>s.toString()).filter((s)=>!this.langiumDocuments.hasDocument(s));return await this.loadWorkspaceDocuments(a,r),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async(r)=>{let n=await this.langiumDocuments.getOrCreateDocument(r);t(n)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return St.parse(e.uri)}async traverseFolder(e,t){try{let r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async(n)=>{if(this.shouldIncludeEntry(n)){if(n.isDirectory)await this.traverseFolder(n.uri,t);else if(n.isFile)t.push(n.uri)}}))}catch(r){console.error("Failure to read directory content of "+e.toString(!0),r)}}async searchFolder(e){let t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){let t=dt.basename(e.uri);if(t.startsWith("."))return!1;if(e.isDirectory)return t!=="node_modules"&&t!=="out";else if(e.isFile)return this.serviceRegistry.hasServices(e.uri);return!1}},uI=class{static{i(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,n,a){return Jd.buildUnexpectedCharactersMessage(e,t,r,n,a)}buildUnableToPopLexerModeMessage(e){return Jd.buildUnableToPopLexerModeMessage(e)}},dy={mode:"full"},py=class{static{i(this,"DefaultLexer")}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);let r=cu(t)?Object.values(t):t,n=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new pt(r,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=dy){let r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(cu(e))return e;let t=Qc(e)?Object.values(e.modes).flat():e,r={};return t.forEach((n)=>r[n.name]=n),r}};function Zc(e){return Array.isArray(e)&&(e.length===0||("name"in e[0]))}i(Zc,"isTokenTypeArray");function Qc(e){return e&&"modes"in e&&"defaultMode"in e}i(Qc,"isIMultiModeLexerDefinition");function cu(e){return!Zc(e)&&!Qc(e)}i(cu,"isTokenTypeDictionary");vo();function my(e,t,r){let n,a;if(typeof e==="string")a=t,n=r;else a=e.range.start,n=t;if(!a)a=de.create(0,0);let s=yy(e),o=ef(n),l=cI({lines:s,position:a,options:o});return pI({index:0,tokens:l,position:a})}i(my,"parseJSDoc");function hy(e,t){let r=ef(t),n=yy(e);if(n.length===0)return!1;let a=n[0],s=n[n.length-1],{start:o,end:l}=r;return Boolean(o?.exec(a))&&Boolean(l?.exec(s))}i(hy,"isJSDoc");function yy(e){let t="";if(typeof e==="string")t=e;else t=e.text;return t.split(mT)}i(yy,"getLines");var mv=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,fz=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function cI(e){let t=[],r=e.position.line,n=e.position.character;for(let a=0;a<e.lines.length;a++){let s=a===0,o=a===e.lines.length-1,l=e.lines[a],u=0;if(s&&e.options.start){let f=e.options.start?.exec(l);if(f)u=f.index+f[0].length}else{let f=e.options.line?.exec(l);if(f)u=f.index+f[0].length}if(o){let f=e.options.end?.exec(l);if(f)l=l.substring(0,f.index)}if(l=l.substring(0,dI(l)),fu(l,u)>=l.length){if(t.length>0){let f=de.create(r,n);t.push({type:"break",content:"",range:ne.create(f,f)})}}else{mv.lastIndex=u;let f=mv.exec(l);if(f){let d=f[0],m=f[1],g=de.create(r,n+u),v=de.create(r,n+u+d.length);t.push({type:"tag",content:m,range:ne.create(g,v)}),u+=d.length,u=fu(l,u)}if(u<l.length){let d=l.substring(u),m=Array.from(d.matchAll(fz));t.push(...fI(m,d,r,n+u))}}r++,n=0}if(t.length>0&&t[t.length-1].type==="break")return t.slice(0,-1);return t}i(cI,"tokenize");function fI(e,t,r,n){let a=[];if(e.length===0){let s=de.create(r,n),o=de.create(r,n+t.length);a.push({type:"text",content:t,range:ne.create(s,o)})}else{let s=0;for(let l of e){let u=l.index,c=t.substring(s,u);if(c.length>0)a.push({type:"text",content:t.substring(s,u),range:ne.create(de.create(r,s+n),de.create(r,u+n))});let f=c.length+1,d=l[1];if(a.push({type:"inline-tag",content:d,range:ne.create(de.create(r,s+f+n),de.create(r,s+f+d.length+n))}),f+=d.length,l.length===4){f+=l[2].length;let m=l[3];a.push({type:"text",content:m,range:ne.create(de.create(r,s+f+n),de.create(r,s+f+m.length+n))})}else a.push({type:"text",content:"",range:ne.create(de.create(r,s+f+n),de.create(r,s+f+n))});s=u+l[0].length}let o=t.substring(s);if(o.length>0)a.push({type:"text",content:o,range:ne.create(de.create(r,s+n),de.create(r,s+n+o.length))})}return a}i(fI,"buildInlineTokens");var dz=/\S/,pz=/\s*$/;function fu(e,t){let r=e.substring(t).match(dz);if(r)return t+r.index;else return e.length}i(fu,"skipWhitespace");function dI(e){let t=e.match(pz);if(t&&typeof t.index==="number")return t.index;return}i(dI,"lastCharacter");function pI(e){let t=de.create(e.position.line,e.position.character);if(e.tokens.length===0)return new hv([],ne.create(t,t));let r=[];while(e.index<e.tokens.length){let s=mI(e,r[r.length-1]);if(s)r.push(s)}let n=r[0]?.range.start??t,a=r[r.length-1]?.range.end??t;return new hv(r,ne.create(n,a))}i(pI,"parseJSDocComment");function mI(e,t){let r=e.tokens[e.index];if(r.type==="tag")return vy(e,!1);else if(r.type==="text"||r.type==="inline-tag")return gy(e);else{hI(r,t),e.index++;return}}i(mI,"parseJSDocElement");function hI(e,t){if(t){let r=new TI("",e.range);if("inlines"in t)t.inlines.push(r);else t.content.inlines.push(r)}}i(hI,"appendEmptyLine");function gy(e){let t=e.tokens[e.index],r=t,n=t,a=[];while(t&&t.type!=="break"&&t.type!=="tag")a.push(yI(e)),n=t,t=e.tokens[e.index];return new vp(a,ne.create(r.range.start,n.range.end))}i(gy,"parseJSDocText");function yI(e){if(e.tokens[e.index].type==="inline-tag")return vy(e,!0);else return Ty(e)}i(yI,"parseJSDocInline");function vy(e,t){let r=e.tokens[e.index++],n=r.content.substring(1);if(e.tokens[e.index]?.type==="text")if(t){let s=Ty(e);return new Sf(n,new vp([s],s.range),t,ne.create(r.range.start,s.range.end))}else{let s=gy(e);return new Sf(n,s,t,ne.create(r.range.start,s.range.end))}else{let s=r.range;return new Sf(n,new vp([],s),t,s)}}i(vy,"parseJSDocTag");function Ty(e){let t=e.tokens[e.index++];return new TI(t.content,t.range)}i(Ty,"parseJSDocLine");function ef(e){if(!e)return ef({start:"/**",end:"*/",line:"*"});let{start:t,end:r,line:n}=e;return{start:El(t,!0),end:El(r,!1),line:El(n,!0)}}i(ef,"normalizeOptions");function El(e,t){if(typeof e==="string"||typeof e==="object"){let r=typeof e==="string"?Li(e):e.source;if(t)return new RegExp(`^\\s*${r}`);else return new RegExp(`\\s*${r}\\s*$`)}else return e}i(El,"normalizeOption");var hv=class{static{i(this,"JSDocCommentImpl")}constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find((t)=>t.name===e)}getTags(e){return this.getAllTags().filter((t)=>t.name===e)}getAllTags(){return this.elements.filter((e)=>("name"in e))}toString(){let e="";for(let t of this.elements)if(e.length===0)e=t.toString();else{let r=t.toString();e+=Tp(e)+r}return e.trim()}toMarkdown(e){let t="";for(let r of this.elements)if(t.length===0)t=r.toMarkdown(e);else{let n=r.toMarkdown(e);t+=Tp(t)+n}return t.trim()}},Sf=class{static{i(this,"JSDocTagImpl")}constructor(e,t,r,n){this.name=e,this.content=t,this.inline=r,this.range=n}toString(){let e=`@${this.name}`,t=this.content.toString();if(this.content.inlines.length===1)e=`${e} ${t}`;else if(this.content.inlines.length>1)e=`${e}
|
|
152
|
+
${t}`;if(this.inline)return`{${e}}`;else return e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){let t=this.content.toMarkdown(e);if(this.inline){let a=gI(this.name,t,e??{});if(typeof a==="string")return a}let r="";if(e?.tag==="italic"||e?.tag===void 0)r="*";else if(e?.tag==="bold")r="**";else if(e?.tag==="bold-italic")r="***";let n=`${r}@${this.name}${r}`;if(this.content.inlines.length===1)n=`${n} — ${t}`;else if(this.content.inlines.length>1)n=`${n}
|
|
153
|
+
${t}`;if(this.inline)return`{${n}}`;else return n}};function gI(e,t,r){if(e==="linkplain"||e==="linkcode"||e==="link"){let n=t.indexOf(" "),a=t;if(n>0){let o=fu(t,n);a=t.substring(o),t=t.substring(0,n)}if(e==="linkcode"||e==="link"&&r.link==="code")a=`\`${a}\``;return r.renderLink?.(t,a)??vI(t,a)}return}i(gI,"renderInlineTag");function vI(e,t){try{return St.parse(e,!0),`[${t}](${e})`}catch{return e}}i(vI,"renderLinkDefault");var vp=class{static{i(this,"JSDocTextImpl")}constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;t<this.inlines.length;t++){let r=this.inlines[t],n=this.inlines[t+1];if(e+=r.toString(),n&&n.range.start.line>r.range.start.line)e+=`
|
|
154
|
+
`}return e}toMarkdown(e){let t="";for(let r=0;r<this.inlines.length;r++){let n=this.inlines[r],a=this.inlines[r+1];if(t+=n.toMarkdown(e),a&&a.range.start.line>n.range.start.line)t+=`
|
|
155
|
+
`}return t}},TI=class{static{i(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};function Tp(e){if(e.endsWith(`
|
|
156
|
+
`))return`
|
|
157
|
+
`;else return`
|
|
158
|
+
|
|
159
|
+
`}i(Tp,"fillNewlines");var $I=class{static{i(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let t=this.commentProvider.getComment(e);if(t&&hy(t))return my(t).toMarkdown({renderLink:i((n,a)=>this.documentationLinkRenderer(e,n,a),"renderLink"),renderTag:i((n)=>this.documentationTagRenderer(e,n),"renderTag")});return}documentationLinkRenderer(e,t,r){let n=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(n&&n.nameSegment){let a=n.nameSegment.range.start.line+1,s=n.nameSegment.range.start.character+1,o=n.documentUri.with({fragment:`L${a},${s}`});return`[${r}](${o.toString()})`}else return}documentationTagRenderer(e,t){return}findNameInLocalSymbols(e,t){let n=Ht(e).localSymbols;if(!n)return;let a=e;do{let o=n.getStream(a).find((l)=>l.name===t);if(o)return o;a=a.$container}while(a);return}findNameInGlobalScope(e,t){return this.indexManager.allElements().find((n)=>n.name===t)}},RI=class{static{i(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){if(uy(e))return e.$comment;return gm(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},AI=class{static{i(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},mz=class{static{i(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){while(this.workerPool.length<this.threadCount){let e=this.createWorker();e.onReady(()=>{if(this.queue.length>0){let t=this.queue.shift();if(t)e.lock(),t.resolve(e)}}),this.workerPool.push(e)}}async parse(e,t){let r=await this.acquireParserWorker(t),n=new Wr,a,s=t.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then((o)=>{let l=this.hydrator.hydrate(o);n.resolve(l)}).catch((o)=>{n.reject(o)}).finally(()=>{s.dispose(),clearTimeout(a)}),n.promise}terminateWorker(e){e.terminate();let t=this.workerPool.indexOf(e);if(t>=0)this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(let r of this.workerPool)if(r.ready)return r.lock(),r;let t=new Wr;return e.onCancellationRequested(()=>{let r=this.queue.indexOf(t);if(r>=0)this.queue.splice(r,1);t.reject(hr)}),this.queue.push(t),t.promise}},hz=class{static{i(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,n){this.onReadyEmitter=new Jc.Emitter,this.deferred=new Wr,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=n,t((a)=>{let s=a;this.deferred.resolve(s),this.unlock()}),r((a)=>{this.deferred.reject(a),this.unlock()})}terminate(){this.deferred.reject(hr),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Wr,this.sendMessage(e),this.deferred.promise}},EI=class{static{i(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Re.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let t=Hc();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=Re.CancellationToken.None){let n=new Wr,a={action:t,deferred:n,cancellationToken:r};return e.push(a),this.performNextOperation(),n.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:t,deferred:r,cancellationToken:n})=>{try{let a=await Promise.resolve().then(()=>t(n));r.resolve(a)}catch(a){if(Pa(a))r.resolve(void 0);else r.reject(a)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},CI=class{static{i(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new lu,this.tokenTypeIdMap=new lu,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map((t)=>({...t,message:t.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let t=new Map,r=new Map;for(let n of Yt(e))t.set(n,{});if(e.$cstNode)for(let n of _i(e.$cstNode))r.set(n,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){let r=t.astNodes.get(e);if(r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode!==void 0)r.$cstNode=this.dehydrateCstNode(e.$cstNode,t);for(let[n,a]of Object.entries(e)){if(n.startsWith("$"))continue;if(Array.isArray(a)){let s=[];r[n]=s;for(let o of a)if(Ue(o))s.push(this.dehydrateAstNode(o,t));else if(ft(o))s.push(this.dehydrateReference(o,t));else s.push(o)}else if(Ue(a))r[n]=this.dehydrateAstNode(a,t);else if(ft(a))r[n]=this.dehydrateReference(a,t);else if(a!==void 0)r[n]=a}return r}dehydrateReference(e,t){let r={};if(r.$refText=e.$refText,e.$refNode)r.$refNode=t.cstNodes.get(e.$refNode);return r}dehydrateCstNode(e,t){let r=t.cstNodes.get(e);if(Hu(e))r.fullText=e.fullText;else r.grammarSource=this.getGrammarElementId(e.grammarSource);if(r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Gr(e))r.content=e.content.map((n)=>this.dehydrateCstNode(n,t));else if(da(e))r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character;return r}hydrate(e){let t=e.value,r=this.createHydrationContext(t);if("$cstNode"in t)this.hydrateCstNode(t.$cstNode,r);return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){let t=new Map,r=new Map;for(let a of Yt(e))t.set(a,{});let n;if(e.$cstNode)for(let a of _i(e.$cstNode)){let s;if("fullText"in a)s=new qh(a.fullText),n=s;else if("content"in a)s=new Uc;else if("tokenType"in a)s=this.hydrateCstLeafNode(a);if(s)r.set(a,s),s.root=n}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){let r=t.astNodes.get(e);if(r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode)r.$cstNode=t.cstNodes.get(e.$cstNode);for(let[n,a]of Object.entries(e)){if(n.startsWith("$"))continue;if(Array.isArray(a)){let s=[];r[n]=s;for(let o of a)if(Ue(o))s.push(this.setParent(this.hydrateAstNode(o,t),r));else if(ft(o))s.push(this.hydrateReference(o,r,n,t));else s.push(o)}else if(Ue(a))r[n]=this.setParent(this.hydrateAstNode(a,t),r);else if(ft(a))r[n]=this.hydrateReference(a,r,n,t);else if(a!==void 0)r[n]=a}return r}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,n){return this.linker.buildReference(t,r,n.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){let n=t.cstNodes.get(e);if(typeof e.grammarSource==="number")n.grammarSource=this.getGrammarElement(e.grammarSource);if(n.astNode=t.astNodes.get(e.astNode),Gr(n))for(let a of e.content){let s=this.hydrateCstNode(a,t,r++);n.content.push(s)}return n}hydrateCstLeafNode(e){let t=this.getTokenType(e.tokenType),{offset:r,length:n,startLine:a,startColumn:s,endLine:o,endColumn:l,hidden:u}=e;return new nu(r,n,{start:{line:a,character:s},end:{line:o,character:l}},t,u)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(!e)return;if(this.grammarElementIdMap.size===0)this.createGrammarElementIdMap();return this.grammarElementIdMap.get(e)}getGrammarElement(e){if(this.grammarElementIdMap.size===0)this.createGrammarElementIdMap();return this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(let t of Yt(this.grammar))if(Yu(t))this.grammarElementIdMap.set(t,e++)}};function ae(e){return{documentation:{CommentProvider:i((t)=>new RI(t),"CommentProvider"),DocumentationProvider:i((t)=>new $I(t),"DocumentationProvider")},parser:{AsyncParser:i((t)=>new AI(t),"AsyncParser"),GrammarConfig:i((t)=>jm(t),"GrammarConfig"),LangiumParser:i((t)=>Qh(t),"LangiumParser"),CompletionParser:i((t)=>Zh(t),"CompletionParser"),ValueConverter:i(()=>new ty,"ValueConverter"),TokenBuilder:i(()=>new Wc,"TokenBuilder"),Lexer:i((t)=>new py(t),"Lexer"),ParserErrorMessageProvider:i(()=>new Yh,"ParserErrorMessageProvider"),LexerErrorMessageProvider:i(()=>new uI,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:i(()=>new aI,"AstNodeLocator"),AstNodeDescriptionProvider:i((t)=>new rI(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:i((t)=>new nI(t),"ReferenceDescriptionProvider")},references:{Linker:i((t)=>new Kw(t),"Linker"),NameProvider:i(()=>new Vw,"NameProvider"),ScopeProvider:i((t)=>new Xw(t),"ScopeProvider"),ScopeComputation:i((t)=>new qw(t),"ScopeComputation"),References:i((t)=>new Ww(t),"References")},serializer:{Hydrator:i((t)=>new CI(t),"Hydrator"),JsonSerializer:i((t)=>new Jw(t),"JsonSerializer")},validation:{DocumentValidator:i((t)=>new tI(t),"DocumentValidator"),ValidationRegistry:i((t)=>new Qw(t),"ValidationRegistry")},shared:i(()=>e.shared,"shared")}}i(ae,"createDefaultCoreModule");function ie(e){return{ServiceRegistry:i((t)=>new Zw(t),"ServiceRegistry"),workspace:{LangiumDocuments:i((t)=>new Uw(t),"LangiumDocuments"),LangiumDocumentFactory:i((t)=>new Bw(t),"LangiumDocumentFactory"),DocumentBuilder:i((t)=>new sI(t),"DocumentBuilder"),IndexManager:i((t)=>new oI(t),"IndexManager"),WorkspaceManager:i((t)=>new lI(t),"WorkspaceManager"),FileSystemProvider:i((t)=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:i(()=>new EI,"WorkspaceLock"),ConfigurationProvider:i((t)=>new iI(t),"ConfigurationProvider")},profilers:{}}}i(ie,"createDefaultSharedCoreModule");var $p;(function(e){e.merge=(t,r)=>Pi(Pi({},t),r)})($p||($p={}));function W(e,t,r,n,a,s,o,l,u){let c=[e,t,r,n,a,s,o,l,u].reduce(Pi,{});return Ry(c)}i(W,"inject");var bI=Symbol("isProxy");function $y(e){if(e&&e[bI])for(let t of Object.values(e))$y(t);return e}i($y,"eagerLoad");function Ry(e,t){let r=new Proxy({},{deleteProperty:i(()=>!1,"deleteProperty"),set:i(()=>{throw Error("Cannot set property on injected service container")},"set"),get:i((n,a)=>{if(a===bI)return!0;else return Rp(n,a,e,t||r)},"get"),getOwnPropertyDescriptor:i((n,a)=>(Rp(n,a,e,t||r),Object.getOwnPropertyDescriptor(n,a)),"getOwnPropertyDescriptor"),has:i((n,a)=>(a in e),"has"),ownKeys:i(()=>[...Object.getOwnPropertyNames(e)],"ownKeys")});return r}i(Ry,"_inject");var yv=Symbol();function Rp(e,t,r,n){if(t in e){if(e[t]instanceof Error)throw Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===yv)throw Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}else if(t in r){let a=r[t];e[t]=yv;try{e[t]=typeof a==="function"?a(n):Ry(a,n)}catch(s){throw e[t]=s instanceof Error?s:void 0,s}return e[t]}else return}i(Rp,"_resolve");function Pi(e,t){if(t){for(let[r,n]of Object.entries(t))if(n!==void 0&&n!==null)if(typeof n==="object"){let a=e[r];if(typeof a==="object"&&a!==null)e[r]=Pi(a,n);else e[r]=Pi({},n)}else e[r]=n}return e}i(Pi,"_merge");var Ap={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},ra;(function(e){e.REGULAR="indentation-sensitive",e.IGNORE_INDENTATION="ignore-indentation"})(ra||(ra={}));var _I=class extends Wc{static{i(this,"IndentationAwareTokenBuilder")}constructor(e=Ap){super();this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...Ap,...e},this.indentTokenType=yi({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=yi({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){let r=super.buildTokens(e,t);if(!Zc(r))throw Error("Invalid tokens built by default builder");let{indentTokenName:n,dedentTokenName:a,whitespaceTokenName:s,ignoreIndentationDelimiters:o}=this.options,l,u,c,f=[];for(let d of r){for(let[m,g]of o)if(d.name===m)d.PUSH_MODE=ra.IGNORE_INDENTATION;else if(d.name===g)d.POP_MODE=!0;if(d.name===a)l=d;else if(d.name===n)u=d;else if(d.name===s)c=d;else f.push(d)}if(!l||!u||!c)throw Error("Some indentation/whitespace tokens not found!");if(o.length>0)return{modes:{[ra.REGULAR]:[l,u,...f,c],[ra.IGNORE_INDENTATION]:[...f,c]},defaultMode:ra.REGULAR};else return[l,u,c,...f]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return t===0||`\r
|
|
160
|
+
`.includes(e[t-1])}matchWhitespace(e,t,r,n){this.whitespaceRegExp.lastIndex=t;let a=this.whitespaceRegExp.exec(e);return{currIndentLevel:a?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:a}}createIndentationTokenInstance(e,t,r,n){let a=this.getLineNumber(t,n);return Mo(e,r,n,n+r.length,a,a,1,r.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:a,prevIndentLevel:s,match:o}=this.matchWhitespace(e,t,r,n);if(a<=s)return null;return this.indentationStack.push(a),o}dedentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:a,prevIndentLevel:s,match:o}=this.matchWhitespace(e,t,r,n);if(a>=s)return null;let l=this.indentationStack.lastIndexOf(a);if(l===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${a} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:o?.[0]?.length??0,line:this.getLineNumber(e,t),column:1}),null;let u=this.indentationStack.length-l-1,c=e.substring(0,t).match(/[\r\n]+$/)?.[0].length??1;for(let f=0;f<u;f++){let d=this.createIndentationTokenInstance(this.dedentTokenType,e,"",t-(c-1));r.push(d),this.indentationStack.pop()}return null}buildTerminalToken(e){let t=super.buildTerminalToken(e),{indentTokenName:r,dedentTokenName:n,whitespaceTokenName:a}=this.options;if(t.name===r)return this.indentTokenType;else if(t.name===n)return this.dedentTokenType;else if(t.name===a)return yi({name:a,pattern:this.whitespaceRegExp,group:pt.SKIPPED});return t}flushRemainingDedents(e){let t=[];while(this.indentationStack.length>1)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},yz=class extends py{static{i(this,"IndentationAwareLexer")}constructor(e){super(e);if(e.parser.TokenBuilder instanceof _I)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,t=dy){let r=super.tokenize(e),n=r.report;if(t?.mode==="full")r.tokens.push(...n.remainingDedents);n.remainingDedents=[];let{indentTokenType:a,dedentTokenType:s}=this.indentationTokenBuilder,o=a.tokenTypeIdx,l=s.tokenTypeIdx,u=[],c=r.tokens.length-1;for(let f=0;f<c;f++){let d=r.tokens[f],m=r.tokens[f+1];if(d.tokenTypeIdx===o&&m.tokenTypeIdx===l){f++;continue}u.push(d)}if(c>=0)u.push(r.tokens[c]);return r.tokens=u,r}},Ay={};Cn(Ay,{AstUtils:()=>Vp,BiMap:()=>lu,Cancellation:()=>Re,ContextCache:()=>Xc,CstUtils:()=>Bp,DONE_RESULT:()=>ct,Deferred:()=>Wr,Disposable:()=>sa,DisposableCache:()=>Yc,DocumentCache:()=>Yw,EMPTY_STREAM:()=>Ri,ErrorWithLocation:()=>rc,GrammarUtils:()=>Rm,MultiMap:()=>qr,OperationCancelled:()=>hr,Reduction:()=>Qs,RegExpUtils:()=>Em,SimpleCache:()=>oy,StreamImpl:()=>mr,TreeStreamImpl:()=>Ai,URI:()=>St,UriTrie:()=>iy,UriUtils:()=>dt,WorkspaceCache:()=>ly,assertCondition:()=>Am,assertUnreachable:()=>bn,delayNextTick:()=>qc,interruptAndCheck:()=>Ze,isOperationCancelled:()=>Pa,loadGrammarFromJson:()=>et,setInterruptionPeriod:()=>ry,startCancelableOperation:()=>Hc,stream:()=>ge});Vu(Ay,Jc);var SI=class{static{i(this,"EmptyFileSystemProvider")}stat(e){throw Error("No file system is available.")}statSync(e){throw Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw Error("No file system is available.")}readBinarySync(){throw Error("No file system is available.")}readFile(){throw Error("No file system is available.")}readFileSync(){throw Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},le={fileSystemProvider:i(()=>new SI,"fileSystemProvider")},gz={Grammar:i(()=>{return},"Grammar"),LanguageMetaData:i(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},vz={AstReflection:i(()=>new dm,"AstReflection")};function wI(){let e=W(ie(le),vz),t=W(ae({shared:e}),gz);return e.ServiceRegistry.register(t),t}i(wI,"createMinimalGrammarServices");function et(e){let t=wI(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,St.parse(`memory:/${r.name??"grammar"}.langium`)),r}i(et,"loadGrammarFromJson");Vu(Qe,Ay);var Tz=class{static{i(this,"DefaultLangiumProfiler")}constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new qr}isActive(e){return this.activeCategories.has(e)}start(...e){if(!e)this.activeCategories=new Set(this.allCategories);else e.forEach((t)=>this.activeCategories.add(t))}stop(...e){if(!e)this.activeCategories.clear();else e.forEach((t)=>this.activeCategories.delete(t))}createTask(e,t){if(!this.isActive(e))throw Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${t}'.`),new II((r)=>this.records.add(e,this.dumpRecord(e,r)),t)}dumpRecord(e,t){console.info(`Task ${e}.${t.identifier} executed in ${t.duration.toFixed(2)}ms and ended at ${t.date.toISOString()}`);let r=[];for(let s of t.entries.keys()){let o=t.entries.get(s),l=o.reduce((u,c)=>u+c);r.push({name:`${t.identifier}.${s}`,count:o.length,duration:l})}let n=t.duration-r.map((s)=>s.duration).reduce((s,o)=>s+o,0);r.push({name:t.identifier,count:1,duration:n}),r.sort((s,o)=>o.duration-s.duration);function a(s){return Math.round(100*s)/100}return i(a,"Round"),console.table(r.map((s)=>({Element:s.name,Count:s.count,"Self %":a(100*s.duration/t.duration),"Time (ms)":a(s.duration)}))),t}getRecords(...e){if(e.length===0)return this.records.values();else return this.records.entries().filter((t)=>e.some((r)=>r===t[0])).flatMap((t)=>t[1])}},II=class{static{i(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new qr,this.addRecord=e,this.identifier=t}start(){if(this.startTime!==void 0)throw Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map((t)=>t.id).join(", ")}.`);let e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){let t=this.stack.pop();if(!t)throw Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw Error(`Sub-Task "${t.id}" is not already stopped.`);let r=performance.now()-t.start;if(this.stack.at(-1)!==void 0)this.stack[this.stack.length-1].content+=r;let n=r-t.content;this.entries.add(e,n)}},Ep;((e)=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/}})(Ep||(Ep={}));var Cp;((e)=>{e.Terminals={DOMAIN_NAME:/complex|complicated|clear|chaotic|confusion/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Cp||(Cp={}));var bp;((e)=>{e.Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/}})(bp||(bp={}));var _p;((e)=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(_p||(_p={}));var Sp;((e)=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Sp||(Sp={}));var wp;((e)=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(wp||(wp={}));var Ip;((e)=>{e.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Ip||(Ip={}));var Np;((e)=>{e.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Np||(Np={}));var Pp;((e)=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ABNF_RULENAME:/[A-Za-z][A-Za-z0-9-]*/,ABNF_STRING:/"[^"]*"/,ABNF_NUMVAL:/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\.[0-9A-Fa-f]+)*/,ABNF_REPEAT:/[0-9]*\*[0-9]*/,ABNF_EXACT_REPEAT:/[0-9]+/,ABNF_WHITESPACE:/[\t \r\n]+/,ABNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,ABNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,ABNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ABNF_COMMENT:/;[^\n\r]*/}})(Pp||(Pp={}));var kp;((e)=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EBNF_ID:/[A-Z_a-z][\w-]*/,EBNF_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,EBNF_SPECIAL_SEQUENCE:/\?(?=[^?;]*[^?\s;][^?;]*\?)[^?;]*\?/,EBNF_WHITESPACE:/[\t \r\n]+/,EBNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EBNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EBNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EBNF_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//,EBNF_ISO_COMMENT:/\(\*[\s\S]*?\*\)/}})(kp||(kp={}));var Op;((e)=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,RR_ID:/[A-Z_a-z][\w-]*/,RR_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,RR_WHITESPACE:/[\t \r\n]+/,RR_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,RR_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,RR_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,RR_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//}})(Op||(Op={}));var Lp;((e)=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,PEG_ID:/[A-Z_a-z][\w-]*/,PEG_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,PEG_WHITESPACE:/[\t \r\n]+/,PEG_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,PEG_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,PEG_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,PEG_LINE_COMMENT:/#[^\n\r]*/}})(Lp||(Lp={}));var Mp;((e)=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(Mp||(Mp={}));var Dp;((e)=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,CLASS_ANNOTATION:/[ \t]+:::[ \t]*[A-Za-z_][\w-]*/,ICON_ANNOTATION:/[ \t]+icon\([\w-]*(?::[\w-]+)?\)/,DESC_ANNOTATION:/[ \t]+##[^\n\r]*/,INDENTATION:/[ \t]{1,}/,QUOTED_NAME:/"[^"]*"|'[^']*'/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,BARE_NAME:/(?!:::|icon\(|##)[^ \t\n\r"'](?:(?![ \t]+:::[ \t]*[A-Za-z_]|[ \t]+icon\(|[ \t]+##)[^\n\r])*/}})(Dp||(Dp={}));var xp;((e)=>{e.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+</,LINK_ARROW:/-->|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(xp||(xp={}));var wj={...Ep.Terminals,...Cp.Terminals,...bp.Terminals,..._p.Terminals,...Sp.Terminals,...wp.Terminals,...Ip.Terminals,...Np.Terminals,...Pp.Terminals,...kp.Terminals,...Op.Terminals,...Lp.Terminals,...Dp.Terminals,...Mp.Terminals,...xp.Terminals},du={$type:"AbnfAlternation",alternatives:"alternatives"},pu={$type:"AbnfConcatenation",elements:"elements"},Ks={$type:"AbnfElement",primary:"primary",repeat:"repeat"},mu={$type:"AbnfGroup",element:"element"},hu={$type:"AbnfNumVal",value:"value"},yu={$type:"AbnfOptionalGroup",element:"element"},sn={$type:"AbnfPrimary"},Vs={$type:"AbnfRule",definition:"definition",name:"name"},gu={$type:"AbnfRuleName",name:"name"},vu={$type:"AbnfStringLiteral",value:"value"},Wo={$type:"Accelerator",name:"name",x:"x",y:"y"},wf={$type:"Alignment",direction:"direction",members:"members"},qo={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},ds={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},If={$type:"Annotations",x:"x",y:"y"},Lt={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",alignments:"alignments",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};function Ey(e){return Fe.isInstance(e,Lt.$type)}i(Ey,"isArchitecture");var Ho={$type:"Axis",label:"label",name:"name"},vi={$type:"Branch",name:"name",order:"order"};function Cy(e){return Fe.isInstance(e,vi.$type)}i(Cy,"isBranch");var gv={$type:"Checkout",branch:"branch"},Yo={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},Nf={$type:"ClassDefStatement",className:"className",styleText:"styleText"},cn={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};function by(e){return Fe.isInstance(e,cn.$type)}i(by,"isCommit");var Xo={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},Nn={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},Jo={$type:"Curve",entries:"entries",label:"label",name:"name"},Or={$type:"Cynefin",accDescr:"accDescr",accTitle:"accTitle",domains:"domains",title:"title",transitions:"transitions"};function _y(e){return Fe.isInstance(e,Or.$type)}i(_y,"isCynefin");var Zo={$type:"Deaccelerator",name:"name",x:"x",y:"y"},vv={$type:"Decorator",strategy:"strategy"},ja={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},Ti={$type:"DomainBlock",domain:"domain",items:"items"};function Sy(e){return Fe.isInstance(e,Ti.$type)}i(Sy,"isDomainBlock");var yo={$type:"DomainItem",label:"label"};function wy(e){return Fe.isInstance(e,yo.$type)}i(wy,"isDomainItem");var Tu={$type:"EbnfChoice",alternatives:"alternatives"},$u={$type:"EbnfExceptionPostfix",except:"except"},Ru={$type:"EbnfGroup",element:"element"},Au={$type:"EbnfNonTerminal",name:"name"},Eu={$type:"EbnfOneOrMorePostfix",operator:"operator"},Cu={$type:"EbnfOptional",element:"element"},bu={$type:"EbnfOptionalPostfix",operator:"operator"},Xn={$type:"EbnfPostfix"},Nr={$type:"EbnfPrimary"},_u={$type:"EbnfRepetition",element:"element"},Ws={$type:"EbnfRule",definition:"definition",name:"name"},Su={$type:"EbnfSequence",elements:"elements"},wu={$type:"EbnfSpecial",text:"text"},qs={$type:"EbnfTerm",base:"base",postfixes:"postfixes"},Iu={$type:"EbnfTerminal",value:"value"},Nu={$type:"EbnfZeroOrMorePostfix",operator:"operator"},ur={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},on={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},Pr={$type:"EmFrame"},ps={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},Tv={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},Pf={$type:"EmModelEntity",name:"name"};function Iy(e){return e==="rmo"||e==="readmodel"||e==="ui"||e==="cmd"||e==="command"||e==="evt"||e==="event"||e==="pcr"||e==="processor"}i(Iy,"isEmModelEntityType");var Qo={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},Sr={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"};function Lr(e){return Fe.isInstance(e,Sr.$type)}i(Lr,"isEmResetFrame");var Qr={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},kf={$type:"Entry",axis:"axis",value:"value"},Kt={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},$v={$type:"Evolution",stages:"stages"},el={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},Of={$type:"Evolve",component:"component",target:"target"},Mr={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};function Ny(e){return Fe.isInstance(e,Mr.$type)}i(Ny,"isGitGraph");var ms={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},na={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};function Py(e){return Fe.isInstance(e,na.$type)}i(Py,"isInfo");var hs={$type:"Item",classSelector:"classSelector",name:"name"},Lf={$type:"Junction",id:"id",in:"in"},ys={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},tl={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},Pn={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},fn={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};function ky(e){return Fe.isInstance(e,fn.$type)}i(ky,"isMerge");var rl={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},Mf={$type:"Option",name:"name",value:"value"},dn={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};function Oy(e){return Fe.isInstance(e,dn.$type)}i(Oy,"isPacket");var pn={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};function Ly(e){return Fe.isInstance(e,pn.$type)}i(Ly,"isPacketBlock");var Pu={$type:"PegAny",dot:"dot"},ku={$type:"PegGroup",element:"element"},Ou={$type:"PegIdentifier",name:"name"},Lu={$type:"PegLiteral",value:"value"},Mu={$type:"PegOrderedChoice",alternatives:"alternatives"},Hs={$type:"PegPrefix",operator:"operator",suffix:"suffix"},Jn={$type:"PegPrimary"},Ys={$type:"PegRule",definition:"definition",name:"name"},Du={$type:"PegSequence",elements:"elements"},Xs={$type:"PegSuffix",operator:"operator",primary:"primary"},Dr={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};function My(e){return Fe.isInstance(e,Dr.$type)}i(My,"isPie");var $i={$type:"PieSection",label:"label",value:"value"};function Dy(e){return Fe.isInstance(e,$i.$type)}i(Dy,"isPieSection");var Df={$type:"Pipeline",components:"components",parent:"parent"},nl={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},kr={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},mn={$type:"Railroad",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};function xy(e){return Fe.isInstance(e,mn.$type)}i(xy,"isRailroad");var hn={$type:"RailroadAbnf",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};function Gy(e){return Fe.isInstance(e,hn.$type)}i(Gy,"isRailroadAbnf");var xu={$type:"RailroadChoiceExpr",alternatives:"alternatives"},yn={$type:"RailroadEbnf",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};function Fy(e){return Fe.isInstance(e,yn.$type)}i(Fy,"isRailroadEbnf");var Vt={$type:"RailroadExpression"},Gu={$type:"RailroadNonTerminalExpr",name:"name"},Fu={$type:"RailroadOneOrMoreExpr",element:"element"},zu={$type:"RailroadOptionalExpr",element:"element"},gn={$type:"RailroadPeg",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};function zy(e){return Fe.isInstance(e,gn.$type)}i(zy,"isRailroadPeg");var Js={$type:"RailroadRule",definition:"definition",name:"name"},ju={$type:"RailroadSequenceExpr",elements:"elements"},Bu={$type:"RailroadSpecialExpr",text:"text"},Uu={$type:"RailroadTerminalExpr",value:"value"},Ku={$type:"RailroadZeroOrMoreExpr",element:"element"},xf={$type:"Section",classSelector:"classSelector",name:"name"},Ba={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},Gf={$type:"Size",height:"height",width:"width"},ln={$type:"Statement"},aa={$type:"Transition",from:"from",label:"label",to:"to"};function jy(e){return Fe.isInstance(e,aa.$type)}i(jy,"isTransition");var vn={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};function By(e){return Fe.isInstance(e,vn.$type)}i(By,"isTreemap");var Ff={$type:"TreemapRow",indent:"indent",item:"item"},un={$type:"TreeNode",classAnnotation:"classAnnotation",descAnnotation:"descAnnotation",iconAnnotation:"iconAnnotation",indent:"indent",name:"name"},Zn={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},He={$type:"Wardley",accDescr:"accDescr",accelerators:"accelerators",accTitle:"accTitle",anchors:"anchors",annotation:"annotation",annotations:"annotations",components:"components",deaccelerators:"deaccelerators",evolution:"evolution",evolves:"evolves",links:"links",notes:"notes",pipelines:"pipelines",size:"size",title:"title"};function Uy(e){return Fe.isInstance(e,He.$type)}i(Uy,"isWardley");var NI=class extends Kp{constructor(){super(...arguments);this.types={AbnfAlternation:{name:du.$type,properties:{alternatives:{name:du.alternatives,defaultValue:[]}},superTypes:[]},AbnfConcatenation:{name:pu.$type,properties:{elements:{name:pu.elements,defaultValue:[]}},superTypes:[]},AbnfElement:{name:Ks.$type,properties:{primary:{name:Ks.primary},repeat:{name:Ks.repeat}},superTypes:[]},AbnfGroup:{name:mu.$type,properties:{element:{name:mu.element}},superTypes:[sn.$type]},AbnfNumVal:{name:hu.$type,properties:{value:{name:hu.value}},superTypes:[sn.$type]},AbnfOptionalGroup:{name:yu.$type,properties:{element:{name:yu.element}},superTypes:[sn.$type]},AbnfPrimary:{name:sn.$type,properties:{},superTypes:[]},AbnfRule:{name:Vs.$type,properties:{definition:{name:Vs.definition},name:{name:Vs.name}},superTypes:[]},AbnfRuleName:{name:gu.$type,properties:{name:{name:gu.name}},superTypes:[sn.$type]},AbnfStringLiteral:{name:vu.$type,properties:{value:{name:vu.value}},superTypes:[sn.$type]},Accelerator:{name:Wo.$type,properties:{name:{name:Wo.name},x:{name:Wo.x},y:{name:Wo.y}},superTypes:[]},Alignment:{name:wf.$type,properties:{direction:{name:wf.direction},members:{name:wf.members,defaultValue:[]}},superTypes:[]},Anchor:{name:qo.$type,properties:{evolution:{name:qo.evolution},name:{name:qo.name},visibility:{name:qo.visibility}},superTypes:[]},Annotation:{name:ds.$type,properties:{number:{name:ds.number},text:{name:ds.text},x:{name:ds.x},y:{name:ds.y}},superTypes:[]},Annotations:{name:If.$type,properties:{x:{name:If.x},y:{name:If.y}},superTypes:[]},Architecture:{name:Lt.$type,properties:{accDescr:{name:Lt.accDescr},accTitle:{name:Lt.accTitle},alignments:{name:Lt.alignments,defaultValue:[]},edges:{name:Lt.edges,defaultValue:[]},groups:{name:Lt.groups,defaultValue:[]},junctions:{name:Lt.junctions,defaultValue:[]},services:{name:Lt.services,defaultValue:[]},title:{name:Lt.title}},superTypes:[]},Axis:{name:Ho.$type,properties:{label:{name:Ho.label},name:{name:Ho.name}},superTypes:[]},Branch:{name:vi.$type,properties:{name:{name:vi.name},order:{name:vi.order}},superTypes:[ln.$type]},Checkout:{name:gv.$type,properties:{branch:{name:gv.branch}},superTypes:[ln.$type]},CherryPicking:{name:Yo.$type,properties:{id:{name:Yo.id},parent:{name:Yo.parent},tags:{name:Yo.tags,defaultValue:[]}},superTypes:[ln.$type]},ClassDefStatement:{name:Nf.$type,properties:{className:{name:Nf.className},styleText:{name:Nf.styleText}},superTypes:[]},Commit:{name:cn.$type,properties:{id:{name:cn.id},message:{name:cn.message},tags:{name:cn.tags,defaultValue:[]},type:{name:cn.type}},superTypes:[ln.$type]},Common:{name:Xo.$type,properties:{accDescr:{name:Xo.accDescr},accTitle:{name:Xo.accTitle},title:{name:Xo.title}},superTypes:[]},Component:{name:Nn.$type,properties:{decorator:{name:Nn.decorator},evolution:{name:Nn.evolution},inertia:{name:Nn.inertia,defaultValue:!1},label:{name:Nn.label},name:{name:Nn.name},visibility:{name:Nn.visibility}},superTypes:[]},Curve:{name:Jo.$type,properties:{entries:{name:Jo.entries,defaultValue:[]},label:{name:Jo.label},name:{name:Jo.name}},superTypes:[]},Cynefin:{name:Or.$type,properties:{accDescr:{name:Or.accDescr},accTitle:{name:Or.accTitle},domains:{name:Or.domains,defaultValue:[]},title:{name:Or.title},transitions:{name:Or.transitions,defaultValue:[]}},superTypes:[]},Deaccelerator:{name:Zo.$type,properties:{name:{name:Zo.name},x:{name:Zo.x},y:{name:Zo.y}},superTypes:[]},Decorator:{name:vv.$type,properties:{strategy:{name:vv.strategy}},superTypes:[]},Direction:{name:ja.$type,properties:{accDescr:{name:ja.accDescr},accTitle:{name:ja.accTitle},dir:{name:ja.dir},statements:{name:ja.statements,defaultValue:[]},title:{name:ja.title}},superTypes:[Mr.$type]},DomainBlock:{name:Ti.$type,properties:{domain:{name:Ti.domain},items:{name:Ti.items,defaultValue:[]}},superTypes:[]},DomainItem:{name:yo.$type,properties:{label:{name:yo.label}},superTypes:[]},EbnfChoice:{name:Tu.$type,properties:{alternatives:{name:Tu.alternatives,defaultValue:[]}},superTypes:[]},EbnfExceptionPostfix:{name:$u.$type,properties:{except:{name:$u.except}},superTypes:[Xn.$type]},EbnfGroup:{name:Ru.$type,properties:{element:{name:Ru.element}},superTypes:[Nr.$type]},EbnfNonTerminal:{name:Au.$type,properties:{name:{name:Au.name}},superTypes:[Nr.$type]},EbnfOneOrMorePostfix:{name:Eu.$type,properties:{operator:{name:Eu.operator}},superTypes:[Xn.$type]},EbnfOptional:{name:Cu.$type,properties:{element:{name:Cu.element}},superTypes:[Nr.$type]},EbnfOptionalPostfix:{name:bu.$type,properties:{operator:{name:bu.operator}},superTypes:[Xn.$type]},EbnfPostfix:{name:Xn.$type,properties:{},superTypes:[]},EbnfPrimary:{name:Nr.$type,properties:{},superTypes:[]},EbnfRepetition:{name:_u.$type,properties:{element:{name:_u.element}},superTypes:[Nr.$type]},EbnfRule:{name:Ws.$type,properties:{definition:{name:Ws.definition},name:{name:Ws.name}},superTypes:[]},EbnfSequence:{name:Su.$type,properties:{elements:{name:Su.elements,defaultValue:[]}},superTypes:[]},EbnfSpecial:{name:wu.$type,properties:{text:{name:wu.text}},superTypes:[Nr.$type]},EbnfTerm:{name:qs.$type,properties:{base:{name:qs.base},postfixes:{name:qs.postfixes,defaultValue:[]}},superTypes:[]},EbnfTerminal:{name:Iu.$type,properties:{value:{name:Iu.value}},superTypes:[Nr.$type]},EbnfZeroOrMorePostfix:{name:Nu.$type,properties:{operator:{name:Nu.operator}},superTypes:[Xn.$type]},Edge:{name:ur.$type,properties:{lhsDir:{name:ur.lhsDir},lhsGroup:{name:ur.lhsGroup,defaultValue:!1},lhsId:{name:ur.lhsId},lhsInto:{name:ur.lhsInto,defaultValue:!1},rhsDir:{name:ur.rhsDir},rhsGroup:{name:ur.rhsGroup,defaultValue:!1},rhsId:{name:ur.rhsId},rhsInto:{name:ur.rhsInto,defaultValue:!1},title:{name:ur.title}},superTypes:[]},EmDataEntity:{name:on.$type,properties:{dataBlockValue:{name:on.dataBlockValue},dataType:{name:on.dataType},name:{name:on.name}},superTypes:[]},EmFrame:{name:Pr.$type,properties:{},superTypes:[]},EmGwt:{name:ps.$type,properties:{givenStatements:{name:ps.givenStatements,defaultValue:[]},sourceFrame:{name:ps.sourceFrame,referenceType:Pr.$type},thenStatements:{name:ps.thenStatements,defaultValue:[]},whenStatements:{name:ps.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:Tv.$type,properties:{entityIdentifier:{name:Tv.entityIdentifier,referenceType:Pf.$type}},superTypes:[]},EmModelEntity:{name:Pf.$type,properties:{name:{name:Pf.name}},superTypes:[]},EmNoteEntity:{name:Qo.$type,properties:{dataBlockValue:{name:Qo.dataBlockValue},dataType:{name:Qo.dataType},sourceFrame:{name:Qo.sourceFrame,referenceType:Pr.$type}},superTypes:[]},EmResetFrame:{name:Sr.$type,properties:{dataInlineValue:{name:Sr.dataInlineValue},dataReference:{name:Sr.dataReference,referenceType:on.$type},dataType:{name:Sr.dataType},entityIdentifier:{name:Sr.entityIdentifier},modelEntityType:{name:Sr.modelEntityType},name:{name:Sr.name},sourceFrames:{name:Sr.sourceFrames,defaultValue:[],referenceType:Pr.$type}},superTypes:[Pr.$type]},EmTimeFrame:{name:Qr.$type,properties:{dataInlineValue:{name:Qr.dataInlineValue},dataReference:{name:Qr.dataReference,referenceType:on.$type},dataType:{name:Qr.dataType},entityIdentifier:{name:Qr.entityIdentifier},modelEntityType:{name:Qr.modelEntityType},name:{name:Qr.name},sourceFrames:{name:Qr.sourceFrames,defaultValue:[],referenceType:Pr.$type}},superTypes:[Pr.$type]},Entry:{name:kf.$type,properties:{axis:{name:kf.axis,referenceType:Ho.$type},value:{name:kf.value}},superTypes:[]},EventModel:{name:Kt.$type,properties:{accDescr:{name:Kt.accDescr},accTitle:{name:Kt.accTitle},dataEntities:{name:Kt.dataEntities,defaultValue:[]},frames:{name:Kt.frames,defaultValue:[]},gwtEntities:{name:Kt.gwtEntities,defaultValue:[]},modelEntities:{name:Kt.modelEntities,defaultValue:[]},noteEntities:{name:Kt.noteEntities,defaultValue:[]},title:{name:Kt.title}},superTypes:[]},Evolution:{name:$v.$type,properties:{stages:{name:$v.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:el.$type,properties:{boundary:{name:el.boundary},name:{name:el.name},secondName:{name:el.secondName}},superTypes:[]},Evolve:{name:Of.$type,properties:{component:{name:Of.component},target:{name:Of.target}},superTypes:[]},GitGraph:{name:Mr.$type,properties:{accDescr:{name:Mr.accDescr},accTitle:{name:Mr.accTitle},statements:{name:Mr.statements,defaultValue:[]},title:{name:Mr.title}},superTypes:[]},Group:{name:ms.$type,properties:{icon:{name:ms.icon},id:{name:ms.id},in:{name:ms.in},title:{name:ms.title}},superTypes:[]},Info:{name:na.$type,properties:{accDescr:{name:na.accDescr},accTitle:{name:na.accTitle},title:{name:na.title}},superTypes:[]},Item:{name:hs.$type,properties:{classSelector:{name:hs.classSelector},name:{name:hs.name}},superTypes:[]},Junction:{name:Lf.$type,properties:{id:{name:Lf.id},in:{name:Lf.in}},superTypes:[]},Label:{name:ys.$type,properties:{negX:{name:ys.negX,defaultValue:!1},negY:{name:ys.negY,defaultValue:!1},offsetX:{name:ys.offsetX},offsetY:{name:ys.offsetY}},superTypes:[]},Leaf:{name:tl.$type,properties:{classSelector:{name:tl.classSelector},name:{name:tl.name},value:{name:tl.value}},superTypes:[hs.$type]},Link:{name:Pn.$type,properties:{arrow:{name:Pn.arrow},from:{name:Pn.from},fromPort:{name:Pn.fromPort},linkLabel:{name:Pn.linkLabel},to:{name:Pn.to},toPort:{name:Pn.toPort}},superTypes:[]},Merge:{name:fn.$type,properties:{branch:{name:fn.branch},id:{name:fn.id},tags:{name:fn.tags,defaultValue:[]},type:{name:fn.type}},superTypes:[ln.$type]},Note:{name:rl.$type,properties:{evolution:{name:rl.evolution},text:{name:rl.text},visibility:{name:rl.visibility}},superTypes:[]},Option:{name:Mf.$type,properties:{name:{name:Mf.name},value:{name:Mf.value,defaultValue:!1}},superTypes:[]},Packet:{name:dn.$type,properties:{accDescr:{name:dn.accDescr},accTitle:{name:dn.accTitle},blocks:{name:dn.blocks,defaultValue:[]},title:{name:dn.title}},superTypes:[]},PacketBlock:{name:pn.$type,properties:{bits:{name:pn.bits},end:{name:pn.end},label:{name:pn.label},start:{name:pn.start}},superTypes:[]},PegAny:{name:Pu.$type,properties:{dot:{name:Pu.dot}},superTypes:[Jn.$type]},PegGroup:{name:ku.$type,properties:{element:{name:ku.element}},superTypes:[Jn.$type]},PegIdentifier:{name:Ou.$type,properties:{name:{name:Ou.name}},superTypes:[Jn.$type]},PegLiteral:{name:Lu.$type,properties:{value:{name:Lu.value}},superTypes:[Jn.$type]},PegOrderedChoice:{name:Mu.$type,properties:{alternatives:{name:Mu.alternatives,defaultValue:[]}},superTypes:[]},PegPrefix:{name:Hs.$type,properties:{operator:{name:Hs.operator},suffix:{name:Hs.suffix}},superTypes:[]},PegPrimary:{name:Jn.$type,properties:{},superTypes:[]},PegRule:{name:Ys.$type,properties:{definition:{name:Ys.definition},name:{name:Ys.name}},superTypes:[]},PegSequence:{name:Du.$type,properties:{elements:{name:Du.elements,defaultValue:[]}},superTypes:[]},PegSuffix:{name:Xs.$type,properties:{operator:{name:Xs.operator},primary:{name:Xs.primary}},superTypes:[]},Pie:{name:Dr.$type,properties:{accDescr:{name:Dr.accDescr},accTitle:{name:Dr.accTitle},sections:{name:Dr.sections,defaultValue:[]},showData:{name:Dr.showData,defaultValue:!1},title:{name:Dr.title}},superTypes:[]},PieSection:{name:$i.$type,properties:{label:{name:$i.label},value:{name:$i.value}},superTypes:[]},Pipeline:{name:Df.$type,properties:{components:{name:Df.components,defaultValue:[]},parent:{name:Df.parent}},superTypes:[]},PipelineComponent:{name:nl.$type,properties:{evolution:{name:nl.evolution},label:{name:nl.label},name:{name:nl.name}},superTypes:[]},Radar:{name:kr.$type,properties:{accDescr:{name:kr.accDescr},accTitle:{name:kr.accTitle},axes:{name:kr.axes,defaultValue:[]},curves:{name:kr.curves,defaultValue:[]},options:{name:kr.options,defaultValue:[]},title:{name:kr.title}},superTypes:[]},Railroad:{name:mn.$type,properties:{accDescr:{name:mn.accDescr},accTitle:{name:mn.accTitle},rules:{name:mn.rules,defaultValue:[]},title:{name:mn.title}},superTypes:[]},RailroadAbnf:{name:hn.$type,properties:{accDescr:{name:hn.accDescr},accTitle:{name:hn.accTitle},rules:{name:hn.rules,defaultValue:[]},title:{name:hn.title}},superTypes:[]},RailroadChoiceExpr:{name:xu.$type,properties:{alternatives:{name:xu.alternatives,defaultValue:[]}},superTypes:[Vt.$type]},RailroadEbnf:{name:yn.$type,properties:{accDescr:{name:yn.accDescr},accTitle:{name:yn.accTitle},rules:{name:yn.rules,defaultValue:[]},title:{name:yn.title}},superTypes:[]},RailroadExpression:{name:Vt.$type,properties:{},superTypes:[]},RailroadNonTerminalExpr:{name:Gu.$type,properties:{name:{name:Gu.name}},superTypes:[Vt.$type]},RailroadOneOrMoreExpr:{name:Fu.$type,properties:{element:{name:Fu.element}},superTypes:[Vt.$type]},RailroadOptionalExpr:{name:zu.$type,properties:{element:{name:zu.element}},superTypes:[Vt.$type]},RailroadPeg:{name:gn.$type,properties:{accDescr:{name:gn.accDescr},accTitle:{name:gn.accTitle},rules:{name:gn.rules,defaultValue:[]},title:{name:gn.title}},superTypes:[]},RailroadRule:{name:Js.$type,properties:{definition:{name:Js.definition},name:{name:Js.name}},superTypes:[]},RailroadSequenceExpr:{name:ju.$type,properties:{elements:{name:ju.elements,defaultValue:[]}},superTypes:[Vt.$type]},RailroadSpecialExpr:{name:Bu.$type,properties:{text:{name:Bu.text}},superTypes:[Vt.$type]},RailroadTerminalExpr:{name:Uu.$type,properties:{value:{name:Uu.value}},superTypes:[Vt.$type]},RailroadZeroOrMoreExpr:{name:Ku.$type,properties:{element:{name:Ku.element}},superTypes:[Vt.$type]},Section:{name:xf.$type,properties:{classSelector:{name:xf.classSelector},name:{name:xf.name}},superTypes:[hs.$type]},Service:{name:Ba.$type,properties:{icon:{name:Ba.icon},iconText:{name:Ba.iconText},id:{name:Ba.id},in:{name:Ba.in},title:{name:Ba.title}},superTypes:[]},Size:{name:Gf.$type,properties:{height:{name:Gf.height},width:{name:Gf.width}},superTypes:[]},Statement:{name:ln.$type,properties:{},superTypes:[]},Transition:{name:aa.$type,properties:{from:{name:aa.from},label:{name:aa.label},to:{name:aa.to}},superTypes:[]},TreeNode:{name:un.$type,properties:{classAnnotation:{name:un.classAnnotation},descAnnotation:{name:un.descAnnotation},iconAnnotation:{name:un.iconAnnotation},indent:{name:un.indent},name:{name:un.name}},superTypes:[]},TreeView:{name:Zn.$type,properties:{accDescr:{name:Zn.accDescr},accTitle:{name:Zn.accTitle},nodes:{name:Zn.nodes,defaultValue:[]},title:{name:Zn.title}},superTypes:[]},Treemap:{name:vn.$type,properties:{accDescr:{name:vn.accDescr},accTitle:{name:vn.accTitle},title:{name:vn.title},TreemapRows:{name:vn.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:Ff.$type,properties:{indent:{name:Ff.indent},item:{name:Ff.item}},superTypes:[]},Wardley:{name:He.$type,properties:{accDescr:{name:He.accDescr},accelerators:{name:He.accelerators,defaultValue:[]},accTitle:{name:He.accTitle},anchors:{name:He.anchors,defaultValue:[]},annotation:{name:He.annotation,defaultValue:[]},annotations:{name:He.annotations,defaultValue:[]},components:{name:He.components,defaultValue:[]},deaccelerators:{name:He.deaccelerators,defaultValue:[]},evolution:{name:He.evolution},evolves:{name:He.evolves,defaultValue:[]},links:{name:He.links,defaultValue:[]},notes:{name:He.notes,defaultValue:[]},pipelines:{name:He.pipelines,defaultValue:[]},size:{name:He.size},title:{name:He.title}},superTypes:[]}}}static{i(this,"MermaidAstReflection")}},Fe=new NI,Rv,$z=i(()=>Rv??(Rv=et('{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"alignments","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Alignment","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"align"},{"$type":"Assignment","feature":"direction","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"row"},{"$type":"Keyword","value":"column"}]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@20"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"ArchitectureGrammarGrammar"),Av,Rz=i(()=>Av??(Av=et('{"$type":"Grammar","isDeclared":true,"name":"CynefinGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Cynefin","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"cynefin-beta"},{"$type":"Keyword","value":"cynefin-beta:"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"domains","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"transitions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"domain","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Assignment","feature":"items","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainItem","definition":{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Transition","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":"-->"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"DOMAIN_NAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complex"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complicated"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"clear"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"chaotic"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"confusion"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"CynefinGrammarGrammar"),Ev,Az=i(()=>Ev??(Ev=et('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}')),"EventModelingGrammar"),Cv,Ez=i(()=>Cv??(Cv=et('{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"GitGraphGrammarGrammar"),bv,Cz=i(()=>bv??(bv=et('{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"InfoGrammarGrammar"),_v,bz=i(()=>_v??(_v=et('{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PacketGrammarGrammar"),Sv,_z=i(()=>Sv??(Sv=et('{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PieGrammarGrammar"),wv,Sz=i(()=>wv??(wv=et('{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}')),"RadarGrammarGrammar"),Iv,wz=i(()=>Iv??(Iv=et('{"$type":"Grammar","isDeclared":true,"name":"RailroadAbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_RULENAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Za-z][A-Za-z0-9-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_NUMVAL","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\\\\.[0-9A-Fa-f]+)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]*\\\\*[0-9]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_EXACT_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_COMMENT","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadAbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-abnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfAlternation","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfConcatenation","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfElement","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfStringLiteral","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfNumVal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRuleName","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfOptionalGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadAbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfAlternation","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfConcatenation","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfElement","attributes":[{"$type":"TypeAttribute","name":"repeat","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"AbnfStringLiteral","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfNumVal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfRuleName","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"AbnfOptionalGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadAbnfGrammarGrammar");var Nv,Iz=i(()=>Nv??(Nv=et('{"$type":"Grammar","isDeclared":true,"name":"RailroadEbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_SPECIAL_SEQUENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\?(?=[^?;]*[^?\\\\s;][^?;]*\\\\?)[^?;]*\\\\?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_ISO_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\(\\\\*[\\\\s\\\\S]*?\\\\*\\\\)/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadEbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-ebnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"="},{"$type":"Keyword","value":"::="}]},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"|"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":",","cardinality":"?"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerm","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"base","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"postfixes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerminal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfNonTerminal","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSpecial","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptional","returnType":{"$ref":"#/interfaces@11"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRepetition","returnType":{"$ref":"#/interfaces@12"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPostfix","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptionalPostfix","returnType":{"$ref":"#/interfaces@13"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfZeroOrMorePostfix","returnType":{"$ref":"#/interfaces@14"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOneOrMorePostfix","returnType":{"$ref":"#/interfaces@15"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfExceptionPostfix","returnType":{"$ref":"#/interfaces@16"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"except","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadEbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfTerm","attributes":[{"$type":"TypeAttribute","name":"base","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false},{"$type":"TypeAttribute","name":"postfixes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfPostfix","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfNonTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfSpecial","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptional","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfRepetition","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptionalPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfZeroOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfOneOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfExceptionPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"except","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadEbnfGrammarGrammar"),Pv,Nz=i(()=>Pv??(Pv=et('{"$type":"Grammar","isDeclared":true,"name":"RailroadGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"RR_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Railroad","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadExpression","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSequenceExpr","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"sequence"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadChoiceExpr","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"choice"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOptionalExpr","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"optional"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOneOrMoreExpr","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"oneOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadZeroOrMoreExpr","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"zeroOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadTerminalExpr","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"terminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadNonTerminalExpr","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"nonterminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSpecialExpr","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"special"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"Railroad","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadExpression","attributes":[],"superTypes":[]},{"$type":"Interface","name":"RailroadSequenceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadChoiceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOptionalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOneOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadZeroOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadNonTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadSpecialExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadGrammarGrammar"),kv,Pz=i(()=>kv??(kv=et('{"$type":"Grammar","isDeclared":true,"name":"RailroadPegGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/#[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadPeg","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-peg-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"<-"},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegOrderedChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrefix","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"&"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"!"}}],"cardinality":"?"},{"$type":"Assignment","feature":"suffix","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSuffix","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrimary","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegLiteral","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegIdentifier","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegAny","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Assignment","feature":"dot","operator":"=","terminal":{"$type":"Keyword","value":"."}},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadPeg","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegOrderedChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegPrefix","attributes":[{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"suffix","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSuffix","attributes":[{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}},"isOptional":false},{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"PegPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"PegLiteral","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegIdentifier","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegGroup","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"PegAny","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"dot","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadPegGrammarGrammar"),Ov,kz=i(()=>Ov??(Ov=et('{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}')),"TreemapGrammarGrammar"),Lv,Oz=i(()=>Lv??(Lv=et('{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"CLASS_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+:::[ \\\\t]*[A-Za-z_][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ICON_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+icon\\\\([\\\\w-]*(?::[\\\\w-]+)?\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"DESC_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+##[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"QUOTED_NAME","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"BARE_NAME","definition":{"$type":"RegexToken","regex":"/(?!:::|icon\\\\(|##)[^ \\\\t\\\\n\\\\r\\"\'](?:(?![ \\\\t]+:::[ \\\\t]*[A-Za-z_]|[ \\\\t]+icon\\\\(|[ \\\\t]+##)[^\\\\n\\\\r])*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"classAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"iconAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"descAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n *\\n * Supports both quoted labels (\\"my file\\") and bare labels (index.js).\\n * Annotations (:::class, icon(), ## description) are parsed directly into\\n * AST fields by the grammar. Value conversion for stripping quotes, extracting\\n * class names, icon names, and description text happens in valueConverter.ts.\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treeView keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}')),"TreeViewGrammarGrammar"),Mv,Lz=i(()=>Mv??(Mv=et('{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+\'[^\']*\'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+\'[^\']*\'</","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+\'[^\']*\'>/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"WardleyGrammarGrammar"),Mz={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Dz={languageId:"cynefin",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},xz={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Gz={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Fz={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},zz={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},jz={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Bz={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Uz={languageId:"railroadAbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Kz={languageId:"railroadEbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Vz={languageId:"railroad",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Wz={languageId:"railroadPeg",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},qz={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Hz={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Yz={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ue={AstReflection:i(()=>new NI,"AstReflection")},tf={Grammar:i(()=>$z(),"Grammar"),LanguageMetaData:i(()=>Mz,"LanguageMetaData"),parser:{}},rf={Grammar:i(()=>Rz(),"Grammar"),LanguageMetaData:i(()=>Dz,"LanguageMetaData"),parser:{}},nf={Grammar:i(()=>Az(),"Grammar"),LanguageMetaData:i(()=>xz,"LanguageMetaData"),parser:{}},af={Grammar:i(()=>Ez(),"Grammar"),LanguageMetaData:i(()=>Gz,"LanguageMetaData"),parser:{}},sf={Grammar:i(()=>Cz(),"Grammar"),LanguageMetaData:i(()=>Fz,"LanguageMetaData"),parser:{}},of={Grammar:i(()=>bz(),"Grammar"),LanguageMetaData:i(()=>zz,"LanguageMetaData"),parser:{}},lf={Grammar:i(()=>_z(),"Grammar"),LanguageMetaData:i(()=>jz,"LanguageMetaData"),parser:{}},uf={Grammar:i(()=>Sz(),"Grammar"),LanguageMetaData:i(()=>Bz,"LanguageMetaData"),parser:{}},cf={Grammar:i(()=>wz(),"Grammar"),LanguageMetaData:i(()=>Uz,"LanguageMetaData"),parser:{}},ff={Grammar:i(()=>Iz(),"Grammar"),LanguageMetaData:i(()=>Kz,"LanguageMetaData"),parser:{}},df={Grammar:i(()=>Nz(),"Grammar"),LanguageMetaData:i(()=>Vz,"LanguageMetaData"),parser:{}},pf={Grammar:i(()=>Pz(),"Grammar"),LanguageMetaData:i(()=>Wz,"LanguageMetaData"),parser:{}},mf={Grammar:i(()=>kz(),"Grammar"),LanguageMetaData:i(()=>qz,"LanguageMetaData"),parser:{}},hf={Grammar:i(()=>Oz(),"Grammar"),LanguageMetaData:i(()=>Hz,"LanguageMetaData"),parser:{}},yf={Grammar:i(()=>Lz(),"Grammar"),LanguageMetaData:i(()=>Yz,"LanguageMetaData"),parser:{}},Xz=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,Jz=/accTitle[\t ]*:([^\n\r]*)/,Zz=/title([\t ][^\n\r]*|)/,Qz={ACC_DESCR:Xz,ACC_TITLE:Jz,TITLE:Zz},ze=class extends ty{static{i(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){let n=this.runCommonConverter(e,t,r);if(n===void 0)n=this.runCustomConverter(e,t,r);if(n===void 0)return super.runConverter(e,t,r);return n}runCommonConverter(e,t,r){let n=Qz[e.name];if(n===void 0)return;let a=n.exec(t);if(a===null)return;if(a[1]!==void 0)return a[1].trim().replace(/[\t ]{2,}/gm," ");if(a[2]!==void 0)return a[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,`
|
|
161
|
+
`);return}},bt=class extends ze{static{i(this,"CommonValueConverter")}runCustomConverter(e,t,r){return}},pe=class extends Wc{static{i(this,"AbstractMermaidTokenBuilder")}constructor(e){super();this.keywords=new Set(e)}buildKeywordTokens(e,t,r){let n=super.buildKeywordTokens(e,t,r);return n.forEach((a)=>{if(this.keywords.has(a.name)&&a.PATTERN!==void 0)a.PATTERN=new RegExp(a.PATTERN.toString()+"(?:(?=%%)|(?!\\S))")}),n}},PI=class extends pe{static{i(this,"CommonTokenBuilder")}};/*! Bundled license information:
|
|
162
|
+
|
|
163
|
+
lodash-es/lodash.js:
|
|
164
|
+
(**
|
|
165
|
+
* @license
|
|
166
|
+
* Lodash (Custom Build) <https://lodash.com/>
|
|
167
|
+
* Build: `lodash modularize exports="es" -o ./`
|
|
168
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
169
|
+
* Released under MIT license <https://lodash.com/license>
|
|
170
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
171
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
172
|
+
*)
|
|
173
|
+
*/var ej=class extends pe{static{i(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},kI={parser:{TokenBuilder:i(()=>new ej,"TokenBuilder"),ValueConverter:i(()=>new bt,"ValueConverter")}};function ei(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),uf,kI);return t.ServiceRegistry.register(r),{shared:t,Radar:r}}i(ei,"createRadarServices");var tj=class extends pe{static{i(this,"RailroadTokenBuilder")}constructor(){super(["railroad-beta"])}},OI=i((e)=>{let t=e.slice(1,-1),r="";for(let n=0;n<t.length;n++){let a=t[n];if(a==="\\"&&n+1<t.length){n++;let s=t[n];switch(s){case"n":r+=`
|
|
174
|
+
`;break;case"r":r+="\r";break;case"t":r+="\t";break;default:r+=s}continue}r+=a}return r},"decodeEscapedString"),rj=class extends ze{static{i(this,"RailroadValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n==="string"){let a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return OI(a)}return n}runCustomConverter(e,t,r){if(e.name==="RR_STRING")return OI(t);return}},LI={parser:{TokenBuilder:i(()=>new tj,"TokenBuilder"),ValueConverter:i(()=>new rj,"ValueConverter")}};function Zt(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),df,LI);return t.ServiceRegistry.register(r),{shared:t,Railroad:r}}i(Zt,"createRailroadServices");var nj=class extends pe{static{i(this,"RailroadEbnfTokenBuilder")}constructor(){super(["railroad-ebnf-beta"])}},MI=i((e)=>{let t=e.slice(1,-1),r="";for(let n=0;n<t.length;n++){let a=t[n];if(a==="\\"&&n+1<t.length){n++;let s=t[n];switch(s){case"n":r+=`
|
|
175
|
+
`;break;case"r":r+="\r";break;case"t":r+="\t";break;default:r+=s}continue}r+=a}return r},"decodeEscapedString"),aj=class extends ze{static{i(this,"RailroadEbnfValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n==="string"){let a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return MI(a)}return n}runCustomConverter(e,t,r){if(e.name==="EBNF_STRING")return MI(t);if(e.name==="EBNF_SPECIAL_SEQUENCE")return t.slice(1,-1).trim();return}},DI={parser:{TokenBuilder:i(()=>new nj,"TokenBuilder"),ValueConverter:i(()=>new aj,"ValueConverter")}};function Jt(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),ff,DI);return t.ServiceRegistry.register(r),{shared:t,RailroadEbnf:r}}i(Jt,"createRailroadEbnfServices");var ij=class extends pe{static{i(this,"RailroadAbnfTokenBuilder")}constructor(){super(["railroad-abnf-beta"])}},sj=class extends ze{static{i(this,"RailroadAbnfValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n==="string"){let a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return a.slice(1,-1)}return n}runCustomConverter(e,t,r){if(e.name==="ABNF_STRING")return t.slice(1,-1);return}},xI={parser:{TokenBuilder:i(()=>new ij,"TokenBuilder"),ValueConverter:i(()=>new sj,"ValueConverter")}};function Qt(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),cf,xI);return t.ServiceRegistry.register(r),{shared:t,RailroadAbnf:r}}i(Qt,"createRailroadAbnfServices");var oj=class extends pe{static{i(this,"RailroadPegTokenBuilder")}constructor(){super(["railroad-peg-beta"])}},GI=i((e)=>{let t=e.slice(1,-1),r="";for(let n=0;n<t.length;n++){let a=t[n];if(a==="\\"&&n+1<t.length){n++;let s=t[n];switch(s){case"n":r+=`
|
|
176
|
+
`;break;case"r":r+="\r";break;case"t":r+="\t";break;default:r+=s}continue}r+=a}return r},"decodeEscapedString"),lj=class extends ze{static{i(this,"RailroadPegValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n==="string"){let a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return GI(a)}return n}runCustomConverter(e,t,r){if(e.name==="PEG_STRING")return GI(t);return}},FI={parser:{TokenBuilder:i(()=>new oj,"TokenBuilder"),ValueConverter:i(()=>new lj,"ValueConverter")}};function er(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),pf,FI);return t.ServiceRegistry.register(r),{shared:t,RailroadPeg:r}}i(er,"createRailroadPegServices");var uj=class extends pe{static{i(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},cj=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,fj=class extends ze{static{i(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if(e.name==="NUMBER2")return parseFloat(t.replace(/,/g,""));else if(e.name==="SEPARATOR")return t.substring(1,t.length-1);else if(e.name==="STRING2")return t.substring(1,t.length-1);else if(e.name==="INDENTATION")return t.length;else if(e.name==="ClassDef"){if(typeof t!=="string")return t;let n=cj.exec(t);if(n)return{$type:"ClassDefStatement",className:n[1],styleText:n[2]||void 0}}return}};function zI(e){let t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){let n={Treemap:t.checkSingleRoot.bind(t)};r.register(n,t)}}i(zI,"registerValidationChecks");var dj=class{static{i(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(let n of e.TreemapRows){if(!n.item)continue;if(r===void 0&&n.indent===void 0)r=0;else if(n.indent===void 0)t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"});else if(r!==void 0&&r>=parseInt(n.indent,10))t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"})}}},jI={parser:{TokenBuilder:i(()=>new uj,"TokenBuilder"),ValueConverter:i(()=>new fj,"ValueConverter")},validation:{TreemapValidator:i(()=>new dj,"TreemapValidator")}};function ti(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),mf,jI);return t.ServiceRegistry.register(r),zI(r),{shared:t,Treemap:r}}i(ti,"createTreemapServices");var pj=class extends ze{static{i(this,"WardleyValueConverter")}runCustomConverter(e,t,r){switch(e.name.toUpperCase()){case"LINK_LABEL":return t.substring(1).trim();default:return}}},BI={parser:{ValueConverter:i(()=>new pj,"ValueConverter")}};function ri(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),yf,BI);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}i(ri,"createWardleyServices");var mj=class extends pe{static{i(this,"CynefinTokenBuilder")}constructor(){super(["cynefin-beta"])}},UI={parser:{TokenBuilder:i(()=>new mj,"TokenBuilder"),ValueConverter:i(()=>new bt,"ValueConverter")}};function ni(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),rf,UI);return t.ServiceRegistry.register(r),{shared:t,Cynefin:r}}i(ni,"createCynefinServices");var hj=class extends pe{static{i(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},KI={parser:{TokenBuilder:i(()=>new hj,"TokenBuilder"),ValueConverter:i(()=>new bt,"ValueConverter")}};function ii(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),af,KI);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}i(ii,"createGitGraphServices");var yj=class extends pe{static{i(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},VI={parser:{TokenBuilder:i(()=>new yj,"TokenBuilder"),ValueConverter:i(()=>new bt,"ValueConverter")}};function ai(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),sf,VI);return t.ServiceRegistry.register(r),{shared:t,Info:r}}i(ai,"createInfoServices");var gj=class extends pe{static{i(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},WI={parser:{TokenBuilder:i(()=>new gj,"TokenBuilder"),ValueConverter:i(()=>new bt,"ValueConverter")}};function si(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),of,WI);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}i(si,"createPacketServices");var vj=class extends pe{static{i(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},Tj=class extends ze{static{i(this,"PieValueConverter")}runCustomConverter(e,t,r){if(e.name!=="PIE_SECTION_LABEL")return;return t.replace(/"/g,"").trim()}},qI={parser:{TokenBuilder:i(()=>new vj,"TokenBuilder"),ValueConverter:i(()=>new Tj,"ValueConverter")}};function oi(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),lf,qI);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}i(oi,"createPieServices");var $j=class extends ze{static{i(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){if(e.name==="INDENTATION")return t?.length||0;if(e.name==="QUOTED_NAME")return t.substring(1,t.length-1);if(e.name==="BARE_NAME")return t.replace(/[\t ]+$/,"");if(e.name==="CLASS_ANNOTATION")return t.trim().substring(3).trim();if(e.name==="ICON_ANNOTATION"){let n=t.trim();return n.substring(5,n.length-1)}if(e.name==="DESC_ANNOTATION")return t.trim().substring(2).trim();return}},Rj=class extends pe{static{i(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},HI={parser:{TokenBuilder:i(()=>new Rj,"TokenBuilder"),ValueConverter:i(()=>new $j,"ValueConverter")}};function li(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),hf,HI);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}i(li,"createTreeViewServices");var Aj=class extends pe{static{i(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},Ej=class extends ze{static{i(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();else if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");else if(e.name==="ARCH_TITLE"){let n=t.replace(/^\[|]$/g,"").trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))n=n.slice(1,-1),n=n.replace(/\\"/g,'"').replace(/\\'/g,"'");return n.trim()}return}},YI={parser:{TokenBuilder:i(()=>new Aj,"TokenBuilder"),ValueConverter:i(()=>new Ej,"ValueConverter")}};function ci(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),tf,YI);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}i(ci,"createArchitectureServices");var Cj=class extends pe{static{i(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},XI=new Set(["cmd","command"]),JI=new Set(["evt","event"]),Ky=new Set(["rmo","readmodel"]),ZI=new Set(["pcr","processor"]),QI=new Set(["ui"]);function eN(e){let t=e.validation.EventModelingValidator,r=e.validation.ValidationRegistry;if(r){let n={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};r.register(n,t)}}i(eN,"registerValidationChecks");var bj=class{static{i(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){if(e.sourceFrames.length===0)return;if(XI.has(e.modelEntityType))this.validateSources(e,new Set([...QI,...ZI]),"command","ui or processor",t);else if(JI.has(e.modelEntityType))this.validateSources(e,XI,"event","command",t);else if(Ky.has(e.modelEntityType))this.validateSources(e,JI,"read model","event",t);else if(ZI.has(e.modelEntityType))this.validateSources(e,Ky,"processor","read model",t);else if(QI.has(e.modelEntityType))this.validateSources(e,Ky,"ui","read model",t)}validateSources(e,t,r,n,a){for(let s of e.sourceFrames){let o=s.ref;if(o!==void 0&&!t.has(o.modelEntityType))a("error",`A ${r} can only receive input from a ${n}, not from '${o.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},tN={parser:{TokenBuilder:i(()=>new Cj,"TokenBuilder"),ValueConverter:i(()=>new bt,"ValueConverter")},validation:{EventModelingValidator:i(()=>new bj,"EventModelingValidator")}};function ui(e=le){let t=W(ie(e),ue),r=W(ae({shared:t}),nf,tN);return t.ServiceRegistry.register(r),eN(r),{shared:t,EventModel:r}}i(ui,"createEventModelingServices");var it={},_j={info:i(async()=>{let{createInfoServices:e}=await (T("wpzs6sz3"),import("./info-DKCQHKI2-wpzs6sz3.js")),t=e().Info.parser.LangiumParser;it.info=t},"info"),packet:i(async()=>{let{createPacketServices:e}=await (T("xn439f0s"),import("./packet-7NZHBO7P-xn439f0s.js")),t=e().Packet.parser.LangiumParser;it.packet=t},"packet"),pie:i(async()=>{let{createPieServices:e}=await (T("0kf16rwh"),import("./pie-RZYD4A2V-0kf16rwh.js")),t=e().Pie.parser.LangiumParser;it.pie=t},"pie"),treeView:i(async()=>{let{createTreeViewServices:e}=await (T("cesw6gp0"),import("./treeView-QDETBFTQ-cesw6gp0.js")),t=e().TreeView.parser.LangiumParser;it.treeView=t},"treeView"),architecture:i(async()=>{let{createArchitectureServices:e}=await (T("9tffvpsv"),import("./architecture-TIHT7OUA-9tffvpsv.js")),t=e().Architecture.parser.LangiumParser;it.architecture=t},"architecture"),gitGraph:i(async()=>{let{createGitGraphServices:e}=await (T("kdwb8m0a"),import("./gitGraph-TEB2WS4Q-kdwb8m0a.js")),t=e().GitGraph.parser.LangiumParser;it.gitGraph=t},"gitGraph"),eventmodeling:i(async()=>{let{createEventModelingServices:e}=await (T("v9q6dn4c"),import("./eventmodeling-45OFAUF4-v9q6dn4c.js")),t=e().EventModel.parser.LangiumParser;it.eventmodeling=t},"eventmodeling"),radar:i(async()=>{let{createRadarServices:e}=await (T("0g2pz36t"),import("./radar-I7S5WNFK-0g2pz36t.js")),t=e().Radar.parser.LangiumParser;it.radar=t},"radar"),railroad:i(async()=>{let{createRailroadServices:e}=await (T("fcaran6j"),import("./railroad-3IZDKUUU-fcaran6j.js")),t=e().Railroad.parser.LangiumParser;it.railroad=t},"railroad"),railroadEbnf:i(async()=>{let{createRailroadEbnfServices:e}=await (T("gy07a4ka"),import("./railroad-ebnf-EBAXGLYW-gy07a4ka.js")),t=e().RailroadEbnf.parser.LangiumParser;it.railroadEbnf=t},"railroadEbnf"),railroadAbnf:i(async()=>{let{createRailroadAbnfServices:e}=await (T("wgdya41q"),import("./railroad-abnf-AHOZXSZD-wgdya41q.js")),t=e().RailroadAbnf.parser.LangiumParser;it.railroadAbnf=t},"railroadAbnf"),railroadPeg:i(async()=>{let{createRailroadPegServices:e}=await (T("ewk6wtkh"),import("./railroad-peg-LSFZ7HO6-ewk6wtkh.js")),t=e().RailroadPeg.parser.LangiumParser;it.railroadPeg=t},"railroadPeg"),treemap:i(async()=>{let{createTreemapServices:e}=await (T("zdv4knp9"),import("./treemap-6X3UGDF4-zdv4knp9.js")),t=e().Treemap.parser.LangiumParser;it.treemap=t},"treemap"),wardley:i(async()=>{let{createWardleyServices:e}=await (T("44pdddez"),import("./wardley-OPB4EBWU-44pdddez.js")),t=e().Wardley.parser.LangiumParser;it.wardley=t},"wardley"),cynefin:i(async()=>{let{createCynefinServices:e}=await (T("ys8p46ts"),import("./cynefin-VYW2F7L2-ys8p46ts.js")),t=e().Cynefin.parser.LangiumParser;it.cynefin=t},"cynefin")};async function D(e,t){let r=_j[e];if(!r)throw Error(`Unknown diagram type: ${e}`);if(!it[e])await r();let a=it[e].parse(t);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new Pe(a);return a.value}i(D,"parse");var Pe=class extends Error{constructor(e){let t=e.lexerErrors.map((n)=>{let a=n.line!==void 0&&!isNaN(n.line)?n.line:"?",s=n.column!==void 0&&!isNaN(n.column)?n.column:"?";return`Lexer error on line ${a}, column ${s}: ${n.message}`}).join(`
|
|
177
|
+
`),r=e.parserErrors.map((n)=>{let a=n.token.startLine!==void 0&&!isNaN(n.token.startLine)?n.token.startLine:"?",s=n.token.startColumn!==void 0&&!isNaN(n.token.startColumn)?n.token.startColumn:"?";return`Parse error on line ${a}, column ${s}: ${n.message}`}).join(`
|
|
178
|
+
`);super(`Parsing failed: ${t} ${r}`);this.result=e}static{i(this,"MermaidParseError")}};
|
|
179
|
+
export{Lr,ei,Zt,Jt,Qt,er,ti,ri,ni,ii,ai,si,oi,li,ci,ui,D,Pe};
|