wardley-L42UT6IY-DF83sseq.js 598 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. import{ab as qt}from"./builder-DygomDiV.js";var Qb=Object.create,Es=Object.defineProperty,ew=Object.getOwnPropertyDescriptor,Yd=Object.getOwnPropertyNames,tw=Object.getPrototypeOf,rw=Object.prototype.hasOwnProperty,i=(e,t)=>Es(e,"name",{value:t,configurable:!0}),nw=(e,t)=>function(){return e&&(t=(0,e[Yd(e)[0]])(e=0)),t},V=(e,t)=>function(){return t||(0,e[Yd(e)[0]])((t={exports:{}}).exports,t),t.exports},Kr=(e,t)=>{for(var r in t)Es(e,r,{get:t[r],enumerable:!0})},Xd=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Yd(t))!rw.call(e,a)&&a!==r&&Es(e,a,{get:()=>t[a],enumerable:!(n=ew(t,a))||n.enumerable});return e},$l=(e,t,r)=>(Xd(e,t,"default"),r),Jd=(e,t,r)=>(r=e!=null?Qb(tw(e)):{},Xd(Es(r,"default",{value:e,enumerable:!0}),e)),Zd=e=>Xd(Es({},"__esModule",{value:!0}),e),Al={};Kr(Al,{AnnotatedTextEdit:()=>dr,ChangeAnnotation:()=>tn,ChangeAnnotationIdentifier:()=>je,CodeAction:()=>Ou,CodeActionContext:()=>Pu,CodeActionKind:()=>ku,CodeActionTriggerKind:()=>Gi,CodeDescription:()=>cu,CodeLens:()=>Lu,Color:()=>fo,ColorInformation:()=>nu,ColorPresentation:()=>au,Command:()=>en,CompletionItem:()=>Tu,CompletionItemKind:()=>pu,CompletionItemLabelDetails:()=>vu,CompletionItemTag:()=>mu,CompletionList:()=>Ru,CreateFile:()=>ua,DeleteFile:()=>fa,Diagnostic:()=>Di,DiagnosticRelatedInformation:()=>po,DiagnosticSeverity:()=>ou,DiagnosticTag:()=>lu,DocumentHighlight:()=>Cu,DocumentHighlightKind:()=>_u,DocumentLink:()=>Mu,DocumentSymbol:()=>Nu,DocumentUri:()=>eu,EOL:()=>bg,FoldingRange:()=>su,FoldingRangeKind:()=>iu,FormattingOptions:()=>Du,Hover:()=>$u,InlayHint:()=>qu,InlayHintKind:()=>go,InlayHintLabelPart:()=>yo,InlineCompletionContext:()=>Ju,InlineCompletionItem:()=>Vu,InlineCompletionList:()=>Hu,InlineCompletionTriggerKind:()=>Yu,InlineValueContext:()=>Ku,InlineValueEvaluatableExpression:()=>Bu,InlineValueText:()=>Uu,InlineValueVariableLookup:()=>zu,InsertReplaceEdit:()=>gu,InsertTextFormat:()=>hu,InsertTextMode:()=>yu,Location:()=>Li,LocationLink:()=>ru,MarkedString:()=>Fi,MarkupContent:()=>pa,MarkupKind:()=>mo,OptionalVersionedTextDocumentIdentifier:()=>xi,ParameterInformation:()=>Au,Position:()=>ie,Range:()=>ee,RenameFile:()=>da,SelectedCompletionInfo:()=>Xu,SelectionRange:()=>xu,SemanticTokenModifiers:()=>Gu,SemanticTokenTypes:()=>Fu,SemanticTokens:()=>ju,SignatureInformation:()=>Eu,StringValue:()=>Wu,SymbolInformation:()=>wu,SymbolKind:()=>Su,SymbolTag:()=>bu,TextDocument:()=>Qu,TextDocumentEdit:()=>Mi,TextDocumentIdentifier:()=>uu,TextDocumentItem:()=>fu,TextEdit:()=>Vt,URI:()=>uo,VersionedTextDocumentIdentifier:()=>du,WorkspaceChange:()=>Sg,WorkspaceEdit:()=>ho,WorkspaceFolder:()=>Zu,WorkspaceSymbol:()=>Iu,integer:()=>tu,uinteger:()=>Oi});var eu,uo,tu,Oi,ie,ee,Li,ru,fo,nu,au,iu,su,po,ou,lu,cu,Di,en,Vt,tn,je,dr,Mi,ua,da,fa,ho,Ei,kc,Sg,uu,du,xi,fu,mo,pa,pu,hu,mu,gu,yu,vu,Tu,Ru,Fi,$u,Au,Eu,_u,Cu,Su,bu,wu,Iu,Nu,ku,Gi,Pu,Ou,Lu,Du,Mu,xu,Fu,Gu,ju,Uu,zu,Bu,Ku,go,yo,qu,Wu,Vu,Hu,Yu,Xu,Ju,Zu,bg,Qu,Mh,$,_s=nw({"../../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})(eu||(eu={})),(function(e){function t(r){return typeof r=="string"}i(t,"is"),e.is=t})(uo||(uo={})),(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})(tu||(tu={})),(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})(Oi||(Oi={})),(function(e){function t(n,a){return n===Number.MAX_VALUE&&(n=Oi.MAX_VALUE),a===Number.MAX_VALUE&&(a=Oi.MAX_VALUE),{line:n,character:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&$.uinteger(a.line)&&$.uinteger(a.character)}i(r,"is"),e.is=r})(ie||(ie={})),(function(e){function t(n,a,s,o){if($.uinteger(n)&&$.uinteger(a)&&$.uinteger(s)&&$.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 $.objectLiteral(a)&&ie.is(a.start)&&ie.is(a.end)}i(r,"is"),e.is=r})(ee||(ee={})),(function(e){function t(n,a){return{uri:n,range:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ee.is(a.range)&&($.string(a.uri)||$.undefined(a.uri))}i(r,"is"),e.is=r})(Li||(Li={})),(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 $.objectLiteral(a)&&ee.is(a.targetRange)&&$.string(a.targetUri)&&ee.is(a.targetSelectionRange)&&(ee.is(a.originSelectionRange)||$.undefined(a.originSelectionRange))}i(r,"is"),e.is=r})(ru||(ru={})),(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 $.objectLiteral(a)&&$.numberRange(a.red,0,1)&&$.numberRange(a.green,0,1)&&$.numberRange(a.blue,0,1)&&$.numberRange(a.alpha,0,1)}i(r,"is"),e.is=r})(fo||(fo={})),(function(e){function t(n,a){return{range:n,color:a}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&ee.is(a.range)&&fo.is(a.color)}i(r,"is"),e.is=r})(nu||(nu={})),(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 $.objectLiteral(a)&&$.string(a.label)&&($.undefined(a.textEdit)||Vt.is(a))&&($.undefined(a.additionalTextEdits)||$.typedArray(a.additionalTextEdits,Vt.is))}i(r,"is"),e.is=r})(au||(au={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(iu||(iu={})),(function(e){function t(n,a,s,o,l,c){const u={startLine:n,endLine:a};return $.defined(s)&&(u.startCharacter=s),$.defined(o)&&(u.endCharacter=o),$.defined(l)&&(u.kind=l),$.defined(c)&&(u.collapsedText=c),u}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&$.uinteger(a.startLine)&&$.uinteger(a.startLine)&&($.undefined(a.startCharacter)||$.uinteger(a.startCharacter))&&($.undefined(a.endCharacter)||$.uinteger(a.endCharacter))&&($.undefined(a.kind)||$.string(a.kind))}i(r,"is"),e.is=r})(su||(su={})),(function(e){function t(n,a){return{location:n,message:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&Li.is(a.location)&&$.string(a.message)}i(r,"is"),e.is=r})(po||(po={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ou||(ou={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(lu||(lu={})),(function(e){function t(r){const n=r;return $.objectLiteral(n)&&$.string(n.href)}i(t,"is"),e.is=t})(cu||(cu={})),(function(e){function t(n,a,s,o,l,c){let u={range:n,message:a};return $.defined(s)&&(u.severity=s),$.defined(o)&&(u.code=o),$.defined(l)&&(u.source=l),$.defined(c)&&(u.relatedInformation=c),u}i(t,"create"),e.create=t;function r(n){var a;let s=n;return $.defined(s)&&ee.is(s.range)&&$.string(s.message)&&($.number(s.severity)||$.undefined(s.severity))&&($.integer(s.code)||$.string(s.code)||$.undefined(s.code))&&($.undefined(s.codeDescription)||$.string((a=s.codeDescription)===null||a===void 0?void 0:a.href))&&($.string(s.source)||$.undefined(s.source))&&($.undefined(s.relatedInformation)||$.typedArray(s.relatedInformation,po.is))}i(r,"is"),e.is=r})(Di||(Di={})),(function(e){function t(n,a,...s){let o={title:n,command:a};return $.defined(s)&&s.length>0&&(o.arguments=s),o}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.title)&&$.string(a.command)}i(r,"is"),e.is=r})(en||(en={})),(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 $.objectLiteral(o)&&$.string(o.newText)&&ee.is(o.range)}i(a,"is"),e.is=a})(Vt||(Vt={})),(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 $.objectLiteral(a)&&$.string(a.label)&&($.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&($.string(a.description)||a.description===void 0)}i(r,"is"),e.is=r})(tn||(tn={})),(function(e){function t(r){const n=r;return $.string(n)}i(t,"is"),e.is=t})(je||(je={})),(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 Vt.is(o)&&(tn.is(o.annotationId)||je.is(o.annotationId))}i(a,"is"),e.is=a})(dr||(dr={})),(function(e){function t(n,a){return{textDocument:n,edits:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&xi.is(a.textDocument)&&Array.isArray(a.edits)}i(r,"is"),e.is=r})(Mi||(Mi={})),(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"&&$.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||$.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||$.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(ua||(ua={})),(function(e){function t(n,a,s,o){let l={kind:"rename",oldUri:n,newUri:a};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"&&$.string(a.oldUri)&&$.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||$.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||$.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(da||(da={})),(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"&&$.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||$.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||$.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||je.is(a.annotationId))}i(r,"is"),e.is=r})(fa||(fa={})),(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=>$.string(a.kind)?ua.is(a)||da.is(a)||fa.is(a):Mi.is(a)))}i(t,"is"),e.is=t})(ho||(ho={})),Ei=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=Vt.insert(e,t):je.is(r)?(a=r,n=dr.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=dr.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=Vt.replace(e,t):je.is(r)?(a=r,n=dr.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),n=dr.replace(e,t,a)),this.edits.push(n),a!==void 0)return a}delete(e,t){let r,n;if(t===void 0?r=Vt.del(e):je.is(t)?(n=t,r=dr.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=dr.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.")}},kc=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(je.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()}},Sg=class{static{i(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new kc(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(Mi.is(t)){const r=new Ei(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new Ei(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(xi.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 Ei(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 Ei(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new kc,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;tn.is(t)||je.is(t)?n=t:r=t;let a,s;if(n===void 0?a=ua.create(e,r):(s=je.is(n)?n:this._changeAnnotations.manage(n),a=ua.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;tn.is(r)||je.is(r)?a=r:n=r;let s,o;if(a===void 0?s=da.create(e,t,n):(o=je.is(a)?a:this._changeAnnotations.manage(a),s=da.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;tn.is(t)||je.is(t)?n=t:r=t;let a,s;if(n===void 0?a=fa.create(e,r):(s=je.is(n)?n:this._changeAnnotations.manage(n),a=fa.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 $.defined(a)&&$.string(a.uri)}i(r,"is"),e.is=r})(uu||(uu={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)&&$.integer(a.version)}i(r,"is"),e.is=r})(du||(du={})),(function(e){function t(n,a){return{uri:n,version:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.string(a.uri)&&(a.version===null||$.integer(a.version))}i(r,"is"),e.is=r})(xi||(xi={})),(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 $.defined(a)&&$.string(a.uri)&&$.string(a.languageId)&&$.integer(a.version)&&$.string(a.text)}i(r,"is"),e.is=r})(fu||(fu={})),(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})(mo||(mo={})),(function(e){function t(r){const n=r;return $.objectLiteral(r)&&mo.is(n.kind)&&$.string(n.value)}i(t,"is"),e.is=t})(pa||(pa={})),(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})(pu||(pu={})),(function(e){e.PlainText=1,e.Snippet=2})(hu||(hu={})),(function(e){e.Deprecated=1})(mu||(mu={})),(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&&$.string(a.newText)&&ee.is(a.insert)&&ee.is(a.replace)}i(r,"is"),e.is=r})(gu||(gu={})),(function(e){e.asIs=1,e.adjustIndentation=2})(yu||(yu={})),(function(e){function t(r){const n=r;return n&&($.string(n.detail)||n.detail===void 0)&&($.string(n.description)||n.description===void 0)}i(t,"is"),e.is=t})(vu||(vu={})),(function(e){function t(r){return{label:r}}i(t,"create"),e.create=t})(Tu||(Tu={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}i(t,"create"),e.create=t})(Ru||(Ru={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}i(t,"fromPlainText"),e.fromPlainText=t;function r(n){const a=n;return $.string(a)||$.objectLiteral(a)&&$.string(a.language)&&$.string(a.value)}i(r,"is"),e.is=r})(Fi||(Fi={})),(function(e){function t(r){let n=r;return!!n&&$.objectLiteral(n)&&(pa.is(n.contents)||Fi.is(n.contents)||$.typedArray(n.contents,Fi.is))&&(r.range===void 0||ee.is(r.range))}i(t,"is"),e.is=t})($u||($u={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}i(t,"create"),e.create=t})(Au||(Au={})),(function(e){function t(r,n,...a){let s={label:r};return $.defined(n)&&(s.documentation=n),$.defined(a)?s.parameters=a:s.parameters=[],s}i(t,"create"),e.create=t})(Eu||(Eu={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(_u||(_u={})),(function(e){function t(r,n){let a={range:r};return $.number(n)&&(a.kind=n),a}i(t,"create"),e.create=t})(Cu||(Cu={})),(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})(Su||(Su={})),(function(e){e.Deprecated=1})(bu||(bu={})),(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})(wu||(wu={})),(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})(Iu||(Iu={})),(function(e){function t(n,a,s,o,l,c){let u={name:n,detail:a,kind:s,range:o,selectionRange:l};return c!==void 0&&(u.children=c),u}i(t,"create"),e.create=t;function r(n){let a=n;return a&&$.string(a.name)&&$.number(a.kind)&&ee.is(a.range)&&ee.is(a.selectionRange)&&(a.detail===void 0||$.string(a.detail))&&(a.deprecated===void 0||$.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})(Nu||(Nu={})),(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"})(ku||(ku={})),(function(e){e.Invoked=1,e.Automatic=2})(Gi||(Gi={})),(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 $.defined(a)&&$.typedArray(a.diagnostics,Di.is)&&(a.only===void 0||$.typedArray(a.only,$.string))&&(a.triggerKind===void 0||a.triggerKind===Gi.Invoked||a.triggerKind===Gi.Automatic)}i(r,"is"),e.is=r})(Pu||(Pu={})),(function(e){function t(n,a,s){let o={title:n},l=!0;return typeof a=="string"?(l=!1,o.kind=a):en.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&&$.string(a.title)&&(a.diagnostics===void 0||$.typedArray(a.diagnostics,Di.is))&&(a.kind===void 0||$.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||en.is(a.command))&&(a.isPreferred===void 0||$.boolean(a.isPreferred))&&(a.edit===void 0||ho.is(a.edit))}i(r,"is"),e.is=r})(Ou||(Ou={})),(function(e){function t(n,a){let s={range:n};return $.defined(a)&&(s.data=a),s}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&ee.is(a.range)&&($.undefined(a.command)||en.is(a.command))}i(r,"is"),e.is=r})(Lu||(Lu={})),(function(e){function t(n,a){return{tabSize:n,insertSpaces:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.defined(a)&&$.uinteger(a.tabSize)&&$.boolean(a.insertSpaces)}i(r,"is"),e.is=r})(Du||(Du={})),(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 $.defined(a)&&ee.is(a.range)&&($.undefined(a.target)||$.string(a.target))}i(r,"is"),e.is=r})(Mu||(Mu={})),(function(e){function t(n,a){return{range:n,parent:a}}i(t,"create"),e.create=t;function r(n){let a=n;return $.objectLiteral(a)&&ee.is(a.range)&&(a.parent===void 0||e.is(a.parent))}i(r,"is"),e.is=r})(xu||(xu={})),(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"})(Fu||(Fu={})),(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"})(Gu||(Gu={})),(function(e){function t(r){const n=r;return $.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})(ju||(ju={})),(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&&ee.is(a.range)&&$.string(a.text)}i(r,"is"),e.is=r})(Uu||(Uu={})),(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&&ee.is(a.range)&&$.boolean(a.caseSensitiveLookup)&&($.string(a.variableName)||a.variableName===void 0)}i(r,"is"),e.is=r})(zu||(zu={})),(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&&ee.is(a.range)&&($.string(a.expression)||a.expression===void 0)}i(r,"is"),e.is=r})(Bu||(Bu={})),(function(e){function t(n,a){return{frameId:n,stoppedLocation:a}}i(t,"create"),e.create=t;function r(n){const a=n;return $.defined(a)&&ee.is(n.stoppedLocation)}i(r,"is"),e.is=r})(Ku||(Ku={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}i(t,"is"),e.is=t})(go||(go={})),(function(e){function t(n){return{value:n}}i(t,"create"),e.create=t;function r(n){const a=n;return $.objectLiteral(a)&&(a.tooltip===void 0||$.string(a.tooltip)||pa.is(a.tooltip))&&(a.location===void 0||Li.is(a.location))&&(a.command===void 0||en.is(a.command))}i(r,"is"),e.is=r})(yo||(yo={})),(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 $.objectLiteral(a)&&ie.is(a.position)&&($.string(a.label)||$.typedArray(a.label,yo.is))&&(a.kind===void 0||go.is(a.kind))&&a.textEdits===void 0||$.typedArray(a.textEdits,Vt.is)&&(a.tooltip===void 0||$.string(a.tooltip)||pa.is(a.tooltip))&&(a.paddingLeft===void 0||$.boolean(a.paddingLeft))&&(a.paddingRight===void 0||$.boolean(a.paddingRight))}i(r,"is"),e.is=r})(qu||(qu={})),(function(e){function t(r){return{kind:"snippet",value:r}}i(t,"createSnippet"),e.createSnippet=t})(Wu||(Wu={})),(function(e){function t(r,n,a,s){return{insertText:r,filterText:n,range:a,command:s}}i(t,"create"),e.create=t})(Vu||(Vu={})),(function(e){function t(r){return{items:r}}i(t,"create"),e.create=t})(Hu||(Hu={})),(function(e){e.Invoked=0,e.Automatic=1})(Yu||(Yu={})),(function(e){function t(r,n){return{range:r,text:n}}i(t,"create"),e.create=t})(Xu||(Xu={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}i(t,"create"),e.create=t})(Ju||(Ju={})),(function(e){function t(r){const n=r;return $.objectLiteral(n)&&uo.is(n.uri)&&$.string(n.name)}i(t,"is"),e.is=t})(Zu||(Zu={})),bg=[`
  2. `,`\r
  3. `,"\r"],(function(e){function t(s,o,l,c){return new Mh(s,o,l,c)}i(t,"create"),e.create=t;function r(s){let o=s;return!!($.defined(o)&&$.string(o.uri)&&($.undefined(o.languageId)||$.string(o.languageId))&&$.uinteger(o.lineCount)&&$.func(o.getText)&&$.func(o.positionAt)&&$.func(o.offsetAt))}i(r,"is"),e.is=r;function n(s,o){let l=s.getText(),c=a(o,(d,f)=>{let h=d.range.start.line-f.range.start.line;return h===0?d.range.start.character-f.range.start.character:h}),u=l.length;for(let d=c.length-1;d>=0;d--){let f=c[d],h=s.offsetAt(f.range.start),y=s.offsetAt(f.range.end);if(y<=u)l=l.substring(0,h)+f.newText+l.substring(y,l.length);else throw new Error("Overlapping edit");u=h}return l}i(n,"applyEdits"),e.applyEdits=n;function a(s,o){if(s.length<=1)return s;const l=s.length/2|0,c=s.slice(0,l),u=s.slice(l);a(c,o),a(u,o);let d=0,f=0,h=0;for(;d<c.length&&f<u.length;)o(c[d],u[f])<=0?s[h++]=c[d++]:s[h++]=u[f++];for(;d<c.length;)s[h++]=c[d++];for(;f<u.length;)s[h++]=u[f++];return s}i(a,"mergeSort")})(Qu||(Qu={})),Mh=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(y){return typeof y<"u"}i(r,"defined"),e.defined=r;function n(y){return typeof y>"u"}i(n,"undefined"),e.undefined=n;function a(y){return y===!0||y===!1}i(a,"boolean"),e.boolean=a;function s(y){return t.call(y)==="[object String]"}i(s,"string"),e.string=s;function o(y){return t.call(y)==="[object Number]"}i(o,"number"),e.number=o;function l(y,v,C){return t.call(y)==="[object Number]"&&v<=y&&y<=C}i(l,"numberRange"),e.numberRange=l;function c(y){return t.call(y)==="[object Number]"&&-2147483648<=y&&y<=2147483647}i(c,"integer"),e.integer=c;function u(y){return t.call(y)==="[object Number]"&&0<=y&&y<=2147483647}i(u,"uinteger"),e.uinteger=u;function d(y){return t.call(y)==="[object Function]"}i(d,"func"),e.func=d;function f(y){return y!==null&&typeof y=="object"}i(f,"objectLiteral"),e.objectLiteral=f;function h(y,v){return Array.isArray(y)&&y.every(v)}i(h,"typedArray"),e.typedArray=h})($||($={}))}}),kn=V({"../../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}}),Cs=V({"../../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(c){return c===!0||c===!1}i(t,"boolean"),e.boolean=t;function r(c){return typeof c=="string"||c instanceof String}i(r,"string"),e.string=r;function n(c){return typeof c=="number"||c instanceof Number}i(n,"number"),e.number=n;function a(c){return c instanceof Error}i(a,"error"),e.error=a;function s(c){return typeof c=="function"}i(s,"func"),e.func=s;function o(c){return Array.isArray(c)}i(o,"array"),e.array=o;function l(c){return o(c)&&c.every(u=>r(u))}i(l,"stringArray"),e.stringArray=l}}),qa=V({"../../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=kn(),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 c=0,u=this._callbacks.length;c<u;c++)if(this._callbacks[c]===s)if(this._contexts[c]===o){this._callbacks.splice(c,1),this._contexts.splice(c,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),c=this._contexts.slice(0);for(let u=0,d=l.length;u<d;u++)try{o.push(l[u].apply(c[u],s))}catch(f){(0,t.default)().console.error(f)}return o}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},a=class wg{static{i(this,"Emitter")}constructor(o){this._options=o}get event(){return this._event||(this._event=(o,l,c)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(o,l);const u={dispose:i(()=>{this._callbacks&&(this._callbacks.remove(o,l),u.dispose=wg._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(c)&&c.push(u),u}),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(){}}}),El=V({"../../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=kn(),r=Cs(),n=qa(),a;(function(c){c.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),c.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n.Event.None});function u(d){const f=d;return f&&(f===c.None||f===c.Cancelled||r.boolean(f.isCancellationRequested)&&!!f.onCancellationRequested)}i(u,"is"),c.is=u})(a||(e.CancellationToken=a={}));var s=Object.freeze(function(c,u){const d=(0,t.default)().timer.setTimeout(c.bind(u),0);return{dispose(){d.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}}),Ig=V({"../../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=Cs(),r;(function(g){g.ParseError=-32700,g.InvalidRequest=-32600,g.MethodNotFound=-32601,g.InvalidParams=-32602,g.InternalError=-32603,g.jsonrpcReservedErrorRangeStart=-32099,g.serverErrorStart=-32099,g.MessageWriteError=-32099,g.MessageReadError=-32098,g.PendingResponseRejected=-32097,g.ConnectionInactive=-32096,g.ServerNotInitialized=-32002,g.UnknownErrorCode=-32001,g.jsonrpcReservedErrorRangeEnd=-32e3,g.serverErrorEnd=-32e3})(r||(e.ErrorCodes=r={}));var n=class Ng extends Error{static{i(this,"ResponseError")}constructor(E,T,R){super(T),this.code=t.number(E)?E:r.UnknownErrorCode,this.data=R,Object.setPrototypeOf(this,Ng.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 vo{static{i(this,"ParameterStructures")}constructor(E){this.kind=E}static is(E){return E===vo.auto||E===vo.byName||E===vo.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(g,E){this.method=g,this.numberOfParams=E}get parameterStructures(){return a.auto}};e.AbstractMessageSignature=s;var o=class extends s{static{i(this,"RequestType0")}constructor(g){super(g,0)}};e.RequestType0=o;var l=class extends s{static{i(this,"RequestType")}constructor(g,E=a.auto){super(g,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.RequestType=l;var c=class extends s{static{i(this,"RequestType1")}constructor(g,E=a.auto){super(g,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.RequestType1=c;var u=class extends s{static{i(this,"RequestType2")}constructor(g){super(g,2)}};e.RequestType2=u;var d=class extends s{static{i(this,"RequestType3")}constructor(g){super(g,3)}};e.RequestType3=d;var f=class extends s{static{i(this,"RequestType4")}constructor(g){super(g,4)}};e.RequestType4=f;var h=class extends s{static{i(this,"RequestType5")}constructor(g){super(g,5)}};e.RequestType5=h;var y=class extends s{static{i(this,"RequestType6")}constructor(g){super(g,6)}};e.RequestType6=y;var v=class extends s{static{i(this,"RequestType7")}constructor(g){super(g,7)}};e.RequestType7=v;var C=class extends s{static{i(this,"RequestType8")}constructor(g){super(g,8)}};e.RequestType8=C;var b=class extends s{static{i(this,"RequestType9")}constructor(g){super(g,9)}};e.RequestType9=b;var w=class extends s{static{i(this,"NotificationType")}constructor(g,E=a.auto){super(g,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.NotificationType=w;var I=class extends s{static{i(this,"NotificationType0")}constructor(g){super(g,0)}};e.NotificationType0=I;var A=class extends s{static{i(this,"NotificationType1")}constructor(g,E=a.auto){super(g,1),this._parameterStructures=E}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=A;var k=class extends s{static{i(this,"NotificationType2")}constructor(g){super(g,2)}};e.NotificationType2=k;var G=class extends s{static{i(this,"NotificationType3")}constructor(g){super(g,3)}};e.NotificationType3=G;var H=class extends s{static{i(this,"NotificationType4")}constructor(g){super(g,4)}};e.NotificationType4=H;var X=class extends s{static{i(this,"NotificationType5")}constructor(g){super(g,5)}};e.NotificationType5=X;var le=class extends s{static{i(this,"NotificationType6")}constructor(g){super(g,6)}};e.NotificationType6=le;var ce=class extends s{static{i(this,"NotificationType7")}constructor(g){super(g,7)}};e.NotificationType7=ce;var Ne=class extends s{static{i(this,"NotificationType8")}constructor(g){super(g,8)}};e.NotificationType8=Ne;var P=class extends s{static{i(this,"NotificationType9")}constructor(g){super(g,9)}};e.NotificationType9=P;var _;(function(g){function E(S){const O=S;return O&&t.string(O.method)&&(t.string(O.id)||t.number(O.id))}i(E,"isRequest"),g.isRequest=E;function T(S){const O=S;return O&&t.string(O.method)&&S.id===void 0}i(T,"isNotification"),g.isNotification=T;function R(S){const O=S;return O&&(O.result!==void 0||!!O.error)&&(t.string(O.id)||t.number(O.id)||O.id===null)}i(R,"isResponse"),g.isResponse=R})(_||(e.Message=_={}))}}),kg=V({"../../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 c=this._map.get(s);if(c)c.value=o,l!==r.None&&this.touch(c,l);else{switch(c={key:s,value:o,next:void 0,previous:void 0},l){case r.None:this.addItemLast(c);break;case r.First:this.addItemFirst(c);break;case r.Last:this.addItemLast(c);break;default:this.addItemLast(c);break}this._map.set(s,c),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 c=this._head;for(;c;){if(o?s.bind(o)(c.value,c.key,this):s(c.value,c.key,this),this._state!==l)throw new Error("LinkedMap got modified during iteration.");c=c.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 c={value:o.key,done:!1};return o=o.next,c}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 c={value:o.value,done:!1};return o=o.next,c}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 c={value:[o.key,o.value],done:!1};return o=o.next,c}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,c=s.previous;s===this._tail?(c.next=void 0,this._tail=c):(l.previous=c,c.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,c=s.previous;s===this._head?(l.previous=void 0,this._head=l):(l.previous=c,c.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}}),aw=V({"../../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={}))}}),iw=V({"../../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=El(),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 c=new SharedArrayBuffer(4),u=new Int32Array(c,0,1);u[0]=r.Continue,this.buffers.set(l.id,c),l.$cancellationData=c}async sendCancellation(l,c){const u=this.buffers.get(c);if(u===void 0)return;const d=new Int32Array(u,0,1);Atomics.store(d,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 c=l.$cancellationData;return c===void 0?new t.CancellationTokenSource:new s(c)}};e.SharedArrayReceiverStrategy=o}}),Pg=V({"../../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=kn(),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}}),sw=V({"../../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=kn(),r=Cs(),n=qa(),a=Pg(),s;(function(u){function d(f){let h=f;return h&&r.func(h.listen)&&r.func(h.dispose)&&r.func(h.onError)&&r.func(h.onClose)&&r.func(h.onPartialMessage)}i(d,"is"),u.is=d})(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(u){this.errorEmitter.fire(this.asError(u))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(u){this.partialMessageEmitter.fire(u)}asError(u){return u instanceof Error?u:new Error(`Reader received error. Reason: ${r.string(u.message)?u.message:"unknown"}`)}};e.AbstractMessageReader=o;var l;(function(u){function d(f){let h,y;const v=new Map;let C;const b=new Map;if(f===void 0||typeof f=="string")h=f??"utf-8";else{if(h=f.charset??"utf-8",f.contentDecoder!==void 0&&(y=f.contentDecoder,v.set(y.name,y)),f.contentDecoders!==void 0)for(const w of f.contentDecoders)v.set(w.name,w);if(f.contentTypeDecoder!==void 0&&(C=f.contentTypeDecoder,b.set(C.name,C)),f.contentTypeDecoders!==void 0)for(const w of f.contentTypeDecoders)b.set(w.name,w)}return C===void 0&&(C=(0,t.default)().applicationJson.decoder,b.set(C.name,C)),{charset:h,contentDecoder:y,contentDecoders:v,contentTypeDecoder:C,contentTypeDecoders:b}}i(d,"fromOptions"),u.fromOptions=d})(l||(l={}));var c=class extends o{static{i(this,"ReadableStreamMessageReader")}constructor(u,d){super(),this.readable=u,this.options=l.fromOptions(d),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(u){this._partialMessageTimeout=u}get partialMessageTimeout(){return this._partialMessageTimeout}listen(u){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=u;const d=this.readable.onData(f=>{this.onData(f)});return this.readable.onError(f=>this.fireError(f)),this.readable.onClose(()=>this.fireClose()),d}onData(u){try{for(this.buffer.append(u);;){if(this.nextMessageLength===-1){const f=this.buffer.tryReadHeaders(!0);if(!f)return;const h=f.get("content-length");if(!h){this.fireError(new Error(`Header must provide a Content-Length property.
  6. ${JSON.stringify(Object.fromEntries(f))}`));return}const y=parseInt(h);if(isNaN(y)){this.fireError(new Error(`Content-Length value must be a number. Got ${h}`));return}this.nextMessageLength=y}const d=this.buffer.tryReadBody(this.nextMessageLength);if(d===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const f=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(d):d,h=await this.options.contentTypeDecoder.decode(f,this.options);this.callback(h)}).catch(f=>{this.fireError(f)})}}catch(d){this.fireError(d)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((u,d)=>{this.partialMessageTimer=void 0,u===this.messageToken&&(this.firePartialMessage({messageToken:u,waitingTime:d}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};e.ReadableStreamMessageReader=c}}),ow=V({"../../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=kn(),r=Cs(),n=Pg(),a=qa(),s="Content-Length: ",o=`\r
  7. `,l;(function(f){function h(y){let v=y;return v&&r.func(v.dispose)&&r.func(v.onClose)&&r.func(v.onError)&&r.func(v.write)}i(h,"is"),f.is=h})(l||(e.MessageWriter=l={}));var c=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(f,h,y){this.errorEmitter.fire([this.asError(f),h,y])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(f){return f instanceof Error?f:new Error(`Writer received error. Reason: ${r.string(f.message)?f.message:"unknown"}`)}};e.AbstractMessageWriter=c;var u;(function(f){function h(y){return y===void 0||typeof y=="string"?{charset:y??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:y.charset??"utf-8",contentEncoder:y.contentEncoder,contentTypeEncoder:y.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}i(h,"fromOptions"),f.fromOptions=h})(u||(u={}));var d=class extends c{static{i(this,"WriteableStreamMessageWriter")}constructor(f,h){super(),this.writable=f,this.options=u.fromOptions(h),this.errorCount=0,this.writeSemaphore=new n.Semaphore(1),this.writable.onError(y=>this.fireError(y)),this.writable.onClose(()=>this.fireClose())}async write(f){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(f,this.options).then(y=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(y):y).then(y=>{const v=[];return v.push(s,y.byteLength.toString(),o),v.push(o),this.doWrite(f,v,y)},y=>{throw this.fireError(y),y}))}async doWrite(f,h,y){try{return await this.writable.write(h.join(""),"ascii"),this.writable.write(y)}catch(v){return this.handleError(v,f),Promise.reject(v)}}handleError(f,h){this.errorCount++,this.fireError(f,h,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=d}}),lw=V({"../../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,c=0,u=0;e:for(;l<this._chunks.length;){const y=this._chunks[l];for(c=0;c<y.length;){switch(y[c]){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,c++;break e;default:o=0}break;default:o=0}c++}u+=y.byteLength,l++}if(o!==4)return;const d=this._read(u+c),f=new Map,h=this.toString(d,"ascii").split(n);if(h.length<2)return f;for(let y=0;y<h.length-2;y++){const v=h[y],C=v.indexOf(":");if(C===-1)throw new Error(`Message header must separate key and value using ':'
  9. ${v}`);const b=v.substr(0,C),w=v.substr(C+1).trim();f.set(s?b.toLowerCase():b,w)}return f}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 u=this._chunks[0];return this._chunks.shift(),this._totalLength-=s,this.asNative(u)}if(this._chunks[0].byteLength>s){const u=this._chunks[0],d=this.asNative(u,s);return this._chunks[0]=u.slice(s),this._totalLength-=s,d}const o=this.allocNative(s);let l=0,c=0;for(;s>0;){const u=this._chunks[c];if(u.byteLength>s){const d=u.slice(0,s);o.set(d,l),l+=s,this._chunks[c]=u.slice(s),this._totalLength-=s,s-=s}else o.set(u,l),l+=u.byteLength,this._chunks.shift(),this._totalLength-=u.byteLength,s-=u.byteLength}return o}};e.AbstractMessageBuffer=a}}),cw=V({"../../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=kn(),r=Cs(),n=Ig(),a=kg(),s=qa(),o=El(),l;(function(g){g.type=new n.NotificationType("$/cancelRequest")})(l||(l={}));var c;(function(g){function E(T){return typeof T=="string"||typeof T=="number"}i(E,"is"),g.is=E})(c||(e.ProgressToken=c={}));var u;(function(g){g.type=new n.NotificationType("$/progress")})(u||(u={}));var d=class{static{i(this,"ProgressType")}constructor(){}};e.ProgressType=d;var f;(function(g){function E(T){return r.func(T)}i(E,"is"),g.is=E})(f||(f={})),e.NullLogger=Object.freeze({error:i(()=>{},"error"),warn:i(()=>{},"warn"),info:i(()=>{},"info"),log:i(()=>{},"log")});var h;(function(g){g[g.Off=0]="Off",g[g.Messages=1]="Messages",g[g.Compact=2]="Compact",g[g.Verbose=3]="Verbose"})(h||(e.Trace=h={}));var y;(function(g){g.Off="off",g.Messages="messages",g.Compact="compact",g.Verbose="verbose"})(y||(e.TraceValues=y={})),(function(g){function E(R){if(!r.string(R))return g.Off;switch(R=R.toLowerCase(),R){case"off":return g.Off;case"messages":return g.Messages;case"compact":return g.Compact;case"verbose":return g.Verbose;default:return g.Off}}i(E,"fromString"),g.fromString=E;function T(R){switch(R){case g.Off:return"off";case g.Messages:return"messages";case g.Compact:return"compact";case g.Verbose:return"verbose";default:return"off"}}i(T,"toString"),g.toString=T})(h||(e.Trace=h={}));var v;(function(g){g.Text="text",g.JSON="json"})(v||(e.TraceFormat=v={})),(function(g){function E(T){return r.string(T)?(T=T.toLowerCase(),T==="json"?g.JSON:g.Text):g.Text}i(E,"fromString"),g.fromString=E})(v||(e.TraceFormat=v={}));var C;(function(g){g.type=new n.NotificationType("$/setTrace")})(C||(e.SetTraceNotification=C={}));var b;(function(g){g.type=new n.NotificationType("$/logTrace")})(b||(e.LogTraceNotification=b={}));var w;(function(g){g[g.Closed=1]="Closed",g[g.Disposed=2]="Disposed",g[g.AlreadyListening=3]="AlreadyListening"})(w||(e.ConnectionErrors=w={}));var I=class Og extends Error{static{i(this,"ConnectionError")}constructor(E,T){super(T),this.code=E,Object.setPrototypeOf(this,Og.prototype)}};e.ConnectionError=I;var A;(function(g){function E(T){const R=T;return R&&r.func(R.cancelUndispatched)}i(E,"is"),g.is=E})(A||(e.ConnectionStrategy=A={}));var k;(function(g){function E(T){const R=T;return R&&(R.kind===void 0||R.kind==="id")&&r.func(R.createCancellationTokenSource)&&(R.dispose===void 0||r.func(R.dispose))}i(E,"is"),g.is=E})(k||(e.IdCancellationReceiverStrategy=k={}));var G;(function(g){function E(T){const R=T;return R&&R.kind==="request"&&r.func(R.createCancellationTokenSource)&&(R.dispose===void 0||r.func(R.dispose))}i(E,"is"),g.is=E})(G||(e.RequestCancellationReceiverStrategy=G={}));var H;(function(g){g.Message=Object.freeze({createCancellationTokenSource(T){return new o.CancellationTokenSource}});function E(T){return k.is(T)||G.is(T)}i(E,"is"),g.is=E})(H||(e.CancellationReceiverStrategy=H={}));var X;(function(g){g.Message=Object.freeze({sendCancellation(T,R){return T.sendNotification(l.type,{id:R})},cleanup(T){}});function E(T){const R=T;return R&&r.func(R.sendCancellation)&&r.func(R.cleanup)}i(E,"is"),g.is=E})(X||(e.CancellationSenderStrategy=X={}));var le;(function(g){g.Message=Object.freeze({receiver:H.Message,sender:X.Message});function E(T){const R=T;return R&&H.is(R.receiver)&&X.is(R.sender)}i(E,"is"),g.is=E})(le||(e.CancellationStrategy=le={}));var ce;(function(g){function E(T){const R=T;return R&&r.func(R.handleMessage)}i(E,"is"),g.is=E})(ce||(e.MessageStrategy=ce={}));var Ne;(function(g){function E(T){const R=T;return R&&(le.is(R.cancellationStrategy)||A.is(R.connectionStrategy)||ce.is(R.messageStrategy))}i(E,"is"),g.is=E})(Ne||(e.ConnectionOptions=Ne={}));var P;(function(g){g[g.New=1]="New",g[g.Listening=2]="Listening",g[g.Closed=3]="Closed",g[g.Disposed=4]="Disposed"})(P||(P={}));function _(g,E,T,R){const S=T!==void 0?T:e.NullLogger;let O=0,M=0,D=0;const z="2.0";let B;const Z=new Map;let J;const te=new Map,de=new Map;let ct,Re=new a.LinkedMap,Oe=new Map,qe=new Set,Se=new Map,Q=h.Off,rt=v.Text,me,Nt=P.New;const Zn=new s.Emitter,ri=new s.Emitter,ni=new s.Emitter,ai=new s.Emitter,ii=new s.Emitter,kt=R&&R.cancellationStrategy?R.cancellationStrategy:le.Message;function Qn(m){if(m===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+m.toString()}i(Qn,"createRequestQueueKey");function si(m){return m===null?"res-unknown-"+(++D).toString():"res-"+m.toString()}i(si,"createResponseQueueKey");function oi(){return"not-"+(++M).toString()}i(oi,"createNotificationQueueKey");function li(m,N){n.Message.isRequest(N)?m.set(Qn(N.id),N):n.Message.isResponse(N)?m.set(si(N.id),N):m.set(oi(),N)}i(li,"addMessageToQueue");function ci(m){}i(ci,"cancelUndispatched");function ea(){return Nt===P.Listening}i(ea,"isListening");function ta(){return Nt===P.Closed}i(ta,"isClosed");function zt(){return Nt===P.Disposed}i(zt,"isDisposed");function ra(){(Nt===P.New||Nt===P.Listening)&&(Nt=P.Closed,ri.fire(void 0))}i(ra,"closeHandler");function ui(m){Zn.fire([m,void 0,void 0])}i(ui,"readErrorHandler");function di(m){Zn.fire(m)}i(di,"writeErrorHandler"),g.onClose(ra),g.onError(ui),E.onClose(ra),E.onError(di);function na(){ct||Re.size===0||(ct=(0,t.default)().timer.setImmediate(()=>{ct=void 0,fi()}))}i(na,"triggerMessageQueue");function aa(m){n.Message.isRequest(m)?pi(m):n.Message.isNotification(m)?mi(m):n.Message.isResponse(m)?hi(m):gi(m)}i(aa,"handleMessage");function fi(){if(Re.size===0)return;const m=Re.shift();try{const N=R?.messageStrategy;ce.is(N)?N.handleMessage(m,aa):aa(m)}finally{na()}}i(fi,"processMessageQueue");const qs=i(m=>{try{if(n.Message.isNotification(m)&&m.method===l.type.method){const N=m.params.id,L=Qn(N),x=Re.get(L);if(n.Message.isRequest(x)){const ue=R?.connectionStrategy,be=ue&&ue.cancelUndispatched?ue.cancelUndispatched(x,ci):void 0;if(be&&(be.error!==void 0||be.result!==void 0)){Re.delete(L),Se.delete(N),be.id=x.id,Pr(be,m.method,Date.now()),E.write(be).catch(()=>S.error("Sending response for canceled message failed."));return}}const ge=Se.get(N);if(ge!==void 0){ge.cancel(),Yr(m);return}else qe.add(N)}li(Re,m)}finally{na()}},"callback");function pi(m){if(zt())return;function N(re,Ee,se){const De={jsonrpc:z,id:m.id};re instanceof n.ResponseError?De.error=re.toJson():De.result=re===void 0?null:re,Pr(De,Ee,se),E.write(De).catch(()=>S.error("Sending response failed."))}i(N,"reply");function L(re,Ee,se){const De={jsonrpc:z,id:m.id,error:re.toJson()};Pr(De,Ee,se),E.write(De).catch(()=>S.error("Sending response failed."))}i(L,"replyError");function x(re,Ee,se){re===void 0&&(re=null);const De={jsonrpc:z,id:m.id,result:re};Pr(De,Ee,se),E.write(De).catch(()=>S.error("Sending response failed."))}i(x,"replySuccess"),Ti(m);const ge=Z.get(m.method);let ue,be;ge&&(ue=ge.type,be=ge.handler);const ke=Date.now();if(be||B){const re=m.id??String(Date.now()),Ee=k.is(kt.receiver)?kt.receiver.createCancellationTokenSource(re):kt.receiver.createCancellationTokenSource(m);m.id!==null&&qe.has(m.id)&&Ee.cancel(),m.id!==null&&Se.set(re,Ee);try{let se;if(be)if(m.params===void 0){if(ue!==void 0&&ue.numberOfParams!==0){L(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${m.method} defines ${ue.numberOfParams} params but received none.`),m.method,ke);return}se=be(Ee.token)}else if(Array.isArray(m.params)){if(ue!==void 0&&ue.parameterStructures===n.ParameterStructures.byName){L(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${m.method} defines parameters by name but received parameters by position`),m.method,ke);return}se=be(...m.params,Ee.token)}else{if(ue!==void 0&&ue.parameterStructures===n.ParameterStructures.byPosition){L(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${m.method} defines parameters by position but received parameters by name`),m.method,ke);return}se=be(m.params,Ee.token)}else B&&(se=B(m.method,m.params,Ee.token));const De=se;se?De.then?De.then(We=>{Se.delete(re),N(We,m.method,ke)},We=>{Se.delete(re),We instanceof n.ResponseError?L(We,m.method,ke):We&&r.string(We.message)?L(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${m.method} failed with message: ${We.message}`),m.method,ke):L(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${m.method} failed unexpectedly without providing any details.`),m.method,ke)}):(Se.delete(re),N(se,m.method,ke)):(Se.delete(re),x(se,m.method,ke))}catch(se){Se.delete(re),se instanceof n.ResponseError?N(se,m.method,ke):se&&r.string(se.message)?L(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${m.method} failed with message: ${se.message}`),m.method,ke):L(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${m.method} failed unexpectedly without providing any details.`),m.method,ke)}}else L(new n.ResponseError(n.ErrorCodes.MethodNotFound,`Unhandled method ${m.method}`),m.method,ke)}i(pi,"handleRequest");function hi(m){if(!zt())if(m.id===null)m.error?S.error(`Received response message without id: Error is:
  10. ${JSON.stringify(m.error,void 0,4)}`):S.error("Received response message without id. No further error information provided.");else{const N=m.id,L=Oe.get(N);if(Ri(m,L),L!==void 0){Oe.delete(N);try{if(m.error){const x=m.error;L.reject(new n.ResponseError(x.code,x.message,x.data))}else if(m.result!==void 0)L.resolve(m.result);else throw new Error("Should never happen.")}catch(x){x.message?S.error(`Response handler '${L.method}' failed with message: ${x.message}`):S.error(`Response handler '${L.method}' failed unexpectedly.`)}}}}i(hi,"handleResponse");function mi(m){if(zt())return;let N,L;if(m.method===l.type.method){const x=m.params.id;qe.delete(x),Yr(m);return}else{const x=te.get(m.method);x&&(L=x.handler,N=x.type)}if(L||J)try{if(Yr(m),L)if(m.params===void 0)N!==void 0&&N.numberOfParams!==0&&N.parameterStructures!==n.ParameterStructures.byName&&S.error(`Notification ${m.method} defines ${N.numberOfParams} params but received none.`),L();else if(Array.isArray(m.params)){const x=m.params;m.method===u.type.method&&x.length===2&&c.is(x[0])?L({token:x[0],value:x[1]}):(N!==void 0&&(N.parameterStructures===n.ParameterStructures.byName&&S.error(`Notification ${m.method} defines parameters by name but received parameters by position`),N.numberOfParams!==m.params.length&&S.error(`Notification ${m.method} defines ${N.numberOfParams} params but received ${x.length} arguments`)),L(...x))}else N!==void 0&&N.parameterStructures===n.ParameterStructures.byPosition&&S.error(`Notification ${m.method} defines parameters by position but received parameters by name`),L(m.params);else J&&J(m.method,m.params)}catch(x){x.message?S.error(`Notification handler '${m.method}' failed with message: ${x.message}`):S.error(`Notification handler '${m.method}' failed unexpectedly.`)}else ni.fire(m)}i(mi,"handleNotification");function gi(m){if(!m){S.error("Received empty message.");return}S.error(`Received message which is neither a response nor a notification message:
  11. ${JSON.stringify(m,null,4)}`);const N=m;if(r.string(N.id)||r.number(N.id)){const L=N.id,x=Oe.get(L);x&&x.reject(new Error("The received response has neither a result nor an error property."))}}i(gi,"handleInvalidMessage");function $t(m){if(m!=null)switch(Q){case h.Verbose:return JSON.stringify(m,null,4);case h.Compact:return JSON.stringify(m);default:return}}i($t,"stringifyTrace");function yi(m){if(!(Q===h.Off||!me))if(rt===v.Text){let N;(Q===h.Verbose||Q===h.Compact)&&m.params&&(N=`Params: ${$t(m.params)}
  12. `),me.log(`Sending request '${m.method} - (${m.id})'.`,N)}else Bt("send-request",m)}i(yi,"traceSendingRequest");function vi(m){if(!(Q===h.Off||!me))if(rt===v.Text){let N;(Q===h.Verbose||Q===h.Compact)&&(m.params?N=`Params: ${$t(m.params)}
  13. `:N=`No parameters provided.
  14. `),me.log(`Sending notification '${m.method}'.`,N)}else Bt("send-notification",m)}i(vi,"traceSendingNotification");function Pr(m,N,L){if(!(Q===h.Off||!me))if(rt===v.Text){let x;(Q===h.Verbose||Q===h.Compact)&&(m.error&&m.error.data?x=`Error data: ${$t(m.error.data)}
  15. `:m.result?x=`Result: ${$t(m.result)}
  16. `:m.error===void 0&&(x=`No result returned.
  17. `)),me.log(`Sending response '${N} - (${m.id})'. Processing request took ${Date.now()-L}ms`,x)}else Bt("send-response",m)}i(Pr,"traceSendingResponse");function Ti(m){if(!(Q===h.Off||!me))if(rt===v.Text){let N;(Q===h.Verbose||Q===h.Compact)&&m.params&&(N=`Params: ${$t(m.params)}
  18. `),me.log(`Received request '${m.method} - (${m.id})'.`,N)}else Bt("receive-request",m)}i(Ti,"traceReceivedRequest");function Yr(m){if(!(Q===h.Off||!me||m.method===b.type.method))if(rt===v.Text){let N;(Q===h.Verbose||Q===h.Compact)&&(m.params?N=`Params: ${$t(m.params)}
  19. `:N=`No parameters provided.
  20. `),me.log(`Received notification '${m.method}'.`,N)}else Bt("receive-notification",m)}i(Yr,"traceReceivedNotification");function Ri(m,N){if(!(Q===h.Off||!me))if(rt===v.Text){let L;if((Q===h.Verbose||Q===h.Compact)&&(m.error&&m.error.data?L=`Error data: ${$t(m.error.data)}
  21. `:m.result?L=`Result: ${$t(m.result)}
  22. `:m.error===void 0&&(L=`No result returned.
  23. `)),N){const x=m.error?` Request failed: ${m.error.message} (${m.error.code}).`:"";me.log(`Received response '${N.method} - (${m.id})' in ${Date.now()-N.timerStart}ms.${x}`,L)}else me.log(`Received response ${m.id} without active response promise.`,L)}else Bt("receive-response",m)}i(Ri,"traceReceivedResponse");function Bt(m,N){if(!me||Q===h.Off)return;const L={isLSPMessage:!0,type:m,message:N,timestamp:Date.now()};me.log(L)}i(Bt,"logLSPMessage");function lr(){if(ta())throw new I(w.Closed,"Connection is closed.");if(zt())throw new I(w.Disposed,"Connection is disposed.")}i(lr,"throwIfClosedOrDisposed");function $i(){if(ea())throw new I(w.AlreadyListening,"Connection is already listening")}i($i,"throwIfListening");function Ai(){if(!ea())throw new Error("Call listen() first.")}i(Ai,"throwIfNotListening");function cr(m){return m===void 0?null:m}i(cr,"undefinedToNull");function ia(m){if(m!==null)return m}i(ia,"nullToUndefined");function p(m){return m!=null&&!Array.isArray(m)&&typeof m=="object"}i(p,"isNamedParam");function ae(m,N){switch(m){case n.ParameterStructures.auto:return p(N)?ia(N):[cr(N)];case n.ParameterStructures.byName:if(!p(N))throw new Error("Received parameters by name but param is not an object literal.");return ia(N);case n.ParameterStructures.byPosition:return[cr(N)];default:throw new Error(`Unknown parameter structure ${m.toString()}`)}}i(ae,"computeSingleParam");function $e(m,N){let L;const x=m.numberOfParams;switch(x){case 0:L=void 0;break;case 1:L=ae(m.parameterStructures,N[0]);break;default:L=[];for(let ge=0;ge<N.length&&ge<x;ge++)L.push(cr(N[ge]));if(N.length<x)for(let ge=N.length;ge<x;ge++)L.push(null);break}return L}i($e,"computeMessageParams");const W={sendNotification:i((m,...N)=>{lr();let L,x;if(r.string(m)){L=m;const ue=N[0];let be=0,ke=n.ParameterStructures.auto;n.ParameterStructures.is(ue)&&(be=1,ke=ue);let re=N.length;const Ee=re-be;switch(Ee){case 0:x=void 0;break;case 1:x=ae(ke,N[be]);break;default:if(ke===n.ParameterStructures.byName)throw new Error(`Received ${Ee} parameters for 'by Name' notification parameter structure.`);x=N.slice(be,re).map(se=>cr(se));break}}else{const ue=N;L=m.method,x=$e(m,ue)}const ge={jsonrpc:z,method:L,params:x};return vi(ge),E.write(ge).catch(ue=>{throw S.error("Sending notification failed."),ue})},"sendNotification"),onNotification:i((m,N)=>{lr();let L;return r.func(m)?J=m:N&&(r.string(m)?(L=m,te.set(m,{type:void 0,handler:N})):(L=m.method,te.set(m.method,{type:m,handler:N}))),{dispose:i(()=>{L!==void 0?te.delete(L):J=void 0},"dispose")}},"onNotification"),onProgress:i((m,N,L)=>{if(de.has(N))throw new Error(`Progress handler for token ${N} already registered`);return de.set(N,L),{dispose:i(()=>{de.delete(N)},"dispose")}},"onProgress"),sendProgress:i((m,N,L)=>W.sendNotification(u.type,{token:N,value:L}),"sendProgress"),onUnhandledProgress:ai.event,sendRequest:i((m,...N)=>{lr(),Ai();let L,x,ge;if(r.string(m)){L=m;const re=N[0],Ee=N[N.length-1];let se=0,De=n.ParameterStructures.auto;n.ParameterStructures.is(re)&&(se=1,De=re);let We=N.length;o.CancellationToken.is(Ee)&&(We=We-1,ge=Ee);const Kt=We-se;switch(Kt){case 0:x=void 0;break;case 1:x=ae(De,N[se]);break;default:if(De===n.ParameterStructures.byName)throw new Error(`Received ${Kt} parameters for 'by Name' request parameter structure.`);x=N.slice(se,We).map(Zb=>cr(Zb));break}}else{const re=N;L=m.method,x=$e(m,re);const Ee=m.numberOfParams;ge=o.CancellationToken.is(re[Ee])?re[Ee]:void 0}const ue=O++;let be;ge&&(be=ge.onCancellationRequested(()=>{const re=kt.sender.sendCancellation(W,ue);return re===void 0?(S.log(`Received no promise from cancellation strategy when cancelling id ${ue}`),Promise.resolve()):re.catch(()=>{S.log(`Sending cancellation messages for id ${ue} failed`)})}));const ke={jsonrpc:z,id:ue,method:L,params:x};return yi(ke),typeof kt.sender.enableCancellation=="function"&&kt.sender.enableCancellation(ke),new Promise(async(re,Ee)=>{const se=i(Kt=>{re(Kt),kt.sender.cleanup(ue),be?.dispose()},"resolveWithCleanup"),De=i(Kt=>{Ee(Kt),kt.sender.cleanup(ue),be?.dispose()},"rejectWithCleanup"),We={method:L,timerStart:Date.now(),resolve:se,reject:De};try{await E.write(ke),Oe.set(ue,We)}catch(Kt){throw S.error("Sending request failed."),We.reject(new n.ResponseError(n.ErrorCodes.MessageWriteError,Kt.message?Kt.message:"Unknown reason")),Kt}})},"sendRequest"),onRequest:i((m,N)=>{lr();let L=null;return f.is(m)?(L=void 0,B=m):r.string(m)?(L=null,N!==void 0&&(L=m,Z.set(m,{handler:N,type:void 0}))):N!==void 0&&(L=m.method,Z.set(m.method,{type:m,handler:N})),{dispose:i(()=>{L!==null&&(L!==void 0?Z.delete(L):B=void 0)},"dispose")}},"onRequest"),hasPendingResponse:i(()=>Oe.size>0,"hasPendingResponse"),trace:i(async(m,N,L)=>{let x=!1,ge=v.Text;L!==void 0&&(r.boolean(L)?x=L:(x=L.sendNotification||!1,ge=L.traceFormat||v.Text)),Q=m,rt=ge,Q===h.Off?me=void 0:me=N,x&&!ta()&&!zt()&&await W.sendNotification(C.type,{value:h.toString(m)})},"trace"),onError:Zn.event,onClose:ri.event,onUnhandledNotification:ni.event,onDispose:ii.event,end:i(()=>{E.end()},"end"),dispose:i(()=>{if(zt())return;Nt=P.Disposed,ii.fire(void 0);const m=new n.ResponseError(n.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const N of Oe.values())N.reject(m);Oe=new Map,Se=new Map,qe=new Set,Re=new a.LinkedMap,r.func(E.dispose)&&E.dispose(),r.func(g.dispose)&&g.dispose()},"dispose"),listen:i(()=>{lr(),$i(),Nt=P.Listening,g.listen(qs)},"listen"),inspect:i(()=>{(0,t.default)().console.log("inspect")},"inspect")};return W.onNotification(b.type,m=>{if(Q===h.Off||!me)return;const N=Q===h.Verbose||Q===h.Compact;me.log(m.message,N?m.verbose:void 0)}),W.onNotification(u.type,m=>{const N=de.get(m.token);N?N(m.value):ai.fire(m)}),W}i(_,"createMessageConnection"),e.createMessageConnection=_}}),ed=V({"../../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=Ig();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=aw();Object.defineProperty(e,"Disposable",{enumerable:!0,get:i(function(){return n.Disposable},"get")});var a=qa();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=El();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=iw();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=sw();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 c=ow();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:i(function(){return c.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:i(function(){return c.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:i(function(){return c.WriteableStreamMessageWriter},"get")});var u=lw();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:i(function(){return u.AbstractMessageBuffer},"get")});var d=cw();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:i(function(){return d.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:i(function(){return d.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:i(function(){return d.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:i(function(){return d.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:i(function(){return d.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:i(function(){return d.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:i(function(){return d.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:i(function(){return d.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:i(function(){return d.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:i(function(){return d.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:i(function(){return d.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:i(function(){return d.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:i(function(){return d.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:i(function(){return d.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:i(function(){return d.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:i(function(){return d.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:i(function(){return d.MessageStrategy},"get")});var f=kn();e.RAL=f.default}}),uw=V({"../../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=ed(),r=class Lg extends t.AbstractMessageBuffer{static{i(this,"MessageBuffer")}constructor(u="utf-8"){super(u),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return Lg.emptyBuffer}fromString(u,d){return new TextEncoder().encode(u)}toString(u,d){return d==="ascii"?this.asciiDecoder.decode(u):new TextDecoder(d).decode(u)}asNative(u,d){return d===void 0?u:u.slice(0,d)}allocNative(u){return new Uint8Array(u)}};r.emptyBuffer=new Uint8Array(0);var n=class{static{i(this,"ReadableStreamWrapper")}constructor(c){this.socket=c,this._onData=new t.Emitter,this._messageListener=u=>{u.data.arrayBuffer().then(f=>{this._onData.fire(new Uint8Array(f))},()=>{(0,t.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(c){return this.socket.addEventListener("close",c),t.Disposable.create(()=>this.socket.removeEventListener("close",c))}onError(c){return this.socket.addEventListener("error",c),t.Disposable.create(()=>this.socket.removeEventListener("error",c))}onEnd(c){return this.socket.addEventListener("end",c),t.Disposable.create(()=>this.socket.removeEventListener("end",c))}onData(c){return this._onData.event(c)}},a=class{static{i(this,"WritableStreamWrapper")}constructor(c){this.socket=c}onClose(c){return this.socket.addEventListener("close",c),t.Disposable.create(()=>this.socket.removeEventListener("close",c))}onError(c){return this.socket.addEventListener("error",c),t.Disposable.create(()=>this.socket.removeEventListener("error",c))}onEnd(c){return this.socket.addEventListener("end",c),t.Disposable.create(()=>this.socket.removeEventListener("end",c))}write(c,u){if(typeof c=="string"){if(u!==void 0&&u!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${u}`);this.socket.send(c)}else this.socket.send(c);return Promise.resolve()}end(){this.socket.close()}},s=new TextEncoder,o=Object.freeze({messageBuffer:Object.freeze({create:i(c=>new r(c),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:i((c,u)=>{if(u.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${u.charset}`);return Promise.resolve(s.encode(JSON.stringify(c,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:i((c,u)=>{if(!(c instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(u.charset).decode(c)))},"decode")})}),stream:Object.freeze({asReadableStream:i(c=>new n(c),"asReadableStream"),asWritableStream:i(c=>new a(c),"asWritableStream")}),console,timer:Object.freeze({setTimeout(c,u,...d){const f=setTimeout(c,u,...d);return{dispose:i(()=>clearTimeout(f),"dispose")}},setImmediate(c,...u){const d=setTimeout(c,0,...u);return{dispose:i(()=>clearTimeout(d),"dispose")}},setInterval(c,u,...d){const f=setInterval(c,u,...d);return{dispose:i(()=>clearInterval(f),"dispose")}}})});function l(){return o}i(l,"RIL"),(function(c){function u(){t.RAL.install(o)}i(u,"install"),c.install=u})(l||(l={})),e.default=l}}),Wa=V({"../../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(c,u,d,f){f===void 0&&(f=d);var h=Object.getOwnPropertyDescriptor(u,d);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:i(function(){return u[d]},"get")}),Object.defineProperty(c,f,h)}):(function(c,u,d,f){f===void 0&&(f=d),c[f]=u[d]})),r=e&&e.__exportStar||function(c,u){for(var d in c)d!=="default"&&!Object.prototype.hasOwnProperty.call(u,d)&&t(u,c,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0;var n=uw();n.default.install();var a=ed();r(ed(),e);var s=class extends a.AbstractMessageReader{static{i(this,"BrowserMessageReader")}constructor(c){super(),this._onData=new a.Emitter,this._messageListener=u=>{this._onData.fire(u.data)},c.addEventListener("error",u=>this.fireError(u)),c.onmessage=this._messageListener}listen(c){return this._onData.event(c)}};e.BrowserMessageReader=s;var o=class extends a.AbstractMessageWriter{static{i(this,"BrowserMessageWriter")}constructor(c){super(),this.port=c,this.errorCount=0,c.addEventListener("error",u=>this.fireError(u))}write(c){try{return this.port.postMessage(c),Promise.resolve()}catch(u){return this.handleError(u,c),Promise.reject(u)}}handleError(c,u){this.errorCount++,this.fireError(c,u,this.errorCount)}end(){}};e.BrowserMessageWriter=o;function l(c,u,d,f){return d===void 0&&(d=a.NullLogger),a.ConnectionStrategy.is(f)&&(f={connectionStrategy:f}),(0,a.createMessageConnection)(c,u,d,f)}i(l,"createMessageConnection"),e.createMessageConnection=l}}),xh=V({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){t.exports=Wa()}}),Ce=V({"../../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=Wa(),r;(function(c){c.clientToServer="clientToServer",c.serverToClient="serverToClient",c.both="both"})(r||(e.MessageDirection=r={}));var n=class{static{i(this,"RegistrationType")}constructor(c){this.method=c}};e.RegistrationType=n;var a=class extends t.RequestType0{static{i(this,"ProtocolRequestType0")}constructor(c){super(c)}};e.ProtocolRequestType0=a;var s=class extends t.RequestType{static{i(this,"ProtocolRequestType")}constructor(c){super(c,t.ParameterStructures.byName)}};e.ProtocolRequestType=s;var o=class extends t.NotificationType0{static{i(this,"ProtocolNotificationType0")}constructor(c){super(c)}};e.ProtocolNotificationType0=o;var l=class extends t.NotificationType{static{i(this,"ProtocolNotificationType")}constructor(c){super(c,t.ParameterStructures.byName)}};e.ProtocolNotificationType=l}}),Qd=V({"../../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(d){return d===!0||d===!1}i(t,"boolean"),e.boolean=t;function r(d){return typeof d=="string"||d instanceof String}i(r,"string"),e.string=r;function n(d){return typeof d=="number"||d instanceof Number}i(n,"number"),e.number=n;function a(d){return d instanceof Error}i(a,"error"),e.error=a;function s(d){return typeof d=="function"}i(s,"func"),e.func=s;function o(d){return Array.isArray(d)}i(o,"array"),e.array=o;function l(d){return o(d)&&d.every(f=>r(f))}i(l,"stringArray"),e.stringArray=l;function c(d,f){return Array.isArray(d)&&d.every(f)}i(c,"typedArray"),e.typedArray=c;function u(d){return d!==null&&typeof d=="object"}i(u,"objectLiteral"),e.objectLiteral=u}}),dw=V({"../../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=Ce(),r;(function(n){n.method="textDocument/implementation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ImplementationRequest=r={}))}}),fw=V({"../../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=Ce(),r;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.TypeDefinitionRequest=r={}))}}),pw=V({"../../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=Ce(),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={}))}}),hw=V({"../../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=Ce(),r;(function(n){n.method="workspace/configuration",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ConfigurationRequest=r={}))}}),mw=V({"../../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=Ce(),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={}))}}),gw=V({"../../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=Ce(),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={}))}}),yw=V({"../../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=Ce(),r;(function(n){n.method="textDocument/declaration",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.DeclarationRequest=r={}))}}),vw=V({"../../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=Ce(),r;(function(n){n.method="textDocument/selectionRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.SelectionRangeRequest=r={}))}}),Tw=V({"../../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=Wa(),r=Ce(),n;(function(o){o.type=new t.ProgressType;function l(c){return c===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={}))}}),Rw=V({"../../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=Ce(),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={}))}}),$w=V({"../../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=Ce(),r;(function(c){c.Relative="relative"})(r||(e.TokenFormat=r={}));var n;(function(c){c.method="textDocument/semanticTokens",c.type=new t.RegistrationType(c.method)})(n||(e.SemanticTokensRegistrationType=n={}));var a;(function(c){c.method="textDocument/semanticTokens/full",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method),c.registrationMethod=n.method})(a||(e.SemanticTokensRequest=a={}));var s;(function(c){c.method="textDocument/semanticTokens/full/delta",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method),c.registrationMethod=n.method})(s||(e.SemanticTokensDeltaRequest=s={}));var o;(function(c){c.method="textDocument/semanticTokens/range",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method),c.registrationMethod=n.method})(o||(e.SemanticTokensRangeRequest=o={}));var l;(function(c){c.method="workspace/semanticTokens/refresh",c.messageDirection=t.MessageDirection.serverToClient,c.type=new t.ProtocolRequestType0(c.method)})(l||(e.SemanticTokensRefreshRequest=l={}))}}),Aw=V({"../../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=Ce(),r;(function(n){n.method="window/showDocument",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ShowDocumentRequest=r={}))}}),Ew=V({"../../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=Ce(),r;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.LinkedEditingRangeRequest=r={}))}}),_w=V({"../../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=Ce(),r;(function(u){u.file="file",u.folder="folder"})(r||(e.FileOperationPatternKind=r={}));var n;(function(u){u.method="workspace/willCreateFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(n||(e.WillCreateFilesRequest=n={}));var a;(function(u){u.method="workspace/didCreateFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(a||(e.DidCreateFilesNotification=a={}));var s;(function(u){u.method="workspace/willRenameFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(s||(e.WillRenameFilesRequest=s={}));var o;(function(u){u.method="workspace/didRenameFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(o||(e.DidRenameFilesNotification=o={}));var l;(function(u){u.method="workspace/didDeleteFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(l||(e.DidDeleteFilesNotification=l={}));var c;(function(u){u.method="workspace/willDeleteFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(c||(e.WillDeleteFilesRequest=c={}))}}),Cw=V({"../../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=Ce(),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={}))}}),Sw=V({"../../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=Ce(),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={}))}}),bw=V({"../../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=Ce(),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={}))}}),ww=V({"../../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=Ce(),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={}))}}),Iw=V({"../../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=Wa(),r=Qd(),n=Ce(),a;(function(u){function d(f){const h=f;return h&&r.boolean(h.retriggerRequest)}i(d,"is"),u.is=d})(a||(e.DiagnosticServerCancellationData=a={}));var s;(function(u){u.Full="full",u.Unchanged="unchanged"})(s||(e.DocumentDiagnosticReportKind=s={}));var o;(function(u){u.method="textDocument/diagnostic",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolRequestType(u.method),u.partialResult=new t.ProgressType})(o||(e.DocumentDiagnosticRequest=o={}));var l;(function(u){u.method="workspace/diagnostic",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolRequestType(u.method),u.partialResult=new t.ProgressType})(l||(e.WorkspaceDiagnosticRequest=l={}));var c;(function(u){u.method="workspace/diagnostic/refresh",u.messageDirection=n.MessageDirection.serverToClient,u.type=new n.ProtocolRequestType0(u.method)})(c||(e.DiagnosticRefreshRequest=c={}))}}),Nw=V({"../../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=(_s(),Zd(Al)),r=Qd(),n=Ce(),a;(function(v){v.Markup=1,v.Code=2;function C(b){return b===1||b===2}i(C,"is"),v.is=C})(a||(e.NotebookCellKind=a={}));var s;(function(v){function C(I,A){const k={executionOrder:I};return(A===!0||A===!1)&&(k.success=A),k}i(C,"create"),v.create=C;function b(I){const A=I;return r.objectLiteral(A)&&t.uinteger.is(A.executionOrder)&&(A.success===void 0||r.boolean(A.success))}i(b,"is"),v.is=b;function w(I,A){return I===A?!0:I==null||A===null||A===void 0?!1:I.executionOrder===A.executionOrder&&I.success===A.success}i(w,"equals"),v.equals=w})(s||(e.ExecutionSummary=s={}));var o;(function(v){function C(A,k){return{kind:A,document:k}}i(C,"create"),v.create=C;function b(A){const k=A;return r.objectLiteral(k)&&a.is(k.kind)&&t.DocumentUri.is(k.document)&&(k.metadata===void 0||r.objectLiteral(k.metadata))}i(b,"is"),v.is=b;function w(A,k){const G=new Set;return A.document!==k.document&&G.add("document"),A.kind!==k.kind&&G.add("kind"),A.executionSummary!==k.executionSummary&&G.add("executionSummary"),(A.metadata!==void 0||k.metadata!==void 0)&&!I(A.metadata,k.metadata)&&G.add("metadata"),(A.executionSummary!==void 0||k.executionSummary!==void 0)&&!s.equals(A.executionSummary,k.executionSummary)&&G.add("executionSummary"),G}i(w,"diff"),v.diff=w;function I(A,k){if(A===k)return!0;if(A==null||k===null||k===void 0||typeof A!=typeof k||typeof A!="object")return!1;const G=Array.isArray(A),H=Array.isArray(k);if(G!==H)return!1;if(G&&H){if(A.length!==k.length)return!1;for(let X=0;X<A.length;X++)if(!I(A[X],k[X]))return!1}if(r.objectLiteral(A)&&r.objectLiteral(k)){const X=Object.keys(A),le=Object.keys(k);if(X.length!==le.length||(X.sort(),le.sort(),!I(X,le)))return!1;for(let ce=0;ce<X.length;ce++){const Ne=X[ce];if(!I(A[Ne],k[Ne]))return!1}}return!0}i(I,"equalsMetadata")})(o||(e.NotebookCell=o={}));var l;(function(v){function C(w,I,A,k){return{uri:w,notebookType:I,version:A,cells:k}}i(C,"create"),v.create=C;function b(w){const I=w;return r.objectLiteral(I)&&r.string(I.uri)&&t.integer.is(I.version)&&r.typedArray(I.cells,o.is)}i(b,"is"),v.is=b})(l||(e.NotebookDocument=l={}));var c;(function(v){v.method="notebookDocument/sync",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.RegistrationType(v.method)})(c||(e.NotebookDocumentSyncRegistrationType=c={}));var u;(function(v){v.method="notebookDocument/didOpen",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.ProtocolNotificationType(v.method),v.registrationMethod=c.method})(u||(e.DidOpenNotebookDocumentNotification=u={}));var d;(function(v){function C(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(C,"is"),v.is=C;function b(w,I,A){const k={start:w,deleteCount:I};return A!==void 0&&(k.cells=A),k}i(b,"create"),v.create=b})(d||(e.NotebookCellArrayChange=d={}));var f;(function(v){v.method="notebookDocument/didChange",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.ProtocolNotificationType(v.method),v.registrationMethod=c.method})(f||(e.DidChangeNotebookDocumentNotification=f={}));var h;(function(v){v.method="notebookDocument/didSave",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.ProtocolNotificationType(v.method),v.registrationMethod=c.method})(h||(e.DidSaveNotebookDocumentNotification=h={}));var y;(function(v){v.method="notebookDocument/didClose",v.messageDirection=n.MessageDirection.clientToServer,v.type=new n.ProtocolNotificationType(v.method),v.registrationMethod=c.method})(y||(e.DidCloseNotebookDocumentNotification=y={}))}}),kw=V({"../../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=Ce(),r;(function(n){n.method="textDocument/inlineCompletion",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.InlineCompletionRequest=r={}))}}),Pw=V({"../../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=Ce(),r=(_s(),Zd(Al)),n=Qd(),a=dw();Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:i(function(){return a.ImplementationRequest},"get")});var s=fw();Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:i(function(){return s.TypeDefinitionRequest},"get")});var o=pw();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=hw();Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:i(function(){return l.ConfigurationRequest},"get")});var c=mw();Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:i(function(){return c.DocumentColorRequest},"get")}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:i(function(){return c.ColorPresentationRequest},"get")});var u=gw();Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:i(function(){return u.FoldingRangeRequest},"get")}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:i(function(){return u.FoldingRangeRefreshRequest},"get")});var d=yw();Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:i(function(){return d.DeclarationRequest},"get")});var f=vw();Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:i(function(){return f.SelectionRangeRequest},"get")});var h=Tw();Object.defineProperty(e,"WorkDoneProgress",{enumerable:!0,get:i(function(){return h.WorkDoneProgress},"get")}),Object.defineProperty(e,"WorkDoneProgressCreateRequest",{enumerable:!0,get:i(function(){return h.WorkDoneProgressCreateRequest},"get")}),Object.defineProperty(e,"WorkDoneProgressCancelNotification",{enumerable:!0,get:i(function(){return h.WorkDoneProgressCancelNotification},"get")});var y=Rw();Object.defineProperty(e,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:i(function(){return y.CallHierarchyIncomingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:i(function(){return y.CallHierarchyOutgoingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyPrepareRequest",{enumerable:!0,get:i(function(){return y.CallHierarchyPrepareRequest},"get")});var v=$w();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 C=Aw();Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:i(function(){return C.ShowDocumentRequest},"get")});var b=Ew();Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:i(function(){return b.LinkedEditingRangeRequest},"get")});var w=_w();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=Cw();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 A=Sw();Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:i(function(){return A.TypeHierarchyPrepareRequest},"get")}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:i(function(){return A.TypeHierarchySubtypesRequest},"get")}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:i(function(){return A.TypeHierarchySupertypesRequest},"get")});var k=bw();Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:i(function(){return k.InlineValueRequest},"get")}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:i(function(){return k.InlineValueRefreshRequest},"get")});var G=ww();Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:i(function(){return G.InlayHintRequest},"get")}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:i(function(){return G.InlayHintResolveRequest},"get")}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:i(function(){return G.InlayHintRefreshRequest},"get")});var H=Iw();Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:i(function(){return H.DiagnosticServerCancellationData},"get")}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:i(function(){return H.DocumentDiagnosticReportKind},"get")}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:i(function(){return H.DocumentDiagnosticRequest},"get")}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:i(function(){return H.WorkspaceDiagnosticRequest},"get")}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:i(function(){return H.DiagnosticRefreshRequest},"get")});var X=Nw();Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:i(function(){return X.NotebookCellKind},"get")}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:i(function(){return X.ExecutionSummary},"get")}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:i(function(){return X.NotebookCell},"get")}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:i(function(){return X.NotebookDocument},"get")}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:i(function(){return X.NotebookDocumentSyncRegistrationType},"get")}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:i(function(){return X.DidOpenNotebookDocumentNotification},"get")}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:i(function(){return X.NotebookCellArrayChange},"get")}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:i(function(){return X.DidChangeNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:i(function(){return X.DidSaveNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:i(function(){return X.DidCloseNotebookDocumentNotification},"get")});var le=kw();Object.defineProperty(e,"InlineCompletionRequest",{enumerable:!0,get:i(function(){return le.InlineCompletionRequest},"get")});var ce;(function(p){function ae($e){const W=$e;return n.string(W)||n.string(W.language)||n.string(W.scheme)||n.string(W.pattern)}i(ae,"is"),p.is=ae})(ce||(e.TextDocumentFilter=ce={}));var Ne;(function(p){function ae($e){const W=$e;return n.objectLiteral(W)&&(n.string(W.notebookType)||n.string(W.scheme)||n.string(W.pattern))}i(ae,"is"),p.is=ae})(Ne||(e.NotebookDocumentFilter=Ne={}));var P;(function(p){function ae($e){const W=$e;return n.objectLiteral(W)&&(n.string(W.notebook)||Ne.is(W.notebook))&&(W.language===void 0||n.string(W.language))}i(ae,"is"),p.is=ae})(P||(e.NotebookCellTextDocumentFilter=P={}));var _;(function(p){function ae($e){if(!Array.isArray($e))return!1;for(let W of $e)if(!n.string(W)&&!ce.is(W)&&!P.is(W))return!1;return!0}i(ae,"is"),p.is=ae})(_||(e.DocumentSelector=_={}));var g;(function(p){p.method="client/registerCapability",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolRequestType(p.method)})(g||(e.RegistrationRequest=g={}));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 R;(function(p){p.Abort="abort",p.Transactional="transactional",p.TextOnlyTransactional="textOnlyTransactional",p.Undo="undo"})(R||(e.FailureHandlingKind=R={}));var S;(function(p){p.UTF8="utf-8",p.UTF16="utf-16",p.UTF32="utf-32"})(S||(e.PositionEncodingKind=S={}));var O;(function(p){function ae($e){const W=$e;return W&&n.string(W.id)&&W.id.length>0}i(ae,"hasId"),p.hasId=ae})(O||(e.StaticRegistrationOptions=O={}));var M;(function(p){function ae($e){const W=$e;return W&&(W.documentSelector===null||_.is(W.documentSelector))}i(ae,"is"),p.is=ae})(M||(e.TextDocumentRegistrationOptions=M={}));var D;(function(p){function ae(W){const m=W;return n.objectLiteral(m)&&(m.workDoneProgress===void 0||n.boolean(m.workDoneProgress))}i(ae,"is"),p.is=ae;function $e(W){const m=W;return m&&n.boolean(m.workDoneProgress)}i($e,"hasWorkDoneProgress"),p.hasWorkDoneProgress=$e})(D||(e.WorkDoneProgressOptions=D={}));var z;(function(p){p.method="initialize",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(z||(e.InitializeRequest=z={}));var B;(function(p){p.unknownProtocolVersion=1})(B||(e.InitializeErrorCodes=B={}));var Z;(function(p){p.method="initialized",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(Z||(e.InitializedNotification=Z={}));var J;(function(p){p.method="shutdown",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType0(p.method)})(J||(e.ShutdownRequest=J={}));var te;(function(p){p.method="exit",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType0(p.method)})(te||(e.ExitNotification=te={}));var de;(function(p){p.method="workspace/didChangeConfiguration",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(de||(e.DidChangeConfigurationNotification=de={}));var ct;(function(p){p.Error=1,p.Warning=2,p.Info=3,p.Log=4,p.Debug=5})(ct||(e.MessageType=ct={}));var Re;(function(p){p.method="window/showMessage",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolNotificationType(p.method)})(Re||(e.ShowMessageNotification=Re={}));var Oe;(function(p){p.method="window/showMessageRequest",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolRequestType(p.method)})(Oe||(e.ShowMessageRequest=Oe={}));var qe;(function(p){p.method="window/logMessage",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolNotificationType(p.method)})(qe||(e.LogMessageNotification=qe={}));var Se;(function(p){p.method="telemetry/event",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolNotificationType(p.method)})(Se||(e.TelemetryEventNotification=Se={}));var Q;(function(p){p.None=0,p.Full=1,p.Incremental=2})(Q||(e.TextDocumentSyncKind=Q={}));var rt;(function(p){p.method="textDocument/didOpen",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(rt||(e.DidOpenTextDocumentNotification=rt={}));var me;(function(p){function ae(W){let m=W;return m!=null&&typeof m.text=="string"&&m.range!==void 0&&(m.rangeLength===void 0||typeof m.rangeLength=="number")}i(ae,"isIncremental"),p.isIncremental=ae;function $e(W){let m=W;return m!=null&&typeof m.text=="string"&&m.range===void 0&&m.rangeLength===void 0}i($e,"isFull"),p.isFull=$e})(me||(e.TextDocumentContentChangeEvent=me={}));var Nt;(function(p){p.method="textDocument/didChange",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(Nt||(e.DidChangeTextDocumentNotification=Nt={}));var Zn;(function(p){p.method="textDocument/didClose",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(Zn||(e.DidCloseTextDocumentNotification=Zn={}));var ri;(function(p){p.method="textDocument/didSave",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(ri||(e.DidSaveTextDocumentNotification=ri={}));var ni;(function(p){p.Manual=1,p.AfterDelay=2,p.FocusOut=3})(ni||(e.TextDocumentSaveReason=ni={}));var ai;(function(p){p.method="textDocument/willSave",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(ai||(e.WillSaveTextDocumentNotification=ai={}));var ii;(function(p){p.method="textDocument/willSaveWaitUntil",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(ii||(e.WillSaveTextDocumentWaitUntilRequest=ii={}));var kt;(function(p){p.method="workspace/didChangeWatchedFiles",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolNotificationType(p.method)})(kt||(e.DidChangeWatchedFilesNotification=kt={}));var Qn;(function(p){p.Created=1,p.Changed=2,p.Deleted=3})(Qn||(e.FileChangeType=Qn={}));var si;(function(p){function ae($e){const W=$e;return n.objectLiteral(W)&&(r.URI.is(W.baseUri)||r.WorkspaceFolder.is(W.baseUri))&&n.string(W.pattern)}i(ae,"is"),p.is=ae})(si||(e.RelativePattern=si={}));var oi;(function(p){p.Create=1,p.Change=2,p.Delete=4})(oi||(e.WatchKind=oi={}));var li;(function(p){p.method="textDocument/publishDiagnostics",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolNotificationType(p.method)})(li||(e.PublishDiagnosticsNotification=li={}));var ci;(function(p){p.Invoked=1,p.TriggerCharacter=2,p.TriggerForIncompleteCompletions=3})(ci||(e.CompletionTriggerKind=ci={}));var ea;(function(p){p.method="textDocument/completion",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(ea||(e.CompletionRequest=ea={}));var ta;(function(p){p.method="completionItem/resolve",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(ta||(e.CompletionResolveRequest=ta={}));var zt;(function(p){p.method="textDocument/hover",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(zt||(e.HoverRequest=zt={}));var ra;(function(p){p.Invoked=1,p.TriggerCharacter=2,p.ContentChange=3})(ra||(e.SignatureHelpTriggerKind=ra={}));var ui;(function(p){p.method="textDocument/signatureHelp",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(ui||(e.SignatureHelpRequest=ui={}));var di;(function(p){p.method="textDocument/definition",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(di||(e.DefinitionRequest=di={}));var na;(function(p){p.method="textDocument/references",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(na||(e.ReferencesRequest=na={}));var aa;(function(p){p.method="textDocument/documentHighlight",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(aa||(e.DocumentHighlightRequest=aa={}));var fi;(function(p){p.method="textDocument/documentSymbol",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(fi||(e.DocumentSymbolRequest=fi={}));var qs;(function(p){p.method="textDocument/codeAction",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(qs||(e.CodeActionRequest=qs={}));var pi;(function(p){p.method="codeAction/resolve",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(pi||(e.CodeActionResolveRequest=pi={}));var hi;(function(p){p.method="workspace/symbol",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(hi||(e.WorkspaceSymbolRequest=hi={}));var mi;(function(p){p.method="workspaceSymbol/resolve",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(mi||(e.WorkspaceSymbolResolveRequest=mi={}));var gi;(function(p){p.method="textDocument/codeLens",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(gi||(e.CodeLensRequest=gi={}));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 yi;(function(p){p.method="workspace/codeLens/refresh",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolRequestType0(p.method)})(yi||(e.CodeLensRefreshRequest=yi={}));var vi;(function(p){p.method="textDocument/documentLink",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(vi||(e.DocumentLinkRequest=vi={}));var Pr;(function(p){p.method="documentLink/resolve",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Pr||(e.DocumentLinkResolveRequest=Pr={}));var Ti;(function(p){p.method="textDocument/formatting",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Ti||(e.DocumentFormattingRequest=Ti={}));var Yr;(function(p){p.method="textDocument/rangeFormatting",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Yr||(e.DocumentRangeFormattingRequest=Yr={}));var Ri;(function(p){p.method="textDocument/rangesFormatting",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Ri||(e.DocumentRangesFormattingRequest=Ri={}));var Bt;(function(p){p.method="textDocument/onTypeFormatting",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Bt||(e.DocumentOnTypeFormattingRequest=Bt={}));var lr;(function(p){p.Identifier=1})(lr||(e.PrepareSupportDefaultBehavior=lr={}));var $i;(function(p){p.method="textDocument/rename",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})($i||(e.RenameRequest=$i={}));var Ai;(function(p){p.method="textDocument/prepareRename",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(Ai||(e.PrepareRenameRequest=Ai={}));var cr;(function(p){p.method="workspace/executeCommand",p.messageDirection=t.MessageDirection.clientToServer,p.type=new t.ProtocolRequestType(p.method)})(cr||(e.ExecuteCommandRequest=cr={}));var ia;(function(p){p.method="workspace/applyEdit",p.messageDirection=t.MessageDirection.serverToClient,p.type=new t.ProtocolRequestType("workspace/applyEdit")})(ia||(e.ApplyWorkspaceEditRequest=ia={}))}}),Ow=V({"../../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=Wa();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}}),Lw=V({"../../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,c){c===void 0&&(c=l);var u=Object.getOwnPropertyDescriptor(o,l);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:i(function(){return o[l]},"get")}),Object.defineProperty(s,c,u)}):(function(s,o,l,c){c===void 0&&(c=l),s[c]=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(Wa(),e),r((_s(),Zd(Al)),e),r(Ce(),e),r(Pw(),e);var n=Ow();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={}))}}),Dw=V({"../../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,c){c===void 0&&(c=l);var u=Object.getOwnPropertyDescriptor(o,l);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:i(function(){return o[l]},"get")}),Object.defineProperty(s,c,u)}):(function(s,o,l,c){c===void 0&&(c=l),s[c]=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=xh();r(xh(),e),r(Lw(),e);function a(s,o,l,c){return(0,n.createMessageConnection)(s,o,l,c)}i(a,"createProtocolConnection"),e.createProtocolConnection=a}}),Dg={};Kr(Dg,{AbstractAstReflection:()=>rf,AbstractCstNode:()=>ih,AbstractLangiumParser:()=>oh,AbstractParserErrorMessageProvider:()=>CS,AbstractThreadedAsyncParser:()=>iF,AstUtils:()=>nf,BiMap:()=>yl,Cancellation:()=>pe,CompositeCstNodeImpl:()=>Tc,ContextCache:()=>Sc,CstNodeBuilder:()=>$S,CstUtils:()=>ef,DEFAULT_TOKENIZE_OPTIONS:()=>Ch,DONE_RESULT:()=>Ve,DatatypeSymbol:()=>pl,DefaultAstNodeDescriptionProvider:()=>tb,DefaultAstNodeLocator:()=>nb,DefaultAsyncParser:()=>$b,DefaultCommentProvider:()=>Rb,DefaultConfigurationProvider:()=>ab,DefaultDocumentBuilder:()=>ib,DefaultDocumentValidator:()=>eb,DefaultHydrator:()=>Eb,DefaultIndexManager:()=>sb,DefaultJsonSerializer:()=>XS,DefaultLangiumDocumentFactory:()=>US,DefaultLangiumDocuments:()=>zS,DefaultLangiumProfiler:()=>uF,DefaultLexer:()=>Sh,DefaultLexerErrorMessageProvider:()=>lb,DefaultLinker:()=>BS,DefaultNameProvider:()=>KS,DefaultReferenceDescriptionProvider:()=>rb,DefaultReferences:()=>qS,DefaultScopeComputation:()=>WS,DefaultScopeProvider:()=>YS,DefaultServiceRegistry:()=>JS,DefaultTokenBuilder:()=>Ac,DefaultValueConverter:()=>hh,DefaultWorkspaceLock:()=>Ab,DefaultWorkspaceManager:()=>ob,Deferred:()=>Sr,Disposable:()=>Sn,DisposableCache:()=>Cc,DocumentCache:()=>HS,DocumentState:()=>Y,DocumentValidator:()=>Et,EMPTY_SCOPE:()=>tF,EMPTY_STREAM:()=>Oa,EmptyFileSystem:()=>It,EmptyFileSystemProvider:()=>Sb,ErrorWithLocation:()=>Pl,GrammarAST:()=>Fg,GrammarUtils:()=>Lf,IndentationAwareLexer:()=>oF,IndentationAwareTokenBuilder:()=>Cb,JSDocDocumentationProvider:()=>Tb,LangiumCompletionParser:()=>SS,LangiumParser:()=>_S,LangiumParserErrorMessageProvider:()=>lh,LeafCstNodeImpl:()=>fl,LexingMode:()=>_n,MapScope:()=>eF,Module:()=>Md,MultiMap:()=>br,MultiMapScope:()=>VS,OperationCancelled:()=>Zt,ParserWorker:()=>sF,ProfilingTask:()=>wb,Reduction:()=>os,RefResolving:()=>sn,RegExpUtils:()=>Mf,RootCstNodeImpl:()=>sh,SimpleCache:()=>Rh,StreamImpl:()=>Jt,StreamScope:()=>Pd,TextDocument:()=>ml,TreeStreamImpl:()=>La,URI:()=>dt,UriTrie:()=>vh,UriUtils:()=>Ye,VALIDATE_EACH_NODE:()=>QS,ValidationCategory:()=>vl,ValidationRegistry:()=>ZS,ValueConverter:()=>Yt,WorkspaceCache:()=>$h,assertCondition:()=>Df,assertUnreachable:()=>qr,createCompletionParser:()=>dh,createDefaultCoreModule:()=>yt,createDefaultSharedCoreModule:()=>vt,createGrammarConfig:()=>ep,createLangiumParser:()=>fh,createParser:()=>Rc,delayNextTick:()=>Ec,diagnosticData:()=>En,eagerLoad:()=>Oh,getDiagnosticRange:()=>Eh,indentationBuilderDefaultOptions:()=>Fd,inject:()=>Ae,interruptAndCheck:()=>Ge,isAstNode:()=>Le,isAstNodeDescription:()=>tf,isAstNodeWithComment:()=>Ah,isCompositeCstNode:()=>vr,isIMultiModeLexerDefinition:()=>Ic,isJSDoc:()=>wh,isLeafCstNode:()=>Pn,isLinkingError:()=>cn,isMultiReference:()=>Qt,isNamed:()=>Th,isOperationCancelled:()=>Jn,isReference:()=>He,isRootCstNode:()=>_l,isTokenTypeArray:()=>wc,isTokenTypeDictionary:()=>Tl,loadGrammarFromJson:()=>Tt,parseJSDoc:()=>bh,prepareLangiumParser:()=>ph,setInterruptionPeriod:()=>mh,startCancelableOperation:()=>_c,stream:()=>oe,toDiagnosticData:()=>_h,toDiagnosticSeverity:()=>is});var ef={};Kr(ef,{DefaultNameRegexp:()=>If,RangeComparison:()=>Xt,compareRange:()=>bf,findCommentNode:()=>Nf,findDeclarationNodeAtOffset:()=>ny,findLeafNodeAtOffset:()=>kl,findLeafNodeBeforeOffset:()=>kf,flattenCst:()=>ry,getDatatypeNode:()=>ty,getInteriorNodes:()=>sy,getNextNode:()=>ay,getPreviousNode:()=>Of,getStartlineNode:()=>iy,inRange:()=>wf,isChildNode:()=>Sf,isCommentNode:()=>Xo,streamCst:()=>Fa,toDocumentSegment:()=>Ga,tokenToRange:()=>ls});function Le(e){return typeof e=="object"&&e!==null&&typeof e.$type=="string"}i(Le,"isAstNode");function He(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"ref"in e}i(He,"isReference");function Qt(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"items"in e}i(Qt,"isMultiReference");function tf(e){return typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.path=="string"}i(tf,"isAstNodeDescription");function cn(e){return typeof e=="object"&&e!==null&&typeof e.info=="object"&&typeof e.message=="string"}i(cn,"isLinkingError");var rf=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 Le(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 vr(e){return typeof e=="object"&&e!==null&&Array.isArray(e.content)}i(vr,"isCompositeCstNode");function Pn(e){return typeof e=="object"&&e!==null&&typeof e.tokenType=="object"}i(Pn,"isLeafCstNode");function _l(e){return vr(e)&&typeof e.fullText=="string"}i(_l,"isRootCstNode");var Jt=class fr{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 fr(()=>({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 Ve})}join(t=","){const r=this.iterator();let n="",a,s=!1;do a=r.next(),a.done||(s&&(n+=t),n+=Mg(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 fr(this.startFn,r=>{const{done:n,value:a}=this.nextFn(r);return n?Ve:{done:!1,value:t(a)}})}filter(t){return new fr(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&t(n.value))return n;while(!n.done);return Ve})}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 fr(()=>({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(ss(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(r.iterator);return Ve})}flat(t){if(t===void 0&&(t=1),t<=0)return this;const r=t>1?this.flat(t-1):this;return new fr(()=>({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(ss(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(n.iterator);return Ve})}head(){const r=this.iterator().next();if(!r.done)return r.value}tail(t=1){return new fr(()=>{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 fr(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>t?Ve:this.nextFn(r.state)))}distinct(t){return new fr(()=>({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 Ve})}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 Mg(e){return typeof e=="string"?e:typeof e>"u"?"undefined":typeof e.toString=="function"?e.toString():Object.prototype.toString.call(e)}i(Mg,"toString");function ss(e){return!!e&&typeof e[Symbol.iterator]=="function"}i(ss,"isIterable");var Oa=new Jt(()=>{},()=>Ve),Ve=Object.freeze({done:!0,value:void 0});function oe(...e){if(e.length===1){const t=e[0];if(t instanceof Jt)return t;if(ss(t))return new Jt(()=>t[Symbol.iterator](),r=>r.next());if(typeof t.length=="number")return new Jt(()=>({index:0}),r=>r.index<t.length?{done:!1,value:t[r.index++]}:Ve)}return e.length>1?new Jt(()=>({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++];ss(r)?t.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(t.array=r)}}while(t.iterator||t.array||t.collIndex<e.length);return Ve}):Oa}i(oe,"stream");var La=class extends Jt{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 Ve})}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}},os;(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})(os||(os={}));var nf={};Kr(nf,{assignMandatoryProperties:()=>af,copyAstNode:()=>Mo,findRootNode:()=>Ia,getContainerOfType:()=>On,getDocument:()=>Dt,getReferenceNodes:()=>Lo,hasContainerOfType:()=>xg,linkContentToContainer:()=>Da,streamAllContents:()=>wr,streamAst:()=>Mt,streamContents:()=>Ss,streamReferences:()=>Ma});function Da(e,t={}){for(const[r,n]of Object.entries(e))r.startsWith("$")||(Array.isArray(n)?n.forEach((a,s)=>{Le(a)&&(a.$container=e,a.$containerProperty=r,a.$containerIndex=s,t.deep&&Da(a,t))}):Le(n)&&(n.$container=e,n.$containerProperty=r,t.deep&&Da(n,t)))}i(Da,"linkContentToContainer");function On(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}i(On,"getContainerOfType");function xg(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}i(xg,"hasContainerOfType");function Dt(e){const r=Ia(e).$document;if(!r)throw new Error("AST node has no document.");return r}i(Dt,"getDocument");function Ia(e){for(;e.$container;)e=e.$container;return e}i(Ia,"findRootNode");function Lo(e){return He(e)?e.ref?[e.ref]:[]:Qt(e)?e.items.map(t=>t.ref):[]}i(Lo,"getReferenceNodes");function Ss(e,t){if(!e)throw new Error("Node must be an AstNode.");const r=t?.range;return new Jt(()=>({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(Le(s)){if(n.keyIndex++,Do(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(Le(l)&&Do(l,r))return{done:!1,value:l}}n.arrayIndex=0}}n.keyIndex++}return Ve})}i(Ss,"streamContents");function wr(e,t){if(!e)throw new Error("Root node must be an AstNode.");return new La(e,r=>Ss(r,t))}i(wr,"streamAllContents");function Mt(e,t){if(e){if(t?.range&&!Do(e,t.range))return new La(e,()=>[])}else throw new Error("Root node must be an AstNode.");return new La(e,r=>Ss(r,t),{includeRoot:!0})}i(Mt,"streamAst");function Do(e,t){if(!t)return!0;const r=e.$cstNode?.range;return r?wf(r,t):!1}i(Do,"isAstNodeInRange");function Ma(e){return new Jt(()=>({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(He(n)||Qt(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(He(s)||Qt(n))return{done:!1,value:{reference:s,container:e,property:r,index:a}}}t.arrayIndex=0}}t.keyIndex++}return Ve})}i(Ma,"streamReferences");function af(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]=sf(a.defaultValue))}i(af,"assignMandatoryProperties");function sf(e){return Array.isArray(e)?[...e.map(sf)]:e}i(sf,"copyDefaultValue");function Mo(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(Le(s))n[a]=Mo(s,t,r);else if(He(s))n[a]=t(n,a,s.$refNode,s.$refText,s);else if(Array.isArray(s)){const o=[];for(const l of s)Le(l)?o.push(Mo(l,t,r)):He(l)?o.push(t(n,a,l.$refNode,l.$refText,l)):o.push(l);n[a]=o}else n[a]=s;return Da(n,{deep:!0}),n}i(Mo,"copyAstNode");var Fg={};Kr(Fg,{AbstractElement:()=>nt,AbstractParserRule:()=>qi,AbstractRule:()=>$a,AbstractType:()=>ut,Action:()=>Lr,Alternatives:()=>Wi,ArrayLiteral:()=>xo,ArrayType:()=>Fo,Assignment:()=>Dr,BooleanLiteral:()=>Go,CharacterRange:()=>Mr,Condition:()=>xr,Conjunction:()=>Vi,CrossReference:()=>Fr,Disjunction:()=>Hi,EndOfFile:()=>jo,Grammar:()=>mr,GrammarImport:()=>Uo,Group:()=>un,InferredType:()=>zo,InfixRule:()=>Ht,InfixRuleOperatorList:()=>Yi,InfixRuleOperators:()=>Bo,Interface:()=>Aa,Keyword:()=>Ea,LangiumGrammarAstReflection:()=>Cf,LangiumGrammarTerminals:()=>Mw,NamedArgument:()=>_a,NegatedToken:()=>dn,Negation:()=>Ko,NumberLiteral:()=>qo,Parameter:()=>Ca,ParameterReference:()=>Wo,ParserRule:()=>Pt,ReferenceType:()=>Xi,RegexToken:()=>fn,ReturnType:()=>Vo,RuleCall:()=>pn,SimpleType:()=>Sa,StringLiteral:()=>Ho,TerminalAlternatives:()=>hn,TerminalElement:()=>at,TerminalGroup:()=>mn,TerminalRule:()=>gr,TerminalRuleCall:()=>gn,Type:()=>Ji,TypeAttribute:()=>yn,TypeDefinition:()=>vn,UnionType:()=>Yo,UnorderedGroup:()=>Zi,UntilToken:()=>Tn,ValueLiteral:()=>Rn,Wildcard:()=>ba,isAbstractElement:()=>Cl,isAbstractParserRule:()=>Ln,isAbstractRule:()=>Gg,isAbstractType:()=>jg,isAction:()=>Gr,isAlternatives:()=>Sl,isArrayLiteral:()=>Ug,isArrayType:()=>of,isAssignment:()=>Tr,isBooleanLiteral:()=>lf,isCharacterRange:()=>cf,isCondition:()=>zg,isConjunction:()=>uf,isCrossReference:()=>Dn,isDisjunction:()=>df,isEndOfFile:()=>ff,isGrammar:()=>Bg,isGrammarImport:()=>Kg,isGroup:()=>Mn,isInferredType:()=>bs,isInfixRule:()=>xa,isInfixRuleOperatorList:()=>qg,isInfixRuleOperators:()=>Wg,isInterface:()=>pf,isKeyword:()=>Rr,isNamedArgument:()=>Vg,isNegatedToken:()=>hf,isNegation:()=>mf,isNumberLiteral:()=>Hg,isParameter:()=>Yg,isParameterReference:()=>gf,isParserRule:()=>Je,isReferenceType:()=>yf,isRegexToken:()=>vf,isReturnType:()=>Tf,isRuleCall:()=>$r,isSimpleType:()=>bl,isStringLiteral:()=>Xg,isTerminalAlternatives:()=>Rf,isTerminalElement:()=>Jg,isTerminalGroup:()=>$f,isTerminalRule:()=>bt,isTerminalRuleCall:()=>wl,isType:()=>Il,isTypeAttribute:()=>Zg,isTypeDefinition:()=>Qg,isUnionType:()=>Af,isUnorderedGroup:()=>Nl,isUntilToken:()=>Ef,isValueLiteral:()=>ey,isWildcard:()=>_f,reflection:()=>j});var Mw={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]*/},nt={$type:"AbstractElement",cardinality:"cardinality"};function Cl(e){return j.isInstance(e,nt.$type)}i(Cl,"isAbstractElement");var qi={$type:"AbstractParserRule"};function Ln(e){return j.isInstance(e,qi.$type)}i(Ln,"isAbstractParserRule");var $a={$type:"AbstractRule"};function Gg(e){return j.isInstance(e,$a.$type)}i(Gg,"isAbstractRule");var ut={$type:"AbstractType"};function jg(e){return j.isInstance(e,ut.$type)}i(jg,"isAbstractType");var Lr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Gr(e){return j.isInstance(e,Lr.$type)}i(Gr,"isAction");var Wi={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function Sl(e){return j.isInstance(e,Wi.$type)}i(Sl,"isAlternatives");var xo={$type:"ArrayLiteral",elements:"elements"};function Ug(e){return j.isInstance(e,xo.$type)}i(Ug,"isArrayLiteral");var Fo={$type:"ArrayType",elementType:"elementType"};function of(e){return j.isInstance(e,Fo.$type)}i(of,"isArrayType");var Dr={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Tr(e){return j.isInstance(e,Dr.$type)}i(Tr,"isAssignment");var Go={$type:"BooleanLiteral",true:"true"};function lf(e){return j.isInstance(e,Go.$type)}i(lf,"isBooleanLiteral");var Mr={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function cf(e){return j.isInstance(e,Mr.$type)}i(cf,"isCharacterRange");var xr={$type:"Condition"};function zg(e){return j.isInstance(e,xr.$type)}i(zg,"isCondition");var Vi={$type:"Conjunction",left:"left",right:"right"};function uf(e){return j.isInstance(e,Vi.$type)}i(uf,"isConjunction");var Fr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Dn(e){return j.isInstance(e,Fr.$type)}i(Dn,"isCrossReference");var Hi={$type:"Disjunction",left:"left",right:"right"};function df(e){return j.isInstance(e,Hi.$type)}i(df,"isDisjunction");var jo={$type:"EndOfFile",cardinality:"cardinality"};function ff(e){return j.isInstance(e,jo.$type)}i(ff,"isEndOfFile");var mr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function Bg(e){return j.isInstance(e,mr.$type)}i(Bg,"isGrammar");var Uo={$type:"GrammarImport",path:"path"};function Kg(e){return j.isInstance(e,Uo.$type)}i(Kg,"isGrammarImport");var un={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Mn(e){return j.isInstance(e,un.$type)}i(Mn,"isGroup");var zo={$type:"InferredType",name:"name"};function bs(e){return j.isInstance(e,zo.$type)}i(bs,"isInferredType");var Ht={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function xa(e){return j.isInstance(e,Ht.$type)}i(xa,"isInfixRule");var Yi={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function qg(e){return j.isInstance(e,Yi.$type)}i(qg,"isInfixRuleOperatorList");var Bo={$type:"InfixRuleOperators",precedences:"precedences"};function Wg(e){return j.isInstance(e,Bo.$type)}i(Wg,"isInfixRuleOperators");var Aa={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function pf(e){return j.isInstance(e,Aa.$type)}i(pf,"isInterface");var Ea={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Rr(e){return j.isInstance(e,Ea.$type)}i(Rr,"isKeyword");var _a={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function Vg(e){return j.isInstance(e,_a.$type)}i(Vg,"isNamedArgument");var dn={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function hf(e){return j.isInstance(e,dn.$type)}i(hf,"isNegatedToken");var Ko={$type:"Negation",value:"value"};function mf(e){return j.isInstance(e,Ko.$type)}i(mf,"isNegation");var qo={$type:"NumberLiteral",value:"value"};function Hg(e){return j.isInstance(e,qo.$type)}i(Hg,"isNumberLiteral");var Ca={$type:"Parameter",name:"name"};function Yg(e){return j.isInstance(e,Ca.$type)}i(Yg,"isParameter");var Wo={$type:"ParameterReference",parameter:"parameter"};function gf(e){return j.isInstance(e,Wo.$type)}i(gf,"isParameterReference");var Pt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Je(e){return j.isInstance(e,Pt.$type)}i(Je,"isParserRule");var Xi={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function yf(e){return j.isInstance(e,Xi.$type)}i(yf,"isReferenceType");var fn={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function vf(e){return j.isInstance(e,fn.$type)}i(vf,"isRegexToken");var Vo={$type:"ReturnType",name:"name"};function Tf(e){return j.isInstance(e,Vo.$type)}i(Tf,"isReturnType");var pn={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function $r(e){return j.isInstance(e,pn.$type)}i($r,"isRuleCall");var Sa={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function bl(e){return j.isInstance(e,Sa.$type)}i(bl,"isSimpleType");var Ho={$type:"StringLiteral",value:"value"};function Xg(e){return j.isInstance(e,Ho.$type)}i(Xg,"isStringLiteral");var hn={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Rf(e){return j.isInstance(e,hn.$type)}i(Rf,"isTerminalAlternatives");var at={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Jg(e){return j.isInstance(e,at.$type)}i(Jg,"isTerminalElement");var mn={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function $f(e){return j.isInstance(e,mn.$type)}i($f,"isTerminalGroup");var gr={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function bt(e){return j.isInstance(e,gr.$type)}i(bt,"isTerminalRule");var gn={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function wl(e){return j.isInstance(e,gn.$type)}i(wl,"isTerminalRuleCall");var Ji={$type:"Type",name:"name",type:"type"};function Il(e){return j.isInstance(e,Ji.$type)}i(Il,"isType");var yn={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function Zg(e){return j.isInstance(e,yn.$type)}i(Zg,"isTypeAttribute");var vn={$type:"TypeDefinition"};function Qg(e){return j.isInstance(e,vn.$type)}i(Qg,"isTypeDefinition");var Yo={$type:"UnionType",types:"types"};function Af(e){return j.isInstance(e,Yo.$type)}i(Af,"isUnionType");var Zi={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function Nl(e){return j.isInstance(e,Zi.$type)}i(Nl,"isUnorderedGroup");var Tn={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Ef(e){return j.isInstance(e,Tn.$type)}i(Ef,"isUntilToken");var Rn={$type:"ValueLiteral"};function ey(e){return j.isInstance(e,Rn.$type)}i(ey,"isValueLiteral");var ba={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function _f(e){return j.isInstance(e,ba.$type)}i(_f,"isWildcard");var Cf=class extends rf{static{i(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:nt.$type,properties:{cardinality:{name:nt.cardinality}},superTypes:[]},AbstractParserRule:{name:qi.$type,properties:{},superTypes:[$a.$type,ut.$type]},AbstractRule:{name:$a.$type,properties:{},superTypes:[]},AbstractType:{name:ut.$type,properties:{},superTypes:[]},Action:{name:Lr.$type,properties:{cardinality:{name:Lr.cardinality},feature:{name:Lr.feature},inferredType:{name:Lr.inferredType},operator:{name:Lr.operator},type:{name:Lr.type,referenceType:ut.$type}},superTypes:[nt.$type]},Alternatives:{name:Wi.$type,properties:{cardinality:{name:Wi.cardinality},elements:{name:Wi.elements,defaultValue:[]}},superTypes:[nt.$type]},ArrayLiteral:{name:xo.$type,properties:{elements:{name:xo.elements,defaultValue:[]}},superTypes:[Rn.$type]},ArrayType:{name:Fo.$type,properties:{elementType:{name:Fo.elementType}},superTypes:[vn.$type]},Assignment:{name:Dr.$type,properties:{cardinality:{name:Dr.cardinality},feature:{name:Dr.feature},operator:{name:Dr.operator},predicate:{name:Dr.predicate},terminal:{name:Dr.terminal}},superTypes:[nt.$type]},BooleanLiteral:{name:Go.$type,properties:{true:{name:Go.true,defaultValue:!1}},superTypes:[xr.$type,Rn.$type]},CharacterRange:{name:Mr.$type,properties:{cardinality:{name:Mr.cardinality},left:{name:Mr.left},lookahead:{name:Mr.lookahead},parenthesized:{name:Mr.parenthesized,defaultValue:!1},right:{name:Mr.right}},superTypes:[at.$type]},Condition:{name:xr.$type,properties:{},superTypes:[]},Conjunction:{name:Vi.$type,properties:{left:{name:Vi.left},right:{name:Vi.right}},superTypes:[xr.$type]},CrossReference:{name:Fr.$type,properties:{cardinality:{name:Fr.cardinality},deprecatedSyntax:{name:Fr.deprecatedSyntax,defaultValue:!1},isMulti:{name:Fr.isMulti,defaultValue:!1},terminal:{name:Fr.terminal},type:{name:Fr.type,referenceType:ut.$type}},superTypes:[nt.$type]},Disjunction:{name:Hi.$type,properties:{left:{name:Hi.left},right:{name:Hi.right}},superTypes:[xr.$type]},EndOfFile:{name:jo.$type,properties:{cardinality:{name:jo.cardinality}},superTypes:[nt.$type]},Grammar:{name:mr.$type,properties:{imports:{name:mr.imports,defaultValue:[]},interfaces:{name:mr.interfaces,defaultValue:[]},isDeclared:{name:mr.isDeclared,defaultValue:!1},name:{name:mr.name},rules:{name:mr.rules,defaultValue:[]},types:{name:mr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Uo.$type,properties:{path:{name:Uo.path}},superTypes:[]},Group:{name:un.$type,properties:{cardinality:{name:un.cardinality},elements:{name:un.elements,defaultValue:[]},guardCondition:{name:un.guardCondition},predicate:{name:un.predicate}},superTypes:[nt.$type]},InferredType:{name:zo.$type,properties:{name:{name:zo.name}},superTypes:[ut.$type]},InfixRule:{name:Ht.$type,properties:{call:{name:Ht.call},dataType:{name:Ht.dataType},inferredType:{name:Ht.inferredType},name:{name:Ht.name},operators:{name:Ht.operators},parameters:{name:Ht.parameters,defaultValue:[]},returnType:{name:Ht.returnType,referenceType:ut.$type}},superTypes:[qi.$type]},InfixRuleOperatorList:{name:Yi.$type,properties:{associativity:{name:Yi.associativity},operators:{name:Yi.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Bo.$type,properties:{precedences:{name:Bo.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Aa.$type,properties:{attributes:{name:Aa.attributes,defaultValue:[]},name:{name:Aa.name},superTypes:{name:Aa.superTypes,defaultValue:[],referenceType:ut.$type}},superTypes:[ut.$type]},Keyword:{name:Ea.$type,properties:{cardinality:{name:Ea.cardinality},predicate:{name:Ea.predicate},value:{name:Ea.value}},superTypes:[nt.$type]},NamedArgument:{name:_a.$type,properties:{calledByName:{name:_a.calledByName,defaultValue:!1},parameter:{name:_a.parameter,referenceType:Ca.$type},value:{name:_a.value}},superTypes:[]},NegatedToken:{name:dn.$type,properties:{cardinality:{name:dn.cardinality},lookahead:{name:dn.lookahead},parenthesized:{name:dn.parenthesized,defaultValue:!1},terminal:{name:dn.terminal}},superTypes:[at.$type]},Negation:{name:Ko.$type,properties:{value:{name:Ko.value}},superTypes:[xr.$type]},NumberLiteral:{name:qo.$type,properties:{value:{name:qo.value}},superTypes:[Rn.$type]},Parameter:{name:Ca.$type,properties:{name:{name:Ca.name}},superTypes:[]},ParameterReference:{name:Wo.$type,properties:{parameter:{name:Wo.parameter,referenceType:Ca.$type}},superTypes:[xr.$type]},ParserRule:{name:Pt.$type,properties:{dataType:{name:Pt.dataType},definition:{name:Pt.definition},entry:{name:Pt.entry,defaultValue:!1},fragment:{name:Pt.fragment,defaultValue:!1},inferredType:{name:Pt.inferredType},name:{name:Pt.name},parameters:{name:Pt.parameters,defaultValue:[]},returnType:{name:Pt.returnType,referenceType:ut.$type}},superTypes:[qi.$type]},ReferenceType:{name:Xi.$type,properties:{isMulti:{name:Xi.isMulti,defaultValue:!1},referenceType:{name:Xi.referenceType}},superTypes:[vn.$type]},RegexToken:{name:fn.$type,properties:{cardinality:{name:fn.cardinality},lookahead:{name:fn.lookahead},parenthesized:{name:fn.parenthesized,defaultValue:!1},regex:{name:fn.regex}},superTypes:[at.$type]},ReturnType:{name:Vo.$type,properties:{name:{name:Vo.name}},superTypes:[]},RuleCall:{name:pn.$type,properties:{arguments:{name:pn.arguments,defaultValue:[]},cardinality:{name:pn.cardinality},predicate:{name:pn.predicate},rule:{name:pn.rule,referenceType:$a.$type}},superTypes:[nt.$type]},SimpleType:{name:Sa.$type,properties:{primitiveType:{name:Sa.primitiveType},stringType:{name:Sa.stringType},typeRef:{name:Sa.typeRef,referenceType:ut.$type}},superTypes:[vn.$type]},StringLiteral:{name:Ho.$type,properties:{value:{name:Ho.value}},superTypes:[Rn.$type]},TerminalAlternatives:{name:hn.$type,properties:{cardinality:{name:hn.cardinality},elements:{name:hn.elements,defaultValue:[]},lookahead:{name:hn.lookahead},parenthesized:{name:hn.parenthesized,defaultValue:!1}},superTypes:[at.$type]},TerminalElement:{name:at.$type,properties:{cardinality:{name:at.cardinality},lookahead:{name:at.lookahead},parenthesized:{name:at.parenthesized,defaultValue:!1}},superTypes:[nt.$type]},TerminalGroup:{name:mn.$type,properties:{cardinality:{name:mn.cardinality},elements:{name:mn.elements,defaultValue:[]},lookahead:{name:mn.lookahead},parenthesized:{name:mn.parenthesized,defaultValue:!1}},superTypes:[at.$type]},TerminalRule:{name:gr.$type,properties:{definition:{name:gr.definition},fragment:{name:gr.fragment,defaultValue:!1},hidden:{name:gr.hidden,defaultValue:!1},name:{name:gr.name},type:{name:gr.type}},superTypes:[$a.$type]},TerminalRuleCall:{name:gn.$type,properties:{cardinality:{name:gn.cardinality},lookahead:{name:gn.lookahead},parenthesized:{name:gn.parenthesized,defaultValue:!1},rule:{name:gn.rule,referenceType:gr.$type}},superTypes:[at.$type]},Type:{name:Ji.$type,properties:{name:{name:Ji.name},type:{name:Ji.type}},superTypes:[ut.$type]},TypeAttribute:{name:yn.$type,properties:{defaultValue:{name:yn.defaultValue},isOptional:{name:yn.isOptional,defaultValue:!1},name:{name:yn.name},type:{name:yn.type}},superTypes:[]},TypeDefinition:{name:vn.$type,properties:{},superTypes:[]},UnionType:{name:Yo.$type,properties:{types:{name:Yo.types,defaultValue:[]}},superTypes:[vn.$type]},UnorderedGroup:{name:Zi.$type,properties:{cardinality:{name:Zi.cardinality},elements:{name:Zi.elements,defaultValue:[]}},superTypes:[nt.$type]},UntilToken:{name:Tn.$type,properties:{cardinality:{name:Tn.cardinality},lookahead:{name:Tn.lookahead},parenthesized:{name:Tn.parenthesized,defaultValue:!1},terminal:{name:Tn.terminal}},superTypes:[at.$type]},ValueLiteral:{name:Rn.$type,properties:{},superTypes:[]},Wildcard:{name:ba.$type,properties:{cardinality:{name:ba.cardinality},lookahead:{name:ba.lookahead},parenthesized:{name:ba.parenthesized,defaultValue:!1}},superTypes:[at.$type]}}}},j=new Cf;function ty(e){let t=e,r=!1;for(;t;){const n=On(t.grammarSource,Je);if(n&&n.dataType)t=t.container,r=!0;else return r?t:void 0}}i(ty,"getDatatypeNode");function Fa(e){return new La(e,t=>vr(t)?t.content:[],{includeRoot:!0})}i(Fa,"streamCst");function ry(e){return Fa(e).filter(Pn)}i(ry,"flattenCst");function Sf(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}i(Sf,"isChildNode");function ls(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}i(ls,"tokenToRange");function Ga(e){if(!e)return;const{offset:t,end:r,range:n}=e;return{range:n,offset:t,end:r,length:r-t}}i(Ga,"toDocumentSegment");var Xt;(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"})(Xt||(Xt={}));function bf(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return Xt.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Xt.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?Xt.Inside:r?Xt.OverlapBack:n?Xt.OverlapFront:Xt.Outside}i(bf,"compareRange");function wf(e,t){return bf(e,t)>Xt.After}i(wf,"inRange");var If=/^[\w\p{L}]$/u;function ny(e,t,r=If){if(e){if(t>0){const n=t-e.offset,a=e.text.charAt(n);r.test(a)||t--}return kl(e,t)}}i(ny,"findDeclarationNodeAtOffset");function Nf(e,t){if(e){const r=Of(e,!0);if(r&&Xo(r,t))return r;if(_l(e)){const n=e.content.findIndex(a=>!a.hidden);for(let a=n-1;a>=0;a--){const s=e.content[a];if(Xo(s,t))return s}}}}i(Nf,"findCommentNode");function Xo(e,t){return Pn(e)&&t.includes(e.tokenType.name)}i(Xo,"isCommentNode");function kl(e,t){if(Pn(e))return e;if(vr(e)){const r=Pf(e,t,!1);if(r)return kl(r,t)}}i(kl,"findLeafNodeAtOffset");function kf(e,t){if(Pn(e))return e;if(vr(e)){const r=Pf(e,t,!0);if(r)return kf(r,t)}}i(kf,"findLeafNodeBeforeOffset");function Pf(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(Pf,"binarySearch");function Of(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(Of,"getPreviousNode");function ay(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(ay,"getNextNode");function iy(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(iy,"getStartlineNode");function sy(e,t){const r=oy(e,t);return r?r.parent.content.slice(r.a+1,r.b):[]}i(sy,"getInteriorNodes");function oy(e,t){const r=td(e),n=td(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(oy,"getCommonParent");function td(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(td,"getParentChain");var Lf={};Kr(Lf,{findAssignment:()=>Vf,findNameAssignment:()=>Gl,findNodeForKeyword:()=>Wf,findNodeForProperty:()=>Ml,findNodesForKeyword:()=>my,findNodesForKeywordInternal:()=>Fl,findNodesForProperty:()=>qf,getActionAtElement:()=>Yf,getActionType:()=>Jf,getAllReachableRules:()=>Dl,getAllRulesUsedForCrossReferences:()=>hy,getCrossReferenceTerminal:()=>Bf,getEntryRule:()=>jf,getExplicitRuleType:()=>Is,getHiddenRules:()=>Uf,getRuleType:()=>Zf,getRuleTypeName:()=>Ry,getTypeName:()=>bn,isArrayCardinality:()=>yy,isArrayOperator:()=>vy,isCommentTerminal:()=>Kf,isDataType:()=>Ty,isDataTypeRule:()=>ws,isOptionalCardinality:()=>gy,terminalRegex:()=>Ns});var Pl=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 Df(e,t="Error: Condition is violated."){if(!e)throw new Error(t)}i(Df,"assertCondition");var Mf={};Kr(Mf,{NEWLINE_REGEXP:()=>uy,escapeRegExp:()=>Va,getTerminalParts:()=>fy,isMultilineComment:()=>xf,isWhitespace:()=>Ll,partialMatches:()=>Ff,partialRegExp:()=>Gf,whitespaceCharacters:()=>py});function K(e){return e.charCodeAt(0)}i(K,"cc");function To(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}i(To,"insertToSet");function ha(e,t){if(e[t]===!0)throw"duplicate flag "+t;e[t],e[t]=!0}i(ha,"addFlag");function rn(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}i(rn,"ASSERT_EXISTS");function ly(){throw Error("Internal Error - Should never get here!")}i(ly,"ASSERT_NEVER_REACH_HERE");function rd(e){return e.type==="Character"}i(rd,"isCharacter");var Jo=[];for(let e=K("0");e<=K("9");e++)Jo.push(e);var Zo=[K("_")].concat(Jo);for(let e=K("a");e<=K("z");e++)Zo.push(e);for(let e=K("A");e<=K("Z");e++)Zo.push(e);var Fh=[K(" "),K("\f"),K(`
  24. `),K("\r"),K(" "),K("\v"),K(" "),K(" "),K(" "),K(" "),K(" "),K(" "),K(" "),K(" "),K(" "),K(" "),K(" "),K(" "),K(" "),K(" "),K("\u2028"),K("\u2029"),K(" "),K(" "),K(" "),K("\uFEFF")],xw=/[0-9a-fA-F]/,Ws=/[0-9]/,Fw=/[1-9]/,cy=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":ha(r,"global");break;case"i":ha(r,"ignoreCase");break;case"m":ha(r,"multiLine");break;case"u":ha(r,"unicode");break;case"y":ha(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}}rn(t);const r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return ly()}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;rn(t);break}if(!(e===!0&&t===void 0)&&rn(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()),rn(e))return e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[K(`
  25. `),K("\r"),K("\u2028"),K("\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=Jo;break;case"D":e=Jo,t=!0;break;case"s":e=Fh;break;case"S":e=Fh,t=!0;break;case"w":e=Zo;break;case"W":e=Zo,t=!0;break}if(rn(e))return{type:"Set",value:e,complement:t}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=K("\f");break;case"n":e=K(`
  26. `);break;case"r":e=K("\r");break;case"t":e=K(" ");break;case"v":e=K("\v");break}if(rn(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:K("\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:K(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
  27. `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:const e=this.popChar();return{type:"Character",value:K(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,rd(r)&&this.isRangeDash()){this.consumeChar("-");const n=this.classAtom();if(n.type,rd(n)){if(n.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:n.value})}else To(r.value,e),e.push(K("-")),To(n.value,e)}else To(r.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
  28. `: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:K("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}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(Fw.test(e)===!1)throw Error("Expecting a positive integer");for(;Ws.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(Ws.test(e)===!1)throw Error("Expecting an integer");for(;Ws.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case`
  29. `: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:K(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 Ws.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
  30. `: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`
  31. `: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(xw.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}}},Ol=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){}},uy=/\r?\n/gm,dy=new cy,Gw=class extends Ol{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===`
  32. `&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const r=Va(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=!!`
  33. `.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 Gw;function fy(e){try{typeof e!="string"&&(e=e.source),e=`/${e}/`;const t=dy.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(fy,"getTerminalParts");function xf(e){try{return typeof e=="string"&&(e=new RegExp(e)),e=e.toString(),$n.reset(e),$n.visit(dy.pattern(e)),$n.multiline}catch{return!1}}i(xf,"isMultilineComment");var py=`\f
  34. \r \v              \u2028\u2029   \uFEFF`.split("");function Ll(e){const t=typeof e=="string"?new RegExp(e):e;return py.some(r=>t.test(r))}i(Ll,"isWhitespace");function Va(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(Va,"escapeRegExp");function Ff(e,t){const r=Gf(e),n=t.match(r);return!!n&&n[0].length>0}i(Ff,"partialMatches");function Gf(e){typeof e=="string"&&(e=new RegExp(e));const t=e,r=e.source;let n=0;function a(){let s="",o;function l(u){s+=r.substr(n,u),n+=u}i(l,"appendRaw");function c(u){s+="(?:"+r.substr(n,u)+"|$)",n+=u}for(i(c,"appendOptional");n<r.length;)switch(r[n]){case"\\":switch(r[n+1]){case"c":c(3);break;case"x":c(4);break;case"u":t.unicode?r[n+2]==="{"?c(r.indexOf("}",n)-n+1):c(6):c(2);break;case"p":case"P":t.unicode?c(r.indexOf("}",n)-n+1):c(2);break;case"k":c(r.indexOf(">",n)-n+1);break;default:c(2);break}break;case"[":o=/\[(?:\\.|.)*?\]/g,o.lastIndex=n,o=o.exec(r)||[],c(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):c(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:c(1);break}return s}return i(a,"process"),new RegExp(a(),e.flags)}i(Gf,"partialRegExp");function jf(e){return e.rules.find(t=>Je(t)&&t.entry)}i(jf,"getEntryRule");function Uf(e){return e.rules.filter(t=>bt(t)&&t.hidden)}i(Uf,"getHiddenRules");function Dl(e,t){const r=new Set,n=jf(e);if(!n)return new Set(e.rules);const a=[n].concat(Uf(e));for(const o of a)zf(o,r,t);const s=new Set;for(const o of e.rules)(r.has(o.name)||bt(o)&&o.hidden)&&s.add(o);return s}i(Dl,"getAllReachableRules");function zf(e,t,r){t.add(e.name),wr(e).forEach(n=>{if($r(n)||r&&wl(n)){const a=n.rule.ref;a&&!t.has(a.name)&&zf(a,t,r)}})}i(zf,"ruleDfs");function hy(e){const t=new Set;return wr(e).forEach(r=>{Dn(r)&&(Je(r.type.ref)&&t.add(r.type.ref),bs(r.type.ref)&&Je(r.type.ref.$container)&&t.add(r.type.ref.$container))}),t}i(hy,"getAllRulesUsedForCrossReferences");function Bf(e){if(e.terminal)return e.terminal;if(e.type.ref)return Gl(e.type.ref)?.terminal}i(Bf,"getCrossReferenceTerminal");function Kf(e){return e.hidden&&!Ll(Ns(e))}i(Kf,"isCommentTerminal");function qf(e,t){return!e||!t?[]:xl(e,t,e.astNode,!0)}i(qf,"findNodesForProperty");function Ml(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(Ml,"findNodeForProperty");function xl(e,t,r,n){if(!n){const a=On(e.grammarSource,Tr);if(a&&a.feature===t)return[e]}return vr(e)&&e.astNode===r?e.content.flatMap(a=>xl(a,t,r,!1)):[]}i(xl,"findNodesForPropertyInternal");function my(e,t){return e?Fl(e,t,e?.astNode):[]}i(my,"findNodesForKeyword");function Wf(e,t,r){if(!e)return;const n=Fl(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(Wf,"findNodeForKeyword");function Fl(e,t,r){if(e.astNode!==r)return[];if(Rr(e.grammarSource)&&e.grammarSource.value===t)return[e];const n=Fa(e).iterator();let a;const s=[];do if(a=n.next(),!a.done){const o=a.value;o.astNode===r?Rr(o.grammarSource)&&o.grammarSource.value===t&&s.push(o):n.prune()}while(!a.done);return s}i(Fl,"findNodesForKeywordInternal");function Vf(e){const t=e.astNode;for(;t===e.container?.astNode;){const r=On(e.grammarSource,Tr);if(r)return r;e=e.container}}i(Vf,"findAssignment");function Gl(e){let t=e;return bs(t)&&(Gr(t.$container)?t=t.$container.$container:Ln(t.$container)?t=t.$container:qr(t.$container)),Hf(e,t,new Map)}i(Gl,"findNameAssignment");function Hf(e,t,r){function n(a,s){let o;return On(a,Tr)||(o=Hf(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 wr(t)){if(Tr(a)&&a.feature.toLowerCase()==="name")return r.set(e,a),a;if($r(a)&&Je(a.rule.ref))return n(a,a.rule.ref);if(bl(a)&&a.typeRef?.ref)return n(a,a.typeRef.ref)}}i(Hf,"findNameAssignmentInternal");function Yf(e){const t=e.$container;if(Mn(t)){const r=t.elements,n=r.indexOf(e);for(let a=n-1;a>=0;a--){const s=r[a];if(Gr(s))return s;{const o=wr(r[a]).find(Gr);if(o)return o}}}if(Cl(t))return Yf(t)}i(Yf,"getActionAtElement");function gy(e,t){return e==="?"||e==="*"||Mn(t)&&!!t.guardCondition}i(gy,"isOptionalCardinality");function yy(e){return e==="*"||e==="+"}i(yy,"isArrayCardinality");function vy(e){return e==="+="}i(vy,"isArrayOperator");function ws(e){return Xf(e,new Set)}i(ws,"isDataTypeRule");function Xf(e,t){if(t.has(e))return!0;t.add(e);for(const r of wr(e))if($r(r)){if(!r.rule.ref||Je(r.rule.ref)&&!Xf(r.rule.ref,t)||xa(r.rule.ref))return!1}else{if(Tr(r))return!1;if(Gr(r))return!1}return!!e.definition}i(Xf,"isDataTypeRuleInternal");function Ty(e){return Qo(e.type,new Set)}i(Ty,"isDataType");function Qo(e,t){if(t.has(e))return!0;if(t.add(e),of(e))return!1;if(yf(e))return!1;if(Af(e))return e.types.every(r=>Qo(r,t));if(bl(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 Il(r)?Qo(r.type,t):!1}else return!1}else return!1}i(Qo,"isDataTypeInternal");function Is(e){if(!bt(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(Is,"getExplicitRuleType");function bn(e){if(Ln(e))return Je(e)&&ws(e)?e.name:Is(e)??e.name;if(pf(e)||Il(e)||Tf(e))return e.name;if(Gr(e)){const t=Jf(e);if(t)return t}else if(bs(e))return e.name;throw new Error("Cannot get name of Unknown Type")}i(bn,"getTypeName");function Jf(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return bn(e.type.ref)}i(Jf,"getActionType");function Ry(e){return bt(e)?e.type?.name??"string":Je(e)&&ws(e)?e.name:Is(e)??e.name}i(Ry,"getRuleTypeName");function Zf(e){return bt(e)?e.type?.name??"string":Is(e)??e.name}i(Zf,"getRuleType");function Ns(e){const t={s:!1,i:!1,u:!1},r=xn(e.definition,t),n=Object.entries(t).filter(([,a])=>a).map(([a])=>a).join("");return new RegExp(r,n)}i(Ns,"terminalRegex");var Qf=/[\s\S]/.source;function xn(e,t){if(Rf(e))return $y(e);if($f(e))return Ay(e);if(cf(e))return Cy(e);if(wl(e)){const r=e.rule.ref;if(!r)throw new Error("Missing rule reference.");return er(xn(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else{if(hf(e))return _y(e);if(Ef(e))return Ey(e);if(vf(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")),er(n,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}else{if(_f(e))return er(Qf,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}}}i(xn,"abstractElementToRegex");function $y(e){return er(e.elements.map(t=>xn(t)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i($y,"terminalAlternativesToRegex");function Ay(e){return er(e.elements.map(t=>xn(t)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i(Ay,"terminalGroupToRegex");function Ey(e){return er(`${Qf}*?${xn(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}i(Ey,"untilTokenToRegex");function _y(e){return er(`(?!${xn(e.terminal)})${Qf}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}i(_y,"negateTokenToRegex");function Cy(e){return e.right?er(`[${Ro(e.left)}-${Ro(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):er(Ro(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}i(Cy,"characterRangeToRegex");function Ro(e){return Va(e.value)}i(Ro,"keywordToRegex");function er(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?`${e}${t.cardinality}`:e}i(er,"withCardinality");function ep(e){const t=[],r=e.Grammar;for(const n of r.rules)bt(n)&&Kf(n)&&xf(Ns(n))&&t.push(n.name);return{multilineCommentRules:t,nameRegexp:If}}i(ep,"createGrammarConfig");var jw=typeof global=="object"&&global&&global.Object===Object&&global,Sy=jw,Uw=typeof self=="object"&&self&&self.Object===Object&&self,zw=Sy||Uw||Function("return this")(),rr=zw,Bw=rr.Symbol,Ct=Bw,by=Object.prototype,Kw=by.hasOwnProperty,qw=by.toString,_i=Ct?Ct.toStringTag:void 0;function wy(e){var t=Kw.call(e,_i),r=e[_i];try{e[_i]=void 0;var n=!0}catch{}var a=qw.call(e);return n&&(t?e[_i]=r:delete e[_i]),a}i(wy,"getRawTag");var Ww=wy,Vw=Object.prototype,Hw=Vw.toString;function Iy(e){return Hw.call(e)}i(Iy,"objectToString");var Yw=Iy,Xw="[object Null]",Jw="[object Undefined]",Gh=Ct?Ct.toStringTag:void 0;function Ny(e){return e==null?e===void 0?Jw:Xw:Gh&&Gh in Object(e)?Ww(e):Yw(e)}i(Ny,"baseGetTag");var Wr=Ny;function ky(e){return e!=null&&typeof e=="object"}i(ky,"isObjectLike");var Gt=ky,Zw="[object Symbol]";function Py(e){return typeof e=="symbol"||Gt(e)&&Wr(e)==Zw}i(Py,"isSymbol");var jl=Py;function Oy(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(Oy,"arrayMap");var ks=Oy,Qw=Array.isArray,ne=Qw,jh=Ct?Ct.prototype:void 0,Uh=jh?jh.toString:void 0;function tp(e){if(typeof e=="string")return e;if(ne(e))return ks(e,tp)+"";if(jl(e))return Uh?Uh.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}i(tp,"baseToString");var eI=tp,tI=/\s/;function Ly(e){for(var t=e.length;t--&&tI.test(e.charAt(t)););return t}i(Ly,"trimmedEndIndex");var rI=Ly,nI=/^\s+/;function Dy(e){return e&&e.slice(0,rI(e)+1).replace(nI,"")}i(Dy,"baseTrim");var aI=Dy;function My(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}i(My,"isObject");var St=My,zh=NaN,iI=/^[-+]0x[0-9a-f]+$/i,sI=/^0b[01]+$/i,oI=/^0o[0-7]+$/i,lI=parseInt;function xy(e){if(typeof e=="number")return e;if(jl(e))return zh;if(St(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=St(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=aI(e);var r=sI.test(e);return r||oI.test(e)?lI(e.slice(2),r?2:8):iI.test(e)?zh:+e}i(xy,"toNumber");var cI=xy,Bh=1/0,uI=17976931348623157e292;function Fy(e){if(!e)return e===0?e:0;if(e=cI(e),e===Bh||e===-Bh){var t=e<0?-1:1;return t*uI}return e===e?e:0}i(Fy,"toFinite");var dI=Fy;function Gy(e){var t=dI(e),r=t%1;return t===t?r?t-r:t:0}i(Gy,"toInteger");var Ps=Gy;function jy(e){return e}i(jy,"identity");var ja=jy,fI="[object AsyncFunction]",pI="[object Function]",hI="[object GeneratorFunction]",mI="[object Proxy]";function Uy(e){if(!St(e))return!1;var t=Wr(e);return t==pI||t==hI||t==fI||t==mI}i(Uy,"isFunction");var Ir=Uy,gI=rr["__core-js_shared__"],Pc=gI,Kh=(function(){var e=/[^.]+$/.exec(Pc&&Pc.keys&&Pc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function zy(e){return!!Kh&&Kh in e}i(zy,"isMasked");var yI=zy,vI=Function.prototype,TI=vI.toString;function By(e){if(e!=null){try{return TI.call(e)}catch{}try{return e+""}catch{}}return""}i(By,"toSource");var Fn=By,RI=/[\\^$.*+?()[\]{}|]/g,$I=/^\[object .+?Constructor\]$/,AI=Function.prototype,EI=Object.prototype,_I=AI.toString,CI=EI.hasOwnProperty,SI=RegExp("^"+_I.call(CI).replace(RI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ky(e){if(!St(e)||yI(e))return!1;var t=Ir(e)?SI:$I;return t.test(Fn(e))}i(Ky,"baseIsNative");var bI=Ky;function qy(e,t){return e?.[t]}i(qy,"getValue");var wI=qy;function Wy(e,t){var r=wI(e,t);return bI(r)?r:void 0}i(Wy,"getNative");var Gn=Wy,II=Gn(rr,"WeakMap"),nd=II,qh=Object.create,NI=(function(){function e(){}return i(e,"object"),function(t){if(!St(t))return{};if(qh)return qh(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),kI=NI;function Vy(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(Vy,"apply");var PI=Vy;function Hy(){}i(Hy,"noop");var Me=Hy;function Yy(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}i(Yy,"copyArray");var OI=Yy,LI=800,DI=16,MI=Date.now;function Xy(e){var t=0,r=0;return function(){var n=MI(),a=DI-(n-r);if(r=n,a>0){if(++t>=LI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}i(Xy,"shortOut");var xI=Xy;function Jy(e){return function(){return e}}i(Jy,"constant");var FI=Jy,GI=(function(){try{var e=Gn(Object,"defineProperty");return e({},"",{}),e}catch{}})(),el=GI,jI=el?function(e,t){return el(e,"toString",{configurable:!0,enumerable:!1,value:FI(t),writable:!0})}:ja,UI=jI,zI=xI(UI),BI=zI;function Zy(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}i(Zy,"arrayEach");var Qy=Zy;function ev(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(ev,"baseFindIndex");var tv=ev;function rv(e){return e!==e}i(rv,"baseIsNaN");var KI=rv;function nv(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}i(nv,"strictIndexOf");var qI=nv;function av(e,t,r){return t===t?qI(e,t,r):tv(e,KI,r)}i(av,"baseIndexOf");var rp=av;function iv(e,t){var r=e==null?0:e.length;return!!r&&rp(e,t,0)>-1}i(iv,"arrayIncludes");var sv=iv,WI=9007199254740991,VI=/^(?:0|[1-9]\d*)$/;function ov(e,t){var r=typeof e;return t=t??WI,!!t&&(r=="number"||r!="symbol"&&VI.test(e))&&e>-1&&e%1==0&&e<t}i(ov,"isIndex");var Ul=ov;function lv(e,t,r){t=="__proto__"&&el?el(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}i(lv,"baseAssignValue");var np=lv;function cv(e,t){return e===t||e!==e&&t!==t}i(cv,"eq");var Os=cv,HI=Object.prototype,YI=HI.hasOwnProperty;function uv(e,t,r){var n=e[t];(!(YI.call(e,t)&&Os(n,r))||r===void 0&&!(t in e))&&np(e,t,r)}i(uv,"assignValue");var zl=uv;function dv(e,t,r,n){var a=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var l=t[s],c=n?n(r[l],e[l],l,r,e):void 0;c===void 0&&(c=e[l]),a?np(r,l,c):zl(r,l,c)}return r}i(dv,"copyObject");var Ls=dv,Wh=Math.max;function fv(e,t,r){return t=Wh(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,s=Wh(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),PI(e,this,l)}}i(fv,"overRest");var XI=fv;function pv(e,t){return BI(XI(e,t,ja),e+"")}i(pv,"baseRest");var ap=pv,JI=9007199254740991;function hv(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=JI}i(hv,"isLength");var ip=hv;function mv(e){return e!=null&&ip(e.length)&&!Ir(e)}i(mv,"isArrayLike");var nr=mv;function gv(e,t,r){if(!St(r))return!1;var n=typeof t;return(n=="number"?nr(r)&&Ul(t,r.length):n=="string"&&t in r)?Os(r[t],e):!1}i(gv,"isIterateeCall");var Bl=gv;function yv(e){return ap(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&&Bl(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(yv,"createAssigner");var ZI=yv,QI=Object.prototype;function vv(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||QI;return e===r}i(vv,"isPrototype");var Ds=vv;function Tv(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}i(Tv,"baseTimes");var eN=Tv,tN="[object Arguments]";function Rv(e){return Gt(e)&&Wr(e)==tN}i(Rv,"baseIsArguments");var Vh=Rv,$v=Object.prototype,rN=$v.hasOwnProperty,nN=$v.propertyIsEnumerable,aN=Vh((function(){return arguments})())?Vh:function(e){return Gt(e)&&rN.call(e,"callee")&&!nN.call(e,"callee")},Kl=aN;function Av(){return!1}i(Av,"stubFalse");var iN=Av,Ev=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hh=Ev&&typeof module=="object"&&module&&!module.nodeType&&module,sN=Hh&&Hh.exports===Ev,Yh=sN?rr.Buffer:void 0,oN=Yh?Yh.isBuffer:void 0,lN=oN||iN,cs=lN,cN="[object Arguments]",uN="[object Array]",dN="[object Boolean]",fN="[object Date]",pN="[object Error]",hN="[object Function]",mN="[object Map]",gN="[object Number]",yN="[object Object]",vN="[object RegExp]",TN="[object Set]",RN="[object String]",$N="[object WeakMap]",AN="[object ArrayBuffer]",EN="[object DataView]",_N="[object Float32Array]",CN="[object Float64Array]",SN="[object Int8Array]",bN="[object Int16Array]",wN="[object Int32Array]",IN="[object Uint8Array]",NN="[object Uint8ClampedArray]",kN="[object Uint16Array]",PN="[object Uint32Array]",ye={};ye[_N]=ye[CN]=ye[SN]=ye[bN]=ye[wN]=ye[IN]=ye[NN]=ye[kN]=ye[PN]=!0;ye[cN]=ye[uN]=ye[AN]=ye[dN]=ye[EN]=ye[fN]=ye[pN]=ye[hN]=ye[mN]=ye[gN]=ye[yN]=ye[vN]=ye[TN]=ye[RN]=ye[$N]=!1;function _v(e){return Gt(e)&&ip(e.length)&&!!ye[Wr(e)]}i(_v,"baseIsTypedArray");var ON=_v;function Cv(e){return function(t){return e(t)}}i(Cv,"baseUnary");var Ms=Cv,Sv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Qi=Sv&&typeof module=="object"&&module&&!module.nodeType&&module,LN=Qi&&Qi.exports===Sv,Oc=LN&&Sy.process,DN=(function(){try{var e=Qi&&Qi.require&&Qi.require("util").types;return e||Oc&&Oc.binding&&Oc.binding("util")}catch{}})(),jr=DN,Xh=jr&&jr.isTypedArray,MN=Xh?Ms(Xh):ON,sp=MN,xN=Object.prototype,FN=xN.hasOwnProperty;function bv(e,t){var r=ne(e),n=!r&&Kl(e),a=!r&&!n&&cs(e),s=!r&&!n&&!a&&sp(e),o=r||n||a||s,l=o?eN(e.length,String):[],c=l.length;for(var u in e)(t||FN.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Ul(u,c)))&&l.push(u);return l}i(bv,"arrayLikeKeys");var wv=bv;function Iv(e,t){return function(r){return e(t(r))}}i(Iv,"overArg");var Nv=Iv,GN=Nv(Object.keys,Object),jN=GN,UN=Object.prototype,zN=UN.hasOwnProperty;function kv(e){if(!Ds(e))return jN(e);var t=[];for(var r in Object(e))zN.call(e,r)&&r!="constructor"&&t.push(r);return t}i(kv,"baseKeys");var Pv=kv;function Ov(e){return nr(e)?wv(e):Pv(e)}i(Ov,"keys");var ft=Ov,BN=Object.prototype,KN=BN.hasOwnProperty,qN=ZI(function(e,t){if(Ds(t)||nr(t)){Ls(t,ft(t),e);return}for(var r in t)KN.call(t,r)&&zl(e,r,t[r])}),pt=qN;function Lv(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}i(Lv,"nativeKeysIn");var WN=Lv,VN=Object.prototype,HN=VN.hasOwnProperty;function Dv(e){if(!St(e))return WN(e);var t=Ds(e),r=[];for(var n in e)n=="constructor"&&(t||!HN.call(e,n))||r.push(n);return r}i(Dv,"baseKeysIn");var YN=Dv;function Mv(e){return nr(e)?wv(e,!0):YN(e)}i(Mv,"keysIn");var ql=Mv,XN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,JN=/^\w*$/;function xv(e,t){if(ne(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||jl(e)?!0:JN.test(e)||!XN.test(e)||t!=null&&e in Object(t)}i(xv,"isKey");var op=xv,ZN=Gn(Object,"create"),us=ZN;function Fv(){this.__data__=us?us(null):{},this.size=0}i(Fv,"hashClear");var QN=Fv;function Gv(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}i(Gv,"hashDelete");var ek=Gv,tk="__lodash_hash_undefined__",rk=Object.prototype,nk=rk.hasOwnProperty;function jv(e){var t=this.__data__;if(us){var r=t[e];return r===tk?void 0:r}return nk.call(t,e)?t[e]:void 0}i(jv,"hashGet");var ak=jv,ik=Object.prototype,sk=ik.hasOwnProperty;function Uv(e){var t=this.__data__;return us?t[e]!==void 0:sk.call(t,e)}i(Uv,"hashHas");var ok=Uv,lk="__lodash_hash_undefined__";function zv(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=us&&t===void 0?lk:t,this}i(zv,"hashSet");var ck=zv;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=QN;jn.prototype.delete=ek;jn.prototype.get=ak;jn.prototype.has=ok;jn.prototype.set=ck;var Jh=jn;function Bv(){this.__data__=[],this.size=0}i(Bv,"listCacheClear");var uk=Bv;function Kv(e,t){for(var r=e.length;r--;)if(Os(e[r][0],t))return r;return-1}i(Kv,"assocIndexOf");var Wl=Kv,dk=Array.prototype,fk=dk.splice;function qv(e){var t=this.__data__,r=Wl(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():fk.call(t,r,1),--this.size,!0}i(qv,"listCacheDelete");var pk=qv;function Wv(e){var t=this.__data__,r=Wl(t,e);return r<0?void 0:t[r][1]}i(Wv,"listCacheGet");var hk=Wv;function Vv(e){return Wl(this.__data__,e)>-1}i(Vv,"listCacheHas");var mk=Vv;function Hv(e,t){var r=this.__data__,n=Wl(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}i(Hv,"listCacheSet");var gk=Hv;function Un(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(Un,"ListCache");Un.prototype.clear=uk;Un.prototype.delete=pk;Un.prototype.get=hk;Un.prototype.has=mk;Un.prototype.set=gk;var Vl=Un,yk=Gn(rr,"Map"),ds=yk;function Yv(){this.size=0,this.__data__={hash:new Jh,map:new(ds||Vl),string:new Jh}}i(Yv,"mapCacheClear");var vk=Yv;function Xv(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}i(Xv,"isKeyable");var Tk=Xv;function Jv(e,t){var r=e.__data__;return Tk(t)?r[typeof t=="string"?"string":"hash"]:r.map}i(Jv,"getMapData");var Hl=Jv;function Zv(e){var t=Hl(this,e).delete(e);return this.size-=t?1:0,t}i(Zv,"mapCacheDelete");var Rk=Zv;function Qv(e){return Hl(this,e).get(e)}i(Qv,"mapCacheGet");var $k=Qv;function eT(e){return Hl(this,e).has(e)}i(eT,"mapCacheHas");var Ak=eT;function tT(e,t){var r=Hl(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}i(tT,"mapCacheSet");var Ek=tT;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=vk;zn.prototype.delete=Rk;zn.prototype.get=$k;zn.prototype.has=Ak;zn.prototype.set=Ek;var Yl=zn,_k="Expected a function";function Xl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(_k);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(Xl.Cache||Yl),r}i(Xl,"memoize");Xl.Cache=Yl;var Ck=Xl,Sk=500;function rT(e){var t=Ck(e,function(n){return r.size===Sk&&r.clear(),n}),r=t.cache;return t}i(rT,"memoizeCapped");var bk=rT,wk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ik=/\\(\\)?/g,Nk=bk(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(wk,function(r,n,a,s){t.push(a?s.replace(Ik,"$1"):n||r)}),t}),kk=Nk;function nT(e){return e==null?"":eI(e)}i(nT,"toString");var Pk=nT;function aT(e,t){return ne(e)?e:op(e,t)?[e]:kk(Pk(e))}i(aT,"castPath");var Jl=aT;function iT(e){if(typeof e=="string"||jl(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}i(iT,"toKey");var xs=iT;function sT(e,t){t=Jl(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(sT,"baseGet");var lp=sT;function oT(e,t,r){var n=e==null?void 0:lp(e,t);return n===void 0?r:n}i(oT,"get");var Ok=oT;function lT(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}i(lT,"arrayPush");var cp=lT,Zh=Ct?Ct.isConcatSpreadable:void 0;function cT(e){return ne(e)||Kl(e)||!!(Zh&&e&&e[Zh])}i(cT,"isFlattenable");var Lk=cT;function up(e,t,r,n,a){var s=-1,o=e.length;for(r||(r=Lk),a||(a=[]);++s<o;){var l=e[s];t>0&&r(l)?t>1?up(l,t-1,r,n,a):cp(a,l):n||(a[a.length]=l)}return a}i(up,"baseFlatten");var dp=up;function uT(e){var t=e==null?0:e.length;return t?dp(e,1):[]}i(uT,"flatten");var xt=uT,Dk=Nv(Object.getPrototypeOf,Object),dT=Dk;function fT(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(fT,"baseSlice");var pT=fT;function hT(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(hT,"arrayReduce");var Mk=hT;function mT(){this.__data__=new Vl,this.size=0}i(mT,"stackClear");var xk=mT;function gT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}i(gT,"stackDelete");var Fk=gT;function yT(e){return this.__data__.get(e)}i(yT,"stackGet");var Gk=yT;function vT(e){return this.__data__.has(e)}i(vT,"stackHas");var jk=vT,Uk=200;function TT(e,t){var r=this.__data__;if(r instanceof Vl){var n=r.__data__;if(!ds||n.length<Uk-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Yl(n)}return r.set(e,t),this.size=r.size,this}i(TT,"stackSet");var zk=TT;function Bn(e){var t=this.__data__=new Vl(e);this.size=t.size}i(Bn,"Stack");Bn.prototype.clear=xk;Bn.prototype.delete=Fk;Bn.prototype.get=Gk;Bn.prototype.has=jk;Bn.prototype.set=zk;var es=Bn;function RT(e,t){return e&&Ls(t,ft(t),e)}i(RT,"baseAssign");var Bk=RT;function $T(e,t){return e&&Ls(t,ql(t),e)}i($T,"baseAssignIn");var Kk=$T,AT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Qh=AT&&typeof module=="object"&&module&&!module.nodeType&&module,qk=Qh&&Qh.exports===AT,em=qk?rr.Buffer:void 0,tm=em?em.allocUnsafe:void 0;function ET(e,t){if(t)return e.slice();var r=e.length,n=tm?tm(r):new e.constructor(r);return e.copy(n),n}i(ET,"cloneBuffer");var Wk=ET;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 fp=_T;function CT(){return[]}i(CT,"stubArray");var ST=CT,Vk=Object.prototype,Hk=Vk.propertyIsEnumerable,rm=Object.getOwnPropertySymbols,Yk=rm?function(e){return e==null?[]:(e=Object(e),fp(rm(e),function(t){return Hk.call(e,t)}))}:ST,pp=Yk;function bT(e,t){return Ls(e,pp(e),t)}i(bT,"copySymbols");var Xk=bT,Jk=Object.getOwnPropertySymbols,Zk=Jk?function(e){for(var t=[];e;)cp(t,pp(e)),e=dT(e);return t}:ST,wT=Zk;function IT(e,t){return Ls(e,wT(e),t)}i(IT,"copySymbolsIn");var Qk=IT;function NT(e,t,r){var n=t(e);return ne(e)?n:cp(n,r(e))}i(NT,"baseGetAllKeys");var kT=NT;function PT(e){return kT(e,ft,pp)}i(PT,"getAllKeys");var ad=PT;function OT(e){return kT(e,ql,wT)}i(OT,"getAllKeysIn");var LT=OT,eP=Gn(rr,"DataView"),id=eP,tP=Gn(rr,"Promise"),sd=tP,rP=Gn(rr,"Set"),Na=rP,nm="[object Map]",nP="[object Object]",am="[object Promise]",im="[object Set]",sm="[object WeakMap]",om="[object DataView]",aP=Fn(id),iP=Fn(ds),sP=Fn(sd),oP=Fn(Na),lP=Fn(nd),nn=Wr;(id&&nn(new id(new ArrayBuffer(1)))!=om||ds&&nn(new ds)!=nm||sd&&nn(sd.resolve())!=am||Na&&nn(new Na)!=im||nd&&nn(new nd)!=sm)&&(nn=i(function(e){var t=Wr(e),r=t==nP?e.constructor:void 0,n=r?Fn(r):"";if(n)switch(n){case aP:return om;case iP:return nm;case sP:return am;case oP:return im;case lP:return sm}return t},"getTag"));var Ua=nn,cP=Object.prototype,uP=cP.hasOwnProperty;function DT(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&uP.call(e,"index")&&(r.index=e.index,r.input=e.input),r}i(DT,"initCloneArray");var dP=DT,fP=rr.Uint8Array,tl=fP;function MT(e){var t=new e.constructor(e.byteLength);return new tl(t).set(new tl(e)),t}i(MT,"cloneArrayBuffer");var hp=MT;function xT(e,t){var r=t?hp(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}i(xT,"cloneDataView");var pP=xT,hP=/\w*$/;function FT(e){var t=new e.constructor(e.source,hP.exec(e));return t.lastIndex=e.lastIndex,t}i(FT,"cloneRegExp");var mP=FT,lm=Ct?Ct.prototype:void 0,cm=lm?lm.valueOf:void 0;function GT(e){return cm?Object(cm.call(e)):{}}i(GT,"cloneSymbol");var gP=GT;function jT(e,t){var r=t?hp(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}i(jT,"cloneTypedArray");var yP=jT,vP="[object Boolean]",TP="[object Date]",RP="[object Map]",$P="[object Number]",AP="[object RegExp]",EP="[object Set]",_P="[object String]",CP="[object Symbol]",SP="[object ArrayBuffer]",bP="[object DataView]",wP="[object Float32Array]",IP="[object Float64Array]",NP="[object Int8Array]",kP="[object Int16Array]",PP="[object Int32Array]",OP="[object Uint8Array]",LP="[object Uint8ClampedArray]",DP="[object Uint16Array]",MP="[object Uint32Array]";function UT(e,t,r){var n=e.constructor;switch(t){case SP:return hp(e);case vP:case TP:return new n(+e);case bP:return pP(e,r);case wP:case IP:case NP:case kP:case PP:case OP:case LP:case DP:case MP:return yP(e,r);case RP:return new n;case $P:case _P:return new n(e);case AP:return mP(e);case EP:return new n;case CP:return gP(e)}}i(UT,"initCloneByTag");var xP=UT;function zT(e){return typeof e.constructor=="function"&&!Ds(e)?kI(dT(e)):{}}i(zT,"initCloneObject");var FP=zT,GP="[object Map]";function BT(e){return Gt(e)&&Ua(e)==GP}i(BT,"baseIsMap");var jP=BT,um=jr&&jr.isMap,UP=um?Ms(um):jP,zP=UP,BP="[object Set]";function KT(e){return Gt(e)&&Ua(e)==BP}i(KT,"baseIsSet");var KP=KT,dm=jr&&jr.isSet,qP=dm?Ms(dm):KP,WP=qP,VP=1,HP=2,YP=4,qT="[object Arguments]",XP="[object Array]",JP="[object Boolean]",ZP="[object Date]",QP="[object Error]",WT="[object Function]",e0="[object GeneratorFunction]",t0="[object Map]",r0="[object Number]",VT="[object Object]",n0="[object RegExp]",a0="[object Set]",i0="[object String]",s0="[object Symbol]",o0="[object WeakMap]",l0="[object ArrayBuffer]",c0="[object DataView]",u0="[object Float32Array]",d0="[object Float64Array]",f0="[object Int8Array]",p0="[object Int16Array]",h0="[object Int32Array]",m0="[object Uint8Array]",g0="[object Uint8ClampedArray]",y0="[object Uint16Array]",v0="[object Uint32Array]",fe={};fe[qT]=fe[XP]=fe[l0]=fe[c0]=fe[JP]=fe[ZP]=fe[u0]=fe[d0]=fe[f0]=fe[p0]=fe[h0]=fe[t0]=fe[r0]=fe[VT]=fe[n0]=fe[a0]=fe[i0]=fe[s0]=fe[m0]=fe[g0]=fe[y0]=fe[v0]=!0;fe[QP]=fe[WT]=fe[o0]=!1;function ts(e,t,r,n,a,s){var o,l=t&VP,c=t&HP,u=t&YP;if(r&&(o=a?r(e,n,a,s):r(e)),o!==void 0)return o;if(!St(e))return e;var d=ne(e);if(d){if(o=dP(e),!l)return OI(e,o)}else{var f=Ua(e),h=f==WT||f==e0;if(cs(e))return Wk(e,l);if(f==VT||f==qT||h&&!a){if(o=c||h?{}:FP(e),!l)return c?Qk(e,Kk(o,e)):Xk(e,Bk(o,e))}else{if(!fe[f])return a?e:{};o=xP(e,f,l)}}s||(s=new es);var y=s.get(e);if(y)return y;s.set(e,o),WP(e)?e.forEach(function(b){o.add(ts(b,t,r,b,e,s))}):zP(e)&&e.forEach(function(b,w){o.set(w,ts(b,t,r,w,e,s))});var v=u?c?LT:ad:c?ql:ft,C=d?void 0:v(e);return Qy(C||e,function(b,w){C&&(w=b,b=e[w]),zl(o,w,ts(b,t,r,w,e,s))}),o}i(ts,"baseClone");var T0=ts,R0=4;function HT(e){return T0(e,R0)}i(HT,"clone");var Ke=HT;function YT(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(YT,"compact");var Fs=YT,$0="__lodash_hash_undefined__";function XT(e){return this.__data__.set(e,$0),this}i(XT,"setCacheAdd");var A0=XT;function JT(e){return this.__data__.has(e)}i(JT,"setCacheHas");var E0=JT;function fs(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Yl;++t<r;)this.add(e[t])}i(fs,"SetCache");fs.prototype.add=fs.prototype.push=A0;fs.prototype.has=E0;var mp=fs;function ZT(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(ZT,"arraySome");var QT=ZT;function eR(e,t){return e.has(t)}i(eR,"cacheHas");var gp=eR,_0=1,C0=2;function tR(e,t,r,n,a,s){var o=r&_0,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var u=s.get(e),d=s.get(t);if(u&&d)return u==t&&d==e;var f=-1,h=!0,y=r&C0?new mp:void 0;for(s.set(e,t),s.set(t,e);++f<l;){var v=e[f],C=t[f];if(n)var b=o?n(C,v,f,t,e,s):n(v,C,f,e,t,s);if(b!==void 0){if(b)continue;h=!1;break}if(y){if(!QT(t,function(w,I){if(!gp(y,I)&&(v===w||a(v,w,r,n,s)))return y.push(I)})){h=!1;break}}else if(!(v===C||a(v,C,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}i(tR,"equalArrays");var rR=tR;function nR(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}i(nR,"mapToArray");var S0=nR;function aR(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}i(aR,"setToArray");var yp=aR,b0=1,w0=2,I0="[object Boolean]",N0="[object Date]",k0="[object Error]",P0="[object Map]",O0="[object Number]",L0="[object RegExp]",D0="[object Set]",M0="[object String]",x0="[object Symbol]",F0="[object ArrayBuffer]",G0="[object DataView]",fm=Ct?Ct.prototype:void 0,Lc=fm?fm.valueOf:void 0;function iR(e,t,r,n,a,s,o){switch(r){case G0:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case F0:return!(e.byteLength!=t.byteLength||!s(new tl(e),new tl(t)));case I0:case N0:case O0:return Os(+e,+t);case k0:return e.name==t.name&&e.message==t.message;case L0:case M0:return e==t+"";case P0:var l=S0;case D0:var c=n&b0;if(l||(l=yp),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;n|=w0,o.set(e,t);var d=rR(l(e),l(t),n,a,s,o);return o.delete(e),d;case x0:if(Lc)return Lc.call(e)==Lc.call(t)}return!1}i(iR,"equalByTag");var j0=iR,U0=1,z0=Object.prototype,B0=z0.hasOwnProperty;function sR(e,t,r,n,a,s){var o=r&U0,l=ad(e),c=l.length,u=ad(t),d=u.length;if(c!=d&&!o)return!1;for(var f=c;f--;){var h=l[f];if(!(o?h in t:B0.call(t,h)))return!1}var y=s.get(e),v=s.get(t);if(y&&v)return y==t&&v==e;var C=!0;s.set(e,t),s.set(t,e);for(var b=o;++f<c;){h=l[f];var w=e[h],I=t[h];if(n)var A=o?n(I,w,h,t,e,s):n(w,I,h,e,t,s);if(!(A===void 0?w===I||a(w,I,r,n,s):A)){C=!1;break}b||(b=h=="constructor")}if(C&&!b){var k=e.constructor,G=t.constructor;k!=G&&"constructor"in e&&"constructor"in t&&!(typeof k=="function"&&k instanceof k&&typeof G=="function"&&G instanceof G)&&(C=!1)}return s.delete(e),s.delete(t),C}i(sR,"equalObjects");var K0=sR,q0=1,pm="[object Arguments]",hm="[object Array]",Vs="[object Object]",W0=Object.prototype,mm=W0.hasOwnProperty;function oR(e,t,r,n,a,s){var o=ne(e),l=ne(t),c=o?hm:Ua(e),u=l?hm:Ua(t);c=c==pm?Vs:c,u=u==pm?Vs:u;var d=c==Vs,f=u==Vs,h=c==u;if(h&&cs(e)){if(!cs(t))return!1;o=!0,d=!1}if(h&&!d)return s||(s=new es),o||sp(e)?rR(e,t,r,n,a,s):j0(e,t,c,r,n,a,s);if(!(r&q0)){var y=d&&mm.call(e,"__wrapped__"),v=f&&mm.call(t,"__wrapped__");if(y||v){var C=y?e.value():e,b=v?t.value():t;return s||(s=new es),a(C,b,r,n,s)}}return h?(s||(s=new es),K0(e,t,r,n,a,s)):!1}i(oR,"baseIsEqualDeep");var V0=oR;function vp(e,t,r,n,a){return e===t?!0:e==null||t==null||!Gt(e)&&!Gt(t)?e!==e&&t!==t:V0(e,t,r,n,vp,a)}i(vp,"baseIsEqual");var lR=vp,H0=1,Y0=2;function cR(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 c=l[0],u=e[c],d=l[1];if(o&&l[2]){if(u===void 0&&!(c in e))return!1}else{var f=new es;if(n)var h=n(u,d,c,e,t,f);if(!(h===void 0?lR(d,u,H0|Y0,n,f):h))return!1}}return!0}i(cR,"baseIsMatch");var X0=cR;function uR(e){return e===e&&!St(e)}i(uR,"isStrictComparable");var dR=uR;function fR(e){for(var t=ft(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,dR(a)]}return t}i(fR,"getMatchData");var J0=fR;function pR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}i(pR,"matchesStrictComparable");var hR=pR;function mR(e){var t=J0(e);return t.length==1&&t[0][2]?hR(t[0][0],t[0][1]):function(r){return r===e||X0(r,e,t)}}i(mR,"baseMatches");var Z0=mR;function gR(e,t){return e!=null&&t in Object(e)}i(gR,"baseHasIn");var Q0=gR;function yR(e,t,r){t=Jl(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&&ip(a)&&Ul(o,a)&&(ne(e)||Kl(e)))}i(yR,"hasPath");var vR=yR;function TR(e,t){return e!=null&&vR(e,t,Q0)}i(TR,"hasIn");var eO=TR,tO=1,rO=2;function RR(e,t){return op(e)&&dR(t)?hR(xs(e),t):function(r){var n=Ok(r,e);return n===void 0&&n===t?eO(r,e):lR(t,n,tO|rO)}}i(RR,"baseMatchesProperty");var nO=RR;function $R(e){return function(t){return t?.[e]}}i($R,"baseProperty");var aO=$R;function AR(e){return function(t){return lp(t,e)}}i(AR,"basePropertyDeep");var iO=AR;function ER(e){return op(e)?aO(xs(e)):iO(e)}i(ER,"property");var sO=ER;function _R(e){return typeof e=="function"?e:e==null?ja:typeof e=="object"?ne(e)?nO(e[0],e[1]):Z0(e):sO(e)}i(_R,"baseIteratee");var ar=_R;function CR(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(CR,"arrayAggregator");var oO=CR;function SR(e){return function(t,r,n){for(var a=-1,s=Object(t),o=n(t),l=o.length;l--;){var c=o[e?l:++a];if(r(s[c],c,s)===!1)break}return t}}i(SR,"createBaseFor");var lO=SR,cO=lO(),uO=cO;function bR(e,t){return e&&uO(e,t,ft)}i(bR,"baseForOwn");var dO=bR;function wR(e,t){return function(r,n){if(r==null)return r;if(!nr(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(wR,"createBaseEach");var fO=wR,pO=fO(dO),Kn=pO;function IR(e,t,r,n){return Kn(e,function(a,s,o){t(n,a,r(a),o)}),n}i(IR,"baseAggregator");var hO=IR;function NR(e,t){return function(r,n){var a=ne(r)?oO:hO,s=t?t():{};return a(r,e,ar(n),s)}}i(NR,"createAggregator");var mO=NR,kR=Object.prototype,gO=kR.hasOwnProperty,yO=ap(function(e,t){e=Object(e);var r=-1,n=t.length,a=n>2?t[2]:void 0;for(a&&Bl(t[0],t[1],a)&&(n=1);++r<n;)for(var s=t[r],o=ql(s),l=-1,c=o.length;++l<c;){var u=o[l],d=e[u];(d===void 0||Os(d,kR[u])&&!gO.call(e,u))&&(e[u]=s[u])}return e}),Tp=yO;function PR(e){return Gt(e)&&nr(e)}i(PR,"isArrayLikeObject");var gm=PR;function OR(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(OR,"arrayIncludesWith");var LR=OR,vO=200;function DR(e,t,r,n){var a=-1,s=sv,o=!0,l=e.length,c=[],u=t.length;if(!l)return c;r&&(t=ks(t,Ms(r))),n?(s=LR,o=!1):t.length>=vO&&(s=gp,o=!1,t=new mp(t));e:for(;++a<l;){var d=e[a],f=r==null?d:r(d);if(d=n||d!==0?d:0,o&&f===f){for(var h=u;h--;)if(t[h]===f)continue e;c.push(d)}else s(t,f,n)||c.push(d)}return c}i(DR,"baseDifference");var TO=DR,RO=ap(function(e,t){return gm(e)?TO(e,dp(t,1,gm,!0)):[]}),Zl=RO;function MR(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}i(MR,"last");var wn=MR;function xR(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:Ps(t),pT(e,t<0?0:t,n)):[]}i(xR,"drop");var ze=xR;function FR(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:Ps(t),t=n-t,pT(e,0,t<0?0:t)):[]}i(FR,"dropRight");var ps=FR;function GR(e){return typeof e=="function"?e:ja}i(GR,"castFunction");var $O=GR;function jR(e,t){var r=ne(e)?Qy:Kn;return r(e,$O(t))}i(jR,"forEach");var q=jR;function UR(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(UR,"arrayEvery");var AO=UR;function zR(e,t){var r=!0;return Kn(e,function(n,a,s){return r=!!t(n,a,s),r}),r}i(zR,"baseEvery");var EO=zR;function BR(e,t,r){var n=ne(e)?AO:EO;return r&&Bl(e,t,r)&&(t=void 0),n(e,ar(t))}i(BR,"every");var Ft=BR;function KR(e,t){var r=[];return Kn(e,function(n,a,s){t(n,a,s)&&r.push(n)}),r}i(KR,"baseFilter");var qR=KR;function WR(e,t){var r=ne(e)?fp:qR;return r(e,ar(t))}i(WR,"filter");var wt=WR;function VR(e){return function(t,r,n){var a=Object(t);if(!nr(t)){var s=ar(r);t=ft(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(VR,"createFind");var _O=VR,CO=Math.max;function HR(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:Ps(r);return a<0&&(a=CO(n+a,0)),tv(e,ar(t),a)}i(HR,"findIndex");var SO=HR,bO=_O(SO),za=bO;function YR(e){return e&&e.length?e[0]:void 0}i(YR,"head");var jt=YR;function XR(e,t){var r=-1,n=nr(e)?Array(e.length):[];return Kn(e,function(a,s,o){n[++r]=t(a,s,o)}),n}i(XR,"baseMap");var wO=XR;function JR(e,t){var r=ne(e)?ks:wO;return r(e,ar(t))}i(JR,"map");var F=JR;function ZR(e,t){return dp(F(e,t),1)}i(ZR,"flatMap");var _t=ZR,IO=Object.prototype,NO=IO.hasOwnProperty,kO=mO(function(e,t,r){NO.call(e,r)?e[r].push(t):np(e,r,[t])}),PO=kO,OO=Object.prototype,LO=OO.hasOwnProperty;function QR(e,t){return e!=null&&LO.call(e,t)}i(QR,"baseHas");var DO=QR;function e$(e,t){return e!=null&&vR(e,t,DO)}i(e$,"has");var U=e$,MO="[object String]";function t$(e){return typeof e=="string"||!ne(e)&&Gt(e)&&Wr(e)==MO}i(t$,"isString");var it=t$;function r$(e,t){return ks(t,function(r){return e[r]})}i(r$,"baseValues");var xO=r$;function n$(e){return e==null?[]:xO(e,ft(e))}i(n$,"values");var xe=n$,FO=Math.max;function a$(e,t,r,n){e=nr(e)?e:xe(e),r=r&&!n?Ps(r):0;var a=e.length;return r<0&&(r=FO(a+r,0)),it(e)?r<=a&&e.indexOf(t,r)>-1:!!a&&rp(e,t,r)>-1}i(a$,"includes");var tt=a$,GO=Math.max;function i$(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:Ps(r);return a<0&&(a=GO(n+a,0)),rp(e,t,a)}i(i$,"indexOf");var ym=i$,jO="[object Map]",UO="[object Set]",zO=Object.prototype,BO=zO.hasOwnProperty;function s$(e){if(e==null)return!0;if(nr(e)&&(ne(e)||typeof e=="string"||typeof e.splice=="function"||cs(e)||sp(e)||Kl(e)))return!e.length;var t=Ua(e);if(t==jO||t==UO)return!e.size;if(Ds(e))return!Pv(e).length;for(var r in e)if(BO.call(e,r))return!1;return!0}i(s$,"isEmpty");var he=s$,KO="[object RegExp]";function o$(e){return Gt(e)&&Wr(e)==KO}i(o$,"baseIsRegExp");var qO=o$,vm=jr&&jr.isRegExp,WO=vm?Ms(vm):qO,Ar=WO;function l$(e){return e===void 0}i(l$,"isUndefined");var Er=l$,VO="Expected a function";function c$(e){if(typeof e!="function")throw new TypeError(VO);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(c$,"negate");var HO=c$;function u$(e,t,r,n){if(!St(e))return e;t=Jl(t,e);for(var a=-1,s=t.length,o=s-1,l=e;l!=null&&++a<s;){var c=xs(t[a]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(a!=o){var d=l[c];u=n?n(d,c,l):void 0,u===void 0&&(u=St(d)?d:Ul(t[a+1])?[]:{})}zl(l,c,u),l=l[c]}return e}i(u$,"baseSet");var YO=u$;function d$(e,t,r){for(var n=-1,a=t.length,s={};++n<a;){var o=t[n],l=lp(e,o);r(l,o)&&YO(s,Jl(o,e),l)}return s}i(d$,"basePickBy");var XO=d$;function f$(e,t){if(e==null)return{};var r=ks(LT(e),function(n){return[n]});return t=ar(t),XO(e,r,function(n,a){return t(n,a[0])})}i(f$,"pickBy");var Ut=f$;function p$(e,t,r,n,a){return a(e,function(s,o,l){r=n?(n=!1,s):t(r,s,o,l)}),r}i(p$,"baseReduce");var JO=p$;function h$(e,t,r){var n=ne(e)?Mk:JO,a=arguments.length<3;return n(e,ar(t),r,a,Kn)}i(h$,"reduce");var ht=h$;function m$(e,t){var r=ne(e)?fp:qR;return r(e,HO(ar(t)))}i(m$,"reject");var Ql=m$;function g$(e,t){var r;return Kn(e,function(n,a,s){return r=t(n,a,s),!r}),!!r}i(g$,"baseSome");var ZO=g$;function y$(e,t,r){var n=ne(e)?QT:ZO;return r&&Bl(e,t,r)&&(t=void 0),n(e,ar(t))}i(y$,"some");var v$=y$,QO=1/0,eL=Na&&1/yp(new Na([,-0]))[1]==QO?function(e){return new Na(e)}:Me,tL=eL,rL=200;function T$(e,t,r){var n=-1,a=sv,s=e.length,o=!0,l=[],c=l;if(r)o=!1,a=LR;else if(s>=rL){var u=t?null:tL(e);if(u)return yp(u);o=!1,a=gp,c=new mp}else c=t?[]:l;e:for(;++n<s;){var d=e[n],f=t?t(d):d;if(d=r||d!==0?d:0,o&&f===f){for(var h=c.length;h--;)if(c[h]===f)continue e;t&&c.push(f),l.push(d)}else a(c,f,r)||(c!==l&&c.push(f),l.push(d))}return l}i(T$,"baseUniq");var nL=T$;function R$(e){return e&&e.length?nL(e):[]}i(R$,"uniq");var Rp=R$;function rl(e){console&&console.error&&console.error(`Error: ${e}`)}i(rl,"PRINT_ERROR");function $p(e){console&&console.warn&&console.warn(`Warning: ${e}`)}i($p,"PRINT_WARNING");function Ap(e){const t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}i(Ap,"timer");function Ep(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(Ep,"toFastProperties");function $$(e){return A$(e)?e.LABEL:e.name}i($$,"tokenLabel");function A$(e){return it(e.LABEL)&&e.LABEL!==""}i(A$,"hasTokenLabel");var ir=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),q(this.definition,t=>{t.accept(e)})}},Ze=class extends ir{static{i(this,"NonTerminal")}constructor(e){super([]),this.idx=1,pt(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)}},Ha=class extends ir{static{i(this,"Rule")}constructor(e){super(e.definition),this.orgText="",pt(this,Ut(e,t=>t!==void 0))}},st=class extends ir{static{i(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,pt(this,Ut(e,t=>t!==void 0))}},Be=class extends ir{static{i(this,"Option")}constructor(e){super(e.definition),this.idx=1,pt(this,Ut(e,t=>t!==void 0))}},mt=class extends ir{static{i(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,pt(this,Ut(e,t=>t!==void 0))}},gt=class extends ir{static{i(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,pt(this,Ut(e,t=>t!==void 0))}},we=class extends ir{static{i(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,pt(this,Ut(e,t=>t!==void 0))}},ot=class extends ir{static{i(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,pt(this,Ut(e,t=>t!==void 0))}},lt=class extends ir{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,pt(this,Ut(e,t=>t!==void 0))}},Te=class{static{i(this,"Terminal")}constructor(e){this.idx=1,pt(this,Ut(e,t=>t!==void 0))}accept(e){e.visit(this)}};function E$(e){return F(e,rs)}i(E$,"serializeGrammar");function rs(e){function t(r){return F(r,rs)}if(i(t,"convertDefinition"),e instanceof Ze){const r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return it(e.label)&&(r.label=e.label),r}else{if(e instanceof st)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Be)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof mt)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof gt)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:rs(new Te({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof ot)return{type:"RepetitionWithSeparator",idx:e.idx,separator:rs(new Te({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof we)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof lt)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof Te){const r={type:"Terminal",name:e.terminalType.name,label:$$(e.terminalType),idx:e.idx};it(e.label)&&(r.terminalLabel=e.label);const n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=Ar(n)?n.source:n),r}else{if(e instanceof Ha)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}i(rs,"serializeProduction");var Ya=class{static{i(this,"GAstVisitor")}visit(e){const t=e;switch(t.constructor){case Ze:return this.visitNonTerminal(t);case st:return this.visitAlternative(t);case Be:return this.visitOption(t);case mt:return this.visitRepetitionMandatory(t);case gt:return this.visitRepetitionMandatoryWithSeparator(t);case ot:return this.visitRepetitionWithSeparator(t);case we:return this.visitRepetition(t);case lt:return this.visitAlternation(t);case Te:return this.visitTerminal(t);case Ha: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 _$(e){return e instanceof st||e instanceof Be||e instanceof we||e instanceof mt||e instanceof gt||e instanceof ot||e instanceof Te||e instanceof Ha}i(_$,"isSequenceProd");function hs(e,t=[]){return e instanceof Be||e instanceof we||e instanceof ot?!0:e instanceof lt?v$(e.definition,n=>hs(n,t)):e instanceof Ze&&tt(t,e)?!1:e instanceof ir?(e instanceof Ze&&t.push(e),Ft(e.definition,n=>hs(n,t))):!1}i(hs,"isOptionalProd");function C$(e){return e instanceof lt}i(C$,"isBranchingProd");function Ot(e){if(e instanceof Ze)return"SUBRULE";if(e instanceof Be)return"OPTION";if(e instanceof lt)return"OR";if(e instanceof mt)return"AT_LEAST_ONE";if(e instanceof gt)return"AT_LEAST_ONE_SEP";if(e instanceof ot)return"MANY_SEP";if(e instanceof we)return"MANY";if(e instanceof Te)return"CONSUME";throw Error("non exhaustive match")}i(Ot,"getProductionDslName");var ec=class{static{i(this,"RestWalker")}walk(e,t=[]){q(e.definition,(r,n)=>{const a=ze(e.definition,n+1);if(r instanceof Ze)this.walkProdRef(r,a,t);else if(r instanceof Te)this.walkTerminal(r,a,t);else if(r instanceof st)this.walkFlat(r,a,t);else if(r instanceof Be)this.walkOption(r,a,t);else if(r instanceof mt)this.walkAtLeastOne(r,a,t);else if(r instanceof gt)this.walkAtLeastOneSep(r,a,t);else if(r instanceof ot)this.walkManySep(r,a,t);else if(r instanceof we)this.walkMany(r,a,t);else if(r instanceof lt)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 Be({definition:e.definition})].concat(t,r);this.walk(e,n)}walkAtLeastOneSep(e,t,r){const n=od(e,t,r);this.walk(e,n)}walkMany(e,t,r){const n=[new Be({definition:e.definition})].concat(t,r);this.walk(e,n)}walkManySep(e,t,r){const n=od(e,t,r);this.walk(e,n)}walkOr(e,t,r){const n=t.concat(r);q(e.definition,a=>{const s=new st({definition:[a]});this.walk(s,n)})}};function od(e,t,r){return[new Be({definition:[new Te({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}i(od,"restForRepetitionWithSeparator");function Xa(e){if(e instanceof Ze)return Xa(e.referencedRule);if(e instanceof Te)return w$(e);if(_$(e))return S$(e);if(C$(e))return b$(e);throw Error("non exhaustive match")}i(Xa,"first");function S$(e){let t=[];const r=e.definition;let n=0,a=r.length>n,s,o=!0;for(;a&&o;)s=r[n],o=hs(s),t=t.concat(Xa(s)),n=n+1,a=r.length>n;return Rp(t)}i(S$,"firstForSequence");function b$(e){const t=F(e.definition,r=>Xa(r));return Rp(xt(t))}i(b$,"firstForBranching");function w$(e){return[e.terminalType]}i(w$,"firstForTerminal");var I$="_~IN~_",aL=class extends ec{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=k$(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(r),s=new st({definition:a}),o=Xa(s);this.follows[n]=o}};function N$(e){const t={};return q(e,r=>{const n=new aL(r).startWalking();pt(t,n)}),t}i(N$,"computeAllProdsFollows");function k$(e,t){return e.name+t+I$}i(k$,"buildBetweenProdsFollowPrefix");var $o={},iL=new cy;function Gs(e){const t=e.toString();if($o.hasOwnProperty(t))return $o[t];{const r=iL.pattern(t);return $o[t]=r,r}}i(Gs,"getRegExpAst");function P$(){$o={}}i(P$,"clearRegExpParserCache");var O$="Complement Sets are not supported for first char optimization",nl=`Unable to use "first char" lexer optimizations:
  35. `;function L$(e,t=!1){try{const r=Gs(e);return al(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===O$)t&&$p(`${nl} Unable to optimize: < ${e.toString()} >
  36. Complement Sets cannot be automatically optimized.
  37. This will disable the lexer's first char optimizations.
  38. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n=`
  39. This will disable the lexer's first char optimizations.
  40. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),rl(`${nl}
  41. Failed parsing: < ${e.toString()} >
  42. Using the @chevrotain/regexp-to-ast library
  43. Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}i(L$,"getOptimizedStartCodesIndices");function al(e,t,r){switch(e.type){case"Disjunction":for(let a=0;a<e.value.length;a++)al(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(O$);q(o.value,c=>{if(typeof c=="number")ji(c,t,r);else{const u=c;if(r===!0)for(let d=u.from;d<=u.to;d++)ji(d,t,r);else{for(let d=u.from;d<=u.to&&d<zi;d++)ji(d,t,r);if(u.to>=zi){const d=u.from>=zi?u.from:zi,f=u.to,h=_r(d),y=_r(f);for(let v=h;v<=y;v++)t[v]=v}}}});break;case"Group":al(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"&&il(o)===!1||o.type!=="Group"&&l===!1)break}break;default:throw Error("non exhaustive match!")}return xe(t)}i(al,"firstCharOptimizedIndices");function ji(e,t,r){const n=_r(e);t[n]=n,r===!0&&D$(e,t)}i(ji,"addOptimizedIdxToResult");function D$(e,t){const r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){const a=_r(n.charCodeAt(0));t[a]=a}else{const a=r.toLowerCase();if(a!==r){const s=_r(a.charCodeAt(0));t[s]=s}}}i(D$,"handleIgnoreCase");function ld(e,t){return za(e.value,r=>{if(typeof r=="number")return tt(t,r);{const n=r;return za(t,a=>n.from<=a&&a<=n.to)!==void 0}})}i(ld,"findCode");function il(e){const t=e.quantifier;return t&&t.atLeast===0?!0:e.value?ne(e.value)?Ft(e.value,il):il(e.value):!1}i(il,"isWholeOptional");var sL=class extends Ol{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){tt(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?ld(e,this.targetCharCodes)===void 0&&(this.found=!0):ld(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function tc(e,t){if(t instanceof RegExp){const r=Gs(t),n=new sL(e);return n.visit(r),n.found}else return za(t,r=>tt(e,r.charCodeAt(0)))!==void 0}i(tc,"canMatchCharCode");var In="PATTERN",Ui="defaultMode",Hs="modes",M$=typeof new RegExp("(?:)").sticky=="boolean";function x$(e,t){t=Tp(t,{useSticky:M$,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
  44. `],tracer:i((I,A)=>A(),"tracer")});const r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{aA()});let n;r("Reject Lexer.NA",()=>{n=Ql(e,I=>I[In]===Xe.NA)});let a=!1,s;r("Transform Patterns",()=>{a=!1,s=F(n,I=>{const A=I[In];if(Ar(A)){const k=A.source;return k.length===1&&k!=="^"&&k!=="$"&&k!=="."&&!A.ignoreCase?k:k.length===2&&k[0]==="\\"&&!tt(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],k[1])?k[1]:t.useSticky?ud(A):cd(A)}else{if(Ir(A))return a=!0,{exec:A};if(typeof A=="object")return a=!0,A;if(typeof A=="string"){if(A.length===1)return A;{const k=A.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),G=new RegExp(k);return t.useSticky?ud(G):cd(G)}}else throw Error("non exhaustive match")}})});let o,l,c,u,d;r("misc mapping",()=>{o=F(n,I=>I.tokenTypeIdx),l=F(n,I=>{const A=I.GROUP;if(A!==Xe.SKIPPED){if(it(A))return A;if(Er(A))return!1;throw Error("non exhaustive match")}}),c=F(n,I=>{const A=I.LONGER_ALT;if(A)return ne(A)?F(A,G=>ym(n,G)):[ym(n,A)]}),u=F(n,I=>I.PUSH_MODE),d=F(n,I=>U(I,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{const I=Sp(t.lineTerminatorCharacters);f=F(n,A=>!1),t.positionTracking!=="onlyOffset"&&(f=F(n,A=>U(A,"LINE_BREAKS")?!!A.LINE_BREAKS:Cp(A,I)===!1&&tc(I,A.PATTERN)))});let h,y,v,C;r("Misc Mapping #2",()=>{h=F(n,_p),y=F(s,rA),v=ht(n,(I,A)=>{const k=A.GROUP;return it(k)&&k!==Xe.SKIPPED&&(I[k]=[]),I},{}),C=F(s,(I,A)=>({pattern:s[A],longerAlt:c[A],canLineTerminator:f[A],isCustom:h[A],short:y[A],group:l[A],push:u[A],pop:d[A],tokenTypeIdx:o[A],tokenType:n[A]}))});let b=!0,w=[];return t.safeMode||r("First Char Optimization",()=>{w=ht(n,(I,A,k)=>{if(typeof A.PATTERN=="string"){const G=A.PATTERN.charCodeAt(0),H=_r(G);Ao(I,H,C[k])}else if(ne(A.START_CHARS_HINT)){let G;q(A.START_CHARS_HINT,H=>{const X=typeof H=="string"?H.charCodeAt(0):H,le=_r(X);G!==le&&(G=le,Ao(I,le,C[k]))})}else if(Ar(A.PATTERN))if(A.PATTERN.unicode)b=!1,t.ensureOptimizations&&rl(`${nl} Unable to analyze < ${A.PATTERN.toString()} > pattern.
  45. The regexp unicode flag is not currently supported by the regexp-to-ast library.
  46. This will disable the lexer's first char optimizations.
  47. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const G=L$(A.PATTERN,t.ensureOptimizations);he(G)&&(b=!1),q(G,H=>{Ao(I,H,C[k])})}else t.ensureOptimizations&&rl(`${nl} TokenType: <${A.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
  48. This will disable the lexer's first char optimizations.
  49. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),b=!1;return I},[])}),{emptyGroups:v,patternIdxToConfig:C,charCodeToPatternIdxToConfig:w,hasCustom:a,canBeOptimized:b}}i(x$,"analyzeTokenTypes");function F$(e,t){let r=[];const n=j$(e);r=r.concat(n.errors);const a=U$(n.valid),s=a.valid;return r=r.concat(a.errors),r=r.concat(G$(s)),r=r.concat(V$(s)),r=r.concat(H$(s,t)),r=r.concat(Y$(s)),r}i(F$,"validatePatterns");function G$(e){let t=[];const r=wt(e,n=>Ar(n[In]));return t=t.concat(z$(r)),t=t.concat(K$(r)),t=t.concat(q$(r)),t=t.concat(W$(r)),t=t.concat(B$(r)),t}i(G$,"validateRegExpPattern");function j$(e){const t=wt(e,a=>!U(a,In)),r=F(t,a=>({message:"Token Type: ->"+a.name+"<- missing static 'PATTERN' property",type:Ie.MISSING_PATTERN,tokenTypes:[a]})),n=Zl(e,t);return{errors:r,valid:n}}i(j$,"findMissingPatterns");function U$(e){const t=wt(e,a=>{const s=a[In];return!Ar(s)&&!Ir(s)&&!U(s,"exec")&&!it(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:Ie.INVALID_PATTERN,tokenTypes:[a]})),n=Zl(e,t);return{errors:r,valid:n}}i(U$,"findInvalidPatterns");var oL=/[^\\][$]/;function z$(e){class t extends Ol{static{i(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}const r=wt(e,a=>{const s=a.PATTERN;try{const o=Gs(s),l=new t;return l.visit(o),l.found}catch{return oL.test(s.source)}});return F(r,a=>({message:`Unexpected RegExp Anchor Error:
  50. Token Type: ->`+a.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
  51. See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Ie.EOI_ANCHOR_FOUND,tokenTypes:[a]}))}i(z$,"findEndOfInputAnchor");function B$(e){const t=wt(e,n=>n.PATTERN.test(""));return F(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Ie.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}i(B$,"findEmptyMatchRegExps");var lL=/[^\\[][\^]|^\^/;function K$(e){class t extends Ol{static{i(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}const r=wt(e,a=>{const s=a.PATTERN;try{const o=Gs(s),l=new t;return l.visit(o),l.found}catch{return lL.test(s.source)}});return F(r,a=>({message:`Unexpected RegExp Anchor Error:
  52. Token Type: ->`+a.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
  53. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Ie.SOI_ANCHOR_FOUND,tokenTypes:[a]}))}i(K$,"findStartOfInputAnchor");function q$(e){const t=wt(e,n=>{const a=n[In];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:Ie.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}i(q$,"findUnsupportedFlags");function W$(e){const t=[];let r=F(e,s=>ht(e,(o,l)=>(s.PATTERN.source===l.PATTERN.source&&!tt(t,l)&&l.PATTERN!==Xe.NA&&(t.push(l),o.push(l)),o),[]));r=Fs(r);const n=wt(r,s=>s.length>1);return F(n,s=>{const o=F(s,c=>c.name);return{message:`The same RegExp pattern ->${jt(s).PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:Ie.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}i(W$,"findDuplicatePatterns");function V$(e){const t=wt(e,n=>{if(!U(n,"GROUP"))return!1;const a=n.GROUP;return a!==Xe.SKIPPED&&a!==Xe.NA&&!it(a)});return F(t,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Ie.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}i(V$,"findInvalidGroupType");function H$(e,t){const r=wt(e,a=>a.PUSH_MODE!==void 0&&!tt(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:Ie.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[a]}))}i(H$,"findModesThatDoNotExist");function Y$(e){const t=[],r=ht(e,(n,a,s)=>{const o=a.PATTERN;return o===Xe.NA||(it(o)?n.push({str:o,idx:s,tokenType:a}):Ar(o)&&J$(o)&&n.push({str:o.source,idx:s,tokenType:a})),n},[]);return q(e,(n,a)=>{q(r,({str:s,idx:o,tokenType:l})=>{if(a<o&&X$(s,n.PATTERN)){const c=`Token: ->${l.name}<- can never be matched.
  54. Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
  55. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:c,type:Ie.UNREACHABLE_PATTERN,tokenTypes:[n,l]})}})}),t}i(Y$,"findUnreachablePatterns");function X$(e,t){if(Ar(t)){if(Z$(t))return!1;const r=t.exec(e);return r!==null&&r.index===0}else{if(Ir(t))return t(e,0,[],{});if(U(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}i(X$,"tryToMatchStrToPattern");function J$(e){return za([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>e.source.indexOf(r)!==-1)===void 0}i(J$,"noMetaChar");function Z$(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}i(Z$,"usesLookAheadOrBehind");function cd(e){const t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}i(cd,"addStartOfInput");function ud(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}i(ud,"addStickyFlag");function Q$(e,t,r){const n=[];return U(e,Ui)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ui+`> property in its definition
  56. `,type:Ie.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),U(e,Hs)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Hs+`> property in its definition
  57. `,type:Ie.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),U(e,Hs)&&U(e,Ui)&&!U(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Ui}: <${e.defaultMode}>which does not exist
  58. `,type:Ie.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),U(e,Hs)&&q(e.modes,(a,s)=>{q(a,(o,l)=>{if(Er(o))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${s}> at index: <${l}>
  59. `,type:Ie.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(U(o,"LONGER_ALT")){const c=ne(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT];q(c,u=>{!Er(u)&&!tt(a,u)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${o.name}> outside of mode <${s}>
  60. `,type:Ie.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}i(Q$,"performRuntimeChecks");function eA(e,t,r){const n=[];let a=!1;const s=Fs(xt(xe(e.modes))),o=Ql(s,c=>c[In]===Xe.NA),l=Sp(r);return t&&q(o,c=>{const u=Cp(c,l);if(u!==!1){const f={message:nA(c,u),type:u.issue,tokenType:c};n.push(f)}else U(c,"LINE_BREAKS")?c.LINE_BREAKS===!0&&(a=!0):tc(l,c.PATTERN)&&(a=!0)}),t&&!a&&n.push({message:`Warning: No LINE_BREAKS Found.
  61. This Lexer has been defined to track line and column information,
  62. But none of the Token Types can be identified as matching a line terminator.
  63. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
  64. for details.`,type:Ie.NO_LINE_BREAKS_FLAGS}),n}i(eA,"performWarningRuntimeChecks");function tA(e){const t={},r=ft(e);return q(r,n=>{const a=e[n];if(ne(a))t[n]=[];else throw Error("non exhaustive match")}),t}i(tA,"cloneEmptyGroups");function _p(e){const t=e.PATTERN;if(Ar(t))return!1;if(Ir(t))return!0;if(U(t,"exec"))return!0;if(it(t))return!1;throw Error("non exhaustive match")}i(_p,"isCustomPattern");function rA(e){return it(e)&&e.length===1?e.charCodeAt(0):!1}i(rA,"isShortPattern");var cL={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 Cp(e,t){if(U(e,"LINE_BREAKS"))return!1;if(Ar(e.PATTERN)){try{tc(t,e.PATTERN)}catch(r){return{issue:Ie.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(it(e.PATTERN))return!1;if(_p(e))return{issue:Ie.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}i(Cp,"checkLineBreaksIssues");function nA(e,t){if(t.issue===Ie.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
  65. The problem is in the <${e.name}> Token Type
  66. Root cause: ${t.errMsg}.
  67. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===Ie.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
  68. The problem is in the <${e.name}> Token Type
  69. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}i(nA,"buildLineBreakIssueMessage");function Sp(e){return F(e,r=>it(r)?r.charCodeAt(0):r)}i(Sp,"getCharCodes");function Ao(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}i(Ao,"addToMapOfArrays");var zi=256,Eo=[];function _r(e){return e<zi?e:Eo[e]}i(_r,"charCodeToOptimizedIndex");function aA(){if(he(Eo)){Eo=new Array(65536);for(let e=0;e<65536;e++)Eo[e]=e>255?255+~~(e/255):e}}i(aA,"initCharCodeToOptimizedIndexMap");function Ja(e,t){const r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}i(Ja,"tokenStructuredMatcher");function ms(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}i(ms,"tokenStructuredMatcherNoCategories");var Tm=1,iA={};function Za(e){const t=sA(e);oA(t),cA(t),lA(t),q(t,r=>{r.isParent=r.categoryMatches.length>0})}i(Za,"augmentTokenTypes");function sA(e){let t=Ke(e),r=e,n=!0;for(;n;){r=Fs(xt(F(r,s=>s.CATEGORIES)));const a=Zl(r,t);t=t.concat(a),he(a)?n=!1:r=a}return t}i(sA,"expandCategories");function oA(e){q(e,t=>{wp(t)||(iA[Tm]=t,t.tokenTypeIdx=Tm++),dd(t)&&!ne(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),dd(t)||(t.CATEGORIES=[]),uA(t)||(t.categoryMatches=[]),dA(t)||(t.categoryMatchesMap={})})}i(oA,"assignTokenDefaultProps");function lA(e){q(e,t=>{t.categoryMatches=[],q(t.categoryMatchesMap,(r,n)=>{t.categoryMatches.push(iA[n].tokenTypeIdx)})})}i(lA,"assignCategoriesTokensProp");function cA(e){q(e,t=>{bp([],t)})}i(cA,"assignCategoriesMapProp");function bp(e,t){q(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),q(t.CATEGORIES,r=>{const n=e.concat(t);tt(n,r)||bp(n,r)})}i(bp,"singleAssignCategoriesToksMap");function wp(e){return U(e,"tokenTypeIdx")}i(wp,"hasShortKeyProperty");function dd(e){return U(e,"CATEGORIES")}i(dd,"hasCategoriesProperty");function uA(e){return U(e,"categoryMatches")}i(uA,"hasExtendingTokensTypesProperty");function dA(e){return U(e,"categoryMatchesMap")}i(dA,"hasExtendingTokensTypesMapProperty");function fA(e){return U(e,"tokenTypeIdx")}i(fA,"isTokenType");var fd={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.`}},Ie;(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"})(Ie||(Ie={}));var Bi={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
  70. `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:fd,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Bi);var Xe=class{static{i(this,"Lexer")}constructor(e,t=Bi){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}=Ap(a),c=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&c(`${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.
  71. a boolean 2nd argument is no longer supported`);this.config=pt({},Bi,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===Bi.lineTerminatorsPattern)this.config.lineTerminatorsPattern=cL;else if(this.config.lineTerminatorCharacters===Bi.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
  72. 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),ne(e)?n={modes:{defaultMode:Ke(e)},defaultMode:Ui}:(a=!1,n=Ke(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Q$(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(eA(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},q(n.modes,(o,l)=>{n.modes[l]=Ql(o,c=>Er(c))});const s=ft(n.modes);if(q(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(F$(o,s))}),he(this.lexerDefinitionErrors)){Za(o);let c;this.TRACE_INIT("analyzeTokenTypes",()=>{c=x$(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=c.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=c.charCodeToPatternIdxToConfig,this.emptyGroups=pt({},this.emptyGroups,c.emptyGroups),this.hasCustom=c.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=c.canBeOptimized}})}),this.defaultMode=n.defaultMode,!he(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const l=F(this.lexerDefinitionErrors,c=>c.message).join(`-----------------------
  73. `);throw new Error(`Errors detected in definition of Lexer:
  74. `+l)}q(this.lexerDefinitionWarning,o=>{$p(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(M$?(this.chopInput=ja,this.match=this.matchWithTest):(this.updateLastIndex=Me,this.match=this.matchWithExec),a&&(this.handleModes=Me),this.trackStartLines===!1&&(this.computeNewColumn=ja),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Me),/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=ht(this.canModeBeOptimized,(l,c,u)=>(c===!1&&l.push(u),l),[]);if(t.ensureOptimizations&&!he(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized.
  75. Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
  76. Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{P$()}),this.TRACE_INIT("toFastProperties",()=>{Ep(this)})})}tokenize(e,t=this.defaultMode){if(!he(this.lexerDefinitionErrors)){const n=F(this.lexerDefinitionErrors,a=>a.message).join(`-----------------------
  77. `);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
  78. `+n)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,n,a,s,o,l,c,u,d,f,h,y,v,C,b;const w=e,I=w.length;let A=0,k=0;const G=this.hasCustom?0:Math.floor(e.length/10),H=new Array(G),X=[];let le=this.trackStartLines?1:void 0,ce=this.trackStartLines?1:void 0;const Ne=tA(this.emptyGroups),P=this.trackStartLines,_=this.config.lineTerminatorsPattern;let g=0,E=[],T=[];const R=[],S=[];Object.freeze(S);let O;function M(){return E}i(M,"getPossiblePatternsSlow");function D(te){const de=_r(te),ct=T[de];return ct===void 0?S:ct}i(D,"getPossiblePatternsOptimized");const z=i(te=>{if(R.length===1&&te.tokenType.PUSH_MODE===void 0){const de=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(te);X.push({offset:te.startOffset,line:te.startLine,column:te.startColumn,length:te.image.length,message:de})}else{R.pop();const de=wn(R);E=this.patternIdxToConfig[de],T=this.charCodeToPatternIdxToConfig[de],g=E.length;const ct=this.canModeBeOptimized[de]&&this.config.safeMode===!1;T&&ct?O=D:O=M}},"pop_mode");function B(te){R.push(te),T=this.charCodeToPatternIdxToConfig[te],E=this.patternIdxToConfig[te],g=E.length,g=E.length;const de=this.canModeBeOptimized[te]&&this.config.safeMode===!1;T&&de?O=D:O=M}i(B,"push_mode"),B.call(this,t);let Z;const J=this.config.recoveryEnabled;for(;A<I;){l=null;const te=w.charCodeAt(A),de=O(te),ct=de.length;for(r=0;r<ct;r++){Z=de[r];const Re=Z.pattern;c=null;const Oe=Z.short;if(Oe!==!1?te===Oe&&(l=Re):Z.isCustom===!0?(b=Re.exec(w,A,H,Ne),b!==null?(l=b[0],b.payload!==void 0&&(c=b.payload)):l=null):(this.updateLastIndex(Re,A),l=this.match(Re,e,A)),l!==null){if(o=Z.longerAlt,o!==void 0){const qe=o.length;for(a=0;a<qe;a++){const Se=E[o[a]],Q=Se.pattern;if(u=null,Se.isCustom===!0?(b=Q.exec(w,A,H,Ne),b!==null?(s=b[0],b.payload!==void 0&&(u=b.payload)):s=null):(this.updateLastIndex(Q,A),s=this.match(Q,e,A)),s&&s.length>l.length){l=s,c=u,Z=Se;break}}}break}}if(l!==null){if(d=l.length,f=Z.group,f!==void 0&&(h=Z.tokenTypeIdx,y=this.createTokenInstance(l,A,h,Z.tokenType,le,ce,d),this.handlePayload(y,c),f===!1?k=this.addToken(H,k,y):Ne[f].push(y)),e=this.chopInput(e,d),A=A+d,ce=this.computeNewColumn(ce,d),P===!0&&Z.canLineTerminator===!0){let Re=0,Oe,qe;_.lastIndex=0;do Oe=_.test(l),Oe===!0&&(qe=_.lastIndex-1,Re++);while(Oe===!0);Re!==0&&(le=le+Re,ce=d-qe,this.updateTokenEndLineColumnLocation(y,f,qe,Re,le,ce,d))}this.handleModes(Z,z,B,y)}else{const Re=A,Oe=le,qe=ce;let Se=J===!1;for(;Se===!1&&A<I;)for(e=this.chopInput(e,1),A++,n=0;n<g;n++){const Q=E[n],rt=Q.pattern,me=Q.short;if(me!==!1?w.charCodeAt(A)===me&&(Se=!0):Q.isCustom===!0?Se=rt.exec(w,A,H,Ne)!==null:(this.updateLastIndex(rt,A),Se=rt.exec(e)!==null),Se===!0)break}if(v=A-Re,ce=this.computeNewColumn(ce,v),C=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(w,Re,v,Oe,qe,wn(R)),X.push({offset:Re,line:Oe,column:qe,length:v,message:C}),J===!1)break}}return this.hasCustom||(H.length=k),{tokens:H,groups:Ne,errors:X}}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)}chopInput(e,t){return e.substring(t)}updateLastIndex(e,t){e.lastIndex=t}updateTokenEndLineColumnLocation(e,t,r,n,a,s,o){let l,c;t!==void 0&&(l=r===o-1,c=l?-1:0,n===1&&l===!0||(e.endLine=a+c,e.endColumn=s-1+-c))}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)}matchWithTest(e,t,r){return e.test(t)===!0?t.substring(r,e.lastIndex):null}matchWithExec(e,t){const r=e.exec(t);return r!==null?r[0]:null}};Xe.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.";Xe.NA=/NOT_APPLICABLE/;function Cn(e){return Ip(e)?e.LABEL:e.name}i(Cn,"tokenLabel");function Ip(e){return it(e.LABEL)&&e.LABEL!==""}i(Ip,"hasTokenLabel");var uL="parent",Rm="categories",$m="label",Am="group",Em="push_mode",_m="pop_mode",Cm="longer_alt",Sm="line_breaks",bm="start_chars_hint";function ka(e){return pA(e)}i(ka,"createToken");function pA(e){const t=e.pattern,r={};if(r.name=e.name,Er(t)||(r.PATTERN=t),U(e,uL))throw`The parent property is no longer supported.
  79. See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return U(e,Rm)&&(r.CATEGORIES=e[Rm]),Za([r]),U(e,$m)&&(r.LABEL=e[$m]),U(e,Am)&&(r.GROUP=e[Am]),U(e,_m)&&(r.POP_MODE=e[_m]),U(e,Em)&&(r.PUSH_MODE=e[Em]),U(e,Cm)&&(r.LONGER_ALT=e[Cm]),U(e,Sm)&&(r.LINE_BREAKS=e[Sm]),U(e,bm)&&(r.START_CHARS_HINT=e[bm]),r}i(pA,"createTokenInternal");var Ur=ka({name:"EOF",pattern:Xe.NA});Za([Ur]);function js(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(js,"createTokenInstance");function Np(e,t){return Ja(e,t)}i(Np,"tokenMatcher");var wa={buildMismatchTokenMessage({expected:e,actual:t,previous:r,ruleName:n}){return`Expecting ${Ip(e)?`--> ${Cn(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=`
  80. but found: '`+jt(t).image+"'";if(n)return s+n+l;{const c=ht(e,(h,y)=>h.concat(y),[]),u=F(c,h=>`[${F(h,y=>Cn(y)).join(", ")}]`),f=`one of these possible Token sequences:
  81. ${F(u,(h,y)=>` ${y+1}. ${h}`).join(`
  82. `)}`;return s+f+l}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){const a="Expecting: ",o=`
  83. but found: '`+jt(t).image+"'";if(r)return a+r+o;{const c=`expecting at least one iteration which starts with one of these possible Token sequences::
  84. <${F(e,u=>`[${F(u,d=>Cn(d)).join(",")}]`).join(" ,")}>`;return a+c+o}}};Object.freeze(wa);var dL={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
  85. inside top level rule: ->`+e.name+"<-"}},An={buildDuplicateFoundError(e,t){function r(d){return d instanceof Te?d.terminalType.name:d instanceof Ze?d.nonTerminalName:""}i(r,"getExtraProductionArgument");const n=e.name,a=jt(t),s=a.idx,o=Ot(a),l=r(a),c=s>0;let u=`->${o}${c?s:""}<- ${l?`with argument: ->${l}<-`:""}
  86. appears more than once (${t.length} times) in the top level rule: ->${n}<-.
  87. For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
  88. `;return u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,`
  89. `),u},buildNamespaceConflictError(e){return`Namespace conflict found in grammar.
  90. The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.
  91. To resolve this make sure each Terminal and Non-Terminal names are unique
  92. This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
  93. and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){const t=F(e.prefixPath,a=>Cn(a)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix
  94. in <OR${r}> inside <${e.topLevelRule.name}> Rule,
  95. <${t}> may appears as a prefix path in all these alternatives.
  96. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
  97. For Further details.`},buildAlternationAmbiguityError(e){const t=F(e.prefixPath,a=>Cn(a)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx;let n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${e.topLevelRule.name}> Rule,
  98. <${t}> may appears as a prefix path in all these alternatives.
  99. `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
  100. For Further details.`,n},buildEmptyRepetitionError(e){let t=Ot(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.
  101. 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.
  102. Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives:
  103. <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
  104. 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.
  105. rule: <${t}> can be invoked from itself (directly or indirectly)
  106. without consuming any Tokens. The grammar path that causes this is:
  107. ${n}
  108. To fix this refactor your grammar to remove the left recursion.
  109. see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof Ha?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function hA(e,t){const r=new fL(e,t);return r.resolveRefs(),r.errors}i(hA,"resolveGrammar");var fL=class extends Ya{static{i(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){q(xe(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:Qe.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},pL=class extends ec{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=Ke(this.path.ruleStack).reverse(),this.occurrenceStack=Ke(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(){he(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},hL=class extends pL{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 st({definition:n});this.possibleTokTypes=Xa(a),this.found=!0}}},rc=class extends ec{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}},mL=class extends rc{static{i(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){if(e.idx===this.occurrence){const n=jt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof Te&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkMany(e,t,r)}},wm=class extends rc{static{i(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){if(e.idx===this.occurrence){const n=jt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof Te&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkManySep(e,t,r)}},gL=class extends rc{static{i(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){const n=jt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof Te&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOne(e,t,r)}},Im=class extends rc{static{i(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){const n=jt(t.concat(r));this.result.isEndOfRule=n===void 0,n instanceof Te&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOneSep(e,t,r)}};function sl(e,t,r=[]){r=Ke(r);let n=[],a=0;function s(l){return l.concat(ze(e,a+1))}i(s,"remainingPathWith");function o(l){const c=sl(s(l),t,r);return n.concat(c)}for(i(o,"getAlternativesForProd");r.length<t&&a<e.length;){const l=e[a];if(l instanceof st)return o(l.definition);if(l instanceof Ze)return o(l.definition);if(l instanceof Be)n=o(l.definition);else if(l instanceof mt){const c=l.definition.concat([new we({definition:l.definition})]);return o(c)}else if(l instanceof gt){const c=[new st({definition:l.definition}),new we({definition:[new Te({terminalType:l.separator})].concat(l.definition)})];return o(c)}else if(l instanceof ot){const c=l.definition.concat([new we({definition:[new Te({terminalType:l.separator})].concat(l.definition)})]);n=o(c)}else if(l instanceof we){const c=l.definition.concat([new we({definition:l.definition})]);n=o(c)}else{if(l instanceof lt)return q(l.definition,c=>{he(c.definition)===!1&&(n=o(c.definition))}),n;if(l instanceof Te)r.push(l.terminalType);else throw Error("non exhaustive match")}a++}return n.push({partialPath:r,suffixDef:ze(e,a)}),n}i(sl,"possiblePathsFrom");function kp(e,t,r,n){const a="EXIT_NONE_TERMINAL",s=[a],o="EXIT_ALTERNATIVE";let l=!1;const c=t.length,u=c-n-1,d=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!he(f);){const h=f.pop();if(h===o){l&&wn(f).idx<=u&&f.pop();continue}const y=h.def,v=h.idx,C=h.ruleStack,b=h.occurrenceStack;if(he(y))continue;const w=y[0];if(w===a){const I={idx:v,def:ze(y),ruleStack:ps(C),occurrenceStack:ps(b)};f.push(I)}else if(w instanceof Te)if(v<c-1){const I=v+1,A=t[I];if(r(A,w.terminalType)){const k={idx:I,def:ze(y),ruleStack:C,occurrenceStack:b};f.push(k)}}else if(v===c-1)d.push({nextTokenType:w.terminalType,nextTokenOccurrence:w.idx,ruleStack:C,occurrenceStack:b}),l=!0;else throw Error("non exhaustive match");else if(w instanceof Ze){const I=Ke(C);I.push(w.nonTerminalName);const A=Ke(b);A.push(w.idx);const k={idx:v,def:w.definition.concat(s,ze(y)),ruleStack:I,occurrenceStack:A};f.push(k)}else if(w instanceof Be){const I={idx:v,def:ze(y),ruleStack:C,occurrenceStack:b};f.push(I),f.push(o);const A={idx:v,def:w.definition.concat(ze(y)),ruleStack:C,occurrenceStack:b};f.push(A)}else if(w instanceof mt){const I=new we({definition:w.definition,idx:w.idx}),A=w.definition.concat([I],ze(y)),k={idx:v,def:A,ruleStack:C,occurrenceStack:b};f.push(k)}else if(w instanceof gt){const I=new Te({terminalType:w.separator}),A=new we({definition:[I].concat(w.definition),idx:w.idx}),k=w.definition.concat([A],ze(y)),G={idx:v,def:k,ruleStack:C,occurrenceStack:b};f.push(G)}else if(w instanceof ot){const I={idx:v,def:ze(y),ruleStack:C,occurrenceStack:b};f.push(I),f.push(o);const A=new Te({terminalType:w.separator}),k=new we({definition:[A].concat(w.definition),idx:w.idx}),G=w.definition.concat([k],ze(y)),H={idx:v,def:G,ruleStack:C,occurrenceStack:b};f.push(H)}else if(w instanceof we){const I={idx:v,def:ze(y),ruleStack:C,occurrenceStack:b};f.push(I),f.push(o);const A=new we({definition:w.definition,idx:w.idx}),k=w.definition.concat([A],ze(y)),G={idx:v,def:k,ruleStack:C,occurrenceStack:b};f.push(G)}else if(w instanceof lt)for(let I=w.definition.length-1;I>=0;I--){const A=w.definition[I],k={idx:v,def:A.definition.concat(ze(y)),ruleStack:C,occurrenceStack:b};f.push(k),f.push(o)}else if(w instanceof st)f.push({idx:v,def:w.definition.concat(ze(y)),ruleStack:C,occurrenceStack:b});else if(w instanceof Ha)f.push(mA(w,v,C,b));else throw Error("non exhaustive match")}return d}i(kp,"nextPossibleTokensAfter");function mA(e,t,r,n){const a=Ke(r);a.push(e.name);const s=Ke(n);return s.push(1),{idx:t,def:e.definition,ruleStack:a,occurrenceStack:s}}i(mA,"expandTopLevelRule");var _e;(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"})(_e||(_e={}));function nc(e){if(e instanceof Be||e==="Option")return _e.OPTION;if(e instanceof we||e==="Repetition")return _e.REPETITION;if(e instanceof mt||e==="RepetitionMandatory")return _e.REPETITION_MANDATORY;if(e instanceof gt||e==="RepetitionMandatoryWithSeparator")return _e.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof ot||e==="RepetitionWithSeparator")return _e.REPETITION_WITH_SEPARATOR;if(e instanceof lt||e==="Alternation")return _e.ALTERNATION;throw Error("non exhaustive match")}i(nc,"getProdType");function pd(e){const{occurrence:t,rule:r,prodType:n,maxLookahead:a}=e,s=nc(n);return s===_e.ALTERNATION?Us(t,r,a):zs(t,r,s,a)}i(pd,"getLookaheadPaths");function gA(e,t,r,n,a,s){const o=Us(e,t,r),l=Op(o)?ms:Ja;return s(o,n,l,a)}i(gA,"buildLookaheadFuncForOr");function yA(e,t,r,n,a,s){const o=zs(e,t,a,r),l=Op(o)?ms:Ja;return s(o[0],l,n)}i(yA,"buildLookaheadFuncForOptionalProd");function vA(e,t,r,n){const a=e.length,s=Ft(e,o=>Ft(o,l=>l.length===1));if(t)return function(o){const l=F(o,c=>c.GATE);for(let c=0;c<a;c++){const u=e[c],d=u.length,f=l[c];if(!(f!==void 0&&f.call(this)===!1))e:for(let h=0;h<d;h++){const y=u[h],v=y.length;for(let C=0;C<v;C++){const b=this.LA(C+1);if(r(b,y[C])===!1)continue e}return c}}};if(s&&!n){const o=F(e,c=>xt(c)),l=ht(o,(c,u,d)=>(q(u,f=>{U(c,f.tokenTypeIdx)||(c[f.tokenTypeIdx]=d),q(f.categoryMatches,h=>{U(c,h)||(c[h]=d)})}),c),{});return function(){const c=this.LA(1);return l[c.tokenTypeIdx]}}else return function(){for(let o=0;o<a;o++){const l=e[o],c=l.length;e:for(let u=0;u<c;u++){const d=l[u],f=d.length;for(let h=0;h<f;h++){const y=this.LA(h+1);if(r(y,d[h])===!1)continue e}return o}}}}i(vA,"buildAlternativesLookAheadFunc");function TA(e,t,r){const n=Ft(e,s=>s.length===1),a=e.length;if(n&&!r){const s=xt(e);if(s.length===1&&he(s[0].categoryMatches)){const l=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===l}}else{const o=ht(s,(l,c,u)=>(l[c.tokenTypeIdx]=!0,q(c.categoryMatches,d=>{l[d]=!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 c=0;c<l;c++){const u=this.LA(c+1);if(t(u,o[c])===!1)continue e}return!0}return!1}}i(TA,"buildSingleAlternativeLookaheadFunction");var yL=class extends ec{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,_e.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,_e.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,_e.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,_e.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,_e.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},RA=class extends Ya{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,_e.OPTION)}visitRepetition(e){this.checkIsTarget(e,_e.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,_e.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,_e.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,_e.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,_e.ALTERNATION)}};function hd(e){const t=new Array(e);for(let r=0;r<e;r++)t[r]=[];return t}i(hd,"initializeArrayOfArrays");function _o(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 c="_"+n.categoryMatches[l];a.push(o+c)}}t=a}return t}i(_o,"pathToHashKeys");function $A(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($A,"isUniquePrefixHash");function Pp(e,t){const r=F(e,o=>sl([o],1)),n=hd(r.length),a=F(r,o=>{const l={};return q(o,c=>{const u=_o(c.partialPath);q(u,d=>{l[d]=!0})}),l});let s=r;for(let o=1;o<=t;o++){const l=s;s=hd(l.length);for(let c=0;c<l.length;c++){const u=l[c];for(let d=0;d<u.length;d++){const f=u[d].partialPath,h=u[d].suffixDef,y=_o(f);if($A(a,y,c)||he(h)||f.length===t){const C=n[c];if(ol(C,f)===!1){C.push(f);for(let b=0;b<y.length;b++){const w=y[b];a[c][w]=!0}}}else{const C=sl(h,o+1,f);s[c]=s[c].concat(C),q(C,b=>{const w=_o(b.partialPath);q(w,I=>{a[c][I]=!0})})}}}}return n}i(Pp,"lookAheadSequenceFromAlternatives");function Us(e,t,r,n){const a=new RA(e,_e.ALTERNATION,n);return t.accept(a),Pp(a.result,r)}i(Us,"getLookaheadPathsForOr");function zs(e,t,r,n){const a=new RA(e,r);t.accept(a);const s=a.result,l=new yL(t,e,r).startWalking(),c=new st({definition:s}),u=new st({definition:l});return Pp([c,u],n)}i(zs,"getLookaheadPathsForOptionalProd");function ol(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(ol,"containsPath");function AA(e,t){return e.length<t.length&&Ft(e,(r,n)=>{const a=t[n];return r===a||a.categoryMatchesMap[r.tokenTypeIdx]})}i(AA,"isStrictPrefixOfPath");function Op(e){return Ft(e,t=>Ft(t,r=>Ft(r,n=>he(n.categoryMatches))))}i(Op,"areTokenCategoriesNotUsed");function EA(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return F(t,r=>Object.assign({type:Qe.CUSTOM_LOOKAHEAD_VALIDATION},r))}i(EA,"validateLookahead");function _A(e,t,r,n){const a=_t(e,c=>CA(c,r)),s=DA(e,t,r),o=_t(e,c=>kA(c,r)),l=_t(e,c=>bA(c,e,n,r));return a.concat(s,o,l)}i(_A,"validateGrammar");function CA(e,t){const r=new vL;e.accept(r);const n=r.allProductions,a=PO(n,SA),s=Ut(a,l=>l.length>1);return F(xe(s),l=>{const c=jt(l),u=t.buildDuplicateFoundError(e,l),d=Ot(c),f={message:u,type:Qe.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:d,occurrence:c.idx},h=Lp(c);return h&&(f.parameter=h),f})}i(CA,"validateDuplicateProductions");function SA(e){return`${Ot(e)}_#_${e.idx}_#_${Lp(e)}`}i(SA,"identifyProductionForDuplicates");function Lp(e){return e instanceof Te?e.terminalType.name:e instanceof Ze?e.nonTerminalName:""}i(Lp,"getExtraProductionArgument");var vL=class extends Ya{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 bA(e,t,r,n){const a=[];if(ht(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:Qe.DUPLICATE_RULE_NAME,ruleName:e.name})}return a}i(bA,"validateRuleDoesNotAlreadyExist");function wA(e,t,r){const n=[];let a;return tt(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:Qe.INVALID_RULE_OVERRIDE,ruleName:e})),n}i(wA,"validateRuleIsOverridden");function Dp(e,t,r,n=[]){const a=[],s=ns(t.definition);if(he(s))return[];{const o=e.name;tt(s,e)&&a.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:Qe.LEFT_RECURSION,ruleName:o});const c=Zl(s,n.concat([e])),u=_t(c,d=>{const f=Ke(n);return f.push(d),Dp(e,d,r,f)});return a.concat(u)}}i(Dp,"validateNoLeftRecursion");function ns(e){let t=[];if(he(e))return t;const r=jt(e);if(r instanceof Ze)t.push(r.referencedRule);else if(r instanceof st||r instanceof Be||r instanceof mt||r instanceof gt||r instanceof ot||r instanceof we)t=t.concat(ns(r.definition));else if(r instanceof lt)t=xt(F(r.definition,s=>ns(s.definition)));else if(!(r instanceof Te))throw Error("non exhaustive match");const n=hs(r),a=e.length>1;if(n&&a){const s=ze(e);return t.concat(ns(s))}else return t}i(ns,"getFirstNoneTerminal");var Mp=class extends Ya{static{i(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function IA(e,t){const r=new Mp;e.accept(r);const n=r.alternations;return _t(n,s=>{const o=ps(s.definition);return _t(o,(l,c)=>{const u=kp([l],[],Ja,1);return he(u)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:s,emptyChoiceIdx:c}),type:Qe.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:s.idx,alternative:c+1}]:[]})})}i(IA,"validateEmptyOrAlternative");function NA(e,t,r){const n=new Mp;e.accept(n);let a=n.alternations;return a=Ql(a,o=>o.ignoreAmbiguities===!0),_t(a,o=>{const l=o.idx,c=o.maxLookahead||t,u=Us(l,e,c,o),d=OA(u,o,e,r),f=LA(u,o,e,r);return d.concat(f)})}i(NA,"validateAmbiguousAlternationAlternatives");var TL=class extends Ya{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 kA(e,t){const r=new Mp;e.accept(r);const n=r.alternations;return _t(n,s=>s.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:s}),type:Qe.TOO_MANY_ALTS,ruleName:e.name,occurrence:s.idx}]:[])}i(kA,"validateTooManyAlts");function PA(e,t,r){const n=[];return q(e,a=>{const s=new TL;a.accept(s);const o=s.allProductions;q(o,l=>{const c=nc(l),u=l.maxLookahead||t,d=l.idx,h=zs(d,a,c,u)[0];if(he(xt(h))){const y=r.buildEmptyRepetitionError({topLevelRule:a,repetition:l});n.push({message:y,type:Qe.NO_NON_EMPTY_LOOKAHEAD,ruleName:a.name})}})}),n}i(PA,"validateSomeNonEmptyLookaheadPath");function OA(e,t,r,n){const a=[],s=ht(e,(l,c,u)=>(t.definition[u].ignoreAmbiguities===!0||q(c,d=>{const f=[u];q(e,(h,y)=>{u!==y&&ol(h,d)&&t.definition[y].ignoreAmbiguities!==!0&&f.push(y)}),f.length>1&&!ol(a,d)&&(a.push(d),l.push({alts:f,path:d}))}),l),[]);return F(s,l=>{const c=F(l.alts,d=>d+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:c,prefixPath:l.path}),type:Qe.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:l.alts}})}i(OA,"checkAlternativesAmbiguities");function LA(e,t,r,n){const a=ht(e,(o,l,c)=>{const u=F(l,d=>({idx:c,path:d}));return o.concat(u)},[]);return Fs(_t(a,o=>{if(t.definition[o.idx].ignoreAmbiguities===!0)return[];const c=o.idx,u=o.path,d=wt(a,h=>t.definition[h.idx].ignoreAmbiguities!==!0&&h.idx<c&&AA(h.path,u));return F(d,h=>{const y=[h.idx+1,c+1],v=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:y,prefixPath:h.path}),type:Qe.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:v,alternatives:y}})}))}i(LA,"checkPrefixAlternativesAmbiguities");function DA(e,t,r){const n=[],a=F(t,s=>s.name);return q(e,s=>{const o=s.name;if(tt(a,o)){const l=r.buildNamespaceConflictError(s);n.push({message:l,type:Qe.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),n}i(DA,"checkTerminalAndNoneTerminalsNameSpace");function MA(e){const t=Tp(e,{errMsgProvider:dL}),r={};return q(e.rules,n=>{r[n.name]=n}),hA(r,t.errMsgProvider)}i(MA,"resolveGrammar");function xA(e){return e=Tp(e,{errMsgProvider:An}),_A(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}i(xA,"validateGrammar");var FA="MismatchedTokenException",GA="NoViableAltException",jA="EarlyExitException",UA="NotAllInputParsedException",zA=[FA,GA,jA,UA];Object.freeze(zA);function gs(e){return tt(zA,e.name)}i(gs,"isRecognitionException");var ac=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)}},BA=class extends ac{static{i(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=FA}},RL=class extends ac{static{i(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=GA}},$L=class extends ac{static{i(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name=UA}},AL=class extends ac{static{i(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=jA}},Dc={},KA="InRuleRecoveryException",EL=class extends Error{static{i(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=KA}},_L=class{static{i(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=U(e,"recoveryEnabled")?e.recoveryEnabled:Cr.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=qA)}getTokenToInsert(e){const t=js(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 c=this.LA(1);let u=this.LA(1);const d=i(()=>{const f=this.LA(0),h=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:c,previous:f,ruleName:this.getCurrRuleFullName()}),y=new BA(h,c,this.LA(0));y.resyncedTokens=ps(o),this.SAVE_ERROR(y)},"generateErrorMessage");for(;!l;)if(this.tokenMatcher(u,n)){d();return}else if(r.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(u,a)?l=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,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 EL("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||he(t))return!1;const r=this.LA(1);return za(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 tt(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),r=2;for(;;){const n=za(e,a=>Np(t,a));if(n!==void 0)return n;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Dc;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?Dc:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[n],inRule:this.shortRuleNameToFullName(e[n-1])})}flattenFollowSet(){const e=F(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return xt(e)}getFollowSetFromFollowKey(e){if(e===Dc)return[Ur];const t=e.ruleName+e.idxInCallingRule+I$+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 ps(t)}attemptInRepetitionRecovery(e,t,r,n,a,s,o){}getCurrentGrammarPath(e,t){const r=this.getHumanReadableRuleStack(),n=Ke(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:n,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return F(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};function qA(e,t,r,n,a,s,o){const l=this.getKeyForAutomaticLookahead(n,a);let c=this.firstAfterRepMap[l];if(c===void 0){const h=this.getCurrRuleFullName(),y=this.getGAstProductions()[h];c=new s(y,a).startWalking(),this.firstAfterRepMap[l]=c}let u=c.token,d=c.occurrence;const f=c.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=Ur,d=1),!(u===void 0||d===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,d,o)&&this.tryInRepetitionRecovery(e,t,r,u)}i(qA,"attemptInRepetitionRecovery");var CL=4,Vr=8,WA=1<<Vr,VA=2<<Vr,md=3<<Vr,gd=4<<Vr,yd=5<<Vr,Co=6<<Vr;function So(e,t,r){return r|t|e}i(So,"getKeyForAutomaticLookahead");var xp=class{static{i(this,"LLkLookaheadStrategy")}constructor(e){var t;this.maxLookahead=(t=e?.maxLookahead)!==null&&t!==void 0?t:Cr.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if(he(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 _t(e,t=>Dp(t,t,An))}validateEmptyOrAlternatives(e){return _t(e,t=>IA(t,An))}validateAmbiguousAlternationAlternatives(e,t){return _t(e,r=>NA(r,t,An))}validateSomeNonEmptyLookaheadPath(e,t){return PA(e,t,An)}buildLookaheadForAlternation(e){return gA(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,vA)}buildLookaheadForOptional(e){return yA(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,nc(e.prodType),TA)}},SL=class{static{i(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=U(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Cr.dynamicTokensEnabled,this.maxLookahead=U(e,"maxLookahead")?e.maxLookahead:Cr.maxLookahead,this.lookaheadStrategy=U(e,"lookaheadStrategy")?e.lookaheadStrategy:new xp({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){q(e,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{const{alternation:r,repetition:n,option:a,repetitionMandatory:s,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=HA(t);q(r,c=>{const u=c.idx===0?"":c.idx;this.TRACE_INIT(`${Ot(c)}${u}`,()=>{const d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:c.idx,rule:t,maxLookahead:c.maxLookahead||this.maxLookahead,hasPredicates:c.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),f=So(this.fullRuleNameToShort[t.name],WA,c.idx);this.setLaFuncCache(f,d)})}),q(n,c=>{this.computeLookaheadFunc(t,c.idx,md,"Repetition",c.maxLookahead,Ot(c))}),q(a,c=>{this.computeLookaheadFunc(t,c.idx,VA,"Option",c.maxLookahead,Ot(c))}),q(s,c=>{this.computeLookaheadFunc(t,c.idx,gd,"RepetitionMandatory",c.maxLookahead,Ot(c))}),q(o,c=>{this.computeLookaheadFunc(t,c.idx,Co,"RepetitionMandatoryWithSeparator",c.maxLookahead,Ot(c))}),q(l,c=>{this.computeLookaheadFunc(t,c.idx,yd,"RepetitionWithSeparator",c.maxLookahead,Ot(c))})})})}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=So(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(l,o)})}getKeyForAutomaticLookahead(e,t){const r=this.getLastExplicitRuleShortName();return So(r,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},bL=class extends Ya{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)}},Ys=new bL;function HA(e){Ys.reset(),e.accept(Ys);const t=Ys.dslMethods;return Ys.reset(),t}i(HA,"collectMethods");function vd(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}i(vd,"setNodeLocationOnlyOffset");function Td(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(Td,"setNodeLocationFull");function YA(e,t,r){e.children[r]===void 0?e.children[r]=[t]:e.children[r].push(t)}i(YA,"addTerminalToCst");function XA(e,t,r){e.children[t]===void 0?e.children[t]=[r]:e.children[t].push(r)}i(XA,"addNoneTerminalToCst");var wL="name";function Fp(e,t){Object.defineProperty(e,wL,{enumerable:!1,configurable:!0,writable:!1,value:t})}i(Fp,"defineNameProp");function JA(e,t){const r=ft(e),n=r.length;for(let a=0;a<n;a++){const s=r[a],o=e[s],l=o.length;for(let c=0;c<l;c++){const u=o[c];u.tokenTypeIdx===void 0&&this[u.name](u.children,t)}}}i(JA,"defaultVisit");function ZA(e,t){const r=i(function(){},"derivedConstructor");Fp(r,e+"BaseSemantics");const n={visit:i(function(a,s){if(ne(a)&&(a=a[0]),!Er(a))return this[a.name](a.children,s)},"visit"),validateVisitor:i(function(){const a=eE(this,t);if(!he(a)){const s=F(a,o=>o.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
  110. ${s.join(`
  111. `).replace(/\n/g,`
  112. `)}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}i(ZA,"createBaseSemanticVisitorConstructor");function QA(e,t,r){const n=i(function(){},"derivedConstructor");Fp(n,e+"BaseSemanticsWithDefaults");const a=Object.create(r.prototype);return q(t,s=>{a[s]=JA}),n.prototype=a,n.prototype.constructor=n,n}i(QA,"createBaseVisitorConstructorWithDefaults");var Rd;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(Rd||(Rd={}));function eE(e,t){return tE(e,t)}i(eE,"validateVisitor");function tE(e,t){const r=wt(t,a=>Ir(e[a])===!1),n=F(r,a=>({msg:`Missing visitor method: <${a}> on ${e.constructor.name} CST Visitor.`,type:Rd.MISSING_METHOD,methodName:a}));return Fs(n)}i(tE,"validateMissingCstMethods");var IL=class{static{i(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=U(e,"nodeLocationTracking")?e.nodeLocationTracking:Cr.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Me,this.cstFinallyStateUpdate=Me,this.cstPostTerminal=Me,this.cstPostNonTerminal=Me,this.cstPostRule=Me;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Td,this.setNodeLocationFromNode=Td,this.cstPostRule=Me,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Me,this.setNodeLocationFromNode=Me,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=vd,this.setNodeLocationFromNode=vd,this.cstPostRule=Me,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Me,this.setNodeLocationFromNode=Me,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Me,this.setNodeLocationFromNode=Me,this.cstPostRule=Me,this.setInitialNodeLocation=Me;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];YA(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];XA(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(Er(this.baseCstVisitorConstructor)){const e=ZA(this.className,ft(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Er(this.baseCstVisitorWithDefaultsConstructor)){const e=QA(this.className,ft(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]}},NL=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)):ll}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?ll: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()}},kL=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=cl){if(tt(this.definedRulesNames,e)){const s={message:An.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Qe.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=cl){const n=wA(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(gs(n))return!1;throw n}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return E$(xe(this.gastProductionsCache))}},PL=class{static{i(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=ms,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},U(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
  113. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
  114. For Further details.`);if(ne(e)){if(he(e))throw Error(`A Token Vocabulary cannot be empty.
  115. Note that the first argument for the parser constructor
  116. 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.
  117. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
  118. For Further details.`)}if(ne(e))this.tokensMap=ht(e,(a,s)=>(a[s.name]=s,a),{});else if(U(e,"modes")&&Ft(xt(xe(e.modes)),fA)){const a=xt(xe(e.modes)),s=Rp(a);this.tokensMap=ht(s,(o,l)=>(o[l.name]=l,o),{})}else if(St(e))this.tokensMap=Ke(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=U(e,"modes")?xt(xe(e.modes)):xe(e),n=Ft(r,a=>he(a.categoryMatches));this.tokenMatcher=n?ms:Ja,Za(xe(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'
  119. Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const n=U(r,"resyncEnabled")?r.resyncEnabled:cl.resyncEnabled,a=U(r,"recoveryValueFunc")?r.recoveryValueFunc:cl.recoveryValueFunc,s=this.ruleShortNameIdx<<CL+Vr;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let o;return this.outputCst===!0?o=i(function(...u){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,u);const d=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(d),d}catch(d){return this.invokeRuleCatch(d,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):o=i(function(...u){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,u)}catch(d){return this.invokeRuleCatch(d,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(gs(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(VA,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(gd,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,_e.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],n,gd,e,gL)}atLeastOneSepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(Co,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,Im],o,Co,e,Im)}else throw this.raiseEarlyExitException(e,_e.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){const r=this.getKeyForAutomaticLookahead(md,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,md,e,mL,s)}manySepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(yd,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,wm],o,yd,e,wm)}}repetitionSepSecondInternal(e,t,r,n,a){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,a],r,Co,e,a)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const r=this.getKeyForAutomaticLookahead(WA,t),n=ne(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 $L(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 gs(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 BA(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===KA?r:a}}else throw r}saveRecogState(){const e=this.errors,t=Ke(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=[]}},OL=class{static{i(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=U(e,"errorMessageProvider")?e.errorMessageProvider:Cr.errorMessageProvider}SAVE_ERROR(e){if(gs(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Ke(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Ke(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){const n=this.getCurrRuleFullName(),a=this.getGAstProductions()[n],o=zs(e,a,t,this.maxLookahead)[0],l=[];for(let u=1;u<=this.maxLookahead;u++)l.push(this.LA(u));const c=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:l,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new AL(c,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const r=this.getCurrRuleFullName(),n=this.getGAstProductions()[r],a=Us(e,n,this.maxLookahead),s=[];for(let c=1;c<=this.maxLookahead;c++)s.push(this.LA(c));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 RL(l,this.LA(1),o))}},LL=class{static{i(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){const r=this.gastProductionsCache[e];if(Er(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return kp([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=jt(e.ruleStack),n=this.getGAstProductions()[t];return new hL(n,e).startWalking()}},ic={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(ic);var Nm=!0,km=Math.pow(2,Vr)-1,rE=ka({name:"RECORDING_PHASE_TOKEN",pattern:Xe.NA});Za([rE]);var nE=js(rE,`This IToken indicates the Parser is in Recording Phase
  120. See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(nE);var DL={name:`This CSTNode indicates the Parser is in Recording Phase
  121. See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},ML=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 ll}topLevelRuleRecord(e,t){try{const r=new Ha({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+`
  122. This error was thrown during the "grammar recording phase" For more info see:
  123. https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw r}throw r}}optionInternalRecord(e,t){return ma.call(this,Be,e,t)}atLeastOneInternalRecord(e,t){ma.call(this,mt,t,e)}atLeastOneSepFirstInternalRecord(e,t){ma.call(this,gt,t,e,Nm)}manyInternalRecord(e,t){ma.call(this,we,t,e)}manySepFirstInternalRecord(e,t){ma.call(this,ot,t,e,Nm)}orInternalRecord(e,t){return aE.call(this,e,t)}subruleInternalRecord(e,t,r){if(ys(t),!e||U(e,"ruleName")===!1){const o=new Error(`<SUBRULE${$d(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
  124. inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const n=wn(this.recordingProdStack),a=e.ruleName,s=new Ze({idx:t,nonTerminalName:a,label:r?.LABEL,referencedRule:void 0});return n.definition.push(s),this.outputCst?DL:ic}consumeInternalRecord(e,t,r){if(ys(t),!wp(e)){const s=new Error(`<CONSUME${$d(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
  125. inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}const n=wn(this.recordingProdStack),a=new Te({idx:t,terminalType:e,label:r?.LABEL});return n.definition.push(a),nE}};function ma(e,t,r,n=!1){ys(r);const a=wn(this.recordingProdStack),s=Ir(t)?t:t.DEF,o=new e({definition:[],idx:r});return n&&(o.separator=t.SEP),U(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),a.definition.push(o),this.recordingProdStack.pop(),ic}i(ma,"recordProd");function aE(e,t){ys(t);const r=wn(this.recordingProdStack),n=ne(e)===!1,a=n===!1?e:e.DEF,s=new lt({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});U(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD);const o=v$(a,l=>Ir(l.GATE));return s.hasPredicates=o,r.definition.push(s),q(a,l=>{const c=new st({definition:[]});s.definition.push(c),U(l,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:U(l,"GATE")&&(c.ignoreAmbiguities=!0),this.recordingProdStack.push(c),l.ALT.call(this),this.recordingProdStack.pop()}),ic}i(aE,"recordOrProd");function $d(e){return e===0?"":`${e}`}i($d,"getIdxSuffix");function ys(e){if(e<0||e>km){const t=new Error(`Invalid DSL Method idx value: <${e}>
  126. Idx value must be a none negative value smaller than ${km+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}i(ys,"assertMethodIdxIsValid");var xL=class{static{i(this,"PerformanceTracer")}initPerformanceTracer(e){if(U(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=Cr.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}=Ap(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 iE(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(iE,"applyMixins");var ll=js(Ur,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(ll);var Cr=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:wa,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),cl=Object.freeze({recoveryValueFunc:i(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),Qe;(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"})(Qe||(Qe={}));function Ad(e=void 0){return function(){return e}}i(Ad,"EMPTY_ALT");var Gp=class sE{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",()=>{Ep(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),q(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=MA({rules:xe(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(he(n)&&this.skipValidations===!1){const a=xA({rules:xe(this.gastProductionsCache),tokenTypes:xe(this.tokensMap),errMsgProvider:An,grammarName:r}),s=EA({lookaheadStrategy:this.lookaheadStrategy,rules:xe(this.gastProductionsCache),tokenTypes:xe(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(a,s)}}),he(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const a=N$(xe(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:xe(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(xe(this.gastProductionsCache))})),!sE.DEFER_DEFINITION_ERRORS_HANDLING&&!he(this.definitionErrors))throw t=F(this.definitionErrors,a=>a.message),new Error(`Parser Definition Errors detected:
  127. ${t.join(`
  128. -------------------------------
  129. `)}`)})}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),U(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
  130. Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
  131. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
  132. For further details.`);this.skipValidations=U(r,"skipValidations")?r.skipValidations:Cr.skipValidations}};Gp.DEFER_DEFINITION_ERRORS_HANDLING=!1;iE(Gp,[_L,SL,IL,NL,PL,kL,OL,LL,ML,xL]);var FL=class extends Gp{static{i(this,"EmbeddedActionsParser")}constructor(e,t=Cr){const r=Ke(t);r.outputCst=!1,super(e,r)}};function oE(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(oE,"arrayMap");var lE=oE;function cE(){this.__data__=[],this.size=0}i(cE,"listCacheClear");var GL=cE;function uE(e,t){return e===t||e!==e&&t!==t}i(uE,"eq");var dE=uE;function fE(e,t){for(var r=e.length;r--;)if(dE(e[r][0],t))return r;return-1}i(fE,"assocIndexOf");var sc=fE,jL=Array.prototype,UL=jL.splice;function pE(e){var t=this.__data__,r=sc(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():UL.call(t,r,1),--this.size,!0}i(pE,"listCacheDelete");var zL=pE;function hE(e){var t=this.__data__,r=sc(t,e);return r<0?void 0:t[r][1]}i(hE,"listCacheGet");var BL=hE;function mE(e){return sc(this.__data__,e)>-1}i(mE,"listCacheHas");var KL=mE;function gE(e,t){var r=this.__data__,n=sc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}i(gE,"listCacheSet");var qL=gE;function qn(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(qn,"ListCache");qn.prototype.clear=GL;qn.prototype.delete=zL;qn.prototype.get=BL;qn.prototype.has=KL;qn.prototype.set=qL;var oc=qn;function yE(){this.__data__=new oc,this.size=0}i(yE,"stackClear");var WL=yE;function vE(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}i(vE,"stackDelete");var VL=vE;function TE(e){return this.__data__.get(e)}i(TE,"stackGet");var HL=TE;function RE(e){return this.__data__.has(e)}i(RE,"stackHas");var YL=RE,XL=typeof global=="object"&&global&&global.Object===Object&&global,$E=XL,JL=typeof self=="object"&&self&&self.Object===Object&&self,ZL=$E||JL||Function("return this")(),Nr=ZL,QL=Nr.Symbol,tr=QL,AE=Object.prototype,eD=AE.hasOwnProperty,tD=AE.toString,Ci=tr?tr.toStringTag:void 0;function EE(e){var t=eD.call(e,Ci),r=e[Ci];try{e[Ci]=void 0;var n=!0}catch{}var a=tD.call(e);return n&&(t?e[Ci]=r:delete e[Ci]),a}i(EE,"getRawTag");var rD=EE,nD=Object.prototype,aD=nD.toString;function _E(e){return aD.call(e)}i(_E,"objectToString");var iD=_E,sD="[object Null]",oD="[object Undefined]",Pm=tr?tr.toStringTag:void 0;function CE(e){return e==null?e===void 0?oD:sD:Pm&&Pm in Object(e)?rD(e):iD(e)}i(CE,"baseGetTag");var Qa=CE;function SE(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}i(SE,"isObject");var jp=SE,lD="[object AsyncFunction]",cD="[object Function]",uD="[object GeneratorFunction]",dD="[object Proxy]";function bE(e){if(!jp(e))return!1;var t=Qa(e);return t==cD||t==uD||t==lD||t==dD}i(bE,"isFunction");var wE=bE,fD=Nr["__core-js_shared__"],Mc=fD,Om=(function(){var e=/[^.]+$/.exec(Mc&&Mc.keys&&Mc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function IE(e){return!!Om&&Om in e}i(IE,"isMasked");var pD=IE,hD=Function.prototype,mD=hD.toString;function NE(e){if(e!=null){try{return mD.call(e)}catch{}try{return e+""}catch{}}return""}i(NE,"toSource");var Wn=NE,gD=/[\\^$.*+?()[\]{}|]/g,yD=/^\[object .+?Constructor\]$/,vD=Function.prototype,TD=Object.prototype,RD=vD.toString,$D=TD.hasOwnProperty,AD=RegExp("^"+RD.call($D).replace(gD,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kE(e){if(!jp(e)||pD(e))return!1;var t=wE(e)?AD:yD;return t.test(Wn(e))}i(kE,"baseIsNative");var ED=kE;function PE(e,t){return e?.[t]}i(PE,"getValue");var _D=PE;function OE(e,t){var r=_D(e,t);return ED(r)?r:void 0}i(OE,"getNative");var ei=OE,CD=ei(Nr,"Map"),vs=CD,SD=ei(Object,"create"),Ts=SD;function LE(){this.__data__=Ts?Ts(null):{},this.size=0}i(LE,"hashClear");var bD=LE;function DE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}i(DE,"hashDelete");var wD=DE,ID="__lodash_hash_undefined__",ND=Object.prototype,kD=ND.hasOwnProperty;function ME(e){var t=this.__data__;if(Ts){var r=t[e];return r===ID?void 0:r}return kD.call(t,e)?t[e]:void 0}i(ME,"hashGet");var PD=ME,OD=Object.prototype,LD=OD.hasOwnProperty;function xE(e){var t=this.__data__;return Ts?t[e]!==void 0:LD.call(t,e)}i(xE,"hashHas");var DD=xE,MD="__lodash_hash_undefined__";function FE(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ts&&t===void 0?MD:t,this}i(FE,"hashSet");var xD=FE;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,"Hash");Vn.prototype.clear=bD;Vn.prototype.delete=wD;Vn.prototype.get=PD;Vn.prototype.has=DD;Vn.prototype.set=xD;var Lm=Vn;function GE(){this.size=0,this.__data__={hash:new Lm,map:new(vs||oc),string:new Lm}}i(GE,"mapCacheClear");var FD=GE;function jE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}i(jE,"isKeyable");var GD=jE;function UE(e,t){var r=e.__data__;return GD(t)?r[typeof t=="string"?"string":"hash"]:r.map}i(UE,"getMapData");var lc=UE;function zE(e){var t=lc(this,e).delete(e);return this.size-=t?1:0,t}i(zE,"mapCacheDelete");var jD=zE;function BE(e){return lc(this,e).get(e)}i(BE,"mapCacheGet");var UD=BE;function KE(e){return lc(this,e).has(e)}i(KE,"mapCacheHas");var zD=KE;function qE(e,t){var r=lc(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}i(qE,"mapCacheSet");var BD=qE;function Hn(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(Hn,"MapCache");Hn.prototype.clear=FD;Hn.prototype.delete=jD;Hn.prototype.get=UD;Hn.prototype.has=zD;Hn.prototype.set=BD;var cc=Hn,KD=200;function WE(e,t){var r=this.__data__;if(r instanceof oc){var n=r.__data__;if(!vs||n.length<KD-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new cc(n)}return r.set(e,t),this.size=r.size,this}i(WE,"stackSet");var qD=WE;function Yn(e){var t=this.__data__=new oc(e);this.size=t.size}i(Yn,"Stack");Yn.prototype.clear=WL;Yn.prototype.delete=VL;Yn.prototype.get=HL;Yn.prototype.has=YL;Yn.prototype.set=qD;var bo=Yn,WD="__lodash_hash_undefined__";function VE(e){return this.__data__.set(e,WD),this}i(VE,"setCacheAdd");var VD=VE;function HE(e){return this.__data__.has(e)}i(HE,"setCacheHas");var HD=HE;function Rs(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new cc;++t<r;)this.add(e[t])}i(Rs,"SetCache");Rs.prototype.add=Rs.prototype.push=VD;Rs.prototype.has=HD;var YE=Rs;function XE(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(XE,"arraySome");var YD=XE;function JE(e,t){return e.has(t)}i(JE,"cacheHas");var ZE=JE,XD=1,JD=2;function QE(e,t,r,n,a,s){var o=r&XD,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var u=s.get(e),d=s.get(t);if(u&&d)return u==t&&d==e;var f=-1,h=!0,y=r&JD?new YE:void 0;for(s.set(e,t),s.set(t,e);++f<l;){var v=e[f],C=t[f];if(n)var b=o?n(C,v,f,t,e,s):n(v,C,f,e,t,s);if(b!==void 0){if(b)continue;h=!1;break}if(y){if(!YD(t,function(w,I){if(!ZE(y,I)&&(v===w||a(v,w,r,n,s)))return y.push(I)})){h=!1;break}}else if(!(v===C||a(v,C,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}i(QE,"equalArrays");var e_=QE,ZD=Nr.Uint8Array,Dm=ZD;function t_(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}i(t_,"mapToArray");var QD=t_;function r_(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}i(r_,"setToArray");var Up=r_,eM=1,tM=2,rM="[object Boolean]",nM="[object Date]",aM="[object Error]",iM="[object Map]",sM="[object Number]",oM="[object RegExp]",lM="[object Set]",cM="[object String]",uM="[object Symbol]",dM="[object ArrayBuffer]",fM="[object DataView]",Mm=tr?tr.prototype:void 0,xc=Mm?Mm.valueOf:void 0;function n_(e,t,r,n,a,s,o){switch(r){case fM:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case dM:return!(e.byteLength!=t.byteLength||!s(new Dm(e),new Dm(t)));case rM:case nM:case sM:return dE(+e,+t);case aM:return e.name==t.name&&e.message==t.message;case oM:case cM:return e==t+"";case iM:var l=QD;case lM:var c=n&eM;if(l||(l=Up),e.size!=t.size&&!c)return!1;var u=o.get(e);if(u)return u==t;n|=tM,o.set(e,t);var d=e_(l(e),l(t),n,a,s,o);return o.delete(e),d;case uM:if(xc)return xc.call(e)==xc.call(t)}return!1}i(n_,"equalByTag");var pM=n_;function a_(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}i(a_,"arrayPush");var i_=a_,hM=Array.isArray,et=hM;function s_(e,t,r){var n=t(e);return et(e)?n:i_(n,r(e))}i(s_,"baseGetAllKeys");var mM=s_;function o_(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(o_,"arrayFilter");var l_=o_;function c_(){return[]}i(c_,"stubArray");var gM=c_,yM=Object.prototype,vM=yM.propertyIsEnumerable,xm=Object.getOwnPropertySymbols,TM=xm?function(e){return e==null?[]:(e=Object(e),l_(xm(e),function(t){return vM.call(e,t)}))}:gM,RM=TM;function u_(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}i(u_,"baseTimes");var $M=u_;function d_(e){return e!=null&&typeof e=="object"}i(d_,"isObjectLike");var Ba=d_,AM="[object Arguments]";function f_(e){return Ba(e)&&Qa(e)==AM}i(f_,"baseIsArguments");var Fm=f_,p_=Object.prototype,EM=p_.hasOwnProperty,_M=p_.propertyIsEnumerable,CM=Fm((function(){return arguments})())?Fm:function(e){return Ba(e)&&EM.call(e,"callee")&&!_M.call(e,"callee")},uc=CM;function h_(){return!1}i(h_,"stubFalse");var SM=h_,m_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gm=m_&&typeof module=="object"&&module&&!module.nodeType&&module,bM=Gm&&Gm.exports===m_,jm=bM?Nr.Buffer:void 0,wM=jm?jm.isBuffer:void 0,IM=wM||SM,ul=IM,NM=9007199254740991,kM=/^(?:0|[1-9]\d*)$/;function g_(e,t){var r=typeof e;return t=t??NM,!!t&&(r=="number"||r!="symbol"&&kM.test(e))&&e>-1&&e%1==0&&e<t}i(g_,"isIndex");var y_=g_,PM=9007199254740991;function v_(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=PM}i(v_,"isLength");var zp=v_,OM="[object Arguments]",LM="[object Array]",DM="[object Boolean]",MM="[object Date]",xM="[object Error]",FM="[object Function]",GM="[object Map]",jM="[object Number]",UM="[object Object]",zM="[object RegExp]",BM="[object Set]",KM="[object String]",qM="[object WeakMap]",WM="[object ArrayBuffer]",VM="[object DataView]",HM="[object Float32Array]",YM="[object Float64Array]",XM="[object Int8Array]",JM="[object Int16Array]",ZM="[object Int32Array]",QM="[object Uint8Array]",ex="[object Uint8ClampedArray]",tx="[object Uint16Array]",rx="[object Uint32Array]",ve={};ve[HM]=ve[YM]=ve[XM]=ve[JM]=ve[ZM]=ve[QM]=ve[ex]=ve[tx]=ve[rx]=!0;ve[OM]=ve[LM]=ve[WM]=ve[DM]=ve[VM]=ve[MM]=ve[xM]=ve[FM]=ve[GM]=ve[jM]=ve[UM]=ve[zM]=ve[BM]=ve[KM]=ve[qM]=!1;function T_(e){return Ba(e)&&zp(e.length)&&!!ve[Qa(e)]}i(T_,"baseIsTypedArray");var nx=T_;function R_(e){return function(t){return e(t)}}i(R_,"baseUnary");var ax=R_,$_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,as=$_&&typeof module=="object"&&module&&!module.nodeType&&module,ix=as&&as.exports===$_,Fc=ix&&$E.process,sx=(function(){try{var e=as&&as.require&&as.require("util").types;return e||Fc&&Fc.binding&&Fc.binding("util")}catch{}})(),Um=sx,zm=Um&&Um.isTypedArray,ox=zm?ax(zm):nx,Bp=ox,lx=Object.prototype,cx=lx.hasOwnProperty;function A_(e,t){var r=et(e),n=!r&&uc(e),a=!r&&!n&&ul(e),s=!r&&!n&&!a&&Bp(e),o=r||n||a||s,l=o?$M(e.length,String):[],c=l.length;for(var u in e)(t||cx.call(e,u))&&!(o&&(u=="length"||a&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||y_(u,c)))&&l.push(u);return l}i(A_,"arrayLikeKeys");var ux=A_,dx=Object.prototype;function E_(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||dx;return e===r}i(E_,"isPrototype");var __=E_;function C_(e,t){return function(r){return e(t(r))}}i(C_,"overArg");var fx=C_,px=fx(Object.keys,Object),hx=px,mx=Object.prototype,gx=mx.hasOwnProperty;function S_(e){if(!__(e))return hx(e);var t=[];for(var r in Object(e))gx.call(e,r)&&r!="constructor"&&t.push(r);return t}i(S_,"baseKeys");var b_=S_;function w_(e){return e!=null&&zp(e.length)&&!wE(e)}i(w_,"isArrayLike");var dc=w_;function I_(e){return dc(e)?ux(e):b_(e)}i(I_,"keys");var Kp=I_;function N_(e){return mM(e,Kp,RM)}i(N_,"getAllKeys");var Bm=N_,yx=1,vx=Object.prototype,Tx=vx.hasOwnProperty;function k_(e,t,r,n,a,s){var o=r&yx,l=Bm(e),c=l.length,u=Bm(t),d=u.length;if(c!=d&&!o)return!1;for(var f=c;f--;){var h=l[f];if(!(o?h in t:Tx.call(t,h)))return!1}var y=s.get(e),v=s.get(t);if(y&&v)return y==t&&v==e;var C=!0;s.set(e,t),s.set(t,e);for(var b=o;++f<c;){h=l[f];var w=e[h],I=t[h];if(n)var A=o?n(I,w,h,t,e,s):n(w,I,h,e,t,s);if(!(A===void 0?w===I||a(w,I,r,n,s):A)){C=!1;break}b||(b=h=="constructor")}if(C&&!b){var k=e.constructor,G=t.constructor;k!=G&&"constructor"in e&&"constructor"in t&&!(typeof k=="function"&&k instanceof k&&typeof G=="function"&&G instanceof G)&&(C=!1)}return s.delete(e),s.delete(t),C}i(k_,"equalObjects");var Rx=k_,$x=ei(Nr,"DataView"),Ed=$x,Ax=ei(Nr,"Promise"),_d=Ax,Ex=ei(Nr,"Set"),Pa=Ex,_x=ei(Nr,"WeakMap"),Cd=_x,Km="[object Map]",Cx="[object Object]",qm="[object Promise]",Wm="[object Set]",Vm="[object WeakMap]",Hm="[object DataView]",Sx=Wn(Ed),bx=Wn(vs),wx=Wn(_d),Ix=Wn(Pa),Nx=Wn(Cd),an=Qa;(Ed&&an(new Ed(new ArrayBuffer(1)))!=Hm||vs&&an(new vs)!=Km||_d&&an(_d.resolve())!=qm||Pa&&an(new Pa)!=Wm||Cd&&an(new Cd)!=Vm)&&(an=i(function(e){var t=Qa(e),r=t==Cx?e.constructor:void 0,n=r?Wn(r):"";if(n)switch(n){case Sx:return Hm;case bx:return Km;case wx:return qm;case Ix:return Wm;case Nx:return Vm}return t},"getTag"));var Sd=an,kx=1,Ym="[object Arguments]",Xm="[object Array]",Xs="[object Object]",Px=Object.prototype,Jm=Px.hasOwnProperty;function P_(e,t,r,n,a,s){var o=et(e),l=et(t),c=o?Xm:Sd(e),u=l?Xm:Sd(t);c=c==Ym?Xs:c,u=u==Ym?Xs:u;var d=c==Xs,f=u==Xs,h=c==u;if(h&&ul(e)){if(!ul(t))return!1;o=!0,d=!1}if(h&&!d)return s||(s=new bo),o||Bp(e)?e_(e,t,r,n,a,s):pM(e,t,c,r,n,a,s);if(!(r&kx)){var y=d&&Jm.call(e,"__wrapped__"),v=f&&Jm.call(t,"__wrapped__");if(y||v){var C=y?e.value():e,b=v?t.value():t;return s||(s=new bo),a(C,b,r,n,s)}}return h?(s||(s=new bo),Rx(e,t,r,n,a,s)):!1}i(P_,"baseIsEqualDeep");var Ox=P_;function qp(e,t,r,n,a){return e===t?!0:e==null||t==null||!Ba(e)&&!Ba(t)?e!==e&&t!==t:Ox(e,t,r,n,qp,a)}i(qp,"baseIsEqual");var O_=qp,Lx=1,Dx=2;function L_(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 c=l[0],u=e[c],d=l[1];if(o&&l[2]){if(u===void 0&&!(c in e))return!1}else{var f=new bo;if(n)var h=n(u,d,c,e,t,f);if(!(h===void 0?O_(d,u,Lx|Dx,n,f):h))return!1}}return!0}i(L_,"baseIsMatch");var Mx=L_;function D_(e){return e===e&&!jp(e)}i(D_,"isStrictComparable");var M_=D_;function x_(e){for(var t=Kp(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,M_(a)]}return t}i(x_,"getMatchData");var xx=x_;function F_(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}i(F_,"matchesStrictComparable");var G_=F_;function j_(e){var t=xx(e);return t.length==1&&t[0][2]?G_(t[0][0],t[0][1]):function(r){return r===e||Mx(r,e,t)}}i(j_,"baseMatches");var Fx=j_,Gx="[object Symbol]";function U_(e){return typeof e=="symbol"||Ba(e)&&Qa(e)==Gx}i(U_,"isSymbol");var fc=U_,jx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ux=/^\w*$/;function z_(e,t){if(et(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||fc(e)?!0:Ux.test(e)||!jx.test(e)||t!=null&&e in Object(t)}i(z_,"isKey");var Wp=z_,zx="Expected a function";function pc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(zx);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(pc.Cache||cc),r}i(pc,"memoize");pc.Cache=cc;var Bx=pc,Kx=500;function B_(e){var t=Bx(e,function(n){return r.size===Kx&&r.clear(),n}),r=t.cache;return t}i(B_,"memoizeCapped");var qx=B_,Wx=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vx=/\\(\\)?/g,Hx=qx(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Wx,function(r,n,a,s){t.push(a?s.replace(Vx,"$1"):n||r)}),t}),Yx=Hx,Zm=tr?tr.prototype:void 0,Qm=Zm?Zm.toString:void 0;function Vp(e){if(typeof e=="string")return e;if(et(e))return lE(e,Vp)+"";if(fc(e))return Qm?Qm.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}i(Vp,"baseToString");var Xx=Vp;function K_(e){return e==null?"":Xx(e)}i(K_,"toString");var Jx=K_;function q_(e,t){return et(e)?e:Wp(e,t)?[e]:Yx(Jx(e))}i(q_,"castPath");var W_=q_;function V_(e){if(typeof e=="string"||fc(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}i(V_,"toKey");var hc=V_;function H_(e,t){t=W_(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[hc(t[r++])];return r&&r==n?e:void 0}i(H_,"baseGet");var Y_=H_;function X_(e,t,r){var n=e==null?void 0:Y_(e,t);return n===void 0?r:n}i(X_,"get");var Zx=X_;function J_(e,t){return e!=null&&t in Object(e)}i(J_,"baseHasIn");var Qx=J_;function Z_(e,t,r){t=W_(t,e);for(var n=-1,a=t.length,s=!1;++n<a;){var o=hc(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&&zp(a)&&y_(o,a)&&(et(e)||uc(e)))}i(Z_,"hasPath");var e1=Z_;function Q_(e,t){return e!=null&&e1(e,t,Qx)}i(Q_,"hasIn");var t1=Q_,r1=1,n1=2;function eC(e,t){return Wp(e)&&M_(t)?G_(hc(e),t):function(r){var n=Zx(r,e);return n===void 0&&n===t?t1(r,e):O_(t,n,r1|n1)}}i(eC,"baseMatchesProperty");var a1=eC;function tC(e){return e}i(tC,"identity");var Hp=tC;function rC(e){return function(t){return t?.[e]}}i(rC,"baseProperty");var i1=rC;function nC(e){return function(t){return Y_(t,e)}}i(nC,"basePropertyDeep");var s1=nC;function aC(e){return Wp(e)?i1(hc(e)):s1(e)}i(aC,"property");var o1=aC;function iC(e){return typeof e=="function"?e:e==null?Hp:typeof e=="object"?et(e)?a1(e[0],e[1]):Fx(e):o1(e)}i(iC,"baseIteratee");var mc=iC;function sC(e){return function(t,r,n){for(var a=-1,s=Object(t),o=n(t),l=o.length;l--;){var c=o[e?l:++a];if(r(s[c],c,s)===!1)break}return t}}i(sC,"createBaseFor");var l1=sC,c1=l1(),u1=c1;function oC(e,t){return e&&u1(e,t,Kp)}i(oC,"baseForOwn");var d1=oC;function lC(e,t){return function(r,n){if(r==null)return r;if(!dc(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(lC,"createBaseEach");var f1=lC,p1=f1(d1),gc=p1;function cC(e,t){var r=-1,n=dc(e)?Array(e.length):[];return gc(e,function(a,s,o){n[++r]=t(a,s,o)}),n}i(cC,"baseMap");var h1=cC;function uC(e,t){var r=et(e)?lE:h1;return r(e,mc(t))}i(uC,"map");var yr=uC;function dC(e,t){var r=[];return gc(e,function(n,a,s){t(n,a,s)&&r.push(n)}),r}i(dC,"baseFilter");var m1=dC;function fC(e,t){var r=et(e)?l_:m1;return r(e,mc(t))}i(fC,"filter");var g1=fC;function Nn(e,t,r){return`${e.name}_${t}_${r}`}i(Nn,"buildATNKey");var zr=1,y1=2,pC=4,hC=5,Bs=7,v1=8,T1=9,R1=10,$1=11,mC=12,Yp=class{static{i(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},Xp=class extends Yp{static{i(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},gC=class extends Yp{static{i(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},Jp=class extends Yp{static{i(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}};function yC(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};vC(t,e);const r=e.length;for(let n=0;n<r;n++){const a=e[n],s=Hr(t,a,a);s!==void 0&&IC(t,a,s)}return t}i(yC,"createATN");function vC(e,t){const r=t.length;for(let n=0;n<r;n++){const a=t[n],s=Fe(e,a,void 0,{type:y1}),o=Fe(e,a,void 0,{type:Bs});s.stop=o,e.ruleToStartState.set(a,s),e.ruleToStopState.set(a,o)}}i(vC,"createRuleStartAndStopATNStates");function Zp(e,t,r){return r instanceof Te?yc(e,t,r.terminalType,r):r instanceof Ze?wC(e,t,r):r instanceof lt?EC(e,t,r):r instanceof Be?_C(e,t,r):r instanceof we?TC(e,t,r):r instanceof ot?RC(e,t,r):r instanceof mt?$C(e,t,r):r instanceof gt?AC(e,t,r):Hr(e,t,r)}i(Zp,"atom");function TC(e,t,r){const n=Fe(e,t,r,{type:hC});kr(e,n);const a=Xn(e,t,n,r,Hr(e,t,r));return eh(e,t,r,a)}i(TC,"repetition");function RC(e,t,r){const n=Fe(e,t,r,{type:hC});kr(e,n);const a=Xn(e,t,n,r,Hr(e,t,r)),s=yc(e,t,r.separator,r);return eh(e,t,r,a,s)}i(RC,"repetitionSep");function $C(e,t,r){const n=Fe(e,t,r,{type:pC});kr(e,n);const a=Xn(e,t,n,r,Hr(e,t,r));return Qp(e,t,r,a)}i($C,"repetitionMandatory");function AC(e,t,r){const n=Fe(e,t,r,{type:pC});kr(e,n);const a=Xn(e,t,n,r,Hr(e,t,r)),s=yc(e,t,r.separator,r);return Qp(e,t,r,a,s)}i(AC,"repetitionMandatorySep");function EC(e,t,r){const n=Fe(e,t,r,{type:zr});kr(e,n);const a=yr(r.definition,o=>Zp(e,t,o));return Xn(e,t,n,r,...a)}i(EC,"alternation");function _C(e,t,r){const n=Fe(e,t,r,{type:zr});kr(e,n);const a=Xn(e,t,n,r,Hr(e,t,r));return CC(e,t,r,a)}i(_C,"option");function Hr(e,t,r){const n=g1(yr(r.definition,a=>Zp(e,t,a)),a=>a!==void 0);return n.length===1?n[0]:n.length===0?void 0:bC(e,n)}i(Hr,"block");function Qp(e,t,r,n,a){const s=n.left,o=n.right,l=Fe(e,t,r,{type:$1});kr(e,l);const c=Fe(e,t,r,{type:mC});return s.loopback=l,c.loopback=l,e.decisionMap[Nn(t,a?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=l,Pe(o,l),a===void 0?(Pe(l,s),Pe(l,c)):(Pe(l,c),Pe(l,a.left),Pe(a.right,s)),{left:s,right:c}}i(Qp,"plus");function eh(e,t,r,n,a){const s=n.left,o=n.right,l=Fe(e,t,r,{type:R1});kr(e,l);const c=Fe(e,t,r,{type:mC}),u=Fe(e,t,r,{type:T1});return l.loopback=u,c.loopback=u,Pe(l,s),Pe(l,c),Pe(o,u),a!==void 0?(Pe(u,c),Pe(u,a.left),Pe(a.right,s)):Pe(u,l),e.decisionMap[Nn(t,a?"RepetitionWithSeparator":"Repetition",r.idx)]=l,{left:l,right:c}}i(eh,"star");function CC(e,t,r,n){const a=n.left,s=n.right;return Pe(a,s),e.decisionMap[Nn(t,"Option",r.idx)]=a,n}i(CC,"optional");function kr(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}i(kr,"defineDecisionState");function Xn(e,t,r,n,...a){const s=Fe(e,t,n,{type:v1,start:r});r.end=s;for(const l of a)l!==void 0?(Pe(r,l.left),Pe(l.right,s)):Pe(r,s);const o={left:r,right:s};return e.decisionMap[Nn(t,SC(n),n.idx)]=r,o}i(Xn,"makeAlts");function SC(e){if(e instanceof lt)return"Alternation";if(e instanceof Be)return"Option";if(e instanceof we)return"Repetition";if(e instanceof ot)return"RepetitionWithSeparator";if(e instanceof mt)return"RepetitionMandatory";if(e instanceof gt)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}i(SC,"getProdType");function bC(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 c=l instanceof Jp,u=l,d=t[s+1].left;o.left.type===zr&&o.right.type===zr&&l!==void 0&&(c&&u.followState===o.right||l.target===o.right)?(c?u.followState=d:l.target=d,NC(e,o.right)):Pe(o.right,d)}const n=t[0],a=t[r-1];return{left:n.left,right:a.right}}i(bC,"makeBlock");function yc(e,t,r,n){const a=Fe(e,t,n,{type:zr}),s=Fe(e,t,n,{type:zr});return vc(a,new Xp(s,r)),{left:a,right:s}}i(yc,"tokenRef");function wC(e,t,r){const n=r.referencedRule,a=e.ruleToStartState.get(n),s=Fe(e,t,r,{type:zr}),o=Fe(e,t,r,{type:zr}),l=new Jp(a,n,o);return vc(s,l),{left:s,right:o}}i(wC,"ruleRef");function IC(e,t,r){const n=e.ruleToStartState.get(t);Pe(n,r.left);const a=e.ruleToStopState.get(t);return Pe(r.right,a),{left:n,right:a}}i(IC,"buildRuleHandle");function Pe(e,t){const r=new gC(t);vc(e,r)}i(Pe,"epsilon");function Fe(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(Fe,"newState");function vc(e,t){e.transitions.length===0&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}i(vc,"addTransition");function NC(e,t){e.states.splice(e.states.indexOf(t),1)}i(NC,"removeState");var dl={},bd=class{static{i(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const t=th(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return yr(this.configs,e=>e.alt)}get key(){let e="";for(const t in this.map)e+=t+":";return e}};function th(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(r=>r.stateNumber.toString()).join("_")}`}i(th,"getATNConfigKey");function kC(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&&!fc(o):r(o,l)))var l=o,c=s}return c}i(kC,"baseExtremum");var A1=kC;function PC(e,t){return e<t}i(PC,"baseLt");var E1=PC;function OC(e){return e&&e.length?A1(e,Hp,E1):void 0}i(OC,"min");var _1=OC,eg=tr?tr.isConcatSpreadable:void 0;function LC(e){return et(e)||uc(e)||!!(eg&&e&&e[eg])}i(LC,"isFlattenable");var C1=LC;function rh(e,t,r,n,a){var s=-1,o=e.length;for(r||(r=C1),a||(a=[]);++s<o;){var l=e[s];t>0&&r(l)?t>1?rh(l,t-1,r,n,a):i_(a,l):n||(a[a.length]=l)}return a}i(rh,"baseFlatten");var DC=rh;function MC(e,t){return DC(yr(e,t),1)}i(MC,"flatMap");var S1=MC;function xC(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(xC,"baseFindIndex");var b1=xC;function FC(e){return e!==e}i(FC,"baseIsNaN");var w1=FC;function GC(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}i(GC,"strictIndexOf");var I1=GC;function jC(e,t,r){return t===t?I1(e,t,r):b1(e,w1,r)}i(jC,"baseIndexOf");var N1=jC;function UC(e,t){var r=e==null?0:e.length;return!!r&&N1(e,t,0)>-1}i(UC,"arrayIncludes");var k1=UC;function zC(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(zC,"arrayIncludesWith");var P1=zC;function BC(){}i(BC,"noop");var O1=BC,L1=1/0,D1=Pa&&1/Up(new Pa([,-0]))[1]==L1?function(e){return new Pa(e)}:O1,M1=D1,x1=200;function KC(e,t,r){var n=-1,a=k1,s=e.length,o=!0,l=[],c=l;if(r)o=!1,a=P1;else if(s>=x1){var u=t?null:M1(e);if(u)return Up(u);o=!1,a=ZE,c=new YE}else c=t?[]:l;e:for(;++n<s;){var d=e[n],f=t?t(d):d;if(d=r||d!==0?d:0,o&&f===f){for(var h=c.length;h--;)if(c[h]===f)continue e;t&&c.push(f),l.push(d)}else a(c,f,r)||(c!==l&&c.push(f),l.push(d))}return l}i(KC,"baseUniq");var F1=KC;function qC(e,t){return e&&e.length?F1(e,mc(t)):[]}i(qC,"uniqBy");var G1=qC;function WC(e){var t=e==null?0:e.length;return t?DC(e,1):[]}i(WC,"flatten");var j1=WC;function VC(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}i(VC,"arrayEach");var U1=VC;function HC(e){return typeof e=="function"?e:Hp}i(HC,"castFunction");var z1=HC;function YC(e,t){var r=et(e)?U1:gc;return r(e,z1(t))}i(YC,"forEach");var Gc=YC,B1="[object Map]",K1="[object Set]",q1=Object.prototype,W1=q1.hasOwnProperty;function XC(e){if(e==null)return!0;if(dc(e)&&(et(e)||typeof e=="string"||typeof e.splice=="function"||ul(e)||Bp(e)||uc(e)))return!e.length;var t=Sd(e);if(t==B1||t==K1)return!e.size;if(__(e))return!b_(e).length;for(var r in e)if(W1.call(e,r))return!1;return!0}i(XC,"isEmpty");var V1=XC;function JC(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(JC,"arrayReduce");var H1=JC;function ZC(e,t,r,n,a){return a(e,function(s,o,l){r=n?(n=!1,s):t(r,s,o,l)}),r}i(ZC,"baseReduce");var Y1=ZC;function QC(e,t,r){var n=et(e)?H1:Y1,a=arguments.length<3;return n(e,mc(t),r,a,gc)}i(QC,"reduce");var tg=QC;function eS(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(eS,"createDFACache");var tS=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}},rg=new tS,X1=class extends xp{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=yC(e.rules),this.dfas=rS(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=Nn(r,"Alternation",t),u=this.atn.decisionMap[l].decision,d=yr(pd({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),f=>yr(f,h=>h[0]));if(wd(d,!1)&&!a){const f=tg(d,(h,y,v)=>(Gc(y,C=>{C&&(h[C.tokenTypeIdx]=v,Gc(C.categoryMatches,b=>{h[b]=v}))}),h),{});return n?function(h){var y;const v=this.LA(1),C=f[v.tokenTypeIdx];if(h!==void 0&&C!==void 0){const b=(y=h[C])===null||y===void 0?void 0:y.GATE;if(b!==void 0&&b.call(this)===!1)return}return C}:function(){const h=this.LA(1);return f[h.tokenTypeIdx]}}else return n?function(f){const h=new tS,y=f===void 0?0:f.length;for(let C=0;C<y;C++){const b=f?.[C].GATE;h.set(C,b===void 0||b.call(this))}const v=wo.call(this,s,u,h,o);return typeof v=="number"?v:void 0}:function(){const f=wo.call(this,s,u,rg,o);return typeof f=="number"?f:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:t,rule:r,prodType:n,dynamicTokensEnabled:a}=e,s=this.dfas,o=this.logging,l=Nn(r,n,t),u=this.atn.decisionMap[l].decision,d=yr(pd({maxLookahead:1,occurrence:t,prodType:n,rule:r}),f=>yr(f,h=>h[0]));if(wd(d)&&d[0][0]&&!a){const f=d[0],h=j1(f);if(h.length===1&&V1(h[0].categoryMatches)){const v=h[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===v}}else{const y=tg(h,(v,C)=>(C!==void 0&&(v[C.tokenTypeIdx]=!0,Gc(C.categoryMatches,b=>{v[b]=!0})),v),{});return function(){const v=this.LA(1);return y[v.tokenTypeIdx]===!0}}}return function(){const f=wo.call(this,s,u,rg,o);return typeof f=="object"?!1:f===0}}};function wd(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(wd,"isLL1Sequence");function rS(e){const t=e.decisionStates.length,r=Array(t);for(let n=0;n<t;n++)r[n]=eS(e.decisionStates[n],n);return r}i(rS,"initATNSimulator");function wo(e,t,r,n){const a=e[t](r);let s=a.start;if(s===void 0){const l=pS(a.atnStartState);s=ah(a,nh(l)),a.start=s}return nS.apply(this,[a,s,r,n])}i(wo,"adaptivePredict");function nS(e,t,r,n){let a=t,s=1;const o=[];let l=this.LA(s++);for(;;){let c=cS(a,l);if(c===void 0&&(c=aS.apply(this,[e,a,l,s,r,n])),c===dl)return lS(o,a,l);if(c.isAcceptState===!0)return c.prediction;a=c,o.push(l),l=this.LA(s++)}}i(nS,"performLookahead");function aS(e,t,r,n,a,s){const o=uS(t.configs,r,a);if(o.size===0)return Id(e,t,r,dl),dl;let l=nh(o);const c=fS(o,a);if(c!==void 0)l.isAcceptState=!0,l.prediction=c,l.configs.uniqueAlt=c;else if(yS(o)){const u=_1(o.alts);l.isAcceptState=!0,l.prediction=u,l.configs.uniqueAlt=u,iS.apply(this,[e,n,o.alts,s])}return l=Id(e,t,r,l),l}i(aS,"computeLookaheadTarget");function iS(e,t,r,n){const a=[];for(let u=1;u<=t;u++)a.push(this.LA(u).tokenType);const s=e.atnStartState,o=s.rule,l=s.production,c=sS({topLevelRule:o,ambiguityIndices:r,production:l,prefixPath:a});n(c)}i(iS,"reportLookaheadAmbiguity");function sS(e){const t=yr(e.prefixPath,a=>Cn(a)).join(", "),r=e.production.idx===0?"":e.production.idx;let n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${oS(e.production)}${r}> inside <${e.topLevelRule.name}> Rule,
  133. <${t}> may appears as a prefix path in all these alternatives.
  134. `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
  135. For Further details.`,n}i(sS,"buildAmbiguityError");function oS(e){if(e instanceof Ze)return"SUBRULE";if(e instanceof Be)return"OPTION";if(e instanceof lt)return"OR";if(e instanceof mt)return"AT_LEAST_ONE";if(e instanceof gt)return"AT_LEAST_ONE_SEP";if(e instanceof ot)return"MANY_SEP";if(e instanceof we)return"MANY";if(e instanceof Te)return"CONSUME";throw Error("non exhaustive match")}i(oS,"getProductionDslName");function lS(e,t,r){const n=S1(t.configs.elements,s=>s.state.transitions),a=G1(n.filter(s=>s instanceof Xp).map(s=>s.tokenType),s=>s.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:a,tokenPath:e}}i(lS,"buildAdaptivePredictError");function cS(e,t){return e.edges[t.tokenTypeIdx]}i(cS,"getExistingTargetState");function uS(e,t,r){const n=new bd,a=[];for(const o of e.elements){if(r.is(o.alt)===!1)continue;if(o.state.type===Bs){a.push(o);continue}const l=o.state.transitions.length;for(let c=0;c<l;c++){const u=o.state.transitions[c],d=dS(u,t);d!==void 0&&n.add({state:d,alt:o.alt,stack:o.stack})}}let s;if(a.length===0&&n.size===1&&(s=n),s===void 0){s=new bd;for(const o of n.elements)$s(o,s)}if(a.length>0&&!mS(s))for(const o of a)s.add(o);return s}i(uS,"computeReachSet");function dS(e,t){if(e instanceof Xp&&Np(t,e.tokenType))return e.target}i(dS,"getReachableTarget");function fS(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(fS,"getUniqueAlt");function nh(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}i(nh,"newDFAState");function Id(e,t,r,n){return n=ah(e,n),t.edges[r.tokenTypeIdx]=n,n}i(Id,"addDFAEdge");function ah(e,t){if(t===dl)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(ah,"addDFAState");function pS(e){const t=new bd,r=e.transitions.length;for(let n=0;n<r;n++){const s={state:e.transitions[n].target,alt:n,stack:[]};$s(s,t)}return t}i(pS,"computeStartState");function $s(e,t){const r=e.state;if(r.type===Bs){if(e.stack.length>0){const a=[...e.stack],o={state:a.pop(),alt:e.alt,stack:a};$s(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=hS(e,s);o!==void 0&&$s(o,t)}}i($s,"closure");function hS(e,t){if(t instanceof gC)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof Jp){const r=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:r}}}i(hS,"getEpsilonTarget");function mS(e){for(const t of e.elements)if(t.state.type===Bs)return!0;return!1}i(mS,"hasConfigInRuleStopState");function gS(e){for(const t of e.elements)if(t.state.type!==Bs)return!1;return!0}i(gS,"allConfigsInRuleStopStates");function yS(e){if(gS(e))return!0;const t=vS(e.elements);return TS(t)&&!RS(t)}i(yS,"hasConflictTerminatingPrediction");function vS(e){const t=new Map;for(const r of e){const n=th(r,!1);let a=t.get(n);a===void 0&&(a={},t.set(n,a)),a[r.alt]=!0}return t}i(vS,"getConflictingAltSets");function TS(e){for(const t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}i(TS,"hasConflictingAltSet");function RS(e){for(const t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}i(RS,"hasStateAssociatedWithOneAlt");_s();var $S=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 sh(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const t=new Tc;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){const r=new fl(e.startOffset,e.image.length,ls(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 fl(a.startOffset,a.image.length,ls(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.$infix&&(this.current.astNode=e),e.$cstNode=t;const r=this.nodeStack.pop();r?.content.length===0&&this.removeNode(r)}},ih=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)}},fl=class extends ih{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}},Tc=class extends ih{static{i(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new J1(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]}},J1=class AS extends Array{static{i(this,"CstNodeContainer")}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,AS.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}},sh=class extends Tc{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??""}},pl=Symbol("Datatype");function Io(e){return e.$type===pl}i(Io,"isDataTypeNode");var ng="​",ES=i(e=>e.endsWith(ng)?e:e+ng,"withRuleSuffix"),oh=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 Q1(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new bS(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()}},_S=class extends oh{static{i(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new $S,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;xa(e)&&(n=e.name,this.registerPrecedenceMap(e));const a=this.wrapper.DEFINE_RULE(ES(e.name),this.startImplementation(r,n,t).bind(this));return this.allRules.set(e.name,a),Je(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 xa(e)?bn(e):e.fragment?void 0:ws(e)?pl:bn(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,Da(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===pl?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),c=this.current;if(o){const u=Rr(r)?n.image:this.converter.convert(n.image,s);this.assign(o.operator,o.feature,u,s,l)}else if(Io(c)){let u=n.image;Rr(r)||(u=this.converter.convert(u,s).toString()),c.value+=u}}}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(Io(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)):Io(e)?this.converter.convert(e.value,e.$cstNode):(af(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 C=n[v],b=t.get(C)??{precedence:1/0,rightAssoc:!1};b.precedence>s?(s=b.precedence,a=v):b.precedence===s&&(b.rightAssoc||(a=v))}const o=n.slice(0,a),l=n.slice(a+1),c=r.slice(0,a+1),u=r.slice(a+1),d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:o},f={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:l},h=this.constructInfix(d,t),y=this.constructInfix(f,t);return{$type:e.$type,$cstNode:e.$cstNode,left:h,operator:n[a],right:y}}getAssignment(e){if(!this.assignmentMap.has(e)){const t=On(e,Tr);this.assignmentMap.set(e,{assignment:t,crossRef:t&&Dn(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}},CS=class{static{i(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return wa.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return wa.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return wa.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return wa.buildEarlyExitMessage(e)}},lh=class extends CS{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}\`.`}},SS=class extends oh{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(ES(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}},Z1={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new lh},bS=class extends FL{static{i(this,"ChevrotainWrapper")}constructor(e,t){const r=t&&"maxLookahead"in t;super(e,{...Z1,lookaheadStrategy:r?new xp({maxLookahead:t.maxLookahead}):new X1({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,{})}},Q1=class extends bS{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 Rc(e,t,r){return wS({parser:t,tokens:r,ruleNames:new Map},e),t}i(Rc,"createParser");function wS(e,t){const r=Dl(t,!1),n=oe(t.rules).filter(Je).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,Br(o,s.definition))}const a=oe(t.rules).filter(xa).filter(s=>r.has(s));for(const s of a)e.parser.rule(s,IS(e,s))}i(wS,"buildRules");function IS(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(bt(r))throw new Error("Cannot use terminal rule in infix expression");const n=t.operators.precedences.flatMap(y=>y.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 c={$container:o,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},u={...s,$container:o};o.elements.push(c,u);const f=n.map(y=>e.tokens[y.value]).map((y,v)=>({ALT:i(()=>e.parser.consume(v,y,c),"ALT")}));let h;return y=>{h??(h=$c(e,r)),e.parser.subrule(0,h,!1,s,y),e.parser.many(0,{DEF:i(()=>{e.parser.alternatives(0,f),e.parser.subrule(1,h,!1,u,y)},"DEF")})}}i(IS,"buildInfixRule");function Br(e,t,r=!1){let n;if(Rr(t))n=MS(e,t);else if(Gr(t))n=NS(e,t);else if(Tr(t))n=Br(e,t.terminal);else if(Dn(t))n=ch(e,t);else if($r(t))n=kS(e,t);else if(Sl(t))n=OS(e,t);else if(Nl(t))n=LS(e,t);else if(Mn(t))n=DS(e,t);else if(ff(t)){const a=e.consume++;n=i(()=>e.parser.consume(a,Ur,t),"method")}else throw new Pl(t.$cstNode,`Unexpected element type: ${t.$type}`);return uh(e,r?void 0:As(t),n,t.cardinality)}i(Br,"buildElement");function NS(e,t){const r=bn(t);return()=>e.parser.action(r,t)}i(NS,"buildAction");function kS(e,t){const r=t.rule.ref;if(Ln(r)){const n=e.subrule++,a=Je(r)&&r.fragment,s=t.arguments.length>0?PS(r,t.arguments):()=>({});let o;return l=>{o??(o=$c(e,r)),e.parser.subrule(n,o,a,t,s(l))}}else if(bt(r)){const n=e.consume++,a=hl(e,r.name);return()=>e.parser.consume(n,a,t)}else if(r)qr();else throw new Pl(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}i(kS,"buildRuleCall");function PS(e,t){if(t.some(n=>n.calledByName)){const n=t.map(a=>({parameterName:a.parameter?.ref?.name,predicate:Lt(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=>Lt(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,c=n[o];s[l]=c(a)}return s}}}i(PS,"buildRuleCallPredicate");function Lt(e){if(df(e)){const t=Lt(e.left),r=Lt(e.right);return n=>t(n)||r(n)}else if(uf(e)){const t=Lt(e.left),r=Lt(e.right);return n=>t(n)&&r(n)}else if(mf(e)){const t=Lt(e.value);return r=>!t(r)}else if(gf(e)){const t=e.parameter.ref.name;return r=>r!==void 0&&r[t]===!0}else if(lf(e)){const t=!!e.true;return()=>t}qr()}i(Lt,"buildPredicate");function OS(e,t){if(t.elements.length===1)return Br(e,t.elements[0]);{const r=[];for(const a of t.elements){const s={ALT:Br(e,a,!0)},o=As(a);o&&(s.GATE=Lt(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(OS,"buildAlternatives");function LS(e,t){if(t.elements.length===1)return Br(e,t.elements[0]);const r=[];for(const l of t.elements){const c={ALT:Br(e,l,!0)},u=As(l);u&&(c.GATE=Lt(u)),r.push(c)}const n=e.or++,a=i((l,c)=>{const u=c.getRuleStack().join("-");return`uGroup_${l}_${u}`},"idFunc"),s=i(l=>e.parser.alternatives(n,r.map((c,u)=>{const d={ALT:i(()=>!0,"ALT")},f=e.parser;d.ALT=()=>{if(c.ALT(l),!f.isRecording()){const y=a(n,f);f.unorderedGroups.get(y)||f.unorderedGroups.set(y,[]);const v=f.unorderedGroups.get(y);typeof v?.[u]>"u"&&(v[u]=!0)}};const h=c.GATE;return h?d.GATE=()=>h(l):d.GATE=()=>!f.unorderedGroups.get(a(n,f))?.[u],d})),"alternatives"),o=uh(e,As(t),s,"*");return l=>{o(l),e.parser.isRecording()||e.parser.unorderedGroups.delete(a(n,e.parser))}}i(LS,"buildUnorderedGroup");function DS(e,t){const r=t.elements.map(n=>Br(e,n));return n=>r.forEach(a=>a(n))}i(DS,"buildGroup");function As(e){if(Mn(e))return e.guardCondition}i(As,"getGuardCondition");function ch(e,t,r=t.terminal){if(r)if($r(r)&&Je(r.rule.ref)){const n=r.rule.ref,a=e.subrule++;let s;return o=>{s??(s=$c(e,n)),e.parser.subrule(a,s,!1,t,o)}}else if($r(r)&&bt(r.rule.ref)){const n=e.consume++,a=hl(e,r.rule.ref.name);return()=>e.parser.consume(n,a,t)}else if(Rr(r)){const n=e.consume++,a=hl(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=Gl(t.type.ref)?.terminal;if(!a)throw new Error("Could not find name assignment for type: "+bn(t.type.ref));return ch(e,t,a)}}i(ch,"buildCrossReference");function MS(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(MS,"buildKeyword");function uh(e,t,r,n){const a=t&&Lt(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:Ad(),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:Ad(),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(uh,"wrap");function $c(e,t){const r=xS(e,t),n=e.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}i($c,"getRule");function xS(e,t){if(Ln(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,n=r.$container,a=t.$type;for(;!Je(n);)(Mn(n)||Sl(n)||Nl(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(xS,"getRuleName");function hl(e,t){const r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}i(hl,"getToken");function dh(e){const t=e.Grammar,r=e.parser.Lexer,n=new SS(e);return Rc(t,n,r.definition),n.finalize(),n}i(dh,"createCompletionParser");function fh(e){const t=ph(e);return t.finalize(),t}i(fh,"createLangiumParser");function ph(e){const t=e.Grammar,r=e.parser.Lexer,n=new _S(e);return Rc(t,n,r.definition)}i(ph,"prepareLangiumParser");var Ac=class{static{i(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){const r=oe(Dl(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(bt).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(e){const t=Ns(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=Ll(t)?Xe.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(Ln).flatMap(n=>wr(n).filter(Rr)).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(Va(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((r,n)=>{const a=n?.PATTERN;return a?.source&&Ff("^"+a.source+"$",e.value)&&r.push(n),r},[])}},hh=class{static{i(this,"DefaultValueConverter")}convert(e,t){let r=t.grammarSource;if(Dn(r)&&(r=Bf(r)),$r(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 Yt.convertInt(t);case"STRING":return Yt.convertString(t);case"ID":return Yt.convertID(t)}switch(Zf(e)?.toLowerCase()){case"number":return Yt.convertNumber(t);case"boolean":return Yt.convertBoolean(t);case"bigint":return Yt.convertBigint(t);case"date":return Yt.convertDate(t);default:return t}}},Yt;(function(e){function t(u){let d="";for(let f=1;f<u.length-1;f++){const h=u.charAt(f);if(h==="\\"){const y=u.charAt(++f);d+=r(y)}else d+=h}return d}i(t,"convertString"),e.convertString=t;function r(u){switch(u){case"b":return"\b";case"f":return"\f";case"n":return`
  136. `;case"r":return"\r";case"t":return" ";case"v":return"\v";case"0":return"\0";default:return u}}i(r,"convertEscapeCharacter");function n(u){return u.charAt(0)==="^"?u.substring(1):u}i(n,"convertID"),e.convertID=n;function a(u){return parseInt(u)}i(a,"convertInt"),e.convertInt=a;function s(u){return BigInt(u)}i(s,"convertBigint"),e.convertBigint=s;function o(u){return new Date(u)}i(o,"convertDate"),e.convertDate=o;function l(u){return Number(u)}i(l,"convertNumber"),e.convertNumber=l;function c(u){return u.toLowerCase()==="true"}i(c,"convertBoolean"),e.convertBoolean=c})(Yt||(Yt={}));var pe={};$l(pe,Jd(El()));function Ec(){return new Promise(e=>{typeof setImmediate>"u"?setTimeout(e,0):setImmediate(e)})}i(Ec,"delayNextTick");var No=0,FS=10;function _c(){return No=performance.now(),new pe.CancellationTokenSource}i(_c,"startCancelableOperation");function mh(e){FS=e}i(mh,"setInterruptionPeriod");var Zt=Symbol("OperationCancelled");function Jn(e){return e===Zt}i(Jn,"isOperationCancelled");async function Ge(e){if(e===pe.CancellationToken.None)return;const t=performance.now();if(t-No>=FS&&(No=t,await Ec(),No=performance.now()),e.isCancellationRequested)throw Zt}i(Ge,"interruptAndCheck");var Sr=class{static{i(this,"Deferred")}constructor(){this.promise=new Promise((e,t)=>{this.resolve=r=>(e(r),this),this.reject=r=>(t(r),this)})}},ag=class Nd{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(Nd.isIncremental(n)){const a=yh(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),c=Math.max(a.end.line,0);let u=this._lineOffsets;const d=kd(n.text,!1,s);if(c-l===d.length)for(let h=0,y=d.length;h<y;h++)u[h+l+1]=d[h];else d.length<1e4?u.splice(l+1,c-l,...d):this._lineOffsets=u=u.slice(0,l+1).concat(d,u.slice(c+1));const f=n.text.length-(o-s);if(f!==0)for(let h=l+1+d.length,y=u.length;h<y;h++)u[h]=u[h]+f}else if(Nd.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=kd(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&&gh(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}},ml;(function(e){function t(a,s,o,l){return new ag(a,s,o,l)}i(t,"create"),e.create=t;function r(a,s,o){if(a instanceof ag)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=gl(s.map(GS),(d,f)=>{const h=d.range.start.line-f.range.start.line;return h===0?d.range.start.character-f.range.start.character:h});let c=0;const u=[];for(const d of l){const f=a.offsetAt(d.range.start);if(f<c)throw new Error("Overlapping edit");f>c&&u.push(o.substring(c,f)),d.newText.length&&u.push(d.newText),c=a.offsetAt(d.range.end)}return u.push(o.substr(c)),u.join("")}i(n,"applyEdits"),e.applyEdits=n})(ml||(ml={}));function gl(e,t){if(e.length<=1)return e;const r=e.length/2|0,n=e.slice(0,r),a=e.slice(r);gl(n,t),gl(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(gl,"mergeSort");function kd(e,t,r=0){const n=t?[r]:[];for(let a=0;a<e.length;a++){const s=e.charCodeAt(a);gh(s)&&(s===13&&a+1<e.length&&e.charCodeAt(a+1)===10&&a++,n.push(r+a+1))}return n}i(kd,"computeLineOffsets");function gh(e){return e===13||e===10}i(gh,"isEOL");function yh(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(yh,"getWellformedRange");function GS(e){const t=yh(e.range);return t!==e.range?{newText:e.newText,range:t}:e}i(GS,"getWellformedEdit");var jS;(()=>{var e={975:P=>{function _(T){if(typeof T!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(T))}i(_,"e");function g(T,R){for(var S,O="",M=0,D=-1,z=0,B=0;B<=T.length;++B){if(B<T.length)S=T.charCodeAt(B);else{if(S===47)break;S=47}if(S===47){if(!(D===B-1||z===1))if(D!==B-1&&z===2){if(O.length<2||M!==2||O.charCodeAt(O.length-1)!==46||O.charCodeAt(O.length-2)!==46){if(O.length>2){var Z=O.lastIndexOf("/");if(Z!==O.length-1){Z===-1?(O="",M=0):M=(O=O.slice(0,Z)).length-1-O.lastIndexOf("/"),D=B,z=0;continue}}else if(O.length===2||O.length===1){O="",M=0,D=B,z=0;continue}}R&&(O.length>0?O+="/..":O="..",M=2)}else O.length>0?O+="/"+T.slice(D+1,B):O=T.slice(D+1,B),M=B-D-1;D=B,z=0}else S===46&&z!==-1?++z:z=-1}return O}i(g,"r");var E={resolve:i(function(){for(var T,R="",S=!1,O=arguments.length-1;O>=-1&&!S;O--){var M;O>=0?M=arguments[O]:(T===void 0&&(T=process.cwd()),M=T),_(M),M.length!==0&&(R=M+"/"+R,S=M.charCodeAt(0)===47)}return R=g(R,!S),S?R.length>0?"/"+R:"/":R.length>0?R:"."},"resolve"),normalize:i(function(T){if(_(T),T.length===0)return".";var R=T.charCodeAt(0)===47,S=T.charCodeAt(T.length-1)===47;return(T=g(T,!R)).length!==0||R||(T="."),T.length>0&&S&&(T+="/"),R?"/"+T:T},"normalize"),isAbsolute:i(function(T){return _(T),T.length>0&&T.charCodeAt(0)===47},"isAbsolute"),join:i(function(){if(arguments.length===0)return".";for(var T,R=0;R<arguments.length;++R){var S=arguments[R];_(S),S.length>0&&(T===void 0?T=S:T+="/"+S)}return T===void 0?".":E.normalize(T)},"join"),relative:i(function(T,R){if(_(T),_(R),T===R||(T=E.resolve(T))===(R=E.resolve(R)))return"";for(var S=1;S<T.length&&T.charCodeAt(S)===47;++S);for(var O=T.length,M=O-S,D=1;D<R.length&&R.charCodeAt(D)===47;++D);for(var z=R.length-D,B=M<z?M:z,Z=-1,J=0;J<=B;++J){if(J===B){if(z>B){if(R.charCodeAt(D+J)===47)return R.slice(D+J+1);if(J===0)return R.slice(D+J)}else M>B&&(T.charCodeAt(S+J)===47?Z=J:J===0&&(Z=0));break}var te=T.charCodeAt(S+J);if(te!==R.charCodeAt(D+J))break;te===47&&(Z=J)}var de="";for(J=S+Z+1;J<=O;++J)J!==O&&T.charCodeAt(J)!==47||(de.length===0?de+="..":de+="/..");return de.length>0?de+R.slice(D+Z):(D+=Z,R.charCodeAt(D)===47&&++D,R.slice(D))},"relative"),_makeLong:i(function(T){return T},"_makeLong"),dirname:i(function(T){if(_(T),T.length===0)return".";for(var R=T.charCodeAt(0),S=R===47,O=-1,M=!0,D=T.length-1;D>=1;--D)if((R=T.charCodeAt(D))===47){if(!M){O=D;break}}else M=!1;return O===-1?S?"/":".":S&&O===1?"//":T.slice(0,O)},"dirname"),basename:i(function(T,R){if(R!==void 0&&typeof R!="string")throw new TypeError('"ext" argument must be a string');_(T);var S,O=0,M=-1,D=!0;if(R!==void 0&&R.length>0&&R.length<=T.length){if(R.length===T.length&&R===T)return"";var z=R.length-1,B=-1;for(S=T.length-1;S>=0;--S){var Z=T.charCodeAt(S);if(Z===47){if(!D){O=S+1;break}}else B===-1&&(D=!1,B=S+1),z>=0&&(Z===R.charCodeAt(z)?--z==-1&&(M=S):(z=-1,M=B))}return O===M?M=B:M===-1&&(M=T.length),T.slice(O,M)}for(S=T.length-1;S>=0;--S)if(T.charCodeAt(S)===47){if(!D){O=S+1;break}}else M===-1&&(D=!1,M=S+1);return M===-1?"":T.slice(O,M)},"basename"),extname:i(function(T){_(T);for(var R=-1,S=0,O=-1,M=!0,D=0,z=T.length-1;z>=0;--z){var B=T.charCodeAt(z);if(B!==47)O===-1&&(M=!1,O=z+1),B===46?R===-1?R=z:D!==1&&(D=1):R!==-1&&(D=-1);else if(!M){S=z+1;break}}return R===-1||O===-1||D===0||D===1&&R===O-1&&R===S+1?"":T.slice(R,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(R,S){var O=S.dir||S.root,M=S.base||(S.name||"")+(S.ext||"");return O?O===S.root?O+M:O+"/"+M:M})(0,T)},"format"),parse:i(function(T){_(T);var R={root:"",dir:"",base:"",ext:"",name:""};if(T.length===0)return R;var S,O=T.charCodeAt(0),M=O===47;M?(R.root="/",S=1):S=0;for(var D=-1,z=0,B=-1,Z=!0,J=T.length-1,te=0;J>=S;--J)if((O=T.charCodeAt(J))!==47)B===-1&&(Z=!1,B=J+1),O===46?D===-1?D=J:te!==1&&(te=1):D!==-1&&(te=-1);else if(!Z){z=J+1;break}return D===-1||B===-1||te===0||te===1&&D===B-1&&D===z+1?B!==-1&&(R.base=R.name=z===0&&M?T.slice(1,B):T.slice(z,B)):(z===0&&M?(R.name=T.slice(1,D),R.base=T.slice(1,B)):(R.name=T.slice(z,D),R.base=T.slice(z,B)),R.ext=T.slice(D,B)),z>0?R.dir=T.slice(0,z-1):M&&(R.dir="/"),R},"parse"),sep:"/",delimiter:":",win32:null,posix:null};E.posix=E,P.exports=E}},t={};function r(P){var _=t[P];if(_!==void 0)return _.exports;var g=t[P]={exports:{}};return e[P](g,g.exports,r),g.exports}i(r,"r"),r.d=(P,_)=>{for(var g in _)r.o(_,g)&&!r.o(P,g)&&Object.defineProperty(P,g,{enumerable:!0,get:_[g]})},r.o=(P,_)=>Object.prototype.hasOwnProperty.call(P,_),r.r=P=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(P,"__esModule",{value:!0})};var n={};let a;r.r(n),r.d(n,{URI:i(()=>h,"URI"),Utils:i(()=>Ne,"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 c(P,_){if(!P.scheme&&_)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${P.authority}", path: "${P.path}", query: "${P.query}", fragment: "${P.fragment}"}`);if(P.scheme&&!s.test(P.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(P.path){if(P.authority){if(!o.test(P.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(P.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}i(c,"a");const u="",d="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class h{static{i(this,"l")}static isUri(_){return _ instanceof h||!!_&&typeof _.authority=="string"&&typeof _.fragment=="string"&&typeof _.path=="string"&&typeof _.query=="string"&&typeof _.scheme=="string"&&typeof _.fsPath=="string"&&typeof _.with=="function"&&typeof _.toString=="function"}scheme;authority;path;query;fragment;constructor(_,g,E,T,R,S=!1){typeof _=="object"?(this.scheme=_.scheme||u,this.authority=_.authority||u,this.path=_.path||u,this.query=_.query||u,this.fragment=_.fragment||u):(this.scheme=(function(O,M){return O||M?O:"file"})(_,S),this.authority=g||u,this.path=(function(O,M){switch(O){case"https":case"http":case"file":M?M[0]!==d&&(M=d+M):M=d}return M})(this.scheme,E||u),this.query=T||u,this.fragment=R||u,c(this,S))}get fsPath(){return I(this,!1)}with(_){if(!_)return this;let{scheme:g,authority:E,path:T,query:R,fragment:S}=_;return g===void 0?g=this.scheme:g===null&&(g=u),E===void 0?E=this.authority:E===null&&(E=u),T===void 0?T=this.path:T===null&&(T=u),R===void 0?R=this.query:R===null&&(R=u),S===void 0?S=this.fragment:S===null&&(S=u),g===this.scheme&&E===this.authority&&T===this.path&&R===this.query&&S===this.fragment?this:new v(g,E,T,R,S)}static parse(_,g=!1){const E=f.exec(_);return E?new v(E[2]||u,H(E[4]||u),H(E[5]||u),H(E[7]||u),H(E[9]||u),g):new v(u,u,u,u,u)}static file(_){let g=u;if(a&&(_=_.replace(/\\/g,d)),_[0]===d&&_[1]===d){const E=_.indexOf(d,2);E===-1?(g=_.substring(2),_=d):(g=_.substring(2,E),_=_.substring(E)||d)}return new v("file",g,_,u,u)}static from(_){const g=new v(_.scheme,_.authority,_.path,_.query,_.fragment);return c(g,!0),g}toString(_=!1){return A(this,_)}toJSON(){return this}static revive(_){if(_){if(_ instanceof h)return _;{const g=new v(_);return g._formatted=_.external,g._fsPath=_._sep===y?_.fsPath:null,g}}return _}}const y=a?1:void 0;class v extends h{static{i(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=I(this,!1)),this._fsPath}toString(_=!1){return _?A(this,!0):(this._formatted||(this._formatted=A(this,!1)),this._formatted)}toJSON(){const _={$mid:1};return this._fsPath&&(_.fsPath=this._fsPath,_._sep=y),this._formatted&&(_.external=this._formatted),this.path&&(_.path=this.path),this.scheme&&(_.scheme=this.scheme),this.authority&&(_.authority=this.authority),this.query&&(_.query=this.query),this.fragment&&(_.fragment=this.fragment),_}}const C={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 b(P,_,g){let E,T=-1;for(let R=0;R<P.length;R++){const S=P.charCodeAt(R);if(S>=97&&S<=122||S>=65&&S<=90||S>=48&&S<=57||S===45||S===46||S===95||S===126||_&&S===47||g&&S===91||g&&S===93||g&&S===58)T!==-1&&(E+=encodeURIComponent(P.substring(T,R)),T=-1),E!==void 0&&(E+=P.charAt(R));else{E===void 0&&(E=P.substr(0,R));const O=C[S];O!==void 0?(T!==-1&&(E+=encodeURIComponent(P.substring(T,R)),T=-1),E+=O):T===-1&&(T=R)}}return T!==-1&&(E+=encodeURIComponent(P.substring(T))),E!==void 0?E:P}i(b,"m");function w(P){let _;for(let g=0;g<P.length;g++){const E=P.charCodeAt(g);E===35||E===63?(_===void 0&&(_=P.substr(0,g)),_+=C[E]):_!==void 0&&(_+=P[g])}return _!==void 0?_:P}i(w,"y");function I(P,_){let g;return g=P.authority&&P.path.length>1&&P.scheme==="file"?`//${P.authority}${P.path}`:P.path.charCodeAt(0)===47&&(P.path.charCodeAt(1)>=65&&P.path.charCodeAt(1)<=90||P.path.charCodeAt(1)>=97&&P.path.charCodeAt(1)<=122)&&P.path.charCodeAt(2)===58?_?P.path.substr(1):P.path[1].toLowerCase()+P.path.substr(2):P.path,a&&(g=g.replace(/\//g,"\\")),g}i(I,"v");function A(P,_){const g=_?w:b;let E="",{scheme:T,authority:R,path:S,query:O,fragment:M}=P;if(T&&(E+=T,E+=":"),(R||T==="file")&&(E+=d,E+=d),R){let D=R.indexOf("@");if(D!==-1){const z=R.substr(0,D);R=R.substr(D+1),D=z.lastIndexOf(":"),D===-1?E+=g(z,!1,!1):(E+=g(z.substr(0,D),!1,!1),E+=":",E+=g(z.substr(D+1),!1,!0)),E+="@"}R=R.toLowerCase(),D=R.lastIndexOf(":"),D===-1?E+=g(R,!1,!0):(E+=g(R.substr(0,D),!1,!0),E+=R.substr(D))}if(S){if(S.length>=3&&S.charCodeAt(0)===47&&S.charCodeAt(2)===58){const D=S.charCodeAt(1);D>=65&&D<=90&&(S=`/${String.fromCharCode(D+32)}:${S.substr(3)}`)}else if(S.length>=2&&S.charCodeAt(1)===58){const D=S.charCodeAt(0);D>=65&&D<=90&&(S=`${String.fromCharCode(D+32)}:${S.substr(2)}`)}E+=g(S,!0,!1)}return O&&(E+="?",E+=g(O,!1,!1)),M&&(E+="#",E+=_?M:b(M,!1,!1)),E}i(A,"b");function k(P){try{return decodeURIComponent(P)}catch{return P.length>3?P.substr(0,3)+k(P.substr(3)):P}}i(k,"C");const G=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function H(P){return P.match(G)?P.replace(G,(_=>k(_))):P}i(H,"w");var X=r(975);const le=X.posix||X,ce="/";var Ne;(function(P){P.joinPath=function(_,...g){return _.with({path:le.join(_.path,...g)})},P.resolvePath=function(_,...g){let E=_.path,T=!1;E[0]!==ce&&(E=ce+E,T=!0);let R=le.resolve(E,...g);return T&&R[0]===ce&&!_.authority&&(R=R.substring(1)),_.with({path:R})},P.dirname=function(_){if(_.path.length===0||_.path===ce)return _;let g=le.dirname(_.path);return g.length===1&&g.charCodeAt(0)===46&&(g=""),_.with({path:g})},P.basename=function(_){return le.basename(_.path)},P.extname=function(_){return le.extname(_.path)}})(Ne||(Ne={})),jS=n})();var{URI:dt,Utils:Si}=jS,Ye;(function(e){e.basename=Si.basename,e.dirname=Si.dirname,e.extname=Si.extname,e.joinPath=Si.joinPath,e.resolvePath=Si.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 c=typeof o=="string"?dt.parse(o).path:o.path,u=typeof l=="string"?dt.parse(l).path:l.path,d=c.split("/").filter(C=>C.length>0),f=u.split("/").filter(C=>C.length>0);if(t){const C=/^[A-Z]:$/;if(d[0]&&C.test(d[0])&&(d[0]=d[0].toLowerCase()),f[0]&&C.test(f[0])&&(f[0]=f[0].toLowerCase()),d[0]!==f[0])return u.substring(1)}let h=0;for(;h<d.length&&d[h]===f[h];h++);const y="../".repeat(d.length-h),v=f.slice(h).join("/");return y+v}i(n,"relative"),e.relative=n;function a(o){return dt.parse(o.toString()).toString()}i(a,"normalize"),e.normalize=a;function s(o,l){let c=typeof o=="string"?o:o.path,u=typeof l=="string"?l:l.path;return u.charAt(u.length-1)==="/"&&(u=u.slice(0,-1)),c.charAt(c.length-1)==="/"&&(c=c.slice(0,-1)),u===c?!0:u.length<c.length||u.charAt(c.length)!=="/"?!1:u.startsWith(c)}i(s,"contains"),e.contains=s})(Ye||(Ye={}));var vh=class{static{i(this,"UriTrie")}constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return Ye.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:Ye.joinPath(dt.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:Ye.joinPath(dt.parse(t),n.name).toString(),element:n.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const t=this.getNode(Ye.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}},Y;(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"})(Y||(Y={}));var US=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??dt.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:Y.Parsed,references:[],textDocument:r};else{const s=this.createTextDocumentGetter(t,n);a={parseResult:e,uri:t,state:Y.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=Y.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=ml.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}},zS=class{static{i(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new vh,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return oe(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,Y.Changed),r}deleteDocument(e){const t=e.toString(),r=this.documentTrie.find(t);return r&&(r.state=Y.Changed,this.documentTrie.delete(t)),r}deleteDocuments(e){const t=e.toString(),r=this.documentTrie.findAll(t);for(const n of r)n.state=Y.Changed;return this.documentTrie.delete(t),r}},sn=Symbol("RefResolving"),BS=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 Mt(e.parseResult.value))await Ge(t),Ma(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 Mt(e.parseResult.value))await Ge(t),Ma(r).forEach(n=>this.doLink(n,e))}doLink(e,t){const r=e.reference;if("_ref"in r&&r._ref===void 0){r._ref=sn;try{const n=this.getCandidate(e);if(cn(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=sn;try{const n=this.getCandidates(e),a=[];if(cn(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(Le(this._ref))return this._ref;if(tf(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=sn;const o=Ia(e).$document,l=a.getLinkedNode({reference:s,container:e,property:t});if(l.error&&o&&o.state<Y.ComputedScopes)return this._ref=void 0;this._ref=l.node??l.error,this._nodeDescription=l.descr,o?.references.push(this)}else this._ref===sn&&a.throwCyclicReferenceError(e,t,n);return Le(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return cn(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=sn;const o=Ia(e).$document,l=a.getCandidates({reference:s,container:e,property:t}),c=[];if(cn(l))this._linkingError=l;else for(const u of l){const d=a.loadAstNode(u);d&&c.push({ref:d,$nodeDescription:u})}this._items=c,o?.references.push(this)}else this._items===sn&&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(cn(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=Ia(e.container).$document;r&&r.state<Y.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 Th(e){return typeof e.name=="string"}i(Th,"isNamed");var KS=class{static{i(this,"DefaultNameProvider")}getName(e){if(Th(e))return e.name}getNameNode(e){return Ml(e.$cstNode,"name")}},qS=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=Mt(e.Grammar).some(t=>Dn(t)&&t.isMulti)}findDeclarations(e){if(e){const t=Vf(e),r=e.astNode;if(t&&r){const n=r[t.feature];if(He(n)||Qt(n))return Lo(n);if(Array.isArray(n)){for(const a of n)if((He(a)||Qt(a))&&a.$refNode&&a.$refNode.offset<=e.offset&&a.$refNode.end>=e.end)return Lo(a)}}if(r){const n=this.nameProvider.getNameNode(r);if(n&&(n===e||Sf(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 Ma(r))if(Qt(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=>Ye.equals(a.sourceUri,t.documentUri))),r.push(...n),oe(r)}getSelfReferences(e){const t=this.getSelfNodes(e),r=[];for(const n of t){const a=this.nameProvider.getNameNode(n);if(a){const s=Dt(n),o=this.nodeLocator.getAstNodePath(n);r.push({sourceUri:s.uri,sourcePath:o,targetUri:s.uri,targetPath:o,segment:Ga(a),local:!0})}}return r}},br=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 os.sum(oe(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?oe(t):Oa}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 oe(this.map.entries()).flatMap(([e,t])=>t.map(r=>[e,r]))}keys(){return oe(this.map.keys())}values(){return oe(this.map.values()).flat()}entriesGroupedByKey(){return oe(this.map.entries())}},yl=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}},WS=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=Ss,n=pe.CancellationToken.None){const a=[];this.addExportedSymbol(e,a,t);for(const s of r(e))await Ge(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 br;for(const a of wr(r))await Ge(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))}}},Pd=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}},eF=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?oe(n).concat(this.outerScope.getElements(e)):oe(n)}getAllElements(){let e=oe(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},VS=class{static{i(this,"MultiMapScope")}constructor(e,t,r){this.elements=new br,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?oe(r).concat(this.outerScope.getElements(e)):oe(r)}getAllElements(){let e=oe(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},tF={getElement(){},getElements(){return Oa},getAllElements(){return Oa}},Cc=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")}},Rh=class extends Cc{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()}},Sc=class extends Cc{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}},HS=class extends Sc{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)}))}},$h=class extends Rh{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()}))}},YS=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 $h(e.shared)}getScope(e){const t=[],r=this.reflection.getReferenceType(e),n=Dt(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 Pd(oe(e),t,r)}createScopeForNodes(e,t,r){const n=oe(e).map(a=>{const s=this.nameProvider.getName(a);if(s)return this.descriptions.createDescription(a,s)}).nonNullable();return new Pd(n,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new VS(this.indexManager.allElements(e)))}};function Ah(e){return typeof e.$comment=="string"}i(Ah,"isAstNodeWithComment");function Od(e){return typeof e=="object"&&!!e&&("$ref"in e||"$error"in e)}i(Od,"isIntermediateReference");var XS=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=Dt(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(He(t)){const l=t.ref,c=r?t.$refText:void 0;if(l){const u=Dt(l);let d="";this.currentDocument&&this.currentDocument!==u&&(o?d=o(u.uri,l):d=u.uri.toString());const f=this.astNodeLocator.getAstNodePath(l);return{$ref:`${d}#${f}`,$refText:c}}else return{$error:t.error?.message??"Could not resolve reference",$refText:c}}else if(Qt(t)){const l=r?t.$refText:void 0,c=[];for(const u of t.items){const d=u.ref,f=Dt(u.ref);let h="";this.currentDocument&&this.currentDocument!==f&&(o?h=o(f.uri,d):h=f.uri.toString());const y=this.astNodeLocator.getAstNodePath(d);c.push(`${h}#${y}`)}return{$refs:c,$refText:l}}else if(Le(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 c=this.commentProvider.getComment(t);c&&(l.$comment=c.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=qf(e.$cstNode,a).map(t);s.length!==0&&(n[a]=s)}),e}}linkNode(e,t,r,n,a,s){for(const[l,c]of Object.entries(e))if(Array.isArray(c))for(let u=0;u<c.length;u++){const d=c[u];Od(d)?c[u]=this.reviveReference(e,l,t,d,r):Le(d)&&this.linkNode(d,t,r,e,l,u)}else Od(c)?e[l]=this.reviveReference(e,l,t,c,r):Le(c)&&this.linkNode(c,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 c=this.getRefNode(r,n.$ref,a.uriConverter);if(Le(c))return s||(s=this.nameProvider.getName(c)),{$refText:s??"",ref:c};o=c}else if(n.$refs){const c=[];for(const u of n.$refs){const d=this.getRefNode(r,u,a.uriConverter);Le(d)&&c.push({ref:d})}if(c.length===0)l={$refText:s??"",items:c},o??(o="Could not resolve multi-reference");else return{$refText:s??"",items:c}}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):dt.parse(t),c=this.langiumDocuments.getDocument(l);return c?c.parseResult.value:"Could not find document for URI: "+t}const a=r?r(t.substring(0,n)):dt.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)}}},JS=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=Ye.extname(e),n=Ye.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 En(e){return{code:e}}i(En,"diagnosticData");var vl;(function(e){e.defaults=["fast","slow","built-in"],e.all=e.defaults})(vl||(vl={}));var ZS=class{static{i(this,"ValidationRegistry")}constructor(e){this.entries=new br,this.knownCategories=new Set(vl.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(Jn(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=oe(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}},QS=Object.freeze({validateNode:!0,validateChildren:!0}),eb=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 Ge(r),(!t.categories||t.categories.includes("built-in"))&&(this.processLexingErrors(n,a,t),t.stopAfterLexingErrors&&a.some(s=>s.data?.code===Et.LexingError)||(this.processParsingErrors(n,a,t),t.stopAfterParsingErrors&&a.some(s=>s.data?.code===Et.ParsingError))||(this.processLinkingErrors(e,a,t),t.stopAfterLinkingErrors&&a.some(s=>s.data?.code===Et.LinkingError))))return a;try{a.push(...await this.validateAst(n.value,t,r))}catch(s){if(Jn(s))throw s;console.error("An error occurred during validation:",s)}return await Ge(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:is(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:_h(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=ls(n.token);if(a){const s={severity:is("error"),range:a,message:n.message,data:En(Et.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:Et.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 Ge(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=Mt(e).iterator();for(const o of s){a.startSubTask(o.$type);const l=this.validateSingleNodeOptions(o,t);if(l.validateNode)try{const c=this.validationRegistry.getChecks(o.$type,t.categories);for(const u of c)await u(o,r,n)}finally{a.stopSubTask(o.$type)}l.validateChildren||s.prune()}}finally{a.stop()}}else{const a=Mt(e).iterator();for(const s of a){await Ge(n);const o=this.validateSingleNodeOptions(s,t);if(o.validateNode){const l=this.validationRegistry.getChecks(s.$type,t.categories);for(const c of l)await c(s,r,n)}o.validateChildren||a.prune()}}}validateSingleNodeOptions(e,t){return QS}async validateAstAfter(e,t,r,n=pe.CancellationToken.None){const a=this.validationRegistry.checksAfter;for(const s of a)await Ge(n),await s(e,r,t.categories??[],n)}toDiagnostic(e,t,r){return{message:t,range:Eh(r),severity:is(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 Eh(e){if(e.range)return e.range;let t;return typeof e.property=="string"?t=Ml(e.node.$cstNode,e.property,e.index):typeof e.keyword=="string"&&(t=Wf(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(Eh,"getDiagnosticRange");function is(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(is,"toDiagnosticSeverity");function _h(e){switch(e){case"error":return En(Et.LexingError);case"warning":return En(Et.LexingWarning);case"info":return En(Et.LexingInfo);case"hint":return En(Et.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}i(_h,"toDiagnosticData");var Et;(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"})(Et||(Et={}));var tb=class{static{i(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){const n=r??Dt(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=Ga(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return o()},selectionSegment:Ga(e.$cstNode),type:e.$type,documentUri:n.uri,path:a}}},rb=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 Mt(n))await Ge(t),Ma(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=[];He(t)&&t.$nodeDescription?r=[t.$nodeDescription]:Qt(t)&&(r=t.items.map(l=>l.$nodeDescription).filter(l=>l!==void 0));const n=Dt(e.container).uri,a=this.nodeLocator.getAstNodePath(e.container),s=[],o=Ga(t.$refNode);for(const l of r)s.push({sourceUri:n,sourcePath:a,targetUri:l.documentUri,targetPath:l.path,segment:o,local:Ye.equals(l.documentUri,n)});return s}},nb=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)}},bc={};$l(bc,Jd(qa()));var ab=class{static{i(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new Sr,this.onConfigurationSectionUpdateEmitter=new bc.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}},Js=Jd(Dw()),Sn;(function(e){function t(r){return{dispose:i(async()=>await r(),"dispose")}}i(t,"create"),e.create=t})(Sn||(Sn={}));var ib=class{static{i(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new br,this.documentPhaseListeners=new br,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Y.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===Y.Validated){if(typeof t.validation=="boolean"&&t.validation)this.resetToState(n,Y.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=Y.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=Y.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=Y.Changed;const n=[];for(const l of t){const c=this.langiumDocuments.deleteDocuments(l);for(const u of c)n.push(u.uri),this.cleanUpDeleted(u)}const a=(await Promise.all(e.map(l=>this.findChangedUris(l)))).flat();for(const l of a){let c=this.langiumDocuments.getDocument(l);c===void 0&&(c=this.langiumDocumentFactory.fromModel({$type:"INVALID"},l),c.state=Y.Changed,this.langiumDocuments.addDocument(c)),this.resetToState(c,Y.Changed)}const s=oe(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,Y.ComputedScopes)),await this.emitUpdate(a,n),await Ge(r);const o=this.sortDocuments(this.langiumDocuments.all.filter(l=>l.state<Y.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 oe(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),Sn.create(()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case Y.Changed:case Y.Parsed:this.indexManager.removeContent(e.uri);case Y.IndexedContent:e.localSymbols=void 0;case Y.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Y.Linked:this.indexManager.removeReferences(e.uri);case Y.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Y.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Y.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,Y.Parsed,r,s=>this.langiumDocumentFactory.update(s,r)),await this.runCancelable(e,Y.IndexedContent,r,s=>this.indexManager.updateContent(s,r)),await this.runCancelable(e,Y.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,Y.Linked,r,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,r)),await this.runCancelable(n,Y.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,Y.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 Ge(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),Sn.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),Sn.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(Zt);if(this.currentState>=e&&e>n.state)return Promise.reject(new Js.ResponseError(Js.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${Y[n.state]}, requiring ${Y[e]}, but workspace state is already ${Y[this.currentState]}. Returning undefined.`))}else return Promise.reject(new Js.ResponseError(Js.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`));return new Promise((a,s)=>{const o=this.onDocumentPhase(e,c=>{Ye.equals(c.uri,t)&&(o.dispose(),l.dispose(),a(c.uri))}),l=r.onCancellationRequested(()=>{o.dispose(),l.dispose(),s(Zt)})})}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Zt):new Promise((r,n)=>{const a=this.onBuildPhase(e,()=>{a.dispose(),s.dispose(),r()}),s=t.onCancellationRequested(()=>{a.dispose(),s.dispose(),n(Zt)})})}async notifyDocumentPhase(e,t,r){const a=this.documentPhaseListeners.get(t).slice();for(const s of a)try{await Ge(r),await s(e,r)}catch(o){if(!Jn(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 Ge(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=oe(o.result.validationChecks).concat(a.categories).distinct().toArray():o.result.validationChecks=[...a.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},sb=class{static{i(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new Sc,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const r=Dt(e).uri,n=[];return this.referenceIndex.forEach(a=>{a.forEach(s=>{Ye.equals(s.targetUri,r)&&s.targetPath===t&&n.push(s)})}),oe(n)}allElements(e,t){let r=oe(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}},ob=class{static{i(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new Sr,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 Ge(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=oe(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 dt.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=Ye.basename(e.uri);return t.startsWith(".")?!1:e.isDirectory?t!=="node_modules"&&t!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},lb=class{static{i(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,n,a){return fd.buildUnexpectedCharactersMessage(e,t,r,n,a)}buildUnableToPopLexerModeMessage(e){return fd.buildUnableToPopLexerModeMessage(e)}},Ch={mode:"full"},Sh=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=Tl(t)?Object.values(t):t,n=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new Xe(r,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=Ch){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(Tl(e))return e;const t=Ic(e)?Object.values(e.modes).flat():e,r={};return t.forEach(n=>r[n.name]=n),r}};function wc(e){return Array.isArray(e)&&(e.length===0||"name"in e[0])}i(wc,"isTokenTypeArray");function Ic(e){return e&&"modes"in e&&"defaultMode"in e}i(Ic,"isIMultiModeLexerDefinition");function Tl(e){return!wc(e)&&!Ic(e)}i(Tl,"isTokenTypeDictionary");_s();function bh(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=Ih(e),o=Nc(n),l=cb({lines:s,position:a,options:o});return fb({index:0,tokens:l,position:a})}i(bh,"parseJSDoc");function wh(e,t){const r=Nc(t),n=Ih(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(wh,"isJSDoc");function Ih(e){let t="";return typeof e=="string"?t=e:t=e.text,t.split(uy)}i(Ih,"getLines");var ig=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,rF=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function cb(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],c=0;if(s&&e.options.start){const d=e.options.start?.exec(l);d&&(c=d.index+d[0].length)}else{const d=e.options.line?.exec(l);d&&(c=d.index+d[0].length)}if(o){const d=e.options.end?.exec(l);d&&(l=l.substring(0,d.index))}if(l=l.substring(0,db(l)),Rl(l,c)>=l.length){if(t.length>0){const d=ie.create(r,n);t.push({type:"break",content:"",range:ee.create(d,d)})}}else{ig.lastIndex=c;const d=ig.exec(l);if(d){const f=d[0],h=d[1],y=ie.create(r,n+c),v=ie.create(r,n+c+f.length);t.push({type:"tag",content:h,range:ee.create(y,v)}),c+=f.length,c=Rl(l,c)}if(c<l.length){const f=l.substring(c),h=Array.from(f.matchAll(rF));t.push(...ub(h,f,r,n+c))}}r++,n=0}return t.length>0&&t[t.length-1].type==="break"?t.slice(0,-1):t}i(cb,"tokenize");function ub(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:ee.create(s,o)})}else{let s=0;for(const l of e){const c=l.index,u=t.substring(s,c);u.length>0&&a.push({type:"text",content:t.substring(s,c),range:ee.create(ie.create(r,s+n),ie.create(r,c+n))});let d=u.length+1;const f=l[1];if(a.push({type:"inline-tag",content:f,range:ee.create(ie.create(r,s+d+n),ie.create(r,s+d+f.length+n))}),d+=f.length,l.length===4){d+=l[2].length;const h=l[3];a.push({type:"text",content:h,range:ee.create(ie.create(r,s+d+n),ie.create(r,s+d+h.length+n))})}else a.push({type:"text",content:"",range:ee.create(ie.create(r,s+d+n),ie.create(r,s+d+n))});s=c+l[0].length}const o=t.substring(s);o.length>0&&a.push({type:"text",content:o,range:ee.create(ie.create(r,s+n),ie.create(r,s+n+o.length))})}return a}i(ub,"buildInlineTokens");var nF=/\S/,aF=/\s*$/;function Rl(e,t){const r=e.substring(t).match(nF);return r?t+r.index:e.length}i(Rl,"skipWhitespace");function db(e){const t=e.match(aF);if(t&&typeof t.index=="number")return t.index}i(db,"lastCharacter");function fb(e){const t=ie.create(e.position.line,e.position.character);if(e.tokens.length===0)return new sg([],ee.create(t,t));const r=[];for(;e.index<e.tokens.length;){const s=pb(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 sg(r,ee.create(n,a))}i(fb,"parseJSDocComment");function pb(e,t){const r=e.tokens[e.index];if(r.type==="tag")return kh(e,!1);if(r.type==="text"||r.type==="inline-tag")return Nh(e);hb(r,t),e.index++}i(pb,"parseJSDocElement");function hb(e,t){if(t){const r=new vb("",e.range);"inlines"in t?t.inlines.push(r):t.content.inlines.push(r)}}i(hb,"appendEmptyLine");function Nh(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(mb(e)),n=t,t=e.tokens[e.index];return new Ld(a,ee.create(r.range.start,n.range.end))}i(Nh,"parseJSDocText");function mb(e){return e.tokens[e.index].type==="inline-tag"?kh(e,!0):Ph(e)}i(mb,"parseJSDocInline");function kh(e,t){const r=e.tokens[e.index++],n=r.content.substring(1);if(e.tokens[e.index]?.type==="text")if(t){const s=Ph(e);return new jc(n,new Ld([s],s.range),t,ee.create(r.range.start,s.range.end))}else{const s=Nh(e);return new jc(n,s,t,ee.create(r.range.start,s.range.end))}else{const s=r.range;return new jc(n,new Ld([],s),t,s)}}i(kh,"parseJSDocTag");function Ph(e){const t=e.tokens[e.index++];return new vb(t.content,t.range)}i(Ph,"parseJSDocLine");function Nc(e){if(!e)return Nc({start:"/**",end:"*/",line:"*"});const{start:t,end:r,line:n}=e;return{start:ko(t,!0),end:ko(r,!1),line:ko(n,!0)}}i(Nc,"normalizeOptions");function ko(e,t){if(typeof e=="string"||typeof e=="object"){const r=typeof e=="string"?Va(e):e.source;return t?new RegExp(`^\\s*${r}`):new RegExp(`\\s*${r}\\s*$`)}else return e}i(ko,"normalizeOption");var sg=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+=Dd(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+=Dd(t)+n}return t.trim()}},jc=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}
  137. ${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=gb(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}
  138. ${t}`),this.inline?`{${n}}`:n}};function gb(e,t,r){if(e==="linkplain"||e==="linkcode"||e==="link"){const n=t.indexOf(" ");let a=t;if(n>0){const o=Rl(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)??yb(t,a)}}i(gb,"renderInlineTag");function yb(e,t){try{return dt.parse(e,!0),`[${t}](${e})`}catch{return e}}i(yb,"renderLinkDefault");var Ld=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+=`
  139. `)}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+=`
  140. `)}return t}},vb=class{static{i(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};function Dd(e){return e.endsWith(`
  141. `)?`
  142. `:`
  143. `}i(Dd,"fillNewlines");var Tb=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&&wh(t))return bh(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=Dt(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)}},Rb=class{static{i(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return Ah(e)?e.$comment:Nf(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},$b=class{static{i(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},iF=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 Sr;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 Sr;return e.onCancellationRequested(()=>{const r=this.queue.indexOf(t);r>=0&&this.queue.splice(r,1),t.reject(Zt)}),this.queue.push(t),t.promise}},sF=class{static{i(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,n){this.onReadyEmitter=new bc.Emitter,this.deferred=new Sr,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(Zt),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 Sr,this.sendMessage(e),this.deferred.promise}},Ab=class{static{i(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new pe.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=_c();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 Sr,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){Jn(a)?r.resolve(void 0):r.reject(a)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},Eb=class{static{i(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new yl,this.tokenTypeIdMap=new yl,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 Mt(e))t.set(n,{});if(e.$cstNode)for(const n of Fa(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)Le(o)?s.push(this.dehydrateAstNode(o,t)):He(o)?s.push(this.dehydrateReference(o,t)):s.push(o)}else Le(a)?r[n]=this.dehydrateAstNode(a,t):He(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 _l(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),vr(e)?r.content=e.content.map(n=>this.dehydrateCstNode(n,t)):Pn(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 Mt(e))t.set(a,{});let n;if(e.$cstNode)for(const a of Fa(e.$cstNode)){let s;"fullText"in a?(s=new sh(a.fullText),n=s):"content"in a?s=new Tc:"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)Le(o)?s.push(this.setParent(this.hydrateAstNode(o,t),r)):He(o)?s.push(this.hydrateReference(o,r,n,t)):s.push(o)}else Le(a)?r[n]=this.setParent(this.hydrateAstNode(a,t),r):He(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),vr(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,c=e.hidden;return new fl(r,n,{start:{line:a,character:s},end:{line:o,character:l}},t,c)}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 Mt(this.grammar))Cl(t)&&this.grammarElementIdMap.set(t,e++)}};function yt(e){return{documentation:{CommentProvider:i(t=>new Rb(t),"CommentProvider"),DocumentationProvider:i(t=>new Tb(t),"DocumentationProvider")},parser:{AsyncParser:i(t=>new $b(t),"AsyncParser"),GrammarConfig:i(t=>ep(t),"GrammarConfig"),LangiumParser:i(t=>fh(t),"LangiumParser"),CompletionParser:i(t=>dh(t),"CompletionParser"),ValueConverter:i(()=>new hh,"ValueConverter"),TokenBuilder:i(()=>new Ac,"TokenBuilder"),Lexer:i(t=>new Sh(t),"Lexer"),ParserErrorMessageProvider:i(()=>new lh,"ParserErrorMessageProvider"),LexerErrorMessageProvider:i(()=>new lb,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:i(()=>new nb,"AstNodeLocator"),AstNodeDescriptionProvider:i(t=>new tb(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:i(t=>new rb(t),"ReferenceDescriptionProvider")},references:{Linker:i(t=>new BS(t),"Linker"),NameProvider:i(()=>new KS,"NameProvider"),ScopeProvider:i(t=>new YS(t),"ScopeProvider"),ScopeComputation:i(t=>new WS(t),"ScopeComputation"),References:i(t=>new qS(t),"References")},serializer:{Hydrator:i(t=>new Eb(t),"Hydrator"),JsonSerializer:i(t=>new XS(t),"JsonSerializer")},validation:{DocumentValidator:i(t=>new eb(t),"DocumentValidator"),ValidationRegistry:i(t=>new ZS(t),"ValidationRegistry")},shared:i(()=>e.shared,"shared")}}i(yt,"createDefaultCoreModule");function vt(e){return{ServiceRegistry:i(t=>new JS(t),"ServiceRegistry"),workspace:{LangiumDocuments:i(t=>new zS(t),"LangiumDocuments"),LangiumDocumentFactory:i(t=>new US(t),"LangiumDocumentFactory"),DocumentBuilder:i(t=>new ib(t),"DocumentBuilder"),IndexManager:i(t=>new sb(t),"IndexManager"),WorkspaceManager:i(t=>new ob(t),"WorkspaceManager"),FileSystemProvider:i(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:i(()=>new Ab,"WorkspaceLock"),ConfigurationProvider:i(t=>new ab(t),"ConfigurationProvider")},profilers:{}}}i(vt,"createDefaultSharedCoreModule");var Md;(function(e){e.merge=(t,r)=>Ka(Ka({},t),r)})(Md||(Md={}));function Ae(e,t,r,n,a,s,o,l,c){const u=[e,t,r,n,a,s,o,l,c].reduce(Ka,{});return Lh(u)}i(Ae,"inject");var _b=Symbol("isProxy");function Oh(e){if(e&&e[_b])for(const t of Object.values(e))Oh(t);return e}i(Oh,"eagerLoad");function Lh(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===_b?!0:xd(n,a,e,t||r),"get"),getOwnPropertyDescriptor:i((n,a)=>(xd(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(Lh,"_inject");var og=Symbol();function xd(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]===og)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]=og;try{e[t]=typeof a=="function"?a(n):Lh(a,n)}catch(s){throw e[t]=s instanceof Error?s:void 0,s}return e[t]}else return}i(xd,"_resolve");function Ka(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]=Ka(a,n):e[r]=Ka({},n)}else e[r]=n}return e}i(Ka,"_merge");var Fd={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},_n;(function(e){e.REGULAR="indentation-sensitive",e.IGNORE_INDENTATION="ignore-indentation"})(_n||(_n={}));var Cb=class extends Ac{static{i(this,"IndentationAwareTokenBuilder")}constructor(e=Fd){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...Fd,...e},this.indentTokenType=ka({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=ka({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){const r=super.buildTokens(e,t);if(!wc(r))throw new Error("Invalid tokens built by default builder");const{indentTokenName:n,dedentTokenName:a,whitespaceTokenName:s,ignoreIndentationDelimiters:o}=this.options;let l,c,u;const d=[];for(const f of r){for(const[h,y]of o)f.name===h?f.PUSH_MODE=_n.IGNORE_INDENTATION:f.name===y&&(f.POP_MODE=!0);f.name===a?l=f:f.name===n?c=f:f.name===s?u=f:d.push(f)}if(!l||!c||!u)throw new Error("Some indentation/whitespace tokens not found!");return o.length>0?{modes:{[_n.REGULAR]:[l,c,...d,u],[_n.IGNORE_INDENTATION]:[...d,u]},defaultMode:_n.REGULAR}:[l,c,u,...d]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return t===0||`\r
  144. `.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 js(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 c=this.indentationStack.length-l-1,u=e.substring(0,t).match(/[\r\n]+$/)?.[0].length??1;for(let d=0;d<c;d++){const f=this.createIndentationTokenInstance(this.dedentTokenType,e,"",t-(u-1));r.push(f),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?ka({name:a,pattern:this.whitespaceRegExp,group:Xe.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}},oF=class extends Sh{static{i(this,"IndentationAwareLexer")}constructor(e){if(super(e),e.parser.TokenBuilder instanceof Cb)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,t=Ch){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,c=[],u=r.tokens.length-1;for(let d=0;d<u;d++){const f=r.tokens[d],h=r.tokens[d+1];if(f.tokenTypeIdx===o&&h.tokenTypeIdx===l){d++;continue}c.push(f)}return u>=0&&c.push(r.tokens[u]),r.tokens=c,r}},Dh={};Kr(Dh,{AstUtils:()=>nf,BiMap:()=>yl,Cancellation:()=>pe,ContextCache:()=>Sc,CstUtils:()=>ef,DONE_RESULT:()=>Ve,Deferred:()=>Sr,Disposable:()=>Sn,DisposableCache:()=>Cc,DocumentCache:()=>HS,EMPTY_STREAM:()=>Oa,ErrorWithLocation:()=>Pl,GrammarUtils:()=>Lf,MultiMap:()=>br,OperationCancelled:()=>Zt,Reduction:()=>os,RegExpUtils:()=>Mf,SimpleCache:()=>Rh,StreamImpl:()=>Jt,TreeStreamImpl:()=>La,URI:()=>dt,UriTrie:()=>vh,UriUtils:()=>Ye,WorkspaceCache:()=>$h,assertCondition:()=>Df,assertUnreachable:()=>qr,delayNextTick:()=>Ec,interruptAndCheck:()=>Ge,isOperationCancelled:()=>Jn,loadGrammarFromJson:()=>Tt,setInterruptionPeriod:()=>mh,startCancelableOperation:()=>_c,stream:()=>oe});$l(Dh,bc);var Sb=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[]}},It={fileSystemProvider:i(()=>new Sb,"fileSystemProvider")},lF={Grammar:i(()=>{},"Grammar"),LanguageMetaData:i(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},cF={AstReflection:i(()=>new Cf,"AstReflection")};function bb(){const e=Ae(vt(It),cF),t=Ae(yt({shared:e}),lF);return e.ServiceRegistry.register(t),t}i(bb,"createMinimalGrammarServices");function Tt(e){const t=bb(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,dt.parse(`memory:/${r.name??"grammar"}.langium`)),r}i(Tt,"loadGrammarFromJson");$l(Dg,Dh);var uF=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 br}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 wb(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((c,u)=>c+u);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])}},wb=class{static{i(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new br,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)}},Gd;(e=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/}})(Gd||(Gd={}));var jd;(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]*/}})(jd||(jd={}));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 zd;(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]*/}})(zd||(zd={}));var Bd;(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]*/}})(Bd||(Bd={}));var Kd;(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]*/}})(Kd||(Kd={}));var qd;(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]*/}})(qd||(qd={}));var Wd;(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:/"[^"]*"|'[^']*'/}})(Wd||(Wd={}));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]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/}})(Vd||(Vd={}));var Hd;(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]*/}})(Hd||(Hd={}));({...Gd.Terminals,...jd.Terminals,...Ud.Terminals,...zd.Terminals,...Bd.Terminals,...Kd.Terminals,...qd.Terminals,...Vd.Terminals,...Wd.Terminals,...Hd.Terminals});var Zs={$type:"Accelerator",name:"name",x:"x",y:"y"},Qs={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},bi={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},Uc={$type:"Annotations",x:"x",y:"y"},pr={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};function dF(e){return Rt.isInstance(e,pr.$type)}i(dF,"isArchitecture");var eo={$type:"Axis",label:"label",name:"name"},Po={$type:"Branch",name:"name",order:"order"};function fF(e){return Rt.isInstance(e,Po.$type)}i(fF,"isBranch");var lg={$type:"Checkout",branch:"branch"},to={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},zc={$type:"ClassDefStatement",className:"className",styleText:"styleText"},ga={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};function pF(e){return Rt.isInstance(e,ga.$type)}i(pF,"isCommit");var ro={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},Xr={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},no={$type:"Curve",entries:"entries",label:"label",name:"name"},ao={$type:"Deaccelerator",name:"name",x:"x",y:"y"},cg={$type:"Decorator",strategy:"strategy"},sa={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},Wt={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},oa={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},Jr={$type:"EmFrame"},wi={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},ug={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},Bc={$type:"EmModelEntity",name:"name"};function hF(e){return e==="rmo"||e==="readmodel"||e==="ui"||e==="cmd"||e==="command"||e==="evt"||e==="event"||e==="pcr"||e==="processor"}i(hF,"isEmModelEntityType");var io={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},hr={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"};function mF(e){return Rt.isInstance(e,hr.$type)}i(mF,"isEmResetFrame");var Or={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},Kc={$type:"Entry",axis:"axis",value:"value"},ur={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},dg={$type:"Evolution",stages:"stages"},so={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},qc={$type:"Evolve",component:"component",target:"target"},on={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};function gF(e){return Rt.isInstance(e,on.$type)}i(gF,"isGitGraph");var Ii={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},Ki={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};function yF(e){return Rt.isInstance(e,Ki.$type)}i(yF,"isInfo");var Ni={$type:"Item",classSelector:"classSelector",name:"name"},Wc={$type:"Junction",id:"id",in:"in"},ki={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},oo={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},Zr={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},ya={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};function vF(e){return Rt.isInstance(e,ya.$type)}i(vF,"isMerge");var lo={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},Vc={$type:"Option",name:"name",value:"value"},va={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};function TF(e){return Rt.isInstance(e,va.$type)}i(TF,"isPacket");var Ta={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};function RF(e){return Rt.isInstance(e,Ta.$type)}i(RF,"isPacketBlock");var ln={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};function $F(e){return Rt.isInstance(e,ln.$type)}i($F,"isPie");var Oo={$type:"PieSection",label:"label",value:"value"};function AF(e){return Rt.isInstance(e,Oo.$type)}i(AF,"isPieSection");var Hc={$type:"Pipeline",components:"components",parent:"parent"},co={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},Qr={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},Yc={$type:"Section",classSelector:"classSelector",name:"name"},la={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},Xc={$type:"Size",height:"height",width:"width"},ca={$type:"Statement"},Ra={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};function EF(e){return Rt.isInstance(e,Ra.$type)}i(EF,"isTreemap");var Jc={$type:"TreemapRow",indent:"indent",item:"item"},Zc={$type:"TreeNode",indent:"indent",name:"name"},Pi={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},Ue={$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 _F(e){return Rt.isInstance(e,Ue.$type)}i(_F,"isWardley");var Ib=class extends rf{constructor(){super(...arguments),this.types={Accelerator:{name:Zs.$type,properties:{name:{name:Zs.name},x:{name:Zs.x},y:{name:Zs.y}},superTypes:[]},Anchor:{name:Qs.$type,properties:{evolution:{name:Qs.evolution},name:{name:Qs.name},visibility:{name:Qs.visibility}},superTypes:[]},Annotation:{name:bi.$type,properties:{number:{name:bi.number},text:{name:bi.text},x:{name:bi.x},y:{name:bi.y}},superTypes:[]},Annotations:{name:Uc.$type,properties:{x:{name:Uc.x},y:{name:Uc.y}},superTypes:[]},Architecture:{name:pr.$type,properties:{accDescr:{name:pr.accDescr},accTitle:{name:pr.accTitle},edges:{name:pr.edges,defaultValue:[]},groups:{name:pr.groups,defaultValue:[]},junctions:{name:pr.junctions,defaultValue:[]},services:{name:pr.services,defaultValue:[]},title:{name:pr.title}},superTypes:[]},Axis:{name:eo.$type,properties:{label:{name:eo.label},name:{name:eo.name}},superTypes:[]},Branch:{name:Po.$type,properties:{name:{name:Po.name},order:{name:Po.order}},superTypes:[ca.$type]},Checkout:{name:lg.$type,properties:{branch:{name:lg.branch}},superTypes:[ca.$type]},CherryPicking:{name:to.$type,properties:{id:{name:to.id},parent:{name:to.parent},tags:{name:to.tags,defaultValue:[]}},superTypes:[ca.$type]},ClassDefStatement:{name:zc.$type,properties:{className:{name:zc.className},styleText:{name:zc.styleText}},superTypes:[]},Commit:{name:ga.$type,properties:{id:{name:ga.id},message:{name:ga.message},tags:{name:ga.tags,defaultValue:[]},type:{name:ga.type}},superTypes:[ca.$type]},Common:{name:ro.$type,properties:{accDescr:{name:ro.accDescr},accTitle:{name:ro.accTitle},title:{name:ro.title}},superTypes:[]},Component:{name:Xr.$type,properties:{decorator:{name:Xr.decorator},evolution:{name:Xr.evolution},inertia:{name:Xr.inertia,defaultValue:!1},label:{name:Xr.label},name:{name:Xr.name},visibility:{name:Xr.visibility}},superTypes:[]},Curve:{name:no.$type,properties:{entries:{name:no.entries,defaultValue:[]},label:{name:no.label},name:{name:no.name}},superTypes:[]},Deaccelerator:{name:ao.$type,properties:{name:{name:ao.name},x:{name:ao.x},y:{name:ao.y}},superTypes:[]},Decorator:{name:cg.$type,properties:{strategy:{name:cg.strategy}},superTypes:[]},Direction:{name:sa.$type,properties:{accDescr:{name:sa.accDescr},accTitle:{name:sa.accTitle},dir:{name:sa.dir},statements:{name:sa.statements,defaultValue:[]},title:{name:sa.title}},superTypes:[on.$type]},Edge:{name:Wt.$type,properties:{lhsDir:{name:Wt.lhsDir},lhsGroup:{name:Wt.lhsGroup,defaultValue:!1},lhsId:{name:Wt.lhsId},lhsInto:{name:Wt.lhsInto,defaultValue:!1},rhsDir:{name:Wt.rhsDir},rhsGroup:{name:Wt.rhsGroup,defaultValue:!1},rhsId:{name:Wt.rhsId},rhsInto:{name:Wt.rhsInto,defaultValue:!1},title:{name:Wt.title}},superTypes:[]},EmDataEntity:{name:oa.$type,properties:{dataBlockValue:{name:oa.dataBlockValue},dataType:{name:oa.dataType},name:{name:oa.name}},superTypes:[]},EmFrame:{name:Jr.$type,properties:{},superTypes:[]},EmGwt:{name:wi.$type,properties:{givenStatements:{name:wi.givenStatements,defaultValue:[]},sourceFrame:{name:wi.sourceFrame,referenceType:Jr.$type},thenStatements:{name:wi.thenStatements,defaultValue:[]},whenStatements:{name:wi.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:ug.$type,properties:{entityIdentifier:{name:ug.entityIdentifier,referenceType:Bc.$type}},superTypes:[]},EmModelEntity:{name:Bc.$type,properties:{name:{name:Bc.name}},superTypes:[]},EmNoteEntity:{name:io.$type,properties:{dataBlockValue:{name:io.dataBlockValue},dataType:{name:io.dataType},sourceFrame:{name:io.sourceFrame,referenceType:Jr.$type}},superTypes:[]},EmResetFrame:{name:hr.$type,properties:{dataInlineValue:{name:hr.dataInlineValue},dataReference:{name:hr.dataReference,referenceType:oa.$type},dataType:{name:hr.dataType},entityIdentifier:{name:hr.entityIdentifier},modelEntityType:{name:hr.modelEntityType},name:{name:hr.name},sourceFrames:{name:hr.sourceFrames,defaultValue:[],referenceType:Jr.$type}},superTypes:[Jr.$type]},EmTimeFrame:{name:Or.$type,properties:{dataInlineValue:{name:Or.dataInlineValue},dataReference:{name:Or.dataReference,referenceType:oa.$type},dataType:{name:Or.dataType},entityIdentifier:{name:Or.entityIdentifier},modelEntityType:{name:Or.modelEntityType},name:{name:Or.name},sourceFrames:{name:Or.sourceFrames,defaultValue:[],referenceType:Jr.$type}},superTypes:[Jr.$type]},Entry:{name:Kc.$type,properties:{axis:{name:Kc.axis,referenceType:eo.$type},value:{name:Kc.value}},superTypes:[]},EventModel:{name:ur.$type,properties:{accDescr:{name:ur.accDescr},accTitle:{name:ur.accTitle},dataEntities:{name:ur.dataEntities,defaultValue:[]},frames:{name:ur.frames,defaultValue:[]},gwtEntities:{name:ur.gwtEntities,defaultValue:[]},modelEntities:{name:ur.modelEntities,defaultValue:[]},noteEntities:{name:ur.noteEntities,defaultValue:[]},title:{name:ur.title}},superTypes:[]},Evolution:{name:dg.$type,properties:{stages:{name:dg.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:so.$type,properties:{boundary:{name:so.boundary},name:{name:so.name},secondName:{name:so.secondName}},superTypes:[]},Evolve:{name:qc.$type,properties:{component:{name:qc.component},target:{name:qc.target}},superTypes:[]},GitGraph:{name:on.$type,properties:{accDescr:{name:on.accDescr},accTitle:{name:on.accTitle},statements:{name:on.statements,defaultValue:[]},title:{name:on.title}},superTypes:[]},Group:{name:Ii.$type,properties:{icon:{name:Ii.icon},id:{name:Ii.id},in:{name:Ii.in},title:{name:Ii.title}},superTypes:[]},Info:{name:Ki.$type,properties:{accDescr:{name:Ki.accDescr},accTitle:{name:Ki.accTitle},title:{name:Ki.title}},superTypes:[]},Item:{name:Ni.$type,properties:{classSelector:{name:Ni.classSelector},name:{name:Ni.name}},superTypes:[]},Junction:{name:Wc.$type,properties:{id:{name:Wc.id},in:{name:Wc.in}},superTypes:[]},Label:{name:ki.$type,properties:{negX:{name:ki.negX,defaultValue:!1},negY:{name:ki.negY,defaultValue:!1},offsetX:{name:ki.offsetX},offsetY:{name:ki.offsetY}},superTypes:[]},Leaf:{name:oo.$type,properties:{classSelector:{name:oo.classSelector},name:{name:oo.name},value:{name:oo.value}},superTypes:[Ni.$type]},Link:{name:Zr.$type,properties:{arrow:{name:Zr.arrow},from:{name:Zr.from},fromPort:{name:Zr.fromPort},linkLabel:{name:Zr.linkLabel},to:{name:Zr.to},toPort:{name:Zr.toPort}},superTypes:[]},Merge:{name:ya.$type,properties:{branch:{name:ya.branch},id:{name:ya.id},tags:{name:ya.tags,defaultValue:[]},type:{name:ya.type}},superTypes:[ca.$type]},Note:{name:lo.$type,properties:{evolution:{name:lo.evolution},text:{name:lo.text},visibility:{name:lo.visibility}},superTypes:[]},Option:{name:Vc.$type,properties:{name:{name:Vc.name},value:{name:Vc.value,defaultValue:!1}},superTypes:[]},Packet:{name:va.$type,properties:{accDescr:{name:va.accDescr},accTitle:{name:va.accTitle},blocks:{name:va.blocks,defaultValue:[]},title:{name:va.title}},superTypes:[]},PacketBlock:{name:Ta.$type,properties:{bits:{name:Ta.bits},end:{name:Ta.end},label:{name:Ta.label},start:{name:Ta.start}},superTypes:[]},Pie:{name:ln.$type,properties:{accDescr:{name:ln.accDescr},accTitle:{name:ln.accTitle},sections:{name:ln.sections,defaultValue:[]},showData:{name:ln.showData,defaultValue:!1},title:{name:ln.title}},superTypes:[]},PieSection:{name:Oo.$type,properties:{label:{name:Oo.label},value:{name:Oo.value}},superTypes:[]},Pipeline:{name:Hc.$type,properties:{components:{name:Hc.components,defaultValue:[]},parent:{name:Hc.parent}},superTypes:[]},PipelineComponent:{name:co.$type,properties:{evolution:{name:co.evolution},label:{name:co.label},name:{name:co.name}},superTypes:[]},Radar:{name:Qr.$type,properties:{accDescr:{name:Qr.accDescr},accTitle:{name:Qr.accTitle},axes:{name:Qr.axes,defaultValue:[]},curves:{name:Qr.curves,defaultValue:[]},options:{name:Qr.options,defaultValue:[]},title:{name:Qr.title}},superTypes:[]},Section:{name:Yc.$type,properties:{classSelector:{name:Yc.classSelector},name:{name:Yc.name}},superTypes:[Ni.$type]},Service:{name:la.$type,properties:{icon:{name:la.icon},iconText:{name:la.iconText},id:{name:la.id},in:{name:la.in},title:{name:la.title}},superTypes:[]},Size:{name:Xc.$type,properties:{height:{name:Xc.height},width:{name:Xc.width}},superTypes:[]},Statement:{name:ca.$type,properties:{},superTypes:[]},TreeNode:{name:Zc.$type,properties:{indent:{name:Zc.indent},name:{name:Zc.name}},superTypes:[]},TreeView:{name:Pi.$type,properties:{accDescr:{name:Pi.accDescr},accTitle:{name:Pi.accTitle},nodes:{name:Pi.nodes,defaultValue:[]},title:{name:Pi.title}},superTypes:[]},Treemap:{name:Ra.$type,properties:{accDescr:{name:Ra.accDescr},accTitle:{name:Ra.accTitle},title:{name:Ra.title},TreemapRows:{name:Ra.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:Jc.$type,properties:{indent:{name:Jc.indent},item:{name:Jc.item}},superTypes:[]},Wardley:{name:Ue.$type,properties:{accDescr:{name:Ue.accDescr},accelerators:{name:Ue.accelerators,defaultValue:[]},accTitle:{name:Ue.accTitle},anchors:{name:Ue.anchors,defaultValue:[]},annotation:{name:Ue.annotation,defaultValue:[]},annotations:{name:Ue.annotations,defaultValue:[]},components:{name:Ue.components,defaultValue:[]},deaccelerators:{name:Ue.deaccelerators,defaultValue:[]},evolution:{name:Ue.evolution},evolves:{name:Ue.evolves,defaultValue:[]},links:{name:Ue.links,defaultValue:[]},notes:{name:Ue.notes,defaultValue:[]},pipelines:{name:Ue.pipelines,defaultValue:[]},size:{name:Ue.size},title:{name:Ue.title}},superTypes:[]}}}static{i(this,"MermaidAstReflection")}},Rt=new Ib,fg,CF=i(()=>fg??(fg=Tt(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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":[]}}]},"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@9"},"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@9"},"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@11"},"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@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"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@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"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@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"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@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"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@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"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@23"},"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@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"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@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"ArchitectureGrammarGrammar"),pg,SF=i(()=>pg??(pg=Tt('{"$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"),hg,bF=i(()=>hg??(hg=Tt(`{"$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"),mg,wF=i(()=>mg??(mg=Tt(`{"$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"),gg,IF=i(()=>gg??(gg=Tt(`{"$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"),yg,NF=i(()=>yg??(yg=Tt(`{"$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"),vg,kF=i(()=>vg??(vg=Tt(`{"$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"),Tg,PF=i(()=>Tg??(Tg=Tt(`{"$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"),Rg,OF=i(()=>Rg??(Rg=Tt(`{"$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@9"},"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":"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":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@9"}}},"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 * Converted from treemap 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 * treeView declaration.\\n */"}`)),"TreeViewGrammarGrammar"),$g,LF=i(()=>$g??($g=Tt(`{"$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"),DF={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},MF={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},xF={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},FF={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},GF={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},jF={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},UF={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},zF={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},BF={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},KF={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},sr={AstReflection:i(()=>new Ib,"AstReflection")},qF={Grammar:i(()=>CF(),"Grammar"),LanguageMetaData:i(()=>DF,"LanguageMetaData"),parser:{}},WF={Grammar:i(()=>SF(),"Grammar"),LanguageMetaData:i(()=>MF,"LanguageMetaData"),parser:{}},VF={Grammar:i(()=>bF(),"Grammar"),LanguageMetaData:i(()=>xF,"LanguageMetaData"),parser:{}},HF={Grammar:i(()=>wF(),"Grammar"),LanguageMetaData:i(()=>FF,"LanguageMetaData"),parser:{}},YF={Grammar:i(()=>IF(),"Grammar"),LanguageMetaData:i(()=>GF,"LanguageMetaData"),parser:{}},XF={Grammar:i(()=>NF(),"Grammar"),LanguageMetaData:i(()=>jF,"LanguageMetaData"),parser:{}},JF={Grammar:i(()=>kF(),"Grammar"),LanguageMetaData:i(()=>UF,"LanguageMetaData"),parser:{}},ZF={Grammar:i(()=>PF(),"Grammar"),LanguageMetaData:i(()=>zF,"LanguageMetaData"),parser:{}},QF={Grammar:i(()=>OF(),"Grammar"),LanguageMetaData:i(()=>BF,"LanguageMetaData"),parser:{}},eG={Grammar:i(()=>LF(),"Grammar"),LanguageMetaData:i(()=>KF,"LanguageMetaData"),parser:{}},tG=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,rG=/accTitle[\t ]*:([^\n\r]*)/,nG=/title([\t ][^\n\r]*|)/,aG={ACC_DESCR:tG,ACC_TITLE:rG,TITLE:nG},ti=class extends hh{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=aG[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,`
  145. `)}}},Ks=class extends ti{static{i(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},or=class extends Ac{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 or{static{i(this,"CommonTokenBuilder")}});/*! Bundled license information:
  146. lodash-es/lodash.js:
  147. (**
  148. * @license
  149. * Lodash (Custom Build) <https://lodash.com/>
  150. * Build: `lodash modularize exports="es" -o ./`
  151. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  152. * Released under MIT license <https://lodash.com/license>
  153. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  154. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  155. *)
  156. */var iG=class extends or{static{i(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},Nb={parser:{TokenBuilder:i(()=>new iG,"TokenBuilder"),ValueConverter:i(()=>new Ks,"ValueConverter")}};function kb(e=It){const t=Ae(vt(e),sr),r=Ae(yt({shared:t}),JF,Nb);return t.ServiceRegistry.register(r),{shared:t,Radar:r}}i(kb,"createRadarServices");var sG=class extends or{static{i(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},oG=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,lG=class extends ti{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=oG.exec(t);if(n)return{$type:"ClassDefStatement",className:n[1],styleText:n[2]||void 0}}}};function Pb(e){const t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){const n={Treemap:t.checkSingleRoot.bind(t)};r.register(n,t)}}i(Pb,"registerValidationChecks");var cG=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"}))}},Ob={parser:{TokenBuilder:i(()=>new sG,"TokenBuilder"),ValueConverter:i(()=>new lG,"ValueConverter")},validation:{TreemapValidator:i(()=>new cG,"TreemapValidator")}};function Lb(e=It){const t=Ae(vt(e),sr),r=Ae(yt({shared:t}),ZF,Ob);return t.ServiceRegistry.register(r),Pb(r),{shared:t,Treemap:r}}i(Lb,"createTreemapServices");var uG=class extends ti{static{i(this,"WardleyValueConverter")}runCustomConverter(e,t,r){switch(e.name.toUpperCase()){case"LINK_LABEL":return t.substring(1).trim();default:return}}},Db={parser:{ValueConverter:i(()=>new uG,"ValueConverter")}};function Mb(e=It){const t=Ae(vt(e),sr),r=Ae(yt({shared:t}),eG,Db);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}i(Mb,"createWardleyServices");var dG=class extends or{static{i(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},xb={parser:{TokenBuilder:i(()=>new dG,"TokenBuilder"),ValueConverter:i(()=>new Ks,"ValueConverter")}};function Fb(e=It){const t=Ae(vt(e),sr),r=Ae(yt({shared:t}),VF,xb);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}i(Fb,"createGitGraphServices");var fG=class extends or{static{i(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},Gb={parser:{TokenBuilder:i(()=>new fG,"TokenBuilder"),ValueConverter:i(()=>new Ks,"ValueConverter")}};function jb(e=It){const t=Ae(vt(e),sr),r=Ae(yt({shared:t}),HF,Gb);return t.ServiceRegistry.register(r),{shared:t,Info:r}}i(jb,"createInfoServices");var pG=class extends or{static{i(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},Ub={parser:{TokenBuilder:i(()=>new pG,"TokenBuilder"),ValueConverter:i(()=>new Ks,"ValueConverter")}};function zb(e=It){const t=Ae(vt(e),sr),r=Ae(yt({shared:t}),YF,Ub);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}i(zb,"createPacketServices");var hG=class extends or{static{i(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},mG=class extends ti{static{i(this,"PieValueConverter")}runCustomConverter(e,t,r){if(e.name==="PIE_SECTION_LABEL")return t.replace(/"/g,"").trim()}},Bb={parser:{TokenBuilder:i(()=>new hG,"TokenBuilder"),ValueConverter:i(()=>new mG,"ValueConverter")}};function Kb(e=It){const t=Ae(vt(e),sr),r=Ae(yt({shared:t}),XF,Bb);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}i(Kb,"createPieServices");var gG=class extends ti{static{i(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){if(e.name==="INDENTATION")return t?.length||0;if(e.name==="STRING2")return t.substring(1,t.length-1)}},yG=class extends or{static{i(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},qb={parser:{TokenBuilder:i(()=>new yG,"TokenBuilder"),ValueConverter:i(()=>new gG,"ValueConverter")}};function Wb(e=It){const t=Ae(vt(e),sr),r=Ae(yt({shared:t}),QF,qb);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}i(Wb,"createTreeViewServices");var vG=class extends or{static{i(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},TG=class extends ti{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()}}},Vb={parser:{TokenBuilder:i(()=>new vG,"TokenBuilder"),ValueConverter:i(()=>new TG,"ValueConverter")}};function Hb(e=It){const t=Ae(vt(e),sr),r=Ae(yt({shared:t}),qF,Vb);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}i(Hb,"createArchitectureServices");var RG=class extends or{static{i(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},Ag=new Set(["cmd","command"]),Eg=new Set(["evt","event"]),Qc=new Set(["rmo","readmodel"]),_g=new Set(["pcr","processor"]),Cg=new Set(["ui"]);function Yb(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(Yb,"registerValidationChecks");var $G=class{static{i(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(Ag.has(e.modelEntityType)?this.validateSources(e,new Set([...Cg,..._g]),"command","ui or processor",t):Eg.has(e.modelEntityType)?this.validateSources(e,Ag,"event","command",t):Qc.has(e.modelEntityType)?this.validateSources(e,Eg,"read model","event",t):_g.has(e.modelEntityType)?this.validateSources(e,Qc,"processor","read model",t):Cg.has(e.modelEntityType)&&this.validateSources(e,Qc,"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"})}}},Xb={parser:{TokenBuilder:i(()=>new RG,"TokenBuilder"),ValueConverter:i(()=>new Ks,"ValueConverter")},validation:{EventModelingValidator:i(()=>new $G,"EventModelingValidator")}};function Jb(e=It){const t=Ae(vt(e),sr),r=Ae(yt({shared:t}),WF,Xb);return t.ServiceRegistry.register(r),Yb(r),{shared:t,EventModel:r}}i(Jb,"createEventModelingServices");var At={},AG={info:i(async()=>{const{createInfoServices:e}=await qt(async()=>{const{createInfoServices:r}=await Promise.resolve().then(()=>CG);return{createInfoServices:r}},void 0,import.meta.url),t=e().Info.parser.LangiumParser;At.info=t},"info"),packet:i(async()=>{const{createPacketServices:e}=await qt(async()=>{const{createPacketServices:r}=await Promise.resolve().then(()=>SG);return{createPacketServices:r}},void 0,import.meta.url),t=e().Packet.parser.LangiumParser;At.packet=t},"packet"),pie:i(async()=>{const{createPieServices:e}=await qt(async()=>{const{createPieServices:r}=await Promise.resolve().then(()=>bG);return{createPieServices:r}},void 0,import.meta.url),t=e().Pie.parser.LangiumParser;At.pie=t},"pie"),treeView:i(async()=>{const{createTreeViewServices:e}=await qt(async()=>{const{createTreeViewServices:r}=await Promise.resolve().then(()=>wG);return{createTreeViewServices:r}},void 0,import.meta.url),t=e().TreeView.parser.LangiumParser;At.treeView=t},"treeView"),architecture:i(async()=>{const{createArchitectureServices:e}=await qt(async()=>{const{createArchitectureServices:r}=await Promise.resolve().then(()=>IG);return{createArchitectureServices:r}},void 0,import.meta.url),t=e().Architecture.parser.LangiumParser;At.architecture=t},"architecture"),gitGraph:i(async()=>{const{createGitGraphServices:e}=await qt(async()=>{const{createGitGraphServices:r}=await Promise.resolve().then(()=>NG);return{createGitGraphServices:r}},void 0,import.meta.url),t=e().GitGraph.parser.LangiumParser;At.gitGraph=t},"gitGraph"),eventmodeling:i(async()=>{const{createEventModelingServices:e}=await qt(async()=>{const{createEventModelingServices:r}=await Promise.resolve().then(()=>kG);return{createEventModelingServices:r}},void 0,import.meta.url),t=e().EventModel.parser.LangiumParser;At.eventmodeling=t},"eventmodeling"),radar:i(async()=>{const{createRadarServices:e}=await qt(async()=>{const{createRadarServices:r}=await Promise.resolve().then(()=>PG);return{createRadarServices:r}},void 0,import.meta.url),t=e().Radar.parser.LangiumParser;At.radar=t},"radar"),treemap:i(async()=>{const{createTreemapServices:e}=await qt(async()=>{const{createTreemapServices:r}=await Promise.resolve().then(()=>OG);return{createTreemapServices:r}},void 0,import.meta.url),t=e().Treemap.parser.LangiumParser;At.treemap=t},"treemap"),wardley:i(async()=>{const{createWardleyServices:e}=await qt(async()=>{const{createWardleyServices:r}=await Promise.resolve().then(()=>LG);return{createWardleyServices:r}},void 0,import.meta.url),t=e().Wardley.parser.LangiumParser;At.wardley=t},"wardley")};async function EG(e,t){const r=AG[e];if(!r)throw new Error(`Unknown diagram type: ${e}`);At[e]||await r();const a=At[e].parse(t);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new _G(a);return a.value}i(EG,"parse");var _G=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(`
  157. `),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(`
  158. `);super(`Parsing failed: ${t} ${r}`),this.result=e}static{i(this,"MermaidParseError")}};const CG=Object.freeze(Object.defineProperty({__proto__:null,InfoModule:Gb,createInfoServices:jb},Symbol.toStringTag,{value:"Module"})),SG=Object.freeze(Object.defineProperty({__proto__:null,PacketModule:Ub,createPacketServices:zb},Symbol.toStringTag,{value:"Module"})),bG=Object.freeze(Object.defineProperty({__proto__:null,PieModule:Bb,createPieServices:Kb},Symbol.toStringTag,{value:"Module"})),wG=Object.freeze(Object.defineProperty({__proto__:null,TreeViewModule:qb,createTreeViewServices:Wb},Symbol.toStringTag,{value:"Module"})),IG=Object.freeze(Object.defineProperty({__proto__:null,ArchitectureModule:Vb,createArchitectureServices:Hb},Symbol.toStringTag,{value:"Module"})),NG=Object.freeze(Object.defineProperty({__proto__:null,GitGraphModule:xb,createGitGraphServices:Fb},Symbol.toStringTag,{value:"Module"})),kG=Object.freeze(Object.defineProperty({__proto__:null,EventModelingModule:Xb,createEventModelingServices:Jb},Symbol.toStringTag,{value:"Module"})),PG=Object.freeze(Object.defineProperty({__proto__:null,RadarModule:Nb,createRadarServices:kb},Symbol.toStringTag,{value:"Module"})),OG=Object.freeze(Object.defineProperty({__proto__:null,TreemapModule:Ob,createTreemapServices:Lb},Symbol.toStringTag,{value:"Module"})),LG=Object.freeze(Object.defineProperty({__proto__:null,WardleyModule:Db,createWardleyServices:Mb},Symbol.toStringTag,{value:"Module"}));export{mF as i,EG as p};