@gobing-ai/spur 0.3.63 → 0.3.65
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/.claude-plugin/marketplace.json +1 -1
- package/config/corpus-baseline.json +2995 -6832
- package/config/rules/boundary/sp-runtime-path.yaml +45 -35
- package/config/rules/surface/check-cli-surface.yaml +7 -5
- package/config/workflows/history-anatomy.yaml +39 -8
- package/package.json +9 -9
- package/plugins/sp/README.md +17 -10
- package/plugins/sp/agents/expert-spur.md +20 -4
- package/plugins/sp/commands/dev-find-issue.md +5 -2
- package/plugins/sp/commands/dev-gitmsg.md +12 -6
- package/plugins/sp/commands/dev-gtd.md +8 -19
- package/plugins/sp/commands/dev-idea.md +1 -1
- package/plugins/sp/commands/dev-plan.md +1 -1
- package/plugins/sp/commands/dev-review-session.md +36 -0
- package/plugins/sp/commands/dev-run.md +2 -2
- package/plugins/sp/commands/dev-runall.md +2 -2
- package/plugins/sp/commands/dev-wrap.md +5 -6
- package/plugins/sp/commands/dev-wrapall.md +5 -7
- package/plugins/sp/plugin.json +1 -1
- package/plugins/sp/references/environment-lens.md +4 -2
- package/plugins/sp/references/roles.md +8 -5
- package/plugins/sp/scripts/history-anatomy-cache.mjs +3 -2
- package/plugins/sp/scripts/history-anatomy-cache.ts +7 -2
- package/plugins/sp/skills/dogfood-testing/SKILL.md +22 -1
- package/plugins/sp/skills/history-anatomy/references/report-contract.md +8 -0
- package/plugins/sp/skills/next-router/SKILL.md +4 -4
- package/plugins/sp/skills/pr-reviewing/SKILL.md +2 -3
- package/plugins/sp/skills/redesign-web-ui/SKILL.md +184 -0
- package/plugins/sp/skills/redesign-web-ui/references/audit-checklist.md +121 -0
- package/plugins/sp/skills/redesign-web-ui/references/upgrade-techniques.md +66 -0
- package/plugins/sp/skills/session-review/SKILL.md +106 -0
- package/plugins/sp/skills/spur-cli/references/agent.md +1 -1
- package/plugins/sp/skills/spur-cli/references/workflows/authoring-workflows.md +5 -0
- package/plugins/sp/skills/spur-cli/references/workflows/operations.md +20 -5
- package/plugins/sp/skills/spur-cli/references/workflows/workflow-fit-and-tuning.md +230 -0
- package/plugins/sp/skills/spur-cli/references/workflows.md +27 -5
- package/plugins/sp/skills/spur-dev/references/cross-cutting.md +22 -30
- package/plugins/sp/skills/spur-dev/references/dev-operations.md +73 -28
- package/plugins/sp/skills/spur-dev/references/execution-workflow.md +1 -1
- package/plugins/sp/skills/spur-dev/references/flag-glossary.md +18 -8
- package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +15 -12
- package/spur.js +1152 -816
- package/web/_astro/{BoardApp.CKolAjUz.js → BoardApp.BEtcJqde.js} +62 -62
- package/web/_astro/BoardApp.DBEin4N5.js +1 -0
- package/web/_astro/{TaskDetail.Bre7G4gC.js → TaskDetail.ClAbCXom.js} +1 -1
- package/web/_astro/arc.CCvf51_y.js +1 -0
- package/web/_astro/architectureDiagram-3BPJPVTR.C0cb0J5M.js +36 -0
- package/web/_astro/{blockDiagram-GPEHLZMM.CCGHeRVi.js → blockDiagram-GPEHLZMM.CIyjqoCE.js} +4 -4
- package/web/_astro/{c4Diagram-AAUBKEIU.CpqewGmd.js → c4Diagram-AAUBKEIU.fs14IuFs.js} +1 -1
- package/web/_astro/channel.BGn_DUCD.js +1 -0
- package/web/_astro/chunk-2J33WTMH.CaBKv4ZO.js +1 -0
- package/web/_astro/{chunk-4BX2VUAB.ifGXoUA3.js → chunk-4BX2VUAB.BOllTPto.js} +1 -1
- package/web/_astro/chunk-55IACEB6.ChEof0O4.js +1 -0
- package/web/_astro/{chunk-727SXJPM.DzPE41OS.js → chunk-727SXJPM.Co2kdjD8.js} +2 -2
- package/web/_astro/{chunk-AQP2D5EJ.UF2QRXYF.js → chunk-AQP2D5EJ.SWmfcnog.js} +2 -2
- package/web/_astro/{chunk-FMBD7UC4.D2zXKa1R.js → chunk-FMBD7UC4.rDAFifF3.js} +1 -1
- package/web/_astro/chunk-ND2GUHAM.BCnoXKCw.js +1 -0
- package/web/_astro/{chunk-QZHKN3VN.nUKFBiLD.js → chunk-QZHKN3VN.RSmy2hDO.js} +1 -1
- package/web/_astro/{classDiagram-4FO5ZUOK.DZg9K9mO.js → classDiagram-4FO5ZUOK.Be7PEfrX.js} +1 -1
- package/web/_astro/{classDiagram-v2-Q7XG4LA2.DZg9K9mO.js → classDiagram-v2-Q7XG4LA2.Be7PEfrX.js} +1 -1
- package/web/_astro/{client.CdFpTatq.js → client.yhYJvxCU.js} +1 -1
- package/web/_astro/cose-bilkent-S5V4N54A.BkUp2aSK.js +1 -0
- package/web/_astro/cynefin-OW5HDTMX.BegGGlUV.js +166 -0
- package/web/_astro/cytoscape.esm.DzSz-X2X.js +321 -0
- package/web/_astro/dagre-BM42HDAG.BkUdjsaC.js +4 -0
- package/web/_astro/{defaultLocale.CrowFXzY.js → defaultLocale.DX6XiGOO.js} +1 -1
- package/web/_astro/diagram-2AECGRRQ.E9vugt3-.js +43 -0
- package/web/_astro/diagram-5GNKFQAL.Dj4yeHXB.js +10 -0
- package/web/_astro/diagram-KO2AKTUF.Buaquwli.js +3 -0
- package/web/_astro/diagram-LMA3HP47.BV3dgGgm.js +24 -0
- package/web/_astro/diagram-OG6HWLK6.Cnx3s-tc.js +24 -0
- package/web/_astro/{erDiagram-TEJ5UH35.CF2U-pQZ.js → erDiagram-TEJ5UH35.DKK_abu4.js} +3 -3
- package/web/_astro/{flowDiagram-I6XJVG4X.BJK4M3in.js → flowDiagram-I6XJVG4X.BNuu9fbm.js} +4 -4
- package/web/_astro/ganttDiagram-6RSMTGT7.b16KUMjy.js +292 -0
- package/web/_astro/gitGraphDiagram-PVQCEYII.Kh41lbG5.js +106 -0
- package/web/_astro/{graph.D2o_JWn5.js → graph.-OzhPTMs.js} +1 -1
- package/web/_astro/{index.A0eX93qW.js → index.De90oHcH.js} +1 -1
- package/web/_astro/infoDiagram-5YYISTIA.DEWBXkp-.js +2 -0
- package/web/_astro/{ishikawaDiagram-YF4QCWOH.BmWDZtwF.js → ishikawaDiagram-YF4QCWOH.DiAdmcL6.js} +4 -4
- package/web/_astro/{journeyDiagram-JHISSGLW.CpB1YWDP.js → journeyDiagram-JHISSGLW.D1Ki7IRm.js} +1 -1
- package/web/_astro/{kanban-definition-UN3LZRKU.k-fukQX9.js → kanban-definition-UN3LZRKU.CWUhrQpc.js} +21 -21
- package/web/_astro/layout.owoKPs3z.js +1 -0
- package/web/_astro/linear.BaFsgcCe.js +1 -0
- package/web/_astro/{mermaid.core.DnpzzuPU.js → mermaid.core.CHw_AsGy.js} +5 -5
- package/web/_astro/{mindmap-definition-RKZ34NQL.D9NnlLBu.js → mindmap-definition-RKZ34NQL.UIhghgmN.js} +8 -8
- package/web/_astro/ordinal.DBvzRdQf.js +1 -0
- package/web/_astro/pieDiagram-4H26LBE5.D05l3JUA.js +30 -0
- package/web/_astro/{quadrantDiagram-W4KKPZXB.BkAygRlm.js → quadrantDiagram-W4KKPZXB.BcWIhIcE.js} +1 -1
- package/web/_astro/{requirementDiagram-4Y6WPE33.CX8ibmwc.js → requirementDiagram-4Y6WPE33.B1rYvKGn.js} +1 -1
- package/web/_astro/sankeyDiagram-5OEKKPKP.CKylVRC4.js +40 -0
- package/web/_astro/{sequenceDiagram-3UESZ5HK.veO8c2tk.js → sequenceDiagram-3UESZ5HK.Dm3uA_s4.js} +3 -3
- package/web/_astro/stateDiagram-AJRCARHV.Bgca_BLe.js +1 -0
- package/web/_astro/stateDiagram-v2-BHNVJYJU.C1T7YFrG.js +1 -0
- package/web/_astro/{timeline-definition-PNZ67QCA.DayoPp_2.js → timeline-definition-PNZ67QCA.ZOHJn3Sn.js} +4 -4
- package/web/_astro/vennDiagram-CIIHVFJN.DegZitjD.js +34 -0
- package/web/_astro/{wardleyDiagram-YWT4CUSO.lIAjSkZJ.js → wardleyDiagram-YWT4CUSO.BDsC115d.js} +1 -1
- package/web/_astro/{xychartDiagram-2RQKCTM6.D8_2K6U1.js → xychartDiagram-2RQKCTM6.D0MO70ea.js} +4 -4
- package/web/index.html +1 -1
- package/web/_astro/BoardApp.DXD--ybM.js +0 -1
- package/web/_astro/arc.7luwOGiC.js +0 -1
- package/web/_astro/architectureDiagram-3BPJPVTR.F6KaHXp-.js +0 -36
- package/web/_astro/channel.DxfOFf1l.js +0 -1
- package/web/_astro/chunk-2J33WTMH.CB9vKa5F.js +0 -1
- package/web/_astro/chunk-55IACEB6.VIaRo7l8.js +0 -1
- package/web/_astro/chunk-ND2GUHAM.Cb9bDyvx.js +0 -1
- package/web/_astro/cose-bilkent-S5V4N54A.D9STo90d.js +0 -1
- package/web/_astro/cytoscape.esm.D3_iZ_3b.js +0 -321
- package/web/_astro/dagre-BM42HDAG.D3IbwhHz.js +0 -4
- package/web/_astro/diagram-2AECGRRQ.BWTDxBe9.js +0 -43
- package/web/_astro/diagram-5GNKFQAL.XnXlonHG.js +0 -10
- package/web/_astro/diagram-KO2AKTUF.CywOngCO.js +0 -3
- package/web/_astro/diagram-LMA3HP47.DY1D21Iu.js +0 -24
- package/web/_astro/diagram-OG6HWLK6.DQxb59KA.js +0 -24
- package/web/_astro/ganttDiagram-6RSMTGT7.BSniMzdB.js +0 -292
- package/web/_astro/gitGraphDiagram-PVQCEYII.Dxg-yRov.js +0 -106
- package/web/_astro/infoDiagram-5YYISTIA.BY4CgO_n.js +0 -2
- package/web/_astro/layout.DNLMvjEt.js +0 -1
- package/web/_astro/linear.BNNCobvI.js +0 -1
- package/web/_astro/ordinal.BYWQX77i.js +0 -1
- package/web/_astro/pieDiagram-4H26LBE5.CKhoMiyC.js +0 -30
- package/web/_astro/sankeyDiagram-5OEKKPKP.Dvurpa0Y.js +0 -40
- package/web/_astro/stateDiagram-AJRCARHV.DpMr4CO3.js +0 -1
- package/web/_astro/stateDiagram-v2-BHNVJYJU.CKjso86_.js +0 -1
- package/web/_astro/vennDiagram-CIIHVFJN.XNHf04O9.js +0 -34
- package/web/_astro/wardley-L42UT6IY.CpM_031g.js +0 -161
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import{_ as et}from"./BoardApp.BEtcJqde.js";var RI=Object.create,Ds=Object.defineProperty,AI=Object.getOwnPropertyDescriptor,Ad=Object.getOwnPropertyNames,EI=Object.getPrototypeOf,CI=Object.prototype.hasOwnProperty,i=(e,t)=>Ds(e,"name",{value:t,configurable:!0}),_I=(e,t)=>function(){return e&&(t=(0,e[Ad(e)[0]])(e=0)),t},H=(e,t)=>function(){return t||(0,e[Ad(e)[0]])((t={exports:{}}).exports,t),t.exports},Vr=(e,t)=>{for(var r in t)Ds(e,r,{get:t[r],enumerable:!0})},Ed=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ad(t))!CI.call(e,a)&&a!==r&&Ds(e,a,{get:()=>t[a],enumerable:!(n=AI(t,a))||n.enumerable});return e},Ll=(e,t,r)=>(Ed(e,t,"default"),r),Cd=(e,t,r)=>(r=e!=null?RI(EI(e)):{},Ed(Ds(r,"default",{value:e,enumerable:!0}),e)),_d=e=>Ed(Ds({},"__esModule",{value:!0}),e),Dl={};Vr(Dl,{AnnotatedTextEdit:()=>mr,ChangeAnnotation:()=>an,ChangeAnnotationIdentifier:()=>Ke,CodeAction:()=>ef,CodeActionContext:()=>Qc,CodeActionKind:()=>Zc,CodeActionTriggerKind:()=>Xi,CodeDescription:()=>Nc,CodeLens:()=>tf,Color:()=>Co,ColorInformation:()=>Cc,ColorPresentation:()=>_c,Command:()=>nn,CompletionItem:()=>zc,CompletionItemKind:()=>Lc,CompletionItemLabelDetails:()=>Fc,CompletionItemTag:()=>xc,CompletionList:()=>jc,CreateFile:()=>ya,DeleteFile:()=>va,Diagnostic:()=>Vi,DiagnosticRelatedInformation:()=>_o,DiagnosticSeverity:()=>wc,DiagnosticTag:()=>Ic,DocumentHighlight:()=>Vc,DocumentHighlightKind:()=>Wc,DocumentLink:()=>nf,DocumentSymbol:()=>Jc,DocumentUri:()=>Rc,EOL:()=>zg,FoldingRange:()=>Sc,FoldingRangeKind:()=>bc,FormattingOptions:()=>rf,Hover:()=>Bc,InlayHint:()=>pf,InlayHintKind:()=>wo,InlayHintLabelPart:()=>Io,InlineCompletionContext:()=>Tf,InlineCompletionItem:()=>hf,InlineCompletionList:()=>yf,InlineCompletionTriggerKind:()=>gf,InlineValueContext:()=>df,InlineValueEvaluatableExpression:()=>ff,InlineValueText:()=>uf,InlineValueVariableLookup:()=>cf,InsertReplaceEdit:()=>Mc,InsertTextFormat:()=>Dc,InsertTextMode:()=>Gc,Location:()=>Wi,LocationLink:()=>Ec,MarkedString:()=>Yi,MarkupContent:()=>Ta,MarkupKind:()=>So,OptionalVersionedTextDocumentIdentifier:()=>Hi,ParameterInformation:()=>Uc,Position:()=>ie,Range:()=>Q,RenameFile:()=>ga,SelectedCompletionInfo:()=>vf,SelectionRange:()=>af,SemanticTokenModifiers:()=>of,SemanticTokenTypes:()=>sf,SemanticTokens:()=>lf,SignatureInformation:()=>Kc,StringValue:()=>mf,SymbolInformation:()=>Yc,SymbolKind:()=>qc,SymbolTag:()=>Hc,TextDocument:()=>Rf,TextDocumentEdit:()=>qi,TextDocumentIdentifier:()=>Pc,TextDocumentItem:()=>Oc,TextEdit:()=>Yt,URI:()=>Eo,VersionedTextDocumentIdentifier:()=>kc,WorkspaceChange:()=>Fg,WorkspaceEdit:()=>bo,WorkspaceFolder:()=>$f,WorkspaceSymbol:()=>Xc,integer:()=>Ac,uinteger:()=>Ki});var Rc,Eo,Ac,Ki,ie,Q,Wi,Ec,Co,Cc,_c,bc,Sc,_o,wc,Ic,Nc,Vi,nn,Yt,an,Ke,mr,qi,ya,ga,va,bo,ki,Ku,Fg,Pc,kc,Hi,Oc,So,Ta,Lc,Dc,xc,Mc,Gc,Fc,zc,jc,Yi,Bc,Uc,Kc,Wc,Vc,qc,Hc,Yc,Xc,Jc,Zc,Xi,Qc,ef,tf,rf,nf,af,sf,of,lf,uf,cf,ff,df,wo,Io,pf,mf,hf,yf,gf,vf,Tf,$f,zg,Rf,lh,A,xs=_I({"../../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})(Rc||(Rc={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(Eo||(Eo={})),(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})(Ac||(Ac={})),(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})(Ki||(Ki={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Ki.MAX_VALUE),a===Number.MAX_VALUE&&(a=Ki.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&A.uinteger(a.line)&&A.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if(A.uinteger(n)&&A.uinteger(a)&&A.uinteger(s)&&A.uinteger(o))return{start:ie.create(n,a),end:ie.create(s,o)};if(ie.is(n)&&ie.is(a))return{start:n,end:a};throw new Error(`Range#create called with invalid arguments[${n}, ${a}, ${s}, ${o}]`)}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(Q||(Q={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(A.string(a.uri)||A.undefined(a.uri))}i(r,"is"),e.is=r})(Wi||(Wi={})),(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 A.objectLiteral(a)&&Q.is(a.targetRange)&&A.string(a.targetUri)&&Q.is(a.targetSelectionRange)&&(Q.is(a.originSelectionRange)||A.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(Ec||(Ec={})),(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){const a=n;return A.objectLiteral(a)&&A.numberRange(a.red,0,1)&&A.numberRange(a.green,0,1)&&A.numberRange(a.blue,0,1)&&A.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(Co||(Co={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&Q.is(a.range)&&Co.is(a.color)}i(r,"is"),e.is=r})(Cc||(Cc={})),(function(e){function t(n,a,s){return{label:n,textEdit:a,additionalTextEdits:s}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.undefined(a.textEdit)||Yt.is(a))&&(A.undefined(a.additionalTextEdits)||A.typedArray(a.additionalTextEdits,Yt.is))}i(r,"is"),e.is=r})(_c||(_c={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(bc||(bc={})),(function(e){function t(n,a,s,o,l,u){const c={startLine:n,endLine:a};return A.defined(s)&&(c.startCharacter=s),A.defined(o)&&(c.endCharacter=o),A.defined(l)&&(c.kind=l),A.defined(u)&&(c.collapsedText=u),c}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.uinteger(a.startLine)&&A.uinteger(a.startLine)&&(A.undefined(a.startCharacter)||A.uinteger(a.startCharacter))&&(A.undefined(a.endCharacter)||A.uinteger(a.endCharacter))&&(A.undefined(a.kind)||A.string(a.kind))}i(r,"is"),e.is=r})(Sc||(Sc={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Wi.is(a.location)&&A.string(a.message)}i(r,"is"),e.is=r})(_o||(_o={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(wc||(wc={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(Ic||(Ic={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&A.string(n.href)}i(t,"is"),e.is=t})(Nc||(Nc={})),(function(e){function t(n,a,s,o,l,u){let c={range:n,message:a};return A.defined(s)&&(c.severity=s),A.defined(o)&&(c.code=o),A.defined(l)&&(c.source=l),A.defined(u)&&(c.relatedInformation=u),c}i(t,"create"),e.create=t;function r(n){var a;let s=n;return A.defined(s)&&Q.is(s.range)&&A.string(s.message)&&(A.number(s.severity)||A.undefined(s.severity))&&(A.integer(s.code)||A.string(s.code)||A.undefined(s.code))&&(A.undefined(s.codeDescription)||A.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&(A.string(s.source)||A.undefined(s.source))&&(A.undefined(s.relatedInformation)||A.typedArray(s.relatedInformation,_o.is))}i(r,"is"),e.is=r})(Vi||(Vi={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return A.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.title)&&A.string(a.command)}i(r,"is"),e.is=r})(nn||(nn={})),(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){const o=s;return A.objectLiteral(o)&&A.string(o.newText)&&Q.is(o.range)}i(a,"is"),e.is=a})(Yt||(Yt={})),(function(e){function t(n,a,s){const o={label:n};return a!==void 0&&(o.needsConfirmation=a),s!==void 0&&(o.description=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&A.string(a.label)&&(A.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(A.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(an||(an={})),(function(e){function t(r){const n=r;return A.string(n)}i(t,"is"),e.is=t})(Ke||(Ke={})),(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){const o=s;return Yt.is(o)&&(an.is(o.annotationId)||Ke.is(o.annotationId))}i(a,"is"),e.is=a})(mr||(mr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Hi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(qi||(qi={})),(function(e){function t(n,a,s){let o={kind:"create",uri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="create"&&A.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ya||(ya={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(l.options=s),o!==void 0&&(l.annotationId=o),l}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="rename"&&A.string(a.oldUri)&&A.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||A.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||A.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||Ke.is(a.annotationId))}i(r,"is"),e.is=r})(ga||(ga={})),(function(e){function t(n,a,s){let o={kind:"delete",uri:n};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(o.options=a),s!==void 0&&(o.annotationId=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&a.kind==="delete"&&A.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||A.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||A.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||Ke.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=>A.string(a.kind)?ya.is(a)||ga.is(a)||va.is(a):qi.is(a)))}i(t,"is"),e.is=t})(bo||(bo={})),ki=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=Yt.insert(e,t):Ke.is(r)?(a=r,n=mr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.insert(e,t,a)),this.edits.push(n),a!==void 0)return a}replace(e,t,r){let n,a;if(r===void 0?n=Yt.replace(e,t):Ke.is(r)?(a=r,n=mr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=mr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Yt.del(e):Ke.is(t)?(n=t,r=mr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=mr.del(e,n)),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 new Error("Text edit change is not configured to manage change annotations.")}},Ku=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(Ke.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},Fg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Ku(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(qi.is(t)){const r=new ki(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new ki(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(Hi.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const n=[],a={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(a),r=new ki(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new 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 ki(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ku,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){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 new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ya.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=ya.create(e,r,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let a;an.is(r)||Ke.is(r)?a=r:n=r;let s,o;if(a===void 0?s=ga.create(e,t,n):(o=Ke.is(a)?a:this._changeAnnotations.manage(a),s=ga.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;an.is(t)||Ke.is(t)?n=t:r=t;let a,s;if(n===void 0?a=va.create(e,r):(s=Ke.is(n)?n:this._changeAnnotations.manage(n),a=va.create(e,r,s)),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 A.defined(a)&&A.string(a.uri)}i(r,"is"),e.is=r})(Pc||(Pc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&A.integer(a.version)}i(r,"is"),e.is=r})(kc||(kc={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.string(a.uri)&&(a.version===null||A.integer(a.version))}i(r,"is"),e.is=r})(Hi||(Hi={})),(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 A.defined(a)&&A.string(a.uri)&&A.string(a.languageId)&&A.integer(a.version)&&A.string(a.text)}i(r,"is"),e.is=r})(Oc||(Oc={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){const n=r;return n===e.PlainText||n===e.Markdown}i(t,"is"),e.is=t})(So||(So={})),(function(e){function t(r){const n=r;return A.objectLiteral(r)&&So.is(n.kind)&&A.string(n.value)}i(t,"is"),e.is=t})(Ta||(Ta={})),(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})(Lc||(Lc={})),(function(e){e.PlainText=1,e.Snippet=2})(Dc||(Dc={})),(function(e){e.Deprecated=1})(xc||(xc={})),(function(e){function t(n,a,s){return{newText:n,insert:a,replace:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a&&A.string(a.newText)&&Q.is(a.insert)&&Q.is(a.replace)}i(r,"is"),e.is=r})(Mc||(Mc={})),(function(e){e.asIs=1,e.adjustIndentation=2})(Gc||(Gc={})),(function(e){function t(r){const n=r;return n&&(A.string(n.detail)||n.detail===void 0)&&(A.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(Fc||(Fc={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(zc||(zc={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(jc||(jc={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return A.string(a)||A.objectLiteral(a)&&A.string(a.language)&&A.string(a.value)}i(r,"is"),e.is=r})(Yi||(Yi={})),(function(e){function t(r){let n=r;return!!n&&A.objectLiteral(n)&&(Ta.is(n.contents)||Yi.is(n.contents)||A.typedArray(n.contents,Yi.is))&&(r.range===void 0||Q.is(r.range))}i(t,"is"),e.is=t})(Bc||(Bc={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Uc||(Uc={})),(function(e){function t(r,n,...a){let s={label:r};return A.defined(n)&&(s.documentation=n),A.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Kc||(Kc={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(Wc||(Wc={})),(function(e){function t(r,n){let a={range:r};return A.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Vc||(Vc={})),(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})(qc||(qc={})),(function(e){e.Deprecated=1})(Hc||(Hc={})),(function(e){function t(r,n,a,s,o){let l={name:r,kind:n,location:{uri:s,range:a}};return o&&(l.containerName=o),l}i(t,"create"),e.create=t})(Yc||(Yc={})),(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})(Xc||(Xc={})),(function(e){function t(n,a,s,o,l,u){let c={name:n,detail:a,kind:s,range:o,selectionRange:l};return u!==void 0&&(c.children=u),c}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.name)&&A.number(a.kind)&&Q.is(a.range)&&Q.is(a.selectionRange)&&(a.detail===void 0||A.string(a.detail))&&(a.deprecated===void 0||A.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})(Jc||(Jc={})),(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"})(Zc||(Zc={})),(function(e){e.Invoked=1,e.Automatic=2})(Xi||(Xi={})),(function(e){function t(n,a,s){let o={diagnostics:n};return a!=null&&(o.only=a),s!=null&&(o.triggerKind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.typedArray(a.diagnostics,Vi.is)&&(a.only===void 0||A.typedArray(a.only,A.string))&&(a.triggerKind===void 0||a.triggerKind===Xi.Invoked||a.triggerKind===Xi.Automatic)}i(r,"is"),e.is=r})(Qc||(Qc={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):nn.is(a)?o.command=a:o.edit=a,l&&s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return a&&A.string(a.title)&&(a.diagnostics===void 0||A.typedArray(a.diagnostics,Vi.is))&&(a.kind===void 0||A.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||nn.is(a.command))&&(a.isPreferred===void 0||A.boolean(a.isPreferred))&&(a.edit===void 0||bo.is(a.edit))}i(r,"is"),e.is=r})(ef||(ef={})),(function(e){function t(n,a){let s={range:n};return A.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&Q.is(a.range)&&(A.undefined(a.command)||nn.is(a.command))}i(r,"is"),e.is=r})(tf||(tf={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.defined(a)&&A.uinteger(a.tabSize)&&A.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(rf||(rf={})),(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 A.defined(a)&&Q.is(a.range)&&(A.undefined(a.target)||A.string(a.target))}i(r,"is"),e.is=r})(nf||(nf={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return A.objectLiteral(a)&&Q.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(af||(af={})),(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"})(sf||(sf={})),(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"})(of||(of={})),(function(e){function t(r){const n=r;return A.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})(lf||(lf={})),(function(e){function t(n,a){return{range:n,text:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.string(a.text)}i(r,"is"),e.is=r})(uf||(uf={})),(function(e){function t(n,a,s){return{range:n,variableName:a,caseSensitiveLookup:s}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&A.boolean(a.caseSensitiveLookup)&&(A.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(cf||(cf={})),(function(e){function t(n,a){return{range:n,expression:a}}i(t,"create"),e.create=t;function r(n){const a=n;return a!=null&&Q.is(a.range)&&(A.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(ff||(ff={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return A.defined(a)&&Q.is(n.stoppedLocation)}i(r,"is"),e.is=r})(df||(df={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(wo||(wo={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.location===void 0||Wi.is(a.location))&&(a.command===void 0||nn.is(a.command))}i(r,"is"),e.is=r})(Io||(Io={})),(function(e){function t(n,a,s){const o={position:n,label:a};return s!==void 0&&(o.kind=s),o}i(t,"create"),e.create=t;function r(n){const a=n;return A.objectLiteral(a)&&ie.is(a.position)&&(A.string(a.label)||A.typedArray(a.label,Io.is))&&(a.kind===void 0||wo.is(a.kind))&&a.textEdits===void 0||A.typedArray(a.textEdits,Yt.is)&&(a.tooltip===void 0||A.string(a.tooltip)||Ta.is(a.tooltip))&&(a.paddingLeft===void 0||A.boolean(a.paddingLeft))&&(a.paddingRight===void 0||A.boolean(a.paddingRight))}i(r,"is"),e.is=r})(pf||(pf={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(mf||(mf={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(hf||(hf={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(yf||(yf={})),(function(e){e.Invoked=0,e.Automatic=1})(gf||(gf={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(vf||(vf={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Tf||(Tf={})),(function(e){function t(r){const n=r;return A.objectLiteral(n)&&Eo.is(n.uri)&&A.string(n.name)}i(t,"is"),e.is=t})($f||($f={})),zg=[`
|
|
2
|
+
`,`\r
|
|
3
|
+
`,"\r"],(function(e){function t(s,o,l,u){return new lh(s,o,l,u)}i(t,"create"),e.create=t;function r(s){let o=s;return!!(A.defined(o)&&A.string(o.uri)&&(A.undefined(o.languageId)||A.string(o.languageId))&&A.uinteger(o.lineCount)&&A.func(o.getText)&&A.func(o.positionAt)&&A.func(o.offsetAt))}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;return m===0?f.range.start.character-d.range.start.character: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 new Error("Overlapping edit");c=m}return l}i(n,"applyEdits"),e.applyEdits=n;function a(s,o){if(s.length<=1)return s;const 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;for(;f<u.length&&d<c.length;)o(u[f],c[d])<=0?s[m++]=u[f++]:s[m++]=c[d++];for(;f<u.length;)s[m++]=u[f++];for(;d<c.length;)s[m++]=c[d++];return s}i(a,"mergeSort")})(Rf||(Rf={})),lh=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++){r&&(e.push(n),r=!1);let a=t.charAt(n);r=a==="\r"||a===`
|
|
4
|
+
`,a==="\r"&&n+1<t.length&&t.charAt(n+1)===`
|
|
5
|
+
`&&n++}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 ie.create(0,e);for(;r<n;){let s=Math.floor((r+n)/2);t[s]>e?n=s:r=s+1}let a=r-1;return ie.create(a,e-t[a])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;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){const 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,_){return t.call(g)==="[object Number]"&&v<=g&&g<=_}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})(A||(A={}))}}),Dn=H({"../../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 new Error("No runtime abstraction layer installed");return t}i(r,"RAL"),(function(n){function a(s){if(s===void 0)throw new Error("No runtime abstraction layer provided");t=s}i(a,"install"),n.install=a})(r||(r={})),e.default=r}}),Ms=H({"../../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}}),ei=H({"../../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=Dn(),r;(function(s){const o={dispose(){}};s.None=function(){return o}})(r||(e.Event=r={}));var n=class{static{i(this,"CallbackList")}add(s,o=null,l){this._callbacks||(this._callbacks=[],this._contexts=[]),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 new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...s){if(!this._callbacks)return[];const 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 jg{static{i(this,"Emitter")}constructor(o){this._options=o}get event(){return this._event||(this._event=(o,l,u)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(o,l);const c={dispose:i(()=>{this._callbacks&&(this._callbacks.remove(o,l),c.dispose=jg._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(u)&&u.push(c),c}),this._event}fire(o){this._callbacks&&this._callbacks.invoke.call(this._callbacks,o)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};e.Emitter=a,a._noop=function(){}}}),xl=H({"../../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=Dn(),r=Ms(),n=ei(),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){const 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){const 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(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?s:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},l=class{static{i(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new o),this._token}cancel(){this._token?this._token.cancel():this._token=a.Cancelled}dispose(){this._token?this._token instanceof o&&this._token.dispose():this._token=a.None}};e.CancellationTokenSource=l}}),Bg=H({"../../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=Ms(),r;(function(y){y.ParseError=-32700,y.InvalidRequest=-32600,y.MethodNotFound=-32601,y.InvalidParams=-32602,y.InternalError=-32603,y.jsonrpcReservedErrorRangeStart=-32099,y.serverErrorStart=-32099,y.MessageWriteError=-32099,y.MessageReadError=-32098,y.PendingResponseRejected=-32097,y.ConnectionInactive=-32096,y.ServerNotInitialized=-32002,y.UnknownErrorCode=-32001,y.jsonrpcReservedErrorRangeEnd=-32e3,y.serverErrorEnd=-32e3})(r||(e.ErrorCodes=r={}));var n=class Ug extends Error{static{i(this,"ResponseError")}constructor(E,T,$){super(T),this.code=t.number(E)?E:r.UnknownErrorCode,this.data=$,Object.setPrototypeOf(this,Ug.prototype)}toJson(){const E={code:this.code,message:this.message};return this.data!==void 0&&(E.data=this.data),E}};e.ResponseError=n;var a=class No{static{i(this,"ParameterStructures")}constructor(E){this.kind=E}static is(E){return E===No.auto||E===No.byName||E===No.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(y,E){this.method=y,this.numberOfParams=E}get parameterStructures(){return a.auto}};e.AbstractMessageSignature=s;var o=class extends s{static{i(this,"RequestType0")}constructor(y){super(y,0)}};e.RequestType0=o;var l=class extends s{static{i(this,"RequestType")}constructor(y,E=a.auto){super(y,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.RequestType=l;var u=class extends s{static{i(this,"RequestType1")}constructor(y,E=a.auto){super(y,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.RequestType1=u;var c=class extends s{static{i(this,"RequestType2")}constructor(y){super(y,2)}};e.RequestType2=c;var f=class extends s{static{i(this,"RequestType3")}constructor(y){super(y,3)}};e.RequestType3=f;var d=class extends s{static{i(this,"RequestType4")}constructor(y){super(y,4)}};e.RequestType4=d;var m=class extends s{static{i(this,"RequestType5")}constructor(y){super(y,5)}};e.RequestType5=m;var g=class extends s{static{i(this,"RequestType6")}constructor(y){super(y,6)}};e.RequestType6=g;var v=class extends s{static{i(this,"RequestType7")}constructor(y){super(y,7)}};e.RequestType7=v;var _=class extends s{static{i(this,"RequestType8")}constructor(y){super(y,8)}};e.RequestType8=_;var S=class extends s{static{i(this,"RequestType9")}constructor(y){super(y,9)}};e.RequestType9=S;var w=class extends s{static{i(this,"NotificationType")}constructor(y,E=a.auto){super(y,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.NotificationType=w;var I=class extends s{static{i(this,"NotificationType0")}constructor(y){super(y,0)}};e.NotificationType0=I;var R=class extends s{static{i(this,"NotificationType1")}constructor(y,E=a.auto){super(y,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=R;var P=class extends s{static{i(this,"NotificationType2")}constructor(y){super(y,2)}};e.NotificationType2=P;var z=class extends s{static{i(this,"NotificationType3")}constructor(y){super(y,3)}};e.NotificationType3=z;var X=class extends s{static{i(this,"NotificationType4")}constructor(y){super(y,4)}};e.NotificationType4=X;var Z=class extends s{static{i(this,"NotificationType5")}constructor(y){super(y,5)}};e.NotificationType5=Z;var ce=class extends s{static{i(this,"NotificationType6")}constructor(y){super(y,6)}};e.NotificationType6=ce;var se=class extends s{static{i(this,"NotificationType7")}constructor(y){super(y,7)}};e.NotificationType7=se;var Se=class extends s{static{i(this,"NotificationType8")}constructor(y){super(y,8)}};e.NotificationType8=Se;var k=class extends s{static{i(this,"NotificationType9")}constructor(y){super(y,9)}};e.NotificationType9=k;var C;(function(y){function E(b){const O=b;return O&&t.string(O.method)&&(t.string(O.id)||t.number(O.id))}i(E,"isRequest"),y.isRequest=E;function T(b){const O=b;return O&&t.string(O.method)&&b.id===void 0}i(T,"isNotification"),y.isNotification=T;function $(b){const O=b;return O&&(O.result!==void 0||!!O.error)&&(t.string(O.id)||t.number(O.id)||O.id===null)}i($,"isResponse"),y.isResponse=$})(C||(e.Message=C={}))}}),Kg=H({"../../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){const l=this._map.get(s);if(l)return o!==r.None&&this.touch(l,o),l.value}set(s,o,l=r.None){let u=this._map.get(s);if(u)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){const o=this._map.get(s);if(o)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 new Error("Invalid list");const s=this._head;return this._map.delete(s.key),this.removeItem(s),this._size--,s.value}forEach(s,o){const l=this._state;let u=this._head;for(;u;){if(o?s.bind(o)(u.value,u.key,this):s(u.value,u.key,this),this._state!==l)throw new Error("LinkedMap got modified during iteration.");u=u.next}}keys(){const s=this._state;let o=this._head;const l={[Symbol.iterator]:()=>l,next:i(()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(o){const u={value:o.key,done:!1};return o=o.next,u}else return{value:void 0,done:!0}},"next")};return l}values(){const s=this._state;let o=this._head;const l={[Symbol.iterator]:()=>l,next:i(()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(o){const u={value:o.value,done:!1};return o=o.next,u}else return{value:void 0,done:!0}},"next")};return l}entries(){const s=this._state;let o=this._head;const l={[Symbol.iterator]:()=>l,next:i(()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(o){const 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;for(;o&&l>s;)this._map.delete(o.key),o=o.next,l--;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)s.next=this._head,this._head.previous=s;else throw new Error("Invalid list");this._head=s,this._state++}addItemLast(s){if(!this._head&&!this._tail)this._head=s;else if(this._tail)s.previous=this._tail,this._tail.next=s;else throw new Error("Invalid list");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 new Error("Invalid list");s.next.previous=void 0,this._head=s.next}else if(s===this._tail){if(!s.previous)throw new Error("Invalid list");s.previous.next=void 0,this._tail=s.previous}else{const o=s.next,l=s.previous;if(!o||!l)throw new 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 new Error("Invalid list");if(!(o!==r.First&&o!==r.Last)){if(o===r.First){if(s===this._head)return;const l=s.next,u=s.previous;s===this._tail?(u.next=void 0,this._tail=u):(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;const l=s.next,u=s.previous;s===this._head?(l.previous=void 0,this._head=l):(l.previous=u,u.next=l),s.next=void 0,s.previous=this._tail,this._tail.next=s,this._tail=s,this._state++}}}toJSON(){const s=[];return this.forEach((o,l)=>{s.push([l,o])}),s}fromJSON(s){this.clear();for(const[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(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=a}}),bI=H({"../../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={}))}}),SI=H({"../../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=xl(),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;const 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){const c=this.buffers.get(u);if(c===void 0)return;const 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 new 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){const u=l.$cancellationData;return u===void 0?new t.CancellationTokenSource:new s(u)}};e.SharedArrayReceiverStrategy=o}}),Wg=H({"../../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=Dn(),r=class{static{i(this,"Semaphore")}constructor(n=1){if(n<=0)throw new 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(){this._waiting.length===0||this._active===this._capacity||(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;const n=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const a=n.thunk();a instanceof Promise?a.then(s=>{this._active--,n.resolve(s),this.runNext()},s=>{this._active--,n.reject(s),this.runNext()}):(this._active--,n.resolve(a),this.runNext())}catch(a){this._active--,n.reject(a),this.runNext()}}};e.Semaphore=r}}),wI=H({"../../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=Dn(),r=Ms(),n=ei(),a=Wg(),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){return c instanceof Error?c:new 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;const v=new Map;let _;const S=new Map;if(d===void 0||typeof d=="string")m=d??"utf-8";else{if(m=d.charset??"utf-8",d.contentDecoder!==void 0&&(g=d.contentDecoder,v.set(g.name,g)),d.contentDecoders!==void 0)for(const w of d.contentDecoders)v.set(w.name,w);if(d.contentTypeDecoder!==void 0&&(_=d.contentTypeDecoder,S.set(_.name,_)),d.contentTypeDecoders!==void 0)for(const w of d.contentTypeDecoders)S.set(w.name,w)}return _===void 0&&(_=(0,t.default)().applicationJson.decoder,S.set(_.name,_)),{charset:m,contentDecoder:g,contentDecoders:v,contentTypeDecoder:_,contentTypeDecoders:S}}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;const 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{for(this.buffer.append(c);;){if(this.nextMessageLength===-1){const d=this.buffer.tryReadHeaders(!0);if(!d)return;const m=d.get("content-length");if(!m){this.fireError(new Error(`Header must provide a Content-Length property.
|
|
6
|
+
${JSON.stringify(Object.fromEntries(d))}`));return}const g=parseInt(m);if(isNaN(g)){this.fireError(new Error(`Content-Length value must be a number. Got ${m}`));return}this.nextMessageLength=g}const f=this.buffer.tryReadBody(this.nextMessageLength);if(f===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const 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(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((c,f)=>{this.partialMessageTimer=void 0,c===this.messageToken&&(this.firePartialMessage({messageToken:c,waitingTime:f}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};e.ReadableStreamMessageReader=u}}),II=H({"../../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=Dn(),r=Ms(),n=Wg(),a=ei(),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){return d instanceof Error?d:new Error(`Writer received error. Reason: ${r.string(d.message)?d.message:"unknown"}`)}};e.AbstractMessageWriter=u;var c;(function(d){function m(g){return g===void 0||typeof g=="string"?{charset:g??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{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=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(g):g).then(g=>{const 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}}),NI=H({"../../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){const 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:for(;l<this._chunks.length;){const g=this._chunks[l];for(u=0;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;const 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++){const v=m[g],_=v.indexOf(":");if(_===-1)throw new Error(`Message header must separate key and value using ':'
|
|
9
|
+
${v}`);const S=v.substr(0,_),w=v.substr(_+1).trim();d.set(s?S.toLowerCase():S,w)}return d}tryReadBody(s){if(!(this._totalLength<s))return this._read(s)}get numberOfBytes(){return this._totalLength}_read(s){if(s===0)return this.emptyBuffer();if(s>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===s){const c=this._chunks[0];return this._chunks.shift(),this._totalLength-=s,this.asNative(c)}if(this._chunks[0].byteLength>s){const c=this._chunks[0],f=this.asNative(c,s);return this._chunks[0]=c.slice(s),this._totalLength-=s,f}const o=this.allocNative(s);let l=0,u=0;for(;s>0;){const c=this._chunks[u];if(c.byteLength>s){const 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}}),PI=H({"../../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=Dn(),r=Ms(),n=Bg(),a=Kg(),s=ei(),o=xl(),l;(function(y){y.type=new n.NotificationType("$/cancelRequest")})(l||(l={}));var u;(function(y){function E(T){return typeof T=="string"||typeof T=="number"}i(E,"is"),y.is=E})(u||(e.ProgressToken=u={}));var c;(function(y){y.type=new n.NotificationType("$/progress")})(c||(c={}));var f=class{static{i(this,"ProgressType")}constructor(){}};e.ProgressType=f;var d;(function(y){function E(T){return r.func(T)}i(E,"is"),y.is=E})(d||(d={})),e.NullLogger=Object.freeze({error:i(()=>{},"error"),warn:i(()=>{},"warn"),info:i(()=>{},"info"),log:i(()=>{},"log")});var m;(function(y){y[y.Off=0]="Off",y[y.Messages=1]="Messages",y[y.Compact=2]="Compact",y[y.Verbose=3]="Verbose"})(m||(e.Trace=m={}));var g;(function(y){y.Off="off",y.Messages="messages",y.Compact="compact",y.Verbose="verbose"})(g||(e.TraceValues=g={})),(function(y){function E($){if(!r.string($))return y.Off;switch($=$.toLowerCase(),$){case"off":return y.Off;case"messages":return y.Messages;case"compact":return y.Compact;case"verbose":return y.Verbose;default:return y.Off}}i(E,"fromString"),y.fromString=E;function T($){switch($){case y.Off:return"off";case y.Messages:return"messages";case y.Compact:return"compact";case y.Verbose:return"verbose";default:return"off"}}i(T,"toString"),y.toString=T})(m||(e.Trace=m={}));var v;(function(y){y.Text="text",y.JSON="json"})(v||(e.TraceFormat=v={})),(function(y){function E(T){return r.string(T)?(T=T.toLowerCase(),T==="json"?y.JSON:y.Text):y.Text}i(E,"fromString"),y.fromString=E})(v||(e.TraceFormat=v={}));var _;(function(y){y.type=new n.NotificationType("$/setTrace")})(_||(e.SetTraceNotification=_={}));var S;(function(y){y.type=new n.NotificationType("$/logTrace")})(S||(e.LogTraceNotification=S={}));var w;(function(y){y[y.Closed=1]="Closed",y[y.Disposed=2]="Disposed",y[y.AlreadyListening=3]="AlreadyListening"})(w||(e.ConnectionErrors=w={}));var I=class Vg extends Error{static{i(this,"ConnectionError")}constructor(E,T){super(T),this.code=E,Object.setPrototypeOf(this,Vg.prototype)}};e.ConnectionError=I;var R;(function(y){function E(T){const $=T;return $&&r.func($.cancelUndispatched)}i(E,"is"),y.is=E})(R||(e.ConnectionStrategy=R={}));var P;(function(y){function E(T){const $=T;return $&&($.kind===void 0||$.kind==="id")&&r.func($.createCancellationTokenSource)&&($.dispose===void 0||r.func($.dispose))}i(E,"is"),y.is=E})(P||(e.IdCancellationReceiverStrategy=P={}));var z;(function(y){function E(T){const $=T;return $&&$.kind==="request"&&r.func($.createCancellationTokenSource)&&($.dispose===void 0||r.func($.dispose))}i(E,"is"),y.is=E})(z||(e.RequestCancellationReceiverStrategy=z={}));var X;(function(y){y.Message=Object.freeze({createCancellationTokenSource(T){return new o.CancellationTokenSource}});function E(T){return P.is(T)||z.is(T)}i(E,"is"),y.is=E})(X||(e.CancellationReceiverStrategy=X={}));var Z;(function(y){y.Message=Object.freeze({sendCancellation(T,$){return T.sendNotification(l.type,{id:$})},cleanup(T){}});function E(T){const $=T;return $&&r.func($.sendCancellation)&&r.func($.cleanup)}i(E,"is"),y.is=E})(Z||(e.CancellationSenderStrategy=Z={}));var ce;(function(y){y.Message=Object.freeze({receiver:X.Message,sender:Z.Message});function E(T){const $=T;return $&&X.is($.receiver)&&Z.is($.sender)}i(E,"is"),y.is=E})(ce||(e.CancellationStrategy=ce={}));var se;(function(y){function E(T){const $=T;return $&&r.func($.handleMessage)}i(E,"is"),y.is=E})(se||(e.MessageStrategy=se={}));var Se;(function(y){function E(T){const $=T;return $&&(ce.is($.cancellationStrategy)||R.is($.connectionStrategy)||se.is($.messageStrategy))}i(E,"is"),y.is=E})(Se||(e.ConnectionOptions=Se={}));var k;(function(y){y[y.New=1]="New",y[y.Listening=2]="Listening",y[y.Closed=3]="Closed",y[y.Disposed=4]="Disposed"})(k||(k={}));function C(y,E,T,$){const b=T!==void 0?T:e.NullLogger;let O=0,x=0,D=0;const G="2.0";let W;const Y=new Map;let V;const Pe=new Map,oe=new Map;let Le,De=new a.LinkedMap,ke=new Map,Ze=new Set,Je=new Map,ne=m.Off,Kt=v.Text,Ee,kt=k.New;const ra=new s.Emitter,fi=new s.Emitter,di=new s.Emitter,pi=new s.Emitter,mi=new s.Emitter,Ot=$&&$.cancellationStrategy?$.cancellationStrategy:ce.Message;function na(h){if(h===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+h.toString()}i(na,"createRequestQueueKey");function hi(h){return h===null?"res-unknown-"+(++D).toString():"res-"+h.toString()}i(hi,"createResponseQueueKey");function yi(){return"not-"+(++x).toString()}i(yi,"createNotificationQueueKey");function gi(h,N){n.Message.isRequest(N)?h.set(na(N.id),N):n.Message.isResponse(N)?h.set(hi(N.id),N):h.set(yi(),N)}i(gi,"addMessageToQueue");function vi(h){}i(vi,"cancelUndispatched");function aa(){return kt===k.Listening}i(aa,"isListening");function ia(){return kt===k.Closed}i(ia,"isClosed");function Wt(){return kt===k.Disposed}i(Wt,"isDisposed");function sa(){(kt===k.New||kt===k.Listening)&&(kt=k.Closed,fi.fire(void 0))}i(sa,"closeHandler");function Ti(h){ra.fire([h,void 0,void 0])}i(Ti,"readErrorHandler");function $i(h){ra.fire(h)}i($i,"writeErrorHandler"),y.onClose(sa),y.onError(Ti),E.onClose(sa),E.onError($i);function oa(){Le||De.size===0||(Le=(0,t.default)().timer.setImmediate(()=>{Le=void 0,Ri()}))}i(oa,"triggerMessageQueue");function la(h){n.Message.isRequest(h)?Ai(h):n.Message.isNotification(h)?Ci(h):n.Message.isResponse(h)?Ei(h):_i(h)}i(la,"handleMessage");function Ri(){if(De.size===0)return;const h=De.shift();try{const N=$?.messageStrategy;se.is(N)?N.handleMessage(h,la):la(h)}finally{oa()}}i(Ri,"processMessageQueue");const no=i(h=>{try{if(n.Message.isNotification(h)&&h.method===l.type.method){const N=h.params.id,L=na(N),M=De.get(L);if(n.Message.isRequest(M)){const fe=$?.connectionStrategy,Ce=fe&&fe.cancelUndispatched?fe.cancelUndispatched(M,vi):void 0;if(Ce&&(Ce.error!==void 0||Ce.result!==void 0)){De.delete(L),Je.delete(N),Ce.id=M.id,Lr(Ce,h.method,Date.now()),E.write(Ce).catch(()=>b.error("Sending response for canceled message failed."));return}}const he=Je.get(N);if(he!==void 0){he.cancel(),Jr(h);return}else Ze.add(N)}gi(De,h)}finally{oa()}},"callback");function Ai(h){if(Wt())return;function N(te,$e,le){const xe={jsonrpc:G,id:h.id};te instanceof n.ResponseError?xe.error=te.toJson():xe.result=te===void 0?null:te,Lr(xe,$e,le),E.write(xe).catch(()=>b.error("Sending response failed."))}i(N,"reply");function L(te,$e,le){const xe={jsonrpc:G,id:h.id,error:te.toJson()};Lr(xe,$e,le),E.write(xe).catch(()=>b.error("Sending response failed."))}i(L,"replyError");function M(te,$e,le){te===void 0&&(te=null);const xe={jsonrpc:G,id:h.id,result:te};Lr(xe,$e,le),E.write(xe).catch(()=>b.error("Sending response failed."))}i(M,"replySuccess"),wi(h);const he=Y.get(h.method);let fe,Ce;he&&(fe=he.type,Ce=he.handler);const we=Date.now();if(Ce||W){const te=h.id??String(Date.now()),$e=P.is(Ot.receiver)?Ot.receiver.createCancellationTokenSource(te):Ot.receiver.createCancellationTokenSource(h);h.id!==null&&Ze.has(h.id)&&$e.cancel(),h.id!==null&&Je.set(te,$e);try{let le;if(Ce)if(h.params===void 0){if(fe!==void 0&&fe.numberOfParams!==0){L(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${h.method} defines ${fe.numberOfParams} params but received none.`),h.method,we);return}le=Ce($e.token)}else if(Array.isArray(h.params)){if(fe!==void 0&&fe.parameterStructures===n.ParameterStructures.byName){L(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${h.method} defines parameters by name but received parameters by position`),h.method,we);return}le=Ce(...h.params,$e.token)}else{if(fe!==void 0&&fe.parameterStructures===n.ParameterStructures.byPosition){L(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${h.method} defines parameters by position but received parameters by name`),h.method,we);return}le=Ce(h.params,$e.token)}else W&&(le=W(h.method,h.params,$e.token));const xe=le;le?xe.then?xe.then(Qe=>{Je.delete(te),N(Qe,h.method,we)},Qe=>{Je.delete(te),Qe instanceof n.ResponseError?L(Qe,h.method,we):Qe&&r.string(Qe.message)?L(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${h.method} failed with message: ${Qe.message}`),h.method,we):L(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${h.method} failed unexpectedly without providing any details.`),h.method,we)}):(Je.delete(te),N(le,h.method,we)):(Je.delete(te),M(le,h.method,we))}catch(le){Je.delete(te),le instanceof n.ResponseError?N(le,h.method,we):le&&r.string(le.message)?L(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${h.method} failed with message: ${le.message}`),h.method,we):L(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${h.method} failed unexpectedly without providing any details.`),h.method,we)}}else L(new n.ResponseError(n.ErrorCodes.MethodNotFound,`Unhandled method ${h.method}`),h.method,we)}i(Ai,"handleRequest");function Ei(h){if(!Wt())if(h.id===null)h.error?b.error(`Received response message without id: Error is:
|
|
10
|
+
${JSON.stringify(h.error,void 0,4)}`):b.error("Received response message without id. No further error information provided.");else{const N=h.id,L=ke.get(N);if(Ii(h,L),L!==void 0){ke.delete(N);try{if(h.error){const M=h.error;L.reject(new n.ResponseError(M.code,M.message,M.data))}else if(h.result!==void 0)L.resolve(h.result);else throw new Error("Should never happen.")}catch(M){M.message?b.error(`Response handler '${L.method}' failed with message: ${M.message}`):b.error(`Response handler '${L.method}' failed unexpectedly.`)}}}}i(Ei,"handleResponse");function Ci(h){if(Wt())return;let N,L;if(h.method===l.type.method){const M=h.params.id;Ze.delete(M),Jr(h);return}else{const M=Pe.get(h.method);M&&(L=M.handler,N=M.type)}if(L||V)try{if(Jr(h),L)if(h.params===void 0)N!==void 0&&N.numberOfParams!==0&&N.parameterStructures!==n.ParameterStructures.byName&&b.error(`Notification ${h.method} defines ${N.numberOfParams} params but received none.`),L();else if(Array.isArray(h.params)){const M=h.params;h.method===c.type.method&&M.length===2&&u.is(M[0])?L({token:M[0],value:M[1]}):(N!==void 0&&(N.parameterStructures===n.ParameterStructures.byName&&b.error(`Notification ${h.method} defines parameters by name but received parameters by position`),N.numberOfParams!==h.params.length&&b.error(`Notification ${h.method} defines ${N.numberOfParams} params but received ${M.length} arguments`)),L(...M))}else N!==void 0&&N.parameterStructures===n.ParameterStructures.byPosition&&b.error(`Notification ${h.method} defines parameters by position but received parameters by name`),L(h.params);else V&&V(h.method,h.params)}catch(M){M.message?b.error(`Notification handler '${h.method}' failed with message: ${M.message}`):b.error(`Notification handler '${h.method}' failed unexpectedly.`)}else di.fire(h)}i(Ci,"handleNotification");function _i(h){if(!h){b.error("Received empty message.");return}b.error(`Received message which is neither a response nor a notification message:
|
|
11
|
+
${JSON.stringify(h,null,4)}`);const N=h;if(r.string(N.id)||r.number(N.id)){const L=N.id,M=ke.get(L);M&&M.reject(new Error("The received response has neither a result nor an error property."))}}i(_i,"handleInvalidMessage");function _t(h){if(h!=null)switch(ne){case m.Verbose:return JSON.stringify(h,null,4);case m.Compact:return JSON.stringify(h);default:return}}i(_t,"stringifyTrace");function bi(h){if(!(ne===m.Off||!Ee))if(Kt===v.Text){let N;(ne===m.Verbose||ne===m.Compact)&&h.params&&(N=`Params: ${_t(h.params)}
|
|
12
|
+
|
|
13
|
+
`),Ee.log(`Sending request '${h.method} - (${h.id})'.`,N)}else Vt("send-request",h)}i(bi,"traceSendingRequest");function Si(h){if(!(ne===m.Off||!Ee))if(Kt===v.Text){let N;(ne===m.Verbose||ne===m.Compact)&&(h.params?N=`Params: ${_t(h.params)}
|
|
14
|
+
|
|
15
|
+
`:N=`No parameters provided.
|
|
16
|
+
|
|
17
|
+
`),Ee.log(`Sending notification '${h.method}'.`,N)}else Vt("send-notification",h)}i(Si,"traceSendingNotification");function Lr(h,N,L){if(!(ne===m.Off||!Ee))if(Kt===v.Text){let M;(ne===m.Verbose||ne===m.Compact)&&(h.error&&h.error.data?M=`Error data: ${_t(h.error.data)}
|
|
18
|
+
|
|
19
|
+
`:h.result?M=`Result: ${_t(h.result)}
|
|
20
|
+
|
|
21
|
+
`:h.error===void 0&&(M=`No result returned.
|
|
22
|
+
|
|
23
|
+
`)),Ee.log(`Sending response '${N} - (${h.id})'. Processing request took ${Date.now()-L}ms`,M)}else Vt("send-response",h)}i(Lr,"traceSendingResponse");function wi(h){if(!(ne===m.Off||!Ee))if(Kt===v.Text){let N;(ne===m.Verbose||ne===m.Compact)&&h.params&&(N=`Params: ${_t(h.params)}
|
|
24
|
+
|
|
25
|
+
`),Ee.log(`Received request '${h.method} - (${h.id})'.`,N)}else Vt("receive-request",h)}i(wi,"traceReceivedRequest");function Jr(h){if(!(ne===m.Off||!Ee||h.method===S.type.method))if(Kt===v.Text){let N;(ne===m.Verbose||ne===m.Compact)&&(h.params?N=`Params: ${_t(h.params)}
|
|
26
|
+
|
|
27
|
+
`:N=`No parameters provided.
|
|
28
|
+
|
|
29
|
+
`),Ee.log(`Received notification '${h.method}'.`,N)}else Vt("receive-notification",h)}i(Jr,"traceReceivedNotification");function Ii(h,N){if(!(ne===m.Off||!Ee))if(Kt===v.Text){let L;if((ne===m.Verbose||ne===m.Compact)&&(h.error&&h.error.data?L=`Error data: ${_t(h.error.data)}
|
|
30
|
+
|
|
31
|
+
`:h.result?L=`Result: ${_t(h.result)}
|
|
32
|
+
|
|
33
|
+
`:h.error===void 0&&(L=`No result returned.
|
|
34
|
+
|
|
35
|
+
`)),N){const M=h.error?` Request failed: ${h.error.message} (${h.error.code}).`:"";Ee.log(`Received response '${N.method} - (${h.id})' in ${Date.now()-N.timerStart}ms.${M}`,L)}else Ee.log(`Received response ${h.id} without active response promise.`,L)}else Vt("receive-response",h)}i(Ii,"traceReceivedResponse");function Vt(h,N){if(!Ee||ne===m.Off)return;const L={isLSPMessage:!0,type:h,message:N,timestamp:Date.now()};Ee.log(L)}i(Vt,"logLSPMessage");function cr(){if(ia())throw new I(w.Closed,"Connection is closed.");if(Wt())throw new I(w.Disposed,"Connection is disposed.")}i(cr,"throwIfClosedOrDisposed");function Ni(){if(aa())throw new I(w.AlreadyListening,"Connection is already listening")}i(Ni,"throwIfListening");function Pi(){if(!aa())throw new Error("Call listen() first.")}i(Pi,"throwIfNotListening");function fr(h){return h===void 0?null:h}i(fr,"undefinedToNull");function ua(h){if(h!==null)return h}i(ua,"nullToUndefined");function p(h){return h!=null&&!Array.isArray(h)&&typeof h=="object"}i(p,"isNamedParam");function ae(h,N){switch(h){case n.ParameterStructures.auto:return p(N)?ua(N):[fr(N)];case n.ParameterStructures.byName:if(!p(N))throw new Error("Received parameters by name but param is not an object literal.");return ua(N);case n.ParameterStructures.byPosition:return[fr(N)];default:throw new Error(`Unknown parameter structure ${h.toString()}`)}}i(ae,"computeSingleParam");function Te(h,N){let L;const M=h.numberOfParams;switch(M){case 0:L=void 0;break;case 1:L=ae(h.parameterStructures,N[0]);break;default:L=[];for(let he=0;he<N.length&&he<M;he++)L.push(fr(N[he]));if(N.length<M)for(let he=N.length;he<M;he++)L.push(null);break}return L}i(Te,"computeMessageParams");const q={sendNotification:i((h,...N)=>{cr();let L,M;if(r.string(h)){L=h;const fe=N[0];let Ce=0,we=n.ParameterStructures.auto;n.ParameterStructures.is(fe)&&(Ce=1,we=fe);let te=N.length;const $e=te-Ce;switch($e){case 0:M=void 0;break;case 1:M=ae(we,N[Ce]);break;default:if(we===n.ParameterStructures.byName)throw new Error(`Received ${$e} parameters for 'by Name' notification parameter structure.`);M=N.slice(Ce,te).map(le=>fr(le));break}}else{const fe=N;L=h.method,M=Te(h,fe)}const he={jsonrpc:G,method:L,params:M};return Si(he),E.write(he).catch(fe=>{throw b.error("Sending notification failed."),fe})},"sendNotification"),onNotification:i((h,N)=>{cr();let L;return r.func(h)?V=h:N&&(r.string(h)?(L=h,Pe.set(h,{type:void 0,handler:N})):(L=h.method,Pe.set(h.method,{type:h,handler:N}))),{dispose:i(()=>{L!==void 0?Pe.delete(L):V=void 0},"dispose")}},"onNotification"),onProgress:i((h,N,L)=>{if(oe.has(N))throw new Error(`Progress handler for token ${N} already registered`);return oe.set(N,L),{dispose:i(()=>{oe.delete(N)},"dispose")}},"onProgress"),sendProgress:i((h,N,L)=>q.sendNotification(c.type,{token:N,value:L}),"sendProgress"),onUnhandledProgress:pi.event,sendRequest:i((h,...N)=>{cr(),Pi();let L,M,he;if(r.string(h)){L=h;const te=N[0],$e=N[N.length-1];let le=0,xe=n.ParameterStructures.auto;n.ParameterStructures.is(te)&&(le=1,xe=te);let Qe=N.length;o.CancellationToken.is($e)&&(Qe=Qe-1,he=$e);const qt=Qe-le;switch(qt){case 0:M=void 0;break;case 1:M=ae(xe,N[le]);break;default:if(xe===n.ParameterStructures.byName)throw new Error(`Received ${qt} parameters for 'by Name' request parameter structure.`);M=N.slice(le,Qe).map($I=>fr($I));break}}else{const te=N;L=h.method,M=Te(h,te);const $e=h.numberOfParams;he=o.CancellationToken.is(te[$e])?te[$e]:void 0}const fe=O++;let Ce;he&&(Ce=he.onCancellationRequested(()=>{const te=Ot.sender.sendCancellation(q,fe);return te===void 0?(b.log(`Received no promise from cancellation strategy when cancelling id ${fe}`),Promise.resolve()):te.catch(()=>{b.log(`Sending cancellation messages for id ${fe} failed`)})}));const we={jsonrpc:G,id:fe,method:L,params:M};return bi(we),typeof Ot.sender.enableCancellation=="function"&&Ot.sender.enableCancellation(we),new Promise(async(te,$e)=>{const le=i(qt=>{te(qt),Ot.sender.cleanup(fe),Ce?.dispose()},"resolveWithCleanup"),xe=i(qt=>{$e(qt),Ot.sender.cleanup(fe),Ce?.dispose()},"rejectWithCleanup"),Qe={method:L,timerStart:Date.now(),resolve:le,reject:xe};try{await E.write(we),ke.set(fe,Qe)}catch(qt){throw b.error("Sending request failed."),Qe.reject(new n.ResponseError(n.ErrorCodes.MessageWriteError,qt.message?qt.message:"Unknown reason")),qt}})},"sendRequest"),onRequest:i((h,N)=>{cr();let L=null;return d.is(h)?(L=void 0,W=h):r.string(h)?(L=null,N!==void 0&&(L=h,Y.set(h,{handler:N,type:void 0}))):N!==void 0&&(L=h.method,Y.set(h.method,{type:h,handler:N})),{dispose:i(()=>{L!==null&&(L!==void 0?Y.delete(L):W=void 0)},"dispose")}},"onRequest"),hasPendingResponse:i(()=>ke.size>0,"hasPendingResponse"),trace:i(async(h,N,L)=>{let M=!1,he=v.Text;L!==void 0&&(r.boolean(L)?M=L:(M=L.sendNotification||!1,he=L.traceFormat||v.Text)),ne=h,Kt=he,ne===m.Off?Ee=void 0:Ee=N,M&&!ia()&&!Wt()&&await q.sendNotification(_.type,{value:m.toString(h)})},"trace"),onError:ra.event,onClose:fi.event,onUnhandledNotification:di.event,onDispose:mi.event,end:i(()=>{E.end()},"end"),dispose:i(()=>{if(Wt())return;kt=k.Disposed,mi.fire(void 0);const h=new n.ResponseError(n.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const N of ke.values())N.reject(h);ke=new Map,Je=new Map,Ze=new Set,De=new a.LinkedMap,r.func(E.dispose)&&E.dispose(),r.func(y.dispose)&&y.dispose()},"dispose"),listen:i(()=>{cr(),Ni(),kt=k.Listening,y.listen(no)},"listen"),inspect:i(()=>{(0,t.default)().console.log("inspect")},"inspect")};return q.onNotification(S.type,h=>{if(ne===m.Off||!Ee)return;const N=ne===m.Verbose||ne===m.Compact;Ee.log(h.message,N?h.verbose:void 0)}),q.onNotification(c.type,h=>{const N=oe.get(h.token);N?N(h.value):pi.fire(h)}),q}i(C,"createMessageConnection"),e.createMessageConnection=C}}),Af=H({"../../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=Bg();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=Kg();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=bI();Object.defineProperty(e,"Disposable",{enumerable:!0,get:i(function(){return n.Disposable},"get")});var a=ei();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=xl();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=SI();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=wI();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=II();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=NI();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:i(function(){return c.AbstractMessageBuffer},"get")});var f=PI();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=Dn();e.RAL=d.default}}),kI=H({"../../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=Af(),r=class qg extends t.AbstractMessageBuffer{static{i(this,"MessageBuffer")}constructor(c="utf-8"){super(c),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return qg.emptyBuffer}fromString(c,f){return new TextEncoder().encode(c)}toString(c,f){return f==="ascii"?this.asciiDecoder.decode(c):new TextDecoder(f).decode(c)}asNative(c,f){return f===void 0?c: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 new 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 new 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 new 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){const d=setTimeout(u,c,...f);return{dispose:i(()=>clearTimeout(d),"dispose")}},setImmediate(u,...c){const f=setTimeout(u,0,...c);return{dispose:i(()=>clearTimeout(f),"dispose")}},setInterval(u,c,...f){const 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}}),ti=H({"../../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){d===void 0&&(d=f);var m=Object.getOwnPropertyDescriptor(c,f);(!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){d===void 0&&(d=f),u[d]=c[f]})),r=e&&e.__exportStar||function(u,c){for(var f in u)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=kI();n.default.install();var a=Af();r(Af(),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){return f===void 0&&(f=a.NullLogger),a.ConnectionStrategy.is(d)&&(d={connectionStrategy:d}),(0,a.createMessageConnection)(u,c,f,d)}i(l,"createMessageConnection"),e.createMessageConnection=l}}),uh=H({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){t.exports=ti()}}),Ae=H({"../../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=ti(),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}}),bd=H({"../../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}}),OI=H({"../../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=Ae(),r;(function(n){n.method="textDocument/implementation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ImplementationRequest=r={}))}}),LI=H({"../../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=Ae(),r;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.TypeDefinitionRequest=r={}))}}),DI=H({"../../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=Ae(),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={}))}}),xI=H({"../../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=Ae(),r;(function(n){n.method="workspace/configuration",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ConfigurationRequest=r={}))}}),MI=H({"../../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=Ae(),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={}))}}),GI=H({"../../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=Ae(),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={}))}}),FI=H({"../../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=Ae(),r;(function(n){n.method="textDocument/declaration",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.DeclarationRequest=r={}))}}),zI=H({"../../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=Ae(),r;(function(n){n.method="textDocument/selectionRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.SelectionRangeRequest=r={}))}}),jI=H({"../../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=ti(),r=Ae(),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={}))}}),BI=H({"../../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=Ae(),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={}))}}),UI=H({"../../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=Ae(),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={}))}}),KI=H({"../../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=Ae(),r;(function(n){n.method="window/showDocument",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ShowDocumentRequest=r={}))}}),WI=H({"../../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=Ae(),r;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.LinkedEditingRangeRequest=r={}))}}),VI=H({"../../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=Ae(),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={}))}}),qI=H({"../../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=Ae(),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={}))}}),HI=H({"../../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=Ae(),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={}))}}),YI=H({"../../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=Ae(),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={}))}}),XI=H({"../../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=Ae(),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={}))}}),JI=H({"../../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=ti(),r=bd(),n=Ae(),a;(function(c){function f(d){const 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={}))}}),ZI=H({"../../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=(xs(),_d(Dl)),r=bd(),n=Ae(),a;(function(v){v.Markup=1,v.Code=2;function _(S){return S===1||S===2}i(_,"is"),v.is=_})(a||(e.NotebookCellKind=a={}));var s;(function(v){function _(I,R){const P={executionOrder:I};return(R===!0||R===!1)&&(P.success=R),P}i(_,"create"),v.create=_;function S(I){const R=I;return r.objectLiteral(R)&&t.uinteger.is(R.executionOrder)&&(R.success===void 0||r.boolean(R.success))}i(S,"is"),v.is=S;function w(I,R){return I===R?!0:I==null||R===null||R===void 0?!1:I.executionOrder===R.executionOrder&&I.success===R.success}i(w,"equals"),v.equals=w})(s||(e.ExecutionSummary=s={}));var o;(function(v){function _(R,P){return{kind:R,document:P}}i(_,"create"),v.create=_;function S(R){const P=R;return r.objectLiteral(P)&&a.is(P.kind)&&t.DocumentUri.is(P.document)&&(P.metadata===void 0||r.objectLiteral(P.metadata))}i(S,"is"),v.is=S;function w(R,P){const z=new Set;return R.document!==P.document&&z.add("document"),R.kind!==P.kind&&z.add("kind"),R.executionSummary!==P.executionSummary&&z.add("executionSummary"),(R.metadata!==void 0||P.metadata!==void 0)&&!I(R.metadata,P.metadata)&&z.add("metadata"),(R.executionSummary!==void 0||P.executionSummary!==void 0)&&!s.equals(R.executionSummary,P.executionSummary)&&z.add("executionSummary"),z}i(w,"diff"),v.diff=w;function I(R,P){if(R===P)return!0;if(R==null||P===null||P===void 0||typeof R!=typeof P||typeof R!="object")return!1;const z=Array.isArray(R),X=Array.isArray(P);if(z!==X)return!1;if(z&&X){if(R.length!==P.length)return!1;for(let Z=0;Z<R.length;Z++)if(!I(R[Z],P[Z]))return!1}if(r.objectLiteral(R)&&r.objectLiteral(P)){const Z=Object.keys(R),ce=Object.keys(P);if(Z.length!==ce.length||(Z.sort(),ce.sort(),!I(Z,ce)))return!1;for(let se=0;se<Z.length;se++){const Se=Z[se];if(!I(R[Se],P[Se]))return!1}}return!0}i(I,"equalsMetadata")})(o||(e.NotebookCell=o={}));var l;(function(v){function _(w,I,R,P){return{uri:w,notebookType:I,version:R,cells:P}}i(_,"create"),v.create=_;function S(w){const I=w;return r.objectLiteral(I)&&r.string(I.uri)&&t.integer.is(I.version)&&r.typedArray(I.cells,o.is)}i(S,"is"),v.is=S})(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 _(w){const I=w;return r.objectLiteral(I)&&t.uinteger.is(I.start)&&t.uinteger.is(I.deleteCount)&&(I.cells===void 0||r.typedArray(I.cells,o.is))}i(_,"is"),v.is=_;function S(w,I,R){const P={start:w,deleteCount:I};return R!==void 0&&(P.cells=R),P}i(S,"create"),v.create=S})(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={}))}}),QI=H({"../../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=Ae(),r;(function(n){n.method="textDocument/inlineCompletion",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.InlineCompletionRequest=r={}))}}),eN=H({"../../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=Ae(),r=(xs(),_d(Dl)),n=bd(),a=OI();Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:i(function(){return a.ImplementationRequest},"get")});var s=LI();Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:i(function(){return s.TypeDefinitionRequest},"get")});var o=DI();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=xI();Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:i(function(){return l.ConfigurationRequest},"get")});var u=MI();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=GI();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=FI();Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:i(function(){return f.DeclarationRequest},"get")});var d=zI();Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:i(function(){return d.SelectionRangeRequest},"get")});var m=jI();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=BI();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=UI();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 _=KI();Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:i(function(){return _.ShowDocumentRequest},"get")});var S=WI();Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:i(function(){return S.LinkedEditingRangeRequest},"get")});var w=VI();Object.defineProperty(e,"FileOperationPatternKind",{enumerable:!0,get:i(function(){return w.FileOperationPatternKind},"get")}),Object.defineProperty(e,"DidCreateFilesNotification",{enumerable:!0,get:i(function(){return w.DidCreateFilesNotification},"get")}),Object.defineProperty(e,"WillCreateFilesRequest",{enumerable:!0,get:i(function(){return w.WillCreateFilesRequest},"get")}),Object.defineProperty(e,"DidRenameFilesNotification",{enumerable:!0,get:i(function(){return w.DidRenameFilesNotification},"get")}),Object.defineProperty(e,"WillRenameFilesRequest",{enumerable:!0,get:i(function(){return w.WillRenameFilesRequest},"get")}),Object.defineProperty(e,"DidDeleteFilesNotification",{enumerable:!0,get:i(function(){return w.DidDeleteFilesNotification},"get")}),Object.defineProperty(e,"WillDeleteFilesRequest",{enumerable:!0,get:i(function(){return w.WillDeleteFilesRequest},"get")});var I=qI();Object.defineProperty(e,"UniquenessLevel",{enumerable:!0,get:i(function(){return I.UniquenessLevel},"get")}),Object.defineProperty(e,"MonikerKind",{enumerable:!0,get:i(function(){return I.MonikerKind},"get")}),Object.defineProperty(e,"MonikerRequest",{enumerable:!0,get:i(function(){return I.MonikerRequest},"get")});var R=HI();Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:i(function(){return R.TypeHierarchyPrepareRequest},"get")}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:i(function(){return R.TypeHierarchySubtypesRequest},"get")}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:i(function(){return R.TypeHierarchySupertypesRequest},"get")});var P=YI();Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:i(function(){return P.InlineValueRequest},"get")}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:i(function(){return P.InlineValueRefreshRequest},"get")});var z=XI();Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:i(function(){return z.InlayHintRequest},"get")}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:i(function(){return z.InlayHintResolveRequest},"get")}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:i(function(){return z.InlayHintRefreshRequest},"get")});var X=JI();Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:i(function(){return X.DiagnosticServerCancellationData},"get")}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:i(function(){return X.DocumentDiagnosticReportKind},"get")}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:i(function(){return X.DocumentDiagnosticRequest},"get")}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:i(function(){return X.WorkspaceDiagnosticRequest},"get")}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:i(function(){return X.DiagnosticRefreshRequest},"get")});var Z=ZI();Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:i(function(){return Z.NotebookCellKind},"get")}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:i(function(){return Z.ExecutionSummary},"get")}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:i(function(){return Z.NotebookCell},"get")}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:i(function(){return Z.NotebookDocument},"get")}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:i(function(){return Z.NotebookDocumentSyncRegistrationType},"get")}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:i(function(){return Z.DidOpenNotebookDocumentNotification},"get")}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:i(function(){return Z.NotebookCellArrayChange},"get")}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:i(function(){return Z.DidChangeNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:i(function(){return Z.DidSaveNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:i(function(){return Z.DidCloseNotebookDocumentNotification},"get")});var ce=QI();Object.defineProperty(e,"InlineCompletionRequest",{enumerable:!0,get:i(function(){return ce.InlineCompletionRequest},"get")});var se;(function(p){function ae(Te){const q=Te;return n.string(q)||n.string(q.language)||n.string(q.scheme)||n.string(q.pattern)}i(ae,"is"),p.is=ae})(se||(e.TextDocumentFilter=se={}));var Se;(function(p){function ae(Te){const q=Te;return n.objectLiteral(q)&&(n.string(q.notebookType)||n.string(q.scheme)||n.string(q.pattern))}i(ae,"is"),p.is=ae})(Se||(e.NotebookDocumentFilter=Se={}));var k;(function(p){function ae(Te){const q=Te;return n.objectLiteral(q)&&(n.string(q.notebook)||Se.is(q.notebook))&&(q.language===void 0||n.string(q.language))}i(ae,"is"),p.is=ae})(k||(e.NotebookCellTextDocumentFilter=k={}));var C;(function(p){function ae(Te){if(!Array.isArray(Te))return!1;for(let q of Te)if(!n.string(q)&&!se.is(q)&&!k.is(q))return!1;return!0}i(ae,"is"),p.is=ae})(C||(e.DocumentSelector=C={}));var y;(function(p){p.method="client/registerCapability",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolRequestType(p.method)})(y||(e.RegistrationRequest=y={}));var E;(function(p){p.method="client/unregisterCapability",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolRequestType(p.method)})(E||(e.UnregistrationRequest=E={}));var T;(function(p){p.Create="create",p.Rename="rename",p.Delete="delete"})(T||(e.ResourceOperationKind=T={}));var $;(function(p){p.Abort="abort",p.Transactional="transactional",p.TextOnlyTransactional="textOnlyTransactional",p.Undo="undo"})($||(e.FailureHandlingKind=$={}));var b;(function(p){p.UTF8="utf-8",p.UTF16="utf-16",p.UTF32="utf-32"})(b||(e.PositionEncodingKind=b={}));var O;(function(p){function ae(Te){const q=Te;return q&&n.string(q.id)&&q.id.length>0}i(ae,"hasId"),p.hasId=ae})(O||(e.StaticRegistrationOptions=O={}));var x;(function(p){function ae(Te){const q=Te;return q&&(q.documentSelector===null||C.is(q.documentSelector))}i(ae,"is"),p.is=ae})(x||(e.TextDocumentRegistrationOptions=x={}));var D;(function(p){function ae(q){const h=q;return n.objectLiteral(h)&&(h.workDoneProgress===void 0||n.boolean(h.workDoneProgress))}i(ae,"is"),p.is=ae;function Te(q){const h=q;return h&&n.boolean(h.workDoneProgress)}i(Te,"hasWorkDoneProgress"),p.hasWorkDoneProgress=Te})(D||(e.WorkDoneProgressOptions=D={}));var G;(function(p){p.method="initialize",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(G||(e.InitializeRequest=G={}));var W;(function(p){p.unknownProtocolVersion=1})(W||(e.InitializeErrorCodes=W={}));var Y;(function(p){p.method="initialized",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(Y||(e.InitializedNotification=Y={}));var V;(function(p){p.method="shutdown",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType0(p.method)})(V||(e.ShutdownRequest=V={}));var Pe;(function(p){p.method="exit",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType0(p.method)})(Pe||(e.ExitNotification=Pe={}));var oe;(function(p){p.method="workspace/didChangeConfiguration",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(oe||(e.DidChangeConfigurationNotification=oe={}));var Le;(function(p){p.Error=1,p.Warning=2,p.Info=3,p.Log=4,p.Debug=5})(Le||(e.MessageType=Le={}));var De;(function(p){p.method="window/showMessage",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolNotificationType(p.method)})(De||(e.ShowMessageNotification=De={}));var ke;(function(p){p.method="window/showMessageRequest",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolRequestType(p.method)})(ke||(e.ShowMessageRequest=ke={}));var Ze;(function(p){p.method="window/logMessage",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolNotificationType(p.method)})(Ze||(e.LogMessageNotification=Ze={}));var Je;(function(p){p.method="telemetry/event",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolNotificationType(p.method)})(Je||(e.TelemetryEventNotification=Je={}));var ne;(function(p){p.None=0,p.Full=1,p.Incremental=2})(ne||(e.TextDocumentSyncKind=ne={}));var Kt;(function(p){p.method="textDocument/didOpen",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(Kt||(e.DidOpenTextDocumentNotification=Kt={}));var Ee;(function(p){function ae(q){let h=q;return h!=null&&typeof h.text=="string"&&h.range!==void 0&&(h.rangeLength===void 0||typeof h.rangeLength=="number")}i(ae,"isIncremental"),p.isIncremental=ae;function Te(q){let h=q;return h!=null&&typeof h.text=="string"&&h.range===void 0&&h.rangeLength===void 0}i(Te,"isFull"),p.isFull=Te})(Ee||(e.TextDocumentContentChangeEvent=Ee={}));var kt;(function(p){p.method="textDocument/didChange",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(kt||(e.DidChangeTextDocumentNotification=kt={}));var ra;(function(p){p.method="textDocument/didClose",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(ra||(e.DidCloseTextDocumentNotification=ra={}));var fi;(function(p){p.method="textDocument/didSave",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(fi||(e.DidSaveTextDocumentNotification=fi={}));var di;(function(p){p.Manual=1,p.AfterDelay=2,p.FocusOut=3})(di||(e.TextDocumentSaveReason=di={}));var pi;(function(p){p.method="textDocument/willSave",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(pi||(e.WillSaveTextDocumentNotification=pi={}));var mi;(function(p){p.method="textDocument/willSaveWaitUntil",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(mi||(e.WillSaveTextDocumentWaitUntilRequest=mi={}));var Ot;(function(p){p.method="workspace/didChangeWatchedFiles",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(Ot||(e.DidChangeWatchedFilesNotification=Ot={}));var na;(function(p){p.Created=1,p.Changed=2,p.Deleted=3})(na||(e.FileChangeType=na={}));var hi;(function(p){function ae(Te){const q=Te;return n.objectLiteral(q)&&(r.URI.is(q.baseUri)||r.WorkspaceFolder.is(q.baseUri))&&n.string(q.pattern)}i(ae,"is"),p.is=ae})(hi||(e.RelativePattern=hi={}));var yi;(function(p){p.Create=1,p.Change=2,p.Delete=4})(yi||(e.WatchKind=yi={}));var gi;(function(p){p.method="textDocument/publishDiagnostics",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolNotificationType(p.method)})(gi||(e.PublishDiagnosticsNotification=gi={}));var vi;(function(p){p.Invoked=1,p.TriggerCharacter=2,p.TriggerForIncompleteCompletions=3})(vi||(e.CompletionTriggerKind=vi={}));var aa;(function(p){p.method="textDocument/completion",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(aa||(e.CompletionRequest=aa={}));var ia;(function(p){p.method="completionItem/resolve",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(ia||(e.CompletionResolveRequest=ia={}));var Wt;(function(p){p.method="textDocument/hover",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Wt||(e.HoverRequest=Wt={}));var sa;(function(p){p.Invoked=1,p.TriggerCharacter=2,p.ContentChange=3})(sa||(e.SignatureHelpTriggerKind=sa={}));var Ti;(function(p){p.method="textDocument/signatureHelp",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Ti||(e.SignatureHelpRequest=Ti={}));var $i;(function(p){p.method="textDocument/definition",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})($i||(e.DefinitionRequest=$i={}));var oa;(function(p){p.method="textDocument/references",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(oa||(e.ReferencesRequest=oa={}));var la;(function(p){p.method="textDocument/documentHighlight",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(la||(e.DocumentHighlightRequest=la={}));var Ri;(function(p){p.method="textDocument/documentSymbol",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Ri||(e.DocumentSymbolRequest=Ri={}));var no;(function(p){p.method="textDocument/codeAction",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(no||(e.CodeActionRequest=no={}));var Ai;(function(p){p.method="codeAction/resolve",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Ai||(e.CodeActionResolveRequest=Ai={}));var Ei;(function(p){p.method="workspace/symbol",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Ei||(e.WorkspaceSymbolRequest=Ei={}));var Ci;(function(p){p.method="workspaceSymbol/resolve",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Ci||(e.WorkspaceSymbolResolveRequest=Ci={}));var _i;(function(p){p.method="textDocument/codeLens",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(_i||(e.CodeLensRequest=_i={}));var _t;(function(p){p.method="codeLens/resolve",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(_t||(e.CodeLensResolveRequest=_t={}));var bi;(function(p){p.method="workspace/codeLens/refresh",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolRequestType0(p.method)})(bi||(e.CodeLensRefreshRequest=bi={}));var Si;(function(p){p.method="textDocument/documentLink",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Si||(e.DocumentLinkRequest=Si={}));var Lr;(function(p){p.method="documentLink/resolve",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Lr||(e.DocumentLinkResolveRequest=Lr={}));var wi;(function(p){p.method="textDocument/formatting",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(wi||(e.DocumentFormattingRequest=wi={}));var Jr;(function(p){p.method="textDocument/rangeFormatting",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Jr||(e.DocumentRangeFormattingRequest=Jr={}));var Ii;(function(p){p.method="textDocument/rangesFormatting",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Ii||(e.DocumentRangesFormattingRequest=Ii={}));var Vt;(function(p){p.method="textDocument/onTypeFormatting",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Vt||(e.DocumentOnTypeFormattingRequest=Vt={}));var cr;(function(p){p.Identifier=1})(cr||(e.PrepareSupportDefaultBehavior=cr={}));var Ni;(function(p){p.method="textDocument/rename",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Ni||(e.RenameRequest=Ni={}));var Pi;(function(p){p.method="textDocument/prepareRename",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Pi||(e.PrepareRenameRequest=Pi={}));var fr;(function(p){p.method="workspace/executeCommand",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(fr||(e.ExecuteCommandRequest=fr={}));var ua;(function(p){p.method="workspace/applyEdit",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolRequestType("workspace/applyEdit")})(ua||(e.ApplyWorkspaceEditRequest=ua={}))}}),tN=H({"../../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=ti();function r(n,a,s,o){return t.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,t.createMessageConnection)(n,a,s,o)}i(r,"createProtocolConnection"),e.createProtocolConnection=r}}),rN=H({"../../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){u===void 0&&(u=l);var c=Object.getOwnPropertyDescriptor(o,l);(!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){u===void 0&&(u=l),s[u]=o[l]})),r=e&&e.__exportStar||function(s,o){for(var l in s)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(ti(),e),r((xs(),_d(Dl)),e),r(Ae(),e),r(eN(),e);var n=tN();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={}))}}),nN=H({"../../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){u===void 0&&(u=l);var c=Object.getOwnPropertyDescriptor(o,l);(!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){u===void 0&&(u=l),s[u]=o[l]})),r=e&&e.__exportStar||function(s,o){for(var l in s)l!=="default"&&!Object.prototype.hasOwnProperty.call(o,l)&&t(o,s,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=uh();r(uh(),e),r(rN(),e);function a(s,o,l,u){return(0,n.createMessageConnection)(s,o,l,u)}i(a,"createProtocolConnection"),e.createProtocolConnection=a}}),Hg={};Vr(Hg,{AbstractAstReflection:()=>Id,AbstractCstNode:()=>Pm,AbstractLangiumParser:()=>Om,AbstractParserErrorMessageProvider:()=>MS,AbstractThreadedAsyncParser:()=>SF,AstUtils:()=>Nd,BiMap:()=>Nl,Cancellation:()=>pe,CompositeCstNodeImpl:()=>ku,ContextCache:()=>Fu,CstNodeBuilder:()=>OS,CstUtils:()=>Sd,DEFAULT_TOKENIZE_OPTIONS:()=>Jm,DONE_RESULT:()=>tt,DatatypeSymbol:()=>bl,DefaultAstNodeDescriptionProvider:()=>pw,DefaultAstNodeLocator:()=>hw,DefaultAsyncParser:()=>Ow,DefaultCommentProvider:()=>kw,DefaultConfigurationProvider:()=>yw,DefaultDocumentBuilder:()=>gw,DefaultDocumentValidator:()=>dw,DefaultHydrator:()=>Dw,DefaultIndexManager:()=>vw,DefaultJsonSerializer:()=>lw,DefaultLangiumDocumentFactory:()=>QS,DefaultLangiumDocuments:()=>ew,DefaultLangiumProfiler:()=>kF,DefaultLexer:()=>Zm,DefaultLexerErrorMessageProvider:()=>$w,DefaultLinker:()=>tw,DefaultNameProvider:()=>rw,DefaultReferenceDescriptionProvider:()=>mw,DefaultReferences:()=>nw,DefaultScopeComputation:()=>aw,DefaultScopeProvider:()=>ow,DefaultServiceRegistry:()=>uw,DefaultTokenBuilder:()=>Du,DefaultValueConverter:()=>zm,DefaultWorkspaceLock:()=>Lw,DefaultWorkspaceManager:()=>Tw,Deferred:()=>wr,Disposable:()=>Nn,DisposableCache:()=>Gu,DocumentCache:()=>sw,DocumentState:()=>J,DocumentValidator:()=>bt,EMPTY_SCOPE:()=>EF,EMPTY_STREAM:()=>Ua,EmptyFileSystem:()=>Xe,EmptyFileSystemProvider:()=>Gw,ErrorWithLocation:()=>Wl,GrammarAST:()=>Jg,GrammarUtils:()=>sp,IndentationAwareLexer:()=>IF,IndentationAwareTokenBuilder:()=>Mw,JSDocDocumentationProvider:()=>Pw,LangiumCompletionParser:()=>GS,LangiumParser:()=>xS,LangiumParserErrorMessageProvider:()=>Lm,LeafCstNodeImpl:()=>_l,LexingMode:()=>wn,MapScope:()=>AF,Module:()=>nd,MultiMap:()=>Ir,MultiMapScope:()=>iw,OperationCancelled:()=>tr,ParserWorker:()=>wF,ProfilingTask:()=>zw,Reduction:()=>Ts,RefResolving:()=>un,RegExpUtils:()=>lp,RootCstNodeImpl:()=>km,SimpleCache:()=>Vm,StreamImpl:()=>er,StreamScope:()=>Qf,TextDocument:()=>wl,TreeStreamImpl:()=>Ka,URI:()=>Tt,UriTrie:()=>Km,UriUtils:()=>nt,VALIDATE_EACH_NODE:()=>fw,ValidationCategory:()=>Pl,ValidationRegistry:()=>cw,ValueConverter:()=>Zt,WorkspaceCache:()=>qm,assertCondition:()=>op,assertUnreachable:()=>qr,createCompletionParser:()=>Mm,createDefaultCoreModule:()=>je,createDefaultSharedCoreModule:()=>Be,createGrammarConfig:()=>bp,createLangiumParser:()=>Gm,createParser:()=>Ou,delayNextTick:()=>xu,diagnosticData:()=>Sn,eagerLoad:()=>ih,getDiagnosticRange:()=>Ym,indentationBuilderDefaultOptions:()=>id,inject:()=>ee,interruptAndCheck:()=>ze,isAstNode:()=>Oe,isAstNodeDescription:()=>wd,isAstNodeWithComment:()=>Hm,isCompositeCstNode:()=>$r,isIMultiModeLexerDefinition:()=>Bu,isJSDoc:()=>eh,isLeafCstNode:()=>xn,isLinkingError:()=>pn,isMultiReference:()=>rr,isNamed:()=>Wm,isOperationCancelled:()=>ta,isReference:()=>rt,isRootCstNode:()=>Ml,isTokenTypeArray:()=>ju,isTokenTypeDictionary:()=>kl,loadGrammarFromJson:()=>Ue,parseJSDoc:()=>Qm,prepareLangiumParser:()=>Fm,setInterruptionPeriod:()=>jm,startCancelableOperation:()=>Mu,stream:()=>ue,toDiagnosticData:()=>Xm,toDiagnosticSeverity:()=>gs});var Sd={};Vr(Sd,{DefaultNameRegexp:()=>tp,RangeComparison:()=>Qt,compareRange:()=>Qd,findCommentNode:()=>rp,findDeclarationNodeAtOffset:()=>yv,findLeafNodeAtOffset:()=>Kl,findLeafNodeBeforeOffset:()=>np,flattenCst:()=>hv,getDatatypeNode:()=>mv,getInteriorNodes:()=>Tv,getNextNode:()=>gv,getPreviousNode:()=>ip,getStartlineNode:()=>vv,inRange:()=>ep,isChildNode:()=>Zd,isCommentNode:()=>ul,streamCst:()=>Ha,toDocumentSegment:()=>Ya,tokenToRange:()=>$s});function Oe(e){return typeof e=="object"&&e!==null&&typeof e.$type=="string"}i(Oe,"isAstNode");function rt(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"ref"in e}i(rt,"isReference");function rr(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"items"in e}i(rr,"isMultiReference");function wd(e){return typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.path=="string"}i(wd,"isAstNodeDescription");function pn(e){return typeof e=="object"&&e!==null&&typeof e.info=="object"&&typeof e.message=="string"}i(pn,"isLinkingError");var Id=class{static{i(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=t.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const t=this.types[e];return t||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return Oe(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const n=r[t];if(n!==void 0)return n;{const a=this.types[e],s=a?a.superTypes.some(o=>this.isSubtype(o,t)):!1;return r[t]=s,s}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const r=this.getAllTypes(),n=[];for(const a of r)this.isSubtype(a,e)&&n.push(a);return this.allSubtypes[e]=n,n}}};function $r(e){return typeof e=="object"&&e!==null&&Array.isArray(e.content)}i($r,"isCompositeCstNode");function xn(e){return typeof e=="object"&&e!==null&&typeof e.tokenType=="object"}i(xn,"isLeafCstNode");function Ml(e){return $r(e)&&typeof e.fullText=="string"}i(Ml,"isRootCstNode");var er=class hr{static{i(this,"StreamImpl")}constructor(t,r){this.startFn=t,this.nextFn=r}iterator(){const t={state:this.startFn(),next:i(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const t=this.iterator();let r=0,n=t.next();for(;!n.done;)r++,n=t.next();return r}toArray(){const t=[],r=this.iterator();let n;do n=r.next(),n.value!==void 0&&t.push(n.value);while(!n.done);return t}toSet(){return new Set(this)}toMap(t,r){const n=this.map(a=>[t?t(a):a,r?r(a):a]);return new Map(n)}toString(){return this.join()}concat(t){return new hr(()=>({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 tt})}join(t=","){const r=this.iterator();let n="",a,s=!1;do a=r.next(),a.done||(s&&(n+=t),n+=Yg(a.value)),s=!0;while(!a.done);return n}indexOf(t,r=0){const n=this.iterator();let a=0,s=n.next();for(;!s.done;){if(a>=r&&s.value===t)return a;s=n.next(),a++}return-1}every(t){const r=this.iterator();let n=r.next();for(;!n.done;){if(!t(n.value))return!1;n=r.next()}return!0}some(t){const r=this.iterator();let n=r.next();for(;!n.done;){if(t(n.value))return!0;n=r.next()}return!1}forEach(t){const r=this.iterator();let n=0,a=r.next();for(;!a.done;)t(a.value,n),a=r.next(),n++}map(t){return new hr(this.startFn,r=>{const{done:n,value:a}=this.nextFn(r);return n?tt:{done:!1,value:t(a)}})}filter(t){return new hr(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&t(n.value))return n;while(!n.done);return tt})}nonNullable(){return this.filter(t=>t!=null)}reduce(t,r){const n=this.iterator();let a=r,s=n.next();for(;!s.done;)a===void 0?a=s.value:a=t(a,s.value),s=n.next();return a}reduceRight(t,r){return this.recursiveReduce(this.iterator(),t,r)}recursiveReduce(t,r,n){const a=t.next();if(a.done)return n;const s=this.recursiveReduce(t,r,n);return s===void 0?a.value:r(s,a.value)}find(t){const r=this.iterator();let n=r.next();for(;!n.done;){if(t(n.value))return n.value;n=r.next()}}findIndex(t){const r=this.iterator();let n=0,a=r.next();for(;!a.done;){if(t(a.value))return n;a=r.next(),n++}return-1}includes(t){const r=this.iterator();let n=r.next();for(;!n.done;){if(n.value===t)return!0;n=r.next()}return!1}flatMap(t){return new hr(()=>({this:this.startFn()}),r=>{do{if(r.iterator){const s=r.iterator.next();if(s.done)r.iterator=void 0;else return s}const{done:n,value:a}=this.nextFn(r.this);if(!n){const s=t(a);if(vs(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(r.iterator);return tt})}flat(t){if(t===void 0&&(t=1),t<=0)return this;const r=t>1?this.flat(t-1):this;return new hr(()=>({this:r.startFn()}),n=>{do{if(n.iterator){const o=n.iterator.next();if(o.done)n.iterator=void 0;else return o}const{done:a,value:s}=r.nextFn(n.this);if(!a)if(vs(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(n.iterator);return tt})}head(){const r=this.iterator().next();if(!r.done)return r.value}tail(t=1){return new hr(()=>{const 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 hr(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>t?tt:this.nextFn(r.state)))}distinct(t){return new hr(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){const a=t?t(n.value):n.value;if(!r.set.has(a))return r.set.add(a),n}while(!n.done);return tt})}exclude(t,r){const n=new Set;for(const a of t){const s=r?r(a):a;n.add(s)}return this.filter(a=>{const s=r?r(a):a;return!n.has(s)})}};function Yg(e){return typeof e=="string"?e:typeof e>"u"?"undefined":typeof e.toString=="function"?e.toString():Object.prototype.toString.call(e)}i(Yg,"toString");function vs(e){return!!e&&typeof e[Symbol.iterator]=="function"}i(vs,"isIterable");var Ua=new er(()=>{},()=>tt),tt=Object.freeze({done:!0,value:void 0});function ue(...e){if(e.length===1){const t=e[0];if(t instanceof er)return t;if(vs(t))return new er(()=>t[Symbol.iterator](),r=>r.next());if(typeof t.length=="number")return new er(()=>({index:0}),r=>r.index<t.length?{done:!1,value:t[r.index++]}:tt)}return e.length>1?new er(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){const 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){const r=e[t.collIndex++];vs(r)?t.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(t.array=r)}}while(t.iterator||t.array||t.collIndex<e.length);return tt}):Ua}i(ue,"stream");var Ka=class extends er{static{i(this,"TreeStreamImpl")}constructor(e,t,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),n=>{for(n.pruned&&(n.iterators.pop(),n.pruned=!1);n.iterators.length>0;){const 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 tt})}iterator(){const e={state:this.startFn(),next:i(()=>this.nextFn(e.state),"next"),prune:i(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},Ts;(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})(Ts||(Ts={}));var Nd={};Vr(Nd,{assignMandatoryProperties:()=>Pd,copyAstNode:()=>Yo,findRootNode:()=>Fa,getContainerOfType:()=>Mn,getDocument:()=>Mt,getReferenceNodes:()=>qo,hasContainerOfType:()=>Xg,linkContentToContainer:()=>Wa,streamAllContents:()=>Nr,streamAst:()=>Gt,streamContents:()=>Gs,streamReferences:()=>Va});function Wa(e,t={}){for(const[r,n]of Object.entries(e))r.startsWith("$")||(Array.isArray(n)?n.forEach((a,s)=>{Oe(a)&&(a.$container=e,a.$containerProperty=r,a.$containerIndex=s,t.deep&&Wa(a,t))}):Oe(n)&&(n.$container=e,n.$containerProperty=r,t.deep&&Wa(n,t)))}i(Wa,"linkContentToContainer");function Mn(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}i(Mn,"getContainerOfType");function Xg(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}i(Xg,"hasContainerOfType");function Mt(e){const r=Fa(e).$document;if(!r)throw new Error("AST node has no document.");return r}i(Mt,"getDocument");function Fa(e){for(;e.$container;)e=e.$container;return e}i(Fa,"findRootNode");function qo(e){return rt(e)?e.ref?[e.ref]:[]:rr(e)?e.items.map(t=>t.ref):[]}i(qo,"getReferenceNodes");function Gs(e,t){if(!e)throw new Error("Node must be an AstNode.");const r=t?.range;return new er(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){const a=n.keys[n.keyIndex];if(!a.startsWith("$")){const s=e[a];if(Oe(s)){if(n.keyIndex++,Ho(s,r))return{done:!1,value:s}}else if(Array.isArray(s)){for(;n.arrayIndex<s.length;){const o=n.arrayIndex++,l=s[o];if(Oe(l)&&Ho(l,r))return{done:!1,value:l}}n.arrayIndex=0}}n.keyIndex++}return tt})}i(Gs,"streamContents");function Nr(e,t){if(!e)throw new Error("Root node must be an AstNode.");return new Ka(e,r=>Gs(r,t))}i(Nr,"streamAllContents");function Gt(e,t){if(e){if(t?.range&&!Ho(e,t.range))return new Ka(e,()=>[])}else throw new Error("Root node must be an AstNode.");return new Ka(e,r=>Gs(r,t),{includeRoot:!0})}i(Gt,"streamAst");function Ho(e,t){if(!t)return!0;const r=e.$cstNode?.range;return r?ep(r,t):!1}i(Ho,"isAstNodeInRange");function Va(e){return new er(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){const r=t.keys[t.keyIndex];if(!r.startsWith("$")){const n=e[r];if(rt(n)||rr(n))return t.keyIndex++,{done:!1,value:{reference:n,container:e,property:r}};if(Array.isArray(n)){for(;t.arrayIndex<n.length;){const a=t.arrayIndex++,s=n[a];if(rt(s)||rr(n))return{done:!1,value:{reference:s,container:e,property:r,index:a}}}t.arrayIndex=0}}t.keyIndex++}return tt})}i(Va,"streamReferences");function Pd(e,t){const r=e.getTypeMetaData(t.$type),n=t;for(const a of Object.values(r.properties))a.defaultValue!==void 0&&n[a.name]===void 0&&(n[a.name]=kd(a.defaultValue))}i(Pd,"assignMandatoryProperties");function kd(e){return Array.isArray(e)?[...e.map(kd)]:e}i(kd,"copyDefaultValue");function Yo(e,t,r){const n={$type:e.$type};r&&(r.set(e,n),r.set(n,e));for(const[a,s]of Object.entries(e))if(!a.startsWith("$"))if(Oe(s))n[a]=Yo(s,t,r);else if(rt(s))n[a]=t(n,a,s.$refNode,s.$refText,s);else if(Array.isArray(s)){const o=[];for(const l of s)Oe(l)?o.push(Yo(l,t,r)):rt(l)?o.push(t(n,a,l.$refNode,l.$refText,l)):o.push(l);n[a]=o}else n[a]=s;return Wa(n,{deep:!0}),n}i(Yo,"copyAstNode");var Jg={};Vr(Jg,{AbstractElement:()=>dt,AbstractParserRule:()=>ns,AbstractRule:()=>Pa,AbstractType:()=>vt,Action:()=>xr,Alternatives:()=>as,ArrayLiteral:()=>Xo,ArrayType:()=>Jo,Assignment:()=>Mr,BooleanLiteral:()=>Zo,CharacterRange:()=>Gr,Condition:()=>Fr,Conjunction:()=>is,CrossReference:()=>zr,Disjunction:()=>ss,EndOfFile:()=>Qo,Grammar:()=>gr,GrammarImport:()=>el,Group:()=>mn,InferredType:()=>tl,InfixRule:()=>Jt,InfixRuleOperatorList:()=>os,InfixRuleOperators:()=>rl,Interface:()=>ka,Keyword:()=>Oa,LangiumGrammarAstReflection:()=>Jd,LangiumGrammarTerminals:()=>aN,NamedArgument:()=>La,NegatedToken:()=>hn,Negation:()=>nl,NumberLiteral:()=>al,Parameter:()=>Da,ParameterReference:()=>il,ParserRule:()=>Lt,ReferenceType:()=>ls,RegexToken:()=>yn,ReturnType:()=>sl,RuleCall:()=>gn,SimpleType:()=>xa,StringLiteral:()=>ol,TerminalAlternatives:()=>vn,TerminalElement:()=>pt,TerminalGroup:()=>Tn,TerminalRule:()=>vr,TerminalRuleCall:()=>$n,Type:()=>us,TypeAttribute:()=>Rn,TypeDefinition:()=>An,UnionType:()=>ll,UnorderedGroup:()=>cs,UntilToken:()=>En,ValueLiteral:()=>Cn,Wildcard:()=>Ma,isAbstractElement:()=>Gl,isAbstractParserRule:()=>Gn,isAbstractRule:()=>Zg,isAbstractType:()=>Qg,isAction:()=>jr,isAlternatives:()=>Fl,isArrayLiteral:()=>ev,isArrayType:()=>Od,isAssignment:()=>Rr,isBooleanLiteral:()=>Ld,isCharacterRange:()=>Dd,isCondition:()=>tv,isConjunction:()=>xd,isCrossReference:()=>Fn,isDisjunction:()=>Md,isEndOfFile:()=>Gd,isGrammar:()=>rv,isGrammarImport:()=>nv,isGroup:()=>zn,isInferredType:()=>Fs,isInfixRule:()=>qa,isInfixRuleOperatorList:()=>av,isInfixRuleOperators:()=>iv,isInterface:()=>Fd,isKeyword:()=>Ar,isNamedArgument:()=>sv,isNegatedToken:()=>zd,isNegation:()=>jd,isNumberLiteral:()=>ov,isParameter:()=>lv,isParameterReference:()=>Bd,isParserRule:()=>it,isReferenceType:()=>Ud,isRegexToken:()=>Kd,isReturnType:()=>Wd,isRuleCall:()=>Er,isSimpleType:()=>zl,isStringLiteral:()=>uv,isTerminalAlternatives:()=>Vd,isTerminalElement:()=>cv,isTerminalGroup:()=>qd,isTerminalRule:()=>Nt,isTerminalRuleCall:()=>jl,isType:()=>Bl,isTypeAttribute:()=>fv,isTypeDefinition:()=>dv,isUnionType:()=>Hd,isUnorderedGroup:()=>Ul,isUntilToken:()=>Yd,isValueLiteral:()=>pv,isWildcard:()=>Xd,reflection:()=>j});var aN={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]*/},dt={$type:"AbstractElement",cardinality:"cardinality"};function Gl(e){return j.isInstance(e,dt.$type)}i(Gl,"isAbstractElement");var ns={$type:"AbstractParserRule"};function Gn(e){return j.isInstance(e,ns.$type)}i(Gn,"isAbstractParserRule");var Pa={$type:"AbstractRule"};function Zg(e){return j.isInstance(e,Pa.$type)}i(Zg,"isAbstractRule");var vt={$type:"AbstractType"};function Qg(e){return j.isInstance(e,vt.$type)}i(Qg,"isAbstractType");var xr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function jr(e){return j.isInstance(e,xr.$type)}i(jr,"isAction");var as={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function Fl(e){return j.isInstance(e,as.$type)}i(Fl,"isAlternatives");var Xo={$type:"ArrayLiteral",elements:"elements"};function ev(e){return j.isInstance(e,Xo.$type)}i(ev,"isArrayLiteral");var Jo={$type:"ArrayType",elementType:"elementType"};function Od(e){return j.isInstance(e,Jo.$type)}i(Od,"isArrayType");var Mr={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Rr(e){return j.isInstance(e,Mr.$type)}i(Rr,"isAssignment");var Zo={$type:"BooleanLiteral",true:"true"};function Ld(e){return j.isInstance(e,Zo.$type)}i(Ld,"isBooleanLiteral");var Gr={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Dd(e){return j.isInstance(e,Gr.$type)}i(Dd,"isCharacterRange");var Fr={$type:"Condition"};function tv(e){return j.isInstance(e,Fr.$type)}i(tv,"isCondition");var is={$type:"Conjunction",left:"left",right:"right"};function xd(e){return j.isInstance(e,is.$type)}i(xd,"isConjunction");var zr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Fn(e){return j.isInstance(e,zr.$type)}i(Fn,"isCrossReference");var ss={$type:"Disjunction",left:"left",right:"right"};function Md(e){return j.isInstance(e,ss.$type)}i(Md,"isDisjunction");var Qo={$type:"EndOfFile",cardinality:"cardinality"};function Gd(e){return j.isInstance(e,Qo.$type)}i(Gd,"isEndOfFile");var gr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function rv(e){return j.isInstance(e,gr.$type)}i(rv,"isGrammar");var el={$type:"GrammarImport",path:"path"};function nv(e){return j.isInstance(e,el.$type)}i(nv,"isGrammarImport");var mn={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function zn(e){return j.isInstance(e,mn.$type)}i(zn,"isGroup");var tl={$type:"InferredType",name:"name"};function Fs(e){return j.isInstance(e,tl.$type)}i(Fs,"isInferredType");var Jt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function qa(e){return j.isInstance(e,Jt.$type)}i(qa,"isInfixRule");var os={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function av(e){return j.isInstance(e,os.$type)}i(av,"isInfixRuleOperatorList");var rl={$type:"InfixRuleOperators",precedences:"precedences"};function iv(e){return j.isInstance(e,rl.$type)}i(iv,"isInfixRuleOperators");var ka={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function Fd(e){return j.isInstance(e,ka.$type)}i(Fd,"isInterface");var Oa={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Ar(e){return j.isInstance(e,Oa.$type)}i(Ar,"isKeyword");var La={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function sv(e){return j.isInstance(e,La.$type)}i(sv,"isNamedArgument");var hn={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function zd(e){return j.isInstance(e,hn.$type)}i(zd,"isNegatedToken");var nl={$type:"Negation",value:"value"};function jd(e){return j.isInstance(e,nl.$type)}i(jd,"isNegation");var al={$type:"NumberLiteral",value:"value"};function ov(e){return j.isInstance(e,al.$type)}i(ov,"isNumberLiteral");var Da={$type:"Parameter",name:"name"};function lv(e){return j.isInstance(e,Da.$type)}i(lv,"isParameter");var il={$type:"ParameterReference",parameter:"parameter"};function Bd(e){return j.isInstance(e,il.$type)}i(Bd,"isParameterReference");var Lt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function it(e){return j.isInstance(e,Lt.$type)}i(it,"isParserRule");var ls={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function Ud(e){return j.isInstance(e,ls.$type)}i(Ud,"isReferenceType");var yn={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Kd(e){return j.isInstance(e,yn.$type)}i(Kd,"isRegexToken");var sl={$type:"ReturnType",name:"name"};function Wd(e){return j.isInstance(e,sl.$type)}i(Wd,"isReturnType");var gn={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Er(e){return j.isInstance(e,gn.$type)}i(Er,"isRuleCall");var xa={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function zl(e){return j.isInstance(e,xa.$type)}i(zl,"isSimpleType");var ol={$type:"StringLiteral",value:"value"};function uv(e){return j.isInstance(e,ol.$type)}i(uv,"isStringLiteral");var vn={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Vd(e){return j.isInstance(e,vn.$type)}i(Vd,"isTerminalAlternatives");var pt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function cv(e){return j.isInstance(e,pt.$type)}i(cv,"isTerminalElement");var Tn={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function qd(e){return j.isInstance(e,Tn.$type)}i(qd,"isTerminalGroup");var vr={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function Nt(e){return j.isInstance(e,vr.$type)}i(Nt,"isTerminalRule");var $n={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function jl(e){return j.isInstance(e,$n.$type)}i(jl,"isTerminalRuleCall");var us={$type:"Type",name:"name",type:"type"};function Bl(e){return j.isInstance(e,us.$type)}i(Bl,"isType");var Rn={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function fv(e){return j.isInstance(e,Rn.$type)}i(fv,"isTypeAttribute");var An={$type:"TypeDefinition"};function dv(e){return j.isInstance(e,An.$type)}i(dv,"isTypeDefinition");var ll={$type:"UnionType",types:"types"};function Hd(e){return j.isInstance(e,ll.$type)}i(Hd,"isUnionType");var cs={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function Ul(e){return j.isInstance(e,cs.$type)}i(Ul,"isUnorderedGroup");var En={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Yd(e){return j.isInstance(e,En.$type)}i(Yd,"isUntilToken");var Cn={$type:"ValueLiteral"};function pv(e){return j.isInstance(e,Cn.$type)}i(pv,"isValueLiteral");var Ma={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Xd(e){return j.isInstance(e,Ma.$type)}i(Xd,"isWildcard");var Jd=class extends Id{static{i(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:dt.$type,properties:{cardinality:{name:dt.cardinality}},superTypes:[]},AbstractParserRule:{name:ns.$type,properties:{},superTypes:[Pa.$type,vt.$type]},AbstractRule:{name:Pa.$type,properties:{},superTypes:[]},AbstractType:{name:vt.$type,properties:{},superTypes:[]},Action:{name:xr.$type,properties:{cardinality:{name:xr.cardinality},feature:{name:xr.feature},inferredType:{name:xr.inferredType},operator:{name:xr.operator},type:{name:xr.type,referenceType:vt.$type}},superTypes:[dt.$type]},Alternatives:{name:as.$type,properties:{cardinality:{name:as.cardinality},elements:{name:as.elements,defaultValue:[]}},superTypes:[dt.$type]},ArrayLiteral:{name:Xo.$type,properties:{elements:{name:Xo.elements,defaultValue:[]}},superTypes:[Cn.$type]},ArrayType:{name:Jo.$type,properties:{elementType:{name:Jo.elementType}},superTypes:[An.$type]},Assignment:{name:Mr.$type,properties:{cardinality:{name:Mr.cardinality},feature:{name:Mr.feature},operator:{name:Mr.operator},predicate:{name:Mr.predicate},terminal:{name:Mr.terminal}},superTypes:[dt.$type]},BooleanLiteral:{name:Zo.$type,properties:{true:{name:Zo.true,defaultValue:!1}},superTypes:[Fr.$type,Cn.$type]},CharacterRange:{name:Gr.$type,properties:{cardinality:{name:Gr.cardinality},left:{name:Gr.left},lookahead:{name:Gr.lookahead},parenthesized:{name:Gr.parenthesized,defaultValue:!1},right:{name:Gr.right}},superTypes:[pt.$type]},Condition:{name:Fr.$type,properties:{},superTypes:[]},Conjunction:{name:is.$type,properties:{left:{name:is.left},right:{name:is.right}},superTypes:[Fr.$type]},CrossReference:{name:zr.$type,properties:{cardinality:{name:zr.cardinality},deprecatedSyntax:{name:zr.deprecatedSyntax,defaultValue:!1},isMulti:{name:zr.isMulti,defaultValue:!1},terminal:{name:zr.terminal},type:{name:zr.type,referenceType:vt.$type}},superTypes:[dt.$type]},Disjunction:{name:ss.$type,properties:{left:{name:ss.left},right:{name:ss.right}},superTypes:[Fr.$type]},EndOfFile:{name:Qo.$type,properties:{cardinality:{name:Qo.cardinality}},superTypes:[dt.$type]},Grammar:{name:gr.$type,properties:{imports:{name:gr.imports,defaultValue:[]},interfaces:{name:gr.interfaces,defaultValue:[]},isDeclared:{name:gr.isDeclared,defaultValue:!1},name:{name:gr.name},rules:{name:gr.rules,defaultValue:[]},types:{name:gr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:el.$type,properties:{path:{name:el.path}},superTypes:[]},Group:{name:mn.$type,properties:{cardinality:{name:mn.cardinality},elements:{name:mn.elements,defaultValue:[]},guardCondition:{name:mn.guardCondition},predicate:{name:mn.predicate}},superTypes:[dt.$type]},InferredType:{name:tl.$type,properties:{name:{name:tl.name}},superTypes:[vt.$type]},InfixRule:{name:Jt.$type,properties:{call:{name:Jt.call},dataType:{name:Jt.dataType},inferredType:{name:Jt.inferredType},name:{name:Jt.name},operators:{name:Jt.operators},parameters:{name:Jt.parameters,defaultValue:[]},returnType:{name:Jt.returnType,referenceType:vt.$type}},superTypes:[ns.$type]},InfixRuleOperatorList:{name:os.$type,properties:{associativity:{name:os.associativity},operators:{name:os.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:rl.$type,properties:{precedences:{name:rl.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:ka.$type,properties:{attributes:{name:ka.attributes,defaultValue:[]},name:{name:ka.name},superTypes:{name:ka.superTypes,defaultValue:[],referenceType:vt.$type}},superTypes:[vt.$type]},Keyword:{name:Oa.$type,properties:{cardinality:{name:Oa.cardinality},predicate:{name:Oa.predicate},value:{name:Oa.value}},superTypes:[dt.$type]},NamedArgument:{name:La.$type,properties:{calledByName:{name:La.calledByName,defaultValue:!1},parameter:{name:La.parameter,referenceType:Da.$type},value:{name:La.value}},superTypes:[]},NegatedToken:{name:hn.$type,properties:{cardinality:{name:hn.cardinality},lookahead:{name:hn.lookahead},parenthesized:{name:hn.parenthesized,defaultValue:!1},terminal:{name:hn.terminal}},superTypes:[pt.$type]},Negation:{name:nl.$type,properties:{value:{name:nl.value}},superTypes:[Fr.$type]},NumberLiteral:{name:al.$type,properties:{value:{name:al.value}},superTypes:[Cn.$type]},Parameter:{name:Da.$type,properties:{name:{name:Da.name}},superTypes:[]},ParameterReference:{name:il.$type,properties:{parameter:{name:il.parameter,referenceType:Da.$type}},superTypes:[Fr.$type]},ParserRule:{name:Lt.$type,properties:{dataType:{name:Lt.dataType},definition:{name:Lt.definition},entry:{name:Lt.entry,defaultValue:!1},fragment:{name:Lt.fragment,defaultValue:!1},inferredType:{name:Lt.inferredType},name:{name:Lt.name},parameters:{name:Lt.parameters,defaultValue:[]},returnType:{name:Lt.returnType,referenceType:vt.$type}},superTypes:[ns.$type]},ReferenceType:{name:ls.$type,properties:{isMulti:{name:ls.isMulti,defaultValue:!1},referenceType:{name:ls.referenceType}},superTypes:[An.$type]},RegexToken:{name:yn.$type,properties:{cardinality:{name:yn.cardinality},lookahead:{name:yn.lookahead},parenthesized:{name:yn.parenthesized,defaultValue:!1},regex:{name:yn.regex}},superTypes:[pt.$type]},ReturnType:{name:sl.$type,properties:{name:{name:sl.name}},superTypes:[]},RuleCall:{name:gn.$type,properties:{arguments:{name:gn.arguments,defaultValue:[]},cardinality:{name:gn.cardinality},predicate:{name:gn.predicate},rule:{name:gn.rule,referenceType:Pa.$type}},superTypes:[dt.$type]},SimpleType:{name:xa.$type,properties:{primitiveType:{name:xa.primitiveType},stringType:{name:xa.stringType},typeRef:{name:xa.typeRef,referenceType:vt.$type}},superTypes:[An.$type]},StringLiteral:{name:ol.$type,properties:{value:{name:ol.value}},superTypes:[Cn.$type]},TerminalAlternatives:{name:vn.$type,properties:{cardinality:{name:vn.cardinality},elements:{name:vn.elements,defaultValue:[]},lookahead:{name:vn.lookahead},parenthesized:{name:vn.parenthesized,defaultValue:!1}},superTypes:[pt.$type]},TerminalElement:{name:pt.$type,properties:{cardinality:{name:pt.cardinality},lookahead:{name:pt.lookahead},parenthesized:{name:pt.parenthesized,defaultValue:!1}},superTypes:[dt.$type]},TerminalGroup:{name:Tn.$type,properties:{cardinality:{name:Tn.cardinality},elements:{name:Tn.elements,defaultValue:[]},lookahead:{name:Tn.lookahead},parenthesized:{name:Tn.parenthesized,defaultValue:!1}},superTypes:[pt.$type]},TerminalRule:{name:vr.$type,properties:{definition:{name:vr.definition},fragment:{name:vr.fragment,defaultValue:!1},hidden:{name:vr.hidden,defaultValue:!1},name:{name:vr.name},type:{name:vr.type}},superTypes:[Pa.$type]},TerminalRuleCall:{name:$n.$type,properties:{cardinality:{name:$n.cardinality},lookahead:{name:$n.lookahead},parenthesized:{name:$n.parenthesized,defaultValue:!1},rule:{name:$n.rule,referenceType:vr.$type}},superTypes:[pt.$type]},Type:{name:us.$type,properties:{name:{name:us.name},type:{name:us.type}},superTypes:[vt.$type]},TypeAttribute:{name:Rn.$type,properties:{defaultValue:{name:Rn.defaultValue},isOptional:{name:Rn.isOptional,defaultValue:!1},name:{name:Rn.name},type:{name:Rn.type}},superTypes:[]},TypeDefinition:{name:An.$type,properties:{},superTypes:[]},UnionType:{name:ll.$type,properties:{types:{name:ll.types,defaultValue:[]}},superTypes:[An.$type]},UnorderedGroup:{name:cs.$type,properties:{cardinality:{name:cs.cardinality},elements:{name:cs.elements,defaultValue:[]}},superTypes:[dt.$type]},UntilToken:{name:En.$type,properties:{cardinality:{name:En.cardinality},lookahead:{name:En.lookahead},parenthesized:{name:En.parenthesized,defaultValue:!1},terminal:{name:En.terminal}},superTypes:[pt.$type]},ValueLiteral:{name:Cn.$type,properties:{},superTypes:[]},Wildcard:{name:Ma.$type,properties:{cardinality:{name:Ma.cardinality},lookahead:{name:Ma.lookahead},parenthesized:{name:Ma.parenthesized,defaultValue:!1}},superTypes:[pt.$type]}}}},j=new Jd;function mv(e){let t=e,r=!1;for(;t;){const n=Mn(t.grammarSource,it);if(n&&n.dataType)t=t.container,r=!0;else return r?t:void 0}}i(mv,"getDatatypeNode");function Ha(e){return new Ka(e,t=>$r(t)?t.content:[],{includeRoot:!0})}i(Ha,"streamCst");function hv(e){return Ha(e).filter(xn)}i(hv,"flattenCst");function Zd(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}i(Zd,"isChildNode");function $s(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}i($s,"tokenToRange");function Ya(e){if(!e)return;const{offset:t,end:r,range:n}=e;return{range:n,offset:t,end:r,length:r-t}}i(Ya,"toDocumentSegment");var Qt;(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"})(Qt||(Qt={}));function Qd(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return Qt.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Qt.After;const 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;return r&&n?Qt.Inside:r?Qt.OverlapBack:n?Qt.OverlapFront:Qt.Outside}i(Qd,"compareRange");function ep(e,t){return Qd(e,t)>Qt.After}i(ep,"inRange");var tp=/^[\w\p{L}]$/u;function yv(e,t,r=tp){if(e){if(t>0){const n=t-e.offset,a=e.text.charAt(n);r.test(a)||t--}return Kl(e,t)}}i(yv,"findDeclarationNodeAtOffset");function rp(e,t){if(e){const r=ip(e,!0);if(r&&ul(r,t))return r;if(Ml(e)){const n=e.content.findIndex(a=>!a.hidden);for(let a=n-1;a>=0;a--){const s=e.content[a];if(ul(s,t))return s}}}}i(rp,"findCommentNode");function ul(e,t){return xn(e)&&t.includes(e.tokenType.name)}i(ul,"isCommentNode");function Kl(e,t){if(xn(e))return e;if($r(e)){const r=ap(e,t,!1);if(r)return Kl(r,t)}}i(Kl,"findLeafNodeAtOffset");function np(e,t){if(xn(e))return e;if($r(e)){const r=ap(e,t,!0);if(r)return np(r,t)}}i(np,"findLeafNodeBeforeOffset");function ap(e,t,r){let n=0,a=e.content.length-1,s;for(;n<=a;){const o=Math.floor((n+a)/2),l=e.content[o];if(l.offset<=t&&l.end>t)return l;l.end<=t?(s=r?l:void 0,n=o+1):a=o-1}return s}i(ap,"binarySearch");function ip(e,t=!0){for(;e.container;){const r=e.container;let n=r.content.indexOf(e);for(;n>0;){n--;const a=r.content[n];if(t||!a.hidden)return a}e=r}}i(ip,"getPreviousNode");function gv(e,t=!0){for(;e.container;){const r=e.container;let n=r.content.indexOf(e);const a=r.content.length-1;for(;n<a;){n++;const s=r.content[n];if(t||!s.hidden)return s}e=r}}i(gv,"getNextNode");function vv(e){if(e.range.start.character===0)return e;const t=e.range.start.line;let r=e,n;for(;e.container;){const a=e.container,s=n??a.content.indexOf(e);if(s===0?(e=a,n=void 0):(n=s-1,e=a.content[n]),e.range.start.line!==t)break;r=e}return r}i(vv,"getStartlineNode");function Tv(e,t){const r=$v(e,t);return r?r.parent.content.slice(r.a+1,r.b):[]}i(Tv,"getInteriorNodes");function $v(e,t){const r=Ef(e),n=Ef(t);let a;for(let s=0;s<r.length&&s<n.length;s++){const 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($v,"getCommonParent");function Ef(e){const t=[];for(;e.container;){const r=e.container,n=r.content.indexOf(e);t.push({parent:r,index:n}),e=r}return t.reverse()}i(Ef,"getParentChain");var sp={};Vr(sp,{findAssignment:()=>Tp,findNameAssignment:()=>Zl,findNodeForKeyword:()=>vp,findNodeForProperty:()=>Yl,findNodesForKeyword:()=>wv,findNodesForKeywordInternal:()=>Jl,findNodesForProperty:()=>gp,getActionAtElement:()=>Rp,getActionType:()=>Ep,getAllReachableRules:()=>Hl,getAllRulesUsedForCrossReferences:()=>Sv,getCrossReferenceTerminal:()=>hp,getEntryRule:()=>dp,getExplicitRuleType:()=>js,getHiddenRules:()=>pp,getRuleType:()=>Cp,getRuleTypeName:()=>Ov,getTypeName:()=>Pn,isArrayCardinality:()=>Nv,isArrayOperator:()=>Pv,isCommentTerminal:()=>yp,isDataType:()=>kv,isDataTypeRule:()=>zs,isOptionalCardinality:()=>Iv,terminalRegex:()=>Bs});var Wl=class extends Error{static{i(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function qr(e,t="Error: Got unexpected value."){throw new Error(t)}i(qr,"assertUnreachable");function op(e,t="Error: Condition is violated."){if(!e)throw new Error(t)}i(op,"assertCondition");var lp={};Vr(lp,{NEWLINE_REGEXP:()=>Ev,escapeRegExp:()=>ri,getTerminalParts:()=>_v,isMultilineComment:()=>up,isWhitespace:()=>ql,partialMatches:()=>cp,partialRegExp:()=>fp,whitespaceCharacters:()=>bv});function U(e){return e.charCodeAt(0)}i(U,"cc");function Po(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}i(Po,"insertToSet");function $a(e,t){if(e[t]===!0)throw"duplicate flag "+t;e[t],e[t]=!0}i($a,"addFlag");function sn(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}i(sn,"ASSERT_EXISTS");function Rv(){throw Error("Internal Error - Should never get here!")}i(Rv,"ASSERT_NEVER_REACH_HERE");function Cf(e){return e.type==="Character"}i(Cf,"isCharacter");var cl=[];for(let e=U("0");e<=U("9");e++)cl.push(e);var fl=[U("_")].concat(cl);for(let e=U("a");e<=U("z");e++)fl.push(e);for(let e=U("A");e<=U("Z");e++)fl.push(e);var ch=[U(" "),U("\f"),U(`
|
|
36
|
+
`),U("\r"),U(" "),U("\v"),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U("\u2028"),U("\u2029"),U(" "),U(" "),U(" "),U("\uFEFF")],iN=/[0-9a-fA-F]/,ao=/[0-9]/,sN=/[1-9]/,Av=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("/");const t=this.disjunction();this.consumeChar("/");const r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":$a(r,"global");break;case"i":$a(r,"ignoreCase");break;case"m":$a(r,"multiLine");break;case"u":$a(r,"unicode");break;case"y":$a(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(){const e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const 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}}sn(t);const r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return Rv()}quantifier(e=!1){let t;const 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"{":const n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),t={atLeast:n,atMost:a}):t={atLeast:n,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;sn(t);break}if(!(e===!0&&t===void 0)&&sn(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(r),t}atom(){let e;const 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()),sn(e))return e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[U(`
|
|
37
|
+
`),U("\r"),U("\u2028"),U("\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=cl;break;case"D":e=cl,t=!0;break;case"s":e=ch;break;case"S":e=ch,t=!0;break;case"w":e=fl;break;case"W":e=fl,t=!0;break}if(sn(e))return{type:"Set",value:e,complement:t}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=U("\f");break;case"n":e=U(`
|
|
38
|
+
`);break;case"r":e=U("\r");break;case"t":e=U(" ");break;case"v":e=U("\v");break}if(sn(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const 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:U("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:U(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
|
39
|
+
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:const e=this.popChar();return{type:"Character",value:U(e)}}}characterClass(){const e=[];let t=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),t=!0);this.isClassAtom();){const r=this.classAtom();if(r.type,Cf(r)&&this.isRangeDash()){this.consumeChar("-");const n=this.classAtom();if(n.type,Cf(n)){if(n.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:n.value})}else Po(r.value,e),e.push(U("-")),Po(n.value,e)}else Po(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:U("\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;this.consumeChar("("),this.peekChar(0)==="?"?(this.consumeChar("?"),this.consumeChar(":"),e=!1):this.groupIdx++;const t=this.disjunction();this.consumeChar(")");const r={type:"Group",capturing:e,value:t};return e&&(r.idx=this.groupIdx),r}positiveInteger(){let e=this.popChar();if(sN.test(e)===!1)throw Error("Expecting a positive integer");for(;ao.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(ao.test(e)===!1)throw Error("Expecting an integer");for(;ao.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){const 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:U(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 ao.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(){const e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{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++){const a=this.popChar();if(iN.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(){const 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}}},Vl=class{static{i(this,"BaseRegExpVisitor")}visitChildren(e){for(const t in e){const r=e[t];e.hasOwnProperty(t)&&(r.type!==void 0?this.visit(r):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){}},Ev=/\r?\n/gm,Cv=new Av,oN=class extends Vl{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){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(!this.multiline&&t===`
|
|
44
|
+
`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const r=ri(t);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(t);this.multiline=!!`
|
|
45
|
+
`.match(r)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},_n=new oN;function _v(e){try{typeof e!="string"&&(e=e.source),e=`/${e}/`;const t=Cv.pattern(e),r=[];for(const n of t.value.value)_n.reset(e),_n.visit(n),r.push({start:_n.startRegexp,end:_n.endRegex});return r}catch{return[]}}i(_v,"getTerminalParts");function up(e){try{return typeof e=="string"&&(e=new RegExp(e)),e=e.toString(),_n.reset(e),_n.visit(Cv.pattern(e)),_n.multiline}catch{return!1}}i(up,"isMultilineComment");var bv=`\f
|
|
46
|
+
\r \v \u2028\u2029 \uFEFF`.split("");function ql(e){const t=typeof e=="string"?new RegExp(e):e;return bv.some(r=>t.test(r))}i(ql,"isWhitespace");function ri(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(ri,"escapeRegExp");function cp(e,t){const r=fp(e),n=t.match(r);return!!n&&n[0].length>0}i(cp,"partialMatches");function fp(e){typeof e=="string"&&(e=new RegExp(e));const t=e,r=e.source;let 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}for(i(u,"appendOptional");n<r.length;)switch(r[n]){case"\\":switch(r[n+1]){case"c":u(3);break;case"x":u(4);break;case"u":t.unicode?r[n+2]==="{"?u(r.indexOf("}",n)-n+1):u(6):u(2);break;case"p":case"P":t.unicode?u(r.indexOf("}",n)-n+1):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"{":o=/\{\d+,?\d*\}/g,o.lastIndex=n,o=o.exec(r),o?l(o[0].length):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(fp,"partialRegExp");function dp(e){return e.rules.find(t=>it(t)&&t.entry)}i(dp,"getEntryRule");function pp(e){return e.rules.filter(t=>Nt(t)&&t.hidden)}i(pp,"getHiddenRules");function Hl(e,t){const r=new Set,n=dp(e);if(!n)return new Set(e.rules);const a=[n].concat(pp(e));for(const o of a)mp(o,r,t);const s=new Set;for(const o of e.rules)(r.has(o.name)||Nt(o)&&o.hidden)&&s.add(o);return s}i(Hl,"getAllReachableRules");function mp(e,t,r){t.add(e.name),Nr(e).forEach(n=>{if(Er(n)||r&&jl(n)){const a=n.rule.ref;a&&!t.has(a.name)&&mp(a,t,r)}})}i(mp,"ruleDfs");function Sv(e){const t=new Set;return Nr(e).forEach(r=>{Fn(r)&&(it(r.type.ref)&&t.add(r.type.ref),Fs(r.type.ref)&&it(r.type.ref.$container)&&t.add(r.type.ref.$container))}),t}i(Sv,"getAllRulesUsedForCrossReferences");function hp(e){if(e.terminal)return e.terminal;if(e.type.ref)return Zl(e.type.ref)?.terminal}i(hp,"getCrossReferenceTerminal");function yp(e){return e.hidden&&!ql(Bs(e))}i(yp,"isCommentTerminal");function gp(e,t){return!e||!t?[]:Xl(e,t,e.astNode,!0)}i(gp,"findNodesForProperty");function Yl(e,t,r){if(!e||!t)return;const n=Xl(e,t,e.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}i(Yl,"findNodeForProperty");function Xl(e,t,r,n){if(!n){const a=Mn(e.grammarSource,Rr);if(a&&a.feature===t)return[e]}return $r(e)&&e.astNode===r?e.content.flatMap(a=>Xl(a,t,r,!1)):[]}i(Xl,"findNodesForPropertyInternal");function wv(e,t){return e?Jl(e,t,e?.astNode):[]}i(wv,"findNodesForKeyword");function vp(e,t,r){if(!e)return;const n=Jl(e,t,e?.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}i(vp,"findNodeForKeyword");function Jl(e,t,r){if(e.astNode!==r)return[];if(Ar(e.grammarSource)&&e.grammarSource.value===t)return[e];const n=Ha(e).iterator();let a;const s=[];do if(a=n.next(),!a.done){const o=a.value;o.astNode===r?Ar(o.grammarSource)&&o.grammarSource.value===t&&s.push(o):n.prune()}while(!a.done);return s}i(Jl,"findNodesForKeywordInternal");function Tp(e){const t=e.astNode;for(;t===e.container?.astNode;){const r=Mn(e.grammarSource,Rr);if(r)return r;e=e.container}}i(Tp,"findAssignment");function Zl(e){let t=e;return Fs(t)&&(jr(t.$container)?t=t.$container.$container:Gn(t.$container)?t=t.$container:qr(t.$container)),$p(e,t,new Map)}i(Zl,"findNameAssignment");function $p(e,t,r){function n(a,s){let o;return Mn(a,Rr)||(o=$p(s,s,r)),r.set(e,o),o}if(i(n,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(const a of Nr(t)){if(Rr(a)&&a.feature.toLowerCase()==="name")return r.set(e,a),a;if(Er(a)&&it(a.rule.ref))return n(a,a.rule.ref);if(zl(a)&&a.typeRef?.ref)return n(a,a.typeRef.ref)}}i($p,"findNameAssignmentInternal");function Rp(e){const t=e.$container;if(zn(t)){const r=t.elements,n=r.indexOf(e);for(let a=n-1;a>=0;a--){const s=r[a];if(jr(s))return s;{const o=Nr(r[a]).find(jr);if(o)return o}}}if(Gl(t))return Rp(t)}i(Rp,"getActionAtElement");function Iv(e,t){return e==="?"||e==="*"||zn(t)&&!!t.guardCondition}i(Iv,"isOptionalCardinality");function Nv(e){return e==="*"||e==="+"}i(Nv,"isArrayCardinality");function Pv(e){return e==="+="}i(Pv,"isArrayOperator");function zs(e){return Ap(e,new Set)}i(zs,"isDataTypeRule");function Ap(e,t){if(t.has(e))return!0;t.add(e);for(const r of Nr(e))if(Er(r)){if(!r.rule.ref||it(r.rule.ref)&&!Ap(r.rule.ref,t)||qa(r.rule.ref))return!1}else{if(Rr(r))return!1;if(jr(r))return!1}return!!e.definition}i(Ap,"isDataTypeRuleInternal");function kv(e){return dl(e.type,new Set)}i(kv,"isDataType");function dl(e,t){if(t.has(e))return!0;if(t.add(e),Od(e))return!1;if(Ud(e))return!1;if(Hd(e))return e.types.every(r=>dl(r,t));if(zl(e)){if(e.primitiveType!==void 0)return!0;if(e.stringType!==void 0)return!0;if(e.typeRef!==void 0){const r=e.typeRef.ref;return Bl(r)?dl(r.type,t):!1}else return!1}else return!1}i(dl,"isDataTypeInternal");function js(e){if(!Nt(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){const t=e.returnType.ref;if(t)return t.name}}}i(js,"getExplicitRuleType");function Pn(e){if(Gn(e))return it(e)&&zs(e)?e.name:js(e)??e.name;if(Fd(e)||Bl(e)||Wd(e))return e.name;if(jr(e)){const t=Ep(e);if(t)return t}else if(Fs(e))return e.name;throw new Error("Cannot get name of Unknown Type")}i(Pn,"getTypeName");function Ep(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return Pn(e.type.ref)}i(Ep,"getActionType");function Ov(e){return Nt(e)?e.type?.name??"string":it(e)&&zs(e)?e.name:js(e)??e.name}i(Ov,"getRuleTypeName");function Cp(e){return Nt(e)?e.type?.name??"string":js(e)??e.name}i(Cp,"getRuleType");function Bs(e){const t={s:!1,i:!1,u:!1},r=jn(e.definition,t),n=Object.entries(t).filter(([,a])=>a).map(([a])=>a).join("");return new RegExp(r,n)}i(Bs,"terminalRegex");var _p=/[\s\S]/.source;function jn(e,t){if(Vd(e))return Lv(e);if(qd(e))return Dv(e);if(Dd(e))return Gv(e);if(jl(e)){const r=e.rule.ref;if(!r)throw new Error("Missing rule reference.");return nr(jn(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else{if(zd(e))return Mv(e);if(Yd(e))return xv(e);if(Kd(e)){const r=e.regex.lastIndexOf("/"),n=e.regex.substring(1,r),a=e.regex.substring(r+1);return t&&(t.i=a.includes("i"),t.s=a.includes("s"),t.u=a.includes("u")),nr(n,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}else{if(Xd(e))return nr(_p,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}}}i(jn,"abstractElementToRegex");function Lv(e){return nr(e.elements.map(t=>jn(t)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i(Lv,"terminalAlternativesToRegex");function Dv(e){return nr(e.elements.map(t=>jn(t)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i(Dv,"terminalGroupToRegex");function xv(e){return nr(`${_p}*?${jn(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}i(xv,"untilTokenToRegex");function Mv(e){return nr(`(?!${jn(e.terminal)})${_p}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}i(Mv,"negateTokenToRegex");function Gv(e){return e.right?nr(`[${ko(e.left)}-${ko(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):nr(ko(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i(Gv,"characterRangeToRegex");function ko(e){return ri(e.value)}i(ko,"keywordToRegex");function nr(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?`${e}${t.cardinality}`:e}i(nr,"withCardinality");function bp(e){const t=[],r=e.Grammar;for(const n of r.rules)Nt(n)&&yp(n)&&up(Bs(n))&&t.push(n.name);return{multilineCommentRules:t,nameRegexp:tp}}i(bp,"createGrammarConfig");var lN=typeof global=="object"&&global&&global.Object===Object&&global,Fv=lN,uN=typeof self=="object"&&self&&self.Object===Object&&self,cN=Fv||uN||Function("return this")(),ir=cN,fN=ir.Symbol,wt=fN,zv=Object.prototype,dN=zv.hasOwnProperty,pN=zv.toString,Oi=wt?wt.toStringTag:void 0;function jv(e){var t=dN.call(e,Oi),r=e[Oi];try{e[Oi]=void 0;var n=!0}catch{}var a=pN.call(e);return n&&(t?e[Oi]=r:delete e[Oi]),a}i(jv,"getRawTag");var mN=jv,hN=Object.prototype,yN=hN.toString;function Bv(e){return yN.call(e)}i(Bv,"objectToString");var gN=Bv,vN="[object Null]",TN="[object Undefined]",fh=wt?wt.toStringTag:void 0;function Uv(e){return e==null?e===void 0?TN:vN:fh&&fh in Object(e)?mN(e):gN(e)}i(Uv,"baseGetTag");var Hr=Uv;function Kv(e){return e!=null&&typeof e=="object"}i(Kv,"isObjectLike");var jt=Kv,$N="[object Symbol]";function Wv(e){return typeof e=="symbol"||jt(e)&&Hr(e)==$N}i(Wv,"isSymbol");var Ql=Wv;function Vv(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}i(Vv,"arrayMap");var Us=Vv,RN=Array.isArray,re=RN,dh=wt?wt.prototype:void 0,ph=dh?dh.toString:void 0;function Sp(e){if(typeof e=="string")return e;if(re(e))return Us(e,Sp)+"";if(Ql(e))return ph?ph.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}i(Sp,"baseToString");var AN=Sp,EN=/\s/;function qv(e){for(var t=e.length;t--&&EN.test(e.charAt(t)););return t}i(qv,"trimmedEndIndex");var CN=qv,_N=/^\s+/;function Hv(e){return e&&e.slice(0,CN(e)+1).replace(_N,"")}i(Hv,"baseTrim");var bN=Hv;function Yv(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}i(Yv,"isObject");var It=Yv,mh=NaN,SN=/^[-+]0x[0-9a-f]+$/i,wN=/^0b[01]+$/i,IN=/^0o[0-7]+$/i,NN=parseInt;function Xv(e){if(typeof e=="number")return e;if(Ql(e))return mh;if(It(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=It(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=bN(e);var r=wN.test(e);return r||IN.test(e)?NN(e.slice(2),r?2:8):SN.test(e)?mh:+e}i(Xv,"toNumber");var PN=Xv,hh=1/0,kN=17976931348623157e292;function Jv(e){if(!e)return e===0?e:0;if(e=PN(e),e===hh||e===-hh){var t=e<0?-1:1;return t*kN}return e===e?e:0}i(Jv,"toFinite");var ON=Jv;function Zv(e){var t=ON(e),r=t%1;return t===t?r?t-r:t:0}i(Zv,"toInteger");var Ks=Zv;function Qv(e){return e}i(Qv,"identity");var Ws=Qv,LN="[object AsyncFunction]",DN="[object Function]",xN="[object GeneratorFunction]",MN="[object Proxy]";function eT(e){if(!It(e))return!1;var t=Hr(e);return t==DN||t==xN||t==LN||t==MN}i(eT,"isFunction");var Pr=eT,GN=ir["__core-js_shared__"],Wu=GN,yh=(function(){var e=/[^.]+$/.exec(Wu&&Wu.keys&&Wu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function tT(e){return!!yh&&yh in e}i(tT,"isMasked");var FN=tT,zN=Function.prototype,jN=zN.toString;function rT(e){if(e!=null){try{return jN.call(e)}catch{}try{return e+""}catch{}}return""}i(rT,"toSource");var Bn=rT,BN=/[\\^$.*+?()[\]{}|]/g,UN=/^\[object .+?Constructor\]$/,KN=Function.prototype,WN=Object.prototype,VN=KN.toString,qN=WN.hasOwnProperty,HN=RegExp("^"+VN.call(qN).replace(BN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nT(e){if(!It(e)||FN(e))return!1;var t=Pr(e)?HN:UN;return t.test(Bn(e))}i(nT,"baseIsNative");var YN=nT;function aT(e,t){return e?.[t]}i(aT,"getValue");var XN=aT;function iT(e,t){var r=XN(e,t);return YN(r)?r:void 0}i(iT,"getNative");var Un=iT,JN=Un(ir,"WeakMap"),_f=JN,gh=Object.create,ZN=(function(){function e(){}return i(e,"object"),function(t){if(!It(t))return{};if(gh)return gh(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),QN=ZN;function sT(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(sT,"apply");var eP=sT;function oT(){}i(oT,"noop");var Fe=oT;function lT(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}i(lT,"copyArray");var tP=lT,rP=800,nP=16,aP=Date.now;function uT(e){var t=0,r=0;return function(){var n=aP(),a=nP-(n-r);if(r=n,a>0){if(++t>=rP)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}i(uT,"shortOut");var iP=uT;function cT(e){return function(){return e}}i(cT,"constant");var sP=cT,oP=(function(){try{var e=Un(Object,"defineProperty");return e({},"",{}),e}catch{}})(),pl=oP,lP=pl?function(e,t){return pl(e,"toString",{configurable:!0,enumerable:!1,value:sP(t),writable:!0})}:Ws,uP=lP,cP=iP(uP),fP=cP;function fT(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}i(fT,"arrayEach");var dT=fT;function pT(e,t,r,n){for(var a=e.length,s=r+(n?1:-1);n?s--:++s<a;)if(t(e[s],s,e))return s;return-1}i(pT,"baseFindIndex");var mT=pT;function hT(e){return e!==e}i(hT,"baseIsNaN");var dP=hT;function yT(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}i(yT,"strictIndexOf");var pP=yT;function gT(e,t,r){return t===t?pP(e,t,r):mT(e,dP,r)}i(gT,"baseIndexOf");var wp=gT;function vT(e,t){var r=e==null?0:e.length;return!!r&&wp(e,t,0)>-1}i(vT,"arrayIncludes");var TT=vT,mP=9007199254740991,hP=/^(?:0|[1-9]\d*)$/;function $T(e,t){var r=typeof e;return t=t??mP,!!t&&(r=="number"||r!="symbol"&&hP.test(e))&&e>-1&&e%1==0&&e<t}i($T,"isIndex");var eu=$T;function RT(e,t,r){t=="__proto__"&&pl?pl(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}i(RT,"baseAssignValue");var Ip=RT;function AT(e,t){return e===t||e!==e&&t!==t}i(AT,"eq");var Vs=AT,yP=Object.prototype,gP=yP.hasOwnProperty;function ET(e,t,r){var n=e[t];(!(gP.call(e,t)&&Vs(n,r))||r===void 0&&!(t in e))&&Ip(e,t,r)}i(ET,"assignValue");var tu=ET;function CT(e,t,r,n){var a=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var l=t[s],u=n?n(r[l],e[l],l,r,e):void 0;u===void 0&&(u=e[l]),a?Ip(r,l,u):tu(r,l,u)}return r}i(CT,"copyObject");var qs=CT,vh=Math.max;function _T(e,t,r){return t=vh(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,s=vh(n.length-t,0),o=Array(s);++a<s;)o[a]=n[t+a];a=-1;for(var l=Array(t+1);++a<t;)l[a]=n[a];return l[t]=r(o),eP(e,this,l)}}i(_T,"overRest");var vP=_T;function bT(e,t){return fP(vP(e,t,Ws),e+"")}i(bT,"baseRest");var Np=bT,TP=9007199254740991;function ST(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=TP}i(ST,"isLength");var Pp=ST;function wT(e){return e!=null&&Pp(e.length)&&!Pr(e)}i(wT,"isArrayLike");var sr=wT;function IT(e,t,r){if(!It(r))return!1;var n=typeof t;return(n=="number"?sr(r)&&eu(t,r.length):n=="string"&&t in r)?Vs(r[t],e):!1}i(IT,"isIterateeCall");var ru=IT;function NT(e){return Np(function(t,r){var n=-1,a=r.length,s=a>1?r[a-1]:void 0,o=a>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(a--,s):void 0,o&&ru(r[0],r[1],o)&&(s=a<3?void 0:s,a=1),t=Object(t);++n<a;){var l=r[n];l&&e(t,l,n,s)}return t})}i(NT,"createAssigner");var $P=NT,RP=Object.prototype;function PT(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||RP;return e===r}i(PT,"isPrototype");var Hs=PT;function kT(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}i(kT,"baseTimes");var AP=kT,EP="[object Arguments]";function OT(e){return jt(e)&&Hr(e)==EP}i(OT,"baseIsArguments");var Th=OT,LT=Object.prototype,CP=LT.hasOwnProperty,_P=LT.propertyIsEnumerable,bP=Th((function(){return arguments})())?Th:function(e){return jt(e)&&CP.call(e,"callee")&&!_P.call(e,"callee")},nu=bP;function DT(){return!1}i(DT,"stubFalse");var SP=DT,xT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$h=xT&&typeof module=="object"&&module&&!module.nodeType&&module,wP=$h&&$h.exports===xT,Rh=wP?ir.Buffer:void 0,IP=Rh?Rh.isBuffer:void 0,NP=IP||SP,Rs=NP,PP="[object Arguments]",kP="[object Array]",OP="[object Boolean]",LP="[object Date]",DP="[object Error]",xP="[object Function]",MP="[object Map]",GP="[object Number]",FP="[object Object]",zP="[object RegExp]",jP="[object Set]",BP="[object String]",UP="[object WeakMap]",KP="[object ArrayBuffer]",WP="[object DataView]",VP="[object Float32Array]",qP="[object Float64Array]",HP="[object Int8Array]",YP="[object Int16Array]",XP="[object Int32Array]",JP="[object Uint8Array]",ZP="[object Uint8ClampedArray]",QP="[object Uint16Array]",ek="[object Uint32Array]",ye={};ye[VP]=ye[qP]=ye[HP]=ye[YP]=ye[XP]=ye[JP]=ye[ZP]=ye[QP]=ye[ek]=!0;ye[PP]=ye[kP]=ye[KP]=ye[OP]=ye[WP]=ye[LP]=ye[DP]=ye[xP]=ye[MP]=ye[GP]=ye[FP]=ye[zP]=ye[jP]=ye[BP]=ye[UP]=!1;function MT(e){return jt(e)&&Pp(e.length)&&!!ye[Hr(e)]}i(MT,"baseIsTypedArray");var tk=MT;function GT(e){return function(t){return e(t)}}i(GT,"baseUnary");var Ys=GT,FT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fs=FT&&typeof module=="object"&&module&&!module.nodeType&&module,rk=fs&&fs.exports===FT,Vu=rk&&Fv.process,nk=(function(){try{var e=fs&&fs.require&&fs.require("util").types;return e||Vu&&Vu.binding&&Vu.binding("util")}catch{}})(),Br=nk,Ah=Br&&Br.isTypedArray,ak=Ah?Ys(Ah):tk,kp=ak,ik=Object.prototype,sk=ik.hasOwnProperty;function zT(e,t){var r=re(e),n=!r&&nu(e),a=!r&&!n&&Rs(e),s=!r&&!n&&!a&&kp(e),o=r||n||a||s,l=o?AP(e.length,String):[],u=l.length;for(var c in e)(t||sk.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||eu(c,u)))&&l.push(c);return l}i(zT,"arrayLikeKeys");var jT=zT;function BT(e,t){return function(r){return e(t(r))}}i(BT,"overArg");var UT=BT,ok=UT(Object.keys,Object),lk=ok,uk=Object.prototype,ck=uk.hasOwnProperty;function KT(e){if(!Hs(e))return lk(e);var t=[];for(var r in Object(e))ck.call(e,r)&&r!="constructor"&&t.push(r);return t}i(KT,"baseKeys");var WT=KT;function VT(e){return sr(e)?jT(e):WT(e)}i(VT,"keys");var $t=VT,fk=Object.prototype,dk=fk.hasOwnProperty,pk=$P(function(e,t){if(Hs(t)||sr(t)){qs(t,$t(t),e);return}for(var r in t)dk.call(t,r)&&tu(e,r,t[r])}),Rt=pk;function qT(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}i(qT,"nativeKeysIn");var mk=qT,hk=Object.prototype,yk=hk.hasOwnProperty;function HT(e){if(!It(e))return mk(e);var t=Hs(e),r=[];for(var n in e)n=="constructor"&&(t||!yk.call(e,n))||r.push(n);return r}i(HT,"baseKeysIn");var gk=HT;function YT(e){return sr(e)?jT(e,!0):gk(e)}i(YT,"keysIn");var au=YT,vk=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tk=/^\w*$/;function XT(e,t){if(re(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ql(e)?!0:Tk.test(e)||!vk.test(e)||t!=null&&e in Object(t)}i(XT,"isKey");var Op=XT,$k=Un(Object,"create"),As=$k;function JT(){this.__data__=As?As(null):{},this.size=0}i(JT,"hashClear");var Rk=JT;function ZT(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}i(ZT,"hashDelete");var Ak=ZT,Ek="__lodash_hash_undefined__",Ck=Object.prototype,_k=Ck.hasOwnProperty;function QT(e){var t=this.__data__;if(As){var r=t[e];return r===Ek?void 0:r}return _k.call(t,e)?t[e]:void 0}i(QT,"hashGet");var bk=QT,Sk=Object.prototype,wk=Sk.hasOwnProperty;function e$(e){var t=this.__data__;return As?t[e]!==void 0:wk.call(t,e)}i(e$,"hashHas");var Ik=e$,Nk="__lodash_hash_undefined__";function t$(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=As&&t===void 0?Nk:t,this}i(t$,"hashSet");var Pk=t$;function Kn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}i(Kn,"Hash");Kn.prototype.clear=Rk;Kn.prototype.delete=Ak;Kn.prototype.get=bk;Kn.prototype.has=Ik;Kn.prototype.set=Pk;var Eh=Kn;function r$(){this.__data__=[],this.size=0}i(r$,"listCacheClear");var kk=r$;function n$(e,t){for(var r=e.length;r--;)if(Vs(e[r][0],t))return r;return-1}i(n$,"assocIndexOf");var iu=n$,Ok=Array.prototype,Lk=Ok.splice;function a$(e){var t=this.__data__,r=iu(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Lk.call(t,r,1),--this.size,!0}i(a$,"listCacheDelete");var Dk=a$;function i$(e){var t=this.__data__,r=iu(t,e);return r<0?void 0:t[r][1]}i(i$,"listCacheGet");var xk=i$;function s$(e){return iu(this.__data__,e)>-1}i(s$,"listCacheHas");var Mk=s$;function o$(e,t){var r=this.__data__,n=iu(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}i(o$,"listCacheSet");var Gk=o$;function Wn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}i(Wn,"ListCache");Wn.prototype.clear=kk;Wn.prototype.delete=Dk;Wn.prototype.get=xk;Wn.prototype.has=Mk;Wn.prototype.set=Gk;var su=Wn,Fk=Un(ir,"Map"),Es=Fk;function l$(){this.size=0,this.__data__={hash:new Eh,map:new(Es||su),string:new Eh}}i(l$,"mapCacheClear");var zk=l$;function u$(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}i(u$,"isKeyable");var jk=u$;function c$(e,t){var r=e.__data__;return jk(t)?r[typeof t=="string"?"string":"hash"]:r.map}i(c$,"getMapData");var ou=c$;function f$(e){var t=ou(this,e).delete(e);return this.size-=t?1:0,t}i(f$,"mapCacheDelete");var Bk=f$;function d$(e){return ou(this,e).get(e)}i(d$,"mapCacheGet");var Uk=d$;function p$(e){return ou(this,e).has(e)}i(p$,"mapCacheHas");var Kk=p$;function m$(e,t){var r=ou(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}i(m$,"mapCacheSet");var Wk=m$;function Vn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}i(Vn,"MapCache");Vn.prototype.clear=zk;Vn.prototype.delete=Bk;Vn.prototype.get=Uk;Vn.prototype.has=Kk;Vn.prototype.set=Wk;var lu=Vn,Vk="Expected a function";function uu(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Vk);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(uu.Cache||lu),r}i(uu,"memoize");uu.Cache=lu;var qk=uu,Hk=500;function h$(e){var t=qk(e,function(n){return r.size===Hk&&r.clear(),n}),r=t.cache;return t}i(h$,"memoizeCapped");var Yk=h$,Xk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jk=/\\(\\)?/g,Zk=Yk(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Xk,function(r,n,a,s){t.push(a?s.replace(Jk,"$1"):n||r)}),t}),Qk=Zk;function y$(e){return e==null?"":AN(e)}i(y$,"toString");var eO=y$;function g$(e,t){return re(e)?e:Op(e,t)?[e]:Qk(eO(e))}i(g$,"castPath");var cu=g$;function v$(e){if(typeof e=="string"||Ql(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}i(v$,"toKey");var Xs=v$;function T$(e,t){t=cu(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Xs(t[r++])];return r&&r==n?e:void 0}i(T$,"baseGet");var Lp=T$;function $$(e,t,r){var n=e==null?void 0:Lp(e,t);return n===void 0?r:n}i($$,"get");var tO=$$;function R$(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}i(R$,"arrayPush");var Dp=R$,Ch=wt?wt.isConcatSpreadable:void 0;function A$(e){return re(e)||nu(e)||!!(Ch&&e&&e[Ch])}i(A$,"isFlattenable");var rO=A$;function xp(e,t,r,n,a){var s=-1,o=e.length;for(r||(r=rO),a||(a=[]);++s<o;){var l=e[s];t>0&&r(l)?t>1?xp(l,t-1,r,n,a):Dp(a,l):n||(a[a.length]=l)}return a}i(xp,"baseFlatten");var Mp=xp;function E$(e){var t=e==null?0:e.length;return t?Mp(e,1):[]}i(E$,"flatten");var Ft=E$,nO=UT(Object.getPrototypeOf,Object),C$=nO;function _$(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(a);++n<a;)s[n]=e[n+t];return s}i(_$,"baseSlice");var b$=_$;function S$(e,t,r,n){var a=-1,s=e==null?0:e.length;for(n&&s&&(r=e[++a]);++a<s;)r=t(r,e[a],a,e);return r}i(S$,"arrayReduce");var aO=S$;function w$(){this.__data__=new su,this.size=0}i(w$,"stackClear");var iO=w$;function I$(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}i(I$,"stackDelete");var sO=I$;function N$(e){return this.__data__.get(e)}i(N$,"stackGet");var oO=N$;function P$(e){return this.__data__.has(e)}i(P$,"stackHas");var lO=P$,uO=200;function k$(e,t){var r=this.__data__;if(r instanceof su){var n=r.__data__;if(!Es||n.length<uO-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new lu(n)}return r.set(e,t),this.size=r.size,this}i(k$,"stackSet");var cO=k$;function qn(e){var t=this.__data__=new su(e);this.size=t.size}i(qn,"Stack");qn.prototype.clear=iO;qn.prototype.delete=sO;qn.prototype.get=oO;qn.prototype.has=lO;qn.prototype.set=cO;var ds=qn;function O$(e,t){return e&&qs(t,$t(t),e)}i(O$,"baseAssign");var fO=O$;function L$(e,t){return e&&qs(t,au(t),e)}i(L$,"baseAssignIn");var dO=L$,D$=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_h=D$&&typeof module=="object"&&module&&!module.nodeType&&module,pO=_h&&_h.exports===D$,bh=pO?ir.Buffer:void 0,Sh=bh?bh.allocUnsafe:void 0;function x$(e,t){if(t)return e.slice();var r=e.length,n=Sh?Sh(r):new e.constructor(r);return e.copy(n),n}i(x$,"cloneBuffer");var mO=x$;function M$(e,t){for(var r=-1,n=e==null?0:e.length,a=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[a++]=o)}return s}i(M$,"arrayFilter");var Gp=M$;function G$(){return[]}i(G$,"stubArray");var F$=G$,hO=Object.prototype,yO=hO.propertyIsEnumerable,wh=Object.getOwnPropertySymbols,gO=wh?function(e){return e==null?[]:(e=Object(e),Gp(wh(e),function(t){return yO.call(e,t)}))}:F$,Fp=gO;function z$(e,t){return qs(e,Fp(e),t)}i(z$,"copySymbols");var vO=z$,TO=Object.getOwnPropertySymbols,$O=TO?function(e){for(var t=[];e;)Dp(t,Fp(e)),e=C$(e);return t}:F$,j$=$O;function B$(e,t){return qs(e,j$(e),t)}i(B$,"copySymbolsIn");var RO=B$;function U$(e,t,r){var n=t(e);return re(e)?n:Dp(n,r(e))}i(U$,"baseGetAllKeys");var K$=U$;function W$(e){return K$(e,$t,Fp)}i(W$,"getAllKeys");var bf=W$;function V$(e){return K$(e,au,j$)}i(V$,"getAllKeysIn");var q$=V$,AO=Un(ir,"DataView"),Sf=AO,EO=Un(ir,"Promise"),wf=EO,CO=Un(ir,"Set"),za=CO,Ih="[object Map]",_O="[object Object]",Nh="[object Promise]",Ph="[object Set]",kh="[object WeakMap]",Oh="[object DataView]",bO=Bn(Sf),SO=Bn(Es),wO=Bn(wf),IO=Bn(za),NO=Bn(_f),on=Hr;(Sf&&on(new Sf(new ArrayBuffer(1)))!=Oh||Es&&on(new Es)!=Ih||wf&&on(wf.resolve())!=Nh||za&&on(new za)!=Ph||_f&&on(new _f)!=kh)&&(on=i(function(e){var t=Hr(e),r=t==_O?e.constructor:void 0,n=r?Bn(r):"";if(n)switch(n){case bO:return Oh;case SO:return Ih;case wO:return Nh;case IO:return Ph;case NO:return kh}return t},"getTag"));var Xa=on,PO=Object.prototype,kO=PO.hasOwnProperty;function H$(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&kO.call(e,"index")&&(r.index=e.index,r.input=e.input),r}i(H$,"initCloneArray");var OO=H$,LO=ir.Uint8Array,ml=LO;function Y$(e){var t=new e.constructor(e.byteLength);return new ml(t).set(new ml(e)),t}i(Y$,"cloneArrayBuffer");var zp=Y$;function X$(e,t){var r=t?zp(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}i(X$,"cloneDataView");var DO=X$,xO=/\w*$/;function J$(e){var t=new e.constructor(e.source,xO.exec(e));return t.lastIndex=e.lastIndex,t}i(J$,"cloneRegExp");var MO=J$,Lh=wt?wt.prototype:void 0,Dh=Lh?Lh.valueOf:void 0;function Z$(e){return Dh?Object(Dh.call(e)):{}}i(Z$,"cloneSymbol");var GO=Z$;function Q$(e,t){var r=t?zp(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}i(Q$,"cloneTypedArray");var FO=Q$,zO="[object Boolean]",jO="[object Date]",BO="[object Map]",UO="[object Number]",KO="[object RegExp]",WO="[object Set]",VO="[object String]",qO="[object Symbol]",HO="[object ArrayBuffer]",YO="[object DataView]",XO="[object Float32Array]",JO="[object Float64Array]",ZO="[object Int8Array]",QO="[object Int16Array]",e0="[object Int32Array]",t0="[object Uint8Array]",r0="[object Uint8ClampedArray]",n0="[object Uint16Array]",a0="[object Uint32Array]";function eR(e,t,r){var n=e.constructor;switch(t){case HO:return zp(e);case zO:case jO:return new n(+e);case YO:return DO(e,r);case XO:case JO:case ZO:case QO:case e0:case t0:case r0:case n0:case a0:return FO(e,r);case BO:return new n;case UO:case VO:return new n(e);case KO:return MO(e);case WO:return new n;case qO:return GO(e)}}i(eR,"initCloneByTag");var i0=eR;function tR(e){return typeof e.constructor=="function"&&!Hs(e)?QN(C$(e)):{}}i(tR,"initCloneObject");var s0=tR,o0="[object Map]";function rR(e){return jt(e)&&Xa(e)==o0}i(rR,"baseIsMap");var l0=rR,xh=Br&&Br.isMap,u0=xh?Ys(xh):l0,c0=u0,f0="[object Set]";function nR(e){return jt(e)&&Xa(e)==f0}i(nR,"baseIsSet");var d0=nR,Mh=Br&&Br.isSet,p0=Mh?Ys(Mh):d0,m0=p0,h0=1,y0=2,g0=4,aR="[object Arguments]",v0="[object Array]",T0="[object Boolean]",$0="[object Date]",R0="[object Error]",iR="[object Function]",A0="[object GeneratorFunction]",E0="[object Map]",C0="[object Number]",sR="[object Object]",_0="[object RegExp]",b0="[object Set]",S0="[object String]",w0="[object Symbol]",I0="[object WeakMap]",N0="[object ArrayBuffer]",P0="[object DataView]",k0="[object Float32Array]",O0="[object Float64Array]",L0="[object Int8Array]",D0="[object Int16Array]",x0="[object Int32Array]",M0="[object Uint8Array]",G0="[object Uint8ClampedArray]",F0="[object Uint16Array]",z0="[object Uint32Array]",de={};de[aR]=de[v0]=de[N0]=de[P0]=de[T0]=de[$0]=de[k0]=de[O0]=de[L0]=de[D0]=de[x0]=de[E0]=de[C0]=de[sR]=de[_0]=de[b0]=de[S0]=de[w0]=de[M0]=de[G0]=de[F0]=de[z0]=!0;de[R0]=de[iR]=de[I0]=!1;function ps(e,t,r,n,a,s){var o,l=t&h0,u=t&y0,c=t&g0;if(r&&(o=a?r(e,n,a,s):r(e)),o!==void 0)return o;if(!It(e))return e;var f=re(e);if(f){if(o=OO(e),!l)return tP(e,o)}else{var d=Xa(e),m=d==iR||d==A0;if(Rs(e))return mO(e,l);if(d==sR||d==aR||m&&!a){if(o=u||m?{}:s0(e),!l)return u?RO(e,dO(o,e)):vO(e,fO(o,e))}else{if(!de[d])return a?e:{};o=i0(e,d,l)}}s||(s=new ds);var g=s.get(e);if(g)return g;s.set(e,o),m0(e)?e.forEach(function(S){o.add(ps(S,t,r,S,e,s))}):c0(e)&&e.forEach(function(S,w){o.set(w,ps(S,t,r,w,e,s))});var v=c?u?q$:bf:u?au:$t,_=f?void 0:v(e);return dT(_||e,function(S,w){_&&(w=S,S=e[w]),tu(o,w,ps(S,t,r,w,e,s))}),o}i(ps,"baseClone");var j0=ps,B0=4;function oR(e){return j0(e,B0)}i(oR,"clone");var Ye=oR;function lR(e){for(var t=-1,r=e==null?0:e.length,n=0,a=[];++t<r;){var s=e[t];s&&(a[n++]=s)}return a}i(lR,"compact");var Js=lR,U0="__lodash_hash_undefined__";function uR(e){return this.__data__.set(e,U0),this}i(uR,"setCacheAdd");var K0=uR;function cR(e){return this.__data__.has(e)}i(cR,"setCacheHas");var W0=cR;function Cs(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new lu;++t<r;)this.add(e[t])}i(Cs,"SetCache");Cs.prototype.add=Cs.prototype.push=K0;Cs.prototype.has=W0;var jp=Cs;function fR(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}i(fR,"arraySome");var dR=fR;function pR(e,t){return e.has(t)}i(pR,"cacheHas");var Bp=pR,V0=1,q0=2;function mR(e,t,r,n,a,s){var o=r&V0,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&q0?new jp:void 0;for(s.set(e,t),s.set(t,e);++d<l;){var v=e[d],_=t[d];if(n)var S=o?n(_,v,d,t,e,s):n(v,_,d,e,t,s);if(S!==void 0){if(S)continue;m=!1;break}if(g){if(!dR(t,function(w,I){if(!Bp(g,I)&&(v===w||a(v,w,r,n,s)))return g.push(I)})){m=!1;break}}else if(!(v===_||a(v,_,r,n,s))){m=!1;break}}return s.delete(e),s.delete(t),m}i(mR,"equalArrays");var hR=mR;function yR(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}i(yR,"mapToArray");var H0=yR;function gR(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}i(gR,"setToArray");var Up=gR,Y0=1,X0=2,J0="[object Boolean]",Z0="[object Date]",Q0="[object Error]",eL="[object Map]",tL="[object Number]",rL="[object RegExp]",nL="[object Set]",aL="[object String]",iL="[object Symbol]",sL="[object ArrayBuffer]",oL="[object DataView]",Gh=wt?wt.prototype:void 0,qu=Gh?Gh.valueOf:void 0;function vR(e,t,r,n,a,s,o){switch(r){case oL:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case sL:return!(e.byteLength!=t.byteLength||!s(new ml(e),new ml(t)));case J0:case Z0:case tL:return Vs(+e,+t);case Q0:return e.name==t.name&&e.message==t.message;case rL:case aL:return e==t+"";case eL:var l=H0;case nL:var u=n&Y0;if(l||(l=Up),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;n|=X0,o.set(e,t);var f=hR(l(e),l(t),n,a,s,o);return o.delete(e),f;case iL:if(qu)return qu.call(e)==qu.call(t)}return!1}i(vR,"equalByTag");var lL=vR,uL=1,cL=Object.prototype,fL=cL.hasOwnProperty;function TR(e,t,r,n,a,s){var o=r&uL,l=bf(e),u=l.length,c=bf(t),f=c.length;if(u!=f&&!o)return!1;for(var d=u;d--;){var m=l[d];if(!(o?m in t:fL.call(t,m)))return!1}var g=s.get(e),v=s.get(t);if(g&&v)return g==t&&v==e;var _=!0;s.set(e,t),s.set(t,e);for(var S=o;++d<u;){m=l[d];var w=e[m],I=t[m];if(n)var R=o?n(I,w,m,t,e,s):n(w,I,m,e,t,s);if(!(R===void 0?w===I||a(w,I,r,n,s):R)){_=!1;break}S||(S=m=="constructor")}if(_&&!S){var P=e.constructor,z=t.constructor;P!=z&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof z=="function"&&z instanceof z)&&(_=!1)}return s.delete(e),s.delete(t),_}i(TR,"equalObjects");var dL=TR,pL=1,Fh="[object Arguments]",zh="[object Array]",io="[object Object]",mL=Object.prototype,jh=mL.hasOwnProperty;function $R(e,t,r,n,a,s){var o=re(e),l=re(t),u=o?zh:Xa(e),c=l?zh:Xa(t);u=u==Fh?io:u,c=c==Fh?io:c;var f=u==io,d=c==io,m=u==c;if(m&&Rs(e)){if(!Rs(t))return!1;o=!0,f=!1}if(m&&!f)return s||(s=new ds),o||kp(e)?hR(e,t,r,n,a,s):lL(e,t,u,r,n,a,s);if(!(r&pL)){var g=f&&jh.call(e,"__wrapped__"),v=d&&jh.call(t,"__wrapped__");if(g||v){var _=g?e.value():e,S=v?t.value():t;return s||(s=new ds),a(_,S,r,n,s)}}return m?(s||(s=new ds),dL(e,t,r,n,a,s)):!1}i($R,"baseIsEqualDeep");var hL=$R;function Kp(e,t,r,n,a){return e===t?!0:e==null||t==null||!jt(e)&&!jt(t)?e!==e&&t!==t:hL(e,t,r,n,Kp,a)}i(Kp,"baseIsEqual");var RR=Kp,yL=1,gL=2;function AR(e,t,r,n){var a=r.length,s=a,o=!n;if(e==null)return!s;for(e=Object(e);a--;){var l=r[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++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 ds;if(n)var m=n(c,f,u,e,t,d);if(!(m===void 0?RR(f,c,yL|gL,n,d):m))return!1}}return!0}i(AR,"baseIsMatch");var vL=AR;function ER(e){return e===e&&!It(e)}i(ER,"isStrictComparable");var CR=ER;function _R(e){for(var t=$t(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,CR(a)]}return t}i(_R,"getMatchData");var TL=_R;function bR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}i(bR,"matchesStrictComparable");var SR=bR;function wR(e){var t=TL(e);return t.length==1&&t[0][2]?SR(t[0][0],t[0][1]):function(r){return r===e||vL(r,e,t)}}i(wR,"baseMatches");var $L=wR;function IR(e,t){return e!=null&&t in Object(e)}i(IR,"baseHasIn");var RL=IR;function NR(e,t,r){t=cu(t,e);for(var n=-1,a=t.length,s=!1;++n<a;){var o=Xs(t[n]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}return s||++n!=a?s:(a=e==null?0:e.length,!!a&&Pp(a)&&eu(o,a)&&(re(e)||nu(e)))}i(NR,"hasPath");var PR=NR;function kR(e,t){return e!=null&&PR(e,t,RL)}i(kR,"hasIn");var AL=kR,EL=1,CL=2;function OR(e,t){return Op(e)&&CR(t)?SR(Xs(e),t):function(r){var n=tO(r,e);return n===void 0&&n===t?AL(r,e):RR(t,n,EL|CL)}}i(OR,"baseMatchesProperty");var _L=OR;function LR(e){return function(t){return t?.[e]}}i(LR,"baseProperty");var bL=LR;function DR(e){return function(t){return Lp(t,e)}}i(DR,"basePropertyDeep");var SL=DR;function xR(e){return Op(e)?bL(Xs(e)):SL(e)}i(xR,"property");var wL=xR;function MR(e){return typeof e=="function"?e:e==null?Ws:typeof e=="object"?re(e)?_L(e[0],e[1]):$L(e):wL(e)}i(MR,"baseIteratee");var or=MR;function GR(e,t,r,n){for(var a=-1,s=e==null?0:e.length;++a<s;){var o=e[a];t(n,o,r(o),e)}return n}i(GR,"arrayAggregator");var IL=GR;function FR(e){return function(t,r,n){for(var a=-1,s=Object(t),o=n(t),l=o.length;l--;){var u=o[e?l:++a];if(r(s[u],u,s)===!1)break}return t}}i(FR,"createBaseFor");var NL=FR,PL=NL(),kL=PL;function zR(e,t){return e&&kL(e,t,$t)}i(zR,"baseForOwn");var OL=zR;function jR(e,t){return function(r,n){if(r==null)return r;if(!sr(r))return e(r,n);for(var a=r.length,s=t?a:-1,o=Object(r);(t?s--:++s<a)&&n(o[s],s,o)!==!1;);return r}}i(jR,"createBaseEach");var LL=jR,DL=LL(OL),Hn=DL;function BR(e,t,r,n){return Hn(e,function(a,s,o){t(n,a,r(a),o)}),n}i(BR,"baseAggregator");var xL=BR;function UR(e,t){return function(r,n){var a=re(r)?IL:xL,s=t?t():{};return a(r,e,or(n),s)}}i(UR,"createAggregator");var ML=UR,KR=Object.prototype,GL=KR.hasOwnProperty,FL=Np(function(e,t){e=Object(e);var r=-1,n=t.length,a=n>2?t[2]:void 0;for(a&&ru(t[0],t[1],a)&&(n=1);++r<n;)for(var s=t[r],o=au(s),l=-1,u=o.length;++l<u;){var c=o[l],f=e[c];(f===void 0||Vs(f,KR[c])&&!GL.call(e,c))&&(e[c]=s[c])}return e}),Wp=FL;function WR(e){return jt(e)&&sr(e)}i(WR,"isArrayLikeObject");var Bh=WR;function VR(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}i(VR,"arrayIncludesWith");var qR=VR,zL=200;function HR(e,t,r,n){var a=-1,s=TT,o=!0,l=e.length,u=[],c=t.length;if(!l)return u;r&&(t=Us(t,Ys(r))),n?(s=qR,o=!1):t.length>=zL&&(s=Bp,o=!1,t=new jp(t));e:for(;++a<l;){var f=e[a],d=r==null?f:r(f);if(f=n||f!==0?f:0,o&&d===d){for(var m=c;m--;)if(t[m]===d)continue e;u.push(f)}else s(t,d,n)||u.push(f)}return u}i(HR,"baseDifference");var jL=HR,BL=Np(function(e,t){return Bh(e)?jL(e,Mp(t,1,Bh,!0)):[]}),fu=BL;function YR(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}i(YR,"last");var kn=YR;function XR(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:Ks(t),b$(e,t<0?0:t,n)):[]}i(XR,"drop");var qe=XR;function JR(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:Ks(t),t=n-t,b$(e,0,t<0?0:t)):[]}i(JR,"dropRight");var _s=JR;function ZR(e){return typeof e=="function"?e:Ws}i(ZR,"castFunction");var UL=ZR;function QR(e,t){var r=re(e)?dT:Hn;return r(e,UL(t))}i(QR,"forEach");var K=QR;function eA(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}i(eA,"arrayEvery");var KL=eA;function tA(e,t){var r=!0;return Hn(e,function(n,a,s){return r=!!t(n,a,s),r}),r}i(tA,"baseEvery");var WL=tA;function rA(e,t,r){var n=re(e)?KL:WL;return r&&ru(e,t,r)&&(t=void 0),n(e,or(t))}i(rA,"every");var zt=rA;function nA(e,t){var r=[];return Hn(e,function(n,a,s){t(n,a,s)&&r.push(n)}),r}i(nA,"baseFilter");var aA=nA;function iA(e,t){var r=re(e)?Gp:aA;return r(e,or(t))}i(iA,"filter");var Pt=iA;function sA(e){return function(t,r,n){var a=Object(t);if(!sr(t)){var s=or(r);t=$t(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(sA,"createFind");var VL=sA,qL=Math.max;function oA(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:Ks(r);return a<0&&(a=qL(n+a,0)),mT(e,or(t),a)}i(oA,"findIndex");var HL=oA,YL=VL(HL),Ja=YL;function lA(e){return e&&e.length?e[0]:void 0}i(lA,"head");var Bt=lA;function uA(e,t){var r=-1,n=sr(e)?Array(e.length):[];return Hn(e,function(a,s,o){n[++r]=t(a,s,o)}),n}i(uA,"baseMap");var XL=uA;function cA(e,t){var r=re(e)?Us:XL;return r(e,or(t))}i(cA,"map");var F=cA;function fA(e,t){return Mp(F(e,t),1)}i(fA,"flatMap");var St=fA,JL=Object.prototype,ZL=JL.hasOwnProperty,QL=ML(function(e,t,r){ZL.call(e,r)?e[r].push(t):Ip(e,r,[t])}),eD=QL,tD=Object.prototype,rD=tD.hasOwnProperty;function dA(e,t){return e!=null&&rD.call(e,t)}i(dA,"baseHas");var nD=dA;function pA(e,t){return e!=null&&PR(e,t,nD)}i(pA,"has");var B=pA,aD="[object String]";function mA(e){return typeof e=="string"||!re(e)&&jt(e)&&Hr(e)==aD}i(mA,"isString");var mt=mA;function hA(e,t){return Us(t,function(r){return e[r]})}i(hA,"baseValues");var iD=hA;function yA(e){return e==null?[]:iD(e,$t(e))}i(yA,"values");var Me=yA,sD=Math.max;function gA(e,t,r,n){e=sr(e)?e:Me(e),r=r&&!n?Ks(r):0;var a=e.length;return r<0&&(r=sD(a+r,0)),mt(e)?r<=a&&e.indexOf(t,r)>-1:!!a&&wp(e,t,r)>-1}i(gA,"includes");var ut=gA,oD=Math.max;function vA(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:Ks(r);return a<0&&(a=oD(n+a,0)),wp(e,t,a)}i(vA,"indexOf");var Uh=vA,lD="[object Map]",uD="[object Set]",cD=Object.prototype,fD=cD.hasOwnProperty;function TA(e){if(e==null)return!0;if(sr(e)&&(re(e)||typeof e=="string"||typeof e.splice=="function"||Rs(e)||kp(e)||nu(e)))return!e.length;var t=Xa(e);if(t==lD||t==uD)return!e.size;if(Hs(e))return!WT(e).length;for(var r in e)if(fD.call(e,r))return!1;return!0}i(TA,"isEmpty");var me=TA,dD="[object RegExp]";function $A(e){return jt(e)&&Hr(e)==dD}i($A,"baseIsRegExp");var pD=$A,Kh=Br&&Br.isRegExp,mD=Kh?Ys(Kh):pD,Cr=mD;function RA(e){return e===void 0}i(RA,"isUndefined");var _r=RA,hD="Expected a function";function AA(e){if(typeof e!="function")throw new TypeError(hD);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(AA,"negate");var yD=AA;function EA(e,t,r,n){if(!It(e))return e;t=cu(t,e);for(var a=-1,s=t.length,o=s-1,l=e;l!=null&&++a<s;){var u=Xs(t[a]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(a!=o){var f=l[u];c=n?n(f,u,l):void 0,c===void 0&&(c=It(f)?f:eu(t[a+1])?[]:{})}tu(l,u,c),l=l[u]}return e}i(EA,"baseSet");var gD=EA;function CA(e,t,r){for(var n=-1,a=t.length,s={};++n<a;){var o=t[n],l=Lp(e,o);r(l,o)&&gD(s,cu(o,e),l)}return s}i(CA,"basePickBy");var vD=CA;function _A(e,t){if(e==null)return{};var r=Us(q$(e),function(n){return[n]});return t=or(t),vD(e,r,function(n,a){return t(n,a[0])})}i(_A,"pickBy");var Ut=_A;function bA(e,t,r,n,a){return a(e,function(s,o,l){r=n?(n=!1,s):t(r,s,o,l)}),r}i(bA,"baseReduce");var TD=bA;function SA(e,t,r){var n=re(e)?aO:TD,a=arguments.length<3;return n(e,or(t),r,a,Hn)}i(SA,"reduce");var At=SA;function wA(e,t){var r=re(e)?Gp:aA;return r(e,yD(or(t)))}i(wA,"reject");var du=wA;function IA(e,t){var r;return Hn(e,function(n,a,s){return r=t(n,a,s),!r}),!!r}i(IA,"baseSome");var $D=IA;function NA(e,t,r){var n=re(e)?dR:$D;return r&&ru(e,t,r)&&(t=void 0),n(e,or(t))}i(NA,"some");var PA=NA,RD=1/0,AD=za&&1/Up(new za([,-0]))[1]==RD?function(e){return new za(e)}:Fe,ED=AD,CD=200;function kA(e,t,r){var n=-1,a=TT,s=e.length,o=!0,l=[],u=l;if(r)o=!1,a=qR;else if(s>=CD){var c=t?null:ED(e);if(c)return Up(c);o=!1,a=Bp,u=new jp}else u=t?[]:l;e:for(;++n<s;){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,o&&d===d){for(var m=u.length;m--;)if(u[m]===d)continue e;t&&u.push(d),l.push(f)}else a(u,d,r)||(u!==l&&u.push(d),l.push(f))}return l}i(kA,"baseUniq");var _D=kA;function OA(e){return e&&e.length?_D(e):[]}i(OA,"uniq");var Vp=OA;function hl(e){console&&console.error&&console.error(`Error: ${e}`)}i(hl,"PRINT_ERROR");function qp(e){console&&console.warn&&console.warn(`Warning: ${e}`)}i(qp,"PRINT_WARNING");function Hp(e){const t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}i(Hp,"timer");function Yp(e){function t(){}i(t,"FakeConstructor"),t.prototype=e;const r=new t;function n(){return typeof r.bar}return i(n,"fakeAccess"),n(),n(),e}i(Yp,"toFastProperties");function LA(e){return DA(e)?e.LABEL:e.name}i(LA,"tokenLabel");function DA(e){return mt(e.LABEL)&&e.LABEL!==""}i(DA,"hasTokenLabel");var lr=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),K(this.definition,t=>{t.accept(e)})}},st=class extends lr{static{i(this,"NonTerminal")}constructor(e){super([]),this.idx=1,Rt(this,Ut(e,t=>t!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},ni=class extends lr{static{i(this,"Rule")}constructor(e){super(e.definition),this.orgText="",Rt(this,Ut(e,t=>t!==void 0))}},ht=class extends lr{static{i(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Rt(this,Ut(e,t=>t!==void 0))}},He=class extends lr{static{i(this,"Option")}constructor(e){super(e.definition),this.idx=1,Rt(this,Ut(e,t=>t!==void 0))}},Et=class extends lr{static{i(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,Rt(this,Ut(e,t=>t!==void 0))}},Ct=class extends lr{static{i(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,Rt(this,Ut(e,t=>t!==void 0))}},_e=class extends lr{static{i(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,Rt(this,Ut(e,t=>t!==void 0))}},yt=class extends lr{static{i(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,Rt(this,Ut(e,t=>t!==void 0))}},gt=class extends lr{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,Rt(this,Ut(e,t=>t!==void 0))}},ve=class{static{i(this,"Terminal")}constructor(e){this.idx=1,Rt(this,Ut(e,t=>t!==void 0))}accept(e){e.visit(this)}};function xA(e){return F(e,ms)}i(xA,"serializeGrammar");function ms(e){function t(r){return F(r,ms)}if(i(t,"convertDefinition"),e instanceof st){const r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return mt(e.label)&&(r.label=e.label),r}else{if(e instanceof ht)return{type:"Alternative",definition:t(e.definition)};if(e instanceof He)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Et)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Ct)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:ms(new ve({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof yt)return{type:"RepetitionWithSeparator",idx:e.idx,separator:ms(new ve({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof _e)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof gt)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof ve){const r={type:"Terminal",name:e.terminalType.name,label:LA(e.terminalType),idx:e.idx};mt(e.label)&&(r.terminalLabel=e.label);const n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=Cr(n)?n.source:n),r}else{if(e instanceof ni)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}i(ms,"serializeProduction");var ai=class{static{i(this,"GAstVisitor")}visit(e){const t=e;switch(t.constructor){case st:return this.visitNonTerminal(t);case ht:return this.visitAlternative(t);case He:return this.visitOption(t);case Et:return this.visitRepetitionMandatory(t);case Ct:return this.visitRepetitionMandatoryWithSeparator(t);case yt:return this.visitRepetitionWithSeparator(t);case _e:return this.visitRepetition(t);case gt:return this.visitAlternation(t);case ve:return this.visitTerminal(t);case ni: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 MA(e){return e instanceof ht||e instanceof He||e instanceof _e||e instanceof Et||e instanceof Ct||e instanceof yt||e instanceof ve||e instanceof ni}i(MA,"isSequenceProd");function bs(e,t=[]){return e instanceof He||e instanceof _e||e instanceof yt?!0:e instanceof gt?PA(e.definition,n=>bs(n,t)):e instanceof st&&ut(t,e)?!1:e instanceof lr?(e instanceof st&&t.push(e),zt(e.definition,n=>bs(n,t))):!1}i(bs,"isOptionalProd");function GA(e){return e instanceof gt}i(GA,"isBranchingProd");function Dt(e){if(e instanceof st)return"SUBRULE";if(e instanceof He)return"OPTION";if(e instanceof gt)return"OR";if(e instanceof Et)return"AT_LEAST_ONE";if(e instanceof Ct)return"AT_LEAST_ONE_SEP";if(e instanceof yt)return"MANY_SEP";if(e instanceof _e)return"MANY";if(e instanceof ve)return"CONSUME";throw Error("non exhaustive match")}i(Dt,"getProductionDslName");var pu=class{static{i(this,"RestWalker")}walk(e,t=[]){K(e.definition,(r,n)=>{const a=qe(e.definition,n+1);if(r instanceof st)this.walkProdRef(r,a,t);else if(r instanceof ve)this.walkTerminal(r,a,t);else if(r instanceof ht)this.walkFlat(r,a,t);else if(r instanceof He)this.walkOption(r,a,t);else if(r instanceof Et)this.walkAtLeastOne(r,a,t);else if(r instanceof Ct)this.walkAtLeastOneSep(r,a,t);else if(r instanceof yt)this.walkManySep(r,a,t);else if(r instanceof _e)this.walkMany(r,a,t);else if(r instanceof gt)this.walkOr(r,a,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){const n=t.concat(r);this.walk(e,n)}walkOption(e,t,r){const n=t.concat(r);this.walk(e,n)}walkAtLeastOne(e,t,r){const n=[new He({definition:e.definition})].concat(t,r);this.walk(e,n)}walkAtLeastOneSep(e,t,r){const n=If(e,t,r);this.walk(e,n)}walkMany(e,t,r){const n=[new He({definition:e.definition})].concat(t,r);this.walk(e,n)}walkManySep(e,t,r){const n=If(e,t,r);this.walk(e,n)}walkOr(e,t,r){const n=t.concat(r);K(e.definition,a=>{const s=new ht({definition:[a]});this.walk(s,n)})}};function If(e,t,r){return[new He({definition:[new ve({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}i(If,"restForRepetitionWithSeparator");function ii(e){if(e instanceof st)return ii(e.referencedRule);if(e instanceof ve)return jA(e);if(MA(e))return FA(e);if(GA(e))return zA(e);throw Error("non exhaustive match")}i(ii,"first");function FA(e){let t=[];const r=e.definition;let n=0,a=r.length>n,s,o=!0;for(;a&&o;)s=r[n],o=bs(s),t=t.concat(ii(s)),n=n+1,a=r.length>n;return Vp(t)}i(FA,"firstForSequence");function zA(e){const t=F(e.definition,r=>ii(r));return Vp(Ft(t))}i(zA,"firstForBranching");function jA(e){return[e.terminalType]}i(jA,"firstForTerminal");var BA="_~IN~_",bD=class extends pu{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){const n=KA(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(r),s=new ht({definition:a}),o=ii(s);this.follows[n]=o}};function UA(e){const t={};return K(e,r=>{const n=new bD(r).startWalking();Rt(t,n)}),t}i(UA,"computeAllProdsFollows");function KA(e,t){return e.name+t+BA}i(KA,"buildBetweenProdsFollowPrefix");var Oo={},SD=new Av;function Zs(e){const t=e.toString();if(Oo.hasOwnProperty(t))return Oo[t];{const r=SD.pattern(t);return Oo[t]=r,r}}i(Zs,"getRegExpAst");function WA(){Oo={}}i(WA,"clearRegExpParserCache");var VA="Complement Sets are not supported for first char optimization",yl=`Unable to use "first char" lexer optimizations:
|
|
47
|
+
`;function qA(e,t=!1){try{const r=Zs(e);return gl(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===VA)t&&qp(`${yl} 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="";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.`),hl(`${yl}
|
|
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(qA,"getOptimizedStartCodesIndices");function gl(e,t,r){switch(e.type){case"Disjunction":for(let a=0;a<e.value.length;a++)gl(e.value[a],t,r);break;case"Alternative":const n=e.value;for(let a=0;a<n.length;a++){const 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}const o=s;switch(o.type){case"Character":Ji(o.value,t,r);break;case"Set":if(o.complement===!0)throw Error(VA);K(o.value,u=>{if(typeof u=="number")Ji(u,t,r);else{const c=u;if(r===!0)for(let f=c.from;f<=c.to;f++)Ji(f,t,r);else{for(let f=c.from;f<=c.to&&f<Qi;f++)Ji(f,t,r);if(c.to>=Qi){const f=c.from>=Qi?c.from:Qi,d=c.to,m=br(f),g=br(d);for(let v=m;v<=g;v++)t[v]=v}}}});break;case"Group":gl(o.value,t,r);break;default:throw Error("Non Exhaustive Match")}const l=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&vl(o)===!1||o.type!=="Group"&&l===!1)break}break;default:throw Error("non exhaustive match!")}return Me(t)}i(gl,"firstCharOptimizedIndices");function Ji(e,t,r){const n=br(e);t[n]=n,r===!0&&HA(e,t)}i(Ji,"addOptimizedIdxToResult");function HA(e,t){const r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){const a=br(n.charCodeAt(0));t[a]=a}else{const a=r.toLowerCase();if(a!==r){const s=br(a.charCodeAt(0));t[s]=s}}}i(HA,"handleIgnoreCase");function Nf(e,t){return Ja(e.value,r=>{if(typeof r=="number")return ut(t,r);{const n=r;return Ja(t,a=>n.from<=a&&a<=n.to)!==void 0}})}i(Nf,"findCode");function vl(e){const t=e.quantifier;return t&&t.atLeast===0?!0:e.value?re(e.value)?zt(e.value,vl):vl(e.value):!1}i(vl,"isWholeOptional");var wD=class extends Vl{static{i(this,"CharCodeFinder")}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){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){ut(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?Nf(e,this.targetCharCodes)===void 0&&(this.found=!0):Nf(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function mu(e,t){if(t instanceof RegExp){const r=Zs(t),n=new wD(e);return n.visit(r),n.found}else return Ja(t,r=>ut(e,r.charCodeAt(0)))!==void 0}i(mu,"canMatchCharCode");var On="PATTERN",Zi="defaultMode",so="modes";function YA(e,t){t=Wp(t,{debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
|
|
56
|
+
`],tracer:i((I,R)=>R(),"tracer")});const r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{yE()});let n;r("Reject Lexer.NA",()=>{n=du(e,I=>I[On]===at.NA)});let a=!1,s;r("Transform Patterns",()=>{a=!1,s=F(n,I=>{const R=I[On];if(Cr(R)){const P=R.source;return P.length===1&&P!=="^"&&P!=="$"&&P!=="."&&!R.ignoreCase?P:P.length===2&&P[0]==="\\"&&!ut(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],P[1])?P[1]:Pf(R)}else{if(Pr(R))return a=!0,{exec:R};if(typeof R=="object")return a=!0,R;if(typeof R=="string"){if(R.length===1)return R;{const P=R.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),z=new RegExp(P);return Pf(z)}}else throw Error("non exhaustive match")}})});let o,l,u,c,f;r("misc mapping",()=>{o=F(n,I=>I.tokenTypeIdx),l=F(n,I=>{const R=I.GROUP;if(R!==at.SKIPPED){if(mt(R))return R;if(_r(R))return!1;throw Error("non exhaustive match")}}),u=F(n,I=>{const R=I.LONGER_ALT;if(R)return re(R)?F(R,z=>Uh(n,z)):[Uh(n,R)]}),c=F(n,I=>I.PUSH_MODE),f=F(n,I=>B(I,"POP_MODE"))});let d;r("Line Terminator Handling",()=>{const I=Zp(t.lineTerminatorCharacters);d=F(n,R=>!1),t.positionTracking!=="onlyOffset"&&(d=F(n,R=>B(R,"LINE_BREAKS")?!!R.LINE_BREAKS:Jp(R,I)===!1&&mu(I,R.PATTERN)))});let m,g,v,_;r("Misc Mapping #2",()=>{m=F(n,Xp),g=F(s,mE),v=At(n,(I,R)=>{const P=R.GROUP;return mt(P)&&P!==at.SKIPPED&&(I[P]=[]),I},{}),_=F(s,(I,R)=>({pattern:s[R],longerAlt:u[R],canLineTerminator:d[R],isCustom:m[R],short:g[R],group:l[R],push:c[R],pop:f[R],tokenTypeIdx:o[R],tokenType:n[R]}))});let S=!0,w=[];return t.safeMode||r("First Char Optimization",()=>{w=At(n,(I,R,P)=>{if(typeof R.PATTERN=="string"){const z=R.PATTERN.charCodeAt(0),X=br(z);Lo(I,X,_[P])}else if(re(R.START_CHARS_HINT)){let z;K(R.START_CHARS_HINT,X=>{const Z=typeof X=="string"?X.charCodeAt(0):X,ce=br(Z);z!==ce&&(z=ce,Lo(I,ce,_[P]))})}else if(Cr(R.PATTERN))if(R.PATTERN.unicode)S=!1,t.ensureOptimizations&&hl(`${yl} Unable to analyze < ${R.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{const z=qA(R.PATTERN,t.ensureOptimizations);me(z)&&(S=!1),K(z,X=>{Lo(I,X,_[P])})}else t.ensureOptimizations&&hl(`${yl} TokenType: <${R.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`),S=!1;return I},[])}),{emptyGroups:v,patternIdxToConfig:_,charCodeToPatternIdxToConfig:w,hasCustom:a,canBeOptimized:S}}i(YA,"analyzeTokenTypes");function XA(e,t){let r=[];const n=ZA(e);r=r.concat(n.errors);const a=QA(n.valid),s=a.valid;return r=r.concat(a.errors),r=r.concat(JA(s)),r=r.concat(iE(s)),r=r.concat(sE(s,t)),r=r.concat(oE(s)),r}i(XA,"validatePatterns");function JA(e){let t=[];const r=Pt(e,n=>Cr(n[On]));return t=t.concat(eE(r)),t=t.concat(rE(r)),t=t.concat(nE(r)),t=t.concat(aE(r)),t=t.concat(tE(r)),t}i(JA,"validateRegExpPattern");function ZA(e){const t=Pt(e,a=>!B(a,On)),r=F(t,a=>({message:"Token Type: ->"+a.name+"<- missing static 'PATTERN' property",type:be.MISSING_PATTERN,tokenTypes:[a]})),n=fu(e,t);return{errors:r,valid:n}}i(ZA,"findMissingPatterns");function QA(e){const t=Pt(e,a=>{const s=a[On];return!Cr(s)&&!Pr(s)&&!B(s,"exec")&&!mt(s)}),r=F(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:be.INVALID_PATTERN,tokenTypes:[a]})),n=fu(e,t);return{errors:r,valid:n}}i(QA,"findInvalidPatterns");var ID=/[^\\][$]/;function eE(e){class t extends Vl{static{i(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}const r=Pt(e,a=>{const s=a.PATTERN;try{const o=Zs(s),l=new t;return l.visit(o),l.found}catch{return ID.test(s.source)}});return F(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:be.EOI_ANCHOR_FOUND,tokenTypes:[a]}))}i(eE,"findEndOfInputAnchor");function tE(e){const t=Pt(e,n=>n.PATTERN.test(""));return F(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:be.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}i(tE,"findEmptyMatchRegExps");var ND=/[^\\[][\^]|^\^/;function rE(e){class t extends Vl{static{i(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}const r=Pt(e,a=>{const s=a.PATTERN;try{const o=Zs(s),l=new t;return l.visit(o),l.found}catch{return ND.test(s.source)}});return F(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:be.SOI_ANCHOR_FOUND,tokenTypes:[a]}))}i(rE,"findStartOfInputAnchor");function nE(e){const t=Pt(e,n=>{const a=n[On];return a instanceof RegExp&&(a.multiline||a.global)});return F(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:be.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}i(nE,"findUnsupportedFlags");function aE(e){const t=[];let r=F(e,s=>At(e,(o,l)=>(s.PATTERN.source===l.PATTERN.source&&!ut(t,l)&&l.PATTERN!==at.NA&&(t.push(l),o.push(l)),o),[]));r=Js(r);const n=Pt(r,s=>s.length>1);return F(n,s=>{const o=F(s,u=>u.name);return{message:`The same RegExp pattern ->${Bt(s).PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:be.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}i(aE,"findDuplicatePatterns");function iE(e){const t=Pt(e,n=>{if(!B(n,"GROUP"))return!1;const a=n.GROUP;return a!==at.SKIPPED&&a!==at.NA&&!mt(a)});return F(t,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:be.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}i(iE,"findInvalidGroupType");function sE(e,t){const r=Pt(e,a=>a.PUSH_MODE!==void 0&&!ut(t,a.PUSH_MODE));return F(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:be.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[a]}))}i(sE,"findModesThatDoNotExist");function oE(e){const t=[],r=At(e,(n,a,s)=>{const o=a.PATTERN;return o===at.NA||(mt(o)?n.push({str:o,idx:s,tokenType:a}):Cr(o)&&uE(o)&&n.push({str:o.source,idx:s,tokenType:a})),n},[]);return K(e,(n,a)=>{K(r,({str:s,idx:o,tokenType:l})=>{if(a<o&&lE(s,n.PATTERN)){const 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:be.UNREACHABLE_PATTERN,tokenTypes:[n,l]})}})}),t}i(oE,"findUnreachablePatterns");function lE(e,t){if(Cr(t)){if(cE(t))return!1;const r=t.exec(e);return r!==null&&r.index===0}else{if(Pr(t))return t(e,0,[],{});if(B(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}i(lE,"tryToMatchStrToPattern");function uE(e){return Ja([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>e.source.indexOf(r)!==-1)===void 0}i(uE,"noMetaChar");function cE(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}i(cE,"usesLookAheadOrBehind");function Pf(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}i(Pf,"addStickyFlag");function fE(e,t,r){const n=[];return B(e,Zi)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Zi+`> property in its definition
|
|
68
|
+
`,type:be.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),B(e,so)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+so+`> property in its definition
|
|
69
|
+
`,type:be.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),B(e,so)&&B(e,Zi)&&!B(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Zi}: <${e.defaultMode}>which does not exist
|
|
70
|
+
`,type:be.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),B(e,so)&&K(e.modes,(a,s)=>{K(a,(o,l)=>{if(_r(o))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${s}> at index: <${l}>
|
|
71
|
+
`,type:be.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(B(o,"LONGER_ALT")){const u=re(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT];K(u,c=>{!_r(c)&&!ut(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:be.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}i(fE,"performRuntimeChecks");function dE(e,t,r){const n=[];let a=!1;const s=Js(Ft(Me(e.modes))),o=du(s,u=>u[On]===at.NA),l=Zp(r);return t&&K(o,u=>{const c=Jp(u,l);if(c!==!1){const d={message:hE(u,c),type:c.issue,tokenType:u};n.push(d)}else B(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(a=!0):mu(l,u.PATTERN)&&(a=!0)}),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:be.NO_LINE_BREAKS_FLAGS}),n}i(dE,"performWarningRuntimeChecks");function pE(e){const t={},r=$t(e);return K(r,n=>{const a=e[n];if(re(a))t[n]=[];else throw Error("non exhaustive match")}),t}i(pE,"cloneEmptyGroups");function Xp(e){const t=e.PATTERN;if(Cr(t))return!1;if(Pr(t))return!0;if(B(t,"exec"))return!0;if(mt(t))return!1;throw Error("non exhaustive match")}i(Xp,"isCustomPattern");function mE(e){return mt(e)&&e.length===1?e.charCodeAt(0):!1}i(mE,"isShortPattern");var PD={test:i(function(e){const t=e.length;for(let r=this.lastIndex;r<t;r++){const n=e.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return e.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},"test"),lastIndex:0};function Jp(e,t){if(B(e,"LINE_BREAKS"))return!1;if(Cr(e.PATTERN)){try{mu(t,e.PATTERN)}catch(r){return{issue:be.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(mt(e.PATTERN))return!1;if(Xp(e))return{issue:be.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}i(Jp,"checkLineBreaksIssues");function hE(e,t){if(t.issue===be.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`;if(t.issue===be.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`;throw Error("non exhaustive match")}i(hE,"buildLineBreakIssueMessage");function Zp(e){return F(e,r=>mt(r)?r.charCodeAt(0):r)}i(Zp,"getCharCodes");function Lo(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}i(Lo,"addToMapOfArrays");var Qi=256,Do=[];function br(e){return e<Qi?e:Do[e]}i(br,"charCodeToOptimizedIndex");function yE(){if(me(Do)){Do=new Array(65536);for(let e=0;e<65536;e++)Do[e]=e>255?255+~~(e/255):e}}i(yE,"initCharCodeToOptimizedIndexMap");function si(e,t){const r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}i(si,"tokenStructuredMatcher");function Ss(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}i(Ss,"tokenStructuredMatcherNoCategories");var Wh=1,gE={};function oi(e){const t=vE(e);TE(t),RE(t),$E(t),K(t,r=>{r.isParent=r.categoryMatches.length>0})}i(oi,"augmentTokenTypes");function vE(e){let t=Ye(e),r=e,n=!0;for(;n;){r=Js(Ft(F(r,s=>s.CATEGORIES)));const a=fu(r,t);t=t.concat(a),me(a)?n=!1:r=a}return t}i(vE,"expandCategories");function TE(e){K(e,t=>{em(t)||(gE[Wh]=t,t.tokenTypeIdx=Wh++),kf(t)&&!re(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),kf(t)||(t.CATEGORIES=[]),AE(t)||(t.categoryMatches=[]),EE(t)||(t.categoryMatchesMap={})})}i(TE,"assignTokenDefaultProps");function $E(e){K(e,t=>{t.categoryMatches=[],K(t.categoryMatchesMap,(r,n)=>{t.categoryMatches.push(gE[n].tokenTypeIdx)})})}i($E,"assignCategoriesTokensProp");function RE(e){K(e,t=>{Qp([],t)})}i(RE,"assignCategoriesMapProp");function Qp(e,t){K(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),K(t.CATEGORIES,r=>{const n=e.concat(t);ut(n,r)||Qp(n,r)})}i(Qp,"singleAssignCategoriesToksMap");function em(e){return B(e,"tokenTypeIdx")}i(em,"hasShortKeyProperty");function kf(e){return B(e,"CATEGORIES")}i(kf,"hasCategoriesProperty");function AE(e){return B(e,"categoryMatches")}i(AE,"hasExtendingTokensTypesProperty");function EE(e){return B(e,"categoryMatchesMap")}i(EE,"hasExtendingTokensTypesMapProperty");function CE(e){return B(e,"tokenTypeIdx")}i(CE,"isTokenType");var Of={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.`}},be;(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"})(be||(be={}));var es={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
|
|
82
|
+
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Of,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(es);var at=class{static{i(this,"Lexer")}constructor(e,t=es){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++;const s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${s}--> <${n}>`);const{time:o,value:l}=Hp(a),u=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&u(`${s}<-- <${n}> time: ${o}ms`),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=Rt({},es,t);const r=this.config.traceInitPerf;r===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof r=="number"&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let n,a=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===es.lineTerminatorsPattern)this.config.lineTerminatorsPattern=PD;else if(this.config.lineTerminatorCharacters===es.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.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),re(e)?n={modes:{defaultMode:Ye(e)},defaultMode:Zi}:(a=!1,n=Ye(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(fE(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(dE(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},K(n.modes,(o,l)=>{n.modes[l]=du(o,u=>_r(u))});const s=$t(n.modes);if(K(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(XA(o,s))}),me(this.lexerDefinitionErrors)){oi(o);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=YA(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=Rt({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=u.canBeOptimized}})}),this.defaultMode=n.defaultMode,!me(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const l=F(this.lexerDefinitionErrors,u=>u.message).join(`-----------------------
|
|
85
|
+
`);throw new Error(`Errors detected in definition of Lexer:
|
|
86
|
+
`+l)}K(this.lexerDefinitionWarning,o=>{qp(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(a&&(this.handleModes=Fe),this.trackStartLines===!1&&(this.computeNewColumn=Ws),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Fe),/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}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const o=At(this.canModeBeOptimized,(l,u,c)=>(u===!1&&l.push(c),l),[]);if(t.ensureOptimizations&&!me(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",()=>{WA()}),this.TRACE_INIT("toFastProperties",()=>{Yp(this)})})}tokenize(e,t=this.defaultMode){if(!me(this.lexerDefinitionErrors)){const n=F(this.lexerDefinitionErrors,a=>a.message).join(`-----------------------
|
|
89
|
+
`);throw new 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;const w=e,I=w.length;let R=0,P=0;const z=this.hasCustom?0:Math.floor(e.length/10),X=new Array(z),Z=[];let ce=this.trackStartLines?1:void 0,se=this.trackStartLines?1:void 0;const Se=pE(this.emptyGroups),k=this.trackStartLines,C=this.config.lineTerminatorsPattern;let y=0,E=[],T=[];const $=[],b=[];Object.freeze(b);let O=!1;const x=i(Y=>{if($.length===1&&Y.tokenType.PUSH_MODE===void 0){const V=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Y);Z.push({offset:Y.startOffset,line:Y.startLine,column:Y.startColumn,length:Y.image.length,message:V})}else{$.pop();const V=kn($);E=this.patternIdxToConfig[V],T=this.charCodeToPatternIdxToConfig[V],y=E.length;const Pe=this.canModeBeOptimized[V]&&this.config.safeMode===!1;T&&Pe?O=!0:O=!1}},"pop_mode");function D(Y){$.push(Y),T=this.charCodeToPatternIdxToConfig[Y],E=this.patternIdxToConfig[Y],y=E.length,y=E.length;const V=this.canModeBeOptimized[Y]&&this.config.safeMode===!1;T&&V?O=!0:O=!1}i(D,"push_mode"),D.call(this,t);let G;const W=this.config.recoveryEnabled;for(;R<I;){l=null,f=-1;const Y=w.charCodeAt(R);let V;if(O){const oe=br(Y),Le=T[oe];V=Le!==void 0?Le:b}else V=E;const Pe=V.length;for(r=0;r<Pe;r++){G=V[r];const oe=G.pattern;u=null;const Le=G.short;if(Le!==!1?Y===Le&&(f=1,l=oe):G.isCustom===!0?(S=oe.exec(w,R,X,Se),S!==null?(l=S[0],f=l.length,S.payload!==void 0&&(u=S.payload)):l=null):(oe.lastIndex=R,f=this.matchLength(oe,e,R)),f!==-1){if(o=G.longerAlt,o!==void 0){l=e.substring(R,R+f);const De=o.length;for(a=0;a<De;a++){const ke=E[o[a]],Ze=ke.pattern;if(c=null,ke.isCustom===!0?(S=Ze.exec(w,R,X,Se),S!==null?(s=S[0],S.payload!==void 0&&(c=S.payload)):s=null):(Ze.lastIndex=R,s=this.match(Ze,e,R)),s&&s.length>l.length){l=s,f=s.length,u=c,G=ke;break}}}break}}if(f!==-1){if(d=G.group,d!==void 0&&(l=l!==null?l:e.substring(R,R+f),m=G.tokenTypeIdx,g=this.createTokenInstance(l,R,m,G.tokenType,ce,se,f),this.handlePayload(g,u),d===!1?P=this.addToken(X,P,g):Se[d].push(g)),k===!0&&G.canLineTerminator===!0){let oe=0,Le,De;C.lastIndex=0;do l=l!==null?l:e.substring(R,R+f),Le=C.test(l),Le===!0&&(De=C.lastIndex-1,oe++);while(Le===!0);oe!==0?(ce=ce+oe,se=f-De,this.updateTokenEndLineColumnLocation(g,d,De,oe,ce,se,f)):se=this.computeNewColumn(se,f)}else se=this.computeNewColumn(se,f);R=R+f,this.handleModes(G,x,D,g)}else{const oe=R,Le=ce,De=se;let ke=W===!1;for(;ke===!1&&R<I;)for(R++,n=0;n<y;n++){const Ze=E[n],Je=Ze.pattern,ne=Ze.short;if(ne!==!1?w.charCodeAt(R)===ne&&(ke=!0):Ze.isCustom===!0?ke=Je.exec(w,R,X,Se)!==null:(Je.lastIndex=R,ke=Je.exec(e)!==null),ke===!0)break}if(v=R-oe,se=this.computeNewColumn(se,v),_=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(w,oe,v,Le,De,kn($)),Z.push({offset:oe,line:Le,column:De,length:v,message:_}),W===!1)break}}return this.hasCustom||(X.length=P),{tokens:X,groups:Se,errors:Z}}handleModes(e,t,r,n){if(e.pop===!0){const a=e.push;t(n),a!==void 0&&r.call(this,a)}else e.push!==void 0&&r.call(this,e.push)}updateTokenEndLineColumnLocation(e,t,r,n,a,s,o){let l,u;t!==void 0&&(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){t!==null&&(e.payload=t)}match(e,t,r){return e.test(t)===!0?t.substring(r,e.lastIndex):null}matchLength(e,t,r){return e.test(t)===!0?e.lastIndex-r:-1}};at.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.";at.NA=/NOT_APPLICABLE/;function In(e){return tm(e)?e.LABEL:e.name}i(In,"tokenLabel");function tm(e){return mt(e.LABEL)&&e.LABEL!==""}i(tm,"hasTokenLabel");var kD="parent",Vh="categories",qh="label",Hh="group",Yh="push_mode",Xh="pop_mode",Jh="longer_alt",Zh="line_breaks",Qh="start_chars_hint";function ja(e){return _E(e)}i(ja,"createToken");function _E(e){const t=e.pattern,r={};if(r.name=e.name,_r(t)||(r.PATTERN=t),B(e,kD))throw`The parent property is no longer supported.
|
|
91
|
+
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return B(e,Vh)&&(r.CATEGORIES=e[Vh]),oi([r]),B(e,qh)&&(r.LABEL=e[qh]),B(e,Hh)&&(r.GROUP=e[Hh]),B(e,Xh)&&(r.POP_MODE=e[Xh]),B(e,Yh)&&(r.PUSH_MODE=e[Yh]),B(e,Jh)&&(r.LONGER_ALT=e[Jh]),B(e,Zh)&&(r.LINE_BREAKS=e[Zh]),B(e,Qh)&&(r.START_CHARS_HINT=e[Qh]),r}i(_E,"createTokenInternal");var Ur=ja({name:"EOF",pattern:at.NA});oi([Ur]);function Qs(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(Qs,"createTokenInstance");function rm(e,t){return si(e,t)}i(rm,"tokenMatcher");var Ga={buildMismatchTokenMessage({expected:e,actual:t,previous:r,ruleName:n}){return`Expecting ${tm(e)?`--> ${In(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}){const s="Expecting: ",l=`
|
|
92
|
+
but found: '`+Bt(t).image+"'";if(n)return s+n+l;{const u=At(e,(m,g)=>m.concat(g),[]),c=F(u,m=>`[${F(m,g=>In(g)).join(", ")}]`),d=`one of these possible Token sequences:
|
|
93
|
+
${F(c,(m,g)=>` ${g+1}. ${m}`).join(`
|
|
94
|
+
`)}`;return s+d+l}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){const a="Expecting: ",o=`
|
|
95
|
+
but found: '`+Bt(t).image+"'";if(r)return a+r+o;{const u=`expecting at least one iteration which starts with one of these possible Token sequences::
|
|
96
|
+
<${F(e,c=>`[${F(c,f=>In(f)).join(",")}]`).join(" ,")}>`;return a+u+o}}};Object.freeze(Ga);var OD={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
|
|
97
|
+
inside top level rule: ->`+e.name+"<-"}},bn={buildDuplicateFoundError(e,t){function r(f){return f instanceof ve?f.terminalType.name:f instanceof st?f.nonTerminalName:""}i(r,"getExtraProductionArgument");const n=e.name,a=Bt(t),s=a.idx,o=Dt(a),l=r(a),u=s>0;let 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){const t=F(e.prefixPath,a=>In(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){const t=e.alternation.idx===0?"":e.alternation.idx,r=e.prefixPath.length===0;let 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{const a=F(e.prefixPath,s=>In(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=Dt(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`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){const t=e.topLevelRule.name,r=F(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;return e.topLevelRule instanceof ni?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function bE(e,t){const r=new LD(e,t);return r.resolveRefs(),r.errors}i(bE,"resolveGrammar");var LD=class extends ai{static{i(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){K(Me(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:ot.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},DD=class extends pu{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=Ye(this.path.ruleStack).reverse(),this.occurrenceStack=Ye(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}}updateExpectedNext(){me(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},xD=class extends DD{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){const n=t.concat(r),a=new ht({definition:n});this.possibleTokTypes=ii(a),this.found=!0}}},hu=class extends pu{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}},MD=class extends hu{static{i(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){if(e.idx===this.occurrence){const n=Bt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof ve&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkMany(e,t,r)}},ey=class extends hu{static{i(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){if(e.idx===this.occurrence){const n=Bt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof ve&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkManySep(e,t,r)}},GD=class extends hu{static{i(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){const n=Bt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof ve&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOne(e,t,r)}},ty=class extends hu{static{i(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){const n=Bt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof ve&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOneSep(e,t,r)}};function Tl(e,t,r=[]){r=Ye(r);let n=[],a=0;function s(l){return l.concat(qe(e,a+1))}i(s,"remainingPathWith");function o(l){const u=Tl(s(l),t,r);return n.concat(u)}for(i(o,"getAlternativesForProd");r.length<t&&a<e.length;){const l=e[a];if(l instanceof ht)return o(l.definition);if(l instanceof st)return o(l.definition);if(l instanceof He)n=o(l.definition);else if(l instanceof Et){const u=l.definition.concat([new _e({definition:l.definition})]);return o(u)}else if(l instanceof Ct){const u=[new ht({definition:l.definition}),new _e({definition:[new ve({terminalType:l.separator})].concat(l.definition)})];return o(u)}else if(l instanceof yt){const u=l.definition.concat([new _e({definition:[new ve({terminalType:l.separator})].concat(l.definition)})]);n=o(u)}else if(l instanceof _e){const u=l.definition.concat([new _e({definition:l.definition})]);n=o(u)}else{if(l instanceof gt)return K(l.definition,u=>{me(u.definition)===!1&&(n=o(u.definition))}),n;if(l instanceof ve)r.push(l.terminalType);else throw Error("non exhaustive match")}a++}return n.push({partialPath:r,suffixDef:qe(e,a)}),n}i(Tl,"possiblePathsFrom");function nm(e,t,r,n){const a="EXIT_NONE_TERMINAL",s=[a],o="EXIT_ALTERNATIVE";let l=!1;const u=t.length,c=u-n-1,f=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!me(d);){const m=d.pop();if(m===o){l&&kn(d).idx<=c&&d.pop();continue}const g=m.def,v=m.idx,_=m.ruleStack,S=m.occurrenceStack;if(me(g))continue;const w=g[0];if(w===a){const I={idx:v,def:qe(g),ruleStack:_s(_),occurrenceStack:_s(S)};d.push(I)}else if(w instanceof ve)if(v<u-1){const I=v+1,R=t[I];if(r(R,w.terminalType)){const P={idx:I,def:qe(g),ruleStack:_,occurrenceStack:S};d.push(P)}}else if(v===u-1)f.push({nextTokenType:w.terminalType,nextTokenOccurrence:w.idx,ruleStack:_,occurrenceStack:S}),l=!0;else throw Error("non exhaustive match");else if(w instanceof st){const I=Ye(_);I.push(w.nonTerminalName);const R=Ye(S);R.push(w.idx);const P={idx:v,def:w.definition.concat(s,qe(g)),ruleStack:I,occurrenceStack:R};d.push(P)}else if(w instanceof He){const I={idx:v,def:qe(g),ruleStack:_,occurrenceStack:S};d.push(I),d.push(o);const R={idx:v,def:w.definition.concat(qe(g)),ruleStack:_,occurrenceStack:S};d.push(R)}else if(w instanceof Et){const I=new _e({definition:w.definition,idx:w.idx}),R=w.definition.concat([I],qe(g)),P={idx:v,def:R,ruleStack:_,occurrenceStack:S};d.push(P)}else if(w instanceof Ct){const I=new ve({terminalType:w.separator}),R=new _e({definition:[I].concat(w.definition),idx:w.idx}),P=w.definition.concat([R],qe(g)),z={idx:v,def:P,ruleStack:_,occurrenceStack:S};d.push(z)}else if(w instanceof yt){const I={idx:v,def:qe(g),ruleStack:_,occurrenceStack:S};d.push(I),d.push(o);const R=new ve({terminalType:w.separator}),P=new _e({definition:[R].concat(w.definition),idx:w.idx}),z=w.definition.concat([P],qe(g)),X={idx:v,def:z,ruleStack:_,occurrenceStack:S};d.push(X)}else if(w instanceof _e){const I={idx:v,def:qe(g),ruleStack:_,occurrenceStack:S};d.push(I),d.push(o);const R=new _e({definition:w.definition,idx:w.idx}),P=w.definition.concat([R],qe(g)),z={idx:v,def:P,ruleStack:_,occurrenceStack:S};d.push(z)}else if(w instanceof gt)for(let I=w.definition.length-1;I>=0;I--){const R=w.definition[I],P={idx:v,def:R.definition.concat(qe(g)),ruleStack:_,occurrenceStack:S};d.push(P),d.push(o)}else if(w instanceof ht)d.push({idx:v,def:w.definition.concat(qe(g)),ruleStack:_,occurrenceStack:S});else if(w instanceof ni)d.push(SE(w,v,_,S));else throw Error("non exhaustive match")}return f}i(nm,"nextPossibleTokensAfter");function SE(e,t,r,n){const a=Ye(r);a.push(e.name);const s=Ye(n);return s.push(1),{idx:t,def:e.definition,ruleStack:a,occurrenceStack:s}}i(SE,"expandTopLevelRule");var Re;(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"})(Re||(Re={}));function yu(e){if(e instanceof He||e==="Option")return Re.OPTION;if(e instanceof _e||e==="Repetition")return Re.REPETITION;if(e instanceof Et||e==="RepetitionMandatory")return Re.REPETITION_MANDATORY;if(e instanceof Ct||e==="RepetitionMandatoryWithSeparator")return Re.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof yt||e==="RepetitionWithSeparator")return Re.REPETITION_WITH_SEPARATOR;if(e instanceof gt||e==="Alternation")return Re.ALTERNATION;throw Error("non exhaustive match")}i(yu,"getProdType");function Lf(e){const{occurrence:t,rule:r,prodType:n,maxLookahead:a}=e,s=yu(n);return s===Re.ALTERNATION?eo(t,r,a):to(t,r,s,a)}i(Lf,"getLookaheadPaths");function wE(e,t,r,n,a,s){const o=eo(e,t,r),l=im(o)?Ss:si;return s(o,n,l,a)}i(wE,"buildLookaheadFuncForOr");function IE(e,t,r,n,a,s){const o=to(e,t,a,r),l=im(o)?Ss:si;return s(o[0],l,n)}i(IE,"buildLookaheadFuncForOptionalProd");function NE(e,t,r,n){const a=e.length,s=zt(e,o=>zt(o,l=>l.length===1));if(t)return function(o){const l=F(o,u=>u.GATE);for(let u=0;u<a;u++){const c=e[u],f=c.length,d=l[u];if(!(d!==void 0&&d.call(this)===!1))e:for(let m=0;m<f;m++){const g=c[m],v=g.length;for(let _=0;_<v;_++){const S=this.LA(_+1);if(r(S,g[_])===!1)continue e}return u}}};if(s&&!n){const o=F(e,u=>Ft(u)),l=At(o,(u,c,f)=>(K(c,d=>{B(u,d.tokenTypeIdx)||(u[d.tokenTypeIdx]=f),K(d.categoryMatches,m=>{B(u,m)||(u[m]=f)})}),u),{});return function(){const u=this.LA(1);return l[u.tokenTypeIdx]}}else return function(){for(let o=0;o<a;o++){const l=e[o],u=l.length;e:for(let c=0;c<u;c++){const f=l[c],d=f.length;for(let m=0;m<d;m++){const g=this.LA(m+1);if(r(g,f[m])===!1)continue e}return o}}}}i(NE,"buildAlternativesLookAheadFunc");function PE(e,t,r){const n=zt(e,s=>s.length===1),a=e.length;if(n&&!r){const s=Ft(e);if(s.length===1&&me(s[0].categoryMatches)){const l=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===l}}else{const o=At(s,(l,u,c)=>(l[u.tokenTypeIdx]=!0,K(u.categoryMatches,f=>{l[f]=!0}),l),[]);return function(){const l=this.LA(1);return o[l.tokenTypeIdx]===!0}}}else return function(){e:for(let s=0;s<a;s++){const o=e[s],l=o.length;for(let u=0;u<l;u++){const c=this.LA(u+1);if(t(c,o[u])===!1)continue e}return!0}return!1}}i(PE,"buildSingleAlternativeLookaheadFunction");var FD=class extends pu{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){return e.idx===this.targetOccurrence&&this.targetProdType===t?(this.restDef=r.concat(n),!0):!1}walkOption(e,t,r){this.checkIsTarget(e,Re.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,Re.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,Re.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,Re.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,Re.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},kE=class extends ai{static{i(this,"InsideDefinitionFinderVisitor")}constructor(e,t,r){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=r,this.result=[]}checkIsTarget(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Re.OPTION)}visitRepetition(e){this.checkIsTarget(e,Re.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Re.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Re.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Re.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Re.ALTERNATION)}};function Df(e){const t=new Array(e);for(let r=0;r<e;r++)t[r]=[];return t}i(Df,"initializeArrayOfArrays");function xo(e){let t=[""];for(let r=0;r<e.length;r++){const n=e[r],a=[];for(let s=0;s<t.length;s++){const o=t[s];a.push(o+"_"+n.tokenTypeIdx);for(let l=0;l<n.categoryMatches.length;l++){const u="_"+n.categoryMatches[l];a.push(o+u)}}t=a}return t}i(xo,"pathToHashKeys");function OE(e,t,r){for(let n=0;n<e.length;n++){if(n===r)continue;const a=e[n];for(let s=0;s<t.length;s++){const o=t[s];if(a[o]===!0)return!1}}return!0}i(OE,"isUniquePrefixHash");function am(e,t){const r=F(e,o=>Tl([o],1)),n=Df(r.length),a=F(r,o=>{const l={};return K(o,u=>{const c=xo(u.partialPath);K(c,f=>{l[f]=!0})}),l});let s=r;for(let o=1;o<=t;o++){const l=s;s=Df(l.length);for(let u=0;u<l.length;u++){const c=l[u];for(let f=0;f<c.length;f++){const d=c[f].partialPath,m=c[f].suffixDef,g=xo(d);if(OE(a,g,u)||me(m)||d.length===t){const _=n[u];if($l(_,d)===!1){_.push(d);for(let S=0;S<g.length;S++){const w=g[S];a[u][w]=!0}}}else{const _=Tl(m,o+1,d);s[u]=s[u].concat(_),K(_,S=>{const w=xo(S.partialPath);K(w,I=>{a[u][I]=!0})})}}}}return n}i(am,"lookAheadSequenceFromAlternatives");function eo(e,t,r,n){const a=new kE(e,Re.ALTERNATION,n);return t.accept(a),am(a.result,r)}i(eo,"getLookaheadPathsForOr");function to(e,t,r,n){const a=new kE(e,r);t.accept(a);const s=a.result,l=new FD(t,e,r).startWalking(),u=new ht({definition:s}),c=new ht({definition:l});return am([u,c],n)}i(to,"getLookaheadPathsForOptionalProd");function $l(e,t){e:for(let r=0;r<e.length;r++){const n=e[r];if(n.length===t.length){for(let a=0;a<n.length;a++){const s=t[a],o=n[a];if((s===o||o.categoryMatchesMap[s.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}i($l,"containsPath");function LE(e,t){return e.length<t.length&&zt(e,(r,n)=>{const a=t[n];return r===a||a.categoryMatchesMap[r.tokenTypeIdx]})}i(LE,"isStrictPrefixOfPath");function im(e){return zt(e,t=>zt(t,r=>zt(r,n=>me(n.categoryMatches))))}i(im,"areTokenCategoriesNotUsed");function DE(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return F(t,r=>Object.assign({type:ot.CUSTOM_LOOKAHEAD_VALIDATION},r))}i(DE,"validateLookahead");function xE(e,t,r,n){const a=St(e,u=>ME(u,r)),s=qE(e,t,r),o=St(e,u=>UE(u,r)),l=St(e,u=>FE(u,e,n,r));return a.concat(s,o,l)}i(xE,"validateGrammar");function ME(e,t){const r=new zD;e.accept(r);const n=r.allProductions,a=eD(n,GE),s=Ut(a,l=>l.length>1);return F(Me(s),l=>{const u=Bt(l),c=t.buildDuplicateFoundError(e,l),f=Dt(u),d={message:c,type:ot.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:f,occurrence:u.idx},m=sm(u);return m&&(d.parameter=m),d})}i(ME,"validateDuplicateProductions");function GE(e){return`${Dt(e)}_#_${e.idx}_#_${sm(e)}`}i(GE,"identifyProductionForDuplicates");function sm(e){return e instanceof ve?e.terminalType.name:e instanceof st?e.nonTerminalName:""}i(sm,"getExtraProductionArgument");var zD=class extends ai{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 FE(e,t,r,n){const a=[];if(At(t,(o,l)=>l.name===e.name?o+1:o,0)>1){const o=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});a.push({message:o,type:ot.DUPLICATE_RULE_NAME,ruleName:e.name})}return a}i(FE,"validateRuleDoesNotAlreadyExist");function zE(e,t,r){const n=[];let a;return ut(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:ot.INVALID_RULE_OVERRIDE,ruleName:e})),n}i(zE,"validateRuleIsOverridden");function om(e,t,r,n=[]){const a=[],s=hs(t.definition);if(me(s))return[];{const o=e.name;ut(s,e)&&a.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:ot.LEFT_RECURSION,ruleName:o});const u=fu(s,n.concat([e])),c=St(u,f=>{const d=Ye(n);return d.push(f),om(e,f,r,d)});return a.concat(c)}}i(om,"validateNoLeftRecursion");function hs(e){let t=[];if(me(e))return t;const r=Bt(e);if(r instanceof st)t.push(r.referencedRule);else if(r instanceof ht||r instanceof He||r instanceof Et||r instanceof Ct||r instanceof yt||r instanceof _e)t=t.concat(hs(r.definition));else if(r instanceof gt)t=Ft(F(r.definition,s=>hs(s.definition)));else if(!(r instanceof ve))throw Error("non exhaustive match");const n=bs(r),a=e.length>1;if(n&&a){const s=qe(e);return t.concat(hs(s))}else return t}i(hs,"getFirstNoneTerminal");var lm=class extends ai{static{i(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function jE(e,t){const r=new lm;e.accept(r);const n=r.alternations;return St(n,s=>{const o=_s(s.definition);return St(o,(l,u)=>{const c=nm([l],[],si,1);return me(c)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:s,emptyChoiceIdx:u}),type:ot.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:s.idx,alternative:u+1}]:[]})})}i(jE,"validateEmptyOrAlternative");function BE(e,t,r){const n=new lm;e.accept(n);let a=n.alternations;return a=du(a,o=>o.ignoreAmbiguities===!0),St(a,o=>{const l=o.idx,u=o.maxLookahead||t,c=eo(l,e,u,o),f=WE(c,o,e,r),d=VE(c,o,e,r);return f.concat(d)})}i(BE,"validateAmbiguousAlternationAlternatives");var jD=class extends ai{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 UE(e,t){const r=new lm;e.accept(r);const n=r.alternations;return St(n,s=>s.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:s}),type:ot.TOO_MANY_ALTS,ruleName:e.name,occurrence:s.idx}]:[])}i(UE,"validateTooManyAlts");function KE(e,t,r){const n=[];return K(e,a=>{const s=new jD;a.accept(s);const o=s.allProductions;K(o,l=>{const u=yu(l),c=l.maxLookahead||t,f=l.idx,m=to(f,a,u,c)[0];if(me(Ft(m))){const g=r.buildEmptyRepetitionError({topLevelRule:a,repetition:l});n.push({message:g,type:ot.NO_NON_EMPTY_LOOKAHEAD,ruleName:a.name})}})}),n}i(KE,"validateSomeNonEmptyLookaheadPath");function WE(e,t,r,n){const a=[],s=At(e,(l,u,c)=>(t.definition[c].ignoreAmbiguities===!0||K(u,f=>{const d=[c];K(e,(m,g)=>{c!==g&&$l(m,f)&&t.definition[g].ignoreAmbiguities!==!0&&d.push(g)}),d.length>1&&!$l(a,f)&&(a.push(f),l.push({alts:d,path:f}))}),l),[]);return F(s,l=>{const u=F(l.alts,f=>f+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:u,prefixPath:l.path}),type:ot.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:l.alts}})}i(WE,"checkAlternativesAmbiguities");function VE(e,t,r,n){const a=At(e,(o,l,u)=>{const c=F(l,f=>({idx:u,path:f}));return o.concat(c)},[]);return Js(St(a,o=>{if(t.definition[o.idx].ignoreAmbiguities===!0)return[];const u=o.idx,c=o.path,f=Pt(a,m=>t.definition[m.idx].ignoreAmbiguities!==!0&&m.idx<u&&LE(m.path,c));return F(f,m=>{const 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:ot.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:v,alternatives:g}})}))}i(VE,"checkPrefixAlternativesAmbiguities");function qE(e,t,r){const n=[],a=F(t,s=>s.name);return K(e,s=>{const o=s.name;if(ut(a,o)){const l=r.buildNamespaceConflictError(s);n.push({message:l,type:ot.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),n}i(qE,"checkTerminalAndNoneTerminalsNameSpace");function HE(e){const t=Wp(e,{errMsgProvider:OD}),r={};return K(e.rules,n=>{r[n.name]=n}),bE(r,t.errMsgProvider)}i(HE,"resolveGrammar");function YE(e){return e=Wp(e,{errMsgProvider:bn}),xE(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}i(YE,"validateGrammar");var XE="MismatchedTokenException",JE="NoViableAltException",ZE="EarlyExitException",QE="NotAllInputParsedException",eC=[XE,JE,ZE,QE];Object.freeze(eC);function ws(e){return ut(eC,e.name)}i(ws,"isRecognitionException");var gu=class extends Error{static{i(this,"RecognitionException")}constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},tC=class extends gu{static{i(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=XE}},BD=class extends gu{static{i(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=JE}},UD=class extends gu{static{i(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name=QE}},KD=class extends gu{static{i(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=ZE}},Hu={},rC="InRuleRecoveryException",WD=class extends Error{static{i(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=rC}},VD=class{static{i(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=B(e,"recoveryEnabled")?e.recoveryEnabled:Sr.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=nC)}getTokenToInsert(e){const t=Qs(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){const a=this.findReSyncTokenType(),s=this.exportLexerState(),o=[];let l=!1;const u=this.LA(1);let c=this.LA(1);const f=i(()=>{const d=this.LA(0),m=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:d,ruleName:this.getCurrRuleFullName()}),g=new tC(m,u,this.LA(0));g.resyncedTokens=_s(o),this.SAVE_ERROR(g)},"generateErrorMessage");for(;!l;)if(this.tokenMatcher(c,n)){f();return}else if(r.call(this)){f(),e.apply(this,t);return}else this.tokenMatcher(c,a)?l=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,o));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(r===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){const 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)){const r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new WD("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||me(t))return!1;const r=this.LA(1);return Ja(t,a=>this.tokenMatcher(r,a))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return ut(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),r=2;for(;;){const n=Ja(e,a=>rm(t,a));if(n!==void 0)return n;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Hu;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return F(e,(r,n)=>n===0?Hu:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[n],inRule:this.shortRuleNameToFullName(e[n-1])})}flattenFollowSet(){const e=F(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return Ft(e)}getFollowSetFromFollowKey(e){if(e===Hu)return[Ur];const t=e.ruleName+e.idxInCallingRule+BA+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,Ur)||t.push(e),t}reSyncTo(e){const t=[];let r=this.LA(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return _s(t)}attemptInRepetitionRecovery(e,t,r,n,a,s,o){}getCurrentGrammarPath(e,t){const r=this.getHumanReadableRuleStack(),n=Ye(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:n,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return F(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};function nC(e,t,r,n,a,s,o){const l=this.getKeyForAutomaticLookahead(n,a);let u=this.firstAfterRepMap[l];if(u===void 0){const m=this.getCurrRuleFullName(),g=this.getGAstProductions()[m];u=new s(g,a).startWalking(),this.firstAfterRepMap[l]=u}let c=u.token,f=u.occurrence;const d=u.isEndOfRule;this.RULE_STACK.length===1&&d&&c===void 0&&(c=Ur,f=1),!(c===void 0||f===void 0)&&this.shouldInRepetitionRecoveryBeTried(c,f,o)&&this.tryInRepetitionRecovery(e,t,r,c)}i(nC,"attemptInRepetitionRecovery");var qD=4,Yr=8,aC=1<<Yr,iC=2<<Yr,xf=3<<Yr,Mf=4<<Yr,Gf=5<<Yr,Mo=6<<Yr;function Go(e,t,r){return r|t|e}i(Go,"getKeyForAutomaticLookahead");var um=class{static{i(this,"LLkLookaheadStrategy")}constructor(e){var t;this.maxLookahead=(t=e?.maxLookahead)!==null&&t!==void 0?t:Sr.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if(me(t)){const 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 St(e,t=>om(t,t,bn))}validateEmptyOrAlternatives(e){return St(e,t=>jE(t,bn))}validateAmbiguousAlternationAlternatives(e,t){return St(e,r=>BE(r,t,bn))}validateSomeNonEmptyLookaheadPath(e,t){return KE(e,t,bn)}buildLookaheadForAlternation(e){return wE(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,NE)}buildLookaheadForOptional(e){return IE(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,yu(e.prodType),PE)}},HD=class{static{i(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=B(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Sr.dynamicTokensEnabled,this.maxLookahead=B(e,"maxLookahead")?e.maxLookahead:Sr.maxLookahead,this.lookaheadStrategy=B(e,"lookaheadStrategy")?e.lookaheadStrategy:new um({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){K(e,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{const{alternation:r,repetition:n,option:a,repetitionMandatory:s,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=sC(t);K(r,u=>{const c=u.idx===0?"":u.idx;this.TRACE_INIT(`${Dt(u)}${c}`,()=>{const f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:t,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),d=Go(this.fullRuleNameToShort[t.name],aC,u.idx);this.setLaFuncCache(d,f)})}),K(n,u=>{this.computeLookaheadFunc(t,u.idx,xf,"Repetition",u.maxLookahead,Dt(u))}),K(a,u=>{this.computeLookaheadFunc(t,u.idx,iC,"Option",u.maxLookahead,Dt(u))}),K(s,u=>{this.computeLookaheadFunc(t,u.idx,Mf,"RepetitionMandatory",u.maxLookahead,Dt(u))}),K(o,u=>{this.computeLookaheadFunc(t,u.idx,Mo,"RepetitionMandatoryWithSeparator",u.maxLookahead,Dt(u))}),K(l,u=>{this.computeLookaheadFunc(t,u.idx,Gf,"RepetitionWithSeparator",u.maxLookahead,Dt(u))})})})}computeLookaheadFunc(e,t,r,n,a,s){this.TRACE_INIT(`${s}${t===0?"":t}`,()=>{const o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n}),l=Go(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(l,o)})}getKeyForAutomaticLookahead(e,t){const r=this.getLastExplicitRuleShortName();return Go(r,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},YD=class extends ai{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)}},oo=new YD;function sC(e){oo.reset(),e.accept(oo);const t=oo.dslMethods;return oo.reset(),t}i(sC,"collectMethods");function Ff(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}i(Ff,"setNodeLocationOnlyOffset");function zf(e,t){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):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}i(zf,"setNodeLocationFull");function oC(e,t,r){e.children[r]===void 0?e.children[r]=[t]:e.children[r].push(t)}i(oC,"addTerminalToCst");function lC(e,t,r){e.children[t]===void 0?e.children[t]=[r]:e.children[t].push(r)}i(lC,"addNoneTerminalToCst");var XD="name";function cm(e,t){Object.defineProperty(e,XD,{enumerable:!1,configurable:!0,writable:!1,value:t})}i(cm,"defineNameProp");function uC(e,t){const r=$t(e),n=r.length;for(let a=0;a<n;a++){const s=r[a],o=e[s],l=o.length;for(let u=0;u<l;u++){const c=o[u];c.tokenTypeIdx===void 0&&this[c.name](c.children,t)}}}i(uC,"defaultVisit");function cC(e,t){const r=i(function(){},"derivedConstructor");cm(r,e+"BaseSemantics");const n={visit:i(function(a,s){if(re(a)&&(a=a[0]),!_r(a))return this[a.name](a.children,s)},"visit"),validateVisitor:i(function(){const a=dC(this,t);if(!me(a)){const s=F(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(cC,"createBaseSemanticVisitorConstructor");function fC(e,t,r){const n=i(function(){},"derivedConstructor");cm(n,e+"BaseSemanticsWithDefaults");const a=Object.create(r.prototype);return K(t,s=>{a[s]=uC}),n.prototype=a,n.prototype.constructor=n,n}i(fC,"createBaseVisitorConstructorWithDefaults");var jf;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(jf||(jf={}));function dC(e,t){return pC(e,t)}i(dC,"validateVisitor");function pC(e,t){const r=Pt(t,a=>Pr(e[a])===!1),n=F(r,a=>({msg:`Missing visitor method: <${a}> on ${e.constructor.name} CST Visitor.`,type:jf.MISSING_METHOD,methodName:a}));return Js(n)}i(pC,"validateMissingCstMethods");var JD=class{static{i(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=B(e,"nodeLocationTracking")?e.nodeLocationTracking:Sr.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Fe,this.cstFinallyStateUpdate=Fe,this.cstPostTerminal=Fe,this.cstPostNonTerminal=Fe,this.cstPostRule=Fe;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=zf,this.setNodeLocationFromNode=zf,this.cstPostRule=Fe,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Fe,this.setNodeLocationFromNode=Fe,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ff,this.setNodeLocationFromNode=Ff,this.cstPostRule=Fe,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Fe,this.setNodeLocationFromNode=Fe,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Fe,this.setNodeLocationFromNode=Fe,this.cstPostRule=Fe,this.setInitialNodeLocation=Fe;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){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?r.endOffset=t.endOffset:r.startOffset=NaN}cstPostTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];oC(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];lC(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(_r(this.baseCstVisitorConstructor)){const e=cC(this.className,$t(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(_r(this.baseCstVisitorWithDefaultsConstructor)){const e=fC(this.className,$t(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},ZD=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(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Rl}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Rl: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()}},QD=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=Al){if(ut(this.definedRulesNames,e)){const s={message:bn.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:ot.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);const n=this.defineRule(e,t,r);return this[e]=n,n}OVERRIDE_RULE(e,t,r=Al){const n=zE(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);const a=this.defineRule(e,t,r);return this[e]=a,a}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const r=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if(ws(n))return!1;throw n}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return xA(Me(this.gastProductionsCache))}},ex=class{static{i(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ss,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},B(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(re(e)){if(me(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(re(e))this.tokensMap=At(e,(a,s)=>(a[s.name]=s,a),{});else if(B(e,"modes")&&zt(Ft(Me(e.modes)),CE)){const a=Ft(Me(e.modes)),s=Vp(a);this.tokensMap=At(s,(o,l)=>(o[l.name]=l,o),{})}else if(It(e))this.tokensMap=Ye(e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Ur;const r=B(e,"modes")?Ft(Me(e.modes)):Me(e),n=zt(r,a=>me(a.categoryMatches));this.tokenMatcher=n?Ss:si,oi(Me(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.`);const n=B(r,"resyncEnabled")?r.resyncEnabled:Al.resyncEnabled,a=B(r,"recoveryValueFunc")?r.recoveryValueFunc:Al.recoveryValueFunc,s=this.ruleShortNameIdx<<qD+Yr;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let o;return this.outputCst===!0?o=i(function(...c){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,c);const 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"):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"),Object.assign(o,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,r){const n=this.RULE_STACK.length===1,a=t&&!this.isBackTracking()&&this.recoveryEnabled;if(ws(e)){const s=e;if(a){const o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o))if(s.resyncedTokens=this.reSyncTo(o),this.outputCst){const l=this.CST_STACK[this.CST_STACK.length-1];return l.recoveredNode=!0,l}else return r(e);else{if(this.outputCst){const 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);throw s}}else throw e}optionInternal(e,t){const r=this.getKeyForAutomaticLookahead(iC,t);return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),a;if(typeof e!="function"){a=e.DEF;const s=e.GATE;if(s!==void 0){const o=n;n=i(()=>s.call(this)&&o.call(this),"lookAheadFunc")}}else a=e;if(n.call(this)===!0)return a.call(this)}atLeastOneInternal(e,t){const r=this.getKeyForAutomaticLookahead(Mf,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),a;if(typeof t!="function"){a=t.DEF;const s=t.GATE;if(s!==void 0){const o=n;n=i(()=>s.call(this)&&o.call(this),"lookAheadFunc")}}else a=t;if(n.call(this)===!0){let s=this.doSingleRepetition(a);for(;n.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a)}else throw this.raiseEarlyExitException(e,Re.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],n,Mf,e,GD)}atLeastOneSepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(Mo,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){const n=t.DEF,a=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){n.call(this);const o=i(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,o,n,ty],o,Mo,e,ty)}else throw this.raiseEarlyExitException(e,Re.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){const r=this.getKeyForAutomaticLookahead(xf,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),a;if(typeof t!="function"){a=t.DEF;const o=t.GATE;if(o!==void 0){const l=n;n=i(()=>o.call(this)&&l.call(this),"lookaheadFunction")}}else a=t;let s=!0;for(;n.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],n,xf,e,MD,s)}manySepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(Gf,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){const n=t.DEF,a=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){n.call(this);const o=i(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,a,o,n,ey],o,Gf,e,ey)}}repetitionSepSecondInternal(e,t,r,n,a){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,a],r,Mo,e,a)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const r=this.getKeyForAutomaticLookahead(aC,t),n=re(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){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new UD(t,e))}}subruleInternal(e,t,r){let n;try{const 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){throw ws(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let n;try{const a=this.LA(1);this.tokenMatcher(a,e)===!0?(this.consumeToken(),n=a):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;const a=this.LA(0);throw r!==void 0&&r.ERR_MSG?n=r.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new tC(n,t,a))}consumeInternalRecovery(e,t,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){const n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(a){throw a.name===rC?r:a}}else throw r}saveRecogState(){const e=this.errors,t=Ye(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(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Ur)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},tx=class{static{i(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=B(e,"errorMessageProvider")?e.errorMessageProvider:Sr.errorMessageProvider}SAVE_ERROR(e){if(ws(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Ye(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Ye(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){const n=this.getCurrRuleFullName(),a=this.getGAstProductions()[n],o=to(e,a,t,this.maxLookahead)[0],l=[];for(let c=1;c<=this.maxLookahead;c++)l.push(this.LA(c));const u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:l,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new KD(u,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const r=this.getCurrRuleFullName(),n=this.getGAstProductions()[r],a=eo(e,n,this.maxLookahead),s=[];for(let u=1;u<=this.maxLookahead;u++)s.push(this.LA(u));const o=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:s,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new BD(l,this.LA(1),o))}},rx=class{static{i(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){const r=this.gastProductionsCache[e];if(_r(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return nm([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=Bt(e.ruleStack),n=this.getGAstProductions()[t];return new xD(n,e).startWalking()}},vu={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(vu);var ry=!0,ny=Math.pow(2,Yr)-1,mC=ja({name:"RECORDING_PHASE_TOKEN",pattern:at.NA});oi([mC]);var hC=Qs(mC,`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(hC);var nx={name:`This CSTNode indicates the Parser is in Recording Phase
|
|
136
|
+
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},ax=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++){const 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",()=>{const e=this;for(let t=0;t<10;t++){const 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 Rl}topLevelRuleRecord(e,t){try{const r=new ni({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{throw r}throw r}}optionInternalRecord(e,t){return Ra.call(this,He,e,t)}atLeastOneInternalRecord(e,t){Ra.call(this,Et,t,e)}atLeastOneSepFirstInternalRecord(e,t){Ra.call(this,Ct,t,e,ry)}manyInternalRecord(e,t){Ra.call(this,_e,t,e)}manySepFirstInternalRecord(e,t){Ra.call(this,yt,t,e,ry)}orInternalRecord(e,t){return yC.call(this,e,t)}subruleInternalRecord(e,t,r){if(Is(t),!e||B(e,"ruleName")===!1){const o=new Error(`<SUBRULE${Bf(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}const n=kn(this.recordingProdStack),a=e.ruleName,s=new st({idx:t,nonTerminalName:a,label:r?.LABEL,referencedRule:void 0});return n.definition.push(s),this.outputCst?nx:vu}consumeInternalRecord(e,t,r){if(Is(t),!em(e)){const s=new Error(`<CONSUME${Bf(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}const n=kn(this.recordingProdStack),a=new ve({idx:t,terminalType:e,label:r?.LABEL});return n.definition.push(a),hC}};function Ra(e,t,r,n=!1){Is(r);const a=kn(this.recordingProdStack),s=Pr(t)?t:t.DEF,o=new e({definition:[],idx:r});return n&&(o.separator=t.SEP),B(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),a.definition.push(o),this.recordingProdStack.pop(),vu}i(Ra,"recordProd");function yC(e,t){Is(t);const r=kn(this.recordingProdStack),n=re(e)===!1,a=n===!1?e:e.DEF,s=new gt({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});B(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD);const o=PA(a,l=>Pr(l.GATE));return s.hasPredicates=o,r.definition.push(s),K(a,l=>{const u=new ht({definition:[]});s.definition.push(u),B(l,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:B(l,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),l.ALT.call(this),this.recordingProdStack.pop()}),vu}i(yC,"recordOrProd");function Bf(e){return e===0?"":`${e}`}i(Bf,"getIdxSuffix");function Is(e){if(e<0||e>ny){const t=new Error(`Invalid DSL Method idx value: <${e}>
|
|
141
|
+
Idx value must be a none negative value smaller than ${ny+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}i(Is,"assertMethodIdxIsValid");var ix=class{static{i(this,"PerformanceTracer")}initPerformanceTracer(e){if(B(e,"traceInitPerf")){const 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=Sr.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${r}--> <${e}>`);const{time:n,value:a}=Hp(t),s=n>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${r}<-- <${e}> time: ${n}ms`),this.traceInitIndent--,a}else return t()}};function gC(e,t){t.forEach(r=>{const n=r.prototype;Object.getOwnPropertyNames(n).forEach(a=>{if(a==="constructor")return;const s=Object.getOwnPropertyDescriptor(n,a);s&&(s.get||s.set)?Object.defineProperty(e.prototype,a,s):e.prototype[a]=r.prototype[a]})})}i(gC,"applyMixins");var Rl=Qs(Ur,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Rl);var Sr=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Ga,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Al=Object.freeze({recoveryValueFunc:i(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),ot;(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"})(ot||(ot={}));function Uf(e=void 0){return function(){return e}}i(Uf,"EMPTY_ALT");var fm=class vC{static{i(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;const r=this.className;this.TRACE_INIT("toFastProps",()=>{Yp(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),K(this.definedRulesNames,a=>{const o=this[a].originalGrammarAction;let 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=HE({rules:Me(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(me(n)&&this.skipValidations===!1){const a=YE({rules:Me(this.gastProductionsCache),tokenTypes:Me(this.tokensMap),errMsgProvider:bn,grammarName:r}),s=DE({lookaheadStrategy:this.lookaheadStrategy,rules:Me(this.gastProductionsCache),tokenTypes:Me(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(a,s)}}),me(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const a=UA(Me(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:Me(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Me(this.gastProductionsCache))})),!vC.DEFER_DEFINITION_ERRORS_HANDLING&&!me(this.definitionErrors))throw t=F(this.definitionErrors,a=>a.message),new Error(`Parser Definition Errors detected:
|
|
142
|
+
${t.join(`
|
|
143
|
+
-------------------------------
|
|
144
|
+
`)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;const 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),B(r,"ignoredIssues"))throw new 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=B(r,"skipValidations")?r.skipValidations:Sr.skipValidations}};fm.DEFER_DEFINITION_ERRORS_HANDLING=!1;gC(fm,[VD,HD,JD,ZD,ex,QD,tx,rx,ax,ix]);var sx=class extends fm{static{i(this,"EmbeddedActionsParser")}constructor(e,t=Sr){const r=Ye(t);r.outputCst=!1,super(e,r)}};function TC(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}i(TC,"arrayMap");var $C=TC;function RC(){this.__data__=[],this.size=0}i(RC,"listCacheClear");var ox=RC;function AC(e,t){return e===t||e!==e&&t!==t}i(AC,"eq");var EC=AC;function CC(e,t){for(var r=e.length;r--;)if(EC(e[r][0],t))return r;return-1}i(CC,"assocIndexOf");var Tu=CC,lx=Array.prototype,ux=lx.splice;function _C(e){var t=this.__data__,r=Tu(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():ux.call(t,r,1),--this.size,!0}i(_C,"listCacheDelete");var cx=_C;function bC(e){var t=this.__data__,r=Tu(t,e);return r<0?void 0:t[r][1]}i(bC,"listCacheGet");var fx=bC;function SC(e){return Tu(this.__data__,e)>-1}i(SC,"listCacheHas");var dx=SC;function wC(e,t){var r=this.__data__,n=Tu(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}i(wC,"listCacheSet");var px=wC;function Yn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}i(Yn,"ListCache");Yn.prototype.clear=ox;Yn.prototype.delete=cx;Yn.prototype.get=fx;Yn.prototype.has=dx;Yn.prototype.set=px;var $u=Yn;function IC(){this.__data__=new $u,this.size=0}i(IC,"stackClear");var mx=IC;function NC(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}i(NC,"stackDelete");var hx=NC;function PC(e){return this.__data__.get(e)}i(PC,"stackGet");var yx=PC;function kC(e){return this.__data__.has(e)}i(kC,"stackHas");var gx=kC,vx=typeof global=="object"&&global&&global.Object===Object&&global,OC=vx,Tx=typeof self=="object"&&self&&self.Object===Object&&self,$x=OC||Tx||Function("return this")(),kr=$x,Rx=kr.Symbol,ar=Rx,LC=Object.prototype,Ax=LC.hasOwnProperty,Ex=LC.toString,Li=ar?ar.toStringTag:void 0;function DC(e){var t=Ax.call(e,Li),r=e[Li];try{e[Li]=void 0;var n=!0}catch{}var a=Ex.call(e);return n&&(t?e[Li]=r:delete e[Li]),a}i(DC,"getRawTag");var Cx=DC,_x=Object.prototype,bx=_x.toString;function xC(e){return bx.call(e)}i(xC,"objectToString");var Sx=xC,wx="[object Null]",Ix="[object Undefined]",ay=ar?ar.toStringTag:void 0;function MC(e){return e==null?e===void 0?Ix:wx:ay&&ay in Object(e)?Cx(e):Sx(e)}i(MC,"baseGetTag");var li=MC;function GC(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}i(GC,"isObject");var dm=GC,Nx="[object AsyncFunction]",Px="[object Function]",kx="[object GeneratorFunction]",Ox="[object Proxy]";function FC(e){if(!dm(e))return!1;var t=li(e);return t==Px||t==kx||t==Nx||t==Ox}i(FC,"isFunction");var zC=FC,Lx=kr["__core-js_shared__"],Yu=Lx,iy=(function(){var e=/[^.]+$/.exec(Yu&&Yu.keys&&Yu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function jC(e){return!!iy&&iy in e}i(jC,"isMasked");var Dx=jC,xx=Function.prototype,Mx=xx.toString;function BC(e){if(e!=null){try{return Mx.call(e)}catch{}try{return e+""}catch{}}return""}i(BC,"toSource");var Xn=BC,Gx=/[\\^$.*+?()[\]{}|]/g,Fx=/^\[object .+?Constructor\]$/,zx=Function.prototype,jx=Object.prototype,Bx=zx.toString,Ux=jx.hasOwnProperty,Kx=RegExp("^"+Bx.call(Ux).replace(Gx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function UC(e){if(!dm(e)||Dx(e))return!1;var t=zC(e)?Kx:Fx;return t.test(Xn(e))}i(UC,"baseIsNative");var Wx=UC;function KC(e,t){return e?.[t]}i(KC,"getValue");var Vx=KC;function WC(e,t){var r=Vx(e,t);return Wx(r)?r:void 0}i(WC,"getNative");var ui=WC,qx=ui(kr,"Map"),Ns=qx,Hx=ui(Object,"create"),Ps=Hx;function VC(){this.__data__=Ps?Ps(null):{},this.size=0}i(VC,"hashClear");var Yx=VC;function qC(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}i(qC,"hashDelete");var Xx=qC,Jx="__lodash_hash_undefined__",Zx=Object.prototype,Qx=Zx.hasOwnProperty;function HC(e){var t=this.__data__;if(Ps){var r=t[e];return r===Jx?void 0:r}return Qx.call(t,e)?t[e]:void 0}i(HC,"hashGet");var eM=HC,tM=Object.prototype,rM=tM.hasOwnProperty;function YC(e){var t=this.__data__;return Ps?t[e]!==void 0:rM.call(t,e)}i(YC,"hashHas");var nM=YC,aM="__lodash_hash_undefined__";function XC(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ps&&t===void 0?aM:t,this}i(XC,"hashSet");var iM=XC;function Jn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}i(Jn,"Hash");Jn.prototype.clear=Yx;Jn.prototype.delete=Xx;Jn.prototype.get=eM;Jn.prototype.has=nM;Jn.prototype.set=iM;var sy=Jn;function JC(){this.size=0,this.__data__={hash:new sy,map:new(Ns||$u),string:new sy}}i(JC,"mapCacheClear");var sM=JC;function ZC(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}i(ZC,"isKeyable");var oM=ZC;function QC(e,t){var r=e.__data__;return oM(t)?r[typeof t=="string"?"string":"hash"]:r.map}i(QC,"getMapData");var Ru=QC;function e_(e){var t=Ru(this,e).delete(e);return this.size-=t?1:0,t}i(e_,"mapCacheDelete");var lM=e_;function t_(e){return Ru(this,e).get(e)}i(t_,"mapCacheGet");var uM=t_;function r_(e){return Ru(this,e).has(e)}i(r_,"mapCacheHas");var cM=r_;function n_(e,t){var r=Ru(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}i(n_,"mapCacheSet");var fM=n_;function Zn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}i(Zn,"MapCache");Zn.prototype.clear=sM;Zn.prototype.delete=lM;Zn.prototype.get=uM;Zn.prototype.has=cM;Zn.prototype.set=fM;var Au=Zn,dM=200;function a_(e,t){var r=this.__data__;if(r instanceof $u){var n=r.__data__;if(!Ns||n.length<dM-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Au(n)}return r.set(e,t),this.size=r.size,this}i(a_,"stackSet");var pM=a_;function Qn(e){var t=this.__data__=new $u(e);this.size=t.size}i(Qn,"Stack");Qn.prototype.clear=mx;Qn.prototype.delete=hx;Qn.prototype.get=yx;Qn.prototype.has=gx;Qn.prototype.set=pM;var Fo=Qn,mM="__lodash_hash_undefined__";function i_(e){return this.__data__.set(e,mM),this}i(i_,"setCacheAdd");var hM=i_;function s_(e){return this.__data__.has(e)}i(s_,"setCacheHas");var yM=s_;function ks(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Au;++t<r;)this.add(e[t])}i(ks,"SetCache");ks.prototype.add=ks.prototype.push=hM;ks.prototype.has=yM;var o_=ks;function l_(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}i(l_,"arraySome");var gM=l_;function u_(e,t){return e.has(t)}i(u_,"cacheHas");var c_=u_,vM=1,TM=2;function f_(e,t,r,n,a,s){var o=r&vM,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&TM?new o_:void 0;for(s.set(e,t),s.set(t,e);++d<l;){var v=e[d],_=t[d];if(n)var S=o?n(_,v,d,t,e,s):n(v,_,d,e,t,s);if(S!==void 0){if(S)continue;m=!1;break}if(g){if(!gM(t,function(w,I){if(!c_(g,I)&&(v===w||a(v,w,r,n,s)))return g.push(I)})){m=!1;break}}else if(!(v===_||a(v,_,r,n,s))){m=!1;break}}return s.delete(e),s.delete(t),m}i(f_,"equalArrays");var d_=f_,$M=kr.Uint8Array,oy=$M;function p_(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}i(p_,"mapToArray");var RM=p_;function m_(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}i(m_,"setToArray");var pm=m_,AM=1,EM=2,CM="[object Boolean]",_M="[object Date]",bM="[object Error]",SM="[object Map]",wM="[object Number]",IM="[object RegExp]",NM="[object Set]",PM="[object String]",kM="[object Symbol]",OM="[object ArrayBuffer]",LM="[object DataView]",ly=ar?ar.prototype:void 0,Xu=ly?ly.valueOf:void 0;function h_(e,t,r,n,a,s,o){switch(r){case LM:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case OM:return!(e.byteLength!=t.byteLength||!s(new oy(e),new oy(t)));case CM:case _M:case wM:return EC(+e,+t);case bM:return e.name==t.name&&e.message==t.message;case IM:case PM:return e==t+"";case SM:var l=RM;case NM:var u=n&AM;if(l||(l=pm),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;n|=EM,o.set(e,t);var f=d_(l(e),l(t),n,a,s,o);return o.delete(e),f;case kM:if(Xu)return Xu.call(e)==Xu.call(t)}return!1}i(h_,"equalByTag");var DM=h_;function y_(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}i(y_,"arrayPush");var g_=y_,xM=Array.isArray,lt=xM;function v_(e,t,r){var n=t(e);return lt(e)?n:g_(n,r(e))}i(v_,"baseGetAllKeys");var MM=v_;function T_(e,t){for(var r=-1,n=e==null?0:e.length,a=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[a++]=o)}return s}i(T_,"arrayFilter");var $_=T_;function R_(){return[]}i(R_,"stubArray");var GM=R_,FM=Object.prototype,zM=FM.propertyIsEnumerable,uy=Object.getOwnPropertySymbols,jM=uy?function(e){return e==null?[]:(e=Object(e),$_(uy(e),function(t){return zM.call(e,t)}))}:GM,BM=jM;function A_(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}i(A_,"baseTimes");var UM=A_;function E_(e){return e!=null&&typeof e=="object"}i(E_,"isObjectLike");var Za=E_,KM="[object Arguments]";function C_(e){return Za(e)&&li(e)==KM}i(C_,"baseIsArguments");var cy=C_,__=Object.prototype,WM=__.hasOwnProperty,VM=__.propertyIsEnumerable,qM=cy((function(){return arguments})())?cy:function(e){return Za(e)&&WM.call(e,"callee")&&!VM.call(e,"callee")},Eu=qM;function b_(){return!1}i(b_,"stubFalse");var HM=b_,S_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fy=S_&&typeof module=="object"&&module&&!module.nodeType&&module,YM=fy&&fy.exports===S_,dy=YM?kr.Buffer:void 0,XM=dy?dy.isBuffer:void 0,JM=XM||HM,El=JM,ZM=9007199254740991,QM=/^(?:0|[1-9]\d*)$/;function w_(e,t){var r=typeof e;return t=t??ZM,!!t&&(r=="number"||r!="symbol"&&QM.test(e))&&e>-1&&e%1==0&&e<t}i(w_,"isIndex");var I_=w_,e1=9007199254740991;function N_(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=e1}i(N_,"isLength");var mm=N_,t1="[object Arguments]",r1="[object Array]",n1="[object Boolean]",a1="[object Date]",i1="[object Error]",s1="[object Function]",o1="[object Map]",l1="[object Number]",u1="[object Object]",c1="[object RegExp]",f1="[object Set]",d1="[object String]",p1="[object WeakMap]",m1="[object ArrayBuffer]",h1="[object DataView]",y1="[object Float32Array]",g1="[object Float64Array]",v1="[object Int8Array]",T1="[object Int16Array]",$1="[object Int32Array]",R1="[object Uint8Array]",A1="[object Uint8ClampedArray]",E1="[object Uint16Array]",C1="[object Uint32Array]",ge={};ge[y1]=ge[g1]=ge[v1]=ge[T1]=ge[$1]=ge[R1]=ge[A1]=ge[E1]=ge[C1]=!0;ge[t1]=ge[r1]=ge[m1]=ge[n1]=ge[h1]=ge[a1]=ge[i1]=ge[s1]=ge[o1]=ge[l1]=ge[u1]=ge[c1]=ge[f1]=ge[d1]=ge[p1]=!1;function P_(e){return Za(e)&&mm(e.length)&&!!ge[li(e)]}i(P_,"baseIsTypedArray");var _1=P_;function k_(e){return function(t){return e(t)}}i(k_,"baseUnary");var b1=k_,O_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ys=O_&&typeof module=="object"&&module&&!module.nodeType&&module,S1=ys&&ys.exports===O_,Ju=S1&&OC.process,w1=(function(){try{var e=ys&&ys.require&&ys.require("util").types;return e||Ju&&Ju.binding&&Ju.binding("util")}catch{}})(),py=w1,my=py&&py.isTypedArray,I1=my?b1(my):_1,hm=I1,N1=Object.prototype,P1=N1.hasOwnProperty;function L_(e,t){var r=lt(e),n=!r&&Eu(e),a=!r&&!n&&El(e),s=!r&&!n&&!a&&hm(e),o=r||n||a||s,l=o?UM(e.length,String):[],u=l.length;for(var c in e)(t||P1.call(e,c))&&!(o&&(c=="length"||a&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||I_(c,u)))&&l.push(c);return l}i(L_,"arrayLikeKeys");var k1=L_,O1=Object.prototype;function D_(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||O1;return e===r}i(D_,"isPrototype");var x_=D_;function M_(e,t){return function(r){return e(t(r))}}i(M_,"overArg");var L1=M_,D1=L1(Object.keys,Object),x1=D1,M1=Object.prototype,G1=M1.hasOwnProperty;function G_(e){if(!x_(e))return x1(e);var t=[];for(var r in Object(e))G1.call(e,r)&&r!="constructor"&&t.push(r);return t}i(G_,"baseKeys");var F_=G_;function z_(e){return e!=null&&mm(e.length)&&!zC(e)}i(z_,"isArrayLike");var Cu=z_;function j_(e){return Cu(e)?k1(e):F_(e)}i(j_,"keys");var ym=j_;function B_(e){return MM(e,ym,BM)}i(B_,"getAllKeys");var hy=B_,F1=1,z1=Object.prototype,j1=z1.hasOwnProperty;function U_(e,t,r,n,a,s){var o=r&F1,l=hy(e),u=l.length,c=hy(t),f=c.length;if(u!=f&&!o)return!1;for(var d=u;d--;){var m=l[d];if(!(o?m in t:j1.call(t,m)))return!1}var g=s.get(e),v=s.get(t);if(g&&v)return g==t&&v==e;var _=!0;s.set(e,t),s.set(t,e);for(var S=o;++d<u;){m=l[d];var w=e[m],I=t[m];if(n)var R=o?n(I,w,m,t,e,s):n(w,I,m,e,t,s);if(!(R===void 0?w===I||a(w,I,r,n,s):R)){_=!1;break}S||(S=m=="constructor")}if(_&&!S){var P=e.constructor,z=t.constructor;P!=z&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof z=="function"&&z instanceof z)&&(_=!1)}return s.delete(e),s.delete(t),_}i(U_,"equalObjects");var B1=U_,U1=ui(kr,"DataView"),Kf=U1,K1=ui(kr,"Promise"),Wf=K1,W1=ui(kr,"Set"),Ba=W1,V1=ui(kr,"WeakMap"),Vf=V1,yy="[object Map]",q1="[object Object]",gy="[object Promise]",vy="[object Set]",Ty="[object WeakMap]",$y="[object DataView]",H1=Xn(Kf),Y1=Xn(Ns),X1=Xn(Wf),J1=Xn(Ba),Z1=Xn(Vf),ln=li;(Kf&&ln(new Kf(new ArrayBuffer(1)))!=$y||Ns&&ln(new Ns)!=yy||Wf&&ln(Wf.resolve())!=gy||Ba&&ln(new Ba)!=vy||Vf&&ln(new Vf)!=Ty)&&(ln=i(function(e){var t=li(e),r=t==q1?e.constructor:void 0,n=r?Xn(r):"";if(n)switch(n){case H1:return $y;case Y1:return yy;case X1:return gy;case J1:return vy;case Z1:return Ty}return t},"getTag"));var qf=ln,Q1=1,Ry="[object Arguments]",Ay="[object Array]",lo="[object Object]",eG=Object.prototype,Ey=eG.hasOwnProperty;function K_(e,t,r,n,a,s){var o=lt(e),l=lt(t),u=o?Ay:qf(e),c=l?Ay:qf(t);u=u==Ry?lo:u,c=c==Ry?lo:c;var f=u==lo,d=c==lo,m=u==c;if(m&&El(e)){if(!El(t))return!1;o=!0,f=!1}if(m&&!f)return s||(s=new Fo),o||hm(e)?d_(e,t,r,n,a,s):DM(e,t,u,r,n,a,s);if(!(r&Q1)){var g=f&&Ey.call(e,"__wrapped__"),v=d&&Ey.call(t,"__wrapped__");if(g||v){var _=g?e.value():e,S=v?t.value():t;return s||(s=new Fo),a(_,S,r,n,s)}}return m?(s||(s=new Fo),B1(e,t,r,n,a,s)):!1}i(K_,"baseIsEqualDeep");var tG=K_;function gm(e,t,r,n,a){return e===t?!0:e==null||t==null||!Za(e)&&!Za(t)?e!==e&&t!==t:tG(e,t,r,n,gm,a)}i(gm,"baseIsEqual");var W_=gm,rG=1,nG=2;function V_(e,t,r,n){var a=r.length,s=a,o=!n;if(e==null)return!s;for(e=Object(e);a--;){var l=r[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++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 Fo;if(n)var m=n(c,f,u,e,t,d);if(!(m===void 0?W_(f,c,rG|nG,n,d):m))return!1}}return!0}i(V_,"baseIsMatch");var aG=V_;function q_(e){return e===e&&!dm(e)}i(q_,"isStrictComparable");var H_=q_;function Y_(e){for(var t=ym(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,H_(a)]}return t}i(Y_,"getMatchData");var iG=Y_;function X_(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}i(X_,"matchesStrictComparable");var J_=X_;function Z_(e){var t=iG(e);return t.length==1&&t[0][2]?J_(t[0][0],t[0][1]):function(r){return r===e||aG(r,e,t)}}i(Z_,"baseMatches");var sG=Z_,oG="[object Symbol]";function Q_(e){return typeof e=="symbol"||Za(e)&&li(e)==oG}i(Q_,"isSymbol");var _u=Q_,lG=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uG=/^\w*$/;function eb(e,t){if(lt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||_u(e)?!0:uG.test(e)||!lG.test(e)||t!=null&&e in Object(t)}i(eb,"isKey");var vm=eb,cG="Expected a function";function bu(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(cG);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(bu.Cache||Au),r}i(bu,"memoize");bu.Cache=Au;var fG=bu,dG=500;function tb(e){var t=fG(e,function(n){return r.size===dG&&r.clear(),n}),r=t.cache;return t}i(tb,"memoizeCapped");var pG=tb,mG=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hG=/\\(\\)?/g,yG=pG(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(mG,function(r,n,a,s){t.push(a?s.replace(hG,"$1"):n||r)}),t}),gG=yG,Cy=ar?ar.prototype:void 0,_y=Cy?Cy.toString:void 0;function Tm(e){if(typeof e=="string")return e;if(lt(e))return $C(e,Tm)+"";if(_u(e))return _y?_y.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}i(Tm,"baseToString");var vG=Tm;function rb(e){return e==null?"":vG(e)}i(rb,"toString");var TG=rb;function nb(e,t){return lt(e)?e:vm(e,t)?[e]:gG(TG(e))}i(nb,"castPath");var ab=nb;function ib(e){if(typeof e=="string"||_u(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}i(ib,"toKey");var Su=ib;function sb(e,t){t=ab(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Su(t[r++])];return r&&r==n?e:void 0}i(sb,"baseGet");var ob=sb;function lb(e,t,r){var n=e==null?void 0:ob(e,t);return n===void 0?r:n}i(lb,"get");var $G=lb;function ub(e,t){return e!=null&&t in Object(e)}i(ub,"baseHasIn");var RG=ub;function cb(e,t,r){t=ab(t,e);for(var n=-1,a=t.length,s=!1;++n<a;){var o=Su(t[n]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}return s||++n!=a?s:(a=e==null?0:e.length,!!a&&mm(a)&&I_(o,a)&&(lt(e)||Eu(e)))}i(cb,"hasPath");var AG=cb;function fb(e,t){return e!=null&&AG(e,t,RG)}i(fb,"hasIn");var EG=fb,CG=1,_G=2;function db(e,t){return vm(e)&&H_(t)?J_(Su(e),t):function(r){var n=$G(r,e);return n===void 0&&n===t?EG(r,e):W_(t,n,CG|_G)}}i(db,"baseMatchesProperty");var bG=db;function pb(e){return e}i(pb,"identity");var $m=pb;function mb(e){return function(t){return t?.[e]}}i(mb,"baseProperty");var SG=mb;function hb(e){return function(t){return ob(t,e)}}i(hb,"basePropertyDeep");var wG=hb;function yb(e){return vm(e)?SG(Su(e)):wG(e)}i(yb,"property");var IG=yb;function gb(e){return typeof e=="function"?e:e==null?$m:typeof e=="object"?lt(e)?bG(e[0],e[1]):sG(e):IG(e)}i(gb,"baseIteratee");var wu=gb;function vb(e){return function(t,r,n){for(var a=-1,s=Object(t),o=n(t),l=o.length;l--;){var u=o[e?l:++a];if(r(s[u],u,s)===!1)break}return t}}i(vb,"createBaseFor");var NG=vb,PG=NG(),kG=PG;function Tb(e,t){return e&&kG(e,t,ym)}i(Tb,"baseForOwn");var OG=Tb;function $b(e,t){return function(r,n){if(r==null)return r;if(!Cu(r))return e(r,n);for(var a=r.length,s=t?a:-1,o=Object(r);(t?s--:++s<a)&&n(o[s],s,o)!==!1;);return r}}i($b,"createBaseEach");var LG=$b,DG=LG(OG),Iu=DG;function Rb(e,t){var r=-1,n=Cu(e)?Array(e.length):[];return Iu(e,function(a,s,o){n[++r]=t(a,s,o)}),n}i(Rb,"baseMap");var xG=Rb;function Ab(e,t){var r=lt(e)?$C:xG;return r(e,wu(t))}i(Ab,"map");var Tr=Ab;function Eb(e,t){var r=[];return Iu(e,function(n,a,s){t(n,a,s)&&r.push(n)}),r}i(Eb,"baseFilter");var MG=Eb;function Cb(e,t){var r=lt(e)?$_:MG;return r(e,wu(t))}i(Cb,"filter");var GG=Cb;function Ln(e,t,r){return`${e.name}_${t}_${r}`}i(Ln,"buildATNKey");var Kr=1,FG=2,_b=4,bb=5,ro=7,zG=8,jG=9,BG=10,UG=11,Sb=12,Rm=class{static{i(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},Am=class extends Rm{static{i(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},wb=class extends Rm{static{i(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},Em=class extends Rm{static{i(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}};function Ib(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};Nb(t,e);const r=e.length;for(let n=0;n<r;n++){const a=e[n],s=Xr(t,a,a);s!==void 0&&jb(t,a,s)}return t}i(Ib,"createATN");function Nb(e,t){const r=t.length;for(let n=0;n<r;n++){const a=t[n],s=Ge(e,a,void 0,{type:FG}),o=Ge(e,a,void 0,{type:ro});s.stop=o,e.ruleToStartState.set(a,s),e.ruleToStopState.set(a,o)}}i(Nb,"createRuleStartAndStopATNStates");function Cm(e,t,r){return r instanceof ve?Nu(e,t,r.terminalType,r):r instanceof st?zb(e,t,r):r instanceof gt?Db(e,t,r):r instanceof He?xb(e,t,r):r instanceof _e?Pb(e,t,r):r instanceof yt?kb(e,t,r):r instanceof Et?Ob(e,t,r):r instanceof Ct?Lb(e,t,r):Xr(e,t,r)}i(Cm,"atom");function Pb(e,t,r){const n=Ge(e,t,r,{type:bb});Or(e,n);const a=ea(e,t,n,r,Xr(e,t,r));return bm(e,t,r,a)}i(Pb,"repetition");function kb(e,t,r){const n=Ge(e,t,r,{type:bb});Or(e,n);const a=ea(e,t,n,r,Xr(e,t,r)),s=Nu(e,t,r.separator,r);return bm(e,t,r,a,s)}i(kb,"repetitionSep");function Ob(e,t,r){const n=Ge(e,t,r,{type:_b});Or(e,n);const a=ea(e,t,n,r,Xr(e,t,r));return _m(e,t,r,a)}i(Ob,"repetitionMandatory");function Lb(e,t,r){const n=Ge(e,t,r,{type:_b});Or(e,n);const a=ea(e,t,n,r,Xr(e,t,r)),s=Nu(e,t,r.separator,r);return _m(e,t,r,a,s)}i(Lb,"repetitionMandatorySep");function Db(e,t,r){const n=Ge(e,t,r,{type:Kr});Or(e,n);const a=Tr(r.definition,o=>Cm(e,t,o));return ea(e,t,n,r,...a)}i(Db,"alternation");function xb(e,t,r){const n=Ge(e,t,r,{type:Kr});Or(e,n);const a=ea(e,t,n,r,Xr(e,t,r));return Mb(e,t,r,a)}i(xb,"option");function Xr(e,t,r){const n=GG(Tr(r.definition,a=>Cm(e,t,a)),a=>a!==void 0);return n.length===1?n[0]:n.length===0?void 0:Fb(e,n)}i(Xr,"block");function _m(e,t,r,n,a){const s=n.left,o=n.right,l=Ge(e,t,r,{type:UG});Or(e,l);const u=Ge(e,t,r,{type:Sb});return s.loopback=l,u.loopback=l,e.decisionMap[Ln(t,a?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=l,Ie(o,l),a===void 0?(Ie(l,s),Ie(l,u)):(Ie(l,u),Ie(l,a.left),Ie(a.right,s)),{left:s,right:u}}i(_m,"plus");function bm(e,t,r,n,a){const s=n.left,o=n.right,l=Ge(e,t,r,{type:BG});Or(e,l);const u=Ge(e,t,r,{type:Sb}),c=Ge(e,t,r,{type:jG});return l.loopback=c,u.loopback=c,Ie(l,s),Ie(l,u),Ie(o,c),a!==void 0?(Ie(c,u),Ie(c,a.left),Ie(a.right,s)):Ie(c,l),e.decisionMap[Ln(t,a?"RepetitionWithSeparator":"Repetition",r.idx)]=l,{left:l,right:u}}i(bm,"star");function Mb(e,t,r,n){const a=n.left,s=n.right;return Ie(a,s),e.decisionMap[Ln(t,"Option",r.idx)]=a,n}i(Mb,"optional");function Or(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}i(Or,"defineDecisionState");function ea(e,t,r,n,...a){const s=Ge(e,t,n,{type:zG,start:r});r.end=s;for(const l of a)l!==void 0?(Ie(r,l.left),Ie(l.right,s)):Ie(r,s);const o={left:r,right:s};return e.decisionMap[Ln(t,Gb(n),n.idx)]=r,o}i(ea,"makeAlts");function Gb(e){if(e instanceof gt)return"Alternation";if(e instanceof He)return"Option";if(e instanceof _e)return"Repetition";if(e instanceof yt)return"RepetitionWithSeparator";if(e instanceof Et)return"RepetitionMandatory";if(e instanceof Ct)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}i(Gb,"getProdType");function Fb(e,t){const r=t.length;for(let s=0;s<r-1;s++){const o=t[s];let l;o.left.transitions.length===1&&(l=o.left.transitions[0]);const u=l instanceof Em,c=l,f=t[s+1].left;o.left.type===Kr&&o.right.type===Kr&&l!==void 0&&(u&&c.followState===o.right||l.target===o.right)?(u?c.followState=f:l.target=f,Bb(e,o.right)):Ie(o.right,f)}const n=t[0],a=t[r-1];return{left:n.left,right:a.right}}i(Fb,"makeBlock");function Nu(e,t,r,n){const a=Ge(e,t,n,{type:Kr}),s=Ge(e,t,n,{type:Kr});return Pu(a,new Am(s,r)),{left:a,right:s}}i(Nu,"tokenRef");function zb(e,t,r){const n=r.referencedRule,a=e.ruleToStartState.get(n),s=Ge(e,t,r,{type:Kr}),o=Ge(e,t,r,{type:Kr}),l=new Em(a,n,o);return Pu(s,l),{left:s,right:o}}i(zb,"ruleRef");function jb(e,t,r){const n=e.ruleToStartState.get(t);Ie(n,r.left);const a=e.ruleToStopState.get(t);return Ie(r.right,a),{left:n,right:a}}i(jb,"buildRuleHandle");function Ie(e,t){const r=new wb(t);Pu(e,r)}i(Ie,"epsilon");function Ge(e,t,r,n){const 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(Ge,"newState");function Pu(e,t){e.transitions.length===0&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}i(Pu,"addTransition");function Bb(e,t){e.states.splice(e.states.indexOf(t),1)}i(Bb,"removeState");var Cl={},Hf=class{static{i(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const t=Sm(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return Tr(this.configs,e=>e.alt)}get key(){let e="";for(const t in this.map)e+=t+":";return e}};function Sm(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(r=>r.stateNumber.toString()).join("_")}`}i(Sm,"getATNConfigKey");function Ub(e,t,r){for(var n=-1,a=e.length;++n<a;){var s=e[n],o=t(s);if(o!=null&&(l===void 0?o===o&&!_u(o):r(o,l)))var l=o,u=s}return u}i(Ub,"baseExtremum");var KG=Ub;function Kb(e,t){return e<t}i(Kb,"baseLt");var WG=Kb;function Wb(e){return e&&e.length?KG(e,$m,WG):void 0}i(Wb,"min");var VG=Wb,by=ar?ar.isConcatSpreadable:void 0;function Vb(e){return lt(e)||Eu(e)||!!(by&&e&&e[by])}i(Vb,"isFlattenable");var qG=Vb;function wm(e,t,r,n,a){var s=-1,o=e.length;for(r||(r=qG),a||(a=[]);++s<o;){var l=e[s];t>0&&r(l)?t>1?wm(l,t-1,r,n,a):g_(a,l):n||(a[a.length]=l)}return a}i(wm,"baseFlatten");var qb=wm;function Hb(e,t){return qb(Tr(e,t),1)}i(Hb,"flatMap");var HG=Hb;function Yb(e,t,r,n){for(var a=e.length,s=r+(n?1:-1);n?s--:++s<a;)if(t(e[s],s,e))return s;return-1}i(Yb,"baseFindIndex");var YG=Yb;function Xb(e){return e!==e}i(Xb,"baseIsNaN");var XG=Xb;function Jb(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}i(Jb,"strictIndexOf");var JG=Jb;function Zb(e,t,r){return t===t?JG(e,t,r):YG(e,XG,r)}i(Zb,"baseIndexOf");var ZG=Zb;function Qb(e,t){var r=e==null?0:e.length;return!!r&&ZG(e,t,0)>-1}i(Qb,"arrayIncludes");var QG=Qb;function eS(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}i(eS,"arrayIncludesWith");var eF=eS;function tS(){}i(tS,"noop");var tF=tS,rF=1/0,nF=Ba&&1/pm(new Ba([,-0]))[1]==rF?function(e){return new Ba(e)}:tF,aF=nF,iF=200;function rS(e,t,r){var n=-1,a=QG,s=e.length,o=!0,l=[],u=l;if(r)o=!1,a=eF;else if(s>=iF){var c=t?null:aF(e);if(c)return pm(c);o=!1,a=c_,u=new o_}else u=t?[]:l;e:for(;++n<s;){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,o&&d===d){for(var m=u.length;m--;)if(u[m]===d)continue e;t&&u.push(d),l.push(f)}else a(u,d,r)||(u!==l&&u.push(d),l.push(f))}return l}i(rS,"baseUniq");var sF=rS;function nS(e,t){return e&&e.length?sF(e,wu(t)):[]}i(nS,"uniqBy");var oF=nS;function aS(e){var t=e==null?0:e.length;return t?qb(e,1):[]}i(aS,"flatten");var lF=aS;function iS(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}i(iS,"arrayEach");var uF=iS;function sS(e){return typeof e=="function"?e:$m}i(sS,"castFunction");var cF=sS;function oS(e,t){var r=lt(e)?uF:Iu;return r(e,cF(t))}i(oS,"forEach");var Zu=oS,fF="[object Map]",dF="[object Set]",pF=Object.prototype,mF=pF.hasOwnProperty;function lS(e){if(e==null)return!0;if(Cu(e)&&(lt(e)||typeof e=="string"||typeof e.splice=="function"||El(e)||hm(e)||Eu(e)))return!e.length;var t=qf(e);if(t==fF||t==dF)return!e.size;if(x_(e))return!F_(e).length;for(var r in e)if(mF.call(e,r))return!1;return!0}i(lS,"isEmpty");var hF=lS;function uS(e,t,r,n){var a=-1,s=e==null?0:e.length;for(n&&s&&(r=e[++a]);++a<s;)r=t(r,e[a],a,e);return r}i(uS,"arrayReduce");var yF=uS;function cS(e,t,r,n,a){return a(e,function(s,o,l){r=n?(n=!1,s):t(r,s,o,l)}),r}i(cS,"baseReduce");var gF=cS;function fS(e,t,r){var n=lt(e)?yF:gF,a=arguments.length<3;return n(e,wu(t),r,a,Iu)}i(fS,"reduce");var Sy=fS;function dS(e,t){const r={};return n=>{const a=n.toString();let s=r[a];return s!==void 0||(s={atnStartState:e,decision:t,states:{}},r[a]=s),s}}i(dS,"createDFACache");var pS=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="";const t=this.predicates.length;for(let r=0;r<t;r++)e+=this.predicates[r]===!0?"1":"0";return e}},wy=new pS,vF=class extends um{static{i(this,"LLStarLookaheadStrategy")}constructor(e){var t;super(),this.logging=(t=e?.logging)!==null&&t!==void 0?t:(r=>console.log(r))}initialize(e){this.atn=Ib(e.rules),this.dfas=mS(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:a}=e,s=this.dfas,o=this.logging,l=Ln(r,"Alternation",t),c=this.atn.decisionMap[l].decision,f=Tr(Lf({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),d=>Tr(d,m=>m[0]));if(Yf(f,!1)&&!a){const d=Sy(f,(m,g,v)=>(Zu(g,_=>{_&&(m[_.tokenTypeIdx]=v,Zu(_.categoryMatches,S=>{m[S]=v}))}),m),{});return n?function(m){var g;const v=this.LA(1),_=d[v.tokenTypeIdx];if(m!==void 0&&_!==void 0){const S=(g=m[_])===null||g===void 0?void 0:g.GATE;if(S!==void 0&&S.call(this)===!1)return}return _}:function(){const m=this.LA(1);return d[m.tokenTypeIdx]}}else return n?function(d){const m=new pS,g=d===void 0?0:d.length;for(let _=0;_<g;_++){const S=d?.[_].GATE;m.set(_,S===void 0||S.call(this))}const v=zo.call(this,s,c,m,o);return typeof v=="number"?v:void 0}:function(){const d=zo.call(this,s,c,wy,o);return typeof d=="number"?d:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:t,rule:r,prodType:n,dynamicTokensEnabled:a}=e,s=this.dfas,o=this.logging,l=Ln(r,n,t),c=this.atn.decisionMap[l].decision,f=Tr(Lf({maxLookahead:1,occurrence:t,prodType:n,rule:r}),d=>Tr(d,m=>m[0]));if(Yf(f)&&f[0][0]&&!a){const d=f[0],m=lF(d);if(m.length===1&&hF(m[0].categoryMatches)){const v=m[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===v}}else{const g=Sy(m,(v,_)=>(_!==void 0&&(v[_.tokenTypeIdx]=!0,Zu(_.categoryMatches,S=>{v[S]=!0})),v),{});return function(){const v=this.LA(1);return g[v.tokenTypeIdx]===!0}}}return function(){const d=zo.call(this,s,c,wy,o);return typeof d=="object"?!1:d===0}}};function Yf(e,t=!0){const r=new Set;for(const n of e){const a=new Set;for(const s of n){if(s===void 0){if(t)break;return!1}const o=[s.tokenTypeIdx].concat(s.categoryMatches);for(const l of o)if(r.has(l)){if(!a.has(l))return!1}else r.add(l),a.add(l)}}return!0}i(Yf,"isLL1Sequence");function mS(e){const t=e.decisionStates.length,r=Array(t);for(let n=0;n<t;n++)r[n]=dS(e.decisionStates[n],n);return r}i(mS,"initATNSimulator");function zo(e,t,r,n){const a=e[t](r);let s=a.start;if(s===void 0){const l=_S(a.atnStartState);s=Nm(a,Im(l)),a.start=s}return hS.apply(this,[a,s,r,n])}i(zo,"adaptivePredict");function hS(e,t,r,n){let a=t,s=1;const o=[];let l=this.LA(s++);for(;;){let u=RS(a,l);if(u===void 0&&(u=yS.apply(this,[e,a,l,s,r,n])),u===Cl)return $S(o,a,l);if(u.isAcceptState===!0)return u.prediction;a=u,o.push(l),l=this.LA(s++)}}i(hS,"performLookahead");function yS(e,t,r,n,a,s){const o=AS(t.configs,r,a);if(o.size===0)return Xf(e,t,r,Cl),Cl;let l=Im(o);const u=CS(o,a);if(u!==void 0)l.isAcceptState=!0,l.prediction=u,l.configs.uniqueAlt=u;else if(IS(o)){const c=VG(o.alts);l.isAcceptState=!0,l.prediction=c,l.configs.uniqueAlt=c,gS.apply(this,[e,n,o.alts,s])}return l=Xf(e,t,r,l),l}i(yS,"computeLookaheadTarget");function gS(e,t,r,n){const a=[];for(let c=1;c<=t;c++)a.push(this.LA(c).tokenType);const s=e.atnStartState,o=s.rule,l=s.production,u=vS({topLevelRule:o,ambiguityIndices:r,production:l,prefixPath:a});n(u)}i(gS,"reportLookaheadAmbiguity");function vS(e){const t=Tr(e.prefixPath,a=>In(a)).join(", "),r=e.production.idx===0?"":e.production.idx;let n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${TS(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(vS,"buildAmbiguityError");function TS(e){if(e instanceof st)return"SUBRULE";if(e instanceof He)return"OPTION";if(e instanceof gt)return"OR";if(e instanceof Et)return"AT_LEAST_ONE";if(e instanceof Ct)return"AT_LEAST_ONE_SEP";if(e instanceof yt)return"MANY_SEP";if(e instanceof _e)return"MANY";if(e instanceof ve)return"CONSUME";throw Error("non exhaustive match")}i(TS,"getProductionDslName");function $S(e,t,r){const n=HG(t.configs.elements,s=>s.state.transitions),a=oF(n.filter(s=>s instanceof Am).map(s=>s.tokenType),s=>s.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:a,tokenPath:e}}i($S,"buildAdaptivePredictError");function RS(e,t){return e.edges[t.tokenTypeIdx]}i(RS,"getExistingTargetState");function AS(e,t,r){const n=new Hf,a=[];for(const o of e.elements){if(r.is(o.alt)===!1)continue;if(o.state.type===ro){a.push(o);continue}const l=o.state.transitions.length;for(let u=0;u<l;u++){const c=o.state.transitions[u],f=ES(c,t);f!==void 0&&n.add({state:f,alt:o.alt,stack:o.stack})}}let s;if(a.length===0&&n.size===1&&(s=n),s===void 0){s=new Hf;for(const o of n.elements)Os(o,s)}if(a.length>0&&!SS(s))for(const o of a)s.add(o);return s}i(AS,"computeReachSet");function ES(e,t){if(e instanceof Am&&rm(t,e.tokenType))return e.target}i(ES,"getReachableTarget");function CS(e,t){let r;for(const 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(CS,"getUniqueAlt");function Im(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}i(Im,"newDFAState");function Xf(e,t,r,n){return n=Nm(e,n),t.edges[r.tokenTypeIdx]=n,n}i(Xf,"addDFAEdge");function Nm(e,t){if(t===Cl)return t;const r=t.configs.key,n=e.states[r];return n!==void 0?n:(t.configs.finalize(),e.states[r]=t,t)}i(Nm,"addDFAState");function _S(e){const t=new Hf,r=e.transitions.length;for(let n=0;n<r;n++){const s={state:e.transitions[n].target,alt:n,stack:[]};Os(s,t)}return t}i(_S,"computeStartState");function Os(e,t){const r=e.state;if(r.type===ro){if(e.stack.length>0){const a=[...e.stack],o={state:a.pop(),alt:e.alt,stack:a};Os(o,t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);const n=r.transitions.length;for(let a=0;a<n;a++){const s=r.transitions[a],o=bS(e,s);o!==void 0&&Os(o,t)}}i(Os,"closure");function bS(e,t){if(t instanceof wb)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof Em){const r=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:r}}}i(bS,"getEpsilonTarget");function SS(e){for(const t of e.elements)if(t.state.type===ro)return!0;return!1}i(SS,"hasConfigInRuleStopState");function wS(e){for(const t of e.elements)if(t.state.type!==ro)return!1;return!0}i(wS,"allConfigsInRuleStopStates");function IS(e){if(wS(e))return!0;const t=NS(e.elements);return PS(t)&&!kS(t)}i(IS,"hasConflictTerminatingPrediction");function NS(e){const t=new Map;for(const r of e){const n=Sm(r,!1);let a=t.get(n);a===void 0&&(a={},t.set(n,a)),a[r.alt]=!0}return t}i(NS,"getConflictingAltSets");function PS(e){for(const t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}i(PS,"hasConflictingAltSet");function kS(e){for(const t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}i(kS,"hasStateAssociatedWithOneAlt");xs();var OS=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 km(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const t=new ku;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){const r=new _l(e.startOffset,e.image.length,$s(e),e.tokenType,!t);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){const t=e.container;if(t){const r=t.content.indexOf(e);r>=0&&t.content.splice(r,1)}}addHiddenNodes(e){const t=[];for(const a of e){const s=new _l(a.startOffset,a.image.length,$s(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}for(;r.container;){const a=r.container.content.indexOf(r);if(a>0){r.container.content.splice(a,0,...t),n=!0;break}r=r.container}n||this.rootNode.content.unshift(...t)}construct(e){const t=this.current;typeof e.$type=="string"&&!e.$infixName&&(this.current.astNode=e),e.$cstNode=t;const r=this.nodeStack.pop();r?.content.length===0&&this.removeNode(r)}},Pm=class{static{i(this,"AbstractCstNode")}get hidden(){return!1}get astNode(){const e=typeof this._astNode?.$type=="string"?this._astNode:this.container?.astNode;if(!e)throw new 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)}},_l=class extends Pm{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}},ku=class extends Pm{static{i(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new TF(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){const e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===void 0){const{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:ie.create(0,0),end:ie.create(0,0)}}get firstNonHiddenNode(){for(const 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--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},TF=class LS extends Array{static{i(this,"CstNodeContainer")}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,LS.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(const r of t)r.container=this.parent}},km=class extends ku{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??""}},bl=Symbol("Datatype");function jo(e){return e.$type===bl}i(jo,"isDataTypeNode");var Iy="",DS=i(e=>e.endsWith(Iy)?e:e+Iy,"withRuleSuffix"),Om=class{static{i(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition,r=e.LanguageMetaData.mode==="production";e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new RF(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new FS(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()}},xS=class extends Om{static{i(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new OS,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){const r=this.computeRuleType(e);let n;qa(e)&&(n=e.name,this.registerPrecedenceMap(e));const a=this.wrapper.DEFINE_RULE(DS(e.name),this.startImplementation(r,n,t).bind(this));return this.allRules.set(e.name,a),it(e)&&e.entry&&(this.mainRule=a),a}registerPrecedenceMap(e){const t=e.name,r=new Map;for(let n=0;n<e.operators.precedences.length;n++){const a=e.operators.precedences[n];for(const s of a.operators)r.set(s.value,{precedence:n,rightAssoc:a.associativity==="right"})}this.operatorPrecedence.set(t,r)}computeRuleType(e){return qa(e)?Pn(e):e.fragment?void 0:zs(e)?bl:Pn(e)}parse(e,t={}){this.nodeBuilder.buildRootNode(e);const r=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=r.tokens;const n=t.rule?this.allRules.get(t.rule):this.mainRule;if(!n)throw new Error(t.rule?`No rule found with name '${t.rule}'`:"No main rule available.");const a=this.doParse(n);return this.nodeBuilder.addHiddenNodes(r.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,Wa(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()),t===void 0)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return t}startImplementation(e,t,r){return n=>{const a=!this.isRecording()&&e!==void 0;if(a){const s={$type:e};this.stack.push(s),e===bl?s.value="":t!==void 0&&(s.$infixName=t)}return r(n),a?this.construct():void 0}}extractHiddenTokens(e){const t=this.lexerResult.hidden;if(!t.length)return[];const 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){const n=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(n)){const a=this.extractHiddenTokens(n);this.nodeBuilder.addHiddenNodes(a);const s=this.nodeBuilder.buildLeafNode(n,r),{assignment:o,crossRef:l}=this.getAssignment(r),u=this.current;if(o){const c=Ar(r)?n.image:this.converter.convert(n.image,s);this.assign(o.operator,o.feature,c,s,l)}else if(jo(u)){let c=n.image;Ar(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;!this.isRecording()&&!r&&(s=this.nodeBuilder.buildCompositeNode(n));let o;try{o=this.wrapper.wrapSubrule(e,t,a)}finally{this.isRecording()||(o===void 0&&!r&&(o=this.construct()),o!==void 0&&s&&s.length>0&&this.performSubruleAssignment(o,n,s))}}performSubruleAssignment(e,t,r){const{assignment:n,crossRef:a}=this.getAssignment(t);if(n)this.assign(n.operator,n.feature,e,r,a);else if(!n){const s=this.current;if(jo(s))s.value+=e.toString();else if(typeof e=="object"&&e){const 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);const 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;const e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):jo(e)?this.converter.convert(e.value,e.$cstNode):(Pd(this.astReflection,e),e)}constructInfix(e,t){const r=e.parts;if(!Array.isArray(r)||r.length===0)return;const 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++){const _=n[v],S=t.get(_)??{precedence:1/0,rightAssoc:!1};S.precedence>s?(s=S.precedence,a=v):S.precedence===s&&(S.rightAssoc||(a=v))}const 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)){const t=Mn(e,Rr);this.assignmentMap.set(e,{assignment:t,crossRef:t&&Fn(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,r,n,a){const s=this.current;let o;switch(a==="single"&&typeof r=="string"?o=this.linker.buildReference(s,t,n,r):a==="multi"&&typeof r=="string"?o=this.linker.buildMultiReference(s,t,n,r):o=r,e){case"=":{s[t]=o;break}case"?=":{s[t]=!0;break}case"+=":Array.isArray(s[t])||(s[t]=[]),s[t].push(o)}}assignWithoutOverride(e,t){for(const[n,a]of Object.entries(t)){const s=e[n];s===void 0?e[n]=a:Array.isArray(s)&&Array.isArray(a)&&(a.push(...s),e[n]=a)}const r=e.$cstNode;return r&&(r.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},MS=class{static{i(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return Ga.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Ga.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Ga.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Ga.buildEarlyExitMessage(e)}},Lm=class extends MS{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}\`.`}},GS=class extends Om{static{i(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const 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){const r=this.wrapper.DEFINE_RULE(DS(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,r),e.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,r){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){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},$F={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Lm},FS=class extends sx{static{i(this,"ChevrotainWrapper")}constructor(e,t){const r=t&&"maxLookahead"in t;super(e,{...$F,lookaheadStrategy:r?new um({maxLookahead:t.maxLookahead}):new vF({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,{})}},RF=class extends FS{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 Ou(e,t,r){return zS({parser:t,tokens:r,ruleNames:new Map},e),t}i(Ou,"createParser");function zS(e,t){const r=Hl(t,!1),n=ue(t.rules).filter(it).filter(s=>r.has(s));for(const s of n){const o={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(s,Wr(o,s.definition))}const a=ue(t.rules).filter(qa).filter(s=>r.has(s));for(const s of a)e.parser.rule(s,jS(e,s))}i(zS,"buildRules");function jS(e,t){const r=t.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if(Nt(r))throw new Error("Cannot use terminal rule in infix expression");const 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);const u={$container:o,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},c={...s,$container:o};o.elements.push(u,c);const d=n.map(g=>e.tokens[g.value]).map((g,v)=>({ALT:i(()=>e.parser.consume(v,g,u),"ALT")}));let m;return g=>{m??(m=Lu(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(jS,"buildInfixRule");function Wr(e,t,r=!1){let n;if(Ar(t))n=HS(e,t);else if(jr(t))n=BS(e,t);else if(Rr(t))n=Wr(e,t.terminal);else if(Fn(t))n=Dm(e,t);else if(Er(t))n=US(e,t);else if(Fl(t))n=WS(e,t);else if(Ul(t))n=VS(e,t);else if(zn(t))n=qS(e,t);else if(Gd(t)){const a=e.consume++;n=i(()=>e.parser.consume(a,Ur,t),"method")}else throw new Wl(t.$cstNode,`Unexpected element type: ${t.$type}`);return xm(e,r?void 0:Ls(t),n,t.cardinality)}i(Wr,"buildElement");function BS(e,t){const r=Pn(t);return()=>e.parser.action(r,t)}i(BS,"buildAction");function US(e,t){const r=t.rule.ref;if(Gn(r)){const n=e.subrule++,a=it(r)&&r.fragment,s=t.arguments.length>0?KS(r,t.arguments):()=>({});let o;return l=>{o??(o=Lu(e,r)),e.parser.subrule(n,o,a,t,s(l))}}else if(Nt(r)){const n=e.consume++,a=Sl(e,r.name);return()=>e.parser.consume(n,a,t)}else if(r)qr();else throw new Wl(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}i(US,"buildRuleCall");function KS(e,t){if(t.some(n=>n.calledByName)){const n=t.map(a=>({parameterName:a.parameter?.ref?.name,predicate:xt(a.value)}));return a=>{const s={};for(const{parameterName:o,predicate:l}of n)o&&(s[o]=l(a));return s}}else{const n=t.map(a=>xt(a.value));return a=>{const s={};for(let o=0;o<n.length;o++)if(o<e.parameters.length){const l=e.parameters[o].name,u=n[o];s[l]=u(a)}return s}}}i(KS,"buildRuleCallPredicate");function xt(e){if(Md(e)){const t=xt(e.left),r=xt(e.right);return n=>t(n)||r(n)}else if(xd(e)){const t=xt(e.left),r=xt(e.right);return n=>t(n)&&r(n)}else if(jd(e)){const t=xt(e.value);return r=>!t(r)}else if(Bd(e)){const t=e.parameter.ref.name;return r=>r!==void 0&&r[t]===!0}else if(Ld(e)){const t=!!e.true;return()=>t}qr()}i(xt,"buildPredicate");function WS(e,t){if(t.elements.length===1)return Wr(e,t.elements[0]);{const r=[];for(const a of t.elements){const s={ALT:Wr(e,a,!0)},o=Ls(a);o&&(s.GATE=xt(o)),r.push(s)}const n=e.or++;return a=>e.parser.alternatives(n,r.map(s=>{const o={ALT:i(()=>s.ALT(a),"ALT")},l=s.GATE;return l&&(o.GATE=()=>l(a)),o}))}}i(WS,"buildAlternatives");function VS(e,t){if(t.elements.length===1)return Wr(e,t.elements[0]);const r=[];for(const l of t.elements){const u={ALT:Wr(e,l,!0)},c=Ls(l);c&&(u.GATE=xt(c)),r.push(u)}const n=e.or++,a=i((l,u)=>{const c=u.getRuleStack().join("-");return`uGroup_${l}_${c}`},"idFunc"),s=i(l=>e.parser.alternatives(n,r.map((u,c)=>{const f={ALT:i(()=>!0,"ALT")},d=e.parser;f.ALT=()=>{if(u.ALT(l),!d.isRecording()){const g=a(n,d);d.unorderedGroups.get(g)||d.unorderedGroups.set(g,[]);const v=d.unorderedGroups.get(g);typeof v?.[c]>"u"&&(v[c]=!0)}};const m=u.GATE;return m?f.GATE=()=>m(l):f.GATE=()=>!d.unorderedGroups.get(a(n,d))?.[c],f})),"alternatives"),o=xm(e,Ls(t),s,"*");return l=>{o(l),e.parser.isRecording()||e.parser.unorderedGroups.delete(a(n,e.parser))}}i(VS,"buildUnorderedGroup");function qS(e,t){const r=t.elements.map(n=>Wr(e,n));return n=>r.forEach(a=>a(n))}i(qS,"buildGroup");function Ls(e){if(zn(e))return e.guardCondition}i(Ls,"getGuardCondition");function Dm(e,t,r=t.terminal){if(r)if(Er(r)&&it(r.rule.ref)){const n=r.rule.ref,a=e.subrule++;let s;return o=>{s??(s=Lu(e,n)),e.parser.subrule(a,s,!1,t,o)}}else if(Er(r)&&Nt(r.rule.ref)){const n=e.consume++,a=Sl(e,r.rule.ref.name);return()=>e.parser.consume(n,a,t)}else if(Ar(r)){const n=e.consume++,a=Sl(e,r.value);return()=>e.parser.consume(n,a,t)}else throw new Error("Could not build cross reference parser");else{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);const a=Zl(t.type.ref)?.terminal;if(!a)throw new Error("Could not find name assignment for type: "+Pn(t.type.ref));return Dm(e,t,a)}}i(Dm,"buildCrossReference");function HS(e,t){const r=e.consume++,n=e.tokens[t.value];if(!n)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(r,n,t)}i(HS,"buildKeyword");function xm(e,t,r,n){const a=t&&xt(t);if(!n)if(a){const s=e.or++;return o=>e.parser.alternatives(s,[{ALT:i(()=>r(o),"ALT"),GATE:i(()=>a(o),"GATE")},{ALT:Uf(),GATE:i(()=>!a(o),"GATE")}])}else return r;if(n==="*"){const s=e.many++;return o=>e.parser.many(s,{DEF:i(()=>r(o),"DEF"),GATE:a?()=>a(o):void 0})}else if(n==="+"){const s=e.many++;if(a){const 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:Uf(),GATE:i(()=>!a(l),"GATE")}])}else return o=>e.parser.atLeastOne(s,{DEF:i(()=>r(o),"DEF")})}else if(n==="?"){const s=e.optional++;return o=>e.parser.optional(s,{DEF:i(()=>r(o),"DEF"),GATE:a?()=>a(o):void 0})}else qr()}i(xm,"wrap");function Lu(e,t){const r=YS(e,t),n=e.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}i(Lu,"getRule");function YS(e,t){if(Gn(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,n=r.$container,a=t.$type;for(;!it(n);)(zn(n)||Fl(n)||Ul(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(YS,"getRuleName");function Sl(e,t){const r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}i(Sl,"getToken");function Mm(e){const t=e.Grammar,r=e.parser.Lexer,n=new GS(e);return Ou(t,n,r.definition),n.finalize(),n}i(Mm,"createCompletionParser");function Gm(e){const t=Fm(e);return t.finalize(),t}i(Gm,"createLangiumParser");function Fm(e){const t=e.Grammar,r=e.parser.Lexer,n=new xS(e);return Ou(t,n,r.definition)}i(Fm,"prepareLangiumParser");var Du=class{static{i(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){const r=ue(Hl(e,!1)),n=this.buildTerminalTokens(r),a=this.buildKeywordTokens(r,n,t);return a.push(...n),a}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(Nt).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(e){const t=Bs(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,n={name:e.name,PATTERN:r};return typeof r=="function"&&(n.LINE_BREAKS=!0),e.hidden&&(n.GROUP=ql(t)?at.SKIPPED:"hidden"),n}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s"))}regexPatternFunction(e){const t=new RegExp(e,e.flags+"y");return(r,n)=>(t.lastIndex=n,t.exec(r))}buildKeywordTokens(e,t,r){return e.filter(Gn).flatMap(n=>Nr(n).filter(Ar)).distinct(n=>n.value).toArray().sort((n,a)=>a.value.length-n.value.length).map(n=>this.buildKeywordToken(n,t,!!r?.caseInsensitive))}buildKeywordToken(e,t,r){const n=this.buildKeywordPattern(e,r),a={name:e.value,PATTERN:n,LONGER_ALT:this.findLongerAlt(e,t)};return typeof n=="function"&&(a.LINE_BREAKS=!0),a}buildKeywordPattern(e,t){return t?new RegExp(ri(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((r,n)=>{const a=n?.PATTERN;return a?.source&&cp("^"+a.source+"$",e.value)&&r.push(n),r},[])}},zm=class{static{i(this,"DefaultValueConverter")}convert(e,t){let r=t.grammarSource;if(Fn(r)&&(r=hp(r)),Er(r)){const n=r.rule.ref;if(!n)throw new 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 Zt.convertInt(t);case"STRING":return Zt.convertString(t);case"ID":return Zt.convertID(t)}switch(Cp(e)?.toLowerCase()){case"number":return Zt.convertNumber(t);case"boolean":return Zt.convertBoolean(t);case"bigint":return Zt.convertBigint(t);case"date":return Zt.convertDate(t);default:return t}}},Zt;(function(e){function t(c){let f="";for(let d=1;d<c.length-1;d++){const m=c.charAt(d);if(m==="\\"){const 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" ";case"v":return"\v";case"0":return"\0";default:return c}}i(r,"convertEscapeCharacter");function n(c){return c.charAt(0)==="^"?c.substring(1):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})(Zt||(Zt={}));var pe={};Ll(pe,Cd(xl()));function xu(){return new Promise(e=>{typeof setImmediate>"u"?setTimeout(e,0):setImmediate(e)})}i(xu,"delayNextTick");var Bo=0,XS=10;function Mu(){return Bo=performance.now(),new pe.CancellationTokenSource}i(Mu,"startCancelableOperation");function jm(e){XS=e}i(jm,"setInterruptionPeriod");var tr=Symbol("OperationCancelled");function ta(e){return e===tr}i(ta,"isOperationCancelled");async function ze(e){if(e===pe.CancellationToken.None)return;const t=performance.now();if(t-Bo>=XS&&(Bo=t,await xu(),Bo=performance.now()),e.isCancellationRequested)throw tr}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)})}},Ny=class Jf{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){const r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content}update(t,r){for(const n of t)if(Jf.isIncremental(n)){const a=Um(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);const l=Math.max(a.start.line,0),u=Math.max(a.end.line,0);let c=this._lineOffsets;const f=Zf(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 f.length<1e4?c.splice(l+1,u-l,...f):this._lineOffsets=c=c.slice(0,l+1).concat(f,c.slice(u+1));const 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(Jf.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Zf(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);const r=this.getLineOffsets();let n=0,a=r.length;if(a===0)return{line:0,character:t};for(;n<a;){const o=Math.floor((n+a)/2);r[o]>t?a=o:n=o+1}const s=n-1;return t=this.ensureBeforeEOL(t,r[s]),{line:s,character:t-r[s]}}offsetAt(t){const r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;const n=r[t.line];if(t.character<=0)return n;const 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){for(;t>r&&Bm(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){const r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(t){const r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}},wl;(function(e){function t(a,s,o,l){return new Ny(a,s,o,l)}i(t,"create"),e.create=t;function r(a,s,o){if(a instanceof Ny)return a.update(s,o),a;throw new Error("TextDocument.update: document must be created by TextDocument.create")}i(r,"update"),e.update=r;function n(a,s){const o=a.getText(),l=Il(s.map(JS),(f,d)=>{const m=f.range.start.line-d.range.start.line;return m===0?f.range.start.character-d.range.start.character:m});let u=0;const c=[];for(const f of l){const d=a.offsetAt(f.range.start);if(d<u)throw new Error("Overlapping edit");d>u&&c.push(o.substring(u,d)),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})(wl||(wl={}));function Il(e,t){if(e.length<=1)return e;const r=e.length/2|0,n=e.slice(0,r),a=e.slice(r);Il(n,t),Il(a,t);let s=0,o=0,l=0;for(;s<n.length&&o<a.length;)t(n[s],a[o])<=0?e[l++]=n[s++]:e[l++]=a[o++];for(;s<n.length;)e[l++]=n[s++];for(;o<a.length;)e[l++]=a[o++];return e}i(Il,"mergeSort");function Zf(e,t,r=0){const n=t?[r]:[];for(let a=0;a<e.length;a++){const s=e.charCodeAt(a);Bm(s)&&(s===13&&a+1<e.length&&e.charCodeAt(a+1)===10&&a++,n.push(r+a+1))}return n}i(Zf,"computeLineOffsets");function Bm(e){return e===13||e===10}i(Bm,"isEOL");function Um(e){const t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}i(Um,"getWellformedRange");function JS(e){const t=Um(e.range);return t!==e.range?{newText:e.newText,range:t}:e}i(JS,"getWellformedEdit");var ZS;(()=>{var e={975:k=>{function C(T){if(typeof T!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(T))}i(C,"e");function y(T,$){for(var b,O="",x=0,D=-1,G=0,W=0;W<=T.length;++W){if(W<T.length)b=T.charCodeAt(W);else{if(b===47)break;b=47}if(b===47){if(!(D===W-1||G===1))if(D!==W-1&&G===2){if(O.length<2||x!==2||O.charCodeAt(O.length-1)!==46||O.charCodeAt(O.length-2)!==46){if(O.length>2){var Y=O.lastIndexOf("/");if(Y!==O.length-1){Y===-1?(O="",x=0):x=(O=O.slice(0,Y)).length-1-O.lastIndexOf("/"),D=W,G=0;continue}}else if(O.length===2||O.length===1){O="",x=0,D=W,G=0;continue}}$&&(O.length>0?O+="/..":O="..",x=2)}else O.length>0?O+="/"+T.slice(D+1,W):O=T.slice(D+1,W),x=W-D-1;D=W,G=0}else b===46&&G!==-1?++G:G=-1}return O}i(y,"r");var E={resolve:i(function(){for(var T,$="",b=!1,O=arguments.length-1;O>=-1&&!b;O--){var x;O>=0?x=arguments[O]:(T===void 0&&(T=process.cwd()),x=T),C(x),x.length!==0&&($=x+"/"+$,b=x.charCodeAt(0)===47)}return $=y($,!b),b?$.length>0?"/"+$:"/":$.length>0?$:"."},"resolve"),normalize:i(function(T){if(C(T),T.length===0)return".";var $=T.charCodeAt(0)===47,b=T.charCodeAt(T.length-1)===47;return(T=y(T,!$)).length!==0||$||(T="."),T.length>0&&b&&(T+="/"),$?"/"+T:T},"normalize"),isAbsolute:i(function(T){return C(T),T.length>0&&T.charCodeAt(0)===47},"isAbsolute"),join:i(function(){if(arguments.length===0)return".";for(var T,$=0;$<arguments.length;++$){var b=arguments[$];C(b),b.length>0&&(T===void 0?T=b:T+="/"+b)}return T===void 0?".":E.normalize(T)},"join"),relative:i(function(T,$){if(C(T),C($),T===$||(T=E.resolve(T))===($=E.resolve($)))return"";for(var b=1;b<T.length&&T.charCodeAt(b)===47;++b);for(var O=T.length,x=O-b,D=1;D<$.length&&$.charCodeAt(D)===47;++D);for(var G=$.length-D,W=x<G?x:G,Y=-1,V=0;V<=W;++V){if(V===W){if(G>W){if($.charCodeAt(D+V)===47)return $.slice(D+V+1);if(V===0)return $.slice(D+V)}else x>W&&(T.charCodeAt(b+V)===47?Y=V:V===0&&(Y=0));break}var Pe=T.charCodeAt(b+V);if(Pe!==$.charCodeAt(D+V))break;Pe===47&&(Y=V)}var oe="";for(V=b+Y+1;V<=O;++V)V!==O&&T.charCodeAt(V)!==47||(oe.length===0?oe+="..":oe+="/..");return oe.length>0?oe+$.slice(D+Y):(D+=Y,$.charCodeAt(D)===47&&++D,$.slice(D))},"relative"),_makeLong:i(function(T){return T},"_makeLong"),dirname:i(function(T){if(C(T),T.length===0)return".";for(var $=T.charCodeAt(0),b=$===47,O=-1,x=!0,D=T.length-1;D>=1;--D)if(($=T.charCodeAt(D))===47){if(!x){O=D;break}}else x=!1;return O===-1?b?"/":".":b&&O===1?"//":T.slice(0,O)},"dirname"),basename:i(function(T,$){if($!==void 0&&typeof $!="string")throw new TypeError('"ext" argument must be a string');C(T);var b,O=0,x=-1,D=!0;if($!==void 0&&$.length>0&&$.length<=T.length){if($.length===T.length&&$===T)return"";var G=$.length-1,W=-1;for(b=T.length-1;b>=0;--b){var Y=T.charCodeAt(b);if(Y===47){if(!D){O=b+1;break}}else W===-1&&(D=!1,W=b+1),G>=0&&(Y===$.charCodeAt(G)?--G==-1&&(x=b):(G=-1,x=W))}return O===x?x=W:x===-1&&(x=T.length),T.slice(O,x)}for(b=T.length-1;b>=0;--b)if(T.charCodeAt(b)===47){if(!D){O=b+1;break}}else x===-1&&(D=!1,x=b+1);return x===-1?"":T.slice(O,x)},"basename"),extname:i(function(T){C(T);for(var $=-1,b=0,O=-1,x=!0,D=0,G=T.length-1;G>=0;--G){var W=T.charCodeAt(G);if(W!==47)O===-1&&(x=!1,O=G+1),W===46?$===-1?$=G:D!==1&&(D=1):$!==-1&&(D=-1);else if(!x){b=G+1;break}}return $===-1||O===-1||D===0||D===1&&$===O-1&&$===b+1?"":T.slice($,O)},"extname"),format:i(function(T){if(T===null||typeof T!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof T);return(function($,b){var O=b.dir||b.root,x=b.base||(b.name||"")+(b.ext||"");return O?O===b.root?O+x:O+"/"+x:x})(0,T)},"format"),parse:i(function(T){C(T);var $={root:"",dir:"",base:"",ext:"",name:""};if(T.length===0)return $;var b,O=T.charCodeAt(0),x=O===47;x?($.root="/",b=1):b=0;for(var D=-1,G=0,W=-1,Y=!0,V=T.length-1,Pe=0;V>=b;--V)if((O=T.charCodeAt(V))!==47)W===-1&&(Y=!1,W=V+1),O===46?D===-1?D=V:Pe!==1&&(Pe=1):D!==-1&&(Pe=-1);else if(!Y){G=V+1;break}return D===-1||W===-1||Pe===0||Pe===1&&D===W-1&&D===G+1?W!==-1&&($.base=$.name=G===0&&x?T.slice(1,W):T.slice(G,W)):(G===0&&x?($.name=T.slice(1,D),$.base=T.slice(1,W)):($.name=T.slice(G,D),$.base=T.slice(G,W)),$.ext=T.slice(D,W)),G>0?$.dir=T.slice(0,G-1):x&&($.dir="/"),$},"parse"),sep:"/",delimiter:":",win32:null,posix:null};E.posix=E,k.exports=E}},t={};function r(k){var C=t[k];if(C!==void 0)return C.exports;var y=t[k]={exports:{}};return e[k](y,y.exports,r),y.exports}i(r,"r"),r.d=(k,C)=>{for(var y in C)r.o(C,y)&&!r.o(k,y)&&Object.defineProperty(k,y,{enumerable:!0,get:C[y]})},r.o=(k,C)=>Object.prototype.hasOwnProperty.call(k,C),r.r=k=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(k,"__esModule",{value:!0})};var n={};let a;r.r(n),r.d(n,{URI:i(()=>m,"URI"),Utils:i(()=>Se,"Utils")}),typeof process=="object"?a=process.platform==="win32":typeof navigator=="object"&&(a=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,o=/^\//,l=/^\/\//;function u(k,C){if(!k.scheme&&C)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${k.authority}", path: "${k.path}", query: "${k.query}", fragment: "${k.fragment}"}`);if(k.scheme&&!s.test(k.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(k.path){if(k.authority){if(!o.test(k.path))throw new 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(k.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}i(u,"a");const 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,y,E,T,$,b=!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(O,x){return O||x?O:"file"})(C,b),this.authority=y||c,this.path=(function(O,x){switch(O){case"https":case"http":case"file":x?x[0]!==f&&(x=f+x):x=f}return x})(this.scheme,E||c),this.query=T||c,this.fragment=$||c,u(this,b))}get fsPath(){return I(this,!1)}with(C){if(!C)return this;let{scheme:y,authority:E,path:T,query:$,fragment:b}=C;return y===void 0?y=this.scheme:y===null&&(y=c),E===void 0?E=this.authority:E===null&&(E=c),T===void 0?T=this.path:T===null&&(T=c),$===void 0?$=this.query:$===null&&($=c),b===void 0?b=this.fragment:b===null&&(b=c),y===this.scheme&&E===this.authority&&T===this.path&&$===this.query&&b===this.fragment?this:new v(y,E,T,$,b)}static parse(C,y=!1){const E=d.exec(C);return E?new v(E[2]||c,X(E[4]||c),X(E[5]||c),X(E[7]||c),X(E[9]||c),y):new v(c,c,c,c,c)}static file(C){let y=c;if(a&&(C=C.replace(/\\/g,f)),C[0]===f&&C[1]===f){const E=C.indexOf(f,2);E===-1?(y=C.substring(2),C=f):(y=C.substring(2,E),C=C.substring(E)||f)}return new v("file",y,C,c,c)}static from(C){const y=new v(C.scheme,C.authority,C.path,C.query,C.fragment);return u(y,!0),y}toString(C=!1){return R(this,C)}toJSON(){return this}static revive(C){if(C){if(C instanceof m)return C;{const y=new v(C);return y._formatted=C.external,y._fsPath=C._sep===g?C.fsPath:null,y}}return C}}const g=a?1:void 0;class v extends m{static{i(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=I(this,!1)),this._fsPath}toString(C=!1){return C?R(this,!0):(this._formatted||(this._formatted=R(this,!1)),this._formatted)}toJSON(){const 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}}const _={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 S(k,C,y){let E,T=-1;for(let $=0;$<k.length;$++){const b=k.charCodeAt($);if(b>=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57||b===45||b===46||b===95||b===126||C&&b===47||y&&b===91||y&&b===93||y&&b===58)T!==-1&&(E+=encodeURIComponent(k.substring(T,$)),T=-1),E!==void 0&&(E+=k.charAt($));else{E===void 0&&(E=k.substr(0,$));const O=_[b];O!==void 0?(T!==-1&&(E+=encodeURIComponent(k.substring(T,$)),T=-1),E+=O):T===-1&&(T=$)}}return T!==-1&&(E+=encodeURIComponent(k.substring(T))),E!==void 0?E:k}i(S,"m");function w(k){let C;for(let y=0;y<k.length;y++){const E=k.charCodeAt(y);E===35||E===63?(C===void 0&&(C=k.substr(0,y)),C+=_[E]):C!==void 0&&(C+=k[y])}return C!==void 0?C:k}i(w,"y");function I(k,C){let y;return y=k.authority&&k.path.length>1&&k.scheme==="file"?`//${k.authority}${k.path}`:k.path.charCodeAt(0)===47&&(k.path.charCodeAt(1)>=65&&k.path.charCodeAt(1)<=90||k.path.charCodeAt(1)>=97&&k.path.charCodeAt(1)<=122)&&k.path.charCodeAt(2)===58?C?k.path.substr(1):k.path[1].toLowerCase()+k.path.substr(2):k.path,a&&(y=y.replace(/\//g,"\\")),y}i(I,"v");function R(k,C){const y=C?w:S;let E="",{scheme:T,authority:$,path:b,query:O,fragment:x}=k;if(T&&(E+=T,E+=":"),($||T==="file")&&(E+=f,E+=f),$){let D=$.indexOf("@");if(D!==-1){const G=$.substr(0,D);$=$.substr(D+1),D=G.lastIndexOf(":"),D===-1?E+=y(G,!1,!1):(E+=y(G.substr(0,D),!1,!1),E+=":",E+=y(G.substr(D+1),!1,!0)),E+="@"}$=$.toLowerCase(),D=$.lastIndexOf(":"),D===-1?E+=y($,!1,!0):(E+=y($.substr(0,D),!1,!0),E+=$.substr(D))}if(b){if(b.length>=3&&b.charCodeAt(0)===47&&b.charCodeAt(2)===58){const D=b.charCodeAt(1);D>=65&&D<=90&&(b=`/${String.fromCharCode(D+32)}:${b.substr(3)}`)}else if(b.length>=2&&b.charCodeAt(1)===58){const D=b.charCodeAt(0);D>=65&&D<=90&&(b=`${String.fromCharCode(D+32)}:${b.substr(2)}`)}E+=y(b,!0,!1)}return O&&(E+="?",E+=y(O,!1,!1)),x&&(E+="#",E+=C?x:S(x,!1,!1)),E}i(R,"b");function P(k){try{return decodeURIComponent(k)}catch{return k.length>3?k.substr(0,3)+P(k.substr(3)):k}}i(P,"C");const z=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function X(k){return k.match(z)?k.replace(z,(C=>P(C))):k}i(X,"w");var Z=r(975);const ce=Z.posix||Z,se="/";var Se;(function(k){k.joinPath=function(C,...y){return C.with({path:ce.join(C.path,...y)})},k.resolvePath=function(C,...y){let E=C.path,T=!1;E[0]!==se&&(E=se+E,T=!0);let $=ce.resolve(E,...y);return T&&$[0]===se&&!C.authority&&($=$.substring(1)),C.with({path:$})},k.dirname=function(C){if(C.path.length===0||C.path===se)return C;let y=ce.dirname(C.path);return y.length===1&&y.charCodeAt(0)===46&&(y=""),C.with({path:y})},k.basename=function(C){return ce.basename(C.path)},k.extname=function(C){return ce.extname(C.path)}})(Se||(Se={})),ZS=n})();var{URI:Tt,Utils:Di}=ZS,nt;(function(e){e.basename=Di.basename,e.dirname=Di.dirname,e.extname=Di.extname,e.joinPath=Di.joinPath,e.resolvePath=Di.resolvePath;const 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){const u=typeof o=="string"?Tt.parse(o).path:o.path,c=typeof l=="string"?Tt.parse(l).path:l.path,f=u.split("/").filter(_=>_.length>0),d=c.split("/").filter(_=>_.length>0);if(t){const _=/^[A-Z]:$/;if(f[0]&&_.test(f[0])&&(f[0]=f[0].toLowerCase()),d[0]&&_.test(d[0])&&(d[0]=d[0].toLowerCase()),f[0]!==d[0])return c.substring(1)}let m=0;for(;m<f.length&&f[m]===d[m];m++);const g="../".repeat(f.length-m),v=d.slice(m).join("/");return g+v}i(n,"relative"),e.relative=n;function a(o){return Tt.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;return c.charAt(c.length-1)==="/"&&(c=c.slice(0,-1)),u.charAt(u.length-1)==="/"&&(u=u.slice(0,-1)),c===u?!0:c.length<u.length||c.charAt(u.length)!=="/"?!1:c.startsWith(u)}i(s,"contains"),e.contains=s})(nt||(nt={}));var Km=class{static{i(this,"UriTrie")}constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return nt.normalize(e)}clear(){this.root.children.clear()}insert(e,t){const r=this.getNode(this.normalizeUri(e),!0);r.element=t}delete(e){const t=this.getNode(this.normalizeUri(e),!1);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){const t=this.normalizeUri(e),r=this.getNode(t,!1);if(r)return{name:r.name,uri:nt.joinPath(Tt.parse(t),r.name).toString(),element:r.element}}findChildren(e){const t=this.normalizeUri(e),r=this.getNode(t,!1);return r?Array.from(r.children.values()).map(n=>({name:n.name,uri:nt.joinPath(Tt.parse(t),n.name).toString(),element:n.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const t=this.getNode(nt.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){const r=e.split("/");e.charAt(e.length-1)==="/"&&r.pop();let n=this.root;for(const 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){const t=[];e.element&&t.push(e.element);for(const r of e.children.values())t.push(...this.collectValues(r));return t}},J;(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"})(J||(J={}));var QS=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=pe.CancellationToken.None){const r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??Tt.parse(e.uri),pe.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return pe.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,r){if(typeof t=="string"){const n=this.parse(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}else if("$model"in t){const n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{const n=this.parse(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}async createAsync(e,t,r){if(typeof t=="string"){const n=await this.parseAsync(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}else{const 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:J.Parsed,references:[],textDocument:r};else{const s=this.createTextDocumentGetter(t,n);a={parseResult:e,uri:t,state:J.Parsed,references:[],get textDocument(){return s()}}}return e.value.$document=a,a}async update(e,t){const 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{const s=this.createTextDocumentGetter(e.uri,a);Object.defineProperty(e,"textDocument",{get:s})}return r!==a&&(e.parseResult=await this.parseAsync(e.uri,a,t),e.parseResult.value.$document=e),e.state=J.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){const r=this.serviceRegistry;let n;return()=>n??(n=wl.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}},ew=class{static{i(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new Km,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return ue(this.documentTrie.all())}addDocument(e){const t=e.uri.toString();if(this.documentTrie.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){const t=e.toString();return this.documentTrie.find(t)}getDocuments(e){const t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let r=this.getDocument(e);return r||(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));{const n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const t=e.toString(),r=this.documentTrie.find(t);return r&&this.documentBuilder().resetToState(r,J.Changed),r}deleteDocument(e){const t=e.toString(),r=this.documentTrie.find(t);return r&&(r.state=J.Changed,this.documentTrie.delete(t)),r}deleteDocuments(e){const t=e.toString(),r=this.documentTrie.findAll(t);for(const n of r)n.state=J.Changed;return this.documentTrie.delete(t),r}},un=Symbol("RefResolving"),tw=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=pe.CancellationToken.None){if(this.profiler?.isActive("linking")){const r=this.profiler.createTask("linking",this.languageId);r.start();try{for(const n of Gt(e.parseResult.value))await ze(t),Va(n).forEach(a=>{const s=`${n.$type}:${a.property}`;r.startSubTask(s);try{this.doLink(a,e)}finally{r.stopSubTask(s)}})}finally{r.stop()}}else for(const r of Gt(e.parseResult.value))await ze(t),Va(r).forEach(n=>this.doLink(n,e))}doLink(e,t){const r=e.reference;if("_ref"in r&&r._ref===void 0){r._ref=un;try{const n=this.getCandidate(e);if(pn(n))r._ref=n;else{r._nodeDescription=n;const 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);const 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=un;try{const n=this.getCandidates(e),a=[];if(pn(n))r._linkingError=n;else for(const s of n){const o=this.loadAstNode(s);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(const t of e.references)"_ref"in t?(t._ref=void 0,delete t._nodeDescription):"_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){const 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){const a=this,s={$refNode:r,$refText:n,_ref:void 0,get ref(){if(Oe(this._ref))return this._ref;if(wd(this._nodeDescription)){const 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=un;const o=Fa(e).$document,l=a.getLinkedNode({reference:s,container:e,property:t});if(l.error&&o&&o.state<J.ComputedScopes)return this._ref=void 0;this._ref=l.node??l.error,this._nodeDescription=l.descr,o?.references.push(this)}else this._ref===un&&a.throwCyclicReferenceError(e,t,n);return Oe(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return pn(this._ref)?this._ref:void 0}};return s}buildMultiReference(e,t,r,n){const a=this,s={$refNode:r,$refText:n,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(this._items===void 0){this._items=un;const o=Fa(e).$document,l=a.getCandidates({reference:s,container:e,property:t}),u=[];if(pn(l))this._linkingError=l;else for(const c of l){const f=a.loadAstNode(c);f&&u.push({ref:f,$nodeDescription:c})}this._items=u,o?.references.push(this)}else this._items===un&&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 this._linkingError=a.createLinkingError({reference:s,container:e,property:t})}};return s}throwCyclicReferenceError(e,t,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${r}')`)}getLinkedNode(e){try{const t=this.getCandidate(e);if(pn(t))return{error:t};const r=this.loadAstNode(t);return r?{node:r,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);const 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;const t=this.langiumDocuments().getDocument(e.documentUri);if(t)return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){const r=Fa(e.container).$document;r&&r.state<J.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${r.uri}).`);const n=this.reflection.getReferenceType(e);return{info:e,message:`Could not resolve reference to ${n} named '${e.reference.$refText}'.`,targetDescription:t}}};function Wm(e){return typeof e.name=="string"}i(Wm,"isNamed");var rw=class{static{i(this,"DefaultNameProvider")}getName(e){if(Wm(e))return e.name}getNameNode(e){return Yl(e.$cstNode,"name")}},nw=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=Gt(e.Grammar).some(t=>Fn(t)&&t.isMulti)}findDeclarations(e){if(e){const t=Tp(e),r=e.astNode;if(t&&r){const n=r[t.feature];if(rt(n)||rr(n))return qo(n);if(Array.isArray(n)){for(const a of n)if((rt(a)||rr(a))&&a.$refNode&&a.$refNode.offset<=e.offset&&a.$refNode.end>=e.end)return qo(a)}}if(r){const n=this.nameProvider.getNameNode(r);if(n&&(n===e||Zd(e,n)))return this.getSelfNodes(r)}}return[]}getSelfNodes(e){if(this.hasMultiReference){const t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),r=this.getNodeFromReferenceDescription(t.head());if(r){for(const n of Va(r))if(rr(n.reference)&&n.reference.items.some(a=>a.ref===e))return n.reference.items.map(a=>a.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;const t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}findDeclarationNodes(e){const t=this.findDeclarations(e),r=[];for(const n of t){const a=this.nameProvider.getNameNode(n)??n.$cstNode;a&&r.push(a)}return r}findReferences(e,t){const r=[];t.includeDeclaration&&r.push(...this.getSelfReferences(e));let n=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(n=n.filter(a=>nt.equals(a.sourceUri,t.documentUri))),r.push(...n),ue(r)}getSelfReferences(e){const t=this.getSelfNodes(e),r=[];for(const n of t){const a=this.nameProvider.getNameNode(n);if(a){const s=Mt(n),o=this.nodeLocator.getAstNodePath(n);r.push({sourceUri:s.uri,sourcePath:o,targetUri:s.uri,targetPath:o,segment:Ya(a),local:!0})}}return r}},Ir=class{static{i(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(const[t,r]of e)this.add(t,r)}get size(){return Ts.sum(ue(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{const r=this.map.get(e);if(r){const n=r.indexOf(t);if(n>=0)return r.length===1?this.map.delete(e):r.splice(n,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){const t=this.map.get(e);return t?ue(t):Ua}has(e,t){if(t===void 0)return this.map.has(e);{const r=this.map.get(e);return r?r.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,r)=>t.forEach(n=>e(n,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return ue(this.map.entries()).flatMap(([e,t])=>t.map(r=>[e,r]))}keys(){return ue(this.map.keys())}values(){return ue(this.map.values()).flat()}entriesGroupedByKey(){return ue(this.map.entries())}},Nl=class{static{i(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[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){const t=this.map.get(e);return t!==void 0?(this.map.delete(e),this.inverse.delete(t),!0):!1}},aw=class{static{i(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=pe.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=Gs,n=pe.CancellationToken.None){const a=[];this.addExportedSymbol(e,a,t);for(const s of r(e))await ze(n),this.addExportedSymbol(s,a,t);return a}addExportedSymbol(e,t,r){const n=this.nameProvider.getName(e);n&&t.push(this.descriptions.createDescription(e,n,r))}async collectLocalSymbols(e,t=pe.CancellationToken.None){const r=e.parseResult.value,n=new Ir;for(const a of Nr(r))await ze(t),this.addLocalSymbol(a,e,n);return n}addLocalSymbol(e,t,r){const n=e.$container;if(n){const a=this.nameProvider.getName(e);a&&r.add(n,this.descriptions.createDescription(e,a,t))}}},Qf=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(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const 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)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.filter(n=>n.name.toLowerCase()===t):this.elements.filter(n=>n.name===e);return(this.concatOuterScope||r.isEmpty())&&this.outerScope?r.concat(this.outerScope.getElements(e)):r}},AF=class{static{i(this,"MapScope")}constructor(e,t,r){this.elements=new Map,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(const n of e){const a=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(a,n)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t),n=r?[r]:[];return(this.concatOuterScope||n.length>0)&&this.outerScope?ue(n).concat(this.outerScope.getElements(e)):ue(n)}getAllElements(){let e=ue(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},iw=class{static{i(this,"MultiMapScope")}constructor(e,t,r){this.elements=new Ir,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(const n of e){const a=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.add(a,n)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t)[0];if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);return(this.concatOuterScope||r.length===0)&&this.outerScope?ue(r).concat(this.outerScope.getElements(e)):ue(r)}getAllElements(){let e=ue(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},EF={getElement(){},getElements(){return Ua},getAllElements(){return Ua}},Gu=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 new Error("This cache has already been disposed")}},Vm=class extends Gu{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);if(t){const 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()}},Fu=class extends Gu{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();const n=this.cacheForContext(e);if(n.has(t))return n.get(t);if(r){const 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){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}},sw=class extends Fu{static{i(this,"DocumentCache")}constructor(e,t){super(r=>r.toString()),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(const a of n)this.clear(a)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{const a=r.concat(n);for(const s of a)this.clear(s)}))}},qm=class extends Vm{static{i(this,"WorkspaceCache")}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{n.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},ow=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 qm(e.shared)}getScope(e){const t=[],r=this.reflection.getReferenceType(e),n=Mt(e.container).localSymbols;if(n){let s=e.container;do 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 Qf(ue(e),t,r)}createScopeForNodes(e,t,r){const n=ue(e).map(a=>{const s=this.nameProvider.getName(a);if(s)return this.descriptions.createDescription(a,s)}).nonNullable();return new Qf(n,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new iw(this.indexManager.allElements(e)))}};function Hm(e){return typeof e.$comment=="string"}i(Hm,"isAstNodeWithComment");function ed(e){return typeof e=="object"&&!!e&&("$ref"in e||"$error"in e)}i(ed,"isIntermediateReference");var lw=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){const 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=Mt(e),JSON.stringify(e,s,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){const 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))if(rt(t)){const l=t.ref,u=r?t.$refText:void 0;if(l){const c=Mt(l);let f="";this.currentDocument&&this.currentDocument!==c&&(o?f=o(c.uri,l):f=c.uri.toString());const 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(rr(t)){const l=r?t.$refText:void 0,u=[];for(const c of t.items){const f=c.ref,d=Mt(c.ref);let m="";this.currentDocument&&this.currentDocument!==d&&(o?m=o(d.uri,f):m=d.uri.toString());const g=this.astNodeLocator.getAstNodePath(f);u.push(`${m}#${g}`)}return{$refs:u,$refText:l}}else if(Oe(t)){let l;if(a&&(l=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&l?.$textRegion&&(l.$textRegion.documentURI=this.currentDocument?.uri.toString())),n&&!e&&(l??(l={...t}),l.$sourceText=t.$cstNode?.text),s){l??(l={...t});const u=this.commentProvider.getComment(t);u&&(l.$comment=u.replace(/\r/g,""))}return l??t}else return t}addAstNodeRegionWithAssignmentsTo(e){const t=i(r=>({offset:r.offset,end:r.end,length:r.length,range:r.range}),"createDocumentSegment");if(e.$cstNode){const r=e.$textRegion=t(e.$cstNode),n=r.assignments={};return Object.keys(e).filter(a=>!a.startsWith("$")).forEach(a=>{const s=gp(e.$cstNode,a).map(t);s.length!==0&&(n[a]=s)}),e}}linkNode(e,t,r,n,a,s){for(const[l,u]of Object.entries(e))if(Array.isArray(u))for(let c=0;c<u.length;c++){const f=u[c];ed(f)?u[c]=this.reviveReference(e,l,t,f,r):Oe(f)&&this.linkNode(f,t,r,e,l,c)}else ed(u)?e[l]=this.reviveReference(e,l,t,u,r):Oe(u)&&this.linkNode(u,t,r,e,l);const o=e;o.$container=n,o.$containerProperty=a,o.$containerIndex=s}reviveReference(e,t,r,n,a){let s=n.$refText,o=n.$error,l;if(n.$ref){const u=this.getRefNode(r,n.$ref,a.uriConverter);if(Oe(u))return s||(s=this.nameProvider.getName(u)),{$refText:s??"",ref:u};o=u}else if(n.$refs){const u=[];for(const c of n.$refs){const f=this.getRefNode(r,c,a.uriConverter);Oe(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}getRefNode(e,t,r){try{const n=t.indexOf("#");if(n===0){const l=this.astNodeLocator.getAstNode(e,t.substring(1));return l||"Could not resolve path: "+t}if(n<0){const l=r?r(t):Tt.parse(t),u=this.langiumDocuments.getDocument(l);return u?u.parseResult.value:"Could not find document for URI: "+t}const a=r?r(t.substring(0,n)):Tt.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;const o=this.astNodeLocator.getAstNode(s.parseResult.value,t.substring(n+1));return o||"Could not resolve URI: "+t}catch(n){return String(n)}}},uw=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){const t=e.LanguageMetaData;for(const r of t.fileExtensions)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(const r of t.fileNames)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 new Error("The service registry is empty. Use `register` to register the services of a language.");const t=this.textDocuments?.get(e)?.languageId;if(t!==void 0){const s=this.languageIdMap.get(t);if(s)return s}const r=nt.extname(e),n=nt.basename(e),a=this.fileNameMap.get(n)??this.fileExtensionMap.get(r);if(!a)throw t?new Error(`The service registry contains no services for the extension '${r}' for language '${t}'.`):new 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 Sn(e){return{code:e}}i(Sn,"diagnosticData");var Pl;(function(e){e.defaults=["fast","slow","built-in"],e.all=e.defaults})(Pl||(Pl={}));var cw=class{static{i(this,"ValidationRegistry")}constructor(e){this.entries=new Ir,this.knownCategories=new Set(Pl.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,r="fast"){if(r==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(r);for(const[n,a]of Object.entries(e)){const s=a;if(Array.isArray(s))for(const o of s){const l={check:this.wrapValidationException(o,t),category:r};this.addEntry(n,l)}else if(typeof s=="function"){const o={check:this.wrapValidationException(s,t),category:r};this.addEntry(n,o)}else qr()}}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(ta(a))throw a;console.error(`${t}:`,a),a instanceof Error&&a.stack&&console.error(a.stack);const 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(const r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=ue(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(n=>t.includes(n.category))),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}},fw=Object.freeze({validateNode:!0,validateChildren:!0}),dw=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=pe.CancellationToken.None){const n=e.parseResult,a=[];if(await ze(r),(!t.categories||t.categories.includes("built-in"))&&(this.processLexingErrors(n,a,t),t.stopAfterLexingErrors&&a.some(s=>s.data?.code===bt.LexingError)||(this.processParsingErrors(n,a,t),t.stopAfterParsingErrors&&a.some(s=>s.data?.code===bt.ParsingError))||(this.processLinkingErrors(e,a,t),t.stopAfterLinkingErrors&&a.some(s=>s.data?.code===bt.LinkingError))))return a;try{a.push(...await this.validateAst(n.value,t,r))}catch(s){if(ta(s))throw s;console.error("An error occurred during validation:",s)}return await ze(r),a}processLexingErrors(e,t,r){const n=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(const a of n){const s=a.severity??"error",o={severity:gs(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:Xm(s),source:this.getSource()};t.push(o)}}processParsingErrors(e,t,r){for(const n of e.parserErrors){let a;if(isNaN(n.token.startOffset)){if("previousToken"in n){const s=n.previousToken;if(isNaN(s.startOffset)){const o={line:0,character:0};a={start:o,end:o}}else{const o={line:s.endLine-1,character:s.endColumn};a={start:o,end:o}}}}else a=$s(n.token);if(a){const s={severity:gs("error"),range:a,message:n.message,data:Sn(bt.ParsingError),source:this.getSource()};t.push(s)}}}processLinkingErrors(e,t,r){for(const n of e.references){const a=n.error;if(a){const s={node:a.info.container,range:n.$refNode?.range,property:a.info.property,index:a.info.index,data:{code:bt.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=pe.CancellationToken.None){const 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=pe.CancellationToken.None){const a=this.validationRegistry.checksBefore;for(const s of a)await ze(n),await s(e,r,t.categories??[],n)}async validateAstNodes(e,t,r,n=pe.CancellationToken.None){if(this.profiler?.isActive("validating")){const a=this.profiler.createTask("validating",this.languageId);a.start();try{const s=Gt(e).iterator();for(const o of s){a.startSubTask(o.$type);const l=this.validateSingleNodeOptions(o,t);if(l.validateNode)try{const u=this.validationRegistry.getChecks(o.$type,t.categories);for(const c of u)await c(o,r,n)}finally{a.stopSubTask(o.$type)}l.validateChildren||s.prune()}}finally{a.stop()}}else{const a=Gt(e).iterator();for(const s of a){await ze(n);const o=this.validateSingleNodeOptions(s,t);if(o.validateNode){const l=this.validationRegistry.getChecks(s.$type,t.categories);for(const u of l)await u(s,r,n)}o.validateChildren||a.prune()}}}validateSingleNodeOptions(e,t){return fw}async validateAstAfter(e,t,r,n=pe.CancellationToken.None){const a=this.validationRegistry.checksAfter;for(const s of a)await ze(n),await s(e,r,t.categories??[],n)}toDiagnostic(e,t,r){return{message:t,range:Ym(r),severity:gs(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 Ym(e){if(e.range)return e.range;let t;return typeof e.property=="string"?t=Yl(e.node.$cstNode,e.property,e.index):typeof e.keyword=="string"&&(t=vp(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}i(Ym,"getDiagnosticRange");function gs(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}i(gs,"toDiagnosticSeverity");function Xm(e){switch(e){case"error":return Sn(bt.LexingError);case"warning":return Sn(bt.LexingWarning);case"info":return Sn(bt.LexingInfo);case"hint":return Sn(bt.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}i(Xm,"toDiagnosticData");var bt;(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"})(bt||(bt={}));var pw=class{static{i(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){const n=r??Mt(e);t??(t=this.nameProvider.getName(e));const a=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${a} has no name.`);let s;const o=i(()=>s??(s=Ya(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return o()},selectionSegment:Ya(e.$cstNode),type:e.$type,documentUri:n.uri,path:a}}},mw=class{static{i(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=pe.CancellationToken.None){const r=[],n=e.parseResult.value;for(const a of Gt(n))await ze(t),Va(a).forEach(s=>{s.reference.error||r.push(...this.createInfoDescriptions(s))});return r}createInfoDescriptions(e){const t=e.reference;if(t.error||!t.$refNode)return[];let r=[];rt(t)&&t.$nodeDescription?r=[t.$nodeDescription]:rr(t)&&(r=t.items.map(l=>l.$nodeDescription).filter(l=>l!==void 0));const n=Mt(e.container).uri,a=this.nodeLocator.getAstNodePath(e.container),s=[],o=Ya(t.$refNode);for(const l of r)s.push({sourceUri:n,sourcePath:a,targetUri:l.documentUri,targetPath:l.path,segment:o,local:nt.equals(l.documentUri,n)});return s}},hw=class{static{i(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return t+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return t!==void 0?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((n,a)=>{if(!n||a.length===0)return n;const s=a.indexOf(this.indexSeparator);if(s>0){const o=a.substring(0,s),l=parseInt(a.substring(s+1));return n[o]?.[l]}return n[a]},e)}},zu={};Ll(zu,Cd(ei()));var yw=class{static{i(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new wr,this.onConfigurationSectionUpdateEmitter=new zu.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){const t=this.serviceRegistry.all;e.register({section:t.map(r=>this.toSectionName(r.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const 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){typeof e.settings!="object"||e.settings===null||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;const r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},uo=Cd(nN()),Nn;(function(e){function t(r){return{dispose:i(async()=>await r(),"dispose")}}i(t,"create"),e.create=t})(Nn||(Nn={}));var gw=class{static{i(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Ir,this.documentPhaseListeners=new Ir,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=J.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=pe.CancellationToken.None){for(const n of e){const a=n.uri.toString();if(n.state===J.Validated){if(typeof t.validation=="boolean"&&t.validation)this.resetToState(n,J.IndexedReferences);else if(typeof t.validation=="object"){const s=this.findMissingValidationCategories(n,t);s.length>0&&(this.buildState.set(a,{completed:!1,options:{validation:{categories:s}},result:this.buildState.get(a)?.result}),n.state=J.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=J.Changed,await this.emitUpdate(e.map(n=>n.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=pe.CancellationToken.None){this.currentState=J.Changed;const n=[];for(const l of t){const u=this.langiumDocuments.deleteDocuments(l);for(const c of u)n.push(c.uri),this.cleanUpDeleted(c)}const a=(await Promise.all(e.map(l=>this.findChangedUris(l)))).flat();for(const l of a){let u=this.langiumDocuments.getDocument(l);u===void 0&&(u=this.langiumDocumentFactory.fromModel({$type:"INVALID"},l),u.state=J.Changed,this.langiumDocuments.addDocument(u)),this.resetToState(u,J.Changed)}const s=ue(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,J.ComputedScopes)),await this.emitUpdate(a,n),await ze(r);const o=this.sortDocuments(this.langiumDocuments.all.filter(l=>l.state<J.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){const 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 ue(s).filter(o=>!a.has(o)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{const r=await this.fileSystemProvider.stat(e);if(r.isDirectory)return await this.workspaceManager().searchFolder(e);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;for(;t<r;){for(;t<e.length&&this.hasTextDocument(e[t]);)t++;for(;r>=0&&!this.hasTextDocument(e[r]);)r--;t<r&&([e[t],e[r]]=[e[r],e[t]])}return e}hasTextDocument(e){return!!this.textDocuments?.get(e.uri)}shouldRelink(e,t){return e.references.some(r=>r.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),Nn.create(()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case J.Changed:case J.Parsed:this.indexManager.removeContent(e.uri);case J.IndexedContent:e.localSymbols=void 0;case J.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case J.Linked:this.indexManager.removeReferences(e.uri);case J.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case J.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=J.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,J.Parsed,r,s=>this.langiumDocumentFactory.update(s,r)),await this.runCancelable(e,J.IndexedContent,r,s=>this.indexManager.updateContent(s,r)),await this.runCancelable(e,J.ComputedScopes,r,async s=>{const o=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.localSymbols=await o.collectLocalSymbols(s,r)});const n=e.filter(s=>this.shouldLink(s));await this.runCancelable(n,J.Linked,r,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,r)),await this.runCancelable(n,J.IndexedReferences,r,s=>this.indexManager.updateReferences(s,r));const a=e.filter(s=>this.shouldValidate(s)?!0:(this.markAsCompleted(s),!1));await this.runCancelable(a,J.Validated,r,async s=>{await this.validate(s,r),this.markAsCompleted(s)})}markAsCompleted(e){const t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(const r of e){const n=r.uri.toString(),a=this.buildState.get(n);(!a||a.completed)&&this.buildState.set(n,{completed:!1,options:t,result:a?.result})}}async runCancelable(e,t,r,n){for(const s of e)s.state<t&&(await ze(r),await n(s),s.state=t,await this.notifyDocumentPhase(s,t,r));const 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),Nn.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),Nn.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let n;return t&&"path"in t?n=t:r=t,r??(r=pe.CancellationToken.None),n?this.awaitDocumentState(e,n,r):this.awaitBuilderState(e,r)}awaitDocumentState(e,t,r){const n=this.langiumDocuments.getDocument(t);if(n){if(n.state>=e)return Promise.resolve(t);if(r.isCancellationRequested)return Promise.reject(tr);if(this.currentState>=e&&e>n.state)return Promise.reject(new uo.ResponseError(uo.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${J[n.state]}, requiring ${J[e]}, but workspace state is already ${J[this.currentState]}. Returning undefined.`))}else return Promise.reject(new uo.ResponseError(uo.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`));return new Promise((a,s)=>{const o=this.onDocumentPhase(e,u=>{nt.equals(u.uri,t)&&(o.dispose(),l.dispose(),a(u.uri))}),l=r.onCancellationRequested(()=>{o.dispose(),l.dispose(),s(tr)})})}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(tr):new Promise((r,n)=>{const a=this.onBuildPhase(e,()=>{a.dispose(),s.dispose(),r()}),s=t.onCancellationRequested(()=>{a.dispose(),s.dispose(),n(tr)})})}async notifyDocumentPhase(e,t,r){const a=this.documentPhaseListeners.get(t).slice();for(const s of a)try{await ze(r),await s(e,r)}catch(o){if(!ta(o))throw o}}async notifyBuildPhase(e,t,r){if(e.length===0)return;const a=this.buildPhaseListeners.get(t).slice();for(const s of a)await ze(r),await s(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){const 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);const s=await r.validateDocument(e,a,t);e.diagnostics?e.diagnostics.push(...s):e.diagnostics=s;const o=this.buildState.get(e.uri.toString());o&&(o.result??(o.result={}),o.result.validationChecks?o.result.validationChecks=ue(o.result.validationChecks).concat(a.categories).distinct().toArray():o.result.validationChecks=[...a.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},vw=class{static{i(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new Fu,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const r=Mt(e).uri,n=[];return this.referenceIndex.forEach(a=>{a.forEach(s=>{nt.equals(s.targetUri,r)&&s.targetPath===t&&n.push(s)})}),ue(n)}allElements(e,t){let r=ue(this.symbolIndex.keys());return t&&(r=r.filter(n=>!t||t.has(n))),r.map(n=>this.getFileDescriptions(n,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(a=>this.astReflection.isSubtype(a.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){const t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=pe.CancellationToken.None){const 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=pe.CancellationToken.None){const n=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){const r=this.referenceIndex.get(e.uri.toString());return r?r.some(n=>!n.local&&t.has(n.targetUri.toString())):!1}},Tw=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=pe.CancellationToken.None){const r=await this.performStartup(e);await ze(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){const t=[],r=i(s=>{t.push(s),this.langiumDocuments.hasDocument(s.uri)||this.langiumDocuments.addDocument(s)},"collector");await this.loadAdditionalDocuments(e,r);const n=[];await Promise.all(e.map(s=>this.getRootFolder(s)).map(async s=>this.traverseFolder(s,n)));const a=ue(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=>{const n=await this.langiumDocuments.getOrCreateDocument(r);t(n)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Tt.parse(e.uri)}async traverseFolder(e,t){try{const r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async n=>{this.shouldIncludeEntry(n)&&(n.isDirectory?await this.traverseFolder(n.uri,t):n.isFile&&t.push(n.uri))}))}catch(r){console.error("Failure to read directory content of "+e.toString(!0),r)}}async searchFolder(e){const t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){const t=nt.basename(e.uri);return t.startsWith(".")?!1:e.isDirectory?t!=="node_modules"&&t!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},$w=class{static{i(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,n,a){return Of.buildUnexpectedCharactersMessage(e,t,r,n,a)}buildUnableToPopLexerModeMessage(e){return Of.buildUnableToPopLexerModeMessage(e)}},Jm={mode:"full"},Zm=class{static{i(this,"DefaultLexer")}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const r=kl(t)?Object.values(t):t,n=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new at(r,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=Jm){const r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(kl(e))return e;const t=Bu(e)?Object.values(e.modes).flat():e,r={};return t.forEach(n=>r[n.name]=n),r}};function ju(e){return Array.isArray(e)&&(e.length===0||"name"in e[0])}i(ju,"isTokenTypeArray");function Bu(e){return e&&"modes"in e&&"defaultMode"in e}i(Bu,"isIMultiModeLexerDefinition");function kl(e){return!ju(e)&&!Bu(e)}i(kl,"isTokenTypeDictionary");xs();function Qm(e,t,r){let n,a;typeof e=="string"?(a=t,n=r):(a=e.range.start,n=t),a||(a=ie.create(0,0));const s=th(e),o=Uu(n),l=Rw({lines:s,position:a,options:o});return Cw({index:0,tokens:l,position:a})}i(Qm,"parseJSDoc");function eh(e,t){const r=Uu(t),n=th(e);if(n.length===0)return!1;const a=n[0],s=n[n.length-1],o=r.start,l=r.end;return!!o?.exec(a)&&!!l?.exec(s)}i(eh,"isJSDoc");function th(e){let t="";return typeof e=="string"?t=e:t=e.text,t.split(Ev)}i(th,"getLines");var Py=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,CF=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Rw(e){const t=[];let r=e.position.line,n=e.position.character;for(let a=0;a<e.lines.length;a++){const s=a===0,o=a===e.lines.length-1;let l=e.lines[a],u=0;if(s&&e.options.start){const f=e.options.start?.exec(l);f&&(u=f.index+f[0].length)}else{const f=e.options.line?.exec(l);f&&(u=f.index+f[0].length)}if(o){const f=e.options.end?.exec(l);f&&(l=l.substring(0,f.index))}if(l=l.substring(0,Ew(l)),Ol(l,u)>=l.length){if(t.length>0){const f=ie.create(r,n);t.push({type:"break",content:"",range:Q.create(f,f)})}}else{Py.lastIndex=u;const f=Py.exec(l);if(f){const d=f[0],m=f[1],g=ie.create(r,n+u),v=ie.create(r,n+u+d.length);t.push({type:"tag",content:m,range:Q.create(g,v)}),u+=d.length,u=Ol(l,u)}if(u<l.length){const d=l.substring(u),m=Array.from(d.matchAll(CF));t.push(...Aw(m,d,r,n+u))}}r++,n=0}return t.length>0&&t[t.length-1].type==="break"?t.slice(0,-1):t}i(Rw,"tokenize");function Aw(e,t,r,n){const a=[];if(e.length===0){const s=ie.create(r,n),o=ie.create(r,n+t.length);a.push({type:"text",content:t,range:Q.create(s,o)})}else{let s=0;for(const l of e){const u=l.index,c=t.substring(s,u);c.length>0&&a.push({type:"text",content:t.substring(s,u),range:Q.create(ie.create(r,s+n),ie.create(r,u+n))});let f=c.length+1;const d=l[1];if(a.push({type:"inline-tag",content:d,range:Q.create(ie.create(r,s+f+n),ie.create(r,s+f+d.length+n))}),f+=d.length,l.length===4){f+=l[2].length;const m=l[3];a.push({type:"text",content:m,range:Q.create(ie.create(r,s+f+n),ie.create(r,s+f+m.length+n))})}else a.push({type:"text",content:"",range:Q.create(ie.create(r,s+f+n),ie.create(r,s+f+n))});s=u+l[0].length}const o=t.substring(s);o.length>0&&a.push({type:"text",content:o,range:Q.create(ie.create(r,s+n),ie.create(r,s+n+o.length))})}return a}i(Aw,"buildInlineTokens");var _F=/\S/,bF=/\s*$/;function Ol(e,t){const r=e.substring(t).match(_F);return r?t+r.index:e.length}i(Ol,"skipWhitespace");function Ew(e){const t=e.match(bF);if(t&&typeof t.index=="number")return t.index}i(Ew,"lastCharacter");function Cw(e){const t=ie.create(e.position.line,e.position.character);if(e.tokens.length===0)return new ky([],Q.create(t,t));const r=[];for(;e.index<e.tokens.length;){const s=_w(e,r[r.length-1]);s&&r.push(s)}const n=r[0]?.range.start??t,a=r[r.length-1]?.range.end??t;return new ky(r,Q.create(n,a))}i(Cw,"parseJSDocComment");function _w(e,t){const r=e.tokens[e.index];if(r.type==="tag")return nh(e,!1);if(r.type==="text"||r.type==="inline-tag")return rh(e);bw(r,t),e.index++}i(_w,"parseJSDocElement");function bw(e,t){if(t){const r=new Nw("",e.range);"inlines"in t?t.inlines.push(r):t.content.inlines.push(r)}}i(bw,"appendEmptyLine");function rh(e){let t=e.tokens[e.index];const r=t;let n=t;const a=[];for(;t&&t.type!=="break"&&t.type!=="tag";)a.push(Sw(e)),n=t,t=e.tokens[e.index];return new td(a,Q.create(r.range.start,n.range.end))}i(rh,"parseJSDocText");function Sw(e){return e.tokens[e.index].type==="inline-tag"?nh(e,!0):ah(e)}i(Sw,"parseJSDocInline");function nh(e,t){const r=e.tokens[e.index++],n=r.content.substring(1);if(e.tokens[e.index]?.type==="text")if(t){const s=ah(e);return new Qu(n,new td([s],s.range),t,Q.create(r.range.start,s.range.end))}else{const s=rh(e);return new Qu(n,s,t,Q.create(r.range.start,s.range.end))}else{const s=r.range;return new Qu(n,new td([],s),t,s)}}i(nh,"parseJSDocTag");function ah(e){const t=e.tokens[e.index++];return new Nw(t.content,t.range)}i(ah,"parseJSDocLine");function Uu(e){if(!e)return Uu({start:"/**",end:"*/",line:"*"});const{start:t,end:r,line:n}=e;return{start:Uo(t,!0),end:Uo(r,!1),line:Uo(n,!0)}}i(Uu,"normalizeOptions");function Uo(e,t){if(typeof e=="string"||typeof e=="object"){const r=typeof e=="string"?ri(e):e.source;return t?new RegExp(`^\\s*${r}`):new RegExp(`\\s*${r}\\s*$`)}else return e}i(Uo,"normalizeOption");var ky=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(const t of this.elements)if(e.length===0)e=t.toString();else{const r=t.toString();e+=rd(e)+r}return e.trim()}toMarkdown(e){let t="";for(const r of this.elements)if(t.length===0)t=r.toMarkdown(e);else{const n=r.toMarkdown(e);t+=rd(t)+n}return t.trim()}},Qu=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}`;const t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}
|
|
152
|
+
${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const a=ww(this.name,t,e??{});if(typeof a=="string")return a}let r="";e?.tag==="italic"||e?.tag===void 0?r="*":e?.tag==="bold"?r="**":e?.tag==="bold-italic"&&(r="***");let n=`${r}@${this.name}${r}`;return this.content.inlines.length===1?n=`${n} — ${t}`:this.content.inlines.length>1&&(n=`${n}
|
|
153
|
+
${t}`),this.inline?`{${n}}`:n}};function ww(e,t,r){if(e==="linkplain"||e==="linkcode"||e==="link"){const n=t.indexOf(" ");let a=t;if(n>0){const o=Ol(t,n);a=t.substring(o),t=t.substring(0,n)}return(e==="linkcode"||e==="link"&&r.link==="code")&&(a=`\`${a}\``),r.renderLink?.(t,a)??Iw(t,a)}}i(ww,"renderInlineTag");function Iw(e,t){try{return Tt.parse(e,!0),`[${t}](${e})`}catch{return e}}i(Iw,"renderLinkDefault");var td=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++){const r=this.inlines[t],n=this.inlines[t+1];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++){const n=this.inlines[r],a=this.inlines[r+1];t+=n.toMarkdown(e),a&&a.range.start.line>n.range.start.line&&(t+=`
|
|
155
|
+
`)}return t}},Nw=class{static{i(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};function rd(e){return e.endsWith(`
|
|
156
|
+
`)?`
|
|
157
|
+
`:`
|
|
158
|
+
|
|
159
|
+
`}i(rd,"fillNewlines");var Pw=class{static{i(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&eh(t))return Qm(t).toMarkdown({renderLink:i((n,a)=>this.documentationLinkRenderer(e,n,a),"renderLink"),renderTag:i(n=>this.documentationTagRenderer(e,n),"renderTag")})}documentationLinkRenderer(e,t,r){const n=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(n&&n.nameSegment){const 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){}findNameInLocalSymbols(e,t){const n=Mt(e).localSymbols;if(!n)return;let a=e;do{const o=n.getStream(a).find(l=>l.name===t);if(o)return o;a=a.$container}while(a)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(n=>n.name===t)}},kw=class{static{i(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return Hm(e)?e.$comment:rp(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},Ow=class{static{i(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},SF=class{static{i(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){const e=this.createWorker();e.onReady(()=>{if(this.queue.length>0){const t=this.queue.shift();t&&(e.lock(),t.resolve(e))}}),this.workerPool.push(e)}}async parse(e,t){const r=await this.acquireParserWorker(t),n=new wr;let a;const s=t.onCancellationRequested(()=>{a=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(o=>{const l=this.hydrator.hydrate(o);n.resolve(l)}).catch(o=>{n.reject(o)}).finally(()=>{s.dispose(),clearTimeout(a)}),n.promise}terminateWorker(e){e.terminate();const t=this.workerPool.indexOf(e);t>=0&&this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(const r of this.workerPool)if(r.ready)return r.lock(),r;const t=new wr;return e.onCancellationRequested(()=>{const r=this.queue.indexOf(t);r>=0&&this.queue.splice(r,1),t.reject(tr)}),this.queue.push(t),t.promise}},wF=class{static{i(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,n){this.onReadyEmitter=new zu.Emitter,this.deferred=new wr,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=n,t(a=>{const s=a;this.deferred.resolve(s),this.unlock()}),r(a=>{this.deferred.reject(a),this.unlock()})}terminate(){this.deferred.reject(tr),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new wr,this.sendMessage(e),this.deferred.promise}},Lw=class{static{i(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new pe.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=Mu();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=pe.CancellationToken.None){const n=new wr,a={action:t,deferred:n,cancellationToken:r};return e.push(a),this.performNextOperation(),n.promise}async performNextOperation(){if(!this.done)return;const 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{const a=await Promise.resolve().then(()=>t(n));r.resolve(a)}catch(a){ta(a)?r.resolve(void 0):r.reject(a)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},Dw=class{static{i(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new Nl,this.tokenTypeIdMap=new Nl,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){const t=new Map,r=new Map;for(const n of Gt(e))t.set(n,{});if(e.$cstNode)for(const n of Ha(e.$cstNode))r.set(n,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[n,a]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(a)){const s=[];r[n]=s;for(const o of a)Oe(o)?s.push(this.dehydrateAstNode(o,t)):rt(o)?s.push(this.dehydrateReference(o,t)):s.push(o)}else Oe(a)?r[n]=this.dehydrateAstNode(a,t):rt(a)?r[n]=this.dehydrateReference(a,t):a!==void 0&&(r[n]=a);return r}dehydrateReference(e,t){const r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){const r=t.cstNodes.get(e);return Ml(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),$r(e)?r.content=e.content.map(n=>this.dehydrateCstNode(n,t)):xn(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),r}hydrate(e){const t=e.value,r=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,r),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){const t=new Map,r=new Map;for(const a of Gt(e))t.set(a,{});let n;if(e.$cstNode)for(const a of Ha(e.$cstNode)){let s;"fullText"in a?(s=new km(a.fullText),n=s):"content"in a?s=new ku:"tokenType"in a&&(s=this.hydrateCstLeafNode(a)),s&&(r.set(a,s),s.root=n)}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=t.cstNodes.get(e.$cstNode));for(const[n,a]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(a)){const s=[];r[n]=s;for(const o of a)Oe(o)?s.push(this.setParent(this.hydrateAstNode(o,t),r)):rt(o)?s.push(this.hydrateReference(o,r,n,t)):s.push(o)}else Oe(a)?r[n]=this.setParent(this.hydrateAstNode(a,t),r):rt(a)?r[n]=this.hydrateReference(a,r,n,t):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){const n=t.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(n.grammarSource=this.getGrammarElement(e.grammarSource)),n.astNode=t.astNodes.get(e.astNode),$r(n))for(const a of e.content){const s=this.hydrateCstNode(a,t,r++);n.content.push(s)}return n}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),r=e.offset,n=e.length,a=e.startLine,s=e.startColumn,o=e.endLine,l=e.endColumn,u=e.hidden;return new _l(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 this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(const t of Gt(this.grammar))Gl(t)&&this.grammarElementIdMap.set(t,e++)}};function je(e){return{documentation:{CommentProvider:i(t=>new kw(t),"CommentProvider"),DocumentationProvider:i(t=>new Pw(t),"DocumentationProvider")},parser:{AsyncParser:i(t=>new Ow(t),"AsyncParser"),GrammarConfig:i(t=>bp(t),"GrammarConfig"),LangiumParser:i(t=>Gm(t),"LangiumParser"),CompletionParser:i(t=>Mm(t),"CompletionParser"),ValueConverter:i(()=>new zm,"ValueConverter"),TokenBuilder:i(()=>new Du,"TokenBuilder"),Lexer:i(t=>new Zm(t),"Lexer"),ParserErrorMessageProvider:i(()=>new Lm,"ParserErrorMessageProvider"),LexerErrorMessageProvider:i(()=>new $w,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:i(()=>new hw,"AstNodeLocator"),AstNodeDescriptionProvider:i(t=>new pw(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:i(t=>new mw(t),"ReferenceDescriptionProvider")},references:{Linker:i(t=>new tw(t),"Linker"),NameProvider:i(()=>new rw,"NameProvider"),ScopeProvider:i(t=>new ow(t),"ScopeProvider"),ScopeComputation:i(t=>new aw(t),"ScopeComputation"),References:i(t=>new nw(t),"References")},serializer:{Hydrator:i(t=>new Dw(t),"Hydrator"),JsonSerializer:i(t=>new lw(t),"JsonSerializer")},validation:{DocumentValidator:i(t=>new dw(t),"DocumentValidator"),ValidationRegistry:i(t=>new cw(t),"ValidationRegistry")},shared:i(()=>e.shared,"shared")}}i(je,"createDefaultCoreModule");function Be(e){return{ServiceRegistry:i(t=>new uw(t),"ServiceRegistry"),workspace:{LangiumDocuments:i(t=>new ew(t),"LangiumDocuments"),LangiumDocumentFactory:i(t=>new QS(t),"LangiumDocumentFactory"),DocumentBuilder:i(t=>new gw(t),"DocumentBuilder"),IndexManager:i(t=>new vw(t),"IndexManager"),WorkspaceManager:i(t=>new Tw(t),"WorkspaceManager"),FileSystemProvider:i(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:i(()=>new Lw,"WorkspaceLock"),ConfigurationProvider:i(t=>new yw(t),"ConfigurationProvider")},profilers:{}}}i(Be,"createDefaultSharedCoreModule");var nd;(function(e){e.merge=(t,r)=>Qa(Qa({},t),r)})(nd||(nd={}));function ee(e,t,r,n,a,s,o,l,u){const c=[e,t,r,n,a,s,o,l,u].reduce(Qa,{});return sh(c)}i(ee,"inject");var xw=Symbol("isProxy");function ih(e){if(e&&e[xw])for(const t of Object.values(e))ih(t);return e}i(ih,"eagerLoad");function sh(e,t){const r=new Proxy({},{deleteProperty:i(()=>!1,"deleteProperty"),set:i(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:i((n,a)=>a===xw?!0:ad(n,a,e,t||r),"get"),getOwnPropertyDescriptor:i((n,a)=>(ad(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(sh,"_inject");var Oy=Symbol();function ad(e,t,r,n){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===Oy)throw new 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){const a=r[t];e[t]=Oy;try{e[t]=typeof a=="function"?a(n):sh(a,n)}catch(s){throw e[t]=s instanceof Error?s:void 0,s}return e[t]}else return}i(ad,"_resolve");function Qa(e,t){if(t){for(const[r,n]of Object.entries(t))if(n!=null)if(typeof n=="object"){const a=e[r];typeof a=="object"&&a!==null?e[r]=Qa(a,n):e[r]=Qa({},n)}else e[r]=n}return e}i(Qa,"_merge");var id={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},wn;(function(e){e.REGULAR="indentation-sensitive",e.IGNORE_INDENTATION="ignore-indentation"})(wn||(wn={}));var Mw=class extends Du{static{i(this,"IndentationAwareTokenBuilder")}constructor(e=id){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...id,...e},this.indentTokenType=ja({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=ja({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){const r=super.buildTokens(e,t);if(!ju(r))throw new Error("Invalid tokens built by default builder");const{indentTokenName:n,dedentTokenName:a,whitespaceTokenName:s,ignoreIndentationDelimiters:o}=this.options;let l,u,c;const f=[];for(const d of r){for(const[m,g]of o)d.name===m?d.PUSH_MODE=wn.IGNORE_INDENTATION:d.name===g&&(d.POP_MODE=!0);d.name===a?l=d:d.name===n?u=d:d.name===s?c=d:f.push(d)}if(!l||!u||!c)throw new Error("Some indentation/whitespace tokens not found!");return o.length>0?{modes:{[wn.REGULAR]:[l,u,...f,c],[wn.IGNORE_INDENTATION]:[...f,c]},defaultMode:wn.REGULAR}:[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;const a=this.whitespaceRegExp.exec(e);return{currIndentLevel:a?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:a}}createIndentationTokenInstance(e,t,r,n){const a=this.getLineNumber(t,n);return Qs(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;const{currIndentLevel:a,prevIndentLevel:s,match:o}=this.matchWhitespace(e,t,r,n);return a<=s?null:(this.indentationStack.push(a),o)}dedentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;const{currIndentLevel:a,prevIndentLevel:s,match:o}=this.matchWhitespace(e,t,r,n);if(a>=s)return null;const 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;const u=this.indentationStack.length-l-1,c=e.substring(0,t).match(/[\r\n]+$/)?.[0].length??1;for(let f=0;f<u;f++){const d=this.createIndentationTokenInstance(this.dedentTokenType,e,"",t-(c-1));r.push(d),this.indentationStack.pop()}return null}buildTerminalToken(e){const t=super.buildTerminalToken(e),{indentTokenName:r,dedentTokenName:n,whitespaceTokenName:a}=this.options;return t.name===r?this.indentTokenType:t.name===n?this.dedentTokenType:t.name===a?ja({name:a,pattern:this.whitespaceRegExp,group:at.SKIPPED}):t}flushRemainingDedents(e){const t=[];for(;this.indentationStack.length>1;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},IF=class extends Zm{static{i(this,"IndentationAwareLexer")}constructor(e){if(super(e),e.parser.TokenBuilder instanceof Mw)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,t=Jm){const r=super.tokenize(e),n=r.report;t?.mode==="full"&&r.tokens.push(...n.remainingDedents),n.remainingDedents=[];const{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++){const d=r.tokens[f],m=r.tokens[f+1];if(d.tokenTypeIdx===o&&m.tokenTypeIdx===l){f++;continue}u.push(d)}return c>=0&&u.push(r.tokens[c]),r.tokens=u,r}},oh={};Vr(oh,{AstUtils:()=>Nd,BiMap:()=>Nl,Cancellation:()=>pe,ContextCache:()=>Fu,CstUtils:()=>Sd,DONE_RESULT:()=>tt,Deferred:()=>wr,Disposable:()=>Nn,DisposableCache:()=>Gu,DocumentCache:()=>sw,EMPTY_STREAM:()=>Ua,ErrorWithLocation:()=>Wl,GrammarUtils:()=>sp,MultiMap:()=>Ir,OperationCancelled:()=>tr,Reduction:()=>Ts,RegExpUtils:()=>lp,SimpleCache:()=>Vm,StreamImpl:()=>er,TreeStreamImpl:()=>Ka,URI:()=>Tt,UriTrie:()=>Km,UriUtils:()=>nt,WorkspaceCache:()=>qm,assertCondition:()=>op,assertUnreachable:()=>qr,delayNextTick:()=>xu,interruptAndCheck:()=>ze,isOperationCancelled:()=>ta,loadGrammarFromJson:()=>Ue,setInterruptionPeriod:()=>jm,startCancelableOperation:()=>Mu,stream:()=>ue});Ll(oh,zu);var Gw=class{static{i(this,"EmptyFileSystemProvider")}stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},Xe={fileSystemProvider:i(()=>new Gw,"fileSystemProvider")},NF={Grammar:i(()=>{},"Grammar"),LanguageMetaData:i(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},PF={AstReflection:i(()=>new Jd,"AstReflection")};function Fw(){const e=ee(Be(Xe),PF),t=ee(je({shared:e}),NF);return e.ServiceRegistry.register(t),t}i(Fw,"createMinimalGrammarServices");function Ue(e){const t=Fw(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,Tt.parse(`memory:/${r.name??"grammar"}.langium`)),r}i(Ue,"loadGrammarFromJson");Ll(Hg,oh);var kF=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 Ir}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(t=>this.activeCategories.add(t)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(t=>this.activeCategories.delete(t)):this.activeCategories.clear()}createTask(e,t){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${t}'.`),new zw(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()}`);const r=[];for(const s of t.entries.keys()){const o=t.entries.get(s),l=o.reduce((u,c)=>u+c);r.push({name:`${t.identifier}.${s}`,count:o.length,duration:l})}const 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){return e.length===0?this.records.values():this.records.entries().filter(t=>e.some(r=>r===t[0])).flatMap(t=>t[1])}},zw=class{static{i(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new Ir,this.addRecord=e,this.identifier=t}start(){if(this.startTime!==void 0)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw new Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(t=>t.id).join(", ")}.`);const 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){const t=this.stack.pop();if(!t)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw new Error(`Sub-Task "${t.id}" is not already stopped.`);const r=performance.now()-t.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=r);const n=r-t.content;this.entries.add(e,n)}},sd;(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:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[^\[\]\r\n]+)\]/}})(sd||(sd={}));var od;(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]*/}})(od||(od={}));var ld;(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]*/}})(ld||(ld={}));var ud;(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])?/}})(ud||(ud={}));var cd;(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]*/}})(cd||(cd={}));var fd;(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]*/}})(fd||(fd={}));var dd;(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]*/}})(dd||(dd={}));var pd;(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]*/}})(pd||(pd={}));var md;(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]*/}})(md||(md={}));var hd;(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]*?\*\)/}})(hd||(hd={}));var yd;(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]*?\*\//}})(yd||(yd={}));var gd;(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]*/}})(gd||(gd={}));var vd;(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:/"[^"]*"|'[^']*'/}})(vd||(vd={}));var Td;(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])*/}})(Td||(Td={}));var $d;(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]*/}})($d||($d={}));({...sd.Terminals,...od.Terminals,...ld.Terminals,...ud.Terminals,...cd.Terminals,...fd.Terminals,...dd.Terminals,...pd.Terminals,...md.Terminals,...hd.Terminals,...yd.Terminals,...gd.Terminals,...Td.Terminals,...vd.Terminals,...$d.Terminals});var Ly={$type:"AbnfAlternation",alternatives:"alternatives"},Dy={$type:"AbnfConcatenation",elements:"elements"},ec={$type:"AbnfElement",primary:"primary",repeat:"repeat"},xy={$type:"AbnfGroup",element:"element"},My={$type:"AbnfNumVal",value:"value"},Gy={$type:"AbnfOptionalGroup",element:"element"},ca={$type:"AbnfPrimary"},tc={$type:"AbnfRule",definition:"definition",name:"name"},Fy={$type:"AbnfRuleName",name:"name"},zy={$type:"AbnfStringLiteral",value:"value"},co={$type:"Accelerator",name:"name",x:"x",y:"y"},rc={$type:"Alignment",direction:"direction",members:"members"},fo={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},xi={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},nc={$type:"Annotations",x:"x",y:"y"},Xt={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",alignments:"alignments",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};function OF(e){return Ne.isInstance(e,Xt.$type)}i(OF,"isArchitecture");var po={$type:"Axis",label:"label",name:"name"},Ko={$type:"Branch",name:"name",order:"order"};function LF(e){return Ne.isInstance(e,Ko.$type)}i(LF,"isBranch");var jy={$type:"Checkout",branch:"branch"},mo={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},ac={$type:"ClassDefStatement",className:"className",styleText:"styleText"},Aa={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};function DF(e){return Ne.isInstance(e,Aa.$type)}i(DF,"isCommit");var ho={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},Zr={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},yo={$type:"Curve",entries:"entries",label:"label",name:"name"},cn={$type:"Cynefin",accDescr:"accDescr",accTitle:"accTitle",domains:"domains",title:"title",transitions:"transitions"};function xF(e){return Ne.isInstance(e,cn.$type)}i(xF,"isCynefin");var go={$type:"Deaccelerator",name:"name",x:"x",y:"y"},By={$type:"Decorator",strategy:"strategy"},fa={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},Wo={$type:"DomainBlock",domain:"domain",items:"items"};function MF(e){return Ne.isInstance(e,Wo.$type)}i(MF,"isDomainBlock");var Rd={$type:"DomainItem",label:"label"};function GF(e){return Ne.isInstance(e,Rd.$type)}i(GF,"isDomainItem");var Uy={$type:"EbnfChoice",alternatives:"alternatives"},Ky={$type:"EbnfExceptionPostfix",except:"except"},Wy={$type:"EbnfGroup",element:"element"},Vy={$type:"EbnfNonTerminal",name:"name"},qy={$type:"EbnfOneOrMorePostfix",operator:"operator"},Hy={$type:"EbnfOptional",element:"element"},Yy={$type:"EbnfOptionalPostfix",operator:"operator"},Mi={$type:"EbnfPostfix"},Qr={$type:"EbnfPrimary"},Xy={$type:"EbnfRepetition",element:"element"},ic={$type:"EbnfRule",definition:"definition",name:"name"},Jy={$type:"EbnfSequence",elements:"elements"},Zy={$type:"EbnfSpecial",text:"text"},sc={$type:"EbnfTerm",base:"base",postfixes:"postfixes"},Qy={$type:"EbnfTerminal",value:"value"},eg={$type:"EbnfZeroOrMorePostfix",operator:"operator"},Ht={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},da={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},en={$type:"EmFrame"},Gi={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},tg={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},oc={$type:"EmModelEntity",name:"name"};function FF(e){return e==="rmo"||e==="readmodel"||e==="ui"||e==="cmd"||e==="command"||e==="evt"||e==="event"||e==="pcr"||e==="processor"}i(FF,"isEmModelEntityType");var vo={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},yr={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"};function zF(e){return Ne.isInstance(e,yr.$type)}i(zF,"isEmResetFrame");var Dr={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},lc={$type:"Entry",axis:"axis",value:"value"},dr={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},rg={$type:"Evolution",stages:"stages"},To={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},uc={$type:"Evolve",component:"component",target:"target"},fn={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};function jF(e){return Ne.isInstance(e,fn.$type)}i(jF,"isGitGraph");var Fi={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},ts={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};function BF(e){return Ne.isInstance(e,ts.$type)}i(BF,"isInfo");var zi={$type:"Item",classSelector:"classSelector",name:"name"},cc={$type:"Junction",id:"id",in:"in"},ji={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},$o={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},tn={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},Ea={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};function UF(e){return Ne.isInstance(e,Ea.$type)}i(UF,"isMerge");var Ro={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},fc={$type:"Option",name:"name",value:"value"},Ca={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};function KF(e){return Ne.isInstance(e,Ca.$type)}i(KF,"isPacket");var _a={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};function WF(e){return Ne.isInstance(e,_a.$type)}i(WF,"isPacketBlock");var ng={$type:"PegAny",dot:"dot"},ag={$type:"PegGroup",element:"element"},ig={$type:"PegIdentifier",name:"name"},sg={$type:"PegLiteral",value:"value"},og={$type:"PegOrderedChoice",alternatives:"alternatives"},dc={$type:"PegPrefix",operator:"operator",suffix:"suffix"},Bi={$type:"PegPrimary"},pc={$type:"PegRule",definition:"definition",name:"name"},lg={$type:"PegSequence",elements:"elements"},mc={$type:"PegSuffix",operator:"operator",primary:"primary"},dn={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};function VF(e){return Ne.isInstance(e,dn.$type)}i(VF,"isPie");var Vo={$type:"PieSection",label:"label",value:"value"};function qF(e){return Ne.isInstance(e,Vo.$type)}i(qF,"isPieSection");var hc={$type:"Pipeline",components:"components",parent:"parent"},Ao={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},rn={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},ba={$type:"Railroad",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};function HF(e){return Ne.isInstance(e,ba.$type)}i(HF,"isRailroad");var Sa={$type:"RailroadAbnf",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};function YF(e){return Ne.isInstance(e,Sa.$type)}i(YF,"isRailroadAbnf");var ug={$type:"RailroadChoiceExpr",alternatives:"alternatives"},wa={$type:"RailroadEbnf",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};function XF(e){return Ne.isInstance(e,wa.$type)}i(XF,"isRailroadEbnf");var pr={$type:"RailroadExpression"},cg={$type:"RailroadNonTerminalExpr",name:"name"},fg={$type:"RailroadOneOrMoreExpr",element:"element"},dg={$type:"RailroadOptionalExpr",element:"element"},Ia={$type:"RailroadPeg",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};function JF(e){return Ne.isInstance(e,Ia.$type)}i(JF,"isRailroadPeg");var yc={$type:"RailroadRule",definition:"definition",name:"name"},pg={$type:"RailroadSequenceExpr",elements:"elements"},mg={$type:"RailroadSpecialExpr",text:"text"},hg={$type:"RailroadTerminalExpr",value:"value"},yg={$type:"RailroadZeroOrMoreExpr",element:"element"},gc={$type:"Section",classSelector:"classSelector",name:"name"},pa={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},vc={$type:"Size",height:"height",width:"width"},ma={$type:"Statement"},rs={$type:"Transition",from:"from",label:"label",to:"to"};function ZF(e){return Ne.isInstance(e,rs.$type)}i(ZF,"isTransition");var Na={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};function QF(e){return Ne.isInstance(e,Na.$type)}i(QF,"isTreemap");var Tc={$type:"TreemapRow",indent:"indent",item:"item"},ha={$type:"TreeNode",classAnnotation:"classAnnotation",descAnnotation:"descAnnotation",iconAnnotation:"iconAnnotation",indent:"indent",name:"name"},Ui={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},We={$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 ez(e){return Ne.isInstance(e,We.$type)}i(ez,"isWardley");var jw=class extends Id{constructor(){super(...arguments),this.types={AbnfAlternation:{name:Ly.$type,properties:{alternatives:{name:Ly.alternatives,defaultValue:[]}},superTypes:[]},AbnfConcatenation:{name:Dy.$type,properties:{elements:{name:Dy.elements,defaultValue:[]}},superTypes:[]},AbnfElement:{name:ec.$type,properties:{primary:{name:ec.primary},repeat:{name:ec.repeat}},superTypes:[]},AbnfGroup:{name:xy.$type,properties:{element:{name:xy.element}},superTypes:[ca.$type]},AbnfNumVal:{name:My.$type,properties:{value:{name:My.value}},superTypes:[ca.$type]},AbnfOptionalGroup:{name:Gy.$type,properties:{element:{name:Gy.element}},superTypes:[ca.$type]},AbnfPrimary:{name:ca.$type,properties:{},superTypes:[]},AbnfRule:{name:tc.$type,properties:{definition:{name:tc.definition},name:{name:tc.name}},superTypes:[]},AbnfRuleName:{name:Fy.$type,properties:{name:{name:Fy.name}},superTypes:[ca.$type]},AbnfStringLiteral:{name:zy.$type,properties:{value:{name:zy.value}},superTypes:[ca.$type]},Accelerator:{name:co.$type,properties:{name:{name:co.name},x:{name:co.x},y:{name:co.y}},superTypes:[]},Alignment:{name:rc.$type,properties:{direction:{name:rc.direction},members:{name:rc.members,defaultValue:[]}},superTypes:[]},Anchor:{name:fo.$type,properties:{evolution:{name:fo.evolution},name:{name:fo.name},visibility:{name:fo.visibility}},superTypes:[]},Annotation:{name:xi.$type,properties:{number:{name:xi.number},text:{name:xi.text},x:{name:xi.x},y:{name:xi.y}},superTypes:[]},Annotations:{name:nc.$type,properties:{x:{name:nc.x},y:{name:nc.y}},superTypes:[]},Architecture:{name:Xt.$type,properties:{accDescr:{name:Xt.accDescr},accTitle:{name:Xt.accTitle},alignments:{name:Xt.alignments,defaultValue:[]},edges:{name:Xt.edges,defaultValue:[]},groups:{name:Xt.groups,defaultValue:[]},junctions:{name:Xt.junctions,defaultValue:[]},services:{name:Xt.services,defaultValue:[]},title:{name:Xt.title}},superTypes:[]},Axis:{name:po.$type,properties:{label:{name:po.label},name:{name:po.name}},superTypes:[]},Branch:{name:Ko.$type,properties:{name:{name:Ko.name},order:{name:Ko.order}},superTypes:[ma.$type]},Checkout:{name:jy.$type,properties:{branch:{name:jy.branch}},superTypes:[ma.$type]},CherryPicking:{name:mo.$type,properties:{id:{name:mo.id},parent:{name:mo.parent},tags:{name:mo.tags,defaultValue:[]}},superTypes:[ma.$type]},ClassDefStatement:{name:ac.$type,properties:{className:{name:ac.className},styleText:{name:ac.styleText}},superTypes:[]},Commit:{name:Aa.$type,properties:{id:{name:Aa.id},message:{name:Aa.message},tags:{name:Aa.tags,defaultValue:[]},type:{name:Aa.type}},superTypes:[ma.$type]},Common:{name:ho.$type,properties:{accDescr:{name:ho.accDescr},accTitle:{name:ho.accTitle},title:{name:ho.title}},superTypes:[]},Component:{name:Zr.$type,properties:{decorator:{name:Zr.decorator},evolution:{name:Zr.evolution},inertia:{name:Zr.inertia,defaultValue:!1},label:{name:Zr.label},name:{name:Zr.name},visibility:{name:Zr.visibility}},superTypes:[]},Curve:{name:yo.$type,properties:{entries:{name:yo.entries,defaultValue:[]},label:{name:yo.label},name:{name:yo.name}},superTypes:[]},Cynefin:{name:cn.$type,properties:{accDescr:{name:cn.accDescr},accTitle:{name:cn.accTitle},domains:{name:cn.domains,defaultValue:[]},title:{name:cn.title},transitions:{name:cn.transitions,defaultValue:[]}},superTypes:[]},Deaccelerator:{name:go.$type,properties:{name:{name:go.name},x:{name:go.x},y:{name:go.y}},superTypes:[]},Decorator:{name:By.$type,properties:{strategy:{name:By.strategy}},superTypes:[]},Direction:{name:fa.$type,properties:{accDescr:{name:fa.accDescr},accTitle:{name:fa.accTitle},dir:{name:fa.dir},statements:{name:fa.statements,defaultValue:[]},title:{name:fa.title}},superTypes:[fn.$type]},DomainBlock:{name:Wo.$type,properties:{domain:{name:Wo.domain},items:{name:Wo.items,defaultValue:[]}},superTypes:[]},DomainItem:{name:Rd.$type,properties:{label:{name:Rd.label}},superTypes:[]},EbnfChoice:{name:Uy.$type,properties:{alternatives:{name:Uy.alternatives,defaultValue:[]}},superTypes:[]},EbnfExceptionPostfix:{name:Ky.$type,properties:{except:{name:Ky.except}},superTypes:[Mi.$type]},EbnfGroup:{name:Wy.$type,properties:{element:{name:Wy.element}},superTypes:[Qr.$type]},EbnfNonTerminal:{name:Vy.$type,properties:{name:{name:Vy.name}},superTypes:[Qr.$type]},EbnfOneOrMorePostfix:{name:qy.$type,properties:{operator:{name:qy.operator}},superTypes:[Mi.$type]},EbnfOptional:{name:Hy.$type,properties:{element:{name:Hy.element}},superTypes:[Qr.$type]},EbnfOptionalPostfix:{name:Yy.$type,properties:{operator:{name:Yy.operator}},superTypes:[Mi.$type]},EbnfPostfix:{name:Mi.$type,properties:{},superTypes:[]},EbnfPrimary:{name:Qr.$type,properties:{},superTypes:[]},EbnfRepetition:{name:Xy.$type,properties:{element:{name:Xy.element}},superTypes:[Qr.$type]},EbnfRule:{name:ic.$type,properties:{definition:{name:ic.definition},name:{name:ic.name}},superTypes:[]},EbnfSequence:{name:Jy.$type,properties:{elements:{name:Jy.elements,defaultValue:[]}},superTypes:[]},EbnfSpecial:{name:Zy.$type,properties:{text:{name:Zy.text}},superTypes:[Qr.$type]},EbnfTerm:{name:sc.$type,properties:{base:{name:sc.base},postfixes:{name:sc.postfixes,defaultValue:[]}},superTypes:[]},EbnfTerminal:{name:Qy.$type,properties:{value:{name:Qy.value}},superTypes:[Qr.$type]},EbnfZeroOrMorePostfix:{name:eg.$type,properties:{operator:{name:eg.operator}},superTypes:[Mi.$type]},Edge:{name:Ht.$type,properties:{lhsDir:{name:Ht.lhsDir},lhsGroup:{name:Ht.lhsGroup,defaultValue:!1},lhsId:{name:Ht.lhsId},lhsInto:{name:Ht.lhsInto,defaultValue:!1},rhsDir:{name:Ht.rhsDir},rhsGroup:{name:Ht.rhsGroup,defaultValue:!1},rhsId:{name:Ht.rhsId},rhsInto:{name:Ht.rhsInto,defaultValue:!1},title:{name:Ht.title}},superTypes:[]},EmDataEntity:{name:da.$type,properties:{dataBlockValue:{name:da.dataBlockValue},dataType:{name:da.dataType},name:{name:da.name}},superTypes:[]},EmFrame:{name:en.$type,properties:{},superTypes:[]},EmGwt:{name:Gi.$type,properties:{givenStatements:{name:Gi.givenStatements,defaultValue:[]},sourceFrame:{name:Gi.sourceFrame,referenceType:en.$type},thenStatements:{name:Gi.thenStatements,defaultValue:[]},whenStatements:{name:Gi.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:tg.$type,properties:{entityIdentifier:{name:tg.entityIdentifier,referenceType:oc.$type}},superTypes:[]},EmModelEntity:{name:oc.$type,properties:{name:{name:oc.name}},superTypes:[]},EmNoteEntity:{name:vo.$type,properties:{dataBlockValue:{name:vo.dataBlockValue},dataType:{name:vo.dataType},sourceFrame:{name:vo.sourceFrame,referenceType:en.$type}},superTypes:[]},EmResetFrame:{name:yr.$type,properties:{dataInlineValue:{name:yr.dataInlineValue},dataReference:{name:yr.dataReference,referenceType:da.$type},dataType:{name:yr.dataType},entityIdentifier:{name:yr.entityIdentifier},modelEntityType:{name:yr.modelEntityType},name:{name:yr.name},sourceFrames:{name:yr.sourceFrames,defaultValue:[],referenceType:en.$type}},superTypes:[en.$type]},EmTimeFrame:{name:Dr.$type,properties:{dataInlineValue:{name:Dr.dataInlineValue},dataReference:{name:Dr.dataReference,referenceType:da.$type},dataType:{name:Dr.dataType},entityIdentifier:{name:Dr.entityIdentifier},modelEntityType:{name:Dr.modelEntityType},name:{name:Dr.name},sourceFrames:{name:Dr.sourceFrames,defaultValue:[],referenceType:en.$type}},superTypes:[en.$type]},Entry:{name:lc.$type,properties:{axis:{name:lc.axis,referenceType:po.$type},value:{name:lc.value}},superTypes:[]},EventModel:{name:dr.$type,properties:{accDescr:{name:dr.accDescr},accTitle:{name:dr.accTitle},dataEntities:{name:dr.dataEntities,defaultValue:[]},frames:{name:dr.frames,defaultValue:[]},gwtEntities:{name:dr.gwtEntities,defaultValue:[]},modelEntities:{name:dr.modelEntities,defaultValue:[]},noteEntities:{name:dr.noteEntities,defaultValue:[]},title:{name:dr.title}},superTypes:[]},Evolution:{name:rg.$type,properties:{stages:{name:rg.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:To.$type,properties:{boundary:{name:To.boundary},name:{name:To.name},secondName:{name:To.secondName}},superTypes:[]},Evolve:{name:uc.$type,properties:{component:{name:uc.component},target:{name:uc.target}},superTypes:[]},GitGraph:{name:fn.$type,properties:{accDescr:{name:fn.accDescr},accTitle:{name:fn.accTitle},statements:{name:fn.statements,defaultValue:[]},title:{name:fn.title}},superTypes:[]},Group:{name:Fi.$type,properties:{icon:{name:Fi.icon},id:{name:Fi.id},in:{name:Fi.in},title:{name:Fi.title}},superTypes:[]},Info:{name:ts.$type,properties:{accDescr:{name:ts.accDescr},accTitle:{name:ts.accTitle},title:{name:ts.title}},superTypes:[]},Item:{name:zi.$type,properties:{classSelector:{name:zi.classSelector},name:{name:zi.name}},superTypes:[]},Junction:{name:cc.$type,properties:{id:{name:cc.id},in:{name:cc.in}},superTypes:[]},Label:{name:ji.$type,properties:{negX:{name:ji.negX,defaultValue:!1},negY:{name:ji.negY,defaultValue:!1},offsetX:{name:ji.offsetX},offsetY:{name:ji.offsetY}},superTypes:[]},Leaf:{name:$o.$type,properties:{classSelector:{name:$o.classSelector},name:{name:$o.name},value:{name:$o.value}},superTypes:[zi.$type]},Link:{name:tn.$type,properties:{arrow:{name:tn.arrow},from:{name:tn.from},fromPort:{name:tn.fromPort},linkLabel:{name:tn.linkLabel},to:{name:tn.to},toPort:{name:tn.toPort}},superTypes:[]},Merge:{name:Ea.$type,properties:{branch:{name:Ea.branch},id:{name:Ea.id},tags:{name:Ea.tags,defaultValue:[]},type:{name:Ea.type}},superTypes:[ma.$type]},Note:{name:Ro.$type,properties:{evolution:{name:Ro.evolution},text:{name:Ro.text},visibility:{name:Ro.visibility}},superTypes:[]},Option:{name:fc.$type,properties:{name:{name:fc.name},value:{name:fc.value,defaultValue:!1}},superTypes:[]},Packet:{name:Ca.$type,properties:{accDescr:{name:Ca.accDescr},accTitle:{name:Ca.accTitle},blocks:{name:Ca.blocks,defaultValue:[]},title:{name:Ca.title}},superTypes:[]},PacketBlock:{name:_a.$type,properties:{bits:{name:_a.bits},end:{name:_a.end},label:{name:_a.label},start:{name:_a.start}},superTypes:[]},PegAny:{name:ng.$type,properties:{dot:{name:ng.dot}},superTypes:[Bi.$type]},PegGroup:{name:ag.$type,properties:{element:{name:ag.element}},superTypes:[Bi.$type]},PegIdentifier:{name:ig.$type,properties:{name:{name:ig.name}},superTypes:[Bi.$type]},PegLiteral:{name:sg.$type,properties:{value:{name:sg.value}},superTypes:[Bi.$type]},PegOrderedChoice:{name:og.$type,properties:{alternatives:{name:og.alternatives,defaultValue:[]}},superTypes:[]},PegPrefix:{name:dc.$type,properties:{operator:{name:dc.operator},suffix:{name:dc.suffix}},superTypes:[]},PegPrimary:{name:Bi.$type,properties:{},superTypes:[]},PegRule:{name:pc.$type,properties:{definition:{name:pc.definition},name:{name:pc.name}},superTypes:[]},PegSequence:{name:lg.$type,properties:{elements:{name:lg.elements,defaultValue:[]}},superTypes:[]},PegSuffix:{name:mc.$type,properties:{operator:{name:mc.operator},primary:{name:mc.primary}},superTypes:[]},Pie:{name:dn.$type,properties:{accDescr:{name:dn.accDescr},accTitle:{name:dn.accTitle},sections:{name:dn.sections,defaultValue:[]},showData:{name:dn.showData,defaultValue:!1},title:{name:dn.title}},superTypes:[]},PieSection:{name:Vo.$type,properties:{label:{name:Vo.label},value:{name:Vo.value}},superTypes:[]},Pipeline:{name:hc.$type,properties:{components:{name:hc.components,defaultValue:[]},parent:{name:hc.parent}},superTypes:[]},PipelineComponent:{name:Ao.$type,properties:{evolution:{name:Ao.evolution},label:{name:Ao.label},name:{name:Ao.name}},superTypes:[]},Radar:{name:rn.$type,properties:{accDescr:{name:rn.accDescr},accTitle:{name:rn.accTitle},axes:{name:rn.axes,defaultValue:[]},curves:{name:rn.curves,defaultValue:[]},options:{name:rn.options,defaultValue:[]},title:{name:rn.title}},superTypes:[]},Railroad:{name:ba.$type,properties:{accDescr:{name:ba.accDescr},accTitle:{name:ba.accTitle},rules:{name:ba.rules,defaultValue:[]},title:{name:ba.title}},superTypes:[]},RailroadAbnf:{name:Sa.$type,properties:{accDescr:{name:Sa.accDescr},accTitle:{name:Sa.accTitle},rules:{name:Sa.rules,defaultValue:[]},title:{name:Sa.title}},superTypes:[]},RailroadChoiceExpr:{name:ug.$type,properties:{alternatives:{name:ug.alternatives,defaultValue:[]}},superTypes:[pr.$type]},RailroadEbnf:{name:wa.$type,properties:{accDescr:{name:wa.accDescr},accTitle:{name:wa.accTitle},rules:{name:wa.rules,defaultValue:[]},title:{name:wa.title}},superTypes:[]},RailroadExpression:{name:pr.$type,properties:{},superTypes:[]},RailroadNonTerminalExpr:{name:cg.$type,properties:{name:{name:cg.name}},superTypes:[pr.$type]},RailroadOneOrMoreExpr:{name:fg.$type,properties:{element:{name:fg.element}},superTypes:[pr.$type]},RailroadOptionalExpr:{name:dg.$type,properties:{element:{name:dg.element}},superTypes:[pr.$type]},RailroadPeg:{name:Ia.$type,properties:{accDescr:{name:Ia.accDescr},accTitle:{name:Ia.accTitle},rules:{name:Ia.rules,defaultValue:[]},title:{name:Ia.title}},superTypes:[]},RailroadRule:{name:yc.$type,properties:{definition:{name:yc.definition},name:{name:yc.name}},superTypes:[]},RailroadSequenceExpr:{name:pg.$type,properties:{elements:{name:pg.elements,defaultValue:[]}},superTypes:[pr.$type]},RailroadSpecialExpr:{name:mg.$type,properties:{text:{name:mg.text}},superTypes:[pr.$type]},RailroadTerminalExpr:{name:hg.$type,properties:{value:{name:hg.value}},superTypes:[pr.$type]},RailroadZeroOrMoreExpr:{name:yg.$type,properties:{element:{name:yg.element}},superTypes:[pr.$type]},Section:{name:gc.$type,properties:{classSelector:{name:gc.classSelector},name:{name:gc.name}},superTypes:[zi.$type]},Service:{name:pa.$type,properties:{icon:{name:pa.icon},iconText:{name:pa.iconText},id:{name:pa.id},in:{name:pa.in},title:{name:pa.title}},superTypes:[]},Size:{name:vc.$type,properties:{height:{name:vc.height},width:{name:vc.width}},superTypes:[]},Statement:{name:ma.$type,properties:{},superTypes:[]},Transition:{name:rs.$type,properties:{from:{name:rs.from},label:{name:rs.label},to:{name:rs.to}},superTypes:[]},TreeNode:{name:ha.$type,properties:{classAnnotation:{name:ha.classAnnotation},descAnnotation:{name:ha.descAnnotation},iconAnnotation:{name:ha.iconAnnotation},indent:{name:ha.indent},name:{name:ha.name}},superTypes:[]},TreeView:{name:Ui.$type,properties:{accDescr:{name:Ui.accDescr},accTitle:{name:Ui.accTitle},nodes:{name:Ui.nodes,defaultValue:[]},title:{name:Ui.title}},superTypes:[]},Treemap:{name:Na.$type,properties:{accDescr:{name:Na.accDescr},accTitle:{name:Na.accTitle},title:{name:Na.title},TreemapRows:{name:Na.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:Tc.$type,properties:{indent:{name:Tc.indent},item:{name:Tc.item}},superTypes:[]},Wardley:{name:We.$type,properties:{accDescr:{name:We.accDescr},accelerators:{name:We.accelerators,defaultValue:[]},accTitle:{name:We.accTitle},anchors:{name:We.anchors,defaultValue:[]},annotation:{name:We.annotation,defaultValue:[]},annotations:{name:We.annotations,defaultValue:[]},components:{name:We.components,defaultValue:[]},deaccelerators:{name:We.deaccelerators,defaultValue:[]},evolution:{name:We.evolution},evolves:{name:We.evolves,defaultValue:[]},links:{name:We.links,defaultValue:[]},notes:{name:We.notes,defaultValue:[]},pipelines:{name:We.pipelines,defaultValue:[]},size:{name:We.size},title:{name:We.title}},superTypes:[]}}}static{i(this,"MermaidAstReflection")}},Ne=new jw,gg,tz=i(()=>gg??(gg=Ue(`{"$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":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[^\\\\[\\\\]\\\\r\\\\n]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"ArchitectureGrammarGrammar"),vg,rz=i(()=>vg??(vg=Ue(`{"$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"),Tg,nz=i(()=>Tg??(Tg=Ue('{"$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"),$g,az=i(()=>$g??($g=Ue(`{"$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"),Rg,iz=i(()=>Rg??(Rg=Ue(`{"$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"),Ag,sz=i(()=>Ag??(Ag=Ue(`{"$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"),Eg,oz=i(()=>Eg??(Eg=Ue(`{"$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"),Cg,lz=i(()=>Cg??(Cg=Ue(`{"$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"),_g,uz=i(()=>_g??(_g=Ue('{"$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"),bg,cz=i(()=>bg??(bg=Ue(`{"$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"),Sg,fz=i(()=>Sg??(Sg=Ue(`{"$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"),wg,dz=i(()=>wg??(wg=Ue(`{"$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"),Ig,pz=i(()=>Ig??(Ig=Ue(`{"$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"),Ng,mz=i(()=>Ng??(Ng=Ue(`{"$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"),Pg,hz=i(()=>Pg??(Pg=Ue(`{"$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"),yz={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},gz={languageId:"cynefin",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},vz={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Tz={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},$z={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Rz={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Az={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Ez={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Cz={languageId:"railroadAbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},_z={languageId:"railroadEbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},bz={languageId:"railroad",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Sz={languageId:"railroadPeg",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},wz={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Iz={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Nz={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ct={AstReflection:i(()=>new jw,"AstReflection")},Pz={Grammar:i(()=>tz(),"Grammar"),LanguageMetaData:i(()=>yz,"LanguageMetaData"),parser:{}},kz={Grammar:i(()=>rz(),"Grammar"),LanguageMetaData:i(()=>gz,"LanguageMetaData"),parser:{}},Oz={Grammar:i(()=>nz(),"Grammar"),LanguageMetaData:i(()=>vz,"LanguageMetaData"),parser:{}},Lz={Grammar:i(()=>az(),"Grammar"),LanguageMetaData:i(()=>Tz,"LanguageMetaData"),parser:{}},Dz={Grammar:i(()=>iz(),"Grammar"),LanguageMetaData:i(()=>$z,"LanguageMetaData"),parser:{}},xz={Grammar:i(()=>sz(),"Grammar"),LanguageMetaData:i(()=>Rz,"LanguageMetaData"),parser:{}},Mz={Grammar:i(()=>oz(),"Grammar"),LanguageMetaData:i(()=>Az,"LanguageMetaData"),parser:{}},Gz={Grammar:i(()=>lz(),"Grammar"),LanguageMetaData:i(()=>Ez,"LanguageMetaData"),parser:{}},Fz={Grammar:i(()=>uz(),"Grammar"),LanguageMetaData:i(()=>Cz,"LanguageMetaData"),parser:{}},zz={Grammar:i(()=>cz(),"Grammar"),LanguageMetaData:i(()=>_z,"LanguageMetaData"),parser:{}},jz={Grammar:i(()=>fz(),"Grammar"),LanguageMetaData:i(()=>bz,"LanguageMetaData"),parser:{}},Bz={Grammar:i(()=>dz(),"Grammar"),LanguageMetaData:i(()=>Sz,"LanguageMetaData"),parser:{}},Uz={Grammar:i(()=>pz(),"Grammar"),LanguageMetaData:i(()=>wz,"LanguageMetaData"),parser:{}},Kz={Grammar:i(()=>mz(),"Grammar"),LanguageMetaData:i(()=>Iz,"LanguageMetaData"),parser:{}},Wz={Grammar:i(()=>hz(),"Grammar"),LanguageMetaData:i(()=>Nz,"LanguageMetaData"),parser:{}},Vz=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,qz=/accTitle[\t ]*:([^\n\r]*)/,Hz=/title([\t ][^\n\r]*|)/,Yz={ACC_DESCR:Vz,ACC_TITLE:qz,TITLE:Hz},ur=class extends zm{static{i(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){let n=this.runCommonConverter(e,t,r);return n===void 0&&(n=this.runCustomConverter(e,t,r)),n===void 0?super.runConverter(e,t,r):n}runCommonConverter(e,t,r){const n=Yz[e.name];if(n===void 0)return;const a=n.exec(t);if(a!==null){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
|
+
`)}}},ci=class extends ur{static{i(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},ft=class extends Du{static{i(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){const n=super.buildKeywordTokens(e,t,r);return n.forEach(a=>{this.keywords.has(a.name)&&a.PATTERN!==void 0&&(a.PATTERN=new RegExp(a.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}};(class extends ft{static{i(this,"CommonTokenBuilder")}});var Xz=class extends ft{static{i(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},Bw={parser:{TokenBuilder:i(()=>new Xz,"TokenBuilder"),ValueConverter:i(()=>new ci,"ValueConverter")}};function Uw(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),Gz,Bw);return t.ServiceRegistry.register(r),{shared:t,Radar:r}}i(Uw,"createRadarServices");var Jz=class extends ft{static{i(this,"RailroadTokenBuilder")}constructor(){super(["railroad-beta"])}},kg=i(e=>{const t=e.slice(1,-1);let r="";for(let n=0;n<t.length;n++){const a=t[n];if(a==="\\"&&n+1<t.length){n++;const s=t[n];switch(s){case"n":r+=`
|
|
162
|
+
`;break;case"r":r+="\r";break;case"t":r+=" ";break;default:r+=s}continue}r+=a}return r},"decodeEscapedString"),Zz=class extends ur{static{i(this,"RailroadValueConverter")}runConverter(e,t,r){const n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n=="string"){const a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return kg(a)}return n}runCustomConverter(e,t,r){if(e.name==="RR_STRING")return kg(t)}},Kw={parser:{TokenBuilder:i(()=>new Jz,"TokenBuilder"),ValueConverter:i(()=>new Zz,"ValueConverter")}};function Ww(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),jz,Kw);return t.ServiceRegistry.register(r),{shared:t,Railroad:r}}i(Ww,"createRailroadServices");var Qz=class extends ft{static{i(this,"RailroadEbnfTokenBuilder")}constructor(){super(["railroad-ebnf-beta"])}},Og=i(e=>{const t=e.slice(1,-1);let r="";for(let n=0;n<t.length;n++){const a=t[n];if(a==="\\"&&n+1<t.length){n++;const s=t[n];switch(s){case"n":r+=`
|
|
163
|
+
`;break;case"r":r+="\r";break;case"t":r+=" ";break;default:r+=s}continue}r+=a}return r},"decodeEscapedString"),ej=class extends ur{static{i(this,"RailroadEbnfValueConverter")}runConverter(e,t,r){const n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n=="string"){const a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return Og(a)}return n}runCustomConverter(e,t,r){if(e.name==="EBNF_STRING")return Og(t);if(e.name==="EBNF_SPECIAL_SEQUENCE")return t.slice(1,-1).trim()}},Vw={parser:{TokenBuilder:i(()=>new Qz,"TokenBuilder"),ValueConverter:i(()=>new ej,"ValueConverter")}};function qw(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),zz,Vw);return t.ServiceRegistry.register(r),{shared:t,RailroadEbnf:r}}i(qw,"createRailroadEbnfServices");var tj=class extends ft{static{i(this,"RailroadAbnfTokenBuilder")}constructor(){super(["railroad-abnf-beta"])}},rj=class extends ur{static{i(this,"RailroadAbnfValueConverter")}runConverter(e,t,r){const n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n=="string"){const 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)}},Hw={parser:{TokenBuilder:i(()=>new tj,"TokenBuilder"),ValueConverter:i(()=>new rj,"ValueConverter")}};function Yw(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),Fz,Hw);return t.ServiceRegistry.register(r),{shared:t,RailroadAbnf:r}}i(Yw,"createRailroadAbnfServices");var nj=class extends ft{static{i(this,"RailroadPegTokenBuilder")}constructor(){super(["railroad-peg-beta"])}},Lg=i(e=>{const t=e.slice(1,-1);let r="";for(let n=0;n<t.length;n++){const a=t[n];if(a==="\\"&&n+1<t.length){n++;const s=t[n];switch(s){case"n":r+=`
|
|
164
|
+
`;break;case"r":r+="\r";break;case"t":r+=" ";break;default:r+=s}continue}r+=a}return r},"decodeEscapedString"),aj=class extends ur{static{i(this,"RailroadPegValueConverter")}runConverter(e,t,r){const n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n=="string"){const a=n.trim();if(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))return Lg(a)}return n}runCustomConverter(e,t,r){if(e.name==="PEG_STRING")return Lg(t)}},Xw={parser:{TokenBuilder:i(()=>new nj,"TokenBuilder"),ValueConverter:i(()=>new aj,"ValueConverter")}};function Jw(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),Bz,Xw);return t.ServiceRegistry.register(r),{shared:t,RailroadPeg:r}}i(Jw,"createRailroadPegServices");var ij=class extends ft{static{i(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},sj=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,oj=class extends ur{static{i(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if(e.name==="NUMBER2")return parseFloat(t.replace(/,/g,""));if(e.name==="SEPARATOR")return t.substring(1,t.length-1);if(e.name==="STRING2")return t.substring(1,t.length-1);if(e.name==="INDENTATION")return t.length;if(e.name==="ClassDef"){if(typeof t!="string")return t;const n=sj.exec(t);if(n)return{$type:"ClassDefStatement",className:n[1],styleText:n[2]||void 0}}}};function Zw(e){const t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){const n={Treemap:t.checkSingleRoot.bind(t)};r.register(n,t)}}i(Zw,"registerValidationChecks");var lj=class{static{i(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(const n of e.TreemapRows)n.item&&(r===void 0&&n.indent===void 0?r=0:n.indent===void 0?t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}):r!==void 0&&r>=parseInt(n.indent,10)&&t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}))}},Qw={parser:{TokenBuilder:i(()=>new ij,"TokenBuilder"),ValueConverter:i(()=>new oj,"ValueConverter")},validation:{TreemapValidator:i(()=>new lj,"TreemapValidator")}};function eI(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),Uz,Qw);return t.ServiceRegistry.register(r),Zw(r),{shared:t,Treemap:r}}i(eI,"createTreemapServices");var uj=class extends ur{static{i(this,"WardleyValueConverter")}runCustomConverter(e,t,r){if(e.name.toUpperCase()==="LINK_LABEL")return t.substring(1).trim()}},tI={parser:{ValueConverter:i(()=>new uj,"ValueConverter")}};function rI(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),Wz,tI);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}i(rI,"createWardleyServices");var cj=class extends ft{static{i(this,"CynefinTokenBuilder")}constructor(){super(["cynefin-beta"])}},nI={parser:{TokenBuilder:i(()=>new cj,"TokenBuilder"),ValueConverter:i(()=>new ci,"ValueConverter")}};function aI(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),kz,nI);return t.ServiceRegistry.register(r),{shared:t,Cynefin:r}}i(aI,"createCynefinServices");var fj=class extends ft{static{i(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},iI={parser:{TokenBuilder:i(()=>new fj,"TokenBuilder"),ValueConverter:i(()=>new ci,"ValueConverter")}};function sI(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),Lz,iI);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}i(sI,"createGitGraphServices");var dj=class extends ft{static{i(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},oI={parser:{TokenBuilder:i(()=>new dj,"TokenBuilder"),ValueConverter:i(()=>new ci,"ValueConverter")}};function lI(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),Dz,oI);return t.ServiceRegistry.register(r),{shared:t,Info:r}}i(lI,"createInfoServices");var pj=class extends ft{static{i(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},uI={parser:{TokenBuilder:i(()=>new pj,"TokenBuilder"),ValueConverter:i(()=>new ci,"ValueConverter")}};function cI(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),xz,uI);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}i(cI,"createPacketServices");var mj=class extends ft{static{i(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},hj=class extends ur{static{i(this,"PieValueConverter")}runCustomConverter(e,t,r){if(e.name==="PIE_SECTION_LABEL")return t.replace(/"/g,"").trim()}},fI={parser:{TokenBuilder:i(()=>new mj,"TokenBuilder"),ValueConverter:i(()=>new hj,"ValueConverter")}};function dI(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),Mz,fI);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}i(dI,"createPieServices");var yj=class extends ur{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"){const n=t.trim();return n.substring(5,n.length-1)}if(e.name==="DESC_ANNOTATION")return t.trim().substring(2).trim()}},gj=class extends ft{static{i(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},pI={parser:{TokenBuilder:i(()=>new gj,"TokenBuilder"),ValueConverter:i(()=>new yj,"ValueConverter")}};function mI(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),Kz,pI);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}i(mI,"createTreeViewServices");var vj=class extends ft{static{i(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},Tj=class extends ur{static{i(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");if(e.name==="ARCH_TITLE"){let n=t.replace(/^\[|]$/g,"").trim();return(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1),n=n.replace(/\\"/g,'"').replace(/\\'/g,"'")),n.trim()}}},hI={parser:{TokenBuilder:i(()=>new vj,"TokenBuilder"),ValueConverter:i(()=>new Tj,"ValueConverter")}};function yI(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),Pz,hI);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}i(yI,"createArchitectureServices");var $j=class extends ft{static{i(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},Dg=new Set(["cmd","command"]),xg=new Set(["evt","event"]),$c=new Set(["rmo","readmodel"]),Mg=new Set(["pcr","processor"]),Gg=new Set(["ui"]);function gI(e){const t=e.validation.EventModelingValidator,r=e.validation.ValidationRegistry;if(r){const n={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};r.register(n,t)}}i(gI,"registerValidationChecks");var Rj=class{static{i(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(Dg.has(e.modelEntityType)?this.validateSources(e,new Set([...Gg,...Mg]),"command","ui or processor",t):xg.has(e.modelEntityType)?this.validateSources(e,Dg,"event","command",t):$c.has(e.modelEntityType)?this.validateSources(e,xg,"read model","event",t):Mg.has(e.modelEntityType)?this.validateSources(e,$c,"processor","read model",t):Gg.has(e.modelEntityType)&&this.validateSources(e,$c,"ui","read model",t))}validateSources(e,t,r,n,a){for(const s of e.sourceFrames){const o=s.ref;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"})}}},vI={parser:{TokenBuilder:i(()=>new $j,"TokenBuilder"),ValueConverter:i(()=>new ci,"ValueConverter")},validation:{EventModelingValidator:i(()=>new Rj,"EventModelingValidator")}};function TI(e=Xe){const t=ee(Be(e),ct),r=ee(je({shared:t}),Oz,vI);return t.ServiceRegistry.register(r),gI(r),{shared:t,EventModel:r}}i(TI,"createEventModelingServices");var Ve={},Aj={info:i(async()=>{const{createInfoServices:e}=await et(async()=>{const{createInfoServices:r}=await Promise.resolve().then(()=>_j);return{createInfoServices:r}},void 0),t=e().Info.parser.LangiumParser;Ve.info=t},"info"),packet:i(async()=>{const{createPacketServices:e}=await et(async()=>{const{createPacketServices:r}=await Promise.resolve().then(()=>bj);return{createPacketServices:r}},void 0),t=e().Packet.parser.LangiumParser;Ve.packet=t},"packet"),pie:i(async()=>{const{createPieServices:e}=await et(async()=>{const{createPieServices:r}=await Promise.resolve().then(()=>Sj);return{createPieServices:r}},void 0),t=e().Pie.parser.LangiumParser;Ve.pie=t},"pie"),treeView:i(async()=>{const{createTreeViewServices:e}=await et(async()=>{const{createTreeViewServices:r}=await Promise.resolve().then(()=>wj);return{createTreeViewServices:r}},void 0),t=e().TreeView.parser.LangiumParser;Ve.treeView=t},"treeView"),architecture:i(async()=>{const{createArchitectureServices:e}=await et(async()=>{const{createArchitectureServices:r}=await Promise.resolve().then(()=>Ij);return{createArchitectureServices:r}},void 0),t=e().Architecture.parser.LangiumParser;Ve.architecture=t},"architecture"),gitGraph:i(async()=>{const{createGitGraphServices:e}=await et(async()=>{const{createGitGraphServices:r}=await Promise.resolve().then(()=>Nj);return{createGitGraphServices:r}},void 0),t=e().GitGraph.parser.LangiumParser;Ve.gitGraph=t},"gitGraph"),eventmodeling:i(async()=>{const{createEventModelingServices:e}=await et(async()=>{const{createEventModelingServices:r}=await Promise.resolve().then(()=>Pj);return{createEventModelingServices:r}},void 0),t=e().EventModel.parser.LangiumParser;Ve.eventmodeling=t},"eventmodeling"),radar:i(async()=>{const{createRadarServices:e}=await et(async()=>{const{createRadarServices:r}=await Promise.resolve().then(()=>kj);return{createRadarServices:r}},void 0),t=e().Radar.parser.LangiumParser;Ve.radar=t},"radar"),railroad:i(async()=>{const{createRailroadServices:e}=await et(async()=>{const{createRailroadServices:r}=await Promise.resolve().then(()=>Oj);return{createRailroadServices:r}},void 0),t=e().Railroad.parser.LangiumParser;Ve.railroad=t},"railroad"),railroadEbnf:i(async()=>{const{createRailroadEbnfServices:e}=await et(async()=>{const{createRailroadEbnfServices:r}=await Promise.resolve().then(()=>Lj);return{createRailroadEbnfServices:r}},void 0),t=e().RailroadEbnf.parser.LangiumParser;Ve.railroadEbnf=t},"railroadEbnf"),railroadAbnf:i(async()=>{const{createRailroadAbnfServices:e}=await et(async()=>{const{createRailroadAbnfServices:r}=await Promise.resolve().then(()=>Dj);return{createRailroadAbnfServices:r}},void 0),t=e().RailroadAbnf.parser.LangiumParser;Ve.railroadAbnf=t},"railroadAbnf"),railroadPeg:i(async()=>{const{createRailroadPegServices:e}=await et(async()=>{const{createRailroadPegServices:r}=await Promise.resolve().then(()=>xj);return{createRailroadPegServices:r}},void 0),t=e().RailroadPeg.parser.LangiumParser;Ve.railroadPeg=t},"railroadPeg"),treemap:i(async()=>{const{createTreemapServices:e}=await et(async()=>{const{createTreemapServices:r}=await Promise.resolve().then(()=>Mj);return{createTreemapServices:r}},void 0),t=e().Treemap.parser.LangiumParser;Ve.treemap=t},"treemap"),wardley:i(async()=>{const{createWardleyServices:e}=await et(async()=>{const{createWardleyServices:r}=await Promise.resolve().then(()=>Gj);return{createWardleyServices:r}},void 0),t=e().Wardley.parser.LangiumParser;Ve.wardley=t},"wardley"),cynefin:i(async()=>{const{createCynefinServices:e}=await et(async()=>{const{createCynefinServices:r}=await Promise.resolve().then(()=>Fj);return{createCynefinServices:r}},void 0),t=e().Cynefin.parser.LangiumParser;Ve.cynefin=t},"cynefin")};async function Ej(e,t){const r=Aj[e];if(!r)throw new Error(`Unknown diagram type: ${e}`);Ve[e]||await r();const a=Ve[e].parse(t);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new Cj(a);return a.value}i(Ej,"parse");var Cj=class extends Error{constructor(e){const t=e.lexerErrors.map(n=>{const 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(`
|
|
165
|
+
`),r=e.parserErrors.map(n=>{const 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(`
|
|
166
|
+
`);super(`Parsing failed: ${t} ${r}`),this.result=e}static{i(this,"MermaidParseError")}};const _j=Object.freeze(Object.defineProperty({__proto__:null,InfoModule:oI,createInfoServices:lI},Symbol.toStringTag,{value:"Module"})),bj=Object.freeze(Object.defineProperty({__proto__:null,PacketModule:uI,createPacketServices:cI},Symbol.toStringTag,{value:"Module"})),Sj=Object.freeze(Object.defineProperty({__proto__:null,PieModule:fI,createPieServices:dI},Symbol.toStringTag,{value:"Module"})),wj=Object.freeze(Object.defineProperty({__proto__:null,TreeViewModule:pI,createTreeViewServices:mI},Symbol.toStringTag,{value:"Module"})),Ij=Object.freeze(Object.defineProperty({__proto__:null,ArchitectureModule:hI,createArchitectureServices:yI},Symbol.toStringTag,{value:"Module"})),Nj=Object.freeze(Object.defineProperty({__proto__:null,GitGraphModule:iI,createGitGraphServices:sI},Symbol.toStringTag,{value:"Module"})),Pj=Object.freeze(Object.defineProperty({__proto__:null,EventModelingModule:vI,createEventModelingServices:TI},Symbol.toStringTag,{value:"Module"})),kj=Object.freeze(Object.defineProperty({__proto__:null,RadarModule:Bw,createRadarServices:Uw},Symbol.toStringTag,{value:"Module"})),Oj=Object.freeze(Object.defineProperty({__proto__:null,RailroadModule:Kw,createRailroadServices:Ww},Symbol.toStringTag,{value:"Module"})),Lj=Object.freeze(Object.defineProperty({__proto__:null,RailroadEbnfModule:Vw,createRailroadEbnfServices:qw},Symbol.toStringTag,{value:"Module"})),Dj=Object.freeze(Object.defineProperty({__proto__:null,RailroadAbnfModule:Hw,createRailroadAbnfServices:Yw},Symbol.toStringTag,{value:"Module"})),xj=Object.freeze(Object.defineProperty({__proto__:null,RailroadPegModule:Xw,createRailroadPegServices:Jw},Symbol.toStringTag,{value:"Module"})),Mj=Object.freeze(Object.defineProperty({__proto__:null,TreemapModule:Qw,createTreemapServices:eI},Symbol.toStringTag,{value:"Module"})),Gj=Object.freeze(Object.defineProperty({__proto__:null,WardleyModule:tI,createWardleyServices:rI},Symbol.toStringTag,{value:"Module"})),Fj=Object.freeze(Object.defineProperty({__proto__:null,CynefinModule:nI,createCynefinServices:aI},Symbol.toStringTag,{value:"Module"}));export{zF as i,Ej as p};
|