@redocly/openapi-language-server 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -1
- package/lib/index.js +55 -55
- package/package.json +18 -23
package/lib/index.js
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Td=Object.create;var Ur=Object.defineProperty;var wd=Object.getOwnPropertyDescriptor;var xd=Object.getOwnPropertyNames;var Sd=Object.getPrototypeOf,kd=Object.prototype.hasOwnProperty;var Za=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var Ad=(e,t)=>()=>(e&&(t=e(e=0)),t);var N=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ec=(e,t)=>{for(var n in t)Ur(e,n,{get:t[n],enumerable:!0})},Hr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of xd(t))!kd.call(e,i)&&i!==n&&Ur(e,i,{get:()=>t[i],enumerable:!(r=wd(t,i))||r.enumerable});return e},vo=(e,t,n)=>(Hr(e,t,"default"),n&&Hr(n,t,"default")),rt=(e,t,n)=>(n=e!=null?Td(Sd(e)):{},Hr(t||!e||!e.__esModule?Ur(n,"default",{value:e,enumerable:!0}):n,e)),Nd=e=>Hr(Ur({},"__esModule",{value:!0}),e);var Ft=N(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.isYAMLNode=Te.isNodesEqual=Te.newMap=Te.newSeq=Te.newItems=Te.newScalar=Te.newAnchorRef=Te.newMapping=Te.Kind=void 0;var Tt;(function(e){e[e.SCALAR=0]="SCALAR",e[e.MAPPING=1]="MAPPING",e[e.MAP=2]="MAP",e[e.SEQ=3]="SEQ",e[e.ANCHOR_REF=4]="ANCHOR_REF",e[e.INCLUDE_REF=5]="INCLUDE_REF"})(Tt=Te.Kind||(Te.Kind={}));function qd(e,t,n=2){var r=t?t.endPosition:e.endPosition+1,i={key:e,value:t,nodeIndent:n,startPosition:e.startPosition,endPosition:r,kind:Tt.MAPPING,parent:null,errors:[]};return i}Te.newMapping=qd;function Ed(e,t,n,r,i=2){return{errors:[],referencesAnchor:e,value:r,nodeIndent:i,startPosition:t,endPosition:n,kind:Tt.ANCHOR_REF,parent:null}}Te.newAnchorRef=Ed;function Od(e="",t=2){let n={errors:[],startPosition:-1,endPosition:-1,value:""+e,nodeIndent:t,kind:Tt.SCALAR,parent:null,doubleQuoted:!1,rawValue:""+e};return typeof e!="string"&&(n.valueObject=e),n}Te.newScalar=Od;function ac(){return{errors:[],startPosition:-1,endPosition:-1,nodeIndent:2,items:[],kind:Tt.SEQ,parent:null}}Te.newItems=ac;function Md(){return ac()}Te.newSeq=Md;function Fd(e,t=2){return{errors:[],startPosition:-1,endPosition:-1,nodeIndent:t,mappings:e||[],kind:Tt.MAP,parent:null}}Te.newMap=Fd;function tr(e,t){if(!e||!t||e.kind!==t.kind)return!1;if(e.kind===Tt.SCALAR)return e.value===t.value;if(e.kind===Tt.SEQ){let n=e,r=t;if(n.items.length!==r.items.length)return!1;for(let i=0;i<n.items.length;i++){let o=n.items[i],s=r.items[i];if(!tr(o,s))return!1}return!0}if(e.kind===Tt.MAP){let n=e,r=t;if(n.mappings.length!==r.mappings.length)return!1;for(let i of n.mappings){let o=i.key,s=i.value,u=r.mappings.find(c=>tr(o,c.key));if(u){if(!tr(s,u.value))return!1}else return!1}return!0}if(Tt.MAPPING===e.kind){let n=e,r=t;return tr(n.key,r.key)}return!1}Te.isNodesEqual=tr;function Ld(e){return e.startPosition!==void 0&&e.endPosition!==void 0&&e.kind!==void 0}Te.isYAMLNode=Ld});var cn=N(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.isNegativeZero=Ge.repeat=Ge.extend=Ge.toArray=Ge.isObject=Ge.isNothing=void 0;function cc(e){return typeof e>"u"||e===null}Ge.isNothing=cc;function Id(e){return typeof e=="object"&&e!==null}Ge.isObject=Id;function jd(e){return Array.isArray(e)?e:cc(e)?[]:[e]}Ge.toArray=jd;function Wd(e,t){var n,r,i,o;if(t)for(o=Object.keys(t),n=0,r=o.length;n<r;n+=1)i=o[n],e[i]=t[i];return e}Ge.extend=Wd;function Hd(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}Ge.repeat=Hd;function Ud(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}Ge.isNegativeZero=Ud});var Sn=N((E0,uc)=>{"use strict";var un=class{constructor(t,n=null,r=!1){this.name="YAMLException",this.reason=t,this.mark=n,this.message=this.toString(!1),this.isWarning=r}static isInstance(t){if(t!=null&&t.getClassIdentifier&&typeof t.getClassIdentifier=="function"){for(let n of t.getClassIdentifier())if(n==un.CLASS_IDENTIFIER)return!0}return!1}getClassIdentifier(){var t=[];return t.concat(un.CLASS_IDENTIFIER)}toString(t=!1){var n;return n="JS-YAML: "+(this.reason||"(unknown reason)"),!t&&this.mark&&(n+=" "+this.mark.toString()),n}};un.CLASS_IDENTIFIER="yaml-ast-parser.YAMLException";uc.exports=un});var dc=N((O0,fc)=>{"use strict";var lc=cn(),Ro=class{constructor(t,n,r,i,o){this.name=t,this.buffer=n,this.position=r,this.line=i,this.column=o}getSnippet(t=0,n=75){var r,i,o,s,u;if(!this.buffer)return null;for(t=t||4,n=n||75,r="",i=this.position;i>0&&`\0\r
|
|
2
2
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>n/2-1){r=" ... ",i+=5;break}for(o="",s=this.position;s<this.buffer.length&&`\0\r
|
|
3
|
-
\x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>n/2-1){o=" ... ",s-=5;break}return
|
|
4
|
-
`+
|
|
5
|
-
`+n)),r}};
|
|
6
|
-
\r`;function
|
|
7
|
-
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function
|
|
8
|
-
`){e.position--,e.position==i&&(e.position+=1);return}if(o=="\r"){e.position--,e.position==i&&(e.position+=1);return}e.position++}}}function
|
|
9
|
-
`,n-1))}function
|
|
10
|
-
`,
|
|
11
|
-
`);break}for(r?
|
|
12
|
-
`,
|
|
13
|
-
`,
|
|
14
|
-
`,
|
|
15
|
-
`,
|
|
16
|
-
`){P&&C--;break}if(
|
|
17
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new
|
|
18
|
-
`)break}}let s=r.documents,
|
|
19
|
-
`,r),i===-1?(s=e.slice(r),r=
|
|
20
|
-
`&&(o+=n),o+=s;return o}function
|
|
21
|
-
`+
|
|
22
|
-
`+
|
|
23
|
-
`+
|
|
3
|
+
\x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>n/2-1){o=" ... ",s-=5;break}return u=this.buffer.slice(i,s),lc.repeat(" ",t)+r+u+o+`
|
|
4
|
+
`+lc.repeat(" ",t+this.position-i+r.length)+"^"}toString(t=!0){var n,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),t||(n=this.getSnippet(),n&&(r+=`:
|
|
5
|
+
`+n)),r}};fc.exports=Ro});var Le=N(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.Type=void 0;var pc=Sn(),Bd=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],$d=["scalar","sequence","mapping"];function zd(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}var Do=class{constructor(t,n){if(n=n||{},Object.keys(n).forEach(function(r){if(Bd.indexOf(r)===-1)throw new pc('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(r){return r},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.defaultStyle=n.defaultStyle||null,this.styleAliases=zd(n.styleAliases||null),$d.indexOf(this.kind)===-1)throw new pc('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}};Br.Type=Do});var kn=N(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.Schema=void 0;var hc=cn(),$r=Sn(),Yd=Le();function Co(e,t,n){var r=[];return e.include.forEach(function(i){n=Co(i,t,n)}),e[t].forEach(function(i){n.forEach(function(o,s){o.tag===i.tag&&r.push(s)}),n.push(i)}),n.filter(function(i,o){return r.indexOf(o)===-1})}function Vd(){var e={},t,n;function r(i){e[i.tag]=i}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}var Yt=class{constructor(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(n){if(n.loadKind&&n.loadKind!=="scalar")throw new $r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=Co(this,"implicit",[]),this.compiledExplicit=Co(this,"explicit",[]),this.compiledTypeMap=Vd(this.compiledImplicit,this.compiledExplicit)}};zr.Schema=Yt;Yt.DEFAULT=null;Yt.create=function(...t){var n,r;switch(t.length){case 1:n=Yt.DEFAULT,r=t[0];break;case 2:n=t[0],r=t[1];break;default:throw new $r("Wrong number of arguments for Schema.create function")}if(n=hc.toArray(n),r=hc.toArray(r),!n.every(function(i){return i instanceof Yt}))throw new $r("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(i){return i instanceof Yd.Type}))throw new $r("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Yt({include:n,explicit:r})}});var gc=N((L0,mc)=>{"use strict";var Kd=Le();mc.exports=new Kd.Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var vc=N((I0,yc)=>{"use strict";var Qd=Le();yc.exports=new Qd.Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var _c=N((j0,bc)=>{"use strict";var Jd=Le();bc.exports=new Jd.Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Dc=N((W0,Rc)=>{"use strict";var Gd=kn();Rc.exports=new Gd.Schema({explicit:[gc(),vc(),_c()]})});var Tc=N((H0,Pc)=>{"use strict";var Xd=Le(),Cc=Ft();function Zd(e){let t=Cc.isYAMLNode(e)?e.value:e;if(t===null)return!0;var n=t.length;return n===1&&t==="~"||n===4&&(t==="null"||t==="Null"||t==="NULL")}function ep(e){return Cc.isYAMLNode(e)?e:null}function tp(e){return e===null}Pc.exports=new Xd.Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:Zd,construct:ep,predicate:tp,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var Sc=N((U0,xc)=>{"use strict";"use strict";var np=Le(),wc=Ft();function rp(e){let t=wc.isYAMLNode(e)?e.value:e;if(t===null)return!1;var n=t.length;return n===4&&(t==="true"||t==="True"||t==="TRUE")||n===5&&(t==="false"||t==="False"||t==="FALSE")}function ip(e){return wc.isYAMLNode(e)?e:e==="true"||e==="True"||e==="TRUE"}function op(e){return Object.prototype.toString.call(e)==="[object Boolean]"}xc.exports=new np.Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:rp,construct:ip,predicate:op,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var Nc=N((B0,Ac)=>{"use strict";var sp=cn(),ap=Le(),kc=Ft();function cp(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function up(e){return 48<=e&&e<=55}function lp(e){return 48<=e&&e<=57}function fp(e){let t=kc.isYAMLNode(e)?e.value:e;if(t===null)return!1;var n=t.length,r=0,i=!1,o;if(!n)return!1;if(o=t[r],(o==="-"||o==="+")&&(o=t[++r]),o==="0"){if(r+1===n)return!0;if(o=t[++r],o==="b"){for(r++;r<n;r++)if(o=t[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;i=!0}return i}if(o==="x"){for(r++;r<n;r++)if(o=t[r],o!=="_"){if(!cp(t.charCodeAt(r)))return!1;i=!0}return i}for(;r<n;r++)if(o=t[r],o!=="_"){if(!up(t.charCodeAt(r)))return!1;i=!0}return i}for(;r<n;r++)if(o=t[r],o!=="_"){if(o===":")break;if(!lp(t.charCodeAt(r)))return!1;i=!0}return i?o!==":"?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(r)):!1}function dp(e){if(kc.isYAMLNode(e))return e;var t=e,n=1,r,i,o=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0"?0:r==="0"?t[1]==="b"?n*parseInt(t.slice(2),2):t[1]==="x"?n*parseInt(t,16):n*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(s){o.unshift(parseInt(s,10))}),t=0,i=1,o.forEach(function(s){t+=s*i,i*=60}),n*t):n*parseInt(t,10)}function pp(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!sp.isNegativeZero(e)}Ac.exports=new ap.Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:fp,construct:dp,predicate:pp,represent:{binary:function(e){return"0b"+e.toString(2)},octal:function(e){return"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var Mc=N(($0,Oc)=>{"use strict";var qc=cn(),hp=Le(),Ec=Ft(),mp=new RegExp("-?(0|[1-9][0-9]*)(.[0-9]*)?([eE][-+]?[0-9]+)?|^0$|^[-+]?.(inf|Inf|INF)$|^.(nan|NaN|NAN)$");function gp(e){let t=Ec.isYAMLNode(e)?e.value:e;return!(t===null||!mp.test(t))}function yp(e){if(Ec.isYAMLNode(e))return e;var t,n,r,i;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,i=[],0<="+-".indexOf(t[0])&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:0<=t.indexOf(":")?(t.split(":").forEach(function(o){i.unshift(parseFloat(o,10))}),t=0,r=1,i.forEach(function(o){t+=o*r,r*=60}),n*t):n*parseFloat(t,10)}function vp(e,t){if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(qc.isNegativeZero(e))return"-0.0";return e.toString(10)}function bp(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||qc.isNegativeZero(e))}Oc.exports=new hp.Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:gp,construct:yp,predicate:bp,represent:vp,defaultStyle:"lowercase"})});var Lc=N((z0,Fc)=>{"use strict";var _p=kn();Fc.exports=new _p.Schema({include:[Dc()],implicit:[Tc(),Sc(),Nc(),Mc()]})});var jc=N((Y0,Ic)=>{"use strict";var Rp=kn();Ic.exports=new Rp.Schema({include:[Lc()]})});var Uc=N((V0,Hc)=>{"use strict";var Dp=Le(),Wc=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");function Cp(e){if(e===null)return!1;var t,n,r,i,o,s,u,c=0,p=null,m,v,C;return t=Wc.exec(e),t!==null}function Pp(e){var t,n,r,i,o,s,u,c=0,p=null,m,v,C;if(t=Wc.exec(e),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],s=+t[5],u=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c=c+"0";c=+c}return t[9]&&(m=+t[10],v=+(t[11]||0),p=(m*60+v)*6e4,t[9]==="-"&&(p=-p)),C=new Date(Date.UTC(n,r,i,o,s,u,c)),p&&C.setTime(C.getTime()-p),C}function Tp(e){return e.toISOString()}Hc.exports=new Dp.Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Cp,construct:Pp,instanceOf:Date,represent:Tp})});var $c=N((K0,Bc)=>{"use strict";var wp=Le();function xp(e){return e==="<<"||e===null}Bc.exports=new wp.Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:xp})});var zc={};ec(zc,{default:()=>Sp});var Sp,Yc=Ad(()=>{Sp={}});var Kc=N((Q0,Vc)=>{"use strict";var Yr=(Yc(),Nd(zc)).Buffer,kp=Le(),Po=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
6
|
+
\r`;function Ap(e){if(e===null)return!1;var t,n,r=0,i=0,o=e.length,s=Po;for(n=0;n<o;n++)if(t=s.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function Np(e){var t,n,r,i=e.replace(/[\r\n=]/g,""),o=i.length,s=Po,u=0,c=[];for(n=0;n<o;n++)n%4===0&&n&&(c.push(u>>16&255),c.push(u>>8&255),c.push(u&255)),u=u<<6|s.indexOf(i.charAt(n));return r=o%4*6,r===0?(c.push(u>>16&255),c.push(u>>8&255),c.push(u&255)):r===18?(c.push(u>>10&255),c.push(u>>2&255)):r===12&&c.push(u>>4&255),Yr?new Yr(c):c}function qp(e){var t="",n=0,r,i,o=e.length,s=Po;for(r=0;r<o;r++)r%3===0&&r&&(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]):i===2?(t+=s[n>>10&63],t+=s[n>>4&63],t+=s[n<<2&63],t+=s[64]):i===1&&(t+=s[n>>2&63],t+=s[n<<4&63],t+=s[64],t+=s[64]),t}function Ep(e){return Yr&&Yr.isBuffer(e)}Vc.exports=new kp.Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ap,construct:Np,predicate:Ep,represent:qp})});var Jc=N((J0,Qc)=>{"use strict";var Op=Le(),Mp=Object.prototype.hasOwnProperty,Fp=Object.prototype.toString;function Lp(e){if(e===null)return!0;var t=[],n,r,i,o,s,u=e;for(n=0,r=u.length;n<r;n+=1){if(i=u[n],s=!1,Fp.call(i)!=="[object Object]")return!1;for(o in i)if(Mp.call(i,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function Ip(e){return e!==null?e:[]}Qc.exports=new Op.Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Lp,construct:Ip})});var Xc=N((G0,Gc)=>{"use strict";var jp=Le(),To=Ft(),Wp=Object.prototype.toString;function Hp(e){if(e===null)return!0;if(e.kind!=To.Kind.SEQ)return!1;var t,n,r,i,o,s=e.items;for(t=0,n=s.length;t<n;t+=1)if(r=s[t],Wp.call(r)!=="[object Object]"||!Array.isArray(r.mappings)||r.mappings.length!==1)return!1;return!0}function Up(e){if(e===null||!Array.isArray(e.items))return[];let t,n,r,i,o=e.items;for(i=To.newItems(),i.parent=e.parent,i.startPosition=e.startPosition,i.endPosition=e.endPosition,t=0,n=o.length;t<n;t+=1){let u=o[t].mappings[0],c=To.newItems();c.parent=i,c.startPosition=u.key.startPosition,c.endPosition=u.value.startPosition,u.key.parent=c,u.value.parent=c,c.items=[u.key,u.value],i.items.push(c)}return i}Gc.exports=new jp.Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Hp,construct:Up})});var eu=N((X0,Zc)=>{"use strict";var Bp=Le(),$p=Ft();function zp(e){return e===null?!0:e.kind==$p.Kind.MAP}function Yp(e){return e!==null?e:{}}Zc.exports=new Bp.Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:zp,construct:Yp})});var Vr=N((Z0,tu)=>{"use strict";var Vp=kn(),Kp=new Vp.Schema({include:[jc()],implicit:[Uc(),$c()],explicit:[Kc(),Jc(),Xc(),eu()]});tu.exports=Kp});var ru=N((e_,nu)=>{"use strict";var Qp=Le();function Jp(){return!0}function Gp(){}function Xp(){return""}function Zp(e){return typeof e>"u"}nu.exports=new Qp.Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Jp,construct:Gp,predicate:Zp,represent:Xp})});var ou=N((t_,iu)=>{"use strict";var eh=Le();function th(e){if(e===null||e.length===0)return!1;var t=e,n=/\/([gim]*)$/.exec(e),r="";if(t[0]==="/"){if(n&&(r=n[1]),r.length>3||t[t.length-r.length-1]!=="/")return!1;t=t.slice(1,t.length-r.length-1)}try{var i=new RegExp(t,r);return!0}catch{return!1}}function nh(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return t[0]==="/"&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function rh(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function ih(e){return Object.prototype.toString.call(e)==="[object RegExp]"}iu.exports=new eh.Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:th,construct:nh,predicate:ih,represent:rh})});var wo=N((n_,cu)=>{"use strict";var su=kn(),au=new su.Schema({include:[Vr()],explicit:[ru(),ou()]});su.Schema.DEFAULT=au;cu.exports=au});var Ru=N((wt,rr)=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.safeLoad=wt.safeLoadAll=wt.load=wt.loadAll=void 0;var Ze=Ft(),Vt=cn(),Oo=Sn(),Mo=dc(),du=Vr(),oh=wo(),Jr=Object.prototype.hasOwnProperty,Kr=1,pu=2,hu=3,Qr=4,xo=1,sh=2,uu=3,ah=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ch=/[\x85\u2028\u2029]/,uh=/[,\[\]\{\}]/,mu=/^(?:!|!!|![a-z\-]+!)$/i,gu=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function pt(e){return e===10||e===13}function fn(e){return e===9||e===32}function Xe(e){return e===9||e===32||e===10||e===13}function An(e){return e===44||e===91||e===93||e===123||e===125}function lh(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function fh(e){return e===120?2:e===117?4:e===85?8:0}function dh(e){return 48<=e&&e<=57?e-48:-1}function ph(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
7
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function hh(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var So=new Array(256),ko=new Array(256),yu=new Array(256),Ao=new Array(256);for(it=0;it<256;it++)Ao[it]=ko[it]=ph(it),So[it]=ko[it]?1:0,yu[it]=1,So[it]||(Ao[it]="\\"+String.fromCharCode(it));var it,No=class{constructor(t,n){this.errorMap={},this.errors=[],this.lines=[],this.input=t,this.filename=n.filename||null,this.schema=n.schema||oh,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.allowAnyEscape=n.allowAnyEscape||!1,this.ignoreDuplicateKeys=n.ignoreDuplicateKeys||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}};function Fo(e,t,n=!1){return new Oo(t,new Mo(e.filename,e.input,e.position,e.line,e.position-e.lineStart),n)}function qo(e,t,n,r=!1,i=!1){var o=mh(e,t);if(!!o){var s=n+t;if(!e.errorMap[s]){var u=new Mo(e.filename,e.input,t,o.line,t-o.start);i&&(u.toLineEnd=!0);var c=new Oo(n,u,r);e.errors.push(c)}}}function Y(e,t){var n=Fo(e,t),r=n.message+n.mark.position;if(!e.errorMap[r]){e.errors.push(n),e.errorMap[r]=1;for(var i=e.position;;){if(e.position>=e.input.length-1)return;var o=e.input.charAt(e.position);if(o==`
|
|
8
|
+
`){e.position--,e.position==i&&(e.position+=1);return}if(o=="\r"){e.position--,e.position==i&&(e.position+=1);return}e.position++}}}function Eo(e,t){var n=Fo(e,t);e.onWarning&&e.onWarning.call(null,n)}var lu={YAML:function(t,n,r){var i,o,s;t.version!==null&&Y(t,"duplication of %YAML directive"),r.length!==1&&Y(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&Y(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&Y(t,"found incompatible YAML document (version 1.2 is required)"),t.version=r[0],t.checkLineBreaks=s<2,s!==2&&Y(t,"found incompatible YAML document (version 1.2 is required)")},TAG:function(t,n,r){var i,o;r.length!==2&&Y(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],mu.test(i)||Y(t,"ill-formed tag handle (first argument) of the TAG directive"),Jr.call(t.tagMap,i)&&Y(t,'there is a previously declared suffix for "'+i+'" tag handle'),gu.test(o)||Y(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=o}};function Kt(e,t,n,r){var i,o,s,u,c=e.result;if(c.startPosition==-1&&(c.startPosition=t),t<=n){if(u=e.input.slice(t,n),r)for(i=0,o=u.length;i<o;i+=1)s=u.charCodeAt(i),s===9||32<=s&&s<=1114111||Y(e,"expected valid JSON character");else ah.test(u)&&Y(e,"the stream contains non-printable characters");c.value+=u,c.endPosition=n}}function ln(e,t,n,r,i,o){if(r!=null){var s=i?i.endPosition:r.endPosition;!i&&e.input.charAt(s)===":"&&s++,t===null&&(t={startPosition:r.startPosition,endPosition:s,parent:null,errors:[],mappings:[],kind:Ze.Kind.MAP,nodeIndent:o});var u=Ze.newMapping(r,i,o);return u.parent=t,r.parent=u,i==null?u.endPosition=r.endPosition:i.parent=u,!e.ignoreDuplicateKeys&&t.mappings.forEach(c=>{Ze.isNodesEqual(c,u)&&(qo(e,u.key.startPosition,"duplicate key"),qo(e,c.key.startPosition,"duplicate key"))}),t.mappings.push(u),t.endPosition=s,t}}function Lo(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Y(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.lines.push({start:e.lineStart,line:e.line})}function mh(e,t){for(var n,r=0;r<e.lines.length&&!(e.lines[r].start>t);r++)n=e.lines[r];return n||{start:0,line:0}}function ve(e,t,n,r=!1){for(var i=0,o=e.input.charCodeAt(e.position);o!==0;){for(;fn(o);)o===9&&e.errors.push(Fo(e,"Using tabs can lead to unpredictable results",!0)),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(pt(o))for(Lo(e),o=e.input.charCodeAt(e.position),i++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return n!==-1&&i!==0&&e.lineIndent<n&&Eo(e,"deficient indentation"),i}function nr(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&e.input.charCodeAt(t+1)===n&&e.input.charCodeAt(t+2)===n&&(t+=3,n=e.input.charCodeAt(t),n===0||Xe(n)))}function Io(e,t,n){n===1?t.value+=" ":n>1&&(t.value+=Vt.repeat(`
|
|
9
|
+
`,n-1))}function gh(e,t,n){var r,i,o,s,u,c,p,m,v=e.kind,C=e.result,P,w=Ze.newScalar("",t);if(w.plainScalar=!0,e.result=w,P=e.input.charCodeAt(e.position),Xe(P)||An(P)||P===35||P===38||P===42||P===33||P===124||P===62||P===39||P===34||P===37||P===64||P===96)return e.result.startPosition=e.position-1,e.result.endPosition=e.position-1,!1;if((P===63||P===45)&&(i=e.input.charCodeAt(e.position+1),Xe(i)||n&&An(i)))return!1;for(e.kind="scalar",o=s=e.position,u=!1;P!==0;){if(P===58){if(i=e.input.charCodeAt(e.position+1),Xe(i)||n&&An(i))break}else if(P===35){if(r=e.input.charCodeAt(e.position-1),Xe(r))break}else{if(e.position===e.lineStart&&nr(e)||n&&An(P))break;if(pt(P))if(c=e.line,p=e.lineStart,m=e.lineIndent,ve(e,!1,-1),e.lineIndent>=t){u=!0,P=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=p,e.lineIndent=m;break}}if(u&&(Kt(e,o,s,!1),Io(e,w,e.line-c),o=s=e.position,u=!1),fn(P)||(s=e.position+1),P=e.input.charCodeAt(++e.position),e.position>=e.input.length)return!1}return Kt(e,o,s,!1),e.result.startPosition!=-1?(w.rawValue=e.input.substring(w.startPosition,w.endPosition),e.result.endPosition=ve(e,!1,-1)?e.position-1:e.position,!0):(e.kind=v,e.result=C,!1)}function yh(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;var o=Ze.newScalar("",t);for(o.singleQuoted=!0,e.kind="scalar",e.result=o,o.startPosition=e.position,e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Kt(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),o.endPosition=e.position,n===39)r=i=e.position,e.position++;else return!0;else pt(n)?(Kt(e,r,i,!0),Io(e,o,ve(e,!1,t)),r=i=e.position):e.position===e.lineStart&&nr(e)?Y(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position,o.endPosition=e.position);Y(e,"unexpected end of the stream within a single quoted scalar")}function vh(e,t){var n,r,i,o,s,u,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;e.kind="scalar";var p=Ze.newScalar("",t);for(p.doubleQuoted=!0,e.result=p,p.startPosition=e.position,e.position++,n=r=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return Kt(e,n,e.position,!0),e.position++,p.endPosition=e.position,p.rawValue=e.input.substring(p.startPosition,p.endPosition),!0;if(c===92){if(Kt(e,n,e.position,!0),c=e.input.charCodeAt(++e.position),pt(c))ve(e,!1,t);else if(c<256&&(e.allowAnyEscape?yu[c]:So[c]))p.value+=e.allowAnyEscape?Ao[c]:ko[c],e.position++;else if((s=fh(c))>0){for(i=s,o=0;i>0;i--)c=e.input.charCodeAt(++e.position),(s=lh(c))>=0?o=(o<<4)+s:Y(e,"expected hexadecimal character");p.value+=hh(o),e.position++}else Y(e,"unknown escape sequence");n=r=e.position}else pt(c)?(Kt(e,n,r,!0),Io(e,p,ve(e,!1,t)),n=r=e.position):e.position===e.lineStart&&nr(e)?Y(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}Y(e,"unexpected end of the stream within a double quoted scalar")}function bh(e,t){var n=!0,r,i=e.tag,o,s=e.anchor,u,c,p,m,v,C,P,w,A;if(A=e.input.charCodeAt(e.position),A===91)c=93,v=!1,o=Ze.newItems(),o.startPosition=e.position;else if(A===123)c=125,v=!0,o=Ze.newMap(null,t),o.startPosition=e.position;else return!1;for(e.anchor!==null&&(o.anchorId=e.anchor,e.anchorMap[e.anchor]=o),A=e.input.charCodeAt(++e.position);A!==0;){if(ve(e,!0,t),A=e.input.charCodeAt(e.position),A===c)return e.position++,e.tag=i,e.anchor=s,e.kind=v?"mapping":"sequence",e.result=o,o.endPosition=e.position,!0;if(!n){var B=e.position;Y(e,"missed comma between flow collection entries"),e.position=B+1}if(P=C=w=null,p=m=!1,A===63&&(u=e.input.charCodeAt(e.position+1),Xe(u)&&(p=m=!0,e.position++,ve(e,!0,t))),r=e.line,Nn(e,t,Kr,!1,!0),P=e.tag,C=e.result,ve(e,!0,t),A=e.input.charCodeAt(e.position),(m||e.line===r)&&A===58&&(p=!0,A=e.input.charCodeAt(++e.position),ve(e,!0,t),Nn(e,t,Kr,!1,!0),w=e.result),v)ln(e,o,P,C,w,t);else if(p){var L=ln(e,null,P,C,w,t);L.parent=o,o.items.push(L)}else C&&(C.parent=o),o.items.push(C);o.endPosition=e.position+1,ve(e,!0,t),A=e.input.charCodeAt(e.position),A===44?(n=!0,A=e.input.charCodeAt(++e.position)):n=!1}Y(e,"unexpected end of the stream within a flow collection")}function _h(e,t){var n,r,i=xo,o=!1,s=t,u=0,c=!1,p,m;if(m=e.input.charCodeAt(e.position),m===124)r=!1;else if(m===62)r=!0;else return!1;var v=Ze.newScalar("",t);for(e.kind="scalar",e.result=v,v.startPosition=e.position;m!==0;)if(m=e.input.charCodeAt(++e.position),m===43||m===45)xo===i?i=m===43?uu:sh:Y(e,"repeat of a chomping mode identifier");else if((p=dh(m))>=0)p===0?Y(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?Y(e,"repeat of an indentation width identifier"):(s=t+p-1,o=!0);else break;if(fn(m)){do m=e.input.charCodeAt(++e.position);while(fn(m));if(m===35)do m=e.input.charCodeAt(++e.position);while(!pt(m)&&m!==0)}for(;m!==0;){for(Lo(e),e.lineIndent=0,m=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&m===32;)e.lineIndent++,m=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),pt(m)){u++;continue}if(e.lineIndent<s){i===uu?v.value+=Vt.repeat(`
|
|
10
|
+
`,u):i===xo&&o&&(v.value+=`
|
|
11
|
+
`);break}for(r?fn(m)?(c=!0,v.value+=Vt.repeat(`
|
|
12
|
+
`,u+1)):c?(c=!1,v.value+=Vt.repeat(`
|
|
13
|
+
`,u+1)):u===0?o&&(v.value+=" "):v.value+=Vt.repeat(`
|
|
14
|
+
`,u):o&&(v.value+=Vt.repeat(`
|
|
15
|
+
`,u+1)),o=!0,u=0,n=e.position;!pt(m)&&m!==0;)m=e.input.charCodeAt(++e.position);Kt(e,n,e.position,!1)}v.endPosition=e.position;for(var C=e.position-1,P=!1;;){var w=e.input[C];if(w=="\r"||w==`
|
|
16
|
+
`){P&&C--;break}if(w!=" "&&w!=" ")break;C--}return v.endPosition=C,v.rawValue=e.input.substring(v.startPosition,v.endPosition),!0}function fu(e,t){var n,r=e.tag,i=e.anchor,o=Ze.newItems(),s,u=!1,c;for(e.anchor!==null&&(o.anchorId=e.anchor,e.anchorMap[e.anchor]=o),o.startPosition=e.position,c=e.input.charCodeAt(e.position);c!==0&&!(c!==45||(s=e.input.charCodeAt(e.position+1),!Xe(s)));){if(u=!0,e.position++,ve(e,!0,-1)&&e.lineIndent<=t){o.items.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,Nn(e,t,hu,!1,!0),e.result&&(e.result.parent=o,o.items.push(e.result)),o.endPosition=ve(e,!0,t,!0)?e.position-1:e.position,c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)Y(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return u?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}function Rh(e,t,n){var r,i,o,s=e.tag,u=e.anchor,c=Ze.newMap(null,t),p=null,m=null,v=null,C=!1,P=!1,w;for(c.startPosition=e.position,e.anchor!==null&&(c.anchorId=e.anchor,e.anchorMap[e.anchor]=c),w=e.input.charCodeAt(e.position);w!==0;){if(r=e.input.charCodeAt(e.position+1),o=e.line,(w===63||w===58)&&Xe(r))w===63?(C&&(ln(e,c,p,m,null,t),p=m=v=null),P=!0,C=!0,i=!0):C?(C=!1,i=!0):Y(e,"incomplete explicit mapping pair; a key node is missed"),e.position+=1,w=r;else if(Nn(e,n,pu,!1,!0))if(e.line===o){for(w=e.input.charCodeAt(e.position);fn(w);)w=e.input.charCodeAt(++e.position);if(w===58)w=e.input.charCodeAt(++e.position),Xe(w)||Y(e,"a whitespace character is expected after the key-value separator within a block mapping"),C&&(ln(e,c,p,m,null,t),p=m=v=null),P=!0,C=!1,i=!1,p=e.tag,m=e.result;else{if(e.position==e.lineStart&&nr(e))break;if(P)Y(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=s,e.anchor=u,!0}}else if(P){for(Y(e,"can not read a block mapping entry; a multiline key may not be an implicit key");e.position>0;)if(w=e.input.charCodeAt(--e.position),pt(w)){e.position++;break}m=e.result,m.value=e.input.substring(e.result.startPosition,e.position-1),m.rawValue=m.value,m.endPosition=e.position-1,ln(e,c,p,m,null,t)}else return e.tag=s,e.anchor=u,!0;else break;if(e.line===o||e.lineIndent>t){let A=e.line;Nn(e,t,Qr,!0,i)?(ve(e,!0,t),C?m=e.result:(v=e.result,v.endPosition=e.line===A?e.position:e.position-1)):m&&(m.endPosition=e.line===A?e.position:e.position-1),C||(ln(e,c,p,m,v,t),p=m=v=null),ve(e,!0,-1),w=e.input.charCodeAt(e.position)}if(e.lineIndent>t&&w!==0)Y(e,"bad indentation of a mapping entry"+e.position),w=e.input.charCodeAt(++e.position),ve(e,!0,-1);else if(e.lineIndent<t)break}return C&&ln(e,c,p,m,null,t),P&&(e.tag=s,e.anchor=u,e.kind="mapping",e.result=c),P}function Dh(e){var t,n=!1,r=!1,i,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&Y(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(n=!0,s=e.input.charCodeAt(++e.position)):s===33?(r=!0,i="!!",s=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):Y(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Xe(s);)s===33&&(r?Y(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),mu.test(i)||Y(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),uh.test(o)&&Y(e,"tag suffix cannot contain flow indicator characters")}return o&&!gu.test(o)&&Y(e,"tag name cannot contain such characters: "+o),n?e.tag=o:Jr.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:Y(e,'undeclared tag handle "'+i+'"'),!0}function Ch(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&Y(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Xe(n)&&!An(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Y(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Ph(e){var t,n,r=e.length,i=e.input,o;if(o=e.input.charCodeAt(e.position),o!==42)return!1;for(o=e.input.charCodeAt(++e.position),t=e.position;o!==0&&!Xe(o)&&!An(o);)o=e.input.charCodeAt(++e.position);return e.position<=t&&(Y(e,"name of an alias node must contain at least one character"),e.position=t+1),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||(Y(e,'unidentified alias "'+n+'"'),e.position<=t&&(e.position=t+1)),e.result=Ze.newAnchorRef(n,t,e.position,e.anchorMap[n],0),ve(e,!0,-1),!0}function Nn(e,t,n,r,i){var o,s,u,c=1,p=!1,m=!1,v,C,P,w,A,B;e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=u=Qr===n||hu===n,r&&ve(e,!0,-1)&&(p=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1));let L=e.position;if(c===1)for(;Dh(e)||Ch(e);)ve(e,!0,-1)?(p=!0,u=o,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):u=!1;if(u&&(u=p||i),(c===1||Qr===n)&&(Kr===n||pu===n?w=t:w=t+1,A=e.position-e.lineStart,c===1?u&&(fu(e,A)||Rh(e,A,w))||bh(e,w)?m=!0:(s&&_h(e,w)||yh(e,w)||vh(e,w)?m=!0:Ph(e)?(m=!0,(e.tag!==null||e.anchor!==null)&&Y(e,"alias node should not have any properties")):gh(e,w,Kr===n)&&(m=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result,e.result.anchorId=e.anchor)):c===0&&(m=u&&fu(e,A))),e.tag!==null&&e.tag!=="!")if(e.tag=="!include")e.result||(e.result=Ze.newScalar("",A),e.result.startPosition=e.position,e.result.endPosition=e.position,Y(e,"!include without value")),e.result.kind=Ze.Kind.INCLUDE_REF;else if(e.tag==="?")for(v=0,C=e.implicitTypes.length;v<C;v+=1){P=e.implicitTypes[v];var D=e.result.value;if(P.resolve(D)){e.result.valueObject=P.construct(e.result.value),e.tag=P.tag,e.anchor!==null&&(e.result.anchorId=e.anchor,e.anchorMap[e.anchor]=e.result);break}}else Jr.call(e.typeMap,e.tag)?(P=e.typeMap[e.tag],e.result!==null&&P.kind!==e.kind&&(!P.additionalKinds||P.additionalKinds&&P.additionalKinds.indexOf(e.kind)===-1)&&Y(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+P.kind+'", not "'+e.kind+'"'),P.resolve(e.result)?(e.result=P.construct(e.result),e.anchor!==null&&(e.result.anchorId=e.anchor,e.anchorMap[e.anchor]=e.result)):Y(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):qo(e,L,"unknown tag <"+e.tag+">",!1,!0);return e.tag!==null||e.anchor!==null||m}function Th(e){var t=e.position,n,r,i,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(s=e.input.charCodeAt(e.position))!==0&&(ve(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),n=e.position;s!==0&&!Xe(s);)s=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&Y(e,"directive name must not be less than one character in length");s!==0;){for(;fn(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!pt(s));break}if(pt(s))break;for(n=e.position;s!==0&&!Xe(s);)s=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}s!==0&&Lo(e),Jr.call(lu,r)?lu[r](e,r,i):(Eo(e,'unknown document directive "'+r+'"'),e.position++)}if(ve(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,ve(e,!0,-1)):o&&Y(e,"directives end mark is expected"),Nn(e,e.lineIndent-1,Qr,!1,!0),ve(e,!0,-1),e.checkLineBreaks&&ch.test(e.input.slice(t,e.position))&&Eo(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&nr(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,ve(e,!0,-1));return}if(e.position<e.length-1)Y(e,"end of the stream or a document separator is expected");else return}function vu(e,t){e=String(e),t=t||{};let n=e.length;n!==0&&(e.charCodeAt(n-1)!==10&&e.charCodeAt(n-1)!==13&&(e+=`
|
|
17
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new No(e,t);for(r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;){var i=r.position;if(Th(r),r.position<=i)for(;r.position<r.length-1;r.position++){var o=r.input.charAt(r.position);if(o==`
|
|
18
|
+
`)break}}let s=r.documents,u=s.length;u>0&&(s[u-1].endPosition=n);for(let c of s)c.errors=r.errors,c.startPosition>c.endPosition&&(c.startPosition=c.endPosition);return s}function jo(e,t,n={}){var r=vu(e,n),i,o;for(i=0,o=r.length;i<o;i+=1)t(r[i])}wt.loadAll=jo;function Wo(e,t={}){var n=vu(e,t),r,i;if(n.length!==0){if(n.length===1)return n[0];var o=new Oo("expected a single document in the stream, but found more");return o.mark=new Mo("","",0,0,0),o.mark.position=n[0].endPosition,n[0].errors.push(o),n[0]}}wt.load=Wo;function bu(e,t,n={}){jo(e,t,Vt.extend({schema:du},n))}wt.safeLoadAll=bu;function _u(e,t={}){return Wo(e,Vt.extend({schema:du},t))}wt.safeLoad=_u;rr.exports.loadAll=jo;rr.exports.load=Wo;rr.exports.safeLoadAll=bu;rr.exports.safeLoad=_u});var Su=N(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.safeDump=qn.dump=void 0;var ir=cn(),Yo=Sn(),wh=wo(),xh=Vr(),Vo=Object.prototype.toString,Tu=Object.prototype.hasOwnProperty,Sh=9,dn=10,kh=13,Ho=32,Ah=33,Uo=34,Nh=35,qh=37,Eh=38,Bo=39,Oh=42,Mh=44,Fh=45,Lh=58,Ih=62,jh=63,Wh=64,Hh=91,Uh=93,Bh=96,$h=123,zh=124,Yh=125,Ee={};Ee[0]="\\0";Ee[7]="\\a";Ee[8]="\\b";Ee[9]="\\t";Ee[10]="\\n";Ee[11]="\\v";Ee[12]="\\f";Ee[13]="\\r";Ee[27]="\\e";Ee[34]='\\"';Ee[92]="\\\\";Ee[133]="\\N";Ee[160]="\\_";Ee[8232]="\\L";Ee[8233]="\\P";var Vh=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Kh(e,t){var n,r,i,o,s,u,c;if(t===null)return{};for(n={},r=Object.keys(t),i=0,o=r.length;i<o;i+=1)s=r[i],u=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),c=e.compiledTypeMap[s],c&&Tu.call(c.styleAliases,u)&&(u=c.styleAliases[u]),n[s]=u;return n}function Qh(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new Yo("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+ir.repeat("0",r-t.length)+t}function Jh(e){this.schema=e.schema||wh,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=ir.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Kh(this.schema,e.styles||null),this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Du(e,t){for(var n=ir.repeat(" ",t),r=0,i=-1,o="",s,u=e.length;r<u;)i=e.indexOf(`
|
|
19
|
+
`,r),i===-1?(s=e.slice(r),r=u):(s=e.slice(r,i+1),r=i+1),s.length&&s!==`
|
|
20
|
+
`&&(o+=n),o+=s;return o}function $o(e,t){return`
|
|
21
|
+
`+ir.repeat(" ",e.indent*t)}function Gh(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function Gr(e){this.source=e,this.result="",this.checkpoint=0}Gr.prototype.takeUpTo=function(e){var t;if(e<this.checkpoint)throw t=new Error("position should be > checkpoint"),t.position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this};Gr.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=Ee[e]||Qh(e),this.result+=t,this.checkpoint+=1,this};Gr.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)};function Xh(e,t,n){var r,i,o,s,u,c,p,m,v,C,P,w,A,B,L,D,b,q,$,Z,ue;if(t.length===0){e.dump="''";return}if(t.indexOf("!include")==0){e.dump=""+t;return}if(t.indexOf("!$$$novalue")==0){e.dump="";return}if(Vh.indexOf(t)!==-1){e.dump="'"+t+"'";return}for(r=!0,i=t.length?t.charCodeAt(0):0,o=Ho===i||Ho===t.charCodeAt(t.length-1),(Fh===i||jh===i||Wh===i||Bh===i)&&(r=!1),o?(r=!1,s=!1,u=!1):(s=!0,u=!0),c=!0,p=new Gr(t),m=!1,v=0,C=0,P=e.indent*n,w=80,P<40?w-=P:w=40,B=0;B<t.length;B++){if(A=t.charCodeAt(B),r)if(!em(A))r=!1;else continue;c&&A===Bo&&(c=!1),L=Ee[A],D=wu(A),!(!L&&!D)&&(A!==dn&&A!==Uo&&A!==Bo?(s=!1,u=!1):A===dn&&(m=!0,c=!1,B>0&&(b=t.charCodeAt(B-1),b===Ho&&(u=!1,s=!1)),s&&(q=B-v,v=B,q>C&&(C=q))),A!==Uo&&(c=!1),p.takeUpTo(B),p.escapeChar())}if(r&&Gh(e,t)&&(r=!1),$="",(s||u)&&(Z=0,t.charCodeAt(t.length-1)===dn&&(Z+=1,t.charCodeAt(t.length-2)===dn&&(Z+=1)),Z===0?$="-":Z===2&&($="+")),u&&C<w&&(s=!1),m||(u=!1),r)e.dump=t;else if(c)e.dump="'"+t+"'";else if(s)ue=Zh(t,w),e.dump=">"+$+`
|
|
22
|
+
`+Du(ue,P);else if(u)$||(t=t.replace(/\n$/,"")),e.dump="|"+$+`
|
|
23
|
+
`+Du(t,P);else if(p)p.finish(),e.dump='"'+p.result+'"';else throw new Error("Failed to dump scalar value")}function Zh(e,t){var n="",r=0,i=e.length,o=/\n+$/.exec(e),s;for(o&&(i=o.index+1);r<i;)s=e.indexOf(`
|
|
24
24
|
`,r),s>i||s===-1?(n&&(n+=`
|
|
25
25
|
|
|
26
|
-
`),n+=
|
|
26
|
+
`),n+=Cu(e.slice(r,i),t),r=i):(n&&(n+=`
|
|
27
27
|
|
|
28
|
-
`),n+=
|
|
29
|
-
`&&(n+=o[0]),n}function
|
|
30
|
-
`),p=e.slice(o,
|
|
28
|
+
`),n+=Cu(e.slice(r,s),t),r=s+1);return o&&o[0]!==`
|
|
29
|
+
`&&(n+=o[0]),n}function Cu(e,t){if(e==="")return e;for(var n=/[^\s] [^\s]/g,r="",i=0,o=0,s=n.exec(e),u,c,p;s;)u=s.index,u-o>t&&(i!==o?c=i:c=u,r&&(r+=`
|
|
30
|
+
`),p=e.slice(o,c),r+=p,o=c+1),i=u+1,s=n.exec(e);return r&&(r+=`
|
|
31
31
|
`),o!==i&&e.length-o>t?r+=e.slice(o,i)+`
|
|
32
|
-
`+e.slice(i+1):r+=e.slice(o),r}function
|
|
33
|
-
`:"")+e.dump)):(
|
|
34
|
-
`:"")+e.dump)):(
|
|
35
|
-
`:""}jn.dump=bc;function Jh(e,t){return bc(e,cr.extend({schema:yh},t))}jn.safeDump=Jh});var Dc=q(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.determineScalarType=Ze.ScalarType=Ze.parseYamlFloat=Ze.parseYamlInteger=Ze.parseYamlBoolean=void 0;function Gh(e){if(["true","True","TRUE"].lastIndexOf(e)>=0)return!0;if(["false","False","FALSE"].lastIndexOf(e)>=0)return!1;throw`Invalid boolean "${e}"`}Ze.parseYamlBoolean=Gh;function Xh(e){return e.lastIndexOf("0o",0)===0?parseInt(e.substring(2),8):parseInt(e)}function Zh(e){let t=Xh(e);if(isNaN(t))throw`Invalid integer "${e}"`;return t}Ze.parseYamlInteger=Zh;function em(e){if([".nan",".NaN",".NAN"].lastIndexOf(e)>=0)return NaN;let n=/^([-+])?(?:\.inf|\.Inf|\.INF)$/.exec(e);if(n)return n[1]==="-"?-1/0:1/0;let r=parseFloat(e);if(!isNaN(r))return r;throw`Invalid float "${e}"`}Ze.parseYamlFloat=em;var Wt;(function(e){e[e.null=0]="null",e[e.bool=1]="bool",e[e.int=2]="int",e[e.float=3]="float",e[e.string=4]="string"})(Wt=Ze.ScalarType||(Ze.ScalarType={}));function tm(e){if(e===void 0)return Wt.null;if(e.doubleQuoted||!e.plainScalar||e.singleQuoted)return Wt.string;let t=e.value;if(["null","Null","NULL","~",""].indexOf(t)>=0||t==null)return Wt.null;if(["true","True","TRUE","false","False","FALSE"].indexOf(t)>=0)return Wt.bool;let n=/^[-+]?[0-9]+$/,r=/^0o[0-7]+$/,i=/^0x[0-9a-fA-F]+$/;if(n.test(t)||r.test(t)||i.test(t))return Wt.int;let o=/^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/,s=/^[-+]?(\.inf|\.Inf|\.INF)$/;return o.test(t)||s.test(t)||[".nan",".NaN",".NAN"].indexOf(t)>=0?Wt.float:Wt.string}Ze.determineScalarType=tm});var ei=q(Re=>{"use strict";var nm=Re&&Re.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Rc=Re&&Re.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&nm(t,e,n)};Object.defineProperty(Re,"__esModule",{value:!0});Re.safeDump=Re.dump=Re.safeLoadAll=Re.safeLoad=Re.loadAll=Re.load=void 0;var Zr=pc();Object.defineProperty(Re,"load",{enumerable:!0,get:function(){return Zr.load}});Object.defineProperty(Re,"loadAll",{enumerable:!0,get:function(){return Zr.loadAll}});Object.defineProperty(Re,"safeLoad",{enumerable:!0,get:function(){return Zr.safeLoad}});Object.defineProperty(Re,"safeLoadAll",{enumerable:!0,get:function(){return Zr.safeLoadAll}});var Cc=_c();Object.defineProperty(Re,"dump",{enumerable:!0,get:function(){return Cc.dump}});Object.defineProperty(Re,"safeDump",{enumerable:!0,get:function(){return Cc.safeDump}});Re.YAMLException=Mn();Rc(jt(),Re);Rc(Dc(),Re)});var Ut=q(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});var Xo;function Zo(){if(Xo===void 0)throw new Error("No runtime abstraction layer installed");return Xo}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");Xo=n}e.install=t})(Zo||(Zo={}));es.default=Zo});var ts=q(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.Disposable=void 0;var um;(function(e){function t(n){return{dispose:n}}e.create=t})(um=hr.Disposable||(hr.Disposable={}))});var Cn=q(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.Emitter=Rn.Event=void 0;var cm=Ut(),lm;(function(e){let t={dispose(){}};e.None=function(){return t}})(lm=Rn.Event||(Rn.Event={}));var ns=class{add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===t)if(this._contexts[i]===n){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...t){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{n.push(r[o].apply(i[o],t))}catch(a){(0,cm.default)().console.error(a)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Wn=class{constructor(t){this._options=t}get event(){return this._event||(this._event=(t,n,r)=>{this._callbacks||(this._callbacks=new ns),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let i={dispose:()=>{!this._callbacks||(this._callbacks.remove(t,n),i.dispose=Wn._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};Rn.Emitter=Wn;Wn._noop=function(){}});var Wc=q(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.AbstractMessageBuffer=void 0;var fm=13,dm=10,pm=`\r
|
|
36
|
-
`,rs=class{constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(){if(this._chunks.length===0)return;let t=0,n=0,r=0,i=0;e:for(;n<this._chunks.length;){let l=this._chunks[n];r=0;t:for(;r<l.length;){switch(l[r]){case fm:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case dm:switch(t){case 1:t=2;break;case 3:t=4,r++;break e;default:t=0}break;default:t=0}r++}i+=l.byteLength,n++}if(t!==4)return;let o=this._read(i+r),s=new Map,a=this.toString(o,"ascii").split(pm);if(a.length<2)return s;for(let l=0;l<a.length-2;l++){let p=a[l],m=p.indexOf(":");if(m===-1)throw new Error("Message header must separate key and value using :");let v=p.substr(0,m),C=p.substr(m+1).trim();s.set(v,C)}return s}tryReadBody(t){if(!(this._totalLength<t))return this._read(t)}get numberOfBytes(){return this._totalLength}_read(t){if(t===0)return this.emptyBuffer();if(t>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(o)}if(this._chunks[0].byteLength>t){let o=this._chunks[0],s=this.asNative(o,t);return this._chunks[0]=o.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,i=0;for(;t>0;){let o=this._chunks[i];if(o.byteLength>t){let s=o.slice(0,t);n.set(s,r),r+=t,this._chunks[i]=o.slice(t),this._totalLength-=t,t-=t}else n.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,t-=o.byteLength}return n}};si.AbstractMessageBuffer=rs});var Bc=q(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});var Hc=Ut(),Hn=ts(),hm=Cn(),mm=Wc(),Un=class extends mm.AbstractMessageBuffer{constructor(t="utf-8"){super(t),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return Un.emptyBuffer}fromString(t,n){return new TextEncoder().encode(t)}toString(t,n){return n==="ascii"?this.asciiDecoder.decode(t):new TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t:t.slice(0,n)}allocNative(t){return new Uint8Array(t)}};Un.emptyBuffer=new Uint8Array(0);var is=class{constructor(t){this.socket=t,this._onData=new hm.Emitter,this._messageListener=n=>{n.data.arrayBuffer().then(i=>{this._onData.fire(new Uint8Array(i))},()=>{(0,Hc.default)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(t){return this.socket.addEventListener("close",t),Hn.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),Hn.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),Hn.Disposable.create(()=>this.socket.removeEventListener("end",t))}onData(t){return this._onData.event(t)}},os=class{constructor(t){this.socket=t}onClose(t){return this.socket.addEventListener("close",t),Hn.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),Hn.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),Hn.Disposable.create(()=>this.socket.removeEventListener("end",t))}write(t,n){if(typeof t=="string"){if(n!==void 0&&n!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${n}`);this.socket.send(t)}else this.socket.send(t);return Promise.resolve()}end(){this.socket.close()}},gm=new TextEncoder,Uc=Object.freeze({messageBuffer:Object.freeze({create:e=>new Un(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if(t.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(gm.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new is(e),asWritableStream:e=>new os(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function ss(){return Uc}(function(e){function t(){Hc.default.install(Uc)}e.install=t})(ss||(ss={}));as.default=ss});var Bn=q(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.stringArray=je.array=je.func=je.error=je.number=je.string=je.boolean=void 0;function ym(e){return e===!0||e===!1}je.boolean=ym;function $c(e){return typeof e=="string"||e instanceof String}je.string=$c;function vm(e){return typeof e=="number"||e instanceof Number}je.number=vm;function bm(e){return e instanceof Error}je.error=bm;function _m(e){return typeof e=="function"}je.func=_m;function zc(e){return Array.isArray(e)}je.array=zc;function Dm(e){return zc(e)&&e.every(t=>$c(t))}je.stringArray=Dm});var As=q(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.Message=U.NotificationType9=U.NotificationType8=U.NotificationType7=U.NotificationType6=U.NotificationType5=U.NotificationType4=U.NotificationType3=U.NotificationType2=U.NotificationType1=U.NotificationType0=U.NotificationType=U.RequestType9=U.RequestType8=U.RequestType7=U.RequestType6=U.RequestType5=U.RequestType4=U.RequestType3=U.RequestType2=U.RequestType1=U.RequestType=U.RequestType0=U.AbstractMessageSignature=U.ParameterStructures=U.ResponseError=U.ErrorCodes=void 0;var Pn=Bn(),Yc;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(Yc=U.ErrorCodes||(U.ErrorCodes={}));var mr=class extends Error{constructor(t,n,r){super(n),this.code=Pn.number(t)?t:Yc.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,mr.prototype)}toJson(){let t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),t}};U.ResponseError=mr;var Ne=class{constructor(t){this.kind=t}static is(t){return t===Ne.auto||t===Ne.byName||t===Ne.byPosition}toString(){return this.kind}};U.ParameterStructures=Ne;Ne.auto=new Ne("auto");Ne.byPosition=new Ne("byPosition");Ne.byName=new Ne("byName");var de=class{constructor(t,n){this.method=t,this.numberOfParams=n}get parameterStructures(){return Ne.auto}};U.AbstractMessageSignature=de;var us=class extends de{constructor(t){super(t,0)}};U.RequestType0=us;var cs=class extends de{constructor(t,n=Ne.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};U.RequestType=cs;var ls=class extends de{constructor(t,n=Ne.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};U.RequestType1=ls;var fs=class extends de{constructor(t){super(t,2)}};U.RequestType2=fs;var ds=class extends de{constructor(t){super(t,3)}};U.RequestType3=ds;var ps=class extends de{constructor(t){super(t,4)}};U.RequestType4=ps;var hs=class extends de{constructor(t){super(t,5)}};U.RequestType5=hs;var ms=class extends de{constructor(t){super(t,6)}};U.RequestType6=ms;var gs=class extends de{constructor(t){super(t,7)}};U.RequestType7=gs;var ys=class extends de{constructor(t){super(t,8)}};U.RequestType8=ys;var vs=class extends de{constructor(t){super(t,9)}};U.RequestType9=vs;var bs=class extends de{constructor(t,n=Ne.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};U.NotificationType=bs;var _s=class extends de{constructor(t){super(t,0)}};U.NotificationType0=_s;var Ds=class extends de{constructor(t,n=Ne.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};U.NotificationType1=Ds;var Rs=class extends de{constructor(t){super(t,2)}};U.NotificationType2=Rs;var Cs=class extends de{constructor(t){super(t,3)}};U.NotificationType3=Cs;var Ps=class extends de{constructor(t){super(t,4)}};U.NotificationType4=Ps;var Ts=class extends de{constructor(t){super(t,5)}};U.NotificationType5=Ts;var ws=class extends de{constructor(t){super(t,6)}};U.NotificationType6=ws;var xs=class extends de{constructor(t){super(t,7)}};U.NotificationType7=xs;var ks=class extends de{constructor(t){super(t,8)}};U.NotificationType8=ks;var Ss=class extends de{constructor(t){super(t,9)}};U.NotificationType9=Ss;var Rm;(function(e){function t(i){let o=i;return o&&Pn.string(o.method)&&(Pn.string(o.id)||Pn.number(o.id))}e.isRequest=t;function n(i){let o=i;return o&&Pn.string(o.method)&&i.id===void 0}e.isNotification=n;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(Pn.string(o.id)||Pn.number(o.id)||o.id===null)}e.isResponse=r})(Rm=U.Message||(U.Message={}))});var qs=q(Bt=>{"use strict";var Vc;Object.defineProperty(Bt,"__esModule",{value:!0});Bt.LRUCache=Bt.LinkedMap=Bt.Touch=void 0;var Be;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(Be=Bt.Touch||(Bt.Touch={}));var ai=class{constructor(){this[Vc]="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(t){return this._map.has(t)}get(t,n=Be.None){let r=this._map.get(t);if(!!r)return n!==Be.None&&this.touch(r,n),r.value}set(t,n,r=Be.None){let i=this._map.get(t);if(i)i.value=n,r!==Be.None&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case Be.None:this.addItemLast(i);break;case Be.First:this.addItemFirst(i);break;case Be.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(!!n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(Vc=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==Be.First&&n!==Be.Last)){if(n===Be.First){if(t===this._head)return;let r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===Be.Last){if(t===this._tail)return;let r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};Bt.LinkedMap=ai;var Ns=class extends ai{constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=Be.AsNew){return super.get(t,n)}peek(t){return super.get(t,Be.None)}set(t,n){return super.set(t,n,Be.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};Bt.LRUCache=Ns});var Fs=q(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.CancellationTokenSource=Tn.CancellationToken=void 0;var Cm=Ut(),Pm=Bn(),Es=Cn(),Os;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Es.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Es.Event.None});function t(n){let r=n;return r&&(r===e.None||r===e.Cancelled||Pm.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.is=t})(Os=Tn.CancellationToken||(Tn.CancellationToken={}));var Tm=Object.freeze(function(e,t){let n=(0,Cm.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}),ui=class{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?Tm:(this._emitter||(this._emitter=new Es.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},Ms=class{get token(){return this._token||(this._token=new ui),this._token}cancel(){this._token?this._token.cancel():this._token=Os.Cancelled}dispose(){this._token?this._token instanceof ui&&this._token.dispose():this._token=Os.None}};Tn.CancellationTokenSource=Ms});var Kc=q($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.ReadableStreamMessageReader=$t.AbstractMessageReader=$t.MessageReader=void 0;var Is=Ut(),$n=Bn(),Ls=Cn(),wm;(function(e){function t(n){let r=n;return r&&$n.func(r.listen)&&$n.func(r.dispose)&&$n.func(r.onError)&&$n.func(r.onClose)&&$n.func(r.onPartialMessage)}e.is=t})(wm=$t.MessageReader||($t.MessageReader={}));var ci=class{constructor(){this.errorEmitter=new Ls.Emitter,this.closeEmitter=new Ls.Emitter,this.partialMessageEmitter=new Ls.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t){this.errorEmitter.fire(this.asError(t))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(t){this.partialMessageEmitter.fire(t)}asError(t){return t instanceof Error?t:new Error(`Reader received error. Reason: ${$n.string(t.message)?t.message:"unknown"}`)}};$t.AbstractMessageReader=ci;var js;(function(e){function t(n){let r,i,o,s=new Map,a,l=new Map;if(n===void 0||typeof n=="string")r=n??"utf-8";else{if(r=n.charset??"utf-8",n.contentDecoder!==void 0&&(o=n.contentDecoder,s.set(o.name,o)),n.contentDecoders!==void 0)for(let p of n.contentDecoders)s.set(p.name,p);if(n.contentTypeDecoder!==void 0&&(a=n.contentTypeDecoder,l.set(a.name,a)),n.contentTypeDecoders!==void 0)for(let p of n.contentTypeDecoders)l.set(p.name,p)}return a===void 0&&(a=(0,Is.default)().applicationJson.decoder,l.set(a.name,a)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:a,contentTypeDecoders:l}}e.fromOptions=t})(js||(js={}));var Ws=class extends ci{constructor(t,n){super(),this.readable=t,this.options=js.fromOptions(n),this.buffer=(0,Is.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}set partialMessageTimeout(t){this._partialMessageTimeout=t}get partialMessageTimeout(){return this._partialMessageTimeout}listen(t){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=t;let n=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let i=this.buffer.tryReadHeaders();if(!i)return;let o=i.get("Content-Length");if(!o)throw new Error("Header must provide a Content-Length property.");let s=parseInt(o);if(isNaN(s))throw new Error("Content-Length value must be a number.");this.nextMessageLength=s}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1;let r;this.options.contentDecoder!==void 0?r=this.options.contentDecoder.decode(n):r=Promise.resolve(n),r.then(i=>{this.options.contentTypeDecoder.decode(i,this.options).then(o=>{this.callback(o)},o=>{this.fireError(o)})},i=>{this.fireError(i)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Is.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};$t.ReadableStreamMessageReader=Ws});var Qc=q(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.Semaphore=void 0;var xm=Ut(),Hs=class{constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,xm.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};li.Semaphore=Hs});var Zc=q(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.WriteableStreamMessageWriter=zt.AbstractMessageWriter=zt.MessageWriter=void 0;var Jc=Ut(),gr=Bn(),km=Qc(),Gc=Cn(),Sm="Content-Length: ",Xc=`\r
|
|
37
|
-
`,Am;(function(e){function t(n){let r=n;return r&&gr.func(r.dispose)&&gr.func(r.onClose)&&gr.func(r.onError)&&gr.func(r.write)}e.is=t})(Am=zt.MessageWriter||(zt.MessageWriter={}));var fi=class{constructor(){this.errorEmitter=new Gc.Emitter,this.closeEmitter=new Gc.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t,n,r){this.errorEmitter.fire([this.asError(t),n,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(t){return t instanceof Error?t:new Error(`Writer received error. Reason: ${gr.string(t.message)?t.message:"unknown"}`)}};zt.AbstractMessageWriter=fi;var Us;(function(e){function t(n){return n===void 0||typeof n=="string"?{charset:n??"utf-8",contentTypeEncoder:(0,Jc.default)().applicationJson.encoder}:{charset:n.charset??"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:n.contentTypeEncoder??(0,Jc.default)().applicationJson.encoder}}e.fromOptions=t})(Us||(Us={}));var Bs=class extends fi{constructor(t,n){super(),this.writable=t,this.options=Us.fromOptions(n),this.errorCount=0,this.writeSemaphore=new km.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(Sm,r.byteLength.toString(),Xc),i.push(Xc),this.doWrite(t,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,t),Promise.reject(i)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};zt.WriteableStreamMessageWriter=Bs});var ol=q(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.createMessageConnection=B.ConnectionOptions=B.CancellationStrategy=B.CancellationSenderStrategy=B.CancellationReceiverStrategy=B.ConnectionStrategy=B.ConnectionError=B.ConnectionErrors=B.LogTraceNotification=B.SetTraceNotification=B.TraceFormat=B.TraceValues=B.Trace=B.NullLogger=B.ProgressType=B.ProgressToken=void 0;var el=Ut(),xe=Bn(),Y=As(),tl=qs(),yr=Cn(),$s=Fs(),br;(function(e){e.type=new Y.NotificationType("$/cancelRequest")})(br||(br={}));var nl;(function(e){function t(n){return typeof n=="string"||typeof n=="number"}e.is=t})(nl=B.ProgressToken||(B.ProgressToken={}));var vr;(function(e){e.type=new Y.NotificationType("$/progress")})(vr||(vr={}));var zs=class{constructor(){}};B.ProgressType=zs;var Ys;(function(e){function t(n){return xe.func(n)}e.is=t})(Ys||(Ys={}));B.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var oe;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(oe=B.Trace||(B.Trace={}));var Nm;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Nm=B.TraceValues||(B.TraceValues={}));(function(e){function t(r){if(!xe.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(oe=B.Trace||(B.Trace={}));var pt;(function(e){e.Text="text",e.JSON="json"})(pt=B.TraceFormat||(B.TraceFormat={}));(function(e){function t(n){return xe.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(pt=B.TraceFormat||(B.TraceFormat={}));var rl;(function(e){e.type=new Y.NotificationType("$/setTrace")})(rl=B.SetTraceNotification||(B.SetTraceNotification={}));var Vs;(function(e){e.type=new Y.NotificationType("$/logTrace")})(Vs=B.LogTraceNotification||(B.LogTraceNotification={}));var di;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(di=B.ConnectionErrors||(B.ConnectionErrors={}));var en=class extends Error{constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,en.prototype)}};B.ConnectionError=en;var il;(function(e){function t(n){let r=n;return r&&xe.func(r.cancelUndispatched)}e.is=t})(il=B.ConnectionStrategy||(B.ConnectionStrategy={}));var Ks;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new $s.CancellationTokenSource}});function t(n){let r=n;return r&&xe.func(r.createCancellationTokenSource)}e.is=t})(Ks=B.CancellationReceiverStrategy||(B.CancellationReceiverStrategy={}));var Qs;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(br.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&xe.func(r.sendCancellation)&&xe.func(r.cleanup)}e.is=t})(Qs=B.CancellationSenderStrategy||(B.CancellationSenderStrategy={}));var Js;(function(e){e.Message=Object.freeze({receiver:Ks.Message,sender:Qs.Message});function t(n){let r=n;return r&&Ks.is(r.receiver)&&Qs.is(r.sender)}e.is=t})(Js=B.CancellationStrategy||(B.CancellationStrategy={}));var qm;(function(e){function t(n){let r=n;return r&&(Js.is(r.cancellationStrategy)||il.is(r.connectionStrategy))}e.is=t})(qm=B.ConnectionOptions||(B.ConnectionOptions={}));var ht;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(ht||(ht={}));function Em(e,t,n,r){let i=n!==void 0?n:B.NullLogger,o=0,s=0,a=0,l="2.0",p,m=new Map,v,C=new Map,P=new Map,x,A=new tl.LinkedMap,W=new Map,z=new Set,R=new Map,b=oe.Off,E=pt.Text,$,te=ht.New,ue=new yr.Emitter,Ge=new yr.Emitter,Rt=new yr.Emitter,Ct=new yr.Emitter,Pt=new yr.Emitter,Ve=r&&r.cancellationStrategy?r.cancellationStrategy:Js.Message;function Mt(h){if(h===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+h.toString()}function Ft(h){return h===null?"res-unknown-"+(++a).toString():"res-"+h.toString()}function fn(){return"not-"+(++s).toString()}function ct(h,S){Y.Message.isRequest(S)?h.set(Mt(S.id),S):Y.Message.isResponse(S)?h.set(Ft(S.id),S):h.set(fn(),S)}function O(h){}function T(){return te===ht.Listening}function N(){return te===ht.Closed}function F(){return te===ht.Disposed}function G(){(te===ht.New||te===ht.Listening)&&(te=ht.Closed,Ge.fire(void 0))}function J(h){ue.fire([h,void 0,void 0])}function j(h){ue.fire(h)}e.onClose(G),e.onError(J),t.onClose(G),t.onError(j);function tt(){x||A.size===0||(x=(0,el.default)().timer.setImmediate(()=>{x=void 0,Le()}))}function Le(){if(A.size===0)return;let h=A.shift();try{Y.Message.isRequest(h)?Kt(h):Y.Message.isNotification(h)?oo(h):Y.Message.isResponse(h)?Tt(h):so(h)}finally{tt()}}let Xe=h=>{try{if(Y.Message.isNotification(h)&&h.method===br.type.method){let S=h.params.id,L=Mt(S),H=A.get(L);if(Y.Message.isRequest(H)){let ae=r?.connectionStrategy,pe=ae&&ae.cancelUndispatched?ae.cancelUndispatched(H,O):void 0;if(pe&&(pe.error!==void 0||pe.result!==void 0)){A.delete(L),R.delete(S),pe.id=H.id,Nn(pe,h.method,Date.now()),t.write(pe).catch(()=>i.error("Sending response for canceled message failed."));return}}let se=R.get(S);if(se!==void 0){se.cancel(),rr(h);return}else z.add(S)}ct(A,h)}finally{tt()}};function Kt(h){if(F())return;function S(Z,ce,re){let _e={jsonrpc:l,id:h.id};Z instanceof Y.ResponseError?_e.error=Z.toJson():_e.result=Z===void 0?null:Z,Nn(_e,ce,re),t.write(_e).catch(()=>i.error("Sending response failed."))}function L(Z,ce,re){let _e={jsonrpc:l,id:h.id,error:Z.toJson()};Nn(_e,ce,re),t.write(_e).catch(()=>i.error("Sending response failed."))}function H(Z,ce,re){Z===void 0&&(Z=null);let _e={jsonrpc:l,id:h.id,result:Z};Nn(_e,ce,re),t.write(_e).catch(()=>i.error("Sending response failed."))}co(h);let se=m.get(h.method),ae,pe;se&&(ae=se.type,pe=se.handler);let Ce=Date.now();if(pe||p){let Z=h.id??String(Date.now()),ce=Ve.receiver.createCancellationTokenSource(Z);h.id!==null&&z.has(h.id)&&ce.cancel(),h.id!==null&&R.set(Z,ce);try{let re;if(pe)if(h.params===void 0){if(ae!==void 0&&ae.numberOfParams!==0){L(new Y.ResponseError(Y.ErrorCodes.InvalidParams,`Request ${h.method} defines ${ae.numberOfParams} params but received none.`),h.method,Ce);return}re=pe(ce.token)}else if(Array.isArray(h.params)){if(ae!==void 0&&ae.parameterStructures===Y.ParameterStructures.byName){L(new Y.ResponseError(Y.ErrorCodes.InvalidParams,`Request ${h.method} defines parameters by name but received parameters by position`),h.method,Ce);return}re=pe(...h.params,ce.token)}else{if(ae!==void 0&&ae.parameterStructures===Y.ParameterStructures.byPosition){L(new Y.ResponseError(Y.ErrorCodes.InvalidParams,`Request ${h.method} defines parameters by position but received parameters by name`),h.method,Ce);return}re=pe(h.params,ce.token)}else p&&(re=p(h.method,h.params,ce.token));let _e=re;re?_e.then?_e.then(Ie=>{R.delete(Z),S(Ie,h.method,Ce)},Ie=>{R.delete(Z),Ie instanceof Y.ResponseError?L(Ie,h.method,Ce):Ie&&xe.string(Ie.message)?L(new Y.ResponseError(Y.ErrorCodes.InternalError,`Request ${h.method} failed with message: ${Ie.message}`),h.method,Ce):L(new Y.ResponseError(Y.ErrorCodes.InternalError,`Request ${h.method} failed unexpectedly without providing any details.`),h.method,Ce)}):(R.delete(Z),S(re,h.method,Ce)):(R.delete(Z),H(re,h.method,Ce))}catch(re){R.delete(Z),re instanceof Y.ResponseError?S(re,h.method,Ce):re&&xe.string(re.message)?L(new Y.ResponseError(Y.ErrorCodes.InternalError,`Request ${h.method} failed with message: ${re.message}`),h.method,Ce):L(new Y.ResponseError(Y.ErrorCodes.InternalError,`Request ${h.method} failed unexpectedly without providing any details.`),h.method,Ce)}}else L(new Y.ResponseError(Y.ErrorCodes.MethodNotFound,`Unhandled method ${h.method}`),h.method,Ce)}function Tt(h){if(!F())if(h.id===null)h.error?i.error(`Received response message without id: Error is:
|
|
38
|
-
${JSON.stringify(h.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let S=h.id,
|
|
39
|
-
${JSON.stringify(h,null,4)}`);let S=h;if(
|
|
32
|
+
`+e.slice(i+1):r+=e.slice(o),r}function em(e){return Sh!==e&&dn!==e&&kh!==e&&Mh!==e&&Hh!==e&&Uh!==e&&$h!==e&&Yh!==e&&Nh!==e&&Eh!==e&&Oh!==e&&Ah!==e&&zh!==e&&Ih!==e&&Bo!==e&&Uo!==e&&qh!==e&&Lh!==e&&!Ee[e]&&!wu(e)}function wu(e){return!(32<=e&&e<=126||e===133||160<=e&&e<=55295||57344<=e&&e<=65533||65536<=e&&e<=1114111)}function tm(e,t,n){var r="",i=e.tag,o,s;for(o=0,s=n.length;o<s;o+=1)pn(e,t,n[o],!1,!1)&&(o!==0&&(r+=", "),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function nm(e,t,n,r){var i="",o=e.tag,s,u;for(s=0,u=n.length;s<u;s+=1)pn(e,t+1,n[s],!0,!0)&&((!r||s!==0)&&(i+=$o(e,t)),i+="- "+e.dump);e.tag=o,e.dump=i||"[]"}function rm(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,u,c,p,m;for(s=0,u=o.length;s<u;s+=1)m="",s!==0&&(m+=", "),c=o[s],p=n[c],pn(e,t,c,!1,!1)&&(e.dump.length>1024&&(m+="? "),m+=e.dump+": ",pn(e,t,p,!1,!1)&&(m+=e.dump,r+=m));e.tag=i,e.dump="{"+r+"}"}function im(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),u,c,p,m,v,C;for(u=0,c=s.length;u<c;u+=1)C="",(!r||u!==0)&&(C+=$o(e,t)),p=s[u],m=n[p],pn(e,t+1,p,!0,!0)&&(v=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,v&&(e.dump&&dn===e.dump.charCodeAt(0)?C+="?":C+="? "),C+=e.dump,v&&(C+=$o(e,t)),pn(e,t+1,m,!0,v)&&(e.dump&&dn===e.dump.charCodeAt(0)?C+=":":C+=": ",C+=e.dump,i+=C));e.tag=o,e.dump=i||"{}"}function Pu(e,t,n){var r,i,o,s,u,c;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o<s;o+=1)if(u=i[o],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof t=="object"&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){if(e.tag=n?u.tag:"?",u.represent){if(c=e.styleMap[u.tag]||u.defaultStyle,Vo.call(u.represent)==="[object Function]")r=u.represent(t,c);else if(Tu.call(u.represent,c))r=u.represent[c](t,c);else throw new Yo("!<"+u.tag+'> tag resolver accepts not "'+c+'" style');e.dump=r}return!0}return!1}function pn(e,t,n,r,i){e.tag=null,e.dump=n,Pu(e,n,!1)||Pu(e,n,!0);var o=Vo.call(e.dump);r&&(r=0>e.flowLevel||e.flowLevel>t),(e.tag!==null&&e.tag!=="?"||e.indent!==2&&t>0)&&(i=!1);var s=o==="[object Object]"||o==="[object Array]",u,c;if(s&&(u=e.duplicates.indexOf(n),c=u!==-1),c&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(s&&c&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),o==="[object Object]")r&&Object.keys(e.dump).length!==0?(im(e,t,e.dump,i),c&&(e.dump="&ref_"+u+(t===0?`
|
|
33
|
+
`:"")+e.dump)):(rm(e,t,e.dump),c&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object Array]")r&&e.dump.length!==0?(nm(e,t,e.dump,i),c&&(e.dump="&ref_"+u+(t===0?`
|
|
34
|
+
`:"")+e.dump)):(tm(e,t,e.dump),c&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&Xh(e,e.dump,t);else{if(e.skipInvalid)return!1;throw new Yo("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function om(e,t){var n=[],r=[],i,o;for(zo(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function zo(e,t,n){var r=Vo.call(e),i,o,s;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)n.indexOf(o)===-1&&n.push(o);else if(t.push(e),Array.isArray(e))for(o=0,s=e.length;o<s;o+=1)zo(e[o],t,n);else for(i=Object.keys(e),o=0,s=i.length;o<s;o+=1)zo(e[i[o]],t,n)}function xu(e,t){t=t||{};var n=new Jh(t);return om(e,n),pn(n,0,e,!0,!0)?n.dump+`
|
|
35
|
+
`:""}qn.dump=xu;function sm(e,t){return xu(e,ir.extend({schema:xh},t))}qn.safeDump=sm});var ku=N(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.determineScalarType=et.ScalarType=et.parseYamlFloat=et.parseYamlInteger=et.parseYamlBoolean=void 0;function am(e){if(["true","True","TRUE"].lastIndexOf(e)>=0)return!0;if(["false","False","FALSE"].lastIndexOf(e)>=0)return!1;throw`Invalid boolean "${e}"`}et.parseYamlBoolean=am;function cm(e){return e.lastIndexOf("0o",0)===0?parseInt(e.substring(2),8):parseInt(e)}function um(e){let t=cm(e);if(isNaN(t))throw`Invalid integer "${e}"`;return t}et.parseYamlInteger=um;function lm(e){if([".nan",".NaN",".NAN"].lastIndexOf(e)>=0)return NaN;let n=/^([-+])?(?:\.inf|\.Inf|\.INF)$/.exec(e);if(n)return n[1]==="-"?-1/0:1/0;let r=parseFloat(e);if(!isNaN(r))return r;throw`Invalid float "${e}"`}et.parseYamlFloat=lm;var Lt;(function(e){e[e.null=0]="null",e[e.bool=1]="bool",e[e.int=2]="int",e[e.float=3]="float",e[e.string=4]="string"})(Lt=et.ScalarType||(et.ScalarType={}));function fm(e){if(e===void 0)return Lt.null;if(e.doubleQuoted||!e.plainScalar||e.singleQuoted)return Lt.string;let t=e.value;if(["null","Null","NULL","~",""].indexOf(t)>=0||t==null)return Lt.null;if(["true","True","TRUE","false","False","FALSE"].indexOf(t)>=0)return Lt.bool;let n=/^[-+]?[0-9]+$/,r=/^0o[0-7]+$/,i=/^0x[0-9a-fA-F]+$/;if(n.test(t)||r.test(t)||i.test(t))return Lt.int;let o=/^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/,s=/^[-+]?(\.inf|\.Inf|\.INF)$/;return o.test(t)||s.test(t)||[".nan",".NaN",".NAN"].indexOf(t)>=0?Lt.float:Lt.string}et.determineScalarType=fm});var Zr=N(we=>{"use strict";var dm=we&&we.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Au=we&&we.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&dm(t,e,n)};Object.defineProperty(we,"__esModule",{value:!0});we.safeDump=we.dump=we.safeLoadAll=we.safeLoad=we.loadAll=we.load=void 0;var Xr=Ru();Object.defineProperty(we,"load",{enumerable:!0,get:function(){return Xr.load}});Object.defineProperty(we,"loadAll",{enumerable:!0,get:function(){return Xr.loadAll}});Object.defineProperty(we,"safeLoad",{enumerable:!0,get:function(){return Xr.safeLoad}});Object.defineProperty(we,"safeLoadAll",{enumerable:!0,get:function(){return Xr.safeLoadAll}});var Nu=Su();Object.defineProperty(we,"dump",{enumerable:!0,get:function(){return Nu.dump}});Object.defineProperty(we,"safeDump",{enumerable:!0,get:function(){return Nu.safeDump}});we.YAMLException=Sn();Au(Ft(),we);Au(ku(),we)});var En=N(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.stringArray=Be.array=Be.func=Be.error=Be.number=Be.string=Be.boolean=void 0;function vm(e){return e===!0||e===!1}Be.boolean=vm;function Ku(e){return typeof e=="string"||e instanceof String}Be.string=Ku;function bm(e){return typeof e=="number"||e instanceof Number}Be.number=bm;function _m(e){return e instanceof Error}Be.error=_m;function Rm(e){return typeof e=="function"}Be.func=Rm;function Qu(e){return Array.isArray(e)}Be.array=Qu;function Dm(e){return Qu(e)&&e.every(t=>Ku(t))}Be.stringArray=Dm});var Ps=N(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.Message=U.NotificationType9=U.NotificationType8=U.NotificationType7=U.NotificationType6=U.NotificationType5=U.NotificationType4=U.NotificationType3=U.NotificationType2=U.NotificationType1=U.NotificationType0=U.NotificationType=U.RequestType9=U.RequestType8=U.RequestType7=U.RequestType6=U.RequestType5=U.RequestType4=U.RequestType3=U.RequestType2=U.RequestType1=U.RequestType=U.RequestType0=U.AbstractMessageSignature=U.ParameterStructures=U.ResponseError=U.ErrorCodes=void 0;var gn=En(),Ju;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(Ju=U.ErrorCodes||(U.ErrorCodes={}));var ur=class extends Error{constructor(t,n,r){super(n),this.code=gn.number(t)?t:Ju.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,ur.prototype)}toJson(){let t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),t}};U.ResponseError=ur;var Oe=class{constructor(t){this.kind=t}static is(t){return t===Oe.auto||t===Oe.byName||t===Oe.byPosition}toString(){return this.kind}};U.ParameterStructures=Oe;Oe.auto=new Oe("auto");Oe.byPosition=new Oe("byPosition");Oe.byName=new Oe("byName");var he=class{constructor(t,n){this.method=t,this.numberOfParams=n}get parameterStructures(){return Oe.auto}};U.AbstractMessageSignature=he;var ns=class extends he{constructor(t){super(t,0)}};U.RequestType0=ns;var rs=class extends he{constructor(t,n=Oe.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};U.RequestType=rs;var is=class extends he{constructor(t,n=Oe.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};U.RequestType1=is;var os=class extends he{constructor(t){super(t,2)}};U.RequestType2=os;var ss=class extends he{constructor(t){super(t,3)}};U.RequestType3=ss;var as=class extends he{constructor(t){super(t,4)}};U.RequestType4=as;var cs=class extends he{constructor(t){super(t,5)}};U.RequestType5=cs;var us=class extends he{constructor(t){super(t,6)}};U.RequestType6=us;var ls=class extends he{constructor(t){super(t,7)}};U.RequestType7=ls;var fs=class extends he{constructor(t){super(t,8)}};U.RequestType8=fs;var ds=class extends he{constructor(t){super(t,9)}};U.RequestType9=ds;var ps=class extends he{constructor(t,n=Oe.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};U.NotificationType=ps;var hs=class extends he{constructor(t){super(t,0)}};U.NotificationType0=hs;var ms=class extends he{constructor(t,n=Oe.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};U.NotificationType1=ms;var gs=class extends he{constructor(t){super(t,2)}};U.NotificationType2=gs;var ys=class extends he{constructor(t){super(t,3)}};U.NotificationType3=ys;var vs=class extends he{constructor(t){super(t,4)}};U.NotificationType4=vs;var bs=class extends he{constructor(t){super(t,5)}};U.NotificationType5=bs;var _s=class extends he{constructor(t){super(t,6)}};U.NotificationType6=_s;var Rs=class extends he{constructor(t){super(t,7)}};U.NotificationType7=Rs;var Ds=class extends he{constructor(t){super(t,8)}};U.NotificationType8=Ds;var Cs=class extends he{constructor(t){super(t,9)}};U.NotificationType9=Cs;var Cm;(function(e){function t(i){let o=i;return o&&gn.string(o.method)&&(gn.string(o.id)||gn.number(o.id))}e.isRequest=t;function n(i){let o=i;return o&&gn.string(o.method)&&i.id===void 0}e.isNotification=n;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(gn.string(o.id)||gn.number(o.id)||o.id===null)}e.isResponse=r})(Cm=U.Message||(U.Message={}))});var ws=N(jt=>{"use strict";var Gu;Object.defineProperty(jt,"__esModule",{value:!0});jt.LRUCache=jt.LinkedMap=jt.Touch=void 0;var Ve;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(Ve=jt.Touch||(jt.Touch={}));var oi=class{constructor(){this[Gu]="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(t){return this._map.has(t)}get(t,n=Ve.None){let r=this._map.get(t);if(!!r)return n!==Ve.None&&this.touch(r,n),r.value}set(t,n,r=Ve.None){let i=this._map.get(t);if(i)i.value=n,r!==Ve.None&&this.touch(i,r);else{switch(i={key:t,value:n,next:void 0,previous:void 0},r){case Ve.None:this.addItemLast(i);break;case Ve.First:this.addItemFirst(i);break;case Ve.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(t,i),this._size++}return this}delete(t){return!!this.remove(t)}remove(t){let n=this._map.get(t);if(!!n)return this._map.delete(t),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let t=this._head;return this._map.delete(t.key),this.removeItem(t),this._size--,t.value}forEach(t,n){let r=this._state,i=this._head;for(;i;){if(n?t.bind(n)(i.value,i.key,this):t(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.key,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}values(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:n.value,done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}entries(){let t=this._state,n=this._head,r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");if(n){let i={value:[n.key,n.value],done:!1};return n=n.next,i}else return{value:void 0,done:!0}}};return r}[(Gu=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(t){if(t>=this.size)return;if(t===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>t;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}addItemFirst(t){if(!this._head&&!this._tail)this._tail=t;else if(this._head)t.next=this._head,this._head.previous=t;else throw new Error("Invalid list");this._head=t,this._state++}addItemLast(t){if(!this._head&&!this._tail)this._head=t;else if(this._tail)t.previous=this._tail,this._tail.next=t;else throw new Error("Invalid list");this._tail=t,this._state++}removeItem(t){if(t===this._head&&t===this._tail)this._head=void 0,this._tail=void 0;else if(t===this._head){if(!t.next)throw new Error("Invalid list");t.next.previous=void 0,this._head=t.next}else if(t===this._tail){if(!t.previous)throw new Error("Invalid list");t.previous.next=void 0,this._tail=t.previous}else{let n=t.next,r=t.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}t.next=void 0,t.previous=void 0,this._state++}touch(t,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==Ve.First&&n!==Ve.Last)){if(n===Ve.First){if(t===this._head)return;let r=t.next,i=t.previous;t===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),t.previous=void 0,t.next=this._head,this._head.previous=t,this._head=t,this._state++}else if(n===Ve.Last){if(t===this._tail)return;let r=t.next,i=t.previous;t===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),t.next=void 0,t.previous=this._tail,this._tail.next=t,this._tail=t,this._state++}}}toJSON(){let t=[];return this.forEach((n,r)=>{t.push([r,n])}),t}fromJSON(t){this.clear();for(let[n,r]of t)this.set(n,r)}};jt.LinkedMap=oi;var Ts=class extends oi{constructor(t,n=1){super(),this._limit=t,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(t){this._limit=t,this.checkTrim()}get ratio(){return this._ratio}set ratio(t){this._ratio=Math.min(Math.max(0,t),1),this.checkTrim()}get(t,n=Ve.AsNew){return super.get(t,n)}peek(t){return super.get(t,Ve.None)}set(t,n){return super.set(t,n,Ve.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};jt.LRUCache=Ts});var Xu=N(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.Disposable=void 0;var Pm;(function(e){function t(n){return{dispose:n}}e.create=t})(Pm=lr.Disposable||(lr.Disposable={}))});var Qt=N(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});var xs;function Ss(){if(xs===void 0)throw new Error("No runtime abstraction layer installed");return xs}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");xs=n}e.install=t})(Ss||(Ss={}));ks.default=Ss});var Mn=N(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.Emitter=yn.Event=void 0;var Tm=Qt(),wm;(function(e){let t={dispose(){}};e.None=function(){return t}})(wm=yn.Event||(yn.Event={}));var As=class{add(t,n=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(n),Array.isArray(r)&&r.push({dispose:()=>this.remove(t,n)})}remove(t,n=null){if(!this._callbacks)return;let r=!1;for(let i=0,o=this._callbacks.length;i<o;i++)if(this._callbacks[i]===t)if(this._contexts[i]===n){this._callbacks.splice(i,1),this._contexts.splice(i,1);return}else r=!0;if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...t){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let o=0,s=r.length;o<s;o++)try{n.push(r[o].apply(i[o],t))}catch(u){(0,Tm.default)().console.error(u)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},On=class{constructor(t){this._options=t}get event(){return this._event||(this._event=(t,n,r)=>{this._callbacks||(this._callbacks=new As),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let i={dispose:()=>{!this._callbacks||(this._callbacks.remove(t,n),i.dispose=On._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};yn.Emitter=On;On._noop=function(){}});var ai=N(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.CancellationTokenSource=vn.CancellationToken=void 0;var xm=Qt(),Sm=En(),Ns=Mn(),qs;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ns.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ns.Event.None});function t(n){let r=n;return r&&(r===e.None||r===e.Cancelled||Sm.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.is=t})(qs=vn.CancellationToken||(vn.CancellationToken={}));var km=Object.freeze(function(e,t){let n=(0,xm.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}),si=class{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?km:(this._emitter||(this._emitter=new Ns.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},Es=class{get token(){return this._token||(this._token=new si),this._token}cancel(){this._token?this._token.cancel():this._token=qs.Cancelled}dispose(){this._token?this._token instanceof si&&this._token.dispose():this._token=qs.None}};vn.CancellationTokenSource=Es});var Zu=N(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.SharedArrayReceiverStrategy=Fn.SharedArraySenderStrategy=void 0;var Am=ai(),fr;(function(e){e.Continue=0,e.Cancelled=1})(fr||(fr={}));var Os=class{constructor(){this.buffers=new Map}enableCancellation(t){if(t.id===null)return;let n=new SharedArrayBuffer(4),r=new Int32Array(n,0,1);r[0]=fr.Continue,this.buffers.set(t.id,n),t.$cancellationData=n}async sendCancellation(t,n){let r=this.buffers.get(n);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,fr.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};Fn.SharedArraySenderStrategy=Os;var Ms=class{constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===fr.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Fs=class{constructor(t){this.token=new Ms(t)}cancel(){}dispose(){}},Ls=class{constructor(){this.kind="request"}createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new Am.CancellationTokenSource:new Fs(n)}};Fn.SharedArrayReceiverStrategy=Ls});var js=N(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.Semaphore=void 0;var Nm=Qt(),Is=class{constructor(t=1){if(t<=0)throw new Error("Capacity must be greater than 0");this._capacity=t,this._active=0,this._waiting=[]}lock(t){return new Promise((n,r)=>{this._waiting.push({thunk:t,resolve:n,reject:r}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,Nm.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let n=t.thunk();n instanceof Promise?n.then(r=>{this._active--,t.resolve(r),this.runNext()},r=>{this._active--,t.reject(r),this.runNext()}):(this._active--,t.resolve(n),this.runNext())}catch(n){this._active--,t.reject(n),this.runNext()}}};ci.Semaphore=Is});var el=N(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.ReadableStreamMessageReader=Wt.AbstractMessageReader=Wt.MessageReader=void 0;var Hs=Qt(),Ln=En(),Ws=Mn(),qm=js(),Em;(function(e){function t(n){let r=n;return r&&Ln.func(r.listen)&&Ln.func(r.dispose)&&Ln.func(r.onError)&&Ln.func(r.onClose)&&Ln.func(r.onPartialMessage)}e.is=t})(Em=Wt.MessageReader||(Wt.MessageReader={}));var ui=class{constructor(){this.errorEmitter=new Ws.Emitter,this.closeEmitter=new Ws.Emitter,this.partialMessageEmitter=new Ws.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t){this.errorEmitter.fire(this.asError(t))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(t){this.partialMessageEmitter.fire(t)}asError(t){return t instanceof Error?t:new Error(`Reader received error. Reason: ${Ln.string(t.message)?t.message:"unknown"}`)}};Wt.AbstractMessageReader=ui;var Us;(function(e){function t(n){let r,i,o,s=new Map,u,c=new Map;if(n===void 0||typeof n=="string")r=n??"utf-8";else{if(r=n.charset??"utf-8",n.contentDecoder!==void 0&&(o=n.contentDecoder,s.set(o.name,o)),n.contentDecoders!==void 0)for(let p of n.contentDecoders)s.set(p.name,p);if(n.contentTypeDecoder!==void 0&&(u=n.contentTypeDecoder,c.set(u.name,u)),n.contentTypeDecoders!==void 0)for(let p of n.contentTypeDecoders)c.set(p.name,p)}return u===void 0&&(u=(0,Hs.default)().applicationJson.decoder,c.set(u.name,u)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:u,contentTypeDecoders:c}}e.fromOptions=t})(Us||(Us={}));var Bs=class extends ui{constructor(t,n){super(),this.readable=t,this.options=Us.fromOptions(n),this.buffer=(0,Hs.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new qm.Semaphore(1)}set partialMessageTimeout(t){this._partialMessageTimeout=t}get partialMessageTimeout(){return this._partialMessageTimeout}listen(t){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=t;let n=this.readable.onData(r=>{this.onData(r)});return this.readable.onError(r=>this.fireError(r)),this.readable.onClose(()=>this.fireClose()),n}onData(t){for(this.buffer.append(t);;){if(this.nextMessageLength===-1){let r=this.buffer.tryReadHeaders(!0);if(!r)return;let i=r.get("content-length");if(!i){this.fireError(new Error("Header must provide a Content-Length property."));return}let o=parseInt(i);if(isNaN(o)){this.fireError(new Error("Content-Length value must be a number."));return}this.nextMessageLength=o}let n=this.buffer.tryReadBody(this.nextMessageLength);if(n===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let r=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(n):n,i=await this.options.contentTypeDecoder.decode(r,this.options);this.callback(i)}).catch(r=>{this.fireError(r)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,Hs.default)().timer.setTimeout((t,n)=>{this.partialMessageTimer=void 0,t===this.messageToken&&(this.firePartialMessage({messageToken:t,waitingTime:n}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};Wt.ReadableStreamMessageReader=Bs});var il=N(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.WriteableStreamMessageWriter=Ht.AbstractMessageWriter=Ht.MessageWriter=void 0;var tl=Qt(),dr=En(),Om=js(),nl=Mn(),Mm="Content-Length: ",rl=`\r
|
|
36
|
+
`,Fm;(function(e){function t(n){let r=n;return r&&dr.func(r.dispose)&&dr.func(r.onClose)&&dr.func(r.onError)&&dr.func(r.write)}e.is=t})(Fm=Ht.MessageWriter||(Ht.MessageWriter={}));var li=class{constructor(){this.errorEmitter=new nl.Emitter,this.closeEmitter=new nl.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(t,n,r){this.errorEmitter.fire([this.asError(t),n,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(t){return t instanceof Error?t:new Error(`Writer received error. Reason: ${dr.string(t.message)?t.message:"unknown"}`)}};Ht.AbstractMessageWriter=li;var $s;(function(e){function t(n){return n===void 0||typeof n=="string"?{charset:n??"utf-8",contentTypeEncoder:(0,tl.default)().applicationJson.encoder}:{charset:n.charset??"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:n.contentTypeEncoder??(0,tl.default)().applicationJson.encoder}}e.fromOptions=t})($s||($s={}));var zs=class extends li{constructor(t,n){super(),this.writable=t,this.options=$s.fromOptions(n),this.errorCount=0,this.writeSemaphore=new Om.Semaphore(1),this.writable.onError(r=>this.fireError(r)),this.writable.onClose(()=>this.fireClose())}async write(t){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(t,this.options).then(r=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(r):r).then(r=>{let i=[];return i.push(Mm,r.byteLength.toString(),rl),i.push(rl),this.doWrite(t,i,r)},r=>{throw this.fireError(r),r}))}async doWrite(t,n,r){try{return await this.writable.write(n.join(""),"ascii"),this.writable.write(r)}catch(i){return this.handleError(i,t),Promise.reject(i)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){this.writable.end()}};Ht.WriteableStreamMessageWriter=zs});var ol=N(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.AbstractMessageBuffer=void 0;var Lm=13,Im=10,jm=`\r
|
|
37
|
+
`,Ys=class{constructor(t="utf-8"){this._encoding=t,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(t){let n=typeof t=="string"?this.fromString(t,this._encoding):t;this._chunks.push(n),this._totalLength+=n.byteLength}tryReadHeaders(t=!1){if(this._chunks.length===0)return;let n=0,r=0,i=0,o=0;e:for(;r<this._chunks.length;){let p=this._chunks[r];i=0;t:for(;i<p.length;){switch(p[i]){case Lm:switch(n){case 0:n=1;break;case 2:n=3;break;default:n=0}break;case Im:switch(n){case 1:n=2;break;case 3:n=4,i++;break e;default:n=0}break;default:n=0}i++}o+=p.byteLength,r++}if(n!==4)return;let s=this._read(o+i),u=new Map,c=this.toString(s,"ascii").split(jm);if(c.length<2)return u;for(let p=0;p<c.length-2;p++){let m=c[p],v=m.indexOf(":");if(v===-1)throw new Error("Message header must separate key and value using :");let C=m.substr(0,v),P=m.substr(v+1).trim();u.set(t?C.toLowerCase():C,P)}return u}tryReadBody(t){if(!(this._totalLength<t))return this._read(t)}get numberOfBytes(){return this._totalLength}_read(t){if(t===0)return this.emptyBuffer();if(t>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===t){let o=this._chunks[0];return this._chunks.shift(),this._totalLength-=t,this.asNative(o)}if(this._chunks[0].byteLength>t){let o=this._chunks[0],s=this.asNative(o,t);return this._chunks[0]=o.slice(t),this._totalLength-=t,s}let n=this.allocNative(t),r=0,i=0;for(;t>0;){let o=this._chunks[i];if(o.byteLength>t){let s=o.slice(0,t);n.set(s,r),r+=t,this._chunks[i]=o.slice(t),this._totalLength-=t,t-=t}else n.set(o,r),r+=o.byteLength,this._chunks.shift(),this._totalLength-=o.byteLength,t-=o.byteLength}return n}};fi.AbstractMessageBuffer=Ys});var dl=N(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.createMessageConnection=W.ConnectionOptions=W.MessageStrategy=W.CancellationStrategy=W.CancellationSenderStrategy=W.CancellationReceiverStrategy=W.RequestCancellationReceiverStrategy=W.IdCancellationReceiverStrategy=W.ConnectionStrategy=W.ConnectionError=W.ConnectionErrors=W.LogTraceNotification=W.SetTraceNotification=W.TraceFormat=W.TraceValues=W.Trace=W.NullLogger=W.ProgressType=W.ProgressToken=void 0;var sl=Qt(),be=En(),z=Ps(),al=ws(),pr=Mn(),Vs=ai(),mr;(function(e){e.type=new z.NotificationType("$/cancelRequest")})(mr||(mr={}));var cl;(function(e){function t(n){return typeof n=="string"||typeof n=="number"}e.is=t})(cl=W.ProgressToken||(W.ProgressToken={}));var hr;(function(e){e.type=new z.NotificationType("$/progress")})(hr||(hr={}));var Ks=class{constructor(){}};W.ProgressType=Ks;var Qs;(function(e){function t(n){return be.func(n)}e.is=t})(Qs||(Qs={}));W.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var ae;(function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"})(ae=W.Trace||(W.Trace={}));var Wm;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Wm=W.TraceValues||(W.TraceValues={}));(function(e){function t(r){if(!be.string(r))return e.Off;switch(r=r.toLowerCase(),r){case"off":return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose;default:return e.Off}}e.fromString=t;function n(r){switch(r){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}e.toString=n})(ae=W.Trace||(W.Trace={}));var ht;(function(e){e.Text="text",e.JSON="json"})(ht=W.TraceFormat||(W.TraceFormat={}));(function(e){function t(n){return be.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(ht=W.TraceFormat||(W.TraceFormat={}));var ul;(function(e){e.type=new z.NotificationType("$/setTrace")})(ul=W.SetTraceNotification||(W.SetTraceNotification={}));var Js;(function(e){e.type=new z.NotificationType("$/logTrace")})(Js=W.LogTraceNotification||(W.LogTraceNotification={}));var di;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(di=W.ConnectionErrors||(W.ConnectionErrors={}));var Jt=class extends Error{constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,Jt.prototype)}};W.ConnectionError=Jt;var ll;(function(e){function t(n){let r=n;return r&&be.func(r.cancelUndispatched)}e.is=t})(ll=W.ConnectionStrategy||(W.ConnectionStrategy={}));var Zs;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&be.func(r.createCancellationTokenSource)&&(r.dispose===void 0||be.func(r.dispose))}e.is=t})(Zs=W.IdCancellationReceiverStrategy||(W.IdCancellationReceiverStrategy={}));var fl;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&be.func(r.createCancellationTokenSource)&&(r.dispose===void 0||be.func(r.dispose))}e.is=t})(fl=W.RequestCancellationReceiverStrategy||(W.RequestCancellationReceiverStrategy={}));var Gs;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Vs.CancellationTokenSource}});function t(n){return Zs.is(n)||fl.is(n)}e.is=t})(Gs=W.CancellationReceiverStrategy||(W.CancellationReceiverStrategy={}));var Xs;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(mr.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&be.func(r.sendCancellation)&&be.func(r.cleanup)}e.is=t})(Xs=W.CancellationSenderStrategy||(W.CancellationSenderStrategy={}));var ea;(function(e){e.Message=Object.freeze({receiver:Gs.Message,sender:Xs.Message});function t(n){let r=n;return r&&Gs.is(r.receiver)&&Xs.is(r.sender)}e.is=t})(ea=W.CancellationStrategy||(W.CancellationStrategy={}));var ta;(function(e){function t(n){let r=n;return r&&be.func(r.handleMessage)}e.is=t})(ta=W.MessageStrategy||(W.MessageStrategy={}));var Hm;(function(e){function t(n){let r=n;return r&&(ea.is(r.cancellationStrategy)||ll.is(r.connectionStrategy)||ta.is(r.messageStrategy))}e.is=t})(Hm=W.ConnectionOptions||(W.ConnectionOptions={}));var mt;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(mt||(mt={}));function Um(e,t,n,r){let i=n!==void 0?n:W.NullLogger,o=0,s=0,u=0,c="2.0",p,m=new Map,v,C=new Map,P=new Map,w,A=new al.LinkedMap,B=new Map,L=new Set,D=new Map,b=ae.Off,q=ht.Text,$,Z=mt.New,ue=new pr.Emitter,Ue=new pr.Emitter,ut=new pr.Emitter,lt=new pr.Emitter,F=new pr.Emitter,x=r&&r.cancellationStrategy?r.cancellationStrategy:ea.Message;function H(h){if(h===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+h.toString()}function I(h){return h===null?"res-unknown-"+(++u).toString():"res-"+h.toString()}function ie(){return"not-"+(++s).toString()}function X(h,S){z.Message.isRequest(S)?h.set(H(S.id),S):z.Message.isResponse(S)?h.set(I(S.id),S):h.set(ie(),S)}function K(h){}function ze(){return Z===mt.Listening}function Ae(){return Z===mt.Closed}function ce(){return Z===mt.Disposed}function Ct(){(Z===mt.New||Z===mt.Listening)&&(Z=mt.Closed,Ue.fire(void 0))}function Pn(h){ue.fire([h,void 0,void 0])}function Q(h){ue.fire(h)}e.onClose(Ct),e.onError(Pn),t.onClose(Ct),t.onError(Q);function Mr(){w||A.size===0||(w=(0,sl.default)().timer.setImmediate(()=>{w=void 0,so()}))}function Fr(h){z.Message.isRequest(h)?co(h):z.Message.isNotification(h)?lo(h):z.Message.isResponse(h)?uo(h):Gn(h)}function so(){if(A.size===0)return;let h=A.shift();try{let S=r?.messageStrategy;ta.is(S)?S.handleMessage(h,Fr):Fr(h)}finally{Mr()}}let ao=h=>{try{if(z.Message.isNotification(h)&&h.method===mr.type.method){let S=h.params.id,O=H(S),j=A.get(O);if(z.Message.isRequest(j)){let se=r?.connectionStrategy,me=se&&se.cancelUndispatched?se.cancelUndispatched(j,K):void 0;if(me&&(me.error!==void 0||me.result!==void 0)){A.delete(O),D.delete(S),me.id=j.id,Tn(me,h.method,Date.now()),t.write(me).catch(()=>i.error("Sending response for canceled message failed."));return}}let le=D.get(S);if(le!==void 0){le.cancel(),Xn(h);return}else L.add(S)}X(A,h)}finally{Mr()}};function co(h){if(ce())return;function S(ee,fe,oe){let Pe={jsonrpc:c,id:h.id};ee instanceof z.ResponseError?Pe.error=ee.toJson():Pe.result=ee===void 0?null:ee,Tn(Pe,fe,oe),t.write(Pe).catch(()=>i.error("Sending response failed."))}function O(ee,fe,oe){let Pe={jsonrpc:c,id:h.id,error:ee.toJson()};Tn(Pe,fe,oe),t.write(Pe).catch(()=>i.error("Sending response failed."))}function j(ee,fe,oe){ee===void 0&&(ee=null);let Pe={jsonrpc:c,id:h.id,result:ee};Tn(Pe,fe,oe),t.write(Pe).catch(()=>i.error("Sending response failed."))}ho(h);let le=m.get(h.method),se,me;le&&(se=le.type,me=le.handler);let ge=Date.now();if(me||p){let ee=h.id??String(Date.now()),fe=Zs.is(x.receiver)?x.receiver.createCancellationTokenSource(ee):x.receiver.createCancellationTokenSource(h);h.id!==null&&L.has(h.id)&&fe.cancel(),h.id!==null&&D.set(ee,fe);try{let oe;if(me)if(h.params===void 0){if(se!==void 0&&se.numberOfParams!==0){O(new z.ResponseError(z.ErrorCodes.InvalidParams,`Request ${h.method} defines ${se.numberOfParams} params but received none.`),h.method,ge);return}oe=me(fe.token)}else if(Array.isArray(h.params)){if(se!==void 0&&se.parameterStructures===z.ParameterStructures.byName){O(new z.ResponseError(z.ErrorCodes.InvalidParams,`Request ${h.method} defines parameters by name but received parameters by position`),h.method,ge);return}oe=me(...h.params,fe.token)}else{if(se!==void 0&&se.parameterStructures===z.ParameterStructures.byPosition){O(new z.ResponseError(z.ErrorCodes.InvalidParams,`Request ${h.method} defines parameters by position but received parameters by name`),h.method,ge);return}oe=me(h.params,fe.token)}else p&&(oe=p(h.method,h.params,fe.token));let Pe=oe;oe?Pe.then?Pe.then(Me=>{D.delete(ee),S(Me,h.method,ge)},Me=>{D.delete(ee),Me instanceof z.ResponseError?O(Me,h.method,ge):Me&&be.string(Me.message)?O(new z.ResponseError(z.ErrorCodes.InternalError,`Request ${h.method} failed with message: ${Me.message}`),h.method,ge):O(new z.ResponseError(z.ErrorCodes.InternalError,`Request ${h.method} failed unexpectedly without providing any details.`),h.method,ge)}):(D.delete(ee),S(oe,h.method,ge)):(D.delete(ee),j(oe,h.method,ge))}catch(oe){D.delete(ee),oe instanceof z.ResponseError?S(oe,h.method,ge):oe&&be.string(oe.message)?O(new z.ResponseError(z.ErrorCodes.InternalError,`Request ${h.method} failed with message: ${oe.message}`),h.method,ge):O(new z.ResponseError(z.ErrorCodes.InternalError,`Request ${h.method} failed unexpectedly without providing any details.`),h.method,ge)}}else O(new z.ResponseError(z.ErrorCodes.MethodNotFound,`Unhandled method ${h.method}`),h.method,ge)}function uo(h){if(!ce())if(h.id===null)h.error?i.error(`Received response message without id: Error is:
|
|
38
|
+
${JSON.stringify(h.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let S=h.id,O=B.get(S);if(mo(h,O),O!==void 0){B.delete(S);try{if(h.error){let j=h.error;O.reject(new z.ResponseError(j.code,j.message,j.data))}else if(h.result!==void 0)O.resolve(h.result);else throw new Error("Should never happen.")}catch(j){j.message?i.error(`Response handler '${O.method}' failed with message: ${j.message}`):i.error(`Response handler '${O.method}' failed unexpectedly.`)}}}}function lo(h){if(ce())return;let S,O;if(h.method===mr.type.method){let j=h.params.id;L.delete(j),Xn(h);return}else{let j=C.get(h.method);j&&(O=j.handler,S=j.type)}if(O||v)try{if(Xn(h),O)if(h.params===void 0)S!==void 0&&S.numberOfParams!==0&&S.parameterStructures!==z.ParameterStructures.byName&&i.error(`Notification ${h.method} defines ${S.numberOfParams} params but received none.`),O();else if(Array.isArray(h.params)){let j=h.params;h.method===hr.type.method&&j.length===2&&cl.is(j[0])?O({token:j[0],value:j[1]}):(S!==void 0&&(S.parameterStructures===z.ParameterStructures.byName&&i.error(`Notification ${h.method} defines parameters by name but received parameters by position`),S.numberOfParams!==h.params.length&&i.error(`Notification ${h.method} defines ${S.numberOfParams} params but received ${j.length} arguments`)),O(...j))}else S!==void 0&&S.parameterStructures===z.ParameterStructures.byPosition&&i.error(`Notification ${h.method} defines parameters by position but received parameters by name`),O(h.params);else v&&v(h.method,h.params)}catch(j){j.message?i.error(`Notification handler '${h.method}' failed with message: ${j.message}`):i.error(`Notification handler '${h.method}' failed unexpectedly.`)}else ut.fire(h)}function Gn(h){if(!h){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
|
|
39
|
+
${JSON.stringify(h,null,4)}`);let S=h;if(be.string(S.id)||be.number(S.id)){let O=S.id,j=B.get(O);j&&j.reject(new Error("The received response has neither a result nor an error property."))}}function Pt(h){if(h!=null)switch(b){case ae.Verbose:return JSON.stringify(h,null,4);case ae.Compact:return JSON.stringify(h);default:return}}function fo(h){if(!(b===ae.Off||!$))if(q===ht.Text){let S;(b===ae.Verbose||b===ae.Compact)&&h.params&&(S=`Params: ${Pt(h.params)}
|
|
40
40
|
|
|
41
|
-
`),$.log(`Sending request '${h.method} - (${h.id})'.`,S)}else
|
|
41
|
+
`),$.log(`Sending request '${h.method} - (${h.id})'.`,S)}else $t("send-request",h)}function po(h){if(!(b===ae.Off||!$))if(q===ht.Text){let S;(b===ae.Verbose||b===ae.Compact)&&(h.params?S=`Params: ${Pt(h.params)}
|
|
42
42
|
|
|
43
43
|
`:S=`No parameters provided.
|
|
44
44
|
|
|
45
|
-
`),$.log(`Sending notification '${h.method}'.`,S)}else
|
|
45
|
+
`),$.log(`Sending notification '${h.method}'.`,S)}else $t("send-notification",h)}function Tn(h,S,O){if(!(b===ae.Off||!$))if(q===ht.Text){let j;(b===ae.Verbose||b===ae.Compact)&&(h.error&&h.error.data?j=`Error data: ${Pt(h.error.data)}
|
|
46
46
|
|
|
47
|
-
`:h.result?
|
|
47
|
+
`:h.result?j=`Result: ${Pt(h.result)}
|
|
48
48
|
|
|
49
|
-
`:h.error===void 0&&(
|
|
49
|
+
`:h.error===void 0&&(j=`No result returned.
|
|
50
50
|
|
|
51
|
-
`)),$.log(`Sending response '${S} - (${h.id})'. Processing request took ${Date.now()-
|
|
51
|
+
`)),$.log(`Sending response '${S} - (${h.id})'. Processing request took ${Date.now()-O}ms`,j)}else $t("send-response",h)}function ho(h){if(!(b===ae.Off||!$))if(q===ht.Text){let S;(b===ae.Verbose||b===ae.Compact)&&h.params&&(S=`Params: ${Pt(h.params)}
|
|
52
52
|
|
|
53
|
-
`),$.log(`Received request '${h.method} - (${h.id})'.`,S)}else
|
|
53
|
+
`),$.log(`Received request '${h.method} - (${h.id})'.`,S)}else $t("receive-request",h)}function Xn(h){if(!(b===ae.Off||!$||h.method===Js.type.method))if(q===ht.Text){let S;(b===ae.Verbose||b===ae.Compact)&&(h.params?S=`Params: ${Pt(h.params)}
|
|
54
54
|
|
|
55
55
|
`:S=`No parameters provided.
|
|
56
56
|
|
|
57
|
-
`),$.log(`Received notification '${h.method}'.`,S)}else
|
|
57
|
+
`),$.log(`Received notification '${h.method}'.`,S)}else $t("receive-notification",h)}function mo(h,S){if(!(b===ae.Off||!$))if(q===ht.Text){let O;if((b===ae.Verbose||b===ae.Compact)&&(h.error&&h.error.data?O=`Error data: ${Pt(h.error.data)}
|
|
58
58
|
|
|
59
|
-
`:h.result?
|
|
59
|
+
`:h.result?O=`Result: ${Pt(h.result)}
|
|
60
60
|
|
|
61
|
-
`:h.error===void 0&&(
|
|
61
|
+
`:h.error===void 0&&(O=`No result returned.
|
|
62
62
|
|
|
63
|
-
`)),S){let H=h.error?` Request failed: ${h.error.message} (${h.error.code}).`:"";$.log(`Received response '${S.method} - (${h.id})' in ${Date.now()-S.timerStart}ms.${H}`,L)}else $.log(`Received response ${h.id} without active response promise.`,L)}else Qt("receive-response",h)}function Qt(h,S){if(!$||b===oe.Off)return;let L={isLSPMessage:!0,type:h,message:S,timestamp:Date.now()};$.log(L)}function dn(){if(N())throw new en(di.Closed,"Connection is closed.");if(F())throw new en(di.Disposed,"Connection is disposed.")}function fo(){if(T())throw new en(di.AlreadyListening,"Connection is already listening")}function po(){if(!T())throw new Error("Call listen() first.")}function pn(h){return h===void 0?null:h}function qn(h){if(h!==null)return h}function jr(h){return h!=null&&!Array.isArray(h)&&typeof h=="object"}function ir(h,S){switch(h){case Y.ParameterStructures.auto:return jr(S)?qn(S):[pn(S)];case Y.ParameterStructures.byName:if(!jr(S))throw new Error("Received parameters by name but param is not an object literal.");return qn(S);case Y.ParameterStructures.byPosition:return[pn(S)];default:throw new Error(`Unknown parameter structure ${h.toString()}`)}}function Wr(h,S){let L,H=h.numberOfParams;switch(H){case 0:L=void 0;break;case 1:L=ir(h.parameterStructures,S[0]);break;default:L=[];for(let se=0;se<S.length&&se<H;se++)L.push(pn(S[se]));if(S.length<H)for(let se=S.length;se<H;se++)L.push(null);break}return L}let Jt={sendNotification:(h,...S)=>{dn();let L,H;if(xe.string(h)){L=h;let ae=S[0],pe=0,Ce=Y.ParameterStructures.auto;Y.ParameterStructures.is(ae)&&(pe=1,Ce=ae);let Z=S.length,ce=Z-pe;switch(ce){case 0:H=void 0;break;case 1:H=ir(Ce,S[pe]);break;default:if(Ce===Y.ParameterStructures.byName)throw new Error(`Received ${ce} parameters for 'by Name' notification parameter structure.`);H=S.slice(pe,Z).map(re=>pn(re));break}}else{let ae=S;L=h.method,H=Wr(h,ae)}let se={jsonrpc:l,method:L,params:H};return uo(se),t.write(se).catch(()=>i.error("Sending notification failed."))},onNotification:(h,S)=>{dn();let L;return xe.func(h)?v=h:S&&(xe.string(h)?(L=h,C.set(h,{type:void 0,handler:S})):(L=h.method,C.set(h.method,{type:h,handler:S}))),{dispose:()=>{L!==void 0?C.delete(L):v=void 0}}},onProgress:(h,S,L)=>{if(P.has(S))throw new Error(`Progress handler for token ${S} already registered`);return P.set(S,L),{dispose:()=>{P.delete(S)}}},sendProgress:(h,S,L)=>Jt.sendNotification(vr.type,{token:S,value:L}),onUnhandledProgress:Ct.event,sendRequest:(h,...S)=>{dn(),po();let L,H,se;if(xe.string(h)){L=h;let Z=S[0],ce=S[S.length-1],re=0,_e=Y.ParameterStructures.auto;Y.ParameterStructures.is(Z)&&(re=1,_e=Z);let Ie=S.length;$s.CancellationToken.is(ce)&&(Ie=Ie-1,se=ce);let Lt=Ie-re;switch(Lt){case 0:H=void 0;break;case 1:H=ir(_e,S[re]);break;default:if(_e===Y.ParameterStructures.byName)throw new Error(`Received ${Lt} parameters for 'by Name' request parameter structure.`);H=S.slice(re,Ie).map(wt=>pn(wt));break}}else{let Z=S;L=h.method,H=Wr(h,Z);let ce=h.numberOfParams;se=$s.CancellationToken.is(Z[ce])?Z[ce]:void 0}let ae=o++,pe;return se&&(pe=se.onCancellationRequested(()=>{let Z=Ve.sender.sendCancellation(Jt,ae);return Z===void 0?(i.log(`Received no promise from cancellation strategy when cancelling id ${ae}`),Promise.resolve()):Z.catch(()=>{i.log(`Sending cancellation messages for id ${ae} failed`)})})),new Promise((Z,ce)=>{let re={jsonrpc:l,id:ae,method:L,params:H},_e=wt=>{Z(wt),Ve.sender.cleanup(ae),pe?.dispose()},Ie=wt=>{ce(wt),Ve.sender.cleanup(ae),pe?.dispose()},Lt={method:L,timerStart:Date.now(),resolve:_e,reject:Ie};ao(re);try{t.write(re).catch(()=>i.error("Sending request failed."))}catch(wt){Lt.reject(new Y.ResponseError(Y.ErrorCodes.MessageWriteError,wt.message?wt.message:"Unknown reason")),Lt=null}Lt&&W.set(ae,Lt)})},onRequest:(h,S)=>{dn();let L=null;return Ys.is(h)?(L=void 0,p=h):xe.string(h)?(L=null,S!==void 0&&(L=h,m.set(h,{handler:S,type:void 0}))):S!==void 0&&(L=h.method,m.set(h.method,{type:h,handler:S})),{dispose:()=>{L!==null&&(L!==void 0?m.delete(L):p=void 0)}}},hasPendingResponse:()=>W.size>0,trace:async(h,S,L)=>{let H=!1,se=pt.Text;L!==void 0&&(xe.boolean(L)?H=L:(H=L.sendNotification||!1,se=L.traceFormat||pt.Text)),b=h,E=se,b===oe.Off?$=void 0:$=S,H&&!N()&&!F()&&await Jt.sendNotification(rl.type,{value:oe.toString(h)})},onError:ue.event,onClose:Ge.event,onUnhandledNotification:Rt.event,onDispose:Pt.event,end:()=>{t.end()},dispose:()=>{if(F())return;te=ht.Disposed,Pt.fire(void 0);let h=new Y.ResponseError(Y.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let S of W.values())S.reject(h);W=new Map,R=new Map,z=new Set,A=new tl.LinkedMap,xe.func(t.dispose)&&t.dispose(),xe.func(e.dispose)&&e.dispose()},listen:()=>{dn(),fo(),te=ht.Listening,e.listen(Xe)},inspect:()=>{(0,el.default)().console.log("inspect")}};return Jt.onNotification(Vs.type,h=>{if(b===oe.Off||!$)return;let S=b===oe.Verbose||b===oe.Compact;$.log(h.message,S?h.verbose:void 0)}),Jt.onNotification(vr.type,h=>{let S=P.get(h.token);S?S(h.value):Ct.fire(h)}),Jt}B.createMessageConnection=Em});var ea=q(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.TraceFormat=w.TraceValues=w.Trace=w.ProgressType=w.ProgressToken=w.createMessageConnection=w.NullLogger=w.ConnectionOptions=w.ConnectionStrategy=w.WriteableStreamMessageWriter=w.AbstractMessageWriter=w.MessageWriter=w.ReadableStreamMessageReader=w.AbstractMessageReader=w.MessageReader=w.CancellationToken=w.CancellationTokenSource=w.Emitter=w.Event=w.Disposable=w.LRUCache=w.Touch=w.LinkedMap=w.ParameterStructures=w.NotificationType9=w.NotificationType8=w.NotificationType7=w.NotificationType6=w.NotificationType5=w.NotificationType4=w.NotificationType3=w.NotificationType2=w.NotificationType1=w.NotificationType0=w.NotificationType=w.ErrorCodes=w.ResponseError=w.RequestType9=w.RequestType8=w.RequestType7=w.RequestType6=w.RequestType5=w.RequestType4=w.RequestType3=w.RequestType2=w.RequestType1=w.RequestType0=w.RequestType=w.Message=w.RAL=void 0;w.CancellationStrategy=w.CancellationSenderStrategy=w.CancellationReceiverStrategy=w.ConnectionError=w.ConnectionErrors=w.LogTraceNotification=w.SetTraceNotification=void 0;var fe=As();Object.defineProperty(w,"Message",{enumerable:!0,get:function(){return fe.Message}});Object.defineProperty(w,"RequestType",{enumerable:!0,get:function(){return fe.RequestType}});Object.defineProperty(w,"RequestType0",{enumerable:!0,get:function(){return fe.RequestType0}});Object.defineProperty(w,"RequestType1",{enumerable:!0,get:function(){return fe.RequestType1}});Object.defineProperty(w,"RequestType2",{enumerable:!0,get:function(){return fe.RequestType2}});Object.defineProperty(w,"RequestType3",{enumerable:!0,get:function(){return fe.RequestType3}});Object.defineProperty(w,"RequestType4",{enumerable:!0,get:function(){return fe.RequestType4}});Object.defineProperty(w,"RequestType5",{enumerable:!0,get:function(){return fe.RequestType5}});Object.defineProperty(w,"RequestType6",{enumerable:!0,get:function(){return fe.RequestType6}});Object.defineProperty(w,"RequestType7",{enumerable:!0,get:function(){return fe.RequestType7}});Object.defineProperty(w,"RequestType8",{enumerable:!0,get:function(){return fe.RequestType8}});Object.defineProperty(w,"RequestType9",{enumerable:!0,get:function(){return fe.RequestType9}});Object.defineProperty(w,"ResponseError",{enumerable:!0,get:function(){return fe.ResponseError}});Object.defineProperty(w,"ErrorCodes",{enumerable:!0,get:function(){return fe.ErrorCodes}});Object.defineProperty(w,"NotificationType",{enumerable:!0,get:function(){return fe.NotificationType}});Object.defineProperty(w,"NotificationType0",{enumerable:!0,get:function(){return fe.NotificationType0}});Object.defineProperty(w,"NotificationType1",{enumerable:!0,get:function(){return fe.NotificationType1}});Object.defineProperty(w,"NotificationType2",{enumerable:!0,get:function(){return fe.NotificationType2}});Object.defineProperty(w,"NotificationType3",{enumerable:!0,get:function(){return fe.NotificationType3}});Object.defineProperty(w,"NotificationType4",{enumerable:!0,get:function(){return fe.NotificationType4}});Object.defineProperty(w,"NotificationType5",{enumerable:!0,get:function(){return fe.NotificationType5}});Object.defineProperty(w,"NotificationType6",{enumerable:!0,get:function(){return fe.NotificationType6}});Object.defineProperty(w,"NotificationType7",{enumerable:!0,get:function(){return fe.NotificationType7}});Object.defineProperty(w,"NotificationType8",{enumerable:!0,get:function(){return fe.NotificationType8}});Object.defineProperty(w,"NotificationType9",{enumerable:!0,get:function(){return fe.NotificationType9}});Object.defineProperty(w,"ParameterStructures",{enumerable:!0,get:function(){return fe.ParameterStructures}});var Gs=qs();Object.defineProperty(w,"LinkedMap",{enumerable:!0,get:function(){return Gs.LinkedMap}});Object.defineProperty(w,"LRUCache",{enumerable:!0,get:function(){return Gs.LRUCache}});Object.defineProperty(w,"Touch",{enumerable:!0,get:function(){return Gs.Touch}});var Om=ts();Object.defineProperty(w,"Disposable",{enumerable:!0,get:function(){return Om.Disposable}});var sl=Cn();Object.defineProperty(w,"Event",{enumerable:!0,get:function(){return sl.Event}});Object.defineProperty(w,"Emitter",{enumerable:!0,get:function(){return sl.Emitter}});var al=Fs();Object.defineProperty(w,"CancellationTokenSource",{enumerable:!0,get:function(){return al.CancellationTokenSource}});Object.defineProperty(w,"CancellationToken",{enumerable:!0,get:function(){return al.CancellationToken}});var Xs=Kc();Object.defineProperty(w,"MessageReader",{enumerable:!0,get:function(){return Xs.MessageReader}});Object.defineProperty(w,"AbstractMessageReader",{enumerable:!0,get:function(){return Xs.AbstractMessageReader}});Object.defineProperty(w,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return Xs.ReadableStreamMessageReader}});var Zs=Zc();Object.defineProperty(w,"MessageWriter",{enumerable:!0,get:function(){return Zs.MessageWriter}});Object.defineProperty(w,"AbstractMessageWriter",{enumerable:!0,get:function(){return Zs.AbstractMessageWriter}});Object.defineProperty(w,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return Zs.WriteableStreamMessageWriter}});var We=ol();Object.defineProperty(w,"ConnectionStrategy",{enumerable:!0,get:function(){return We.ConnectionStrategy}});Object.defineProperty(w,"ConnectionOptions",{enumerable:!0,get:function(){return We.ConnectionOptions}});Object.defineProperty(w,"NullLogger",{enumerable:!0,get:function(){return We.NullLogger}});Object.defineProperty(w,"createMessageConnection",{enumerable:!0,get:function(){return We.createMessageConnection}});Object.defineProperty(w,"ProgressToken",{enumerable:!0,get:function(){return We.ProgressToken}});Object.defineProperty(w,"ProgressType",{enumerable:!0,get:function(){return We.ProgressType}});Object.defineProperty(w,"Trace",{enumerable:!0,get:function(){return We.Trace}});Object.defineProperty(w,"TraceValues",{enumerable:!0,get:function(){return We.TraceValues}});Object.defineProperty(w,"TraceFormat",{enumerable:!0,get:function(){return We.TraceFormat}});Object.defineProperty(w,"SetTraceNotification",{enumerable:!0,get:function(){return We.SetTraceNotification}});Object.defineProperty(w,"LogTraceNotification",{enumerable:!0,get:function(){return We.LogTraceNotification}});Object.defineProperty(w,"ConnectionErrors",{enumerable:!0,get:function(){return We.ConnectionErrors}});Object.defineProperty(w,"ConnectionError",{enumerable:!0,get:function(){return We.ConnectionError}});Object.defineProperty(w,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return We.CancellationReceiverStrategy}});Object.defineProperty(w,"CancellationSenderStrategy",{enumerable:!0,get:function(){return We.CancellationSenderStrategy}});Object.defineProperty(w,"CancellationStrategy",{enumerable:!0,get:function(){return We.CancellationStrategy}});var Mm=Ut();w.RAL=Mm.default});var wn=q(et=>{"use strict";var Fm=et&&et.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Lm=et&&et.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Fm(t,e,n)};Object.defineProperty(et,"__esModule",{value:!0});et.createMessageConnection=et.BrowserMessageWriter=et.BrowserMessageReader=void 0;var Im=Bc();Im.default.install();var zn=ea();Lm(ea(),et);var ta=class extends zn.AbstractMessageReader{constructor(t){super(),this._onData=new zn.Emitter,this._messageListener=n=>{this._onData.fire(n.data)},t.addEventListener("error",n=>this.fireError(n)),t.onmessage=this._messageListener}listen(t){return this._onData.event(t)}};et.BrowserMessageReader=ta;var na=class extends zn.AbstractMessageWriter{constructor(t){super(),this.context=t,this.errorCount=0,t.addEventListener("error",n=>this.fireError(n))}write(t){try{return this.context.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};et.BrowserMessageWriter=na;function jm(e,t,n,r){return n===void 0&&(n=zn.NullLogger),zn.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,zn.createMessageConnection)(e,t,n,r)}et.createMessageConnection=jm});var ra=q((O_,ul)=>{"use strict";ul.exports=wn()});var hi=q((cl,pi)=>{(function(e){if(typeof pi=="object"&&typeof pi.exports=="object"){var t=e(za,cl);t!==void 0&&(pi.exports=t)}else typeof define=="function"&&define.amd&&define(["require","exports"],e)})(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocument=t.EOL=t.WorkspaceFolder=t.InlayHint=t.InlayHintLabelPart=t.InlayHintKind=t.InlineValueContext=t.InlineValueEvaluatableExpression=t.InlineValueVariableLookup=t.InlineValueText=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=t.SelectionRange=t.DocumentLink=t.FormattingOptions=t.CodeLens=t.CodeAction=t.CodeActionContext=t.CodeActionTriggerKind=t.CodeActionKind=t.DocumentSymbol=t.WorkspaceSymbol=t.SymbolInformation=t.SymbolTag=t.SymbolKind=t.DocumentHighlight=t.DocumentHighlightKind=t.SignatureInformation=t.ParameterInformation=t.Hover=t.MarkedString=t.CompletionList=t.CompletionItem=t.CompletionItemLabelDetails=t.InsertTextMode=t.InsertReplaceEdit=t.CompletionItemTag=t.InsertTextFormat=t.CompletionItemKind=t.MarkupContent=t.MarkupKind=t.TextDocumentItem=t.OptionalVersionedTextDocumentIdentifier=t.VersionedTextDocumentIdentifier=t.TextDocumentIdentifier=t.WorkspaceChange=t.WorkspaceEdit=t.DeleteFile=t.RenameFile=t.CreateFile=t.TextDocumentEdit=t.AnnotatedTextEdit=t.ChangeAnnotationIdentifier=t.ChangeAnnotation=t.TextEdit=t.Command=t.Diagnostic=t.CodeDescription=t.DiagnosticTag=t.DiagnosticSeverity=t.DiagnosticRelatedInformation=t.FoldingRange=t.FoldingRangeKind=t.ColorPresentation=t.ColorInformation=t.Color=t.LocationLink=t.Location=t.Range=t.Position=t.uinteger=t.integer=t.URI=t.DocumentUri=void 0;var n;(function(c){function g(y){return typeof y=="string"}c.is=g})(n=t.DocumentUri||(t.DocumentUri={}));var r;(function(c){function g(y){return typeof y=="string"}c.is=g})(r=t.URI||(t.URI={}));var i;(function(c){c.MIN_VALUE=-2147483648,c.MAX_VALUE=2147483647;function g(y){return typeof y=="number"&&c.MIN_VALUE<=y&&y<=c.MAX_VALUE}c.is=g})(i=t.integer||(t.integer={}));var o;(function(c){c.MIN_VALUE=0,c.MAX_VALUE=2147483647;function g(y){return typeof y=="number"&&c.MIN_VALUE<=y&&y<=c.MAX_VALUE}c.is=g})(o=t.uinteger||(t.uinteger={}));var s;(function(c){function g(d,u){return d===Number.MAX_VALUE&&(d=o.MAX_VALUE),u===Number.MAX_VALUE&&(u=o.MAX_VALUE),{line:d,character:u}}c.create=g;function y(d){var u=d;return _.objectLiteral(u)&&_.uinteger(u.line)&&_.uinteger(u.character)}c.is=y})(s=t.Position||(t.Position={}));var a;(function(c){function g(d,u,D,k){if(_.uinteger(d)&&_.uinteger(u)&&_.uinteger(D)&&_.uinteger(k))return{start:s.create(d,u),end:s.create(D,k)};if(s.is(d)&&s.is(u))return{start:d,end:u};throw new Error("Range#create called with invalid arguments[".concat(d,", ").concat(u,", ").concat(D,", ").concat(k,"]"))}c.create=g;function y(d){var u=d;return _.objectLiteral(u)&&s.is(u.start)&&s.is(u.end)}c.is=y})(a=t.Range||(t.Range={}));var l;(function(c){function g(d,u){return{uri:d,range:u}}c.create=g;function y(d){var u=d;return _.objectLiteral(u)&&a.is(u.range)&&(_.string(u.uri)||_.undefined(u.uri))}c.is=y})(l=t.Location||(t.Location={}));var p;(function(c){function g(d,u,D,k){return{targetUri:d,targetRange:u,targetSelectionRange:D,originSelectionRange:k}}c.create=g;function y(d){var u=d;return _.objectLiteral(u)&&a.is(u.targetRange)&&_.string(u.targetUri)&&a.is(u.targetSelectionRange)&&(a.is(u.originSelectionRange)||_.undefined(u.originSelectionRange))}c.is=y})(p=t.LocationLink||(t.LocationLink={}));var m;(function(c){function g(d,u,D,k){return{red:d,green:u,blue:D,alpha:k}}c.create=g;function y(d){var u=d;return _.objectLiteral(u)&&_.numberRange(u.red,0,1)&&_.numberRange(u.green,0,1)&&_.numberRange(u.blue,0,1)&&_.numberRange(u.alpha,0,1)}c.is=y})(m=t.Color||(t.Color={}));var v;(function(c){function g(d,u){return{range:d,color:u}}c.create=g;function y(d){var u=d;return _.objectLiteral(u)&&a.is(u.range)&&m.is(u.color)}c.is=y})(v=t.ColorInformation||(t.ColorInformation={}));var C;(function(c){function g(d,u,D){return{label:d,textEdit:u,additionalTextEdits:D}}c.create=g;function y(d){var u=d;return _.objectLiteral(u)&&_.string(u.label)&&(_.undefined(u.textEdit)||$.is(u))&&(_.undefined(u.additionalTextEdits)||_.typedArray(u.additionalTextEdits,$.is))}c.is=y})(C=t.ColorPresentation||(t.ColorPresentation={}));var P;(function(c){c.Comment="comment",c.Imports="imports",c.Region="region"})(P=t.FoldingRangeKind||(t.FoldingRangeKind={}));var x;(function(c){function g(d,u,D,k,Q,ve){var le={startLine:d,endLine:u};return _.defined(D)&&(le.startCharacter=D),_.defined(k)&&(le.endCharacter=k),_.defined(Q)&&(le.kind=Q),_.defined(ve)&&(le.collapsedText=ve),le}c.create=g;function y(d){var u=d;return _.objectLiteral(u)&&_.uinteger(u.startLine)&&_.uinteger(u.startLine)&&(_.undefined(u.startCharacter)||_.uinteger(u.startCharacter))&&(_.undefined(u.endCharacter)||_.uinteger(u.endCharacter))&&(_.undefined(u.kind)||_.string(u.kind))}c.is=y})(x=t.FoldingRange||(t.FoldingRange={}));var A;(function(c){function g(d,u){return{location:d,message:u}}c.create=g;function y(d){var u=d;return _.defined(u)&&l.is(u.location)&&_.string(u.message)}c.is=y})(A=t.DiagnosticRelatedInformation||(t.DiagnosticRelatedInformation={}));var W;(function(c){c.Error=1,c.Warning=2,c.Information=3,c.Hint=4})(W=t.DiagnosticSeverity||(t.DiagnosticSeverity={}));var z;(function(c){c.Unnecessary=1,c.Deprecated=2})(z=t.DiagnosticTag||(t.DiagnosticTag={}));var R;(function(c){function g(y){var d=y;return _.objectLiteral(d)&&_.string(d.href)}c.is=g})(R=t.CodeDescription||(t.CodeDescription={}));var b;(function(c){function g(d,u,D,k,Q,ve){var le={range:d,message:u};return _.defined(D)&&(le.severity=D),_.defined(k)&&(le.code=k),_.defined(Q)&&(le.source=Q),_.defined(ve)&&(le.relatedInformation=ve),le}c.create=g;function y(d){var u,D=d;return _.defined(D)&&a.is(D.range)&&_.string(D.message)&&(_.number(D.severity)||_.undefined(D.severity))&&(_.integer(D.code)||_.string(D.code)||_.undefined(D.code))&&(_.undefined(D.codeDescription)||_.string((u=D.codeDescription)===null||u===void 0?void 0:u.href))&&(_.string(D.source)||_.undefined(D.source))&&(_.undefined(D.relatedInformation)||_.typedArray(D.relatedInformation,A.is))}c.is=y})(b=t.Diagnostic||(t.Diagnostic={}));var E;(function(c){function g(d,u){for(var D=[],k=2;k<arguments.length;k++)D[k-2]=arguments[k];var Q={title:d,command:u};return _.defined(D)&&D.length>0&&(Q.arguments=D),Q}c.create=g;function y(d){var u=d;return _.defined(u)&&_.string(u.title)&&_.string(u.command)}c.is=y})(E=t.Command||(t.Command={}));var $;(function(c){function g(D,k){return{range:D,newText:k}}c.replace=g;function y(D,k){return{range:{start:D,end:D},newText:k}}c.insert=y;function d(D){return{range:D,newText:""}}c.del=d;function u(D){var k=D;return _.objectLiteral(k)&&_.string(k.newText)&&a.is(k.range)}c.is=u})($=t.TextEdit||(t.TextEdit={}));var te;(function(c){function g(d,u,D){var k={label:d};return u!==void 0&&(k.needsConfirmation=u),D!==void 0&&(k.description=D),k}c.create=g;function y(d){var u=d;return _.objectLiteral(u)&&_.string(u.label)&&(_.boolean(u.needsConfirmation)||u.needsConfirmation===void 0)&&(_.string(u.description)||u.description===void 0)}c.is=y})(te=t.ChangeAnnotation||(t.ChangeAnnotation={}));var ue;(function(c){function g(y){var d=y;return _.string(d)}c.is=g})(ue=t.ChangeAnnotationIdentifier||(t.ChangeAnnotationIdentifier={}));var Ge;(function(c){function g(D,k,Q){return{range:D,newText:k,annotationId:Q}}c.replace=g;function y(D,k,Q){return{range:{start:D,end:D},newText:k,annotationId:Q}}c.insert=y;function d(D,k){return{range:D,newText:"",annotationId:k}}c.del=d;function u(D){var k=D;return $.is(k)&&(te.is(k.annotationId)||ue.is(k.annotationId))}c.is=u})(Ge=t.AnnotatedTextEdit||(t.AnnotatedTextEdit={}));var Rt;(function(c){function g(d,u){return{textDocument:d,edits:u}}c.create=g;function y(d){var u=d;return _.defined(u)&&N.is(u.textDocument)&&Array.isArray(u.edits)}c.is=y})(Rt=t.TextDocumentEdit||(t.TextDocumentEdit={}));var Ct;(function(c){function g(d,u,D){var k={kind:"create",uri:d};return u!==void 0&&(u.overwrite!==void 0||u.ignoreIfExists!==void 0)&&(k.options=u),D!==void 0&&(k.annotationId=D),k}c.create=g;function y(d){var u=d;return u&&u.kind==="create"&&_.string(u.uri)&&(u.options===void 0||(u.options.overwrite===void 0||_.boolean(u.options.overwrite))&&(u.options.ignoreIfExists===void 0||_.boolean(u.options.ignoreIfExists)))&&(u.annotationId===void 0||ue.is(u.annotationId))}c.is=y})(Ct=t.CreateFile||(t.CreateFile={}));var Pt;(function(c){function g(d,u,D,k){var Q={kind:"rename",oldUri:d,newUri:u};return D!==void 0&&(D.overwrite!==void 0||D.ignoreIfExists!==void 0)&&(Q.options=D),k!==void 0&&(Q.annotationId=k),Q}c.create=g;function y(d){var u=d;return u&&u.kind==="rename"&&_.string(u.oldUri)&&_.string(u.newUri)&&(u.options===void 0||(u.options.overwrite===void 0||_.boolean(u.options.overwrite))&&(u.options.ignoreIfExists===void 0||_.boolean(u.options.ignoreIfExists)))&&(u.annotationId===void 0||ue.is(u.annotationId))}c.is=y})(Pt=t.RenameFile||(t.RenameFile={}));var Ve;(function(c){function g(d,u,D){var k={kind:"delete",uri:d};return u!==void 0&&(u.recursive!==void 0||u.ignoreIfNotExists!==void 0)&&(k.options=u),D!==void 0&&(k.annotationId=D),k}c.create=g;function y(d){var u=d;return u&&u.kind==="delete"&&_.string(u.uri)&&(u.options===void 0||(u.options.recursive===void 0||_.boolean(u.options.recursive))&&(u.options.ignoreIfNotExists===void 0||_.boolean(u.options.ignoreIfNotExists)))&&(u.annotationId===void 0||ue.is(u.annotationId))}c.is=y})(Ve=t.DeleteFile||(t.DeleteFile={}));var Mt;(function(c){function g(y){var d=y;return d&&(d.changes!==void 0||d.documentChanges!==void 0)&&(d.documentChanges===void 0||d.documentChanges.every(function(u){return _.string(u.kind)?Ct.is(u)||Pt.is(u)||Ve.is(u):Rt.is(u)}))}c.is=g})(Mt=t.WorkspaceEdit||(t.WorkspaceEdit={}));var Ft=function(){function c(g,y){this.edits=g,this.changeAnnotations=y}return c.prototype.insert=function(g,y,d){var u,D;if(d===void 0?u=$.insert(g,y):ue.is(d)?(D=d,u=Ge.insert(g,y,d)):(this.assertChangeAnnotations(this.changeAnnotations),D=this.changeAnnotations.manage(d),u=Ge.insert(g,y,D)),this.edits.push(u),D!==void 0)return D},c.prototype.replace=function(g,y,d){var u,D;if(d===void 0?u=$.replace(g,y):ue.is(d)?(D=d,u=Ge.replace(g,y,d)):(this.assertChangeAnnotations(this.changeAnnotations),D=this.changeAnnotations.manage(d),u=Ge.replace(g,y,D)),this.edits.push(u),D!==void 0)return D},c.prototype.delete=function(g,y){var d,u;if(y===void 0?d=$.del(g):ue.is(y)?(u=y,d=Ge.del(g,y)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(y),d=Ge.del(g,u)),this.edits.push(d),u!==void 0)return u},c.prototype.add=function(g){this.edits.push(g)},c.prototype.all=function(){return this.edits},c.prototype.clear=function(){this.edits.splice(0,this.edits.length)},c.prototype.assertChangeAnnotations=function(g){if(g===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},c}(),fn=function(){function c(g){this._annotations=g===void 0?Object.create(null):g,this._counter=0,this._size=0}return c.prototype.all=function(){return this._annotations},Object.defineProperty(c.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),c.prototype.manage=function(g,y){var d;if(ue.is(g)?d=g:(d=this.nextId(),y=g),this._annotations[d]!==void 0)throw new Error("Id ".concat(d," is already in use."));if(y===void 0)throw new Error("No annotation provided for id ".concat(d));return this._annotations[d]=y,this._size++,d},c.prototype.nextId=function(){return this._counter++,this._counter.toString()},c}(),ct=function(){function c(g){var y=this;this._textEditChanges=Object.create(null),g!==void 0?(this._workspaceEdit=g,g.documentChanges?(this._changeAnnotations=new fn(g.changeAnnotations),g.changeAnnotations=this._changeAnnotations.all(),g.documentChanges.forEach(function(d){if(Rt.is(d)){var u=new Ft(d.edits,y._changeAnnotations);y._textEditChanges[d.textDocument.uri]=u}})):g.changes&&Object.keys(g.changes).forEach(function(d){var u=new Ft(g.changes[d]);y._textEditChanges[d]=u})):this._workspaceEdit={}}return Object.defineProperty(c.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),c.prototype.getTextEditChange=function(g){if(N.is(g)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var y={uri:g.uri,version:g.version},d=this._textEditChanges[y.uri];if(!d){var u=[],D={textDocument:y,edits:u};this._workspaceEdit.documentChanges.push(D),d=new Ft(u,this._changeAnnotations),this._textEditChanges[y.uri]=d}return d}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var d=this._textEditChanges[g];if(!d){var u=[];this._workspaceEdit.changes[g]=u,d=new Ft(u),this._textEditChanges[g]=d}return d}},c.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new fn,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},c.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},c.prototype.createFile=function(g,y,d){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var u;te.is(y)||ue.is(y)?u=y:d=y;var D,k;if(u===void 0?D=Ct.create(g,d):(k=ue.is(u)?u:this._changeAnnotations.manage(u),D=Ct.create(g,d,k)),this._workspaceEdit.documentChanges.push(D),k!==void 0)return k},c.prototype.renameFile=function(g,y,d,u){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var D;te.is(d)||ue.is(d)?D=d:u=d;var k,Q;if(D===void 0?k=Pt.create(g,y,u):(Q=ue.is(D)?D:this._changeAnnotations.manage(D),k=Pt.create(g,y,u,Q)),this._workspaceEdit.documentChanges.push(k),Q!==void 0)return Q},c.prototype.deleteFile=function(g,y,d){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var u;te.is(y)||ue.is(y)?u=y:d=y;var D,k;if(u===void 0?D=Ve.create(g,d):(k=ue.is(u)?u:this._changeAnnotations.manage(u),D=Ve.create(g,d,k)),this._workspaceEdit.documentChanges.push(D),k!==void 0)return k},c}();t.WorkspaceChange=ct;var O;(function(c){function g(d){return{uri:d}}c.create=g;function y(d){var u=d;return _.defined(u)&&_.string(u.uri)}c.is=y})(O=t.TextDocumentIdentifier||(t.TextDocumentIdentifier={}));var T;(function(c){function g(d,u){return{uri:d,version:u}}c.create=g;function y(d){var u=d;return _.defined(u)&&_.string(u.uri)&&_.integer(u.version)}c.is=y})(T=t.VersionedTextDocumentIdentifier||(t.VersionedTextDocumentIdentifier={}));var N;(function(c){function g(d,u){return{uri:d,version:u}}c.create=g;function y(d){var u=d;return _.defined(u)&&_.string(u.uri)&&(u.version===null||_.integer(u.version))}c.is=y})(N=t.OptionalVersionedTextDocumentIdentifier||(t.OptionalVersionedTextDocumentIdentifier={}));var F;(function(c){function g(d,u,D,k){return{uri:d,languageId:u,version:D,text:k}}c.create=g;function y(d){var u=d;return _.defined(u)&&_.string(u.uri)&&_.string(u.languageId)&&_.integer(u.version)&&_.string(u.text)}c.is=y})(F=t.TextDocumentItem||(t.TextDocumentItem={}));var G;(function(c){c.PlainText="plaintext",c.Markdown="markdown";function g(y){var d=y;return d===c.PlainText||d===c.Markdown}c.is=g})(G=t.MarkupKind||(t.MarkupKind={}));var J;(function(c){function g(y){var d=y;return _.objectLiteral(y)&&G.is(d.kind)&&_.string(d.value)}c.is=g})(J=t.MarkupContent||(t.MarkupContent={}));var j;(function(c){c.Text=1,c.Method=2,c.Function=3,c.Constructor=4,c.Field=5,c.Variable=6,c.Class=7,c.Interface=8,c.Module=9,c.Property=10,c.Unit=11,c.Value=12,c.Enum=13,c.Keyword=14,c.Snippet=15,c.Color=16,c.File=17,c.Reference=18,c.Folder=19,c.EnumMember=20,c.Constant=21,c.Struct=22,c.Event=23,c.Operator=24,c.TypeParameter=25})(j=t.CompletionItemKind||(t.CompletionItemKind={}));var tt;(function(c){c.PlainText=1,c.Snippet=2})(tt=t.InsertTextFormat||(t.InsertTextFormat={}));var Le;(function(c){c.Deprecated=1})(Le=t.CompletionItemTag||(t.CompletionItemTag={}));var Xe;(function(c){function g(d,u,D){return{newText:d,insert:u,replace:D}}c.create=g;function y(d){var u=d;return u&&_.string(u.newText)&&a.is(u.insert)&&a.is(u.replace)}c.is=y})(Xe=t.InsertReplaceEdit||(t.InsertReplaceEdit={}));var Kt;(function(c){c.asIs=1,c.adjustIndentation=2})(Kt=t.InsertTextMode||(t.InsertTextMode={}));var Tt;(function(c){function g(y){var d=y;return d&&(_.string(d.detail)||d.detail===void 0)&&(_.string(d.description)||d.description===void 0)}c.is=g})(Tt=t.CompletionItemLabelDetails||(t.CompletionItemLabelDetails={}));var oo;(function(c){function g(y){return{label:y}}c.create=g})(oo=t.CompletionItem||(t.CompletionItem={}));var so;(function(c){function g(y,d){return{items:y||[],isIncomplete:!!d}}c.create=g})(so=t.CompletionList||(t.CompletionList={}));var nt;(function(c){function g(d){return d.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}c.fromPlainText=g;function y(d){var u=d;return _.string(u)||_.objectLiteral(u)&&_.string(u.language)&&_.string(u.value)}c.is=y})(nt=t.MarkedString||(t.MarkedString={}));var ao;(function(c){function g(y){var d=y;return!!d&&_.objectLiteral(d)&&(J.is(d.contents)||nt.is(d.contents)||_.typedArray(d.contents,nt.is))&&(y.range===void 0||a.is(y.range))}c.is=g})(ao=t.Hover||(t.Hover={}));var uo;(function(c){function g(y,d){return d?{label:y,documentation:d}:{label:y}}c.create=g})(uo=t.ParameterInformation||(t.ParameterInformation={}));var Nn;(function(c){function g(y,d){for(var u=[],D=2;D<arguments.length;D++)u[D-2]=arguments[D];var k={label:y};return _.defined(d)&&(k.documentation=d),_.defined(u)?k.parameters=u:k.parameters=[],k}c.create=g})(Nn=t.SignatureInformation||(t.SignatureInformation={}));var co;(function(c){c.Text=1,c.Read=2,c.Write=3})(co=t.DocumentHighlightKind||(t.DocumentHighlightKind={}));var rr;(function(c){function g(y,d){var u={range:y};return _.number(d)&&(u.kind=d),u}c.create=g})(rr=t.DocumentHighlight||(t.DocumentHighlight={}));var lo;(function(c){c.File=1,c.Module=2,c.Namespace=3,c.Package=4,c.Class=5,c.Method=6,c.Property=7,c.Field=8,c.Constructor=9,c.Enum=10,c.Interface=11,c.Function=12,c.Variable=13,c.Constant=14,c.String=15,c.Number=16,c.Boolean=17,c.Array=18,c.Object=19,c.Key=20,c.Null=21,c.EnumMember=22,c.Struct=23,c.Event=24,c.Operator=25,c.TypeParameter=26})(lo=t.SymbolKind||(t.SymbolKind={}));var Qt;(function(c){c.Deprecated=1})(Qt=t.SymbolTag||(t.SymbolTag={}));var dn;(function(c){function g(y,d,u,D,k){var Q={name:y,kind:d,location:{uri:D,range:u}};return k&&(Q.containerName=k),Q}c.create=g})(dn=t.SymbolInformation||(t.SymbolInformation={}));var fo;(function(c){function g(y,d,u,D){return D!==void 0?{name:y,kind:d,location:{uri:u,range:D}}:{name:y,kind:d,location:{uri:u}}}c.create=g})(fo=t.WorkspaceSymbol||(t.WorkspaceSymbol={}));var po;(function(c){function g(d,u,D,k,Q,ve){var le={name:d,detail:u,kind:D,range:k,selectionRange:Q};return ve!==void 0&&(le.children=ve),le}c.create=g;function y(d){var u=d;return u&&_.string(u.name)&&_.number(u.kind)&&a.is(u.range)&&a.is(u.selectionRange)&&(u.detail===void 0||_.string(u.detail))&&(u.deprecated===void 0||_.boolean(u.deprecated))&&(u.children===void 0||Array.isArray(u.children))&&(u.tags===void 0||Array.isArray(u.tags))}c.is=y})(po=t.DocumentSymbol||(t.DocumentSymbol={}));var pn;(function(c){c.Empty="",c.QuickFix="quickfix",c.Refactor="refactor",c.RefactorExtract="refactor.extract",c.RefactorInline="refactor.inline",c.RefactorRewrite="refactor.rewrite",c.Source="source",c.SourceOrganizeImports="source.organizeImports",c.SourceFixAll="source.fixAll"})(pn=t.CodeActionKind||(t.CodeActionKind={}));var qn;(function(c){c.Invoked=1,c.Automatic=2})(qn=t.CodeActionTriggerKind||(t.CodeActionTriggerKind={}));var jr;(function(c){function g(d,u,D){var k={diagnostics:d};return u!=null&&(k.only=u),D!=null&&(k.triggerKind=D),k}c.create=g;function y(d){var u=d;return _.defined(u)&&_.typedArray(u.diagnostics,b.is)&&(u.only===void 0||_.typedArray(u.only,_.string))&&(u.triggerKind===void 0||u.triggerKind===qn.Invoked||u.triggerKind===qn.Automatic)}c.is=y})(jr=t.CodeActionContext||(t.CodeActionContext={}));var ir;(function(c){function g(d,u,D){var k={title:d},Q=!0;return typeof u=="string"?(Q=!1,k.kind=u):E.is(u)?k.command=u:k.edit=u,Q&&D!==void 0&&(k.kind=D),k}c.create=g;function y(d){var u=d;return u&&_.string(u.title)&&(u.diagnostics===void 0||_.typedArray(u.diagnostics,b.is))&&(u.kind===void 0||_.string(u.kind))&&(u.edit!==void 0||u.command!==void 0)&&(u.command===void 0||E.is(u.command))&&(u.isPreferred===void 0||_.boolean(u.isPreferred))&&(u.edit===void 0||Mt.is(u.edit))}c.is=y})(ir=t.CodeAction||(t.CodeAction={}));var Wr;(function(c){function g(d,u){var D={range:d};return _.defined(u)&&(D.data=u),D}c.create=g;function y(d){var u=d;return _.defined(u)&&a.is(u.range)&&(_.undefined(u.command)||E.is(u.command))}c.is=y})(Wr=t.CodeLens||(t.CodeLens={}));var Jt;(function(c){function g(d,u){return{tabSize:d,insertSpaces:u}}c.create=g;function y(d){var u=d;return _.defined(u)&&_.uinteger(u.tabSize)&&_.boolean(u.insertSpaces)}c.is=y})(Jt=t.FormattingOptions||(t.FormattingOptions={}));var h;(function(c){function g(d,u,D){return{range:d,target:u,data:D}}c.create=g;function y(d){var u=d;return _.defined(u)&&a.is(u.range)&&(_.undefined(u.target)||_.string(u.target))}c.is=y})(h=t.DocumentLink||(t.DocumentLink={}));var S;(function(c){function g(d,u){return{range:d,parent:u}}c.create=g;function y(d){var u=d;return _.objectLiteral(u)&&a.is(u.range)&&(u.parent===void 0||c.is(u.parent))}c.is=y})(S=t.SelectionRange||(t.SelectionRange={}));var L;(function(c){c.namespace="namespace",c.type="type",c.class="class",c.enum="enum",c.interface="interface",c.struct="struct",c.typeParameter="typeParameter",c.parameter="parameter",c.variable="variable",c.property="property",c.enumMember="enumMember",c.event="event",c.function="function",c.method="method",c.macro="macro",c.keyword="keyword",c.modifier="modifier",c.comment="comment",c.string="string",c.number="number",c.regexp="regexp",c.operator="operator",c.decorator="decorator"})(L=t.SemanticTokenTypes||(t.SemanticTokenTypes={}));var H;(function(c){c.declaration="declaration",c.definition="definition",c.readonly="readonly",c.static="static",c.deprecated="deprecated",c.abstract="abstract",c.async="async",c.modification="modification",c.documentation="documentation",c.defaultLibrary="defaultLibrary"})(H=t.SemanticTokenModifiers||(t.SemanticTokenModifiers={}));var se;(function(c){function g(y){var d=y;return _.objectLiteral(d)&&(d.resultId===void 0||typeof d.resultId=="string")&&Array.isArray(d.data)&&(d.data.length===0||typeof d.data[0]=="number")}c.is=g})(se=t.SemanticTokens||(t.SemanticTokens={}));var ae;(function(c){function g(d,u){return{range:d,text:u}}c.create=g;function y(d){var u=d;return u!=null&&a.is(u.range)&&_.string(u.text)}c.is=y})(ae=t.InlineValueText||(t.InlineValueText={}));var pe;(function(c){function g(d,u,D){return{range:d,variableName:u,caseSensitiveLookup:D}}c.create=g;function y(d){var u=d;return u!=null&&a.is(u.range)&&_.boolean(u.caseSensitiveLookup)&&(_.string(u.variableName)||u.variableName===void 0)}c.is=y})(pe=t.InlineValueVariableLookup||(t.InlineValueVariableLookup={}));var Ce;(function(c){function g(d,u){return{range:d,expression:u}}c.create=g;function y(d){var u=d;return u!=null&&a.is(u.range)&&(_.string(u.expression)||u.expression===void 0)}c.is=y})(Ce=t.InlineValueEvaluatableExpression||(t.InlineValueEvaluatableExpression={}));var Z;(function(c){function g(d,u){return{frameId:d,stoppedLocation:u}}c.create=g;function y(d){var u=d;return _.defined(u)&&a.is(d.stoppedLocation)}c.is=y})(Z=t.InlineValueContext||(t.InlineValueContext={}));var ce;(function(c){c.Type=1,c.Parameter=2;function g(y){return y===1||y===2}c.is=g})(ce=t.InlayHintKind||(t.InlayHintKind={}));var re;(function(c){function g(d){return{value:d}}c.create=g;function y(d){var u=d;return _.objectLiteral(u)&&(u.tooltip===void 0||_.string(u.tooltip)||J.is(u.tooltip))&&(u.location===void 0||l.is(u.location))&&(u.command===void 0||E.is(u.command))}c.is=y})(re=t.InlayHintLabelPart||(t.InlayHintLabelPart={}));var _e;(function(c){function g(d,u,D){var k={position:d,label:u};return D!==void 0&&(k.kind=D),k}c.create=g;function y(d){var u=d;return _.objectLiteral(u)&&s.is(u.position)&&(_.string(u.label)||_.typedArray(u.label,re.is))&&(u.kind===void 0||ce.is(u.kind))&&u.textEdits===void 0||_.typedArray(u.textEdits,$.is)&&(u.tooltip===void 0||_.string(u.tooltip)||J.is(u.tooltip))&&(u.paddingLeft===void 0||_.boolean(u.paddingLeft))&&(u.paddingRight===void 0||_.boolean(u.paddingRight))}c.is=y})(_e=t.InlayHint||(t.InlayHint={}));var Ie;(function(c){function g(y){var d=y;return _.objectLiteral(d)&&r.is(d.uri)&&_.string(d.name)}c.is=g})(Ie=t.WorkspaceFolder||(t.WorkspaceFolder={})),t.EOL=[`
|
|
63
|
+
`)),S){let j=h.error?` Request failed: ${h.error.message} (${h.error.code}).`:"";$.log(`Received response '${S.method} - (${h.id})' in ${Date.now()-S.timerStart}ms.${j}`,O)}else $.log(`Received response ${h.id} without active response promise.`,O)}else $t("receive-response",h)}function $t(h,S){if(!$||b===ae.Off)return;let O={isLSPMessage:!0,type:h,message:S,timestamp:Date.now()};$.log(O)}function an(){if(Ae())throw new Jt(di.Closed,"Connection is closed.");if(ce())throw new Jt(di.Disposed,"Connection is disposed.")}function go(){if(ze())throw new Jt(di.AlreadyListening,"Connection is already listening")}function yo(){if(!ze())throw new Error("Call listen() first.")}function Ot(h){return h===void 0?null:h}function Lr(h){if(h!==null)return h}function Ir(h){return h!=null&&!Array.isArray(h)&&typeof h=="object"}function Zn(h,S){switch(h){case z.ParameterStructures.auto:return Ir(S)?Lr(S):[Ot(S)];case z.ParameterStructures.byName:if(!Ir(S))throw new Error("Received parameters by name but param is not an object literal.");return Lr(S);case z.ParameterStructures.byPosition:return[Ot(S)];default:throw new Error(`Unknown parameter structure ${h.toString()}`)}}function jr(h,S){let O,j=h.numberOfParams;switch(j){case 0:O=void 0;break;case 1:O=Zn(h.parameterStructures,S[0]);break;default:O=[];for(let le=0;le<S.length&&le<j;le++)O.push(Ot(S[le]));if(S.length<j)for(let le=S.length;le<j;le++)O.push(null);break}return O}let zt={sendNotification:(h,...S)=>{an();let O,j;if(be.string(h)){O=h;let se=S[0],me=0,ge=z.ParameterStructures.auto;z.ParameterStructures.is(se)&&(me=1,ge=se);let ee=S.length,fe=ee-me;switch(fe){case 0:j=void 0;break;case 1:j=Zn(ge,S[me]);break;default:if(ge===z.ParameterStructures.byName)throw new Error(`Received ${fe} parameters for 'by Name' notification parameter structure.`);j=S.slice(me,ee).map(oe=>Ot(oe));break}}else{let se=S;O=h.method,j=jr(h,se)}let le={jsonrpc:c,method:O,params:j};return po(le),t.write(le).catch(se=>{throw i.error("Sending notification failed."),se})},onNotification:(h,S)=>{an();let O;return be.func(h)?v=h:S&&(be.string(h)?(O=h,C.set(h,{type:void 0,handler:S})):(O=h.method,C.set(h.method,{type:h,handler:S}))),{dispose:()=>{O!==void 0?C.delete(O):v=void 0}}},onProgress:(h,S,O)=>{if(P.has(S))throw new Error(`Progress handler for token ${S} already registered`);return P.set(S,O),{dispose:()=>{P.delete(S)}}},sendProgress:(h,S,O)=>zt.sendNotification(hr.type,{token:S,value:O}),onUnhandledProgress:lt.event,sendRequest:(h,...S)=>{an(),yo();let O,j,le;if(be.string(h)){O=h;let ee=S[0],fe=S[S.length-1],oe=0,Pe=z.ParameterStructures.auto;z.ParameterStructures.is(ee)&&(oe=1,Pe=ee);let Me=S.length;Vs.CancellationToken.is(fe)&&(Me=Me-1,le=fe);let nt=Me-oe;switch(nt){case 0:j=void 0;break;case 1:j=Zn(Pe,S[oe]);break;default:if(Pe===z.ParameterStructures.byName)throw new Error(`Received ${nt} parameters for 'by Name' request parameter structure.`);j=S.slice(oe,Me).map(_=>Ot(_));break}}else{let ee=S;O=h.method,j=jr(h,ee);let fe=h.numberOfParams;le=Vs.CancellationToken.is(ee[fe])?ee[fe]:void 0}let se=o++,me;le&&(me=le.onCancellationRequested(()=>{let ee=x.sender.sendCancellation(zt,se);return ee===void 0?(i.log(`Received no promise from cancellation strategy when cancelling id ${se}`),Promise.resolve()):ee.catch(()=>{i.log(`Sending cancellation messages for id ${se} failed`)})}));let ge={jsonrpc:c,id:se,method:O,params:j};return fo(ge),typeof x.sender.enableCancellation=="function"&&x.sender.enableCancellation(ge),new Promise(async(ee,fe)=>{let oe=nt=>{ee(nt),x.sender.cleanup(se),me?.dispose()},Pe=nt=>{fe(nt),x.sender.cleanup(se),me?.dispose()},Me={method:O,timerStart:Date.now(),resolve:oe,reject:Pe};try{await t.write(ge),B.set(se,Me)}catch(nt){throw i.error("Sending request failed."),Me.reject(new z.ResponseError(z.ErrorCodes.MessageWriteError,nt.message?nt.message:"Unknown reason")),nt}})},onRequest:(h,S)=>{an();let O=null;return Qs.is(h)?(O=void 0,p=h):be.string(h)?(O=null,S!==void 0&&(O=h,m.set(h,{handler:S,type:void 0}))):S!==void 0&&(O=h.method,m.set(h.method,{type:h,handler:S})),{dispose:()=>{O!==null&&(O!==void 0?m.delete(O):p=void 0)}}},hasPendingResponse:()=>B.size>0,trace:async(h,S,O)=>{let j=!1,le=ht.Text;O!==void 0&&(be.boolean(O)?j=O:(j=O.sendNotification||!1,le=O.traceFormat||ht.Text)),b=h,q=le,b===ae.Off?$=void 0:$=S,j&&!Ae()&&!ce()&&await zt.sendNotification(ul.type,{value:ae.toString(h)})},onError:ue.event,onClose:Ue.event,onUnhandledNotification:ut.event,onDispose:F.event,end:()=>{t.end()},dispose:()=>{if(ce())return;Z=mt.Disposed,F.fire(void 0);let h=new z.ResponseError(z.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let S of B.values())S.reject(h);B=new Map,D=new Map,L=new Set,A=new al.LinkedMap,be.func(t.dispose)&&t.dispose(),be.func(e.dispose)&&e.dispose()},listen:()=>{an(),go(),Z=mt.Listening,e.listen(ao)},inspect:()=>{(0,sl.default)().console.log("inspect")}};return zt.onNotification(Js.type,h=>{if(b===ae.Off||!$)return;let S=b===ae.Verbose||b===ae.Compact;$.log(h.message,S?h.verbose:void 0)}),zt.onNotification(hr.type,h=>{let S=P.get(h.token);S?S(h.value):lt.fire(h)}),zt}W.createMessageConnection=Um});var pi=N(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});T.ProgressType=T.ProgressToken=T.createMessageConnection=T.NullLogger=T.ConnectionOptions=T.ConnectionStrategy=T.AbstractMessageBuffer=T.WriteableStreamMessageWriter=T.AbstractMessageWriter=T.MessageWriter=T.ReadableStreamMessageReader=T.AbstractMessageReader=T.MessageReader=T.SharedArrayReceiverStrategy=T.SharedArraySenderStrategy=T.CancellationToken=T.CancellationTokenSource=T.Emitter=T.Event=T.Disposable=T.LRUCache=T.Touch=T.LinkedMap=T.ParameterStructures=T.NotificationType9=T.NotificationType8=T.NotificationType7=T.NotificationType6=T.NotificationType5=T.NotificationType4=T.NotificationType3=T.NotificationType2=T.NotificationType1=T.NotificationType0=T.NotificationType=T.ErrorCodes=T.ResponseError=T.RequestType9=T.RequestType8=T.RequestType7=T.RequestType6=T.RequestType5=T.RequestType4=T.RequestType3=T.RequestType2=T.RequestType1=T.RequestType0=T.RequestType=T.Message=T.RAL=void 0;T.MessageStrategy=T.CancellationStrategy=T.CancellationSenderStrategy=T.CancellationReceiverStrategy=T.ConnectionError=T.ConnectionErrors=T.LogTraceNotification=T.SetTraceNotification=T.TraceFormat=T.TraceValues=T.Trace=void 0;var pe=Ps();Object.defineProperty(T,"Message",{enumerable:!0,get:function(){return pe.Message}});Object.defineProperty(T,"RequestType",{enumerable:!0,get:function(){return pe.RequestType}});Object.defineProperty(T,"RequestType0",{enumerable:!0,get:function(){return pe.RequestType0}});Object.defineProperty(T,"RequestType1",{enumerable:!0,get:function(){return pe.RequestType1}});Object.defineProperty(T,"RequestType2",{enumerable:!0,get:function(){return pe.RequestType2}});Object.defineProperty(T,"RequestType3",{enumerable:!0,get:function(){return pe.RequestType3}});Object.defineProperty(T,"RequestType4",{enumerable:!0,get:function(){return pe.RequestType4}});Object.defineProperty(T,"RequestType5",{enumerable:!0,get:function(){return pe.RequestType5}});Object.defineProperty(T,"RequestType6",{enumerable:!0,get:function(){return pe.RequestType6}});Object.defineProperty(T,"RequestType7",{enumerable:!0,get:function(){return pe.RequestType7}});Object.defineProperty(T,"RequestType8",{enumerable:!0,get:function(){return pe.RequestType8}});Object.defineProperty(T,"RequestType9",{enumerable:!0,get:function(){return pe.RequestType9}});Object.defineProperty(T,"ResponseError",{enumerable:!0,get:function(){return pe.ResponseError}});Object.defineProperty(T,"ErrorCodes",{enumerable:!0,get:function(){return pe.ErrorCodes}});Object.defineProperty(T,"NotificationType",{enumerable:!0,get:function(){return pe.NotificationType}});Object.defineProperty(T,"NotificationType0",{enumerable:!0,get:function(){return pe.NotificationType0}});Object.defineProperty(T,"NotificationType1",{enumerable:!0,get:function(){return pe.NotificationType1}});Object.defineProperty(T,"NotificationType2",{enumerable:!0,get:function(){return pe.NotificationType2}});Object.defineProperty(T,"NotificationType3",{enumerable:!0,get:function(){return pe.NotificationType3}});Object.defineProperty(T,"NotificationType4",{enumerable:!0,get:function(){return pe.NotificationType4}});Object.defineProperty(T,"NotificationType5",{enumerable:!0,get:function(){return pe.NotificationType5}});Object.defineProperty(T,"NotificationType6",{enumerable:!0,get:function(){return pe.NotificationType6}});Object.defineProperty(T,"NotificationType7",{enumerable:!0,get:function(){return pe.NotificationType7}});Object.defineProperty(T,"NotificationType8",{enumerable:!0,get:function(){return pe.NotificationType8}});Object.defineProperty(T,"NotificationType9",{enumerable:!0,get:function(){return pe.NotificationType9}});Object.defineProperty(T,"ParameterStructures",{enumerable:!0,get:function(){return pe.ParameterStructures}});var na=ws();Object.defineProperty(T,"LinkedMap",{enumerable:!0,get:function(){return na.LinkedMap}});Object.defineProperty(T,"LRUCache",{enumerable:!0,get:function(){return na.LRUCache}});Object.defineProperty(T,"Touch",{enumerable:!0,get:function(){return na.Touch}});var Bm=Xu();Object.defineProperty(T,"Disposable",{enumerable:!0,get:function(){return Bm.Disposable}});var pl=Mn();Object.defineProperty(T,"Event",{enumerable:!0,get:function(){return pl.Event}});Object.defineProperty(T,"Emitter",{enumerable:!0,get:function(){return pl.Emitter}});var hl=ai();Object.defineProperty(T,"CancellationTokenSource",{enumerable:!0,get:function(){return hl.CancellationTokenSource}});Object.defineProperty(T,"CancellationToken",{enumerable:!0,get:function(){return hl.CancellationToken}});var ml=Zu();Object.defineProperty(T,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return ml.SharedArraySenderStrategy}});Object.defineProperty(T,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return ml.SharedArrayReceiverStrategy}});var ra=el();Object.defineProperty(T,"MessageReader",{enumerable:!0,get:function(){return ra.MessageReader}});Object.defineProperty(T,"AbstractMessageReader",{enumerable:!0,get:function(){return ra.AbstractMessageReader}});Object.defineProperty(T,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return ra.ReadableStreamMessageReader}});var ia=il();Object.defineProperty(T,"MessageWriter",{enumerable:!0,get:function(){return ia.MessageWriter}});Object.defineProperty(T,"AbstractMessageWriter",{enumerable:!0,get:function(){return ia.AbstractMessageWriter}});Object.defineProperty(T,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return ia.WriteableStreamMessageWriter}});var $m=ol();Object.defineProperty(T,"AbstractMessageBuffer",{enumerable:!0,get:function(){return $m.AbstractMessageBuffer}});var Ie=dl();Object.defineProperty(T,"ConnectionStrategy",{enumerable:!0,get:function(){return Ie.ConnectionStrategy}});Object.defineProperty(T,"ConnectionOptions",{enumerable:!0,get:function(){return Ie.ConnectionOptions}});Object.defineProperty(T,"NullLogger",{enumerable:!0,get:function(){return Ie.NullLogger}});Object.defineProperty(T,"createMessageConnection",{enumerable:!0,get:function(){return Ie.createMessageConnection}});Object.defineProperty(T,"ProgressToken",{enumerable:!0,get:function(){return Ie.ProgressToken}});Object.defineProperty(T,"ProgressType",{enumerable:!0,get:function(){return Ie.ProgressType}});Object.defineProperty(T,"Trace",{enumerable:!0,get:function(){return Ie.Trace}});Object.defineProperty(T,"TraceValues",{enumerable:!0,get:function(){return Ie.TraceValues}});Object.defineProperty(T,"TraceFormat",{enumerable:!0,get:function(){return Ie.TraceFormat}});Object.defineProperty(T,"SetTraceNotification",{enumerable:!0,get:function(){return Ie.SetTraceNotification}});Object.defineProperty(T,"LogTraceNotification",{enumerable:!0,get:function(){return Ie.LogTraceNotification}});Object.defineProperty(T,"ConnectionErrors",{enumerable:!0,get:function(){return Ie.ConnectionErrors}});Object.defineProperty(T,"ConnectionError",{enumerable:!0,get:function(){return Ie.ConnectionError}});Object.defineProperty(T,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return Ie.CancellationReceiverStrategy}});Object.defineProperty(T,"CancellationSenderStrategy",{enumerable:!0,get:function(){return Ie.CancellationSenderStrategy}});Object.defineProperty(T,"CancellationStrategy",{enumerable:!0,get:function(){return Ie.CancellationStrategy}});Object.defineProperty(T,"MessageStrategy",{enumerable:!0,get:function(){return Ie.MessageStrategy}});var zm=Qt();T.RAL=zm.default});var yl=N(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});var xt=pi(),In=class extends xt.AbstractMessageBuffer{constructor(t="utf-8"){super(t),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return In.emptyBuffer}fromString(t,n){return new TextEncoder().encode(t)}toString(t,n){return n==="ascii"?this.asciiDecoder.decode(t):new TextDecoder(n).decode(t)}asNative(t,n){return n===void 0?t:t.slice(0,n)}allocNative(t){return new Uint8Array(t)}};In.emptyBuffer=new Uint8Array(0);var oa=class{constructor(t){this.socket=t,this._onData=new xt.Emitter,this._messageListener=n=>{n.data.arrayBuffer().then(i=>{this._onData.fire(new Uint8Array(i))},()=>{(0,xt.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(t){return this.socket.addEventListener("close",t),xt.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),xt.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),xt.Disposable.create(()=>this.socket.removeEventListener("end",t))}onData(t){return this._onData.event(t)}},sa=class{constructor(t){this.socket=t}onClose(t){return this.socket.addEventListener("close",t),xt.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),xt.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),xt.Disposable.create(()=>this.socket.removeEventListener("end",t))}write(t,n){if(typeof t=="string"){if(n!==void 0&&n!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${n}`);this.socket.send(t)}else this.socket.send(t);return Promise.resolve()}end(){this.socket.close()}},Ym=new TextEncoder,gl=Object.freeze({messageBuffer:Object.freeze({create:e=>new In(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if(t.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(Ym.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new oa(e),asWritableStream:e=>new sa(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){let n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function aa(){return gl}(function(e){function t(){xt.RAL.install(gl)}e.install=t})(aa||(aa={}));ca.default=aa});var bn=N(tt=>{"use strict";var Vm=tt&&tt.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Km=tt&&tt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Vm(t,e,n)};Object.defineProperty(tt,"__esModule",{value:!0});tt.createMessageConnection=tt.BrowserMessageWriter=tt.BrowserMessageReader=void 0;var Qm=yl();Qm.default.install();var jn=pi();Km(pi(),tt);var ua=class extends jn.AbstractMessageReader{constructor(t){super(),this._onData=new jn.Emitter,this._messageListener=n=>{this._onData.fire(n.data)},t.addEventListener("error",n=>this.fireError(n)),t.onmessage=this._messageListener}listen(t){return this._onData.event(t)}};tt.BrowserMessageReader=ua;var la=class extends jn.AbstractMessageWriter{constructor(t){super(),this.port=t,this.errorCount=0,t.addEventListener("error",n=>this.fireError(n))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(n){return this.handleError(n,t),Promise.reject(n)}}handleError(t,n){this.errorCount++,this.fireError(t,n,this.errorCount)}end(){}};tt.BrowserMessageWriter=la;function Jm(e,t,n,r){return n===void 0&&(n=jn.NullLogger),jn.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,jn.createMessageConnection)(e,t,n,r)}tt.createMessageConnection=Jm});var fa=N((z_,vl)=>{"use strict";vl.exports=bn()});var mi=N((bl,hi)=>{(function(e){if(typeof hi=="object"&&typeof hi.exports=="object"){var t=e(Za,bl);t!==void 0&&(hi.exports=t)}else typeof define=="function"&&define.amd&&define(["require","exports"],e)})(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocument=t.EOL=t.WorkspaceFolder=t.InlayHint=t.InlayHintLabelPart=t.InlayHintKind=t.InlineValueContext=t.InlineValueEvaluatableExpression=t.InlineValueVariableLookup=t.InlineValueText=t.SemanticTokens=t.SemanticTokenModifiers=t.SemanticTokenTypes=t.SelectionRange=t.DocumentLink=t.FormattingOptions=t.CodeLens=t.CodeAction=t.CodeActionContext=t.CodeActionTriggerKind=t.CodeActionKind=t.DocumentSymbol=t.WorkspaceSymbol=t.SymbolInformation=t.SymbolTag=t.SymbolKind=t.DocumentHighlight=t.DocumentHighlightKind=t.SignatureInformation=t.ParameterInformation=t.Hover=t.MarkedString=t.CompletionList=t.CompletionItem=t.CompletionItemLabelDetails=t.InsertTextMode=t.InsertReplaceEdit=t.CompletionItemTag=t.InsertTextFormat=t.CompletionItemKind=t.MarkupContent=t.MarkupKind=t.TextDocumentItem=t.OptionalVersionedTextDocumentIdentifier=t.VersionedTextDocumentIdentifier=t.TextDocumentIdentifier=t.WorkspaceChange=t.WorkspaceEdit=t.DeleteFile=t.RenameFile=t.CreateFile=t.TextDocumentEdit=t.AnnotatedTextEdit=t.ChangeAnnotationIdentifier=t.ChangeAnnotation=t.TextEdit=t.Command=t.Diagnostic=t.CodeDescription=t.DiagnosticTag=t.DiagnosticSeverity=t.DiagnosticRelatedInformation=t.FoldingRange=t.FoldingRangeKind=t.ColorPresentation=t.ColorInformation=t.Color=t.LocationLink=t.Location=t.Range=t.Position=t.uinteger=t.integer=t.URI=t.DocumentUri=void 0;var n;(function(l){function g(y){return typeof y=="string"}l.is=g})(n=t.DocumentUri||(t.DocumentUri={}));var r;(function(l){function g(y){return typeof y=="string"}l.is=g})(r=t.URI||(t.URI={}));var i;(function(l){l.MIN_VALUE=-2147483648,l.MAX_VALUE=2147483647;function g(y){return typeof y=="number"&&l.MIN_VALUE<=y&&y<=l.MAX_VALUE}l.is=g})(i=t.integer||(t.integer={}));var o;(function(l){l.MIN_VALUE=0,l.MAX_VALUE=2147483647;function g(y){return typeof y=="number"&&l.MIN_VALUE<=y&&y<=l.MAX_VALUE}l.is=g})(o=t.uinteger||(t.uinteger={}));var s;(function(l){function g(d,a){return d===Number.MAX_VALUE&&(d=o.MAX_VALUE),a===Number.MAX_VALUE&&(a=o.MAX_VALUE),{line:d,character:a}}l.create=g;function y(d){var a=d;return _.objectLiteral(a)&&_.uinteger(a.line)&&_.uinteger(a.character)}l.is=y})(s=t.Position||(t.Position={}));var u;(function(l){function g(d,a,R,k){if(_.uinteger(d)&&_.uinteger(a)&&_.uinteger(R)&&_.uinteger(k))return{start:s.create(d,a),end:s.create(R,k)};if(s.is(d)&&s.is(a))return{start:d,end:a};throw new Error("Range#create called with invalid arguments[".concat(d,", ").concat(a,", ").concat(R,", ").concat(k,"]"))}l.create=g;function y(d){var a=d;return _.objectLiteral(a)&&s.is(a.start)&&s.is(a.end)}l.is=y})(u=t.Range||(t.Range={}));var c;(function(l){function g(d,a){return{uri:d,range:a}}l.create=g;function y(d){var a=d;return _.objectLiteral(a)&&u.is(a.range)&&(_.string(a.uri)||_.undefined(a.uri))}l.is=y})(c=t.Location||(t.Location={}));var p;(function(l){function g(d,a,R,k){return{targetUri:d,targetRange:a,targetSelectionRange:R,originSelectionRange:k}}l.create=g;function y(d){var a=d;return _.objectLiteral(a)&&u.is(a.targetRange)&&_.string(a.targetUri)&&u.is(a.targetSelectionRange)&&(u.is(a.originSelectionRange)||_.undefined(a.originSelectionRange))}l.is=y})(p=t.LocationLink||(t.LocationLink={}));var m;(function(l){function g(d,a,R,k){return{red:d,green:a,blue:R,alpha:k}}l.create=g;function y(d){var a=d;return _.objectLiteral(a)&&_.numberRange(a.red,0,1)&&_.numberRange(a.green,0,1)&&_.numberRange(a.blue,0,1)&&_.numberRange(a.alpha,0,1)}l.is=y})(m=t.Color||(t.Color={}));var v;(function(l){function g(d,a){return{range:d,color:a}}l.create=g;function y(d){var a=d;return _.objectLiteral(a)&&u.is(a.range)&&m.is(a.color)}l.is=y})(v=t.ColorInformation||(t.ColorInformation={}));var C;(function(l){function g(d,a,R){return{label:d,textEdit:a,additionalTextEdits:R}}l.create=g;function y(d){var a=d;return _.objectLiteral(a)&&_.string(a.label)&&(_.undefined(a.textEdit)||$.is(a))&&(_.undefined(a.additionalTextEdits)||_.typedArray(a.additionalTextEdits,$.is))}l.is=y})(C=t.ColorPresentation||(t.ColorPresentation={}));var P;(function(l){l.Comment="comment",l.Imports="imports",l.Region="region"})(P=t.FoldingRangeKind||(t.FoldingRangeKind={}));var w;(function(l){function g(d,a,R,k,J,De){var de={startLine:d,endLine:a};return _.defined(R)&&(de.startCharacter=R),_.defined(k)&&(de.endCharacter=k),_.defined(J)&&(de.kind=J),_.defined(De)&&(de.collapsedText=De),de}l.create=g;function y(d){var a=d;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))}l.is=y})(w=t.FoldingRange||(t.FoldingRange={}));var A;(function(l){function g(d,a){return{location:d,message:a}}l.create=g;function y(d){var a=d;return _.defined(a)&&c.is(a.location)&&_.string(a.message)}l.is=y})(A=t.DiagnosticRelatedInformation||(t.DiagnosticRelatedInformation={}));var B;(function(l){l.Error=1,l.Warning=2,l.Information=3,l.Hint=4})(B=t.DiagnosticSeverity||(t.DiagnosticSeverity={}));var L;(function(l){l.Unnecessary=1,l.Deprecated=2})(L=t.DiagnosticTag||(t.DiagnosticTag={}));var D;(function(l){function g(y){var d=y;return _.objectLiteral(d)&&_.string(d.href)}l.is=g})(D=t.CodeDescription||(t.CodeDescription={}));var b;(function(l){function g(d,a,R,k,J,De){var de={range:d,message:a};return _.defined(R)&&(de.severity=R),_.defined(k)&&(de.code=k),_.defined(J)&&(de.source=J),_.defined(De)&&(de.relatedInformation=De),de}l.create=g;function y(d){var a,R=d;return _.defined(R)&&u.is(R.range)&&_.string(R.message)&&(_.number(R.severity)||_.undefined(R.severity))&&(_.integer(R.code)||_.string(R.code)||_.undefined(R.code))&&(_.undefined(R.codeDescription)||_.string((a=R.codeDescription)===null||a===void 0?void 0:a.href))&&(_.string(R.source)||_.undefined(R.source))&&(_.undefined(R.relatedInformation)||_.typedArray(R.relatedInformation,A.is))}l.is=y})(b=t.Diagnostic||(t.Diagnostic={}));var q;(function(l){function g(d,a){for(var R=[],k=2;k<arguments.length;k++)R[k-2]=arguments[k];var J={title:d,command:a};return _.defined(R)&&R.length>0&&(J.arguments=R),J}l.create=g;function y(d){var a=d;return _.defined(a)&&_.string(a.title)&&_.string(a.command)}l.is=y})(q=t.Command||(t.Command={}));var $;(function(l){function g(R,k){return{range:R,newText:k}}l.replace=g;function y(R,k){return{range:{start:R,end:R},newText:k}}l.insert=y;function d(R){return{range:R,newText:""}}l.del=d;function a(R){var k=R;return _.objectLiteral(k)&&_.string(k.newText)&&u.is(k.range)}l.is=a})($=t.TextEdit||(t.TextEdit={}));var Z;(function(l){function g(d,a,R){var k={label:d};return a!==void 0&&(k.needsConfirmation=a),R!==void 0&&(k.description=R),k}l.create=g;function y(d){var a=d;return _.objectLiteral(a)&&_.string(a.label)&&(_.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(_.string(a.description)||a.description===void 0)}l.is=y})(Z=t.ChangeAnnotation||(t.ChangeAnnotation={}));var ue;(function(l){function g(y){var d=y;return _.string(d)}l.is=g})(ue=t.ChangeAnnotationIdentifier||(t.ChangeAnnotationIdentifier={}));var Ue;(function(l){function g(R,k,J){return{range:R,newText:k,annotationId:J}}l.replace=g;function y(R,k,J){return{range:{start:R,end:R},newText:k,annotationId:J}}l.insert=y;function d(R,k){return{range:R,newText:"",annotationId:k}}l.del=d;function a(R){var k=R;return $.is(k)&&(Z.is(k.annotationId)||ue.is(k.annotationId))}l.is=a})(Ue=t.AnnotatedTextEdit||(t.AnnotatedTextEdit={}));var ut;(function(l){function g(d,a){return{textDocument:d,edits:a}}l.create=g;function y(d){var a=d;return _.defined(a)&&Ae.is(a.textDocument)&&Array.isArray(a.edits)}l.is=y})(ut=t.TextDocumentEdit||(t.TextDocumentEdit={}));var lt;(function(l){function g(d,a,R){var k={kind:"create",uri:d};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(k.options=a),R!==void 0&&(k.annotationId=R),k}l.create=g;function y(d){var a=d;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||ue.is(a.annotationId))}l.is=y})(lt=t.CreateFile||(t.CreateFile={}));var F;(function(l){function g(d,a,R,k){var J={kind:"rename",oldUri:d,newUri:a};return R!==void 0&&(R.overwrite!==void 0||R.ignoreIfExists!==void 0)&&(J.options=R),k!==void 0&&(J.annotationId=k),J}l.create=g;function y(d){var a=d;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||ue.is(a.annotationId))}l.is=y})(F=t.RenameFile||(t.RenameFile={}));var x;(function(l){function g(d,a,R){var k={kind:"delete",uri:d};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(k.options=a),R!==void 0&&(k.annotationId=R),k}l.create=g;function y(d){var a=d;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||ue.is(a.annotationId))}l.is=y})(x=t.DeleteFile||(t.DeleteFile={}));var H;(function(l){function g(y){var d=y;return d&&(d.changes!==void 0||d.documentChanges!==void 0)&&(d.documentChanges===void 0||d.documentChanges.every(function(a){return _.string(a.kind)?lt.is(a)||F.is(a)||x.is(a):ut.is(a)}))}l.is=g})(H=t.WorkspaceEdit||(t.WorkspaceEdit={}));var I=function(){function l(g,y){this.edits=g,this.changeAnnotations=y}return l.prototype.insert=function(g,y,d){var a,R;if(d===void 0?a=$.insert(g,y):ue.is(d)?(R=d,a=Ue.insert(g,y,d)):(this.assertChangeAnnotations(this.changeAnnotations),R=this.changeAnnotations.manage(d),a=Ue.insert(g,y,R)),this.edits.push(a),R!==void 0)return R},l.prototype.replace=function(g,y,d){var a,R;if(d===void 0?a=$.replace(g,y):ue.is(d)?(R=d,a=Ue.replace(g,y,d)):(this.assertChangeAnnotations(this.changeAnnotations),R=this.changeAnnotations.manage(d),a=Ue.replace(g,y,R)),this.edits.push(a),R!==void 0)return R},l.prototype.delete=function(g,y){var d,a;if(y===void 0?d=$.del(g):ue.is(y)?(a=y,d=Ue.del(g,y)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(y),d=Ue.del(g,a)),this.edits.push(d),a!==void 0)return a},l.prototype.add=function(g){this.edits.push(g)},l.prototype.all=function(){return this.edits},l.prototype.clear=function(){this.edits.splice(0,this.edits.length)},l.prototype.assertChangeAnnotations=function(g){if(g===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},l}(),ie=function(){function l(g){this._annotations=g===void 0?Object.create(null):g,this._counter=0,this._size=0}return l.prototype.all=function(){return this._annotations},Object.defineProperty(l.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),l.prototype.manage=function(g,y){var d;if(ue.is(g)?d=g:(d=this.nextId(),y=g),this._annotations[d]!==void 0)throw new Error("Id ".concat(d," is already in use."));if(y===void 0)throw new Error("No annotation provided for id ".concat(d));return this._annotations[d]=y,this._size++,d},l.prototype.nextId=function(){return this._counter++,this._counter.toString()},l}(),X=function(){function l(g){var y=this;this._textEditChanges=Object.create(null),g!==void 0?(this._workspaceEdit=g,g.documentChanges?(this._changeAnnotations=new ie(g.changeAnnotations),g.changeAnnotations=this._changeAnnotations.all(),g.documentChanges.forEach(function(d){if(ut.is(d)){var a=new I(d.edits,y._changeAnnotations);y._textEditChanges[d.textDocument.uri]=a}})):g.changes&&Object.keys(g.changes).forEach(function(d){var a=new I(g.changes[d]);y._textEditChanges[d]=a})):this._workspaceEdit={}}return Object.defineProperty(l.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),l.prototype.getTextEditChange=function(g){if(Ae.is(g)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var y={uri:g.uri,version:g.version},d=this._textEditChanges[y.uri];if(!d){var a=[],R={textDocument:y,edits:a};this._workspaceEdit.documentChanges.push(R),d=new I(a,this._changeAnnotations),this._textEditChanges[y.uri]=d}return d}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var d=this._textEditChanges[g];if(!d){var a=[];this._workspaceEdit.changes[g]=a,d=new I(a),this._textEditChanges[g]=d}return d}},l.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ie,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},l.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},l.prototype.createFile=function(g,y,d){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;Z.is(y)||ue.is(y)?a=y:d=y;var R,k;if(a===void 0?R=lt.create(g,d):(k=ue.is(a)?a:this._changeAnnotations.manage(a),R=lt.create(g,d,k)),this._workspaceEdit.documentChanges.push(R),k!==void 0)return k},l.prototype.renameFile=function(g,y,d,a){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var R;Z.is(d)||ue.is(d)?R=d:a=d;var k,J;if(R===void 0?k=F.create(g,y,a):(J=ue.is(R)?R:this._changeAnnotations.manage(R),k=F.create(g,y,a,J)),this._workspaceEdit.documentChanges.push(k),J!==void 0)return J},l.prototype.deleteFile=function(g,y,d){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;Z.is(y)||ue.is(y)?a=y:d=y;var R,k;if(a===void 0?R=x.create(g,d):(k=ue.is(a)?a:this._changeAnnotations.manage(a),R=x.create(g,d,k)),this._workspaceEdit.documentChanges.push(R),k!==void 0)return k},l}();t.WorkspaceChange=X;var K;(function(l){function g(d){return{uri:d}}l.create=g;function y(d){var a=d;return _.defined(a)&&_.string(a.uri)}l.is=y})(K=t.TextDocumentIdentifier||(t.TextDocumentIdentifier={}));var ze;(function(l){function g(d,a){return{uri:d,version:a}}l.create=g;function y(d){var a=d;return _.defined(a)&&_.string(a.uri)&&_.integer(a.version)}l.is=y})(ze=t.VersionedTextDocumentIdentifier||(t.VersionedTextDocumentIdentifier={}));var Ae;(function(l){function g(d,a){return{uri:d,version:a}}l.create=g;function y(d){var a=d;return _.defined(a)&&_.string(a.uri)&&(a.version===null||_.integer(a.version))}l.is=y})(Ae=t.OptionalVersionedTextDocumentIdentifier||(t.OptionalVersionedTextDocumentIdentifier={}));var ce;(function(l){function g(d,a,R,k){return{uri:d,languageId:a,version:R,text:k}}l.create=g;function y(d){var a=d;return _.defined(a)&&_.string(a.uri)&&_.string(a.languageId)&&_.integer(a.version)&&_.string(a.text)}l.is=y})(ce=t.TextDocumentItem||(t.TextDocumentItem={}));var Ct;(function(l){l.PlainText="plaintext",l.Markdown="markdown";function g(y){var d=y;return d===l.PlainText||d===l.Markdown}l.is=g})(Ct=t.MarkupKind||(t.MarkupKind={}));var Pn;(function(l){function g(y){var d=y;return _.objectLiteral(y)&&Ct.is(d.kind)&&_.string(d.value)}l.is=g})(Pn=t.MarkupContent||(t.MarkupContent={}));var Q;(function(l){l.Text=1,l.Method=2,l.Function=3,l.Constructor=4,l.Field=5,l.Variable=6,l.Class=7,l.Interface=8,l.Module=9,l.Property=10,l.Unit=11,l.Value=12,l.Enum=13,l.Keyword=14,l.Snippet=15,l.Color=16,l.File=17,l.Reference=18,l.Folder=19,l.EnumMember=20,l.Constant=21,l.Struct=22,l.Event=23,l.Operator=24,l.TypeParameter=25})(Q=t.CompletionItemKind||(t.CompletionItemKind={}));var Mr;(function(l){l.PlainText=1,l.Snippet=2})(Mr=t.InsertTextFormat||(t.InsertTextFormat={}));var Fr;(function(l){l.Deprecated=1})(Fr=t.CompletionItemTag||(t.CompletionItemTag={}));var so;(function(l){function g(d,a,R){return{newText:d,insert:a,replace:R}}l.create=g;function y(d){var a=d;return a&&_.string(a.newText)&&u.is(a.insert)&&u.is(a.replace)}l.is=y})(so=t.InsertReplaceEdit||(t.InsertReplaceEdit={}));var ao;(function(l){l.asIs=1,l.adjustIndentation=2})(ao=t.InsertTextMode||(t.InsertTextMode={}));var co;(function(l){function g(y){var d=y;return d&&(_.string(d.detail)||d.detail===void 0)&&(_.string(d.description)||d.description===void 0)}l.is=g})(co=t.CompletionItemLabelDetails||(t.CompletionItemLabelDetails={}));var uo;(function(l){function g(y){return{label:y}}l.create=g})(uo=t.CompletionItem||(t.CompletionItem={}));var lo;(function(l){function g(y,d){return{items:y||[],isIncomplete:!!d}}l.create=g})(lo=t.CompletionList||(t.CompletionList={}));var Gn;(function(l){function g(d){return d.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}l.fromPlainText=g;function y(d){var a=d;return _.string(a)||_.objectLiteral(a)&&_.string(a.language)&&_.string(a.value)}l.is=y})(Gn=t.MarkedString||(t.MarkedString={}));var Pt;(function(l){function g(y){var d=y;return!!d&&_.objectLiteral(d)&&(Pn.is(d.contents)||Gn.is(d.contents)||_.typedArray(d.contents,Gn.is))&&(y.range===void 0||u.is(y.range))}l.is=g})(Pt=t.Hover||(t.Hover={}));var fo;(function(l){function g(y,d){return d?{label:y,documentation:d}:{label:y}}l.create=g})(fo=t.ParameterInformation||(t.ParameterInformation={}));var po;(function(l){function g(y,d){for(var a=[],R=2;R<arguments.length;R++)a[R-2]=arguments[R];var k={label:y};return _.defined(d)&&(k.documentation=d),_.defined(a)?k.parameters=a:k.parameters=[],k}l.create=g})(po=t.SignatureInformation||(t.SignatureInformation={}));var Tn;(function(l){l.Text=1,l.Read=2,l.Write=3})(Tn=t.DocumentHighlightKind||(t.DocumentHighlightKind={}));var ho;(function(l){function g(y,d){var a={range:y};return _.number(d)&&(a.kind=d),a}l.create=g})(ho=t.DocumentHighlight||(t.DocumentHighlight={}));var Xn;(function(l){l.File=1,l.Module=2,l.Namespace=3,l.Package=4,l.Class=5,l.Method=6,l.Property=7,l.Field=8,l.Constructor=9,l.Enum=10,l.Interface=11,l.Function=12,l.Variable=13,l.Constant=14,l.String=15,l.Number=16,l.Boolean=17,l.Array=18,l.Object=19,l.Key=20,l.Null=21,l.EnumMember=22,l.Struct=23,l.Event=24,l.Operator=25,l.TypeParameter=26})(Xn=t.SymbolKind||(t.SymbolKind={}));var mo;(function(l){l.Deprecated=1})(mo=t.SymbolTag||(t.SymbolTag={}));var $t;(function(l){function g(y,d,a,R,k){var J={name:y,kind:d,location:{uri:R,range:a}};return k&&(J.containerName=k),J}l.create=g})($t=t.SymbolInformation||(t.SymbolInformation={}));var an;(function(l){function g(y,d,a,R){return R!==void 0?{name:y,kind:d,location:{uri:a,range:R}}:{name:y,kind:d,location:{uri:a}}}l.create=g})(an=t.WorkspaceSymbol||(t.WorkspaceSymbol={}));var go;(function(l){function g(d,a,R,k,J,De){var de={name:d,detail:a,kind:R,range:k,selectionRange:J};return De!==void 0&&(de.children=De),de}l.create=g;function y(d){var a=d;return a&&_.string(a.name)&&_.number(a.kind)&&u.is(a.range)&&u.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))}l.is=y})(go=t.DocumentSymbol||(t.DocumentSymbol={}));var yo;(function(l){l.Empty="",l.QuickFix="quickfix",l.Refactor="refactor",l.RefactorExtract="refactor.extract",l.RefactorInline="refactor.inline",l.RefactorRewrite="refactor.rewrite",l.Source="source",l.SourceOrganizeImports="source.organizeImports",l.SourceFixAll="source.fixAll"})(yo=t.CodeActionKind||(t.CodeActionKind={}));var Ot;(function(l){l.Invoked=1,l.Automatic=2})(Ot=t.CodeActionTriggerKind||(t.CodeActionTriggerKind={}));var Lr;(function(l){function g(d,a,R){var k={diagnostics:d};return a!=null&&(k.only=a),R!=null&&(k.triggerKind=R),k}l.create=g;function y(d){var a=d;return _.defined(a)&&_.typedArray(a.diagnostics,b.is)&&(a.only===void 0||_.typedArray(a.only,_.string))&&(a.triggerKind===void 0||a.triggerKind===Ot.Invoked||a.triggerKind===Ot.Automatic)}l.is=y})(Lr=t.CodeActionContext||(t.CodeActionContext={}));var Ir;(function(l){function g(d,a,R){var k={title:d},J=!0;return typeof a=="string"?(J=!1,k.kind=a):q.is(a)?k.command=a:k.edit=a,J&&R!==void 0&&(k.kind=R),k}l.create=g;function y(d){var a=d;return a&&_.string(a.title)&&(a.diagnostics===void 0||_.typedArray(a.diagnostics,b.is))&&(a.kind===void 0||_.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||q.is(a.command))&&(a.isPreferred===void 0||_.boolean(a.isPreferred))&&(a.edit===void 0||H.is(a.edit))}l.is=y})(Ir=t.CodeAction||(t.CodeAction={}));var Zn;(function(l){function g(d,a){var R={range:d};return _.defined(a)&&(R.data=a),R}l.create=g;function y(d){var a=d;return _.defined(a)&&u.is(a.range)&&(_.undefined(a.command)||q.is(a.command))}l.is=y})(Zn=t.CodeLens||(t.CodeLens={}));var jr;(function(l){function g(d,a){return{tabSize:d,insertSpaces:a}}l.create=g;function y(d){var a=d;return _.defined(a)&&_.uinteger(a.tabSize)&&_.boolean(a.insertSpaces)}l.is=y})(jr=t.FormattingOptions||(t.FormattingOptions={}));var zt;(function(l){function g(d,a,R){return{range:d,target:a,data:R}}l.create=g;function y(d){var a=d;return _.defined(a)&&u.is(a.range)&&(_.undefined(a.target)||_.string(a.target))}l.is=y})(zt=t.DocumentLink||(t.DocumentLink={}));var h;(function(l){function g(d,a){return{range:d,parent:a}}l.create=g;function y(d){var a=d;return _.objectLiteral(a)&&u.is(a.range)&&(a.parent===void 0||l.is(a.parent))}l.is=y})(h=t.SelectionRange||(t.SelectionRange={}));var S;(function(l){l.namespace="namespace",l.type="type",l.class="class",l.enum="enum",l.interface="interface",l.struct="struct",l.typeParameter="typeParameter",l.parameter="parameter",l.variable="variable",l.property="property",l.enumMember="enumMember",l.event="event",l.function="function",l.method="method",l.macro="macro",l.keyword="keyword",l.modifier="modifier",l.comment="comment",l.string="string",l.number="number",l.regexp="regexp",l.operator="operator",l.decorator="decorator"})(S=t.SemanticTokenTypes||(t.SemanticTokenTypes={}));var O;(function(l){l.declaration="declaration",l.definition="definition",l.readonly="readonly",l.static="static",l.deprecated="deprecated",l.abstract="abstract",l.async="async",l.modification="modification",l.documentation="documentation",l.defaultLibrary="defaultLibrary"})(O=t.SemanticTokenModifiers||(t.SemanticTokenModifiers={}));var j;(function(l){function g(y){var d=y;return _.objectLiteral(d)&&(d.resultId===void 0||typeof d.resultId=="string")&&Array.isArray(d.data)&&(d.data.length===0||typeof d.data[0]=="number")}l.is=g})(j=t.SemanticTokens||(t.SemanticTokens={}));var le;(function(l){function g(d,a){return{range:d,text:a}}l.create=g;function y(d){var a=d;return a!=null&&u.is(a.range)&&_.string(a.text)}l.is=y})(le=t.InlineValueText||(t.InlineValueText={}));var se;(function(l){function g(d,a,R){return{range:d,variableName:a,caseSensitiveLookup:R}}l.create=g;function y(d){var a=d;return a!=null&&u.is(a.range)&&_.boolean(a.caseSensitiveLookup)&&(_.string(a.variableName)||a.variableName===void 0)}l.is=y})(se=t.InlineValueVariableLookup||(t.InlineValueVariableLookup={}));var me;(function(l){function g(d,a){return{range:d,expression:a}}l.create=g;function y(d){var a=d;return a!=null&&u.is(a.range)&&(_.string(a.expression)||a.expression===void 0)}l.is=y})(me=t.InlineValueEvaluatableExpression||(t.InlineValueEvaluatableExpression={}));var ge;(function(l){function g(d,a){return{frameId:d,stoppedLocation:a}}l.create=g;function y(d){var a=d;return _.defined(a)&&u.is(d.stoppedLocation)}l.is=y})(ge=t.InlineValueContext||(t.InlineValueContext={}));var ee;(function(l){l.Type=1,l.Parameter=2;function g(y){return y===1||y===2}l.is=g})(ee=t.InlayHintKind||(t.InlayHintKind={}));var fe;(function(l){function g(d){return{value:d}}l.create=g;function y(d){var a=d;return _.objectLiteral(a)&&(a.tooltip===void 0||_.string(a.tooltip)||Pn.is(a.tooltip))&&(a.location===void 0||c.is(a.location))&&(a.command===void 0||q.is(a.command))}l.is=y})(fe=t.InlayHintLabelPart||(t.InlayHintLabelPart={}));var oe;(function(l){function g(d,a,R){var k={position:d,label:a};return R!==void 0&&(k.kind=R),k}l.create=g;function y(d){var a=d;return _.objectLiteral(a)&&s.is(a.position)&&(_.string(a.label)||_.typedArray(a.label,fe.is))&&(a.kind===void 0||ee.is(a.kind))&&a.textEdits===void 0||_.typedArray(a.textEdits,$.is)&&(a.tooltip===void 0||_.string(a.tooltip)||Pn.is(a.tooltip))&&(a.paddingLeft===void 0||_.boolean(a.paddingLeft))&&(a.paddingRight===void 0||_.boolean(a.paddingRight))}l.is=y})(oe=t.InlayHint||(t.InlayHint={}));var Pe;(function(l){function g(y){var d=y;return _.objectLiteral(d)&&r.is(d.uri)&&_.string(d.name)}l.is=g})(Pe=t.WorkspaceFolder||(t.WorkspaceFolder={})),t.EOL=[`
|
|
64
64
|
`,`\r
|
|
65
|
-
`,"\r"];var
|
|
66
|
-
`,
|
|
67
|
-
`&&u++}d&&y.length>0&&g.push(y.length),this._lineOffsets=g}return this._lineOffsets},c.prototype.positionAt=function(g){g=Math.max(Math.min(g,this._content.length),0);var y=this.getLineOffsets(),d=0,u=y.length;if(u===0)return s.create(0,g);for(;d<u;){var D=Math.floor((d+u)/2);y[D]>g?u=D:d=D+1}var k=d-1;return s.create(k,g-y[k])},c.prototype.offsetAt=function(g){var y=this.getLineOffsets();if(g.line>=y.length)return this._content.length;if(g.line<0)return 0;var d=y[g.line],u=g.line+1<y.length?y[g.line+1]:this._content.length;return Math.max(Math.min(d+g.character,u),d)},Object.defineProperty(c.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),c}(),_;(function(c){var g=Object.prototype.toString;function y(ee){return typeof ee<"u"}c.defined=y;function d(ee){return typeof ee>"u"}c.undefined=d;function u(ee){return ee===!0||ee===!1}c.boolean=u;function D(ee){return g.call(ee)==="[object String]"}c.string=D;function k(ee){return g.call(ee)==="[object Number]"}c.number=k;function Q(ee,En,Hr){return g.call(ee)==="[object Number]"&&En<=ee&&ee<=Hr}c.numberRange=Q;function ve(ee){return g.call(ee)==="[object Number]"&&-2147483648<=ee&&ee<=2147483647}c.integer=ve;function le(ee){return g.call(ee)==="[object Number]"&&0<=ee&&ee<=2147483647}c.uinteger=le;function lt(ee){return g.call(ee)==="[object Function]"}c.func=lt;function ft(ee){return ee!==null&&typeof ee=="object"}c.objectLiteral=ft;function It(ee,En){return Array.isArray(ee)&&ee.every(En)}c.typedArray=It})(_||(_={}))})});var ge=q($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.ProtocolNotificationType=$e.ProtocolNotificationType0=$e.ProtocolRequestType=$e.ProtocolRequestType0=$e.RegistrationType=$e.MessageDirection=void 0;var Yn=wn(),Wm;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Wm=$e.MessageDirection||($e.MessageDirection={}));var ia=class{constructor(t){this.method=t}};$e.RegistrationType=ia;var oa=class extends Yn.RequestType0{constructor(t){super(t)}};$e.ProtocolRequestType0=oa;var sa=class extends Yn.RequestType{constructor(t){super(t,Yn.ParameterStructures.byName)}};$e.ProtocolRequestType=sa;var aa=class extends Yn.NotificationType0{constructor(t){super(t)}};$e.ProtocolNotificationType0=aa;var ua=class extends Yn.NotificationType{constructor(t){super(t,Yn.ParameterStructures.byName)}};$e.ProtocolNotificationType=ua});var mi=q(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.objectLiteral=Pe.typedArray=Pe.stringArray=Pe.array=Pe.func=Pe.error=Pe.number=Pe.string=Pe.boolean=void 0;function Hm(e){return e===!0||e===!1}Pe.boolean=Hm;function ll(e){return typeof e=="string"||e instanceof String}Pe.string=ll;function Um(e){return typeof e=="number"||e instanceof Number}Pe.number=Um;function Bm(e){return e instanceof Error}Pe.error=Bm;function $m(e){return typeof e=="function"}Pe.func=$m;function fl(e){return Array.isArray(e)}Pe.array=fl;function zm(e){return fl(e)&&e.every(t=>ll(t))}Pe.stringArray=zm;function Ym(e,t){return Array.isArray(e)&&e.every(t)}Pe.typedArray=Ym;function Vm(e){return e!==null&&typeof e=="object"}Pe.objectLiteral=Vm});var pl=q(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.ImplementationRequest=void 0;var dl=ge(),Km;(function(e){e.method="textDocument/implementation",e.messageDirection=dl.MessageDirection.clientToServer,e.type=new dl.ProtocolRequestType(e.method)})(Km=_r.ImplementationRequest||(_r.ImplementationRequest={}))});var ml=q(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.TypeDefinitionRequest=void 0;var hl=ge(),Qm;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=hl.MessageDirection.clientToServer,e.type=new hl.ProtocolRequestType(e.method)})(Qm=Dr.TypeDefinitionRequest||(Dr.TypeDefinitionRequest={}))});var gl=q(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.DidChangeWorkspaceFoldersNotification=tn.WorkspaceFoldersRequest=void 0;var gi=ge(),Jm;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=gi.MessageDirection.serverToClient,e.type=new gi.ProtocolRequestType0(e.method)})(Jm=tn.WorkspaceFoldersRequest||(tn.WorkspaceFoldersRequest={}));var Gm;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=gi.MessageDirection.clientToServer,e.type=new gi.ProtocolNotificationType(e.method)})(Gm=tn.DidChangeWorkspaceFoldersNotification||(tn.DidChangeWorkspaceFoldersNotification={}))});var vl=q(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.ConfigurationRequest=void 0;var yl=ge(),Xm;(function(e){e.method="workspace/configuration",e.messageDirection=yl.MessageDirection.serverToClient,e.type=new yl.ProtocolRequestType(e.method)})(Xm=Rr.ConfigurationRequest||(Rr.ConfigurationRequest={}))});var bl=q(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.ColorPresentationRequest=nn.DocumentColorRequest=void 0;var yi=ge(),Zm;(function(e){e.method="textDocument/documentColor",e.messageDirection=yi.MessageDirection.clientToServer,e.type=new yi.ProtocolRequestType(e.method)})(Zm=nn.DocumentColorRequest||(nn.DocumentColorRequest={}));var eg;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=yi.MessageDirection.clientToServer,e.type=new yi.ProtocolRequestType(e.method)})(eg=nn.ColorPresentationRequest||(nn.ColorPresentationRequest={}))});var Dl=q(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.FoldingRangeRequest=void 0;var _l=ge(),tg;(function(e){e.method="textDocument/foldingRange",e.messageDirection=_l.MessageDirection.clientToServer,e.type=new _l.ProtocolRequestType(e.method)})(tg=Cr.FoldingRangeRequest||(Cr.FoldingRangeRequest={}))});var Cl=q(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.DeclarationRequest=void 0;var Rl=ge(),ng;(function(e){e.method="textDocument/declaration",e.messageDirection=Rl.MessageDirection.clientToServer,e.type=new Rl.ProtocolRequestType(e.method)})(ng=Pr.DeclarationRequest||(Pr.DeclarationRequest={}))});var Tl=q(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.SelectionRangeRequest=void 0;var Pl=ge(),rg;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Pl.MessageDirection.clientToServer,e.type=new Pl.ProtocolRequestType(e.method)})(rg=Tr.SelectionRangeRequest||(Tr.SelectionRangeRequest={}))});var wl=q(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});mt.WorkDoneProgressCancelNotification=mt.WorkDoneProgressCreateRequest=mt.WorkDoneProgress=void 0;var ig=wn(),vi=ge(),og;(function(e){e.type=new ig.ProgressType;function t(n){return n===e.type}e.is=t})(og=mt.WorkDoneProgress||(mt.WorkDoneProgress={}));var sg;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=vi.MessageDirection.serverToClient,e.type=new vi.ProtocolRequestType(e.method)})(sg=mt.WorkDoneProgressCreateRequest||(mt.WorkDoneProgressCreateRequest={}));var ag;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=vi.MessageDirection.clientToServer,e.type=new vi.ProtocolNotificationType(e.method)})(ag=mt.WorkDoneProgressCancelNotification||(mt.WorkDoneProgressCancelNotification={}))});var xl=q(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.CallHierarchyOutgoingCallsRequest=gt.CallHierarchyIncomingCallsRequest=gt.CallHierarchyPrepareRequest=void 0;var Vn=ge(),ug;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=Vn.MessageDirection.clientToServer,e.type=new Vn.ProtocolRequestType(e.method)})(ug=gt.CallHierarchyPrepareRequest||(gt.CallHierarchyPrepareRequest={}));var cg;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=Vn.MessageDirection.clientToServer,e.type=new Vn.ProtocolRequestType(e.method)})(cg=gt.CallHierarchyIncomingCallsRequest||(gt.CallHierarchyIncomingCallsRequest={}));var lg;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=Vn.MessageDirection.clientToServer,e.type=new Vn.ProtocolRequestType(e.method)})(lg=gt.CallHierarchyOutgoingCallsRequest||(gt.CallHierarchyOutgoingCallsRequest={}))});var kl=q(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.SemanticTokensRefreshRequest=Te.SemanticTokensRangeRequest=Te.SemanticTokensDeltaRequest=Te.SemanticTokensRequest=Te.SemanticTokensRegistrationType=Te.TokenFormat=void 0;var Yt=ge(),fg;(function(e){e.Relative="relative"})(fg=Te.TokenFormat||(Te.TokenFormat={}));var bi;(function(e){e.method="textDocument/semanticTokens",e.type=new Yt.RegistrationType(e.method)})(bi=Te.SemanticTokensRegistrationType||(Te.SemanticTokensRegistrationType={}));var dg;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Yt.MessageDirection.clientToServer,e.type=new Yt.ProtocolRequestType(e.method),e.registrationMethod=bi.method})(dg=Te.SemanticTokensRequest||(Te.SemanticTokensRequest={}));var pg;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Yt.MessageDirection.clientToServer,e.type=new Yt.ProtocolRequestType(e.method),e.registrationMethod=bi.method})(pg=Te.SemanticTokensDeltaRequest||(Te.SemanticTokensDeltaRequest={}));var hg;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Yt.MessageDirection.clientToServer,e.type=new Yt.ProtocolRequestType(e.method),e.registrationMethod=bi.method})(hg=Te.SemanticTokensRangeRequest||(Te.SemanticTokensRangeRequest={}));var mg;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Yt.MessageDirection.clientToServer,e.type=new Yt.ProtocolRequestType0(e.method)})(mg=Te.SemanticTokensRefreshRequest||(Te.SemanticTokensRefreshRequest={}))});var Al=q(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.ShowDocumentRequest=void 0;var Sl=ge(),gg;(function(e){e.method="window/showDocument",e.messageDirection=Sl.MessageDirection.serverToClient,e.type=new Sl.ProtocolRequestType(e.method)})(gg=wr.ShowDocumentRequest||(wr.ShowDocumentRequest={}))});var ql=q(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.LinkedEditingRangeRequest=void 0;var Nl=ge(),yg;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Nl.MessageDirection.clientToServer,e.type=new Nl.ProtocolRequestType(e.method)})(yg=xr.LinkedEditingRangeRequest||(xr.LinkedEditingRangeRequest={}))});var El=q(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.WillDeleteFilesRequest=ye.DidDeleteFilesNotification=ye.DidRenameFilesNotification=ye.WillRenameFilesRequest=ye.DidCreateFilesNotification=ye.WillCreateFilesRequest=ye.FileOperationPatternKind=void 0;var ot=ge(),vg;(function(e){e.file="file",e.folder="folder"})(vg=ye.FileOperationPatternKind||(ye.FileOperationPatternKind={}));var bg;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolRequestType(e.method)})(bg=ye.WillCreateFilesRequest||(ye.WillCreateFilesRequest={}));var _g;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolNotificationType(e.method)})(_g=ye.DidCreateFilesNotification||(ye.DidCreateFilesNotification={}));var Dg;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolRequestType(e.method)})(Dg=ye.WillRenameFilesRequest||(ye.WillRenameFilesRequest={}));var Rg;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolNotificationType(e.method)})(Rg=ye.DidRenameFilesNotification||(ye.DidRenameFilesNotification={}));var Cg;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolNotificationType(e.method)})(Cg=ye.DidDeleteFilesNotification||(ye.DidDeleteFilesNotification={}));var Pg;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolRequestType(e.method)})(Pg=ye.WillDeleteFilesRequest||(ye.WillDeleteFilesRequest={}))});var Ml=q(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.MonikerRequest=yt.MonikerKind=yt.UniquenessLevel=void 0;var Ol=ge(),Tg;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(Tg=yt.UniquenessLevel||(yt.UniquenessLevel={}));var wg;(function(e){e.$import="import",e.$export="export",e.local="local"})(wg=yt.MonikerKind||(yt.MonikerKind={}));var xg;(function(e){e.method="textDocument/moniker",e.messageDirection=Ol.MessageDirection.clientToServer,e.type=new Ol.ProtocolRequestType(e.method)})(xg=yt.MonikerRequest||(yt.MonikerRequest={}))});var Fl=q(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.TypeHierarchySubtypesRequest=vt.TypeHierarchySupertypesRequest=vt.TypeHierarchyPrepareRequest=void 0;var Kn=ge(),kg;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Kn.MessageDirection.clientToServer,e.type=new Kn.ProtocolRequestType(e.method)})(kg=vt.TypeHierarchyPrepareRequest||(vt.TypeHierarchyPrepareRequest={}));var Sg;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Kn.MessageDirection.clientToServer,e.type=new Kn.ProtocolRequestType(e.method)})(Sg=vt.TypeHierarchySupertypesRequest||(vt.TypeHierarchySupertypesRequest={}));var Ag;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Kn.MessageDirection.clientToServer,e.type=new Kn.ProtocolRequestType(e.method)})(Ag=vt.TypeHierarchySubtypesRequest||(vt.TypeHierarchySubtypesRequest={}))});var Ll=q(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.InlineValueRefreshRequest=rn.InlineValueRequest=void 0;var _i=ge(),Ng;(function(e){e.method="textDocument/inlineValue",e.messageDirection=_i.MessageDirection.clientToServer,e.type=new _i.ProtocolRequestType(e.method)})(Ng=rn.InlineValueRequest||(rn.InlineValueRequest={}));var qg;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=_i.MessageDirection.clientToServer,e.type=new _i.ProtocolRequestType0(e.method)})(qg=rn.InlineValueRefreshRequest||(rn.InlineValueRefreshRequest={}))});var Il=q(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.InlayHintRefreshRequest=bt.InlayHintResolveRequest=bt.InlayHintRequest=void 0;var Qn=ge(),Eg;(function(e){e.method="textDocument/inlayHint",e.messageDirection=Qn.MessageDirection.clientToServer,e.type=new Qn.ProtocolRequestType(e.method)})(Eg=bt.InlayHintRequest||(bt.InlayHintRequest={}));var Og;(function(e){e.method="inlayHint/resolve",e.messageDirection=Qn.MessageDirection.clientToServer,e.type=new Qn.ProtocolRequestType(e.method)})(Og=bt.InlayHintResolveRequest||(bt.InlayHintResolveRequest={}));var Mg;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=Qn.MessageDirection.clientToServer,e.type=new Qn.ProtocolRequestType0(e.method)})(Mg=bt.InlayHintRefreshRequest||(bt.InlayHintRefreshRequest={}))});var Wl=q(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.DiagnosticRefreshRequest=Oe.WorkspaceDiagnosticRequest=Oe.DocumentDiagnosticRequest=Oe.DocumentDiagnosticReportKind=Oe.DiagnosticServerCancellationData=void 0;var jl=wn(),Fg=mi(),Jn=ge(),Lg;(function(e){function t(n){let r=n;return r&&Fg.boolean(r.retriggerRequest)}e.is=t})(Lg=Oe.DiagnosticServerCancellationData||(Oe.DiagnosticServerCancellationData={}));var Ig;(function(e){e.Full="full",e.Unchanged="unchanged"})(Ig=Oe.DocumentDiagnosticReportKind||(Oe.DocumentDiagnosticReportKind={}));var jg;(function(e){e.method="textDocument/diagnostic",e.messageDirection=Jn.MessageDirection.clientToServer,e.type=new Jn.ProtocolRequestType(e.method),e.partialResult=new jl.ProgressType})(jg=Oe.DocumentDiagnosticRequest||(Oe.DocumentDiagnosticRequest={}));var Wg;(function(e){e.method="workspace/diagnostic",e.messageDirection=Jn.MessageDirection.clientToServer,e.type=new Jn.ProtocolRequestType(e.method),e.partialResult=new jl.ProgressType})(Wg=Oe.WorkspaceDiagnosticRequest||(Oe.WorkspaceDiagnosticRequest={}));var Hg;(function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=Jn.MessageDirection.clientToServer,e.type=new Jn.ProtocolRequestType0(e.method)})(Hg=Oe.DiagnosticRefreshRequest||(Oe.DiagnosticRefreshRequest={}))});var Bl=q(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.DidCloseNotebookDocumentNotification=ie.DidSaveNotebookDocumentNotification=ie.DidChangeNotebookDocumentNotification=ie.NotebookCellArrayChange=ie.DidOpenNotebookDocumentNotification=ie.NotebookDocumentSyncRegistrationType=ie.NotebookDocument=ie.NotebookCell=ie.ExecutionSummary=ie.NotebookCellKind=void 0;var kr=hi(),_t=mi(),St=ge(),Hl;(function(e){e.Markup=1,e.Code=2;function t(n){return n===1||n===2}e.is=t})(Hl=ie.NotebookCellKind||(ie.NotebookCellKind={}));var Ul;(function(e){function t(i,o){let s={executionOrder:i};return(o===!0||o===!1)&&(s.success=o),s}e.create=t;function n(i){let o=i;return _t.objectLiteral(o)&&kr.uinteger.is(o.executionOrder)&&(o.success===void 0||_t.boolean(o.success))}e.is=n;function r(i,o){return i===o?!0:i==null||o===null||o===void 0?!1:i.executionOrder===o.executionOrder&&i.success===o.success}e.equals=r})(Ul=ie.ExecutionSummary||(ie.ExecutionSummary={}));var ca;(function(e){function t(o,s){return{kind:o,document:s}}e.create=t;function n(o){let s=o;return _t.objectLiteral(s)&&Hl.is(s.kind)&&kr.DocumentUri.is(s.document)&&(s.metadata===void 0||_t.objectLiteral(s.metadata))}e.is=n;function r(o,s){let a=new Set;return o.document!==s.document&&a.add("document"),o.kind!==s.kind&&a.add("kind"),o.executionSummary!==s.executionSummary&&a.add("executionSummary"),(o.metadata!==void 0||s.metadata!==void 0)&&!i(o.metadata,s.metadata)&&a.add("metadata"),(o.executionSummary!==void 0||s.executionSummary!==void 0)&&!Ul.equals(o.executionSummary,s.executionSummary)&&a.add("executionSummary"),a}e.diff=r;function i(o,s){if(o===s)return!0;if(o==null||s===null||s===void 0||typeof o!=typeof s||typeof o!="object")return!1;let a=Array.isArray(o),l=Array.isArray(s);if(a!==l)return!1;if(a&&l){if(o.length!==s.length)return!1;for(let p=0;p<o.length;p++)if(!i(o[p],s[p]))return!1}if(_t.objectLiteral(o)&&_t.objectLiteral(s)){let p=Object.keys(o),m=Object.keys(s);if(p.length!==m.length||(p.sort(),m.sort(),!i(p,m)))return!1;for(let v=0;v<p.length;v++){let C=p[v];if(!i(o[C],s[C]))return!1}}return!0}})(ca=ie.NotebookCell||(ie.NotebookCell={}));var Ug;(function(e){function t(r,i,o,s){return{uri:r,notebookType:i,version:o,cells:s}}e.create=t;function n(r){let i=r;return _t.objectLiteral(i)&&_t.string(i.uri)&&kr.integer.is(i.version)&&_t.typedArray(i.cells,ca.is)}e.is=n})(Ug=ie.NotebookDocument||(ie.NotebookDocument={}));var Sr;(function(e){e.method="notebookDocument/sync",e.messageDirection=St.MessageDirection.clientToServer,e.type=new St.RegistrationType(e.method)})(Sr=ie.NotebookDocumentSyncRegistrationType||(ie.NotebookDocumentSyncRegistrationType={}));var Bg;(function(e){e.method="notebookDocument/didOpen",e.messageDirection=St.MessageDirection.clientToServer,e.type=new St.ProtocolNotificationType(e.method),e.registrationMethod=Sr.method})(Bg=ie.DidOpenNotebookDocumentNotification||(ie.DidOpenNotebookDocumentNotification={}));var $g;(function(e){function t(r){let i=r;return _t.objectLiteral(i)&&kr.uinteger.is(i.start)&&kr.uinteger.is(i.deleteCount)&&(i.cells===void 0||_t.typedArray(i.cells,ca.is))}e.is=t;function n(r,i,o){let s={start:r,deleteCount:i};return o!==void 0&&(s.cells=o),s}e.create=n})($g=ie.NotebookCellArrayChange||(ie.NotebookCellArrayChange={}));var zg;(function(e){e.method="notebookDocument/didChange",e.messageDirection=St.MessageDirection.clientToServer,e.type=new St.ProtocolNotificationType(e.method),e.registrationMethod=Sr.method})(zg=ie.DidChangeNotebookDocumentNotification||(ie.DidChangeNotebookDocumentNotification={}));var Yg;(function(e){e.method="notebookDocument/didSave",e.messageDirection=St.MessageDirection.clientToServer,e.type=new St.ProtocolNotificationType(e.method),e.registrationMethod=Sr.method})(Yg=ie.DidSaveNotebookDocumentNotification||(ie.DidSaveNotebookDocumentNotification={}));var Vg;(function(e){e.method="notebookDocument/didClose",e.messageDirection=St.MessageDirection.clientToServer,e.type=new St.ProtocolNotificationType(e.method),e.registrationMethod=Sr.method})(Vg=ie.DidCloseNotebookDocumentNotification||(ie.DidCloseNotebookDocumentNotification={}))});var Xl=q(f=>{"use strict";Object.defineProperty(f,"__esModule",{value:!0});f.WorkspaceSymbolRequest=f.CodeActionResolveRequest=f.CodeActionRequest=f.DocumentSymbolRequest=f.DocumentHighlightRequest=f.ReferencesRequest=f.DefinitionRequest=f.SignatureHelpRequest=f.SignatureHelpTriggerKind=f.HoverRequest=f.CompletionResolveRequest=f.CompletionRequest=f.CompletionTriggerKind=f.PublishDiagnosticsNotification=f.WatchKind=f.RelativePattern=f.FileChangeType=f.DidChangeWatchedFilesNotification=f.WillSaveTextDocumentWaitUntilRequest=f.WillSaveTextDocumentNotification=f.TextDocumentSaveReason=f.DidSaveTextDocumentNotification=f.DidCloseTextDocumentNotification=f.DidChangeTextDocumentNotification=f.TextDocumentContentChangeEvent=f.DidOpenTextDocumentNotification=f.TextDocumentSyncKind=f.TelemetryEventNotification=f.LogMessageNotification=f.ShowMessageRequest=f.ShowMessageNotification=f.MessageType=f.DidChangeConfigurationNotification=f.ExitNotification=f.ShutdownRequest=f.InitializedNotification=f.InitializeErrorCodes=f.InitializeRequest=f.WorkDoneProgressOptions=f.TextDocumentRegistrationOptions=f.StaticRegistrationOptions=f.PositionEncodingKind=f.FailureHandlingKind=f.ResourceOperationKind=f.UnregistrationRequest=f.RegistrationRequest=f.DocumentSelector=f.NotebookCellTextDocumentFilter=f.NotebookDocumentFilter=f.TextDocumentFilter=void 0;f.TypeHierarchySubtypesRequest=f.TypeHierarchyPrepareRequest=f.MonikerRequest=f.MonikerKind=f.UniquenessLevel=f.WillDeleteFilesRequest=f.DidDeleteFilesNotification=f.WillRenameFilesRequest=f.DidRenameFilesNotification=f.WillCreateFilesRequest=f.DidCreateFilesNotification=f.FileOperationPatternKind=f.LinkedEditingRangeRequest=f.ShowDocumentRequest=f.SemanticTokensRegistrationType=f.SemanticTokensRefreshRequest=f.SemanticTokensRangeRequest=f.SemanticTokensDeltaRequest=f.SemanticTokensRequest=f.TokenFormat=f.CallHierarchyPrepareRequest=f.CallHierarchyOutgoingCallsRequest=f.CallHierarchyIncomingCallsRequest=f.WorkDoneProgressCancelNotification=f.WorkDoneProgressCreateRequest=f.WorkDoneProgress=f.SelectionRangeRequest=f.DeclarationRequest=f.FoldingRangeRequest=f.ColorPresentationRequest=f.DocumentColorRequest=f.ConfigurationRequest=f.DidChangeWorkspaceFoldersNotification=f.WorkspaceFoldersRequest=f.TypeDefinitionRequest=f.ImplementationRequest=f.ApplyWorkspaceEditRequest=f.ExecuteCommandRequest=f.PrepareRenameRequest=f.RenameRequest=f.PrepareSupportDefaultBehavior=f.DocumentOnTypeFormattingRequest=f.DocumentRangeFormattingRequest=f.DocumentFormattingRequest=f.DocumentLinkResolveRequest=f.DocumentLinkRequest=f.CodeLensRefreshRequest=f.CodeLensResolveRequest=f.CodeLensRequest=f.WorkspaceSymbolResolveRequest=void 0;f.DidCloseNotebookDocumentNotification=f.DidSaveNotebookDocumentNotification=f.DidChangeNotebookDocumentNotification=f.NotebookCellArrayChange=f.DidOpenNotebookDocumentNotification=f.NotebookDocumentSyncRegistrationType=f.NotebookDocument=f.NotebookCell=f.ExecutionSummary=f.NotebookCellKind=f.DiagnosticRefreshRequest=f.WorkspaceDiagnosticRequest=f.DocumentDiagnosticRequest=f.DocumentDiagnosticReportKind=f.DiagnosticServerCancellationData=f.InlayHintRefreshRequest=f.InlayHintResolveRequest=f.InlayHintRequest=f.InlineValueRefreshRequest=f.InlineValueRequest=f.TypeHierarchySupertypesRequest=void 0;var M=ge(),$l=hi(),Me=mi(),Kg=pl();Object.defineProperty(f,"ImplementationRequest",{enumerable:!0,get:function(){return Kg.ImplementationRequest}});var Qg=ml();Object.defineProperty(f,"TypeDefinitionRequest",{enumerable:!0,get:function(){return Qg.TypeDefinitionRequest}});var zl=gl();Object.defineProperty(f,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return zl.WorkspaceFoldersRequest}});Object.defineProperty(f,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return zl.DidChangeWorkspaceFoldersNotification}});var Jg=vl();Object.defineProperty(f,"ConfigurationRequest",{enumerable:!0,get:function(){return Jg.ConfigurationRequest}});var Yl=bl();Object.defineProperty(f,"DocumentColorRequest",{enumerable:!0,get:function(){return Yl.DocumentColorRequest}});Object.defineProperty(f,"ColorPresentationRequest",{enumerable:!0,get:function(){return Yl.ColorPresentationRequest}});var Gg=Dl();Object.defineProperty(f,"FoldingRangeRequest",{enumerable:!0,get:function(){return Gg.FoldingRangeRequest}});var Xg=Cl();Object.defineProperty(f,"DeclarationRequest",{enumerable:!0,get:function(){return Xg.DeclarationRequest}});var Zg=Tl();Object.defineProperty(f,"SelectionRangeRequest",{enumerable:!0,get:function(){return Zg.SelectionRangeRequest}});var la=wl();Object.defineProperty(f,"WorkDoneProgress",{enumerable:!0,get:function(){return la.WorkDoneProgress}});Object.defineProperty(f,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return la.WorkDoneProgressCreateRequest}});Object.defineProperty(f,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return la.WorkDoneProgressCancelNotification}});var fa=xl();Object.defineProperty(f,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return fa.CallHierarchyIncomingCallsRequest}});Object.defineProperty(f,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return fa.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(f,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return fa.CallHierarchyPrepareRequest}});var Gn=kl();Object.defineProperty(f,"TokenFormat",{enumerable:!0,get:function(){return Gn.TokenFormat}});Object.defineProperty(f,"SemanticTokensRequest",{enumerable:!0,get:function(){return Gn.SemanticTokensRequest}});Object.defineProperty(f,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return Gn.SemanticTokensDeltaRequest}});Object.defineProperty(f,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return Gn.SemanticTokensRangeRequest}});Object.defineProperty(f,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return Gn.SemanticTokensRefreshRequest}});Object.defineProperty(f,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return Gn.SemanticTokensRegistrationType}});var ey=Al();Object.defineProperty(f,"ShowDocumentRequest",{enumerable:!0,get:function(){return ey.ShowDocumentRequest}});var ty=ql();Object.defineProperty(f,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return ty.LinkedEditingRangeRequest}});var xn=El();Object.defineProperty(f,"FileOperationPatternKind",{enumerable:!0,get:function(){return xn.FileOperationPatternKind}});Object.defineProperty(f,"DidCreateFilesNotification",{enumerable:!0,get:function(){return xn.DidCreateFilesNotification}});Object.defineProperty(f,"WillCreateFilesRequest",{enumerable:!0,get:function(){return xn.WillCreateFilesRequest}});Object.defineProperty(f,"DidRenameFilesNotification",{enumerable:!0,get:function(){return xn.DidRenameFilesNotification}});Object.defineProperty(f,"WillRenameFilesRequest",{enumerable:!0,get:function(){return xn.WillRenameFilesRequest}});Object.defineProperty(f,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return xn.DidDeleteFilesNotification}});Object.defineProperty(f,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return xn.WillDeleteFilesRequest}});var da=Ml();Object.defineProperty(f,"UniquenessLevel",{enumerable:!0,get:function(){return da.UniquenessLevel}});Object.defineProperty(f,"MonikerKind",{enumerable:!0,get:function(){return da.MonikerKind}});Object.defineProperty(f,"MonikerRequest",{enumerable:!0,get:function(){return da.MonikerRequest}});var pa=Fl();Object.defineProperty(f,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return pa.TypeHierarchyPrepareRequest}});Object.defineProperty(f,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return pa.TypeHierarchySubtypesRequest}});Object.defineProperty(f,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return pa.TypeHierarchySupertypesRequest}});var Vl=Ll();Object.defineProperty(f,"InlineValueRequest",{enumerable:!0,get:function(){return Vl.InlineValueRequest}});Object.defineProperty(f,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return Vl.InlineValueRefreshRequest}});var ha=Il();Object.defineProperty(f,"InlayHintRequest",{enumerable:!0,get:function(){return ha.InlayHintRequest}});Object.defineProperty(f,"InlayHintResolveRequest",{enumerable:!0,get:function(){return ha.InlayHintResolveRequest}});Object.defineProperty(f,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return ha.InlayHintRefreshRequest}});var Ar=Wl();Object.defineProperty(f,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return Ar.DiagnosticServerCancellationData}});Object.defineProperty(f,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return Ar.DocumentDiagnosticReportKind}});Object.defineProperty(f,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return Ar.DocumentDiagnosticRequest}});Object.defineProperty(f,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return Ar.WorkspaceDiagnosticRequest}});Object.defineProperty(f,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return Ar.DiagnosticRefreshRequest}});var At=Bl();Object.defineProperty(f,"NotebookCellKind",{enumerable:!0,get:function(){return At.NotebookCellKind}});Object.defineProperty(f,"ExecutionSummary",{enumerable:!0,get:function(){return At.ExecutionSummary}});Object.defineProperty(f,"NotebookCell",{enumerable:!0,get:function(){return At.NotebookCell}});Object.defineProperty(f,"NotebookDocument",{enumerable:!0,get:function(){return At.NotebookDocument}});Object.defineProperty(f,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return At.NotebookDocumentSyncRegistrationType}});Object.defineProperty(f,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return At.DidOpenNotebookDocumentNotification}});Object.defineProperty(f,"NotebookCellArrayChange",{enumerable:!0,get:function(){return At.NotebookCellArrayChange}});Object.defineProperty(f,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return At.DidChangeNotebookDocumentNotification}});Object.defineProperty(f,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return At.DidSaveNotebookDocumentNotification}});Object.defineProperty(f,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return At.DidCloseNotebookDocumentNotification}});var Kl;(function(e){function t(n){let r=n;return Me.string(r.language)||Me.string(r.scheme)||Me.string(r.pattern)}e.is=t})(Kl=f.TextDocumentFilter||(f.TextDocumentFilter={}));var Ql;(function(e){function t(n){let r=n;return Me.objectLiteral(r)&&(Me.string(r.notebookType)||Me.string(r.scheme)||Me.string(r.pattern))}e.is=t})(Ql=f.NotebookDocumentFilter||(f.NotebookDocumentFilter={}));var Jl;(function(e){function t(n){let r=n;return Me.objectLiteral(r)&&(Me.string(r.notebook)||Ql.is(r.notebook))&&(r.language===void 0||Me.string(r.language))}e.is=t})(Jl=f.NotebookCellTextDocumentFilter||(f.NotebookCellTextDocumentFilter={}));var Gl;(function(e){function t(n){if(!Array.isArray(n))return!1;for(let r of n)if(!Me.string(r)&&!Kl.is(r)&&!Jl.is(r))return!1;return!0}e.is=t})(Gl=f.DocumentSelector||(f.DocumentSelector={}));var ny;(function(e){e.method="client/registerCapability",e.messageDirection=M.MessageDirection.serverToClient,e.type=new M.ProtocolRequestType(e.method)})(ny=f.RegistrationRequest||(f.RegistrationRequest={}));var ry;(function(e){e.method="client/unregisterCapability",e.messageDirection=M.MessageDirection.serverToClient,e.type=new M.ProtocolRequestType(e.method)})(ry=f.UnregistrationRequest||(f.UnregistrationRequest={}));var iy;(function(e){e.Create="create",e.Rename="rename",e.Delete="delete"})(iy=f.ResourceOperationKind||(f.ResourceOperationKind={}));var oy;(function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"})(oy=f.FailureHandlingKind||(f.FailureHandlingKind={}));var sy;(function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"})(sy=f.PositionEncodingKind||(f.PositionEncodingKind={}));var ay;(function(e){function t(n){let r=n;return r&&Me.string(r.id)&&r.id.length>0}e.hasId=t})(ay=f.StaticRegistrationOptions||(f.StaticRegistrationOptions={}));var uy;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||Gl.is(r.documentSelector))}e.is=t})(uy=f.TextDocumentRegistrationOptions||(f.TextDocumentRegistrationOptions={}));var cy;(function(e){function t(r){let i=r;return Me.objectLiteral(i)&&(i.workDoneProgress===void 0||Me.boolean(i.workDoneProgress))}e.is=t;function n(r){let i=r;return i&&Me.boolean(i.workDoneProgress)}e.hasWorkDoneProgress=n})(cy=f.WorkDoneProgressOptions||(f.WorkDoneProgressOptions={}));var ly;(function(e){e.method="initialize",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(ly=f.InitializeRequest||(f.InitializeRequest={}));var fy;(function(e){e.unknownProtocolVersion=1})(fy=f.InitializeErrorCodes||(f.InitializeErrorCodes={}));var dy;(function(e){e.method="initialized",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolNotificationType(e.method)})(dy=f.InitializedNotification||(f.InitializedNotification={}));var py;(function(e){e.method="shutdown",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType0(e.method)})(py=f.ShutdownRequest||(f.ShutdownRequest={}));var hy;(function(e){e.method="exit",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolNotificationType0(e.method)})(hy=f.ExitNotification||(f.ExitNotification={}));var my;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolNotificationType(e.method)})(my=f.DidChangeConfigurationNotification||(f.DidChangeConfigurationNotification={}));var gy;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4})(gy=f.MessageType||(f.MessageType={}));var yy;(function(e){e.method="window/showMessage",e.messageDirection=M.MessageDirection.serverToClient,e.type=new M.ProtocolNotificationType(e.method)})(yy=f.ShowMessageNotification||(f.ShowMessageNotification={}));var vy;(function(e){e.method="window/showMessageRequest",e.messageDirection=M.MessageDirection.serverToClient,e.type=new M.ProtocolRequestType(e.method)})(vy=f.ShowMessageRequest||(f.ShowMessageRequest={}));var by;(function(e){e.method="window/logMessage",e.messageDirection=M.MessageDirection.serverToClient,e.type=new M.ProtocolNotificationType(e.method)})(by=f.LogMessageNotification||(f.LogMessageNotification={}));var _y;(function(e){e.method="telemetry/event",e.messageDirection=M.MessageDirection.serverToClient,e.type=new M.ProtocolNotificationType(e.method)})(_y=f.TelemetryEventNotification||(f.TelemetryEventNotification={}));var Dy;(function(e){e.None=0,e.Full=1,e.Incremental=2})(Dy=f.TextDocumentSyncKind||(f.TextDocumentSyncKind={}));var Ry;(function(e){e.method="textDocument/didOpen",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolNotificationType(e.method)})(Ry=f.DidOpenTextDocumentNotification||(f.DidOpenTextDocumentNotification={}));var Cy;(function(e){function t(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}e.isIncremental=t;function n(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}e.isFull=n})(Cy=f.TextDocumentContentChangeEvent||(f.TextDocumentContentChangeEvent={}));var Py;(function(e){e.method="textDocument/didChange",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolNotificationType(e.method)})(Py=f.DidChangeTextDocumentNotification||(f.DidChangeTextDocumentNotification={}));var Ty;(function(e){e.method="textDocument/didClose",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolNotificationType(e.method)})(Ty=f.DidCloseTextDocumentNotification||(f.DidCloseTextDocumentNotification={}));var wy;(function(e){e.method="textDocument/didSave",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolNotificationType(e.method)})(wy=f.DidSaveTextDocumentNotification||(f.DidSaveTextDocumentNotification={}));var xy;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(xy=f.TextDocumentSaveReason||(f.TextDocumentSaveReason={}));var ky;(function(e){e.method="textDocument/willSave",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolNotificationType(e.method)})(ky=f.WillSaveTextDocumentNotification||(f.WillSaveTextDocumentNotification={}));var Sy;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(Sy=f.WillSaveTextDocumentWaitUntilRequest||(f.WillSaveTextDocumentWaitUntilRequest={}));var Ay;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolNotificationType(e.method)})(Ay=f.DidChangeWatchedFilesNotification||(f.DidChangeWatchedFilesNotification={}));var Ny;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(Ny=f.FileChangeType||(f.FileChangeType={}));var qy;(function(e){function t(n){let r=n;return Me.objectLiteral(r)&&($l.URI.is(r.baseUri)||$l.WorkspaceFolder.is(r.baseUri))&&Me.string(r.pattern)}e.is=t})(qy=f.RelativePattern||(f.RelativePattern={}));var Ey;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Ey=f.WatchKind||(f.WatchKind={}));var Oy;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=M.MessageDirection.serverToClient,e.type=new M.ProtocolNotificationType(e.method)})(Oy=f.PublishDiagnosticsNotification||(f.PublishDiagnosticsNotification={}));var My;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(My=f.CompletionTriggerKind||(f.CompletionTriggerKind={}));var Fy;(function(e){e.method="textDocument/completion",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(Fy=f.CompletionRequest||(f.CompletionRequest={}));var Ly;(function(e){e.method="completionItem/resolve",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(Ly=f.CompletionResolveRequest||(f.CompletionResolveRequest={}));var Iy;(function(e){e.method="textDocument/hover",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(Iy=f.HoverRequest||(f.HoverRequest={}));var jy;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(jy=f.SignatureHelpTriggerKind||(f.SignatureHelpTriggerKind={}));var Wy;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(Wy=f.SignatureHelpRequest||(f.SignatureHelpRequest={}));var Hy;(function(e){e.method="textDocument/definition",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(Hy=f.DefinitionRequest||(f.DefinitionRequest={}));var Uy;(function(e){e.method="textDocument/references",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(Uy=f.ReferencesRequest||(f.ReferencesRequest={}));var By;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(By=f.DocumentHighlightRequest||(f.DocumentHighlightRequest={}));var $y;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})($y=f.DocumentSymbolRequest||(f.DocumentSymbolRequest={}));var zy;(function(e){e.method="textDocument/codeAction",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(zy=f.CodeActionRequest||(f.CodeActionRequest={}));var Yy;(function(e){e.method="codeAction/resolve",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(Yy=f.CodeActionResolveRequest||(f.CodeActionResolveRequest={}));var Vy;(function(e){e.method="workspace/symbol",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(Vy=f.WorkspaceSymbolRequest||(f.WorkspaceSymbolRequest={}));var Ky;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(Ky=f.WorkspaceSymbolResolveRequest||(f.WorkspaceSymbolResolveRequest={}));var Qy;(function(e){e.method="textDocument/codeLens",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(Qy=f.CodeLensRequest||(f.CodeLensRequest={}));var Jy;(function(e){e.method="codeLens/resolve",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(Jy=f.CodeLensResolveRequest||(f.CodeLensResolveRequest={}));var Gy;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=M.MessageDirection.serverToClient,e.type=new M.ProtocolRequestType0(e.method)})(Gy=f.CodeLensRefreshRequest||(f.CodeLensRefreshRequest={}));var Xy;(function(e){e.method="textDocument/documentLink",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(Xy=f.DocumentLinkRequest||(f.DocumentLinkRequest={}));var Zy;(function(e){e.method="documentLink/resolve",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(Zy=f.DocumentLinkResolveRequest||(f.DocumentLinkResolveRequest={}));var ev;(function(e){e.method="textDocument/formatting",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(ev=f.DocumentFormattingRequest||(f.DocumentFormattingRequest={}));var tv;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(tv=f.DocumentRangeFormattingRequest||(f.DocumentRangeFormattingRequest={}));var nv;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(nv=f.DocumentOnTypeFormattingRequest||(f.DocumentOnTypeFormattingRequest={}));var rv;(function(e){e.Identifier=1})(rv=f.PrepareSupportDefaultBehavior||(f.PrepareSupportDefaultBehavior={}));var iv;(function(e){e.method="textDocument/rename",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(iv=f.RenameRequest||(f.RenameRequest={}));var ov;(function(e){e.method="textDocument/prepareRename",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(ov=f.PrepareRenameRequest||(f.PrepareRenameRequest={}));var sv;(function(e){e.method="workspace/executeCommand",e.messageDirection=M.MessageDirection.clientToServer,e.type=new M.ProtocolRequestType(e.method)})(sv=f.ExecuteCommandRequest||(f.ExecuteCommandRequest={}));var av;(function(e){e.method="workspace/applyEdit",e.messageDirection=M.MessageDirection.serverToClient,e.type=new M.ProtocolRequestType("workspace/applyEdit")})(av=f.ApplyWorkspaceEditRequest||(f.ApplyWorkspaceEditRequest={}))});var ef=q(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.createProtocolConnection=void 0;var Zl=wn();function uv(e,t,n,r){return Zl.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Zl.createMessageConnection)(e,t,n,r)}Di.createProtocolConnection=uv});var tf=q(ze=>{"use strict";var cv=ze&&ze.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Ri=ze&&ze.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&cv(t,e,n)};Object.defineProperty(ze,"__esModule",{value:!0});ze.LSPErrorCodes=ze.createProtocolConnection=void 0;Ri(wn(),ze);Ri(hi(),ze);Ri(ge(),ze);Ri(Xl(),ze);var lv=ef();Object.defineProperty(ze,"createProtocolConnection",{enumerable:!0,get:function(){return lv.createProtocolConnection}});var fv;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(fv=ze.LSPErrorCodes||(ze.LSPErrorCodes={}))});var ke=q(Nt=>{"use strict";var dv=Nt&&Nt.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),nf=Nt&&Nt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&dv(t,e,n)};Object.defineProperty(Nt,"__esModule",{value:!0});Nt.createProtocolConnection=void 0;var pv=ra();nf(ra(),Nt);nf(tf(),Nt);function hv(e,t,n,r){return(0,pv.createMessageConnection)(e,t,n,r)}Nt.createProtocolConnection=hv});var ga=q(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.SemanticTokensBuilder=on.SemanticTokensDiff=on.SemanticTokensFeature=void 0;var Ci=ke(),mv=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Ci.SemanticTokensRefreshRequest.type),on:t=>{let n=Ci.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Ci.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Ci.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};on.SemanticTokensFeature=mv;var Pi=class{constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r<n&&r<t&&this.originalSequence[r]===this.modifiedSequence[r];)r++;if(r<n&&r<t){let i=t-1,o=n-1;for(;i>=r&&o>=r&&this.originalSequence[i]===this.modifiedSequence[o];)i--,o--;(i<r||o<r)&&(i++,o++);let s=i-r+1,a=this.modifiedSequence.slice(r,o+1);return a.length===1&&a[0]===this.originalSequence[i]?[{start:r,deleteCount:s-1}]:[{start:r,deleteCount:s,data:a}]}else return r<n?[{start:r,deleteCount:0,data:this.modifiedSequence.slice(r)}]:r<t?[{start:r,deleteCount:t-r}]:[]}};on.SemanticTokensDiff=Pi;var ma=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(t,n,r,i,o){let s=t,a=n;this._dataLen>0&&(s-=this._prevLine,s===0&&(a-=this._prevChar)),this._data[this._dataLen++]=s,this._data[this._dataLen++]=a,this._data[this._dataLen++]=r,this._data[this._dataLen++]=i,this._data[this._dataLen++]=o,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}previousResult(t){this.id===t&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new Pi(this._prevData,this._data).computeDiff()}:this.build()}};on.SemanticTokensBuilder=ma});var va=q(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.TextDocuments=void 0;var kn=ke(),ya=class{constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new kn.Emitter,this._onDidOpen=new kn.Emitter,this._onDidClose=new kn.Emitter,this._onDidSave=new kn.Emitter,this._onWillSave=new kn.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=kn.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let i=r.textDocument,o=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,o);let s=Object.freeze({document:o});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let i=r.textDocument,o=r.contentChanges;if(o.length===0)return;let{version:s}=i;if(s==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let a=this._syncedDocuments.get(i.uri);a!==void 0&&(a=this._configuration.update(a,o,s),this._syncedDocuments.set(i.uri,a),this._onDidChangeContent.fire(Object.freeze({document:a})))})),n.push(t.onDidCloseTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),n.push(t.onWillSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,i)=>{let o=this._syncedDocuments.get(r.textDocument.uri);return o!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:o,reason:r.reason}),i):[]})),n.push(t.onDidSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),kn.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};Ti.TextDocuments=ya});var _a=q(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.NotebookDocuments=Xn.NotebookSyncFeature=void 0;var st=ke(),rf=va(),gv=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(st.DidOpenNotebookDocumentNotification.type,n=>{t(n)}),onDidChangeNotebookDocument:t=>this.connection.onNotification(st.DidChangeNotebookDocumentNotification.type,n=>{t(n)}),onDidSaveNotebookDocument:t=>this.connection.onNotification(st.DidSaveNotebookDocumentNotification.type,n=>{t(n)}),onDidCloseNotebookDocument:t=>this.connection.onNotification(st.DidCloseNotebookDocumentNotification.type,n=>{t(n)})}}};Xn.NotebookSyncFeature=gv;var sn=class{onDidOpenTextDocument(t){return this.openHandler=t,st.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,st.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,st.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return sn.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return sn.NULL_DISPOSE}onDidSaveTextDocument(){return sn.NULL_DISPOSE}};sn.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var ba=class{constructor(t){t instanceof rf.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new rf.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new st.Emitter,this._onDidChange=new st.Emitter,this._onDidSave=new st.Emitter,this._onDidClose=new st.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new sn,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let o of i.cellTextDocuments)n.openTextDocument({textDocument:o});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o===void 0)return;o.version=i.notebookDocument.version;let s=o.metadata,a=!1,l=i.change;l.metadata!==void 0&&(a=!0,o.metadata=l.metadata);let p=[],m=[],v=[],C=[];if(l.cells!==void 0){let z=l.cells;if(z.structure!==void 0){let R=z.structure.array;if(o.cells.splice(R.start,R.deleteCount,...R.cells!==void 0?R.cells:[]),z.structure.didOpen!==void 0)for(let b of z.structure.didOpen)n.openTextDocument({textDocument:b}),p.push(b.uri);if(z.structure.didClose)for(let b of z.structure.didClose)n.closeTextDocument({textDocument:b}),m.push(b.uri)}if(z.data!==void 0){let R=new Map(z.data.map(b=>[b.document,b]));for(let b=0;b<=o.cells.length;b++){let E=R.get(o.cells[b].document);if(E!==void 0){let $=o.cells.splice(b,1,E);if(v.push({old:$[0],new:E}),R.delete(E.document),R.size===0)break}}}if(z.textContent!==void 0)for(let R of z.textContent)n.changeTextDocument({textDocument:R.document,contentChanges:R.changes}),C.push(R.document.uri)}this.updateCellMap(o);let P={notebookDocument:o};a&&(P.metadata={old:s,new:o.metadata});let x=[];for(let z of p)x.push(this.getNotebookCell(z));let A=[];for(let z of m)A.push(this.getNotebookCell(z));let W=[];for(let z of C)W.push(this.getNotebookCell(z));(x.length>0||A.length>0||v.length>0||W.length>0)&&(P.cells={added:x,removed:A,changed:{data:v,textContent:W}}),(P.metadata!==void 0||P.cells!==void 0)&&this._onDidChange.fire(P)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);o!==void 0&&this._onDidSave.fire(o)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o!==void 0){this._onDidClose.fire(o);for(let s of i.cellTextDocuments)n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(i.notebookDocument.uri);for(let s of o.cells)this.notebookCellMap.delete(s.document)}})),st.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};Xn.NotebookDocuments=ba});var Da=q(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.thenable=we.typedArray=we.stringArray=we.array=we.func=we.error=we.number=we.string=we.boolean=void 0;function yv(e){return e===!0||e===!1}we.boolean=yv;function of(e){return typeof e=="string"||e instanceof String}we.string=of;function vv(e){return typeof e=="number"||e instanceof Number}we.number=vv;function bv(e){return e instanceof Error}we.error=bv;function sf(e){return typeof e=="function"}we.func=sf;function af(e){return Array.isArray(e)}we.array=af;function _v(e){return af(e)&&e.every(t=>of(t))}we.stringArray=_v;function Dv(e,t){return Array.isArray(e)&&e.every(t)}we.typedArray=Dv;function Rv(e){return e&&sf(e.then)}we.thenable=Rv});var Ra=q(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.generateUuid=at.parse=at.isUUID=at.v4=at.empty=void 0;var Nr=class{constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},X=class extends Nr{constructor(){super([X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex(),"-",X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex(),"-","4",X._randomHex(),X._randomHex(),X._randomHex(),"-",X._oneOf(X._timeHighBits),X._randomHex(),X._randomHex(),X._randomHex(),"-",X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex(),X._randomHex()].join(""))}static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return X._oneOf(X._chars)}};X._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];X._timeHighBits=["8","9","a","b"];at.empty=new Nr("00000000-0000-0000-0000-000000000000");function uf(){return new X}at.v4=uf;var Cv=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function cf(e){return Cv.test(e)}at.isUUID=cf;function Pv(e){if(!cf(e))throw new Error("invalid uuid");return new Nr(e)}at.parse=Pv;function Tv(){return uf().asHex()}at.generateUuid=Tv});var lf=q(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.attachPartialResult=un.ProgressFeature=un.attachWorkDone=void 0;var an=ke(),wv=Ra(),qt=class{constructor(t,n){this._connection=t,this._token=n,qt.Instances.set(this._token,this)}begin(t,n,r,i){let o={kind:"begin",title:t,percentage:n,message:r,cancellable:i};this._connection.sendProgress(an.WorkDoneProgress.type,this._token,o)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=t,n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(an.WorkDoneProgress.type,this._token,r)}done(){qt.Instances.delete(this._token),this._connection.sendProgress(an.WorkDoneProgress.type,this._token,{kind:"end"})}};qt.Instances=new Map;var wi=class extends qt{constructor(t,n){super(t,n),this._source=new an.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},qr=class{constructor(){}begin(){}report(){}done(){}},xi=class extends qr{constructor(){super(),this._source=new an.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function xv(e,t){if(t===void 0||t.workDoneToken===void 0)return new qr;let n=t.workDoneToken;return delete t.workDoneToken,new qt(e,n)}un.attachWorkDone=xv;var kv=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(an.WorkDoneProgressCancelNotification.type,n=>{let r=qt.Instances.get(n.token);(r instanceof wi||r instanceof xi)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new qr:new qt(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,wv.generateUuid)();return this.connection.sendRequest(an.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new wi(this.connection,t))}else return Promise.resolve(new xi)}};un.ProgressFeature=kv;var Ca;(function(e){e.type=new an.ProgressType})(Ca||(Ca={}));var Pa=class{constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(Ca.type,this._token,t)}};function Sv(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new Pa(e,n)}un.attachPartialResult=Sv});var ff=q(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.ConfigurationFeature=void 0;var Av=ke(),Nv=Da(),qv=e=>class extends e{getConfiguration(t){return t?Nv.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(Av.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};ki.ConfigurationFeature=qv});var df=q(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.WorkspaceFoldersFeature=void 0;var Si=ke(),Ev=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Si.Emitter,this.connection.onNotification(Si.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Si.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Si.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Ai.WorkspaceFoldersFeature=Ev});var pf=q(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.CallHierarchyFeature=void 0;var Ta=ke(),Ov=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(Ta.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=Ta.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=Ta.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Ni.CallHierarchyFeature=Ov});var hf=q(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.ShowDocumentFeature=void 0;var Mv=ke(),Fv=e=>class extends e{showDocument(t){return this.connection.sendRequest(Mv.ShowDocumentRequest.type,t)}};qi.ShowDocumentFeature=Fv});var mf=q(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.FileOperationsFeature=void 0;var Zn=ke(),Lv=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(Zn.DidCreateFilesNotification.type,n=>{t(n)})}onDidRenameFiles(t){return this.connection.onNotification(Zn.DidRenameFilesNotification.type,n=>{t(n)})}onDidDeleteFiles(t){return this.connection.onNotification(Zn.DidDeleteFilesNotification.type,n=>{t(n)})}onWillCreateFiles(t){return this.connection.onRequest(Zn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(Zn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(Zn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Ei.FileOperationsFeature=Lv});var gf=q(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.LinkedEditingRangeFeature=void 0;var Iv=ke(),jv=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(Iv.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Oi.LinkedEditingRangeFeature=jv});var yf=q(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.TypeHierarchyFeature=void 0;var wa=ke(),Wv=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(wa.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=wa.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=wa.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Mi.TypeHierarchyFeature=Wv});var bf=q(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.InlineValueFeature=void 0;var vf=ke(),Hv=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(vf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(vf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Fi.InlineValueFeature=Hv});var _f=q(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.InlayHintFeature=void 0;var xa=ke(),Uv=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(xa.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(xa.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(xa.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Li.InlayHintFeature=Uv});var Df=q(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.DiagnosticFeature=void 0;var Er=ke(),Bv=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Er.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Er.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Er.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Er.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Er.WorkspaceDiagnosticRequest.partialResult,n)))}}};Ii.DiagnosticFeature=Bv});var Rf=q(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.MonikerFeature=void 0;var $v=ke(),zv=e=>class extends e{get moniker(){return{on:t=>{let n=$v.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};ji.MonikerFeature=zv});var Mf=q(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.createConnection=ne.combineFeatures=ne.combineNotebooksFeatures=ne.combineLanguagesFeatures=ne.combineWorkspaceFeatures=ne.combineWindowFeatures=ne.combineClientFeatures=ne.combineTracerFeatures=ne.combineTelemetryFeatures=ne.combineConsoleFeatures=ne._NotebooksImpl=ne._LanguagesImpl=ne.BulkUnregistration=ne.BulkRegistration=ne.ErrorMessageTracker=void 0;var I=ke(),ut=Da(),Sa=Ra(),K=lf(),Yv=ff(),Vv=df(),Kv=pf(),Qv=ga(),Jv=hf(),Gv=mf(),Xv=gf(),Zv=yf(),eb=bf(),tb=_f(),nb=Df(),rb=_a(),ib=Rf();function ka(e){if(e!==null)return e}var Aa=class{constructor(){this._messages=Object.create(null)}add(t){let n=this._messages[t];n||(n=0),n++,this._messages[t]=n}sendErrors(t){Object.keys(this._messages).forEach(n=>{t.window.showErrorMessage(n)})}};ne.ErrorMessageTracker=Aa;var Wi=class{constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(I.MessageType.Error,t)}warn(t){this.send(I.MessageType.Warning,t)}info(t){this.send(I.MessageType.Info,t)}log(t){this.send(I.MessageType.Log,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(I.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,I.RAL)().console.error("Sending log message failed")})}},Na=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:I.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(I.ShowMessageRequest.type,r).then(ka)}showWarningMessage(t,...n){let r={type:I.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(I.ShowMessageRequest.type,r).then(ka)}showInformationMessage(t,...n){let r={type:I.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(I.ShowMessageRequest.type,r).then(ka)}},Cf=(0,Jv.ShowDocumentFeature)((0,K.ProgressFeature)(Na)),ob;(function(e){function t(){return new Hi}e.create=t})(ob=ne.BulkRegistration||(ne.BulkRegistration={}));var Hi=class{constructor(){this._registrations=[],this._registered=new Set}add(t,n){let r=ut.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let i=Sa.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},sb;(function(e){function t(){return new Or(void 0,[])}e.create=t})(sb=ne.BulkUnregistration||(ne.BulkUnregistration={}));var Or=class{constructor(t,n){this._connection=t,this._unregistrations=new Map,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(I.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=ut.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let i={unregisterations:[r]};return this._connection.sendRequest(I.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(n)},o=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},Ui=class{attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof Hi?this.registerMany(t):t instanceof Or?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let i=ut.string(n)?n:n.method,o=Sa.generateUuid(),s={registrations:[{id:o,method:i,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(I.RegistrationRequest.type,s).then(a=>(t.add({id:o,method:i}),t),a=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(a)))}registerSingle2(t,n){let r=ut.string(t)?t:t.method,i=Sa.generateUuid(),o={registrations:[{id:i,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(I.RegistrationRequest.type,o).then(s=>I.Disposable.create(()=>{this.unregisterSingle(i,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(I.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(I.RegistrationRequest.type,n).then(()=>new Or(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},qa=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(i){return i&&!!i.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(I.ApplyWorkspaceEditRequest.type,r)}},Pf=(0,Gv.FileOperationsFeature)((0,Vv.WorkspaceFoldersFeature)((0,Yv.ConfigurationFeature)(qa))),Bi=class{constructor(){this._trace=I.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==I.Trace.Off&&this.connection.sendNotification(I.LogTraceNotification.type,{message:t,verbose:this._trace===I.Trace.Verbose?n:void 0}).catch(()=>{})}},$i=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(I.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},zi=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,K.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,K.attachPartialResult)(this.connection,n)}};ne._LanguagesImpl=zi;var Tf=(0,ib.MonikerFeature)((0,nb.DiagnosticFeature)((0,tb.InlayHintFeature)((0,eb.InlineValueFeature)((0,Zv.TypeHierarchyFeature)((0,Xv.LinkedEditingRangeFeature)((0,Qv.SemanticTokensFeature)((0,Kv.CallHierarchyFeature)(zi)))))))),Yi=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,K.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,K.attachPartialResult)(this.connection,n)}};ne._NotebooksImpl=Yi;var wf=(0,rb.NotebookSyncFeature)(Yi);function xf(e,t){return function(n){return t(e(n))}}ne.combineConsoleFeatures=xf;function kf(e,t){return function(n){return t(e(n))}}ne.combineTelemetryFeatures=kf;function Sf(e,t){return function(n){return t(e(n))}}ne.combineTracerFeatures=Sf;function Af(e,t){return function(n){return t(e(n))}}ne.combineClientFeatures=Af;function Nf(e,t){return function(n){return t(e(n))}}ne.combineWindowFeatures=Nf;function qf(e,t){return function(n){return t(e(n))}}ne.combineWorkspaceFeatures=qf;function Ef(e,t){return function(n){return t(e(n))}}ne.combineLanguagesFeatures=Ef;function Of(e,t){return function(n){return t(e(n))}}ne.combineNotebooksFeatures=Of;function ab(e,t){function n(i,o,s){return i&&o?s(i,o):i||o}return{__brand:"features",console:n(e.console,t.console,xf),tracer:n(e.tracer,t.tracer,Sf),telemetry:n(e.telemetry,t.telemetry,kf),client:n(e.client,t.client,Af),window:n(e.window,t.window,Nf),workspace:n(e.workspace,t.workspace,qf),languages:n(e.languages,t.languages,Ef),notebooks:n(e.notebooks,t.notebooks,Of)}}ne.combineFeatures=ab;function ub(e,t,n){let r=n&&n.console?new(n.console(Wi)):new Wi,i=e(r);r.rawAttach(i);let o=n&&n.tracer?new(n.tracer(Bi)):new Bi,s=n&&n.telemetry?new(n.telemetry($i)):new $i,a=n&&n.client?new(n.client(Ui)):new Ui,l=n&&n.window?new(n.window(Cf)):new Cf,p=n&&n.workspace?new(n.workspace(Pf)):new Pf,m=n&&n.languages?new(n.languages(Tf)):new Tf,v=n&&n.notebooks?new(n.notebooks(wf)):new wf,C=[r,o,s,a,l,p,m,v];function P(R){return R instanceof Promise?R:ut.thenable(R)?new Promise((b,E)=>{R.then($=>b($),$=>E($))}):Promise.resolve(R)}let x,A,W,z={listen:()=>i.listen(),sendRequest:(R,...b)=>i.sendRequest(ut.string(R)?R:R.method,...b),onRequest:(R,b)=>i.onRequest(R,b),sendNotification:(R,b)=>{let E=ut.string(R)?R:R.method;return arguments.length===1?i.sendNotification(E):i.sendNotification(E,b)},onNotification:(R,b)=>i.onNotification(R,b),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:R=>(A=R,{dispose:()=>{A=void 0}}),onInitialized:R=>i.onNotification(I.InitializedNotification.type,R),onShutdown:R=>(x=R,{dispose:()=>{x=void 0}}),onExit:R=>(W=R,{dispose:()=>{W=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return o},get client(){return a},get window(){return l},get workspace(){return p},get languages(){return m},get notebooks(){return v},onDidChangeConfiguration:R=>i.onNotification(I.DidChangeConfigurationNotification.type,R),onDidChangeWatchedFiles:R=>i.onNotification(I.DidChangeWatchedFilesNotification.type,R),__textDocumentSync:void 0,onDidOpenTextDocument:R=>i.onNotification(I.DidOpenTextDocumentNotification.type,R),onDidChangeTextDocument:R=>i.onNotification(I.DidChangeTextDocumentNotification.type,R),onDidCloseTextDocument:R=>i.onNotification(I.DidCloseTextDocumentNotification.type,R),onWillSaveTextDocument:R=>i.onNotification(I.WillSaveTextDocumentNotification.type,R),onWillSaveTextDocumentWaitUntil:R=>i.onRequest(I.WillSaveTextDocumentWaitUntilRequest.type,R),onDidSaveTextDocument:R=>i.onNotification(I.DidSaveTextDocumentNotification.type,R),sendDiagnostics:R=>i.sendNotification(I.PublishDiagnosticsNotification.type,R),onHover:R=>i.onRequest(I.HoverRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),void 0)),onCompletion:R=>i.onRequest(I.CompletionRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onCompletionResolve:R=>i.onRequest(I.CompletionResolveRequest.type,R),onSignatureHelp:R=>i.onRequest(I.SignatureHelpRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),void 0)),onDeclaration:R=>i.onRequest(I.DeclarationRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onDefinition:R=>i.onRequest(I.DefinitionRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onTypeDefinition:R=>i.onRequest(I.TypeDefinitionRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onImplementation:R=>i.onRequest(I.ImplementationRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onReferences:R=>i.onRequest(I.ReferencesRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onDocumentHighlight:R=>i.onRequest(I.DocumentHighlightRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onDocumentSymbol:R=>i.onRequest(I.DocumentSymbolRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onWorkspaceSymbol:R=>i.onRequest(I.WorkspaceSymbolRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onWorkspaceSymbolResolve:R=>i.onRequest(I.WorkspaceSymbolResolveRequest.type,R),onCodeAction:R=>i.onRequest(I.CodeActionRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onCodeActionResolve:R=>i.onRequest(I.CodeActionResolveRequest.type,(b,E)=>R(b,E)),onCodeLens:R=>i.onRequest(I.CodeLensRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onCodeLensResolve:R=>i.onRequest(I.CodeLensResolveRequest.type,(b,E)=>R(b,E)),onDocumentFormatting:R=>i.onRequest(I.DocumentFormattingRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),void 0)),onDocumentRangeFormatting:R=>i.onRequest(I.DocumentRangeFormattingRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),void 0)),onDocumentOnTypeFormatting:R=>i.onRequest(I.DocumentOnTypeFormattingRequest.type,(b,E)=>R(b,E)),onRenameRequest:R=>i.onRequest(I.RenameRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),void 0)),onPrepareRename:R=>i.onRequest(I.PrepareRenameRequest.type,(b,E)=>R(b,E)),onDocumentLinks:R=>i.onRequest(I.DocumentLinkRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onDocumentLinkResolve:R=>i.onRequest(I.DocumentLinkResolveRequest.type,(b,E)=>R(b,E)),onDocumentColor:R=>i.onRequest(I.DocumentColorRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onColorPresentation:R=>i.onRequest(I.ColorPresentationRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onFoldingRanges:R=>i.onRequest(I.FoldingRangeRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onSelectionRanges:R=>i.onRequest(I.SelectionRangeRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),(0,K.attachPartialResult)(i,b))),onExecuteCommand:R=>i.onRequest(I.ExecuteCommandRequest.type,(b,E)=>R(b,E,(0,K.attachWorkDone)(i,b),void 0)),dispose:()=>i.dispose()};for(let R of C)R.attach(z);return i.onRequest(I.InitializeRequest.type,R=>{t.initialize(R),ut.string(R.trace)&&(o.trace=I.Trace.fromString(R.trace));for(let b of C)b.initialize(R.capabilities);if(A){let b=A(R,new I.CancellationTokenSource().token,(0,K.attachWorkDone)(i,R),void 0);return P(b).then(E=>{if(E instanceof I.ResponseError)return E;let $=E;$||($={capabilities:{}});let te=$.capabilities;te||(te={},$.capabilities=te),te.textDocumentSync===void 0||te.textDocumentSync===null?te.textDocumentSync=ut.number(z.__textDocumentSync)?z.__textDocumentSync:I.TextDocumentSyncKind.None:!ut.number(te.textDocumentSync)&&!ut.number(te.textDocumentSync.change)&&(te.textDocumentSync.change=ut.number(z.__textDocumentSync)?z.__textDocumentSync:I.TextDocumentSyncKind.None);for(let ue of C)ue.fillServerCapabilities(te);return $})}else{let b={capabilities:{textDocumentSync:I.TextDocumentSyncKind.None}};for(let E of C)E.fillServerCapabilities(b.capabilities);return b}}),i.onRequest(I.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,x)return x(new I.CancellationTokenSource().token)}),i.onNotification(I.ExitNotification.type,()=>{try{W&&W()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),i.onNotification(I.SetTraceNotification.type,R=>{o.trace=I.Trace.fromString(R.value)}),z}ne.createConnection=ub});var Ea=q(Fe=>{"use strict";var cb=Fe&&Fe.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Ff=Fe&&Fe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&cb(t,e,n)};Object.defineProperty(Fe,"__esModule",{value:!0});Fe.ProposedFeatures=Fe.NotebookDocuments=Fe.TextDocuments=Fe.SemanticTokensBuilder=void 0;var lb=ga();Object.defineProperty(Fe,"SemanticTokensBuilder",{enumerable:!0,get:function(){return lb.SemanticTokensBuilder}});Ff(ke(),Fe);var fb=va();Object.defineProperty(Fe,"TextDocuments",{enumerable:!0,get:function(){return fb.TextDocuments}});var db=_a();Object.defineProperty(Fe,"NotebookDocuments",{enumerable:!0,get:function(){return db.NotebookDocuments}});Ff(Mf(),Fe);var pb;(function(e){e.all={__brand:"features"}})(pb=Fe.ProposedFeatures||(Fe.ProposedFeatures={}))});var If=q((WD,Lf)=>{"use strict";Lf.exports=ke()});var Hf=q(Et=>{"use strict";var hb=Et&&Et.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Wf=Et&&Et.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&hb(t,e,n)};Object.defineProperty(Et,"__esModule",{value:!0});Et.createConnection=void 0;var Vi=Ea();Wf(If(),Et);Wf(Ea(),Et);var jf=!1,mb={initialize:e=>{},get shutdownReceived(){return jf},set shutdownReceived(e){jf=e},exit:e=>{}};function gb(e,t,n,r){let i,o,s,a;e!==void 0&&e.__brand==="features"&&(i=e,e=t,t=n,n=r),Vi.ConnectionStrategy.is(e)||Vi.ConnectionOptions.is(e)?a=e:(o=e,s=t,a=n);let l=p=>(0,Vi.createProtocolConnection)(o,s,p,a);return(0,Vi.createConnection)(l,mb,i)}Et.createConnection=gb});var cn=q((UD,Uf)=>{"use strict";Uf.exports=Hf()});var Ba=q((MR,nd)=>{"use strict";function Ot(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function td(e,t){for(var n="",r=0,i=-1,o=0,s,a=0;a<=e.length;++a){if(a<e.length)s=e.charCodeAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){l===-1?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=a,o=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o!==-1?++o:o=-1}return n}function Qb(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}var nr={resolve:function(){for(var t="",n=!1,r,i=arguments.length-1;i>=-1&&!n;i--){var o;i>=0?o=arguments[i]:(r===void 0&&(r=process.cwd()),o=r),Ot(o),o.length!==0&&(t=o+"/"+t,n=o.charCodeAt(0)===47)}return t=td(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(Ot(t),t.length===0)return".";var n=t.charCodeAt(0)===47,r=t.charCodeAt(t.length-1)===47;return t=td(t,!n),t.length===0&&!n&&(t="."),t.length>0&&r&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return Ot(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,n=0;n<arguments.length;++n){var r=arguments[n];Ot(r),r.length>0&&(t===void 0?t=r:t+="/"+r)}return t===void 0?".":nr.normalize(t)},relative:function(t,n){if(Ot(t),Ot(n),t===n||(t=nr.resolve(t),n=nr.resolve(n),t===n))return"";for(var r=1;r<t.length&&t.charCodeAt(r)===47;++r);for(var i=t.length,o=i-r,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var a=n.length,l=a-s,p=o<l?o:l,m=-1,v=0;v<=p;++v){if(v===p){if(l>p){if(n.charCodeAt(s+v)===47)return n.slice(s+v+1);if(v===0)return n.slice(s+v)}else o>p&&(t.charCodeAt(r+v)===47?m=v:v===0&&(m=0));break}var C=t.charCodeAt(r+v),P=n.charCodeAt(s+v);if(C!==P)break;C===47&&(m=v)}var x="";for(v=r+m+1;v<=i;++v)(v===i||t.charCodeAt(v)===47)&&(x.length===0?x+="..":x+="/..");return x.length>0?x+n.slice(s+m):(s+=m,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(Ot(t),t.length===0)return".";for(var n=t.charCodeAt(0),r=n===47,i=-1,o=!0,s=t.length-1;s>=1;--s)if(n=t.charCodeAt(s),n===47){if(!o){i=s;break}}else o=!1;return i===-1?r?"/":".":r&&i===1?"//":t.slice(0,i)},basename:function(t,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ot(t);var r=0,i=-1,o=!0,s;if(n!==void 0&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var a=n.length-1,l=-1;for(s=t.length-1;s>=0;--s){var p=t.charCodeAt(s);if(p===47){if(!o){r=s+1;break}}else l===-1&&(o=!1,l=s+1),a>=0&&(p===n.charCodeAt(a)?--a===-1&&(i=s):(a=-1,i=l))}return r===i?i=l:i===-1&&(i=t.length),t.slice(r,i)}else{for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===47){if(!o){r=s+1;break}}else i===-1&&(o=!1,i=s+1);return i===-1?"":t.slice(r,i)}},extname:function(t){Ot(t);for(var n=-1,r=0,i=-1,o=!0,s=0,a=t.length-1;a>=0;--a){var l=t.charCodeAt(a);if(l===47){if(!o){r=a+1;break}continue}i===-1&&(o=!1,i=a+1),l===46?n===-1?n=a:s!==1&&(s=1):n!==-1&&(s=-1)}return n===-1||i===-1||s===0||s===1&&n===i-1&&n===r+1?"":t.slice(n,i)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return Qb("/",t)},parse:function(t){Ot(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return n;var r=t.charCodeAt(0),i=r===47,o;i?(n.root="/",o=1):o=0;for(var s=-1,a=0,l=-1,p=!0,m=t.length-1,v=0;m>=o;--m){if(r=t.charCodeAt(m),r===47){if(!p){a=m+1;break}continue}l===-1&&(p=!1,l=m+1),r===46?s===-1?s=m:v!==1&&(v=1):s!==-1&&(v=-1)}return s===-1||l===-1||v===0||v===1&&s===l-1&&s===a+1?l!==-1&&(a===0&&i?n.base=n.name=t.slice(1,l):n.base=n.name=t.slice(a,l)):(a===0&&i?(n.name=t.slice(1,s),n.base=t.slice(1,l)):(n.name=t.slice(a,s),n.base=t.slice(a,l)),n.ext=t.slice(s,l)),a>0?n.dir=t.slice(0,a-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};nr.posix=nr;nd.exports=nr});import{CONFIG_FILE_NAMES as oi,loadConfig as am}from"@redocly/openapi-core";var Va;Va=(()=>{"use strict";var e={470:r=>{function i(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function o(a,l){for(var p,m="",v=0,C=-1,P=0,x=0;x<=a.length;++x){if(x<a.length)p=a.charCodeAt(x);else{if(p===47)break;p=47}if(p===47){if(!(C===x-1||P===1))if(C!==x-1&&P===2){if(m.length<2||v!==2||m.charCodeAt(m.length-1)!==46||m.charCodeAt(m.length-2)!==46){if(m.length>2){var A=m.lastIndexOf("/");if(A!==m.length-1){A===-1?(m="",v=0):v=(m=m.slice(0,A)).length-1-m.lastIndexOf("/"),C=x,P=0;continue}}else if(m.length===2||m.length===1){m="",v=0,C=x,P=0;continue}}l&&(m.length>0?m+="/..":m="..",v=2)}else m.length>0?m+="/"+a.slice(C+1,x):m=a.slice(C+1,x),v=x-C-1;C=x,P=0}else p===46&&P!==-1?++P:P=-1}return m}var s={resolve:function(){for(var a,l="",p=!1,m=arguments.length-1;m>=-1&&!p;m--){var v;m>=0?v=arguments[m]:(a===void 0&&(a=process.cwd()),v=a),i(v),v.length!==0&&(l=v+"/"+l,p=v.charCodeAt(0)===47)}return l=o(l,!p),p?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(a){if(i(a),a.length===0)return".";var l=a.charCodeAt(0)===47,p=a.charCodeAt(a.length-1)===47;return(a=o(a,!l)).length!==0||l||(a="."),a.length>0&&p&&(a+="/"),l?"/"+a:a},isAbsolute:function(a){return i(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,l=0;l<arguments.length;++l){var p=arguments[l];i(p),p.length>0&&(a===void 0?a=p:a+="/"+p)}return a===void 0?".":s.normalize(a)},relative:function(a,l){if(i(a),i(l),a===l||(a=s.resolve(a))===(l=s.resolve(l)))return"";for(var p=1;p<a.length&&a.charCodeAt(p)===47;++p);for(var m=a.length,v=m-p,C=1;C<l.length&&l.charCodeAt(C)===47;++C);for(var P=l.length-C,x=v<P?v:P,A=-1,W=0;W<=x;++W){if(W===x){if(P>x){if(l.charCodeAt(C+W)===47)return l.slice(C+W+1);if(W===0)return l.slice(C+W)}else v>x&&(a.charCodeAt(p+W)===47?A=W:W===0&&(A=0));break}var z=a.charCodeAt(p+W);if(z!==l.charCodeAt(C+W))break;z===47&&(A=W)}var R="";for(W=p+A+1;W<=m;++W)W!==m&&a.charCodeAt(W)!==47||(R.length===0?R+="..":R+="/..");return R.length>0?R+l.slice(C+A):(C+=A,l.charCodeAt(C)===47&&++C,l.slice(C))},_makeLong:function(a){return a},dirname:function(a){if(i(a),a.length===0)return".";for(var l=a.charCodeAt(0),p=l===47,m=-1,v=!0,C=a.length-1;C>=1;--C)if((l=a.charCodeAt(C))===47){if(!v){m=C;break}}else v=!1;return m===-1?p?"/":".":p&&m===1?"//":a.slice(0,m)},basename:function(a,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');i(a);var p,m=0,v=-1,C=!0;if(l!==void 0&&l.length>0&&l.length<=a.length){if(l.length===a.length&&l===a)return"";var P=l.length-1,x=-1;for(p=a.length-1;p>=0;--p){var A=a.charCodeAt(p);if(A===47){if(!C){m=p+1;break}}else x===-1&&(C=!1,x=p+1),P>=0&&(A===l.charCodeAt(P)?--P==-1&&(v=p):(P=-1,v=x))}return m===v?v=x:v===-1&&(v=a.length),a.slice(m,v)}for(p=a.length-1;p>=0;--p)if(a.charCodeAt(p)===47){if(!C){m=p+1;break}}else v===-1&&(C=!1,v=p+1);return v===-1?"":a.slice(m,v)},extname:function(a){i(a);for(var l=-1,p=0,m=-1,v=!0,C=0,P=a.length-1;P>=0;--P){var x=a.charCodeAt(P);if(x!==47)m===-1&&(v=!1,m=P+1),x===46?l===-1?l=P:C!==1&&(C=1):l!==-1&&(C=-1);else if(!v){p=P+1;break}}return l===-1||m===-1||C===0||C===1&&l===m-1&&l===p+1?"":a.slice(l,m)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return function(l,p){var m=p.dir||p.root,v=p.base||(p.name||"")+(p.ext||"");return m?m===p.root?m+v:m+"/"+v:v}(0,a)},parse:function(a){i(a);var l={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return l;var p,m=a.charCodeAt(0),v=m===47;v?(l.root="/",p=1):p=0;for(var C=-1,P=0,x=-1,A=!0,W=a.length-1,z=0;W>=p;--W)if((m=a.charCodeAt(W))!==47)x===-1&&(A=!1,x=W+1),m===46?C===-1?C=W:z!==1&&(z=1):C!==-1&&(z=-1);else if(!A){P=W+1;break}return C===-1||x===-1||z===0||z===1&&C===x-1&&C===P+1?x!==-1&&(l.base=l.name=P===0&&v?a.slice(1,x):a.slice(P,x)):(P===0&&v?(l.name=a.slice(1,C),l.base=a.slice(1,x)):(l.name=a.slice(P,C),l.base=a.slice(P,x)),l.ext=a.slice(C,x)),P>0?l.dir=a.slice(0,P-1):v&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,r.exports=s},447:(r,i,o)=>{var s;if(o.r(i),o.d(i,{URI:()=>R,Utils:()=>Mt}),typeof process=="object")s=process.platform==="win32";else if(typeof navigator=="object"){var a=navigator.userAgent;s=a.indexOf("Windows")>=0}var l,p,m=(l=function(O,T){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(N,F){N.__proto__=F}||function(N,F){for(var G in F)Object.prototype.hasOwnProperty.call(F,G)&&(N[G]=F[G])})(O,T)},function(O,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function N(){this.constructor=O}l(O,T),O.prototype=T===null?Object.create(T):(N.prototype=T.prototype,new N)}),v=/^\w[\w\d+.-]*$/,C=/^\//,P=/^\/\//;function x(O,T){if(!O.scheme&&T)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(O.authority,'", path: "').concat(O.path,'", query: "').concat(O.query,'", fragment: "').concat(O.fragment,'"}'));if(O.scheme&&!v.test(O.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(O.path){if(O.authority){if(!C.test(O.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(P.test(O.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}var A="",W="/",z=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,R=function(){function O(T,N,F,G,J,j){j===void 0&&(j=!1),typeof T=="object"?(this.scheme=T.scheme||A,this.authority=T.authority||A,this.path=T.path||A,this.query=T.query||A,this.fragment=T.fragment||A):(this.scheme=function(tt,Le){return tt||Le?tt:"file"}(T,j),this.authority=N||A,this.path=function(tt,Le){switch(tt){case"https":case"http":case"file":Le?Le[0]!==W&&(Le=W+Le):Le=W}return Le}(this.scheme,F||A),this.query=G||A,this.fragment=J||A,x(this,j))}return O.isUri=function(T){return T instanceof O||!!T&&typeof T.authority=="string"&&typeof T.fragment=="string"&&typeof T.path=="string"&&typeof T.query=="string"&&typeof T.scheme=="string"&&typeof T.fsPath=="string"&&typeof T.with=="function"&&typeof T.toString=="function"},Object.defineProperty(O.prototype,"fsPath",{get:function(){return Ge(this,!1)},enumerable:!1,configurable:!0}),O.prototype.with=function(T){if(!T)return this;var N=T.scheme,F=T.authority,G=T.path,J=T.query,j=T.fragment;return N===void 0?N=this.scheme:N===null&&(N=A),F===void 0?F=this.authority:F===null&&(F=A),G===void 0?G=this.path:G===null&&(G=A),J===void 0?J=this.query:J===null&&(J=A),j===void 0?j=this.fragment:j===null&&(j=A),N===this.scheme&&F===this.authority&&G===this.path&&J===this.query&&j===this.fragment?this:new E(N,F,G,J,j)},O.parse=function(T,N){N===void 0&&(N=!1);var F=z.exec(T);return F?new E(F[2]||A,Ve(F[4]||A),Ve(F[5]||A),Ve(F[7]||A),Ve(F[9]||A),N):new E(A,A,A,A,A)},O.file=function(T){var N=A;if(s&&(T=T.replace(/\\/g,W)),T[0]===W&&T[1]===W){var F=T.indexOf(W,2);F===-1?(N=T.substring(2),T=W):(N=T.substring(2,F),T=T.substring(F)||W)}return new E("file",N,T,A,A)},O.from=function(T){var N=new E(T.scheme,T.authority,T.path,T.query,T.fragment);return x(N,!0),N},O.prototype.toString=function(T){return T===void 0&&(T=!1),Rt(this,T)},O.prototype.toJSON=function(){return this},O.revive=function(T){if(T){if(T instanceof O)return T;var N=new E(T);return N._formatted=T.external,N._fsPath=T._sep===b?T.fsPath:null,N}return T},O}(),b=s?1:void 0,E=function(O){function T(){var N=O!==null&&O.apply(this,arguments)||this;return N._formatted=null,N._fsPath=null,N}return m(T,O),Object.defineProperty(T.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=Ge(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),T.prototype.toString=function(N){return N===void 0&&(N=!1),N?Rt(this,!0):(this._formatted||(this._formatted=Rt(this,!1)),this._formatted)},T.prototype.toJSON=function(){var N={$mid:1};return this._fsPath&&(N.fsPath=this._fsPath,N._sep=b),this._formatted&&(N.external=this._formatted),this.path&&(N.path=this.path),this.scheme&&(N.scheme=this.scheme),this.authority&&(N.authority=this.authority),this.query&&(N.query=this.query),this.fragment&&(N.fragment=this.fragment),N},T}(R),$=((p={})[58]="%3A",p[47]="%2F",p[63]="%3F",p[35]="%23",p[91]="%5B",p[93]="%5D",p[64]="%40",p[33]="%21",p[36]="%24",p[38]="%26",p[39]="%27",p[40]="%28",p[41]="%29",p[42]="%2A",p[43]="%2B",p[44]="%2C",p[59]="%3B",p[61]="%3D",p[32]="%20",p);function te(O,T){for(var N=void 0,F=-1,G=0;G<O.length;G++){var J=O.charCodeAt(G);if(J>=97&&J<=122||J>=65&&J<=90||J>=48&&J<=57||J===45||J===46||J===95||J===126||T&&J===47)F!==-1&&(N+=encodeURIComponent(O.substring(F,G)),F=-1),N!==void 0&&(N+=O.charAt(G));else{N===void 0&&(N=O.substr(0,G));var j=$[J];j!==void 0?(F!==-1&&(N+=encodeURIComponent(O.substring(F,G)),F=-1),N+=j):F===-1&&(F=G)}}return F!==-1&&(N+=encodeURIComponent(O.substring(F))),N!==void 0?N:O}function ue(O){for(var T=void 0,N=0;N<O.length;N++){var F=O.charCodeAt(N);F===35||F===63?(T===void 0&&(T=O.substr(0,N)),T+=$[F]):T!==void 0&&(T+=O[N])}return T!==void 0?T:O}function Ge(O,T){var N;return N=O.authority&&O.path.length>1&&O.scheme==="file"?"//".concat(O.authority).concat(O.path):O.path.charCodeAt(0)===47&&(O.path.charCodeAt(1)>=65&&O.path.charCodeAt(1)<=90||O.path.charCodeAt(1)>=97&&O.path.charCodeAt(1)<=122)&&O.path.charCodeAt(2)===58?T?O.path.substr(1):O.path[1].toLowerCase()+O.path.substr(2):O.path,s&&(N=N.replace(/\//g,"\\")),N}function Rt(O,T){var N=T?ue:te,F="",G=O.scheme,J=O.authority,j=O.path,tt=O.query,Le=O.fragment;if(G&&(F+=G,F+=":"),(J||G==="file")&&(F+=W,F+=W),J){var Xe=J.indexOf("@");if(Xe!==-1){var Kt=J.substr(0,Xe);J=J.substr(Xe+1),(Xe=Kt.indexOf(":"))===-1?F+=N(Kt,!1):(F+=N(Kt.substr(0,Xe),!1),F+=":",F+=N(Kt.substr(Xe+1),!1)),F+="@"}(Xe=(J=J.toLowerCase()).indexOf(":"))===-1?F+=N(J,!1):(F+=N(J.substr(0,Xe),!1),F+=J.substr(Xe))}if(j){if(j.length>=3&&j.charCodeAt(0)===47&&j.charCodeAt(2)===58)(Tt=j.charCodeAt(1))>=65&&Tt<=90&&(j="/".concat(String.fromCharCode(Tt+32),":").concat(j.substr(3)));else if(j.length>=2&&j.charCodeAt(1)===58){var Tt;(Tt=j.charCodeAt(0))>=65&&Tt<=90&&(j="".concat(String.fromCharCode(Tt+32),":").concat(j.substr(2)))}F+=N(j,!0)}return tt&&(F+="?",F+=N(tt,!1)),Le&&(F+="#",F+=T?Le:te(Le,!1)),F}function Ct(O){try{return decodeURIComponent(O)}catch{return O.length>3?O.substr(0,3)+Ct(O.substr(3)):O}}var Pt=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Ve(O){return O.match(Pt)?O.replace(Pt,function(T){return Ct(T)}):O}var Mt,Ft=o(470),fn=function(O,T,N){if(N||arguments.length===2)for(var F,G=0,J=T.length;G<J;G++)!F&&G in T||(F||(F=Array.prototype.slice.call(T,0,G)),F[G]=T[G]);return O.concat(F||Array.prototype.slice.call(T))},ct=Ft.posix||Ft;(function(O){O.joinPath=function(T){for(var N=[],F=1;F<arguments.length;F++)N[F-1]=arguments[F];return T.with({path:ct.join.apply(ct,fn([T.path],N,!1))})},O.resolvePath=function(T){for(var N=[],F=1;F<arguments.length;F++)N[F-1]=arguments[F];var G=T.path||"/";return T.with({path:ct.resolve.apply(ct,fn([G],N,!1))})},O.dirname=function(T){var N=ct.dirname(T.path);return N.length===1&&N.charCodeAt(0)===46?T:T.with({path:N})},O.basename=function(T){return ct.basename(T.path)},O.extname=function(T){return ct.extname(T.path)}})(Mt||(Mt={}))}},t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}return n.d=(r,i)=>{for(var o in i)n.o(i,o)&&!n.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:i[o]})},n.o=(r,i)=>Object.prototype.hasOwnProperty.call(r,i),n.r=r=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n(447)})();var{URI:On,Utils:he}=Va;var Ka={languageId:"yaml",filePattern:/\.ya?ml$/i},go={languageId:"json",filePattern:/\.json$/i},mo=class{constructor(){this.supportedLanguages=[Ka,go]}registerFileSystemProvider(t){this._fs=t}registerDocumentsProvider(t){this._documentManager=t}get fs(){if(!this._fs)throw new Error("FileSystemProvider not registered.");return this._fs}get documents(){if(!this._documentManager)throw new Error("DocumentsProvider not registered.");return this._documentManager}},Ue=new mo;function Qa(e,t){return he.resolvePath(qe(e)).toString()===he.resolvePath(qe(t)).toString()}function qe(e){return On.parse(e)}function Ja(e){return On.parse(e).fsPath}function Ga(e){let t=["https","http"],{scheme:n}=On.parse(e);return t.includes(n)}function or(e){return he.basename(qe(e))}async function Xa(e,t="/"){let n=he.resolvePath(qe(t));for(console.log(e);e.path!=="/";)try{(await Ue.fs.stat(he.resolvePath(n,e.path))).isDirectory()||(e=he.dirname(e));break}catch{e=he.dirname(e)}return e}import{BaseResolver as om,Source as Fc,readFileFromUrl as sm}from"@redocly/openapi-core";var ti=rt(ei(),1);import{isAbsoluteUrl as rm}from"@redocly/openapi-core";function Pc(e,t=100,n=!1){let r=new Map,i=new Map;function o(a,l,p){let m=i.get(a.uri),v=Date.now()-m;try{v<t&&v>=0?r.set(a.uri,setTimeout(()=>o(a,l,p),t-v)):(r.delete(a.uri),i.delete(a.uri),n||l(e(a)))}catch(C){p(C)}}function s(a){let l=r.get(a.uri),p=n&&!l;return i.set(a.uri,Date.now()),new Promise((m,v)=>{l||r.set(a.uri,setTimeout(()=>o(a,m,v),t)),p&&m(e(a))})}return s}function Tc(e){let t=new Set,n=r=>Array.isArray(n)?r.map(n):typeof r=="object"&&r!==null?t.has(r)?void 0:(t.add(r),Object.fromEntries(Object.entries(r).map(([i,o])=>[i,n(o)]))):r;return n(e)}function wc(e){return e==="$ref"}async function $o(e){let t=On.parse("");return he.joinPath(t,e).toString()}async function xc(e,t){for(let[n,{root:r}]of Object.entries(e))if(await $o(r)===t)return n}function kc(e){return typeof e=="string"}function ni(e){return typeof e=="function"}function Sc(e){return e?.kind===ti.Kind.MAP}function zo(e){return e?.kind===ti.Kind.MAPPING}function Yo(e){return e?.kind===ti.Kind.SEQ}function lr(e,t){let n=t.singleQuoted?"'":'"';return`${n}${e}${n}`}function Vo(e){return rm(e)||e.startsWith("file://")}var _n=class{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(_n.isIncremental(r)){let i=Nc(r.range),o=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,o)+r.text+this._content.substring(s,this._content.length);let a=Math.max(i.start.line,0),l=Math.max(i.end.line,0),p=this._lineOffsets,m=Ac(r.text,!1,o);if(l-a===m.length)for(let C=0,P=m.length;C<P;C++)p[C+a+1]=m[C];else m.length<1e4?p.splice(a+1,l-a,...m):this._lineOffsets=p=p.slice(0,a+1).concat(m,p.slice(l+1));let v=r.text.length-(s-o);if(v!==0)for(let C=a+1+m.length,P=p.length;C<P;C++)p[C]=p[C]+v}else if(_n.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Ac(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:t};for(;r<i;){let s=Math.floor((r+i)/2);n[s]>t?i=s:r=s+1}let o=r-1;return{line:o,character:t-n[o]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,i),r)}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}},ri;(function(e){function t(i,o,s,a){return new _n(i,o,s,a)}e.create=t;function n(i,o,s){if(i instanceof _n)return i.update(o,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(i,o){let s=i.getText(),a=Ko(o.map(im),(m,v)=>{let C=m.range.start.line-v.range.start.line;return C===0?m.range.start.character-v.range.start.character:C}),l=0,p=[];for(let m of a){let v=i.offsetAt(m.range.start);if(v<l)throw new Error("Overlapping edit");v>l&&p.push(s.substring(l,v)),m.newText.length&&p.push(m.newText),l=i.offsetAt(m.range.end)}return p.push(s.substr(l)),p.join("")}e.applyEdits=r})(ri||(ri={}));function Ko(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Ko(r,t),Ko(i,t);let o=0,s=0,a=0;for(;o<r.length&&s<i.length;)t(r[o],i[s])<=0?e[a++]=r[o++]:e[a++]=i[s++];for(;o<r.length;)e[a++]=r[o++];for(;s<i.length;)e[a++]=i[s++];return e}function Ac(e,t,n=0){let r=t?[n]:[];for(let i=0;i<e.length;i++){let o=e.charCodeAt(i);(o===13||o===10)&&(o===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function Nc(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function im(e){let t=Nc(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var qc=new Map;function Ec(e,t){return qc.set(e,t)}function Oc(e){let t=[];for(let[n,r]of qc.entries())r.dependencyPaths.has(e)&&t.push({documentPath:n,durationMS:r.durationMS});return t}async function Dn(e){let t=Ue.documents.get(e);if(t)return t;let n=await Ue.fs.readFile(qe(e),"utf-8");return ri.create(e,"yaml",1,n)}function Mc(e){return go.filePattern.test(e)}var Ht=class extends om{resolveExternalRef(t,n){return Vo(n)?n:t&&Vo(t)?new URL(n,t).href:he.resolvePath(he.dirname(qe(t)),n).toString()}async loadExternalRef(t){if(Ga(t)){let{body:n,mimeType:r}=await sm(t,{...this.config.http,customFetch:fetch});return new Fc(t,n,r)}return new Fc(t,(await Dn(t)).getText())}};async function Lc(e){if(!Ue.fs)return;let t=[];for(let n of oi)try{let r=he.resolvePath(he.dirname(qe(e)),n);await Ue.fs.exists(r)&&t.push(r.toString())}catch{continue}if(t.length>1)throw new Error(`
|
|
65
|
+
`,"\r"];var Me;(function(l){function g(R,k,J,De){return new nt(R,k,J,De)}l.create=g;function y(R){var k=R;return!!(_.defined(k)&&_.string(k.uri)&&(_.undefined(k.languageId)||_.string(k.languageId))&&_.uinteger(k.lineCount)&&_.func(k.getText)&&_.func(k.positionAt)&&_.func(k.offsetAt))}l.is=y;function d(R,k){for(var J=R.getText(),De=a(k,function(wn,Wr){var Xa=wn.range.start.line-Wr.range.start.line;return Xa===0?wn.range.start.character-Wr.range.start.character:Xa}),de=J.length,ft=De.length-1;ft>=0;ft--){var dt=De[ft],Mt=R.offsetAt(dt.range.start),te=R.offsetAt(dt.range.end);if(te<=de)J=J.substring(0,Mt)+dt.newText+J.substring(te,J.length);else throw new Error("Overlapping edit");de=Mt}return J}l.applyEdits=d;function a(R,k){if(R.length<=1)return R;var J=R.length/2|0,De=R.slice(0,J),de=R.slice(J);a(De,k),a(de,k);for(var ft=0,dt=0,Mt=0;ft<De.length&&dt<de.length;){var te=k(De[ft],de[dt]);te<=0?R[Mt++]=De[ft++]:R[Mt++]=de[dt++]}for(;ft<De.length;)R[Mt++]=De[ft++];for(;dt<de.length;)R[Mt++]=de[dt++];return R}})(Me=t.TextDocument||(t.TextDocument={}));var nt=function(){function l(g,y,d,a){this._uri=g,this._languageId=y,this._version=d,this._content=a,this._lineOffsets=void 0}return Object.defineProperty(l.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),l.prototype.getText=function(g){if(g){var y=this.offsetAt(g.start),d=this.offsetAt(g.end);return this._content.substring(y,d)}return this._content},l.prototype.update=function(g,y){this._content=g.text,this._version=y,this._lineOffsets=void 0},l.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var g=[],y=this._content,d=!0,a=0;a<y.length;a++){d&&(g.push(a),d=!1);var R=y.charAt(a);d=R==="\r"||R===`
|
|
66
|
+
`,R==="\r"&&a+1<y.length&&y.charAt(a+1)===`
|
|
67
|
+
`&&a++}d&&y.length>0&&g.push(y.length),this._lineOffsets=g}return this._lineOffsets},l.prototype.positionAt=function(g){g=Math.max(Math.min(g,this._content.length),0);var y=this.getLineOffsets(),d=0,a=y.length;if(a===0)return s.create(0,g);for(;d<a;){var R=Math.floor((d+a)/2);y[R]>g?a=R:d=R+1}var k=d-1;return s.create(k,g-y[k])},l.prototype.offsetAt=function(g){var y=this.getLineOffsets();if(g.line>=y.length)return this._content.length;if(g.line<0)return 0;var d=y[g.line],a=g.line+1<y.length?y[g.line+1]:this._content.length;return Math.max(Math.min(d+g.character,a),d)},Object.defineProperty(l.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),l}(),_;(function(l){var g=Object.prototype.toString;function y(te){return typeof te<"u"}l.defined=y;function d(te){return typeof te>"u"}l.undefined=d;function a(te){return te===!0||te===!1}l.boolean=a;function R(te){return g.call(te)==="[object String]"}l.string=R;function k(te){return g.call(te)==="[object Number]"}l.number=k;function J(te,wn,Wr){return g.call(te)==="[object Number]"&&wn<=te&&te<=Wr}l.numberRange=J;function De(te){return g.call(te)==="[object Number]"&&-2147483648<=te&&te<=2147483647}l.integer=De;function de(te){return g.call(te)==="[object Number]"&&0<=te&&te<=2147483647}l.uinteger=de;function ft(te){return g.call(te)==="[object Function]"}l.func=ft;function dt(te){return te!==null&&typeof te=="object"}l.objectLiteral=dt;function Mt(te,wn){return Array.isArray(te)&&te.every(wn)}l.typedArray=Mt})(_||(_={}))})});var _e=N(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.ProtocolNotificationType=Ke.ProtocolNotificationType0=Ke.ProtocolRequestType=Ke.ProtocolRequestType0=Ke.RegistrationType=Ke.MessageDirection=void 0;var Wn=bn(),Gm;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Gm=Ke.MessageDirection||(Ke.MessageDirection={}));var da=class{constructor(t){this.method=t}};Ke.RegistrationType=da;var pa=class extends Wn.RequestType0{constructor(t){super(t)}};Ke.ProtocolRequestType0=pa;var ha=class extends Wn.RequestType{constructor(t){super(t,Wn.ParameterStructures.byName)}};Ke.ProtocolRequestType=ha;var ma=class extends Wn.NotificationType0{constructor(t){super(t)}};Ke.ProtocolNotificationType0=ma;var ga=class extends Wn.NotificationType{constructor(t){super(t,Wn.ParameterStructures.byName)}};Ke.ProtocolNotificationType=ga});var gi=N(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.objectLiteral=xe.typedArray=xe.stringArray=xe.array=xe.func=xe.error=xe.number=xe.string=xe.boolean=void 0;function Xm(e){return e===!0||e===!1}xe.boolean=Xm;function _l(e){return typeof e=="string"||e instanceof String}xe.string=_l;function Zm(e){return typeof e=="number"||e instanceof Number}xe.number=Zm;function eg(e){return e instanceof Error}xe.error=eg;function tg(e){return typeof e=="function"}xe.func=tg;function Rl(e){return Array.isArray(e)}xe.array=Rl;function ng(e){return Rl(e)&&e.every(t=>_l(t))}xe.stringArray=ng;function rg(e,t){return Array.isArray(e)&&e.every(t)}xe.typedArray=rg;function ig(e){return e!==null&&typeof e=="object"}xe.objectLiteral=ig});var Cl=N(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.ImplementationRequest=void 0;var Dl=_e(),og;(function(e){e.method="textDocument/implementation",e.messageDirection=Dl.MessageDirection.clientToServer,e.type=new Dl.ProtocolRequestType(e.method)})(og=gr.ImplementationRequest||(gr.ImplementationRequest={}))});var Tl=N(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.TypeDefinitionRequest=void 0;var Pl=_e(),sg;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Pl.MessageDirection.clientToServer,e.type=new Pl.ProtocolRequestType(e.method)})(sg=yr.TypeDefinitionRequest||(yr.TypeDefinitionRequest={}))});var wl=N(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.DidChangeWorkspaceFoldersNotification=Gt.WorkspaceFoldersRequest=void 0;var yi=_e(),ag;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=yi.MessageDirection.serverToClient,e.type=new yi.ProtocolRequestType0(e.method)})(ag=Gt.WorkspaceFoldersRequest||(Gt.WorkspaceFoldersRequest={}));var cg;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=yi.MessageDirection.clientToServer,e.type=new yi.ProtocolNotificationType(e.method)})(cg=Gt.DidChangeWorkspaceFoldersNotification||(Gt.DidChangeWorkspaceFoldersNotification={}))});var Sl=N(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.ConfigurationRequest=void 0;var xl=_e(),ug;(function(e){e.method="workspace/configuration",e.messageDirection=xl.MessageDirection.serverToClient,e.type=new xl.ProtocolRequestType(e.method)})(ug=vr.ConfigurationRequest||(vr.ConfigurationRequest={}))});var kl=N(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.ColorPresentationRequest=Xt.DocumentColorRequest=void 0;var vi=_e(),lg;(function(e){e.method="textDocument/documentColor",e.messageDirection=vi.MessageDirection.clientToServer,e.type=new vi.ProtocolRequestType(e.method)})(lg=Xt.DocumentColorRequest||(Xt.DocumentColorRequest={}));var fg;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=vi.MessageDirection.clientToServer,e.type=new vi.ProtocolRequestType(e.method)})(fg=Xt.ColorPresentationRequest||(Xt.ColorPresentationRequest={}))});var Nl=N(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.FoldingRangeRequest=void 0;var Al=_e(),dg;(function(e){e.method="textDocument/foldingRange",e.messageDirection=Al.MessageDirection.clientToServer,e.type=new Al.ProtocolRequestType(e.method)})(dg=br.FoldingRangeRequest||(br.FoldingRangeRequest={}))});var El=N(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.DeclarationRequest=void 0;var ql=_e(),pg;(function(e){e.method="textDocument/declaration",e.messageDirection=ql.MessageDirection.clientToServer,e.type=new ql.ProtocolRequestType(e.method)})(pg=_r.DeclarationRequest||(_r.DeclarationRequest={}))});var Ml=N(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.SelectionRangeRequest=void 0;var Ol=_e(),hg;(function(e){e.method="textDocument/selectionRange",e.messageDirection=Ol.MessageDirection.clientToServer,e.type=new Ol.ProtocolRequestType(e.method)})(hg=Rr.SelectionRangeRequest||(Rr.SelectionRangeRequest={}))});var Fl=N(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.WorkDoneProgressCancelNotification=gt.WorkDoneProgressCreateRequest=gt.WorkDoneProgress=void 0;var mg=bn(),bi=_e(),gg;(function(e){e.type=new mg.ProgressType;function t(n){return n===e.type}e.is=t})(gg=gt.WorkDoneProgress||(gt.WorkDoneProgress={}));var yg;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=bi.MessageDirection.serverToClient,e.type=new bi.ProtocolRequestType(e.method)})(yg=gt.WorkDoneProgressCreateRequest||(gt.WorkDoneProgressCreateRequest={}));var vg;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=bi.MessageDirection.clientToServer,e.type=new bi.ProtocolNotificationType(e.method)})(vg=gt.WorkDoneProgressCancelNotification||(gt.WorkDoneProgressCancelNotification={}))});var Ll=N(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.CallHierarchyOutgoingCallsRequest=yt.CallHierarchyIncomingCallsRequest=yt.CallHierarchyPrepareRequest=void 0;var Hn=_e(),bg;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=Hn.MessageDirection.clientToServer,e.type=new Hn.ProtocolRequestType(e.method)})(bg=yt.CallHierarchyPrepareRequest||(yt.CallHierarchyPrepareRequest={}));var _g;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=Hn.MessageDirection.clientToServer,e.type=new Hn.ProtocolRequestType(e.method)})(_g=yt.CallHierarchyIncomingCallsRequest||(yt.CallHierarchyIncomingCallsRequest={}));var Rg;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=Hn.MessageDirection.clientToServer,e.type=new Hn.ProtocolRequestType(e.method)})(Rg=yt.CallHierarchyOutgoingCallsRequest||(yt.CallHierarchyOutgoingCallsRequest={}))});var Il=N(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.SemanticTokensRefreshRequest=Se.SemanticTokensRangeRequest=Se.SemanticTokensDeltaRequest=Se.SemanticTokensRequest=Se.SemanticTokensRegistrationType=Se.TokenFormat=void 0;var Ut=_e(),Dg;(function(e){e.Relative="relative"})(Dg=Se.TokenFormat||(Se.TokenFormat={}));var _i;(function(e){e.method="textDocument/semanticTokens",e.type=new Ut.RegistrationType(e.method)})(_i=Se.SemanticTokensRegistrationType||(Se.SemanticTokensRegistrationType={}));var Cg;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=Ut.MessageDirection.clientToServer,e.type=new Ut.ProtocolRequestType(e.method),e.registrationMethod=_i.method})(Cg=Se.SemanticTokensRequest||(Se.SemanticTokensRequest={}));var Pg;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=Ut.MessageDirection.clientToServer,e.type=new Ut.ProtocolRequestType(e.method),e.registrationMethod=_i.method})(Pg=Se.SemanticTokensDeltaRequest||(Se.SemanticTokensDeltaRequest={}));var Tg;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=Ut.MessageDirection.clientToServer,e.type=new Ut.ProtocolRequestType(e.method),e.registrationMethod=_i.method})(Tg=Se.SemanticTokensRangeRequest||(Se.SemanticTokensRangeRequest={}));var wg;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=Ut.MessageDirection.serverToClient,e.type=new Ut.ProtocolRequestType0(e.method)})(wg=Se.SemanticTokensRefreshRequest||(Se.SemanticTokensRefreshRequest={}))});var Wl=N(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.ShowDocumentRequest=void 0;var jl=_e(),xg;(function(e){e.method="window/showDocument",e.messageDirection=jl.MessageDirection.serverToClient,e.type=new jl.ProtocolRequestType(e.method)})(xg=Dr.ShowDocumentRequest||(Dr.ShowDocumentRequest={}))});var Ul=N(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.LinkedEditingRangeRequest=void 0;var Hl=_e(),Sg;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Hl.MessageDirection.clientToServer,e.type=new Hl.ProtocolRequestType(e.method)})(Sg=Cr.LinkedEditingRangeRequest||(Cr.LinkedEditingRangeRequest={}))});var Bl=N(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.WillDeleteFilesRequest=Re.DidDeleteFilesNotification=Re.DidRenameFilesNotification=Re.WillRenameFilesRequest=Re.DidCreateFilesNotification=Re.WillCreateFilesRequest=Re.FileOperationPatternKind=void 0;var ot=_e(),kg;(function(e){e.file="file",e.folder="folder"})(kg=Re.FileOperationPatternKind||(Re.FileOperationPatternKind={}));var Ag;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolRequestType(e.method)})(Ag=Re.WillCreateFilesRequest||(Re.WillCreateFilesRequest={}));var Ng;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolNotificationType(e.method)})(Ng=Re.DidCreateFilesNotification||(Re.DidCreateFilesNotification={}));var qg;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolRequestType(e.method)})(qg=Re.WillRenameFilesRequest||(Re.WillRenameFilesRequest={}));var Eg;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolNotificationType(e.method)})(Eg=Re.DidRenameFilesNotification||(Re.DidRenameFilesNotification={}));var Og;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolNotificationType(e.method)})(Og=Re.DidDeleteFilesNotification||(Re.DidDeleteFilesNotification={}));var Mg;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=ot.MessageDirection.clientToServer,e.type=new ot.ProtocolRequestType(e.method)})(Mg=Re.WillDeleteFilesRequest||(Re.WillDeleteFilesRequest={}))});var zl=N(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.MonikerRequest=vt.MonikerKind=vt.UniquenessLevel=void 0;var $l=_e(),Fg;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(Fg=vt.UniquenessLevel||(vt.UniquenessLevel={}));var Lg;(function(e){e.$import="import",e.$export="export",e.local="local"})(Lg=vt.MonikerKind||(vt.MonikerKind={}));var Ig;(function(e){e.method="textDocument/moniker",e.messageDirection=$l.MessageDirection.clientToServer,e.type=new $l.ProtocolRequestType(e.method)})(Ig=vt.MonikerRequest||(vt.MonikerRequest={}))});var Yl=N(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.TypeHierarchySubtypesRequest=bt.TypeHierarchySupertypesRequest=bt.TypeHierarchyPrepareRequest=void 0;var Un=_e(),jg;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Un.MessageDirection.clientToServer,e.type=new Un.ProtocolRequestType(e.method)})(jg=bt.TypeHierarchyPrepareRequest||(bt.TypeHierarchyPrepareRequest={}));var Wg;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Un.MessageDirection.clientToServer,e.type=new Un.ProtocolRequestType(e.method)})(Wg=bt.TypeHierarchySupertypesRequest||(bt.TypeHierarchySupertypesRequest={}));var Hg;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Un.MessageDirection.clientToServer,e.type=new Un.ProtocolRequestType(e.method)})(Hg=bt.TypeHierarchySubtypesRequest||(bt.TypeHierarchySubtypesRequest={}))});var Vl=N(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.InlineValueRefreshRequest=Zt.InlineValueRequest=void 0;var Ri=_e(),Ug;(function(e){e.method="textDocument/inlineValue",e.messageDirection=Ri.MessageDirection.clientToServer,e.type=new Ri.ProtocolRequestType(e.method)})(Ug=Zt.InlineValueRequest||(Zt.InlineValueRequest={}));var Bg;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=Ri.MessageDirection.serverToClient,e.type=new Ri.ProtocolRequestType0(e.method)})(Bg=Zt.InlineValueRefreshRequest||(Zt.InlineValueRefreshRequest={}))});var Kl=N(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.InlayHintRefreshRequest=_t.InlayHintResolveRequest=_t.InlayHintRequest=void 0;var Bn=_e(),$g;(function(e){e.method="textDocument/inlayHint",e.messageDirection=Bn.MessageDirection.clientToServer,e.type=new Bn.ProtocolRequestType(e.method)})($g=_t.InlayHintRequest||(_t.InlayHintRequest={}));var zg;(function(e){e.method="inlayHint/resolve",e.messageDirection=Bn.MessageDirection.clientToServer,e.type=new Bn.ProtocolRequestType(e.method)})(zg=_t.InlayHintResolveRequest||(_t.InlayHintResolveRequest={}));var Yg;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=Bn.MessageDirection.serverToClient,e.type=new Bn.ProtocolRequestType0(e.method)})(Yg=_t.InlayHintRefreshRequest||(_t.InlayHintRefreshRequest={}))});var Jl=N(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.DiagnosticRefreshRequest=je.WorkspaceDiagnosticRequest=je.DocumentDiagnosticRequest=je.DocumentDiagnosticReportKind=je.DiagnosticServerCancellationData=void 0;var Ql=bn(),Vg=gi(),$n=_e(),Kg;(function(e){function t(n){let r=n;return r&&Vg.boolean(r.retriggerRequest)}e.is=t})(Kg=je.DiagnosticServerCancellationData||(je.DiagnosticServerCancellationData={}));var Qg;(function(e){e.Full="full",e.Unchanged="unchanged"})(Qg=je.DocumentDiagnosticReportKind||(je.DocumentDiagnosticReportKind={}));var Jg;(function(e){e.method="textDocument/diagnostic",e.messageDirection=$n.MessageDirection.clientToServer,e.type=new $n.ProtocolRequestType(e.method),e.partialResult=new Ql.ProgressType})(Jg=je.DocumentDiagnosticRequest||(je.DocumentDiagnosticRequest={}));var Gg;(function(e){e.method="workspace/diagnostic",e.messageDirection=$n.MessageDirection.clientToServer,e.type=new $n.ProtocolRequestType(e.method),e.partialResult=new Ql.ProgressType})(Gg=je.WorkspaceDiagnosticRequest||(je.WorkspaceDiagnosticRequest={}));var Xg;(function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=$n.MessageDirection.serverToClient,e.type=new $n.ProtocolRequestType0(e.method)})(Xg=je.DiagnosticRefreshRequest||(je.DiagnosticRefreshRequest={}))});var Zl=N(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.DidCloseNotebookDocumentNotification=re.DidSaveNotebookDocumentNotification=re.DidChangeNotebookDocumentNotification=re.NotebookCellArrayChange=re.DidOpenNotebookDocumentNotification=re.NotebookDocumentSyncRegistrationType=re.NotebookDocument=re.NotebookCell=re.ExecutionSummary=re.NotebookCellKind=void 0;var Pr=mi(),Rt=gi(),St=_e(),Gl;(function(e){e.Markup=1,e.Code=2;function t(n){return n===1||n===2}e.is=t})(Gl=re.NotebookCellKind||(re.NotebookCellKind={}));var Xl;(function(e){function t(i,o){let s={executionOrder:i};return(o===!0||o===!1)&&(s.success=o),s}e.create=t;function n(i){let o=i;return Rt.objectLiteral(o)&&Pr.uinteger.is(o.executionOrder)&&(o.success===void 0||Rt.boolean(o.success))}e.is=n;function r(i,o){return i===o?!0:i==null||o===null||o===void 0?!1:i.executionOrder===o.executionOrder&&i.success===o.success}e.equals=r})(Xl=re.ExecutionSummary||(re.ExecutionSummary={}));var ya;(function(e){function t(o,s){return{kind:o,document:s}}e.create=t;function n(o){let s=o;return Rt.objectLiteral(s)&&Gl.is(s.kind)&&Pr.DocumentUri.is(s.document)&&(s.metadata===void 0||Rt.objectLiteral(s.metadata))}e.is=n;function r(o,s){let u=new Set;return o.document!==s.document&&u.add("document"),o.kind!==s.kind&&u.add("kind"),o.executionSummary!==s.executionSummary&&u.add("executionSummary"),(o.metadata!==void 0||s.metadata!==void 0)&&!i(o.metadata,s.metadata)&&u.add("metadata"),(o.executionSummary!==void 0||s.executionSummary!==void 0)&&!Xl.equals(o.executionSummary,s.executionSummary)&&u.add("executionSummary"),u}e.diff=r;function i(o,s){if(o===s)return!0;if(o==null||s===null||s===void 0||typeof o!=typeof s||typeof o!="object")return!1;let u=Array.isArray(o),c=Array.isArray(s);if(u!==c)return!1;if(u&&c){if(o.length!==s.length)return!1;for(let p=0;p<o.length;p++)if(!i(o[p],s[p]))return!1}if(Rt.objectLiteral(o)&&Rt.objectLiteral(s)){let p=Object.keys(o),m=Object.keys(s);if(p.length!==m.length||(p.sort(),m.sort(),!i(p,m)))return!1;for(let v=0;v<p.length;v++){let C=p[v];if(!i(o[C],s[C]))return!1}}return!0}})(ya=re.NotebookCell||(re.NotebookCell={}));var Zg;(function(e){function t(r,i,o,s){return{uri:r,notebookType:i,version:o,cells:s}}e.create=t;function n(r){let i=r;return Rt.objectLiteral(i)&&Rt.string(i.uri)&&Pr.integer.is(i.version)&&Rt.typedArray(i.cells,ya.is)}e.is=n})(Zg=re.NotebookDocument||(re.NotebookDocument={}));var Tr;(function(e){e.method="notebookDocument/sync",e.messageDirection=St.MessageDirection.clientToServer,e.type=new St.RegistrationType(e.method)})(Tr=re.NotebookDocumentSyncRegistrationType||(re.NotebookDocumentSyncRegistrationType={}));var ey;(function(e){e.method="notebookDocument/didOpen",e.messageDirection=St.MessageDirection.clientToServer,e.type=new St.ProtocolNotificationType(e.method),e.registrationMethod=Tr.method})(ey=re.DidOpenNotebookDocumentNotification||(re.DidOpenNotebookDocumentNotification={}));var ty;(function(e){function t(r){let i=r;return Rt.objectLiteral(i)&&Pr.uinteger.is(i.start)&&Pr.uinteger.is(i.deleteCount)&&(i.cells===void 0||Rt.typedArray(i.cells,ya.is))}e.is=t;function n(r,i,o){let s={start:r,deleteCount:i};return o!==void 0&&(s.cells=o),s}e.create=n})(ty=re.NotebookCellArrayChange||(re.NotebookCellArrayChange={}));var ny;(function(e){e.method="notebookDocument/didChange",e.messageDirection=St.MessageDirection.clientToServer,e.type=new St.ProtocolNotificationType(e.method),e.registrationMethod=Tr.method})(ny=re.DidChangeNotebookDocumentNotification||(re.DidChangeNotebookDocumentNotification={}));var ry;(function(e){e.method="notebookDocument/didSave",e.messageDirection=St.MessageDirection.clientToServer,e.type=new St.ProtocolNotificationType(e.method),e.registrationMethod=Tr.method})(ry=re.DidSaveNotebookDocumentNotification||(re.DidSaveNotebookDocumentNotification={}));var iy;(function(e){e.method="notebookDocument/didClose",e.messageDirection=St.MessageDirection.clientToServer,e.type=new St.ProtocolNotificationType(e.method),e.registrationMethod=Tr.method})(iy=re.DidCloseNotebookDocumentNotification||(re.DidCloseNotebookDocumentNotification={}))});var uf=N(f=>{"use strict";Object.defineProperty(f,"__esModule",{value:!0});f.WorkspaceSymbolRequest=f.CodeActionResolveRequest=f.CodeActionRequest=f.DocumentSymbolRequest=f.DocumentHighlightRequest=f.ReferencesRequest=f.DefinitionRequest=f.SignatureHelpRequest=f.SignatureHelpTriggerKind=f.HoverRequest=f.CompletionResolveRequest=f.CompletionRequest=f.CompletionTriggerKind=f.PublishDiagnosticsNotification=f.WatchKind=f.RelativePattern=f.FileChangeType=f.DidChangeWatchedFilesNotification=f.WillSaveTextDocumentWaitUntilRequest=f.WillSaveTextDocumentNotification=f.TextDocumentSaveReason=f.DidSaveTextDocumentNotification=f.DidCloseTextDocumentNotification=f.DidChangeTextDocumentNotification=f.TextDocumentContentChangeEvent=f.DidOpenTextDocumentNotification=f.TextDocumentSyncKind=f.TelemetryEventNotification=f.LogMessageNotification=f.ShowMessageRequest=f.ShowMessageNotification=f.MessageType=f.DidChangeConfigurationNotification=f.ExitNotification=f.ShutdownRequest=f.InitializedNotification=f.InitializeErrorCodes=f.InitializeRequest=f.WorkDoneProgressOptions=f.TextDocumentRegistrationOptions=f.StaticRegistrationOptions=f.PositionEncodingKind=f.FailureHandlingKind=f.ResourceOperationKind=f.UnregistrationRequest=f.RegistrationRequest=f.DocumentSelector=f.NotebookCellTextDocumentFilter=f.NotebookDocumentFilter=f.TextDocumentFilter=void 0;f.TypeHierarchySubtypesRequest=f.TypeHierarchyPrepareRequest=f.MonikerRequest=f.MonikerKind=f.UniquenessLevel=f.WillDeleteFilesRequest=f.DidDeleteFilesNotification=f.WillRenameFilesRequest=f.DidRenameFilesNotification=f.WillCreateFilesRequest=f.DidCreateFilesNotification=f.FileOperationPatternKind=f.LinkedEditingRangeRequest=f.ShowDocumentRequest=f.SemanticTokensRegistrationType=f.SemanticTokensRefreshRequest=f.SemanticTokensRangeRequest=f.SemanticTokensDeltaRequest=f.SemanticTokensRequest=f.TokenFormat=f.CallHierarchyPrepareRequest=f.CallHierarchyOutgoingCallsRequest=f.CallHierarchyIncomingCallsRequest=f.WorkDoneProgressCancelNotification=f.WorkDoneProgressCreateRequest=f.WorkDoneProgress=f.SelectionRangeRequest=f.DeclarationRequest=f.FoldingRangeRequest=f.ColorPresentationRequest=f.DocumentColorRequest=f.ConfigurationRequest=f.DidChangeWorkspaceFoldersNotification=f.WorkspaceFoldersRequest=f.TypeDefinitionRequest=f.ImplementationRequest=f.ApplyWorkspaceEditRequest=f.ExecuteCommandRequest=f.PrepareRenameRequest=f.RenameRequest=f.PrepareSupportDefaultBehavior=f.DocumentOnTypeFormattingRequest=f.DocumentRangeFormattingRequest=f.DocumentFormattingRequest=f.DocumentLinkResolveRequest=f.DocumentLinkRequest=f.CodeLensRefreshRequest=f.CodeLensResolveRequest=f.CodeLensRequest=f.WorkspaceSymbolResolveRequest=void 0;f.DidCloseNotebookDocumentNotification=f.DidSaveNotebookDocumentNotification=f.DidChangeNotebookDocumentNotification=f.NotebookCellArrayChange=f.DidOpenNotebookDocumentNotification=f.NotebookDocumentSyncRegistrationType=f.NotebookDocument=f.NotebookCell=f.ExecutionSummary=f.NotebookCellKind=f.DiagnosticRefreshRequest=f.WorkspaceDiagnosticRequest=f.DocumentDiagnosticRequest=f.DocumentDiagnosticReportKind=f.DiagnosticServerCancellationData=f.InlayHintRefreshRequest=f.InlayHintResolveRequest=f.InlayHintRequest=f.InlineValueRefreshRequest=f.InlineValueRequest=f.TypeHierarchySupertypesRequest=void 0;var E=_e(),ef=mi(),We=gi(),oy=Cl();Object.defineProperty(f,"ImplementationRequest",{enumerable:!0,get:function(){return oy.ImplementationRequest}});var sy=Tl();Object.defineProperty(f,"TypeDefinitionRequest",{enumerable:!0,get:function(){return sy.TypeDefinitionRequest}});var tf=wl();Object.defineProperty(f,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return tf.WorkspaceFoldersRequest}});Object.defineProperty(f,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return tf.DidChangeWorkspaceFoldersNotification}});var ay=Sl();Object.defineProperty(f,"ConfigurationRequest",{enumerable:!0,get:function(){return ay.ConfigurationRequest}});var nf=kl();Object.defineProperty(f,"DocumentColorRequest",{enumerable:!0,get:function(){return nf.DocumentColorRequest}});Object.defineProperty(f,"ColorPresentationRequest",{enumerable:!0,get:function(){return nf.ColorPresentationRequest}});var cy=Nl();Object.defineProperty(f,"FoldingRangeRequest",{enumerable:!0,get:function(){return cy.FoldingRangeRequest}});var uy=El();Object.defineProperty(f,"DeclarationRequest",{enumerable:!0,get:function(){return uy.DeclarationRequest}});var ly=Ml();Object.defineProperty(f,"SelectionRangeRequest",{enumerable:!0,get:function(){return ly.SelectionRangeRequest}});var va=Fl();Object.defineProperty(f,"WorkDoneProgress",{enumerable:!0,get:function(){return va.WorkDoneProgress}});Object.defineProperty(f,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return va.WorkDoneProgressCreateRequest}});Object.defineProperty(f,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return va.WorkDoneProgressCancelNotification}});var ba=Ll();Object.defineProperty(f,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return ba.CallHierarchyIncomingCallsRequest}});Object.defineProperty(f,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return ba.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(f,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return ba.CallHierarchyPrepareRequest}});var zn=Il();Object.defineProperty(f,"TokenFormat",{enumerable:!0,get:function(){return zn.TokenFormat}});Object.defineProperty(f,"SemanticTokensRequest",{enumerable:!0,get:function(){return zn.SemanticTokensRequest}});Object.defineProperty(f,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return zn.SemanticTokensDeltaRequest}});Object.defineProperty(f,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return zn.SemanticTokensRangeRequest}});Object.defineProperty(f,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return zn.SemanticTokensRefreshRequest}});Object.defineProperty(f,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return zn.SemanticTokensRegistrationType}});var fy=Wl();Object.defineProperty(f,"ShowDocumentRequest",{enumerable:!0,get:function(){return fy.ShowDocumentRequest}});var dy=Ul();Object.defineProperty(f,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return dy.LinkedEditingRangeRequest}});var _n=Bl();Object.defineProperty(f,"FileOperationPatternKind",{enumerable:!0,get:function(){return _n.FileOperationPatternKind}});Object.defineProperty(f,"DidCreateFilesNotification",{enumerable:!0,get:function(){return _n.DidCreateFilesNotification}});Object.defineProperty(f,"WillCreateFilesRequest",{enumerable:!0,get:function(){return _n.WillCreateFilesRequest}});Object.defineProperty(f,"DidRenameFilesNotification",{enumerable:!0,get:function(){return _n.DidRenameFilesNotification}});Object.defineProperty(f,"WillRenameFilesRequest",{enumerable:!0,get:function(){return _n.WillRenameFilesRequest}});Object.defineProperty(f,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return _n.DidDeleteFilesNotification}});Object.defineProperty(f,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return _n.WillDeleteFilesRequest}});var _a=zl();Object.defineProperty(f,"UniquenessLevel",{enumerable:!0,get:function(){return _a.UniquenessLevel}});Object.defineProperty(f,"MonikerKind",{enumerable:!0,get:function(){return _a.MonikerKind}});Object.defineProperty(f,"MonikerRequest",{enumerable:!0,get:function(){return _a.MonikerRequest}});var Ra=Yl();Object.defineProperty(f,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return Ra.TypeHierarchyPrepareRequest}});Object.defineProperty(f,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return Ra.TypeHierarchySubtypesRequest}});Object.defineProperty(f,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return Ra.TypeHierarchySupertypesRequest}});var rf=Vl();Object.defineProperty(f,"InlineValueRequest",{enumerable:!0,get:function(){return rf.InlineValueRequest}});Object.defineProperty(f,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return rf.InlineValueRefreshRequest}});var Da=Kl();Object.defineProperty(f,"InlayHintRequest",{enumerable:!0,get:function(){return Da.InlayHintRequest}});Object.defineProperty(f,"InlayHintResolveRequest",{enumerable:!0,get:function(){return Da.InlayHintResolveRequest}});Object.defineProperty(f,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return Da.InlayHintRefreshRequest}});var wr=Jl();Object.defineProperty(f,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return wr.DiagnosticServerCancellationData}});Object.defineProperty(f,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return wr.DocumentDiagnosticReportKind}});Object.defineProperty(f,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return wr.DocumentDiagnosticRequest}});Object.defineProperty(f,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return wr.WorkspaceDiagnosticRequest}});Object.defineProperty(f,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return wr.DiagnosticRefreshRequest}});var kt=Zl();Object.defineProperty(f,"NotebookCellKind",{enumerable:!0,get:function(){return kt.NotebookCellKind}});Object.defineProperty(f,"ExecutionSummary",{enumerable:!0,get:function(){return kt.ExecutionSummary}});Object.defineProperty(f,"NotebookCell",{enumerable:!0,get:function(){return kt.NotebookCell}});Object.defineProperty(f,"NotebookDocument",{enumerable:!0,get:function(){return kt.NotebookDocument}});Object.defineProperty(f,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return kt.NotebookDocumentSyncRegistrationType}});Object.defineProperty(f,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return kt.DidOpenNotebookDocumentNotification}});Object.defineProperty(f,"NotebookCellArrayChange",{enumerable:!0,get:function(){return kt.NotebookCellArrayChange}});Object.defineProperty(f,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return kt.DidChangeNotebookDocumentNotification}});Object.defineProperty(f,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return kt.DidSaveNotebookDocumentNotification}});Object.defineProperty(f,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return kt.DidCloseNotebookDocumentNotification}});var of;(function(e){function t(n){let r=n;return We.string(r.language)||We.string(r.scheme)||We.string(r.pattern)}e.is=t})(of=f.TextDocumentFilter||(f.TextDocumentFilter={}));var sf;(function(e){function t(n){let r=n;return We.objectLiteral(r)&&(We.string(r.notebookType)||We.string(r.scheme)||We.string(r.pattern))}e.is=t})(sf=f.NotebookDocumentFilter||(f.NotebookDocumentFilter={}));var af;(function(e){function t(n){let r=n;return We.objectLiteral(r)&&(We.string(r.notebook)||sf.is(r.notebook))&&(r.language===void 0||We.string(r.language))}e.is=t})(af=f.NotebookCellTextDocumentFilter||(f.NotebookCellTextDocumentFilter={}));var cf;(function(e){function t(n){if(!Array.isArray(n))return!1;for(let r of n)if(!We.string(r)&&!of.is(r)&&!af.is(r))return!1;return!0}e.is=t})(cf=f.DocumentSelector||(f.DocumentSelector={}));var py;(function(e){e.method="client/registerCapability",e.messageDirection=E.MessageDirection.serverToClient,e.type=new E.ProtocolRequestType(e.method)})(py=f.RegistrationRequest||(f.RegistrationRequest={}));var hy;(function(e){e.method="client/unregisterCapability",e.messageDirection=E.MessageDirection.serverToClient,e.type=new E.ProtocolRequestType(e.method)})(hy=f.UnregistrationRequest||(f.UnregistrationRequest={}));var my;(function(e){e.Create="create",e.Rename="rename",e.Delete="delete"})(my=f.ResourceOperationKind||(f.ResourceOperationKind={}));var gy;(function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"})(gy=f.FailureHandlingKind||(f.FailureHandlingKind={}));var yy;(function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"})(yy=f.PositionEncodingKind||(f.PositionEncodingKind={}));var vy;(function(e){function t(n){let r=n;return r&&We.string(r.id)&&r.id.length>0}e.hasId=t})(vy=f.StaticRegistrationOptions||(f.StaticRegistrationOptions={}));var by;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||cf.is(r.documentSelector))}e.is=t})(by=f.TextDocumentRegistrationOptions||(f.TextDocumentRegistrationOptions={}));var _y;(function(e){function t(r){let i=r;return We.objectLiteral(i)&&(i.workDoneProgress===void 0||We.boolean(i.workDoneProgress))}e.is=t;function n(r){let i=r;return i&&We.boolean(i.workDoneProgress)}e.hasWorkDoneProgress=n})(_y=f.WorkDoneProgressOptions||(f.WorkDoneProgressOptions={}));var Ry;(function(e){e.method="initialize",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(Ry=f.InitializeRequest||(f.InitializeRequest={}));var Dy;(function(e){e.unknownProtocolVersion=1})(Dy=f.InitializeErrorCodes||(f.InitializeErrorCodes={}));var Cy;(function(e){e.method="initialized",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolNotificationType(e.method)})(Cy=f.InitializedNotification||(f.InitializedNotification={}));var Py;(function(e){e.method="shutdown",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType0(e.method)})(Py=f.ShutdownRequest||(f.ShutdownRequest={}));var Ty;(function(e){e.method="exit",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolNotificationType0(e.method)})(Ty=f.ExitNotification||(f.ExitNotification={}));var wy;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolNotificationType(e.method)})(wy=f.DidChangeConfigurationNotification||(f.DidChangeConfigurationNotification={}));var xy;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4})(xy=f.MessageType||(f.MessageType={}));var Sy;(function(e){e.method="window/showMessage",e.messageDirection=E.MessageDirection.serverToClient,e.type=new E.ProtocolNotificationType(e.method)})(Sy=f.ShowMessageNotification||(f.ShowMessageNotification={}));var ky;(function(e){e.method="window/showMessageRequest",e.messageDirection=E.MessageDirection.serverToClient,e.type=new E.ProtocolRequestType(e.method)})(ky=f.ShowMessageRequest||(f.ShowMessageRequest={}));var Ay;(function(e){e.method="window/logMessage",e.messageDirection=E.MessageDirection.serverToClient,e.type=new E.ProtocolNotificationType(e.method)})(Ay=f.LogMessageNotification||(f.LogMessageNotification={}));var Ny;(function(e){e.method="telemetry/event",e.messageDirection=E.MessageDirection.serverToClient,e.type=new E.ProtocolNotificationType(e.method)})(Ny=f.TelemetryEventNotification||(f.TelemetryEventNotification={}));var qy;(function(e){e.None=0,e.Full=1,e.Incremental=2})(qy=f.TextDocumentSyncKind||(f.TextDocumentSyncKind={}));var Ey;(function(e){e.method="textDocument/didOpen",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolNotificationType(e.method)})(Ey=f.DidOpenTextDocumentNotification||(f.DidOpenTextDocumentNotification={}));var Oy;(function(e){function t(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")}e.isIncremental=t;function n(r){let i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0}e.isFull=n})(Oy=f.TextDocumentContentChangeEvent||(f.TextDocumentContentChangeEvent={}));var My;(function(e){e.method="textDocument/didChange",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolNotificationType(e.method)})(My=f.DidChangeTextDocumentNotification||(f.DidChangeTextDocumentNotification={}));var Fy;(function(e){e.method="textDocument/didClose",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolNotificationType(e.method)})(Fy=f.DidCloseTextDocumentNotification||(f.DidCloseTextDocumentNotification={}));var Ly;(function(e){e.method="textDocument/didSave",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolNotificationType(e.method)})(Ly=f.DidSaveTextDocumentNotification||(f.DidSaveTextDocumentNotification={}));var Iy;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(Iy=f.TextDocumentSaveReason||(f.TextDocumentSaveReason={}));var jy;(function(e){e.method="textDocument/willSave",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolNotificationType(e.method)})(jy=f.WillSaveTextDocumentNotification||(f.WillSaveTextDocumentNotification={}));var Wy;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(Wy=f.WillSaveTextDocumentWaitUntilRequest||(f.WillSaveTextDocumentWaitUntilRequest={}));var Hy;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolNotificationType(e.method)})(Hy=f.DidChangeWatchedFilesNotification||(f.DidChangeWatchedFilesNotification={}));var Uy;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(Uy=f.FileChangeType||(f.FileChangeType={}));var By;(function(e){function t(n){let r=n;return We.objectLiteral(r)&&(ef.URI.is(r.baseUri)||ef.WorkspaceFolder.is(r.baseUri))&&We.string(r.pattern)}e.is=t})(By=f.RelativePattern||(f.RelativePattern={}));var $y;(function(e){e.Create=1,e.Change=2,e.Delete=4})($y=f.WatchKind||(f.WatchKind={}));var zy;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=E.MessageDirection.serverToClient,e.type=new E.ProtocolNotificationType(e.method)})(zy=f.PublishDiagnosticsNotification||(f.PublishDiagnosticsNotification={}));var Yy;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Yy=f.CompletionTriggerKind||(f.CompletionTriggerKind={}));var Vy;(function(e){e.method="textDocument/completion",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(Vy=f.CompletionRequest||(f.CompletionRequest={}));var Ky;(function(e){e.method="completionItem/resolve",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(Ky=f.CompletionResolveRequest||(f.CompletionResolveRequest={}));var Qy;(function(e){e.method="textDocument/hover",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(Qy=f.HoverRequest||(f.HoverRequest={}));var Jy;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(Jy=f.SignatureHelpTriggerKind||(f.SignatureHelpTriggerKind={}));var Gy;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(Gy=f.SignatureHelpRequest||(f.SignatureHelpRequest={}));var Xy;(function(e){e.method="textDocument/definition",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(Xy=f.DefinitionRequest||(f.DefinitionRequest={}));var Zy;(function(e){e.method="textDocument/references",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(Zy=f.ReferencesRequest||(f.ReferencesRequest={}));var ev;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(ev=f.DocumentHighlightRequest||(f.DocumentHighlightRequest={}));var tv;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(tv=f.DocumentSymbolRequest||(f.DocumentSymbolRequest={}));var nv;(function(e){e.method="textDocument/codeAction",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(nv=f.CodeActionRequest||(f.CodeActionRequest={}));var rv;(function(e){e.method="codeAction/resolve",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(rv=f.CodeActionResolveRequest||(f.CodeActionResolveRequest={}));var iv;(function(e){e.method="workspace/symbol",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(iv=f.WorkspaceSymbolRequest||(f.WorkspaceSymbolRequest={}));var ov;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(ov=f.WorkspaceSymbolResolveRequest||(f.WorkspaceSymbolResolveRequest={}));var sv;(function(e){e.method="textDocument/codeLens",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(sv=f.CodeLensRequest||(f.CodeLensRequest={}));var av;(function(e){e.method="codeLens/resolve",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(av=f.CodeLensResolveRequest||(f.CodeLensResolveRequest={}));var cv;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=E.MessageDirection.serverToClient,e.type=new E.ProtocolRequestType0(e.method)})(cv=f.CodeLensRefreshRequest||(f.CodeLensRefreshRequest={}));var uv;(function(e){e.method="textDocument/documentLink",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(uv=f.DocumentLinkRequest||(f.DocumentLinkRequest={}));var lv;(function(e){e.method="documentLink/resolve",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(lv=f.DocumentLinkResolveRequest||(f.DocumentLinkResolveRequest={}));var fv;(function(e){e.method="textDocument/formatting",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(fv=f.DocumentFormattingRequest||(f.DocumentFormattingRequest={}));var dv;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(dv=f.DocumentRangeFormattingRequest||(f.DocumentRangeFormattingRequest={}));var pv;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(pv=f.DocumentOnTypeFormattingRequest||(f.DocumentOnTypeFormattingRequest={}));var hv;(function(e){e.Identifier=1})(hv=f.PrepareSupportDefaultBehavior||(f.PrepareSupportDefaultBehavior={}));var mv;(function(e){e.method="textDocument/rename",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(mv=f.RenameRequest||(f.RenameRequest={}));var gv;(function(e){e.method="textDocument/prepareRename",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(gv=f.PrepareRenameRequest||(f.PrepareRenameRequest={}));var yv;(function(e){e.method="workspace/executeCommand",e.messageDirection=E.MessageDirection.clientToServer,e.type=new E.ProtocolRequestType(e.method)})(yv=f.ExecuteCommandRequest||(f.ExecuteCommandRequest={}));var vv;(function(e){e.method="workspace/applyEdit",e.messageDirection=E.MessageDirection.serverToClient,e.type=new E.ProtocolRequestType("workspace/applyEdit")})(vv=f.ApplyWorkspaceEditRequest||(f.ApplyWorkspaceEditRequest={}))});var ff=N(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.createProtocolConnection=void 0;var lf=bn();function bv(e,t,n,r){return lf.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,lf.createMessageConnection)(e,t,n,r)}Di.createProtocolConnection=bv});var df=N(Qe=>{"use strict";var _v=Qe&&Qe.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Ci=Qe&&Qe.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&_v(t,e,n)};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.LSPErrorCodes=Qe.createProtocolConnection=void 0;Ci(bn(),Qe);Ci(mi(),Qe);Ci(_e(),Qe);Ci(uf(),Qe);var Rv=ff();Object.defineProperty(Qe,"createProtocolConnection",{enumerable:!0,get:function(){return Rv.createProtocolConnection}});var Dv;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(Dv=Qe.LSPErrorCodes||(Qe.LSPErrorCodes={}))});var Ne=N(At=>{"use strict";var Cv=At&&At.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),pf=At&&At.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Cv(t,e,n)};Object.defineProperty(At,"__esModule",{value:!0});At.createProtocolConnection=void 0;var Pv=fa();pf(fa(),At);pf(df(),At);function Tv(e,t,n,r){return(0,Pv.createMessageConnection)(e,t,n,r)}At.createProtocolConnection=Tv});var Pa=N(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.SemanticTokensBuilder=en.SemanticTokensDiff=en.SemanticTokensFeature=void 0;var Pi=Ne(),wv=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(Pi.SemanticTokensRefreshRequest.type),on:t=>{let n=Pi.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=Pi.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=Pi.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};en.SemanticTokensFeature=wv;var Ti=class{constructor(t,n){this.originalSequence=t,this.modifiedSequence=n}computeDiff(){let t=this.originalSequence.length,n=this.modifiedSequence.length,r=0;for(;r<n&&r<t&&this.originalSequence[r]===this.modifiedSequence[r];)r++;if(r<n&&r<t){let i=t-1,o=n-1;for(;i>=r&&o>=r&&this.originalSequence[i]===this.modifiedSequence[o];)i--,o--;(i<r||o<r)&&(i++,o++);let s=i-r+1,u=this.modifiedSequence.slice(r,o+1);return u.length===1&&u[0]===this.originalSequence[i]?[{start:r,deleteCount:s-1}]:[{start:r,deleteCount:s,data:u}]}else return r<n?[{start:r,deleteCount:0,data:this.modifiedSequence.slice(r)}]:r<t?[{start:r,deleteCount:t-r}]:[]}};en.SemanticTokensDiff=Ti;var Ca=class{constructor(){this._prevData=void 0,this.initialize()}initialize(){this._id=Date.now(),this._prevLine=0,this._prevChar=0,this._data=[],this._dataLen=0}push(t,n,r,i,o){let s=t,u=n;this._dataLen>0&&(s-=this._prevLine,s===0&&(u-=this._prevChar)),this._data[this._dataLen++]=s,this._data[this._dataLen++]=u,this._data[this._dataLen++]=r,this._data[this._dataLen++]=i,this._data[this._dataLen++]=o,this._prevLine=t,this._prevChar=n}get id(){return this._id.toString()}previousResult(t){this.id===t&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return this._prevData!==void 0}buildEdits(){return this._prevData!==void 0?{resultId:this.id,edits:new Ti(this._prevData,this._data).computeDiff()}:this.build()}};en.SemanticTokensBuilder=Ca});var wa=N(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.TextDocuments=void 0;var Rn=Ne(),Ta=class{constructor(t){this._configuration=t,this._syncedDocuments=new Map,this._onDidChangeContent=new Rn.Emitter,this._onDidOpen=new Rn.Emitter,this._onDidClose=new Rn.Emitter,this._onDidSave=new Rn.Emitter,this._onWillSave=new Rn.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(t){this._willSaveWaitUntil=t}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(t){return this._syncedDocuments.get(t)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(t){t.__textDocumentSync=Rn.TextDocumentSyncKind.Incremental;let n=[];return n.push(t.onDidOpenTextDocument(r=>{let i=r.textDocument,o=this._configuration.create(i.uri,i.languageId,i.version,i.text);this._syncedDocuments.set(i.uri,o);let s=Object.freeze({document:o});this._onDidOpen.fire(s),this._onDidChangeContent.fire(s)})),n.push(t.onDidChangeTextDocument(r=>{let i=r.textDocument,o=r.contentChanges;if(o.length===0)return;let{version:s}=i;if(s==null)throw new Error(`Received document change event for ${i.uri} without valid version identifier`);let u=this._syncedDocuments.get(i.uri);u!==void 0&&(u=this._configuration.update(u,o,s),this._syncedDocuments.set(i.uri,u),this._onDidChangeContent.fire(Object.freeze({document:u})))})),n.push(t.onDidCloseTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&(this._syncedDocuments.delete(r.textDocument.uri),this._onDidClose.fire(Object.freeze({document:i})))})),n.push(t.onWillSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onWillSave.fire(Object.freeze({document:i,reason:r.reason}))})),n.push(t.onWillSaveTextDocumentWaitUntil((r,i)=>{let o=this._syncedDocuments.get(r.textDocument.uri);return o!==void 0&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:o,reason:r.reason}),i):[]})),n.push(t.onDidSaveTextDocument(r=>{let i=this._syncedDocuments.get(r.textDocument.uri);i!==void 0&&this._onDidSave.fire(Object.freeze({document:i}))})),Rn.Disposable.create(()=>{n.forEach(r=>r.dispose())})}};wi.TextDocuments=Ta});var Sa=N(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.NotebookDocuments=Yn.NotebookSyncFeature=void 0;var st=Ne(),hf=wa(),xv=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(st.DidOpenNotebookDocumentNotification.type,n=>{t(n)}),onDidChangeNotebookDocument:t=>this.connection.onNotification(st.DidChangeNotebookDocumentNotification.type,n=>{t(n)}),onDidSaveNotebookDocument:t=>this.connection.onNotification(st.DidSaveNotebookDocumentNotification.type,n=>{t(n)}),onDidCloseNotebookDocument:t=>this.connection.onNotification(st.DidCloseNotebookDocumentNotification.type,n=>{t(n)})}}};Yn.NotebookSyncFeature=xv;var tn=class{onDidOpenTextDocument(t){return this.openHandler=t,st.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,st.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,st.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return tn.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return tn.NULL_DISPOSE}onDidSaveTextDocument(){return tn.NULL_DISPOSE}};tn.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var xa=class{constructor(t){t instanceof hf.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new hf.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new st.Emitter,this._onDidChange=new st.Emitter,this._onDidSave=new st.Emitter,this._onDidClose=new st.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(t){return this._cellTextDocuments.get(t.document)}getNotebookDocument(t){return this.notebookDocuments.get(t)}getNotebookCell(t){let n=this.notebookCellMap.get(t);return n&&n[0]}findNotebookDocumentForCell(t){let n=typeof t=="string"?t:t.document,r=this.notebookCellMap.get(n);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(t){let n=new tn,r=[];return r.push(this.cellTextDocuments.listen(n)),r.push(t.notebooks.synchronization.onDidOpenNotebookDocument(i=>{this.notebookDocuments.set(i.notebookDocument.uri,i.notebookDocument);for(let o of i.cellTextDocuments)n.openTextDocument({textDocument:o});this.updateCellMap(i.notebookDocument),this._onDidOpen.fire(i.notebookDocument)})),r.push(t.notebooks.synchronization.onDidChangeNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o===void 0)return;o.version=i.notebookDocument.version;let s=o.metadata,u=!1,c=i.change;c.metadata!==void 0&&(u=!0,o.metadata=c.metadata);let p=[],m=[],v=[],C=[];if(c.cells!==void 0){let L=c.cells;if(L.structure!==void 0){let D=L.structure.array;if(o.cells.splice(D.start,D.deleteCount,...D.cells!==void 0?D.cells:[]),L.structure.didOpen!==void 0)for(let b of L.structure.didOpen)n.openTextDocument({textDocument:b}),p.push(b.uri);if(L.structure.didClose)for(let b of L.structure.didClose)n.closeTextDocument({textDocument:b}),m.push(b.uri)}if(L.data!==void 0){let D=new Map(L.data.map(b=>[b.document,b]));for(let b=0;b<=o.cells.length;b++){let q=D.get(o.cells[b].document);if(q!==void 0){let $=o.cells.splice(b,1,q);if(v.push({old:$[0],new:q}),D.delete(q.document),D.size===0)break}}}if(L.textContent!==void 0)for(let D of L.textContent)n.changeTextDocument({textDocument:D.document,contentChanges:D.changes}),C.push(D.document.uri)}this.updateCellMap(o);let P={notebookDocument:o};u&&(P.metadata={old:s,new:o.metadata});let w=[];for(let L of p)w.push(this.getNotebookCell(L));let A=[];for(let L of m)A.push(this.getNotebookCell(L));let B=[];for(let L of C)B.push(this.getNotebookCell(L));(w.length>0||A.length>0||v.length>0||B.length>0)&&(P.cells={added:w,removed:A,changed:{data:v,textContent:B}}),(P.metadata!==void 0||P.cells!==void 0)&&this._onDidChange.fire(P)})),r.push(t.notebooks.synchronization.onDidSaveNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);o!==void 0&&this._onDidSave.fire(o)})),r.push(t.notebooks.synchronization.onDidCloseNotebookDocument(i=>{let o=this.notebookDocuments.get(i.notebookDocument.uri);if(o!==void 0){this._onDidClose.fire(o);for(let s of i.cellTextDocuments)n.closeTextDocument({textDocument:s});this.notebookDocuments.delete(i.notebookDocument.uri);for(let s of o.cells)this.notebookCellMap.delete(s.document)}})),st.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};Yn.NotebookDocuments=xa});var ka=N(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.thenable=ke.typedArray=ke.stringArray=ke.array=ke.func=ke.error=ke.number=ke.string=ke.boolean=void 0;function Sv(e){return e===!0||e===!1}ke.boolean=Sv;function mf(e){return typeof e=="string"||e instanceof String}ke.string=mf;function kv(e){return typeof e=="number"||e instanceof Number}ke.number=kv;function Av(e){return e instanceof Error}ke.error=Av;function gf(e){return typeof e=="function"}ke.func=gf;function yf(e){return Array.isArray(e)}ke.array=yf;function Nv(e){return yf(e)&&e.every(t=>mf(t))}ke.stringArray=Nv;function qv(e,t){return Array.isArray(e)&&e.every(t)}ke.typedArray=qv;function Ev(e){return e&&gf(e.then)}ke.thenable=Ev});var Aa=N(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.generateUuid=at.parse=at.isUUID=at.v4=at.empty=void 0;var xr=class{constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},G=class extends xr{constructor(){super([G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),"-",G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),"-","4",G._randomHex(),G._randomHex(),G._randomHex(),"-",G._oneOf(G._timeHighBits),G._randomHex(),G._randomHex(),G._randomHex(),"-",G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex(),G._randomHex()].join(""))}static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return G._oneOf(G._chars)}};G._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];G._timeHighBits=["8","9","a","b"];at.empty=new xr("00000000-0000-0000-0000-000000000000");function vf(){return new G}at.v4=vf;var Ov=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function bf(e){return Ov.test(e)}at.isUUID=bf;function Mv(e){if(!bf(e))throw new Error("invalid uuid");return new xr(e)}at.parse=Mv;function Fv(){return vf().asHex()}at.generateUuid=Fv});var _f=N(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.attachPartialResult=rn.ProgressFeature=rn.attachWorkDone=void 0;var nn=Ne(),Lv=Aa(),Nt=class{constructor(t,n){this._connection=t,this._token=n,Nt.Instances.set(this._token,this)}begin(t,n,r,i){let o={kind:"begin",title:t,percentage:n,message:r,cancellable:i};this._connection.sendProgress(nn.WorkDoneProgress.type,this._token,o)}report(t,n){let r={kind:"report"};typeof t=="number"?(r.percentage=t,n!==void 0&&(r.message=n)):r.message=t,this._connection.sendProgress(nn.WorkDoneProgress.type,this._token,r)}done(){Nt.Instances.delete(this._token),this._connection.sendProgress(nn.WorkDoneProgress.type,this._token,{kind:"end"})}};Nt.Instances=new Map;var xi=class extends Nt{constructor(t,n){super(t,n),this._source=new nn.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Sr=class{constructor(){}begin(){}report(){}done(){}},Si=class extends Sr{constructor(){super(),this._source=new nn.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function Iv(e,t){if(t===void 0||t.workDoneToken===void 0)return new Sr;let n=t.workDoneToken;return delete t.workDoneToken,new Nt(e,n)}rn.attachWorkDone=Iv;var jv=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(nn.WorkDoneProgressCancelNotification.type,n=>{let r=Nt.Instances.get(n.token);(r instanceof xi||r instanceof Si)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new Sr:new Nt(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,Lv.generateUuid)();return this.connection.sendRequest(nn.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new xi(this.connection,t))}else return Promise.resolve(new Si)}};rn.ProgressFeature=jv;var Na;(function(e){e.type=new nn.ProgressType})(Na||(Na={}));var qa=class{constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(Na.type,this._token,t)}};function Wv(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new qa(e,n)}rn.attachPartialResult=Wv});var Rf=N(ki=>{"use strict";Object.defineProperty(ki,"__esModule",{value:!0});ki.ConfigurationFeature=void 0;var Hv=Ne(),Uv=ka(),Bv=e=>class extends e{getConfiguration(t){return t?Uv.string(t)?this._getConfiguration({section:t}):this._getConfiguration(t):this._getConfiguration({})}_getConfiguration(t){let n={items:Array.isArray(t)?t:[t]};return this.connection.sendRequest(Hv.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};ki.ConfigurationFeature=Bv});var Df=N(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.WorkspaceFoldersFeature=void 0;var Ai=Ne(),$v=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new Ai.Emitter,this.connection.onNotification(Ai.DidChangeWorkspaceFoldersNotification.type,r=>{this._onDidChangeWorkspaceFolders.fire(r.event)}))}fillServerCapabilities(t){super.fillServerCapabilities(t);let n=t.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=n===!0||typeof n=="string"}getWorkspaceFolders(){return this.connection.sendRequest(Ai.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return!this._notificationIsAutoRegistered&&!this._unregistration&&(this._unregistration=this.connection.client.register(Ai.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};Ni.WorkspaceFoldersFeature=$v});var Cf=N(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.CallHierarchyFeature=void 0;var Ea=Ne(),zv=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(Ea.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=Ea.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=Ea.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};qi.CallHierarchyFeature=zv});var Pf=N(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.ShowDocumentFeature=void 0;var Yv=Ne(),Vv=e=>class extends e{showDocument(t){return this.connection.sendRequest(Yv.ShowDocumentRequest.type,t)}};Ei.ShowDocumentFeature=Vv});var Tf=N(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.FileOperationsFeature=void 0;var Vn=Ne(),Kv=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(Vn.DidCreateFilesNotification.type,n=>{t(n)})}onDidRenameFiles(t){return this.connection.onNotification(Vn.DidRenameFilesNotification.type,n=>{t(n)})}onDidDeleteFiles(t){return this.connection.onNotification(Vn.DidDeleteFilesNotification.type,n=>{t(n)})}onWillCreateFiles(t){return this.connection.onRequest(Vn.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(Vn.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(Vn.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Oi.FileOperationsFeature=Kv});var wf=N(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.LinkedEditingRangeFeature=void 0;var Qv=Ne(),Jv=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(Qv.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};Mi.LinkedEditingRangeFeature=Jv});var xf=N(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.TypeHierarchyFeature=void 0;var Oa=Ne(),Gv=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(Oa.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=Oa.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=Oa.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Fi.TypeHierarchyFeature=Gv});var kf=N(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.InlineValueFeature=void 0;var Sf=Ne(),Xv=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(Sf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(Sf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Li.InlineValueFeature=Xv});var Af=N(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.InlayHintFeature=void 0;var Ma=Ne(),Zv=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Ma.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(Ma.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(Ma.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};Ii.InlayHintFeature=Zv});var Nf=N(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.DiagnosticFeature=void 0;var kr=Ne(),eb=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(kr.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(kr.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(kr.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(kr.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(kr.WorkspaceDiagnosticRequest.partialResult,n)))}}};ji.DiagnosticFeature=eb});var qf=N(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});Wi.MonikerFeature=void 0;var tb=Ne(),nb=e=>class extends e{get moniker(){return{on:t=>{let n=tb.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Wi.MonikerFeature=nb});var zf=N(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.createConnection=ne.combineFeatures=ne.combineNotebooksFeatures=ne.combineLanguagesFeatures=ne.combineWorkspaceFeatures=ne.combineWindowFeatures=ne.combineClientFeatures=ne.combineTracerFeatures=ne.combineTelemetryFeatures=ne.combineConsoleFeatures=ne._NotebooksImpl=ne._LanguagesImpl=ne.BulkUnregistration=ne.BulkRegistration=ne.ErrorMessageTracker=void 0;var M=Ne(),ct=ka(),La=Aa(),V=_f(),rb=Rf(),ib=Df(),ob=Cf(),sb=Pa(),ab=Pf(),cb=Tf(),ub=wf(),lb=xf(),fb=kf(),db=Af(),pb=Nf(),hb=Sa(),mb=qf();function Fa(e){if(e!==null)return e}var Ia=class{constructor(){this._messages=Object.create(null)}add(t){let n=this._messages[t];n||(n=0),n++,this._messages[t]=n}sendErrors(t){Object.keys(this._messages).forEach(n=>{t.window.showErrorMessage(n)})}};ne.ErrorMessageTracker=Ia;var Hi=class{constructor(){}rawAttach(t){this._rawConnection=t}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(t){}initialize(t){}error(t){this.send(M.MessageType.Error,t)}warn(t){this.send(M.MessageType.Warning,t)}info(t){this.send(M.MessageType.Info,t)}log(t){this.send(M.MessageType.Log,t)}send(t,n){this._rawConnection&&this._rawConnection.sendNotification(M.LogMessageNotification.type,{type:t,message:n}).catch(()=>{(0,M.RAL)().console.error("Sending log message failed")})}},ja=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}showErrorMessage(t,...n){let r={type:M.MessageType.Error,message:t,actions:n};return this.connection.sendRequest(M.ShowMessageRequest.type,r).then(Fa)}showWarningMessage(t,...n){let r={type:M.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(M.ShowMessageRequest.type,r).then(Fa)}showInformationMessage(t,...n){let r={type:M.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(M.ShowMessageRequest.type,r).then(Fa)}},Ef=(0,ab.ShowDocumentFeature)((0,V.ProgressFeature)(ja)),gb;(function(e){function t(){return new Ui}e.create=t})(gb=ne.BulkRegistration||(ne.BulkRegistration={}));var Ui=class{constructor(){this._registrations=[],this._registered=new Set}add(t,n){let r=ct.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let i=La.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},yb;(function(e){function t(){return new Ar(void 0,[])}e.create=t})(yb=ne.BulkUnregistration||(ne.BulkUnregistration={}));var Ar=class{constructor(t,n){this._connection=t,this._unregistrations=new Map,n.forEach(r=>{this._unregistrations.set(r.method,r)})}get isAttached(){return!!this._connection}attach(t){this._connection=t}add(t){this._unregistrations.set(t.method,t)}dispose(){let t=[];for(let r of this._unregistrations.values())t.push(r);let n={unregisterations:t};this._connection.sendRequest(M.UnregistrationRequest.type,n).catch(()=>{this._connection.console.info("Bulk unregistration failed.")})}disposeSingle(t){let n=ct.string(t)?t:t.method,r=this._unregistrations.get(n);if(!r)return!1;let i={unregisterations:[r]};return this._connection.sendRequest(M.UnregistrationRequest.type,i).then(()=>{this._unregistrations.delete(n)},o=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)}),!0}},Bi=class{attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}register(t,n,r){return t instanceof Ui?this.registerMany(t):t instanceof Ar?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let i=ct.string(n)?n:n.method,o=La.generateUuid(),s={registrations:[{id:o,method:i,registerOptions:r||{}}]};return t.isAttached||t.attach(this.connection),this.connection.sendRequest(M.RegistrationRequest.type,s).then(u=>(t.add({id:o,method:i}),t),u=>(this.connection.console.info(`Registering request handler for ${i} failed.`),Promise.reject(u)))}registerSingle2(t,n){let r=ct.string(t)?t:t.method,i=La.generateUuid(),o={registrations:[{id:i,method:r,registerOptions:n||{}}]};return this.connection.sendRequest(M.RegistrationRequest.type,o).then(s=>M.Disposable.create(()=>{this.unregisterSingle(i,r).catch(()=>{this.connection.console.info(`Un-registering capability with id ${i} failed.`)})}),s=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(s)))}unregisterSingle(t,n){let r={unregisterations:[{id:t,method:n}]};return this.connection.sendRequest(M.UnregistrationRequest.type,r).catch(()=>{this.connection.console.info(`Un-registering request handler for ${t} failed.`)})}registerMany(t){let n=t.asRegistrationParams();return this.connection.sendRequest(M.RegistrationRequest.type,n).then(()=>new Ar(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Wa=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}applyEdit(t){function n(i){return i&&!!i.edit}let r=n(t)?t:{edit:t};return this.connection.sendRequest(M.ApplyWorkspaceEditRequest.type,r)}},Of=(0,cb.FileOperationsFeature)((0,ib.WorkspaceFoldersFeature)((0,rb.ConfigurationFeature)(Wa))),$i=class{constructor(){this._trace=M.Trace.Off}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}set trace(t){this._trace=t}log(t,n){this._trace!==M.Trace.Off&&this.connection.sendNotification(M.LogTraceNotification.type,{message:t,verbose:this._trace===M.Trace.Verbose?n:void 0}).catch(()=>{})}},zi=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}logEvent(t){this.connection.sendNotification(M.TelemetryEventNotification.type,t).catch(()=>{this.connection.console.log("Sending TelemetryEventNotification failed")})}},Yi=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,V.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,V.attachPartialResult)(this.connection,n)}};ne._LanguagesImpl=Yi;var Mf=(0,mb.MonikerFeature)((0,pb.DiagnosticFeature)((0,db.InlayHintFeature)((0,fb.InlineValueFeature)((0,lb.TypeHierarchyFeature)((0,ub.LinkedEditingRangeFeature)((0,sb.SemanticTokensFeature)((0,ob.CallHierarchyFeature)(Yi)))))))),Vi=class{constructor(){}attach(t){this._connection=t}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(t){}fillServerCapabilities(t){}attachWorkDoneProgress(t){return(0,V.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,V.attachPartialResult)(this.connection,n)}};ne._NotebooksImpl=Vi;var Ff=(0,hb.NotebookSyncFeature)(Vi);function Lf(e,t){return function(n){return t(e(n))}}ne.combineConsoleFeatures=Lf;function If(e,t){return function(n){return t(e(n))}}ne.combineTelemetryFeatures=If;function jf(e,t){return function(n){return t(e(n))}}ne.combineTracerFeatures=jf;function Wf(e,t){return function(n){return t(e(n))}}ne.combineClientFeatures=Wf;function Hf(e,t){return function(n){return t(e(n))}}ne.combineWindowFeatures=Hf;function Uf(e,t){return function(n){return t(e(n))}}ne.combineWorkspaceFeatures=Uf;function Bf(e,t){return function(n){return t(e(n))}}ne.combineLanguagesFeatures=Bf;function $f(e,t){return function(n){return t(e(n))}}ne.combineNotebooksFeatures=$f;function vb(e,t){function n(i,o,s){return i&&o?s(i,o):i||o}return{__brand:"features",console:n(e.console,t.console,Lf),tracer:n(e.tracer,t.tracer,jf),telemetry:n(e.telemetry,t.telemetry,If),client:n(e.client,t.client,Wf),window:n(e.window,t.window,Hf),workspace:n(e.workspace,t.workspace,Uf),languages:n(e.languages,t.languages,Bf),notebooks:n(e.notebooks,t.notebooks,$f)}}ne.combineFeatures=vb;function bb(e,t,n){let r=n&&n.console?new(n.console(Hi)):new Hi,i=e(r);r.rawAttach(i);let o=n&&n.tracer?new(n.tracer($i)):new $i,s=n&&n.telemetry?new(n.telemetry(zi)):new zi,u=n&&n.client?new(n.client(Bi)):new Bi,c=n&&n.window?new(n.window(Ef)):new Ef,p=n&&n.workspace?new(n.workspace(Of)):new Of,m=n&&n.languages?new(n.languages(Mf)):new Mf,v=n&&n.notebooks?new(n.notebooks(Ff)):new Ff,C=[r,o,s,u,c,p,m,v];function P(D){return D instanceof Promise?D:ct.thenable(D)?new Promise((b,q)=>{D.then($=>b($),$=>q($))}):Promise.resolve(D)}let w,A,B,L={listen:()=>i.listen(),sendRequest:(D,...b)=>i.sendRequest(ct.string(D)?D:D.method,...b),onRequest:(D,b)=>i.onRequest(D,b),sendNotification:(D,b)=>{let q=ct.string(D)?D:D.method;return arguments.length===1?i.sendNotification(q):i.sendNotification(q,b)},onNotification:(D,b)=>i.onNotification(D,b),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:D=>(A=D,{dispose:()=>{A=void 0}}),onInitialized:D=>i.onNotification(M.InitializedNotification.type,D),onShutdown:D=>(w=D,{dispose:()=>{w=void 0}}),onExit:D=>(B=D,{dispose:()=>{B=void 0}}),get console(){return r},get telemetry(){return s},get tracer(){return o},get client(){return u},get window(){return c},get workspace(){return p},get languages(){return m},get notebooks(){return v},onDidChangeConfiguration:D=>i.onNotification(M.DidChangeConfigurationNotification.type,D),onDidChangeWatchedFiles:D=>i.onNotification(M.DidChangeWatchedFilesNotification.type,D),__textDocumentSync:void 0,onDidOpenTextDocument:D=>i.onNotification(M.DidOpenTextDocumentNotification.type,D),onDidChangeTextDocument:D=>i.onNotification(M.DidChangeTextDocumentNotification.type,D),onDidCloseTextDocument:D=>i.onNotification(M.DidCloseTextDocumentNotification.type,D),onWillSaveTextDocument:D=>i.onNotification(M.WillSaveTextDocumentNotification.type,D),onWillSaveTextDocumentWaitUntil:D=>i.onRequest(M.WillSaveTextDocumentWaitUntilRequest.type,D),onDidSaveTextDocument:D=>i.onNotification(M.DidSaveTextDocumentNotification.type,D),sendDiagnostics:D=>i.sendNotification(M.PublishDiagnosticsNotification.type,D),onHover:D=>i.onRequest(M.HoverRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),void 0)),onCompletion:D=>i.onRequest(M.CompletionRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onCompletionResolve:D=>i.onRequest(M.CompletionResolveRequest.type,D),onSignatureHelp:D=>i.onRequest(M.SignatureHelpRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),void 0)),onDeclaration:D=>i.onRequest(M.DeclarationRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onDefinition:D=>i.onRequest(M.DefinitionRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onTypeDefinition:D=>i.onRequest(M.TypeDefinitionRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onImplementation:D=>i.onRequest(M.ImplementationRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onReferences:D=>i.onRequest(M.ReferencesRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onDocumentHighlight:D=>i.onRequest(M.DocumentHighlightRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onDocumentSymbol:D=>i.onRequest(M.DocumentSymbolRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onWorkspaceSymbol:D=>i.onRequest(M.WorkspaceSymbolRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onWorkspaceSymbolResolve:D=>i.onRequest(M.WorkspaceSymbolResolveRequest.type,D),onCodeAction:D=>i.onRequest(M.CodeActionRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onCodeActionResolve:D=>i.onRequest(M.CodeActionResolveRequest.type,(b,q)=>D(b,q)),onCodeLens:D=>i.onRequest(M.CodeLensRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onCodeLensResolve:D=>i.onRequest(M.CodeLensResolveRequest.type,(b,q)=>D(b,q)),onDocumentFormatting:D=>i.onRequest(M.DocumentFormattingRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),void 0)),onDocumentRangeFormatting:D=>i.onRequest(M.DocumentRangeFormattingRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),void 0)),onDocumentOnTypeFormatting:D=>i.onRequest(M.DocumentOnTypeFormattingRequest.type,(b,q)=>D(b,q)),onRenameRequest:D=>i.onRequest(M.RenameRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),void 0)),onPrepareRename:D=>i.onRequest(M.PrepareRenameRequest.type,(b,q)=>D(b,q)),onDocumentLinks:D=>i.onRequest(M.DocumentLinkRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onDocumentLinkResolve:D=>i.onRequest(M.DocumentLinkResolveRequest.type,(b,q)=>D(b,q)),onDocumentColor:D=>i.onRequest(M.DocumentColorRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onColorPresentation:D=>i.onRequest(M.ColorPresentationRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onFoldingRanges:D=>i.onRequest(M.FoldingRangeRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onSelectionRanges:D=>i.onRequest(M.SelectionRangeRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),(0,V.attachPartialResult)(i,b))),onExecuteCommand:D=>i.onRequest(M.ExecuteCommandRequest.type,(b,q)=>D(b,q,(0,V.attachWorkDone)(i,b),void 0)),dispose:()=>i.dispose()};for(let D of C)D.attach(L);return i.onRequest(M.InitializeRequest.type,D=>{t.initialize(D),ct.string(D.trace)&&(o.trace=M.Trace.fromString(D.trace));for(let b of C)b.initialize(D.capabilities);if(A){let b=A(D,new M.CancellationTokenSource().token,(0,V.attachWorkDone)(i,D),void 0);return P(b).then(q=>{if(q instanceof M.ResponseError)return q;let $=q;$||($={capabilities:{}});let Z=$.capabilities;Z||(Z={},$.capabilities=Z),Z.textDocumentSync===void 0||Z.textDocumentSync===null?Z.textDocumentSync=ct.number(L.__textDocumentSync)?L.__textDocumentSync:M.TextDocumentSyncKind.None:!ct.number(Z.textDocumentSync)&&!ct.number(Z.textDocumentSync.change)&&(Z.textDocumentSync.change=ct.number(L.__textDocumentSync)?L.__textDocumentSync:M.TextDocumentSyncKind.None);for(let ue of C)ue.fillServerCapabilities(Z);return $})}else{let b={capabilities:{textDocumentSync:M.TextDocumentSyncKind.None}};for(let q of C)q.fillServerCapabilities(b.capabilities);return b}}),i.onRequest(M.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,w)return w(new M.CancellationTokenSource().token)}),i.onNotification(M.ExitNotification.type,()=>{try{B&&B()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}}),i.onNotification(M.SetTraceNotification.type,D=>{o.trace=M.Trace.fromString(D.value)}),L}ne.createConnection=bb});var Ha=N(He=>{"use strict";var _b=He&&He.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Yf=He&&He.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&_b(t,e,n)};Object.defineProperty(He,"__esModule",{value:!0});He.ProposedFeatures=He.NotebookDocuments=He.TextDocuments=He.SemanticTokensBuilder=void 0;var Rb=Pa();Object.defineProperty(He,"SemanticTokensBuilder",{enumerable:!0,get:function(){return Rb.SemanticTokensBuilder}});Yf(Ne(),He);var Db=wa();Object.defineProperty(He,"TextDocuments",{enumerable:!0,get:function(){return Db.TextDocuments}});var Cb=Sa();Object.defineProperty(He,"NotebookDocuments",{enumerable:!0,get:function(){return Cb.NotebookDocuments}});Yf(zf(),He);var Pb;(function(e){e.all={__brand:"features"}})(Pb=He.ProposedFeatures||(He.ProposedFeatures={}))});var Kf=N((XR,Vf)=>{"use strict";Vf.exports=Ne()});var Gf=N(qt=>{"use strict";var Tb=qt&&qt.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Jf=qt&&qt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Tb(t,e,n)};Object.defineProperty(qt,"__esModule",{value:!0});qt.createConnection=void 0;var Ki=Ha();Jf(Kf(),qt);Jf(Ha(),qt);var Qf=!1,wb={initialize:e=>{},get shutdownReceived(){return Qf},set shutdownReceived(e){Qf=e},exit:e=>{}};function xb(e,t,n,r){let i,o,s,u;e!==void 0&&e.__brand==="features"&&(i=e,e=t,t=n,n=r),Ki.ConnectionStrategy.is(e)||Ki.ConnectionOptions.is(e)?u=e:(o=e,s=t,u=n);let c=p=>(0,Ki.createProtocolConnection)(o,s,p,u);return(0,Ki.createConnection)(c,wb,i)}qt.createConnection=xb});var on=N((eD,Xf)=>{"use strict";Xf.exports=Gf()});var Ga=N((VD,dd)=>{"use strict";function Et(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function fd(e,t){for(var n="",r=0,i=-1,o=0,s,u=0;u<=e.length;++u){if(u<e.length)s=e.charCodeAt(u);else{if(s===47)break;s=47}if(s===47){if(!(i===u-1||o===1))if(i!==u-1&&o===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var c=n.lastIndexOf("/");if(c!==n.length-1){c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=u,o=0;continue}}else if(n.length===2||n.length===1){n="",r=0,i=u,o=0;continue}}t&&(n.length>0?n+="/..":n="..",r=2)}else n.length>0?n+="/"+e.slice(i+1,u):n=e.slice(i+1,u),r=u-i-1;i=u,o=0}else s===46&&o!==-1?++o:o=-1}return n}function s0(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}var Jn={resolve:function(){for(var t="",n=!1,r,i=arguments.length-1;i>=-1&&!n;i--){var o;i>=0?o=arguments[i]:(r===void 0&&(r=process.cwd()),o=r),Et(o),o.length!==0&&(t=o+"/"+t,n=o.charCodeAt(0)===47)}return t=fd(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(Et(t),t.length===0)return".";var n=t.charCodeAt(0)===47,r=t.charCodeAt(t.length-1)===47;return t=fd(t,!n),t.length===0&&!n&&(t="."),t.length>0&&r&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return Et(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,n=0;n<arguments.length;++n){var r=arguments[n];Et(r),r.length>0&&(t===void 0?t=r:t+="/"+r)}return t===void 0?".":Jn.normalize(t)},relative:function(t,n){if(Et(t),Et(n),t===n||(t=Jn.resolve(t),n=Jn.resolve(n),t===n))return"";for(var r=1;r<t.length&&t.charCodeAt(r)===47;++r);for(var i=t.length,o=i-r,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var u=n.length,c=u-s,p=o<c?o:c,m=-1,v=0;v<=p;++v){if(v===p){if(c>p){if(n.charCodeAt(s+v)===47)return n.slice(s+v+1);if(v===0)return n.slice(s+v)}else o>p&&(t.charCodeAt(r+v)===47?m=v:v===0&&(m=0));break}var C=t.charCodeAt(r+v),P=n.charCodeAt(s+v);if(C!==P)break;C===47&&(m=v)}var w="";for(v=r+m+1;v<=i;++v)(v===i||t.charCodeAt(v)===47)&&(w.length===0?w+="..":w+="/..");return w.length>0?w+n.slice(s+m):(s+=m,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(Et(t),t.length===0)return".";for(var n=t.charCodeAt(0),r=n===47,i=-1,o=!0,s=t.length-1;s>=1;--s)if(n=t.charCodeAt(s),n===47){if(!o){i=s;break}}else o=!1;return i===-1?r?"/":".":r&&i===1?"//":t.slice(0,i)},basename:function(t,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Et(t);var r=0,i=-1,o=!0,s;if(n!==void 0&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var u=n.length-1,c=-1;for(s=t.length-1;s>=0;--s){var p=t.charCodeAt(s);if(p===47){if(!o){r=s+1;break}}else c===-1&&(o=!1,c=s+1),u>=0&&(p===n.charCodeAt(u)?--u===-1&&(i=s):(u=-1,i=c))}return r===i?i=c:i===-1&&(i=t.length),t.slice(r,i)}else{for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===47){if(!o){r=s+1;break}}else i===-1&&(o=!1,i=s+1);return i===-1?"":t.slice(r,i)}},extname:function(t){Et(t);for(var n=-1,r=0,i=-1,o=!0,s=0,u=t.length-1;u>=0;--u){var c=t.charCodeAt(u);if(c===47){if(!o){r=u+1;break}continue}i===-1&&(o=!1,i=u+1),c===46?n===-1?n=u:s!==1&&(s=1):n!==-1&&(s=-1)}return n===-1||i===-1||s===0||s===1&&n===i-1&&n===r+1?"":t.slice(n,i)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return s0("/",t)},parse:function(t){Et(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return n;var r=t.charCodeAt(0),i=r===47,o;i?(n.root="/",o=1):o=0;for(var s=-1,u=0,c=-1,p=!0,m=t.length-1,v=0;m>=o;--m){if(r=t.charCodeAt(m),r===47){if(!p){u=m+1;break}continue}c===-1&&(p=!1,c=m+1),r===46?s===-1?s=m:v!==1&&(v=1):s!==-1&&(v=-1)}return s===-1||c===-1||v===0||v===1&&s===c-1&&s===u+1?c!==-1&&(u===0&&i?n.base=n.name=t.slice(1,c):n.base=n.name=t.slice(u,c)):(u===0&&i?(n.name=t.slice(1,s),n.base=t.slice(1,c)):(n.name=t.slice(u,s),n.base=t.slice(u,c)),n.ext=t.slice(s,c)),u>0?n.dir=t.slice(0,u-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};Jn.posix=Jn;dd.exports=Jn});import{CONFIG_FILE_NAMES as ii,loadConfig as ym}from"@redocly/openapi-core";var tc;(()=>{"use strict";var e={470:i=>{function o(c){if(typeof c!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(c))}function s(c,p){for(var m,v="",C=0,P=-1,w=0,A=0;A<=c.length;++A){if(A<c.length)m=c.charCodeAt(A);else{if(m===47)break;m=47}if(m===47){if(!(P===A-1||w===1))if(P!==A-1&&w===2){if(v.length<2||C!==2||v.charCodeAt(v.length-1)!==46||v.charCodeAt(v.length-2)!==46){if(v.length>2){var B=v.lastIndexOf("/");if(B!==v.length-1){B===-1?(v="",C=0):C=(v=v.slice(0,B)).length-1-v.lastIndexOf("/"),P=A,w=0;continue}}else if(v.length===2||v.length===1){v="",C=0,P=A,w=0;continue}}p&&(v.length>0?v+="/..":v="..",C=2)}else v.length>0?v+="/"+c.slice(P+1,A):v=c.slice(P+1,A),C=A-P-1;P=A,w=0}else m===46&&w!==-1?++w:w=-1}return v}var u={resolve:function(){for(var c,p="",m=!1,v=arguments.length-1;v>=-1&&!m;v--){var C;v>=0?C=arguments[v]:(c===void 0&&(c=process.cwd()),C=c),o(C),C.length!==0&&(p=C+"/"+p,m=C.charCodeAt(0)===47)}return p=s(p,!m),m?p.length>0?"/"+p:"/":p.length>0?p:"."},normalize:function(c){if(o(c),c.length===0)return".";var p=c.charCodeAt(0)===47,m=c.charCodeAt(c.length-1)===47;return(c=s(c,!p)).length!==0||p||(c="."),c.length>0&&m&&(c+="/"),p?"/"+c:c},isAbsolute:function(c){return o(c),c.length>0&&c.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var c,p=0;p<arguments.length;++p){var m=arguments[p];o(m),m.length>0&&(c===void 0?c=m:c+="/"+m)}return c===void 0?".":u.normalize(c)},relative:function(c,p){if(o(c),o(p),c===p||(c=u.resolve(c))===(p=u.resolve(p)))return"";for(var m=1;m<c.length&&c.charCodeAt(m)===47;++m);for(var v=c.length,C=v-m,P=1;P<p.length&&p.charCodeAt(P)===47;++P);for(var w=p.length-P,A=C<w?C:w,B=-1,L=0;L<=A;++L){if(L===A){if(w>A){if(p.charCodeAt(P+L)===47)return p.slice(P+L+1);if(L===0)return p.slice(P+L)}else C>A&&(c.charCodeAt(m+L)===47?B=L:L===0&&(B=0));break}var D=c.charCodeAt(m+L);if(D!==p.charCodeAt(P+L))break;D===47&&(B=L)}var b="";for(L=m+B+1;L<=v;++L)L!==v&&c.charCodeAt(L)!==47||(b.length===0?b+="..":b+="/..");return b.length>0?b+p.slice(P+B):(P+=B,p.charCodeAt(P)===47&&++P,p.slice(P))},_makeLong:function(c){return c},dirname:function(c){if(o(c),c.length===0)return".";for(var p=c.charCodeAt(0),m=p===47,v=-1,C=!0,P=c.length-1;P>=1;--P)if((p=c.charCodeAt(P))===47){if(!C){v=P;break}}else C=!1;return v===-1?m?"/":".":m&&v===1?"//":c.slice(0,v)},basename:function(c,p){if(p!==void 0&&typeof p!="string")throw new TypeError('"ext" argument must be a string');o(c);var m,v=0,C=-1,P=!0;if(p!==void 0&&p.length>0&&p.length<=c.length){if(p.length===c.length&&p===c)return"";var w=p.length-1,A=-1;for(m=c.length-1;m>=0;--m){var B=c.charCodeAt(m);if(B===47){if(!P){v=m+1;break}}else A===-1&&(P=!1,A=m+1),w>=0&&(B===p.charCodeAt(w)?--w==-1&&(C=m):(w=-1,C=A))}return v===C?C=A:C===-1&&(C=c.length),c.slice(v,C)}for(m=c.length-1;m>=0;--m)if(c.charCodeAt(m)===47){if(!P){v=m+1;break}}else C===-1&&(P=!1,C=m+1);return C===-1?"":c.slice(v,C)},extname:function(c){o(c);for(var p=-1,m=0,v=-1,C=!0,P=0,w=c.length-1;w>=0;--w){var A=c.charCodeAt(w);if(A!==47)v===-1&&(C=!1,v=w+1),A===46?p===-1?p=w:P!==1&&(P=1):p!==-1&&(P=-1);else if(!C){m=w+1;break}}return p===-1||v===-1||P===0||P===1&&p===v-1&&p===m+1?"":c.slice(p,v)},format:function(c){if(c===null||typeof c!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof c);return function(p,m){var v=m.dir||m.root,C=m.base||(m.name||"")+(m.ext||"");return v?v===m.root?v+C:v+"/"+C:C}(0,c)},parse:function(c){o(c);var p={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return p;var m,v=c.charCodeAt(0),C=v===47;C?(p.root="/",m=1):m=0;for(var P=-1,w=0,A=-1,B=!0,L=c.length-1,D=0;L>=m;--L)if((v=c.charCodeAt(L))!==47)A===-1&&(B=!1,A=L+1),v===46?P===-1?P=L:D!==1&&(D=1):P!==-1&&(D=-1);else if(!B){w=L+1;break}return P===-1||A===-1||D===0||D===1&&P===A-1&&P===w+1?A!==-1&&(p.base=p.name=w===0&&C?c.slice(1,A):c.slice(w,A)):(w===0&&C?(p.name=c.slice(1,P),p.base=c.slice(1,A)):(p.name=c.slice(w,P),p.base=c.slice(w,A)),p.ext=c.slice(P,A)),w>0?p.dir=c.slice(0,w-1):C&&(p.dir="/"),p},sep:"/",delimiter:":",win32:null,posix:null};u.posix=u,i.exports=u}},t={};function n(i){var o=t[i];if(o!==void 0)return o.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,n),s.exports}n.d=(i,o)=>{for(var s in o)n.o(o,s)&&!n.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:o[s]})},n.o=(i,o)=>Object.prototype.hasOwnProperty.call(i,o),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>C,Utils:()=>lt}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let o=/^\w[\w\d+.-]*$/,s=/^\//,u=/^\/\//;function c(F,x){if(!F.scheme&&x)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${F.authority}", path: "${F.path}", query: "${F.query}", fragment: "${F.fragment}"}`);if(F.scheme&&!o.test(F.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(F.path){if(F.authority){if(!s.test(F.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(u.test(F.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}let p="",m="/",v=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class C{static isUri(x){return x instanceof C||!!x&&typeof x.authority=="string"&&typeof x.fragment=="string"&&typeof x.path=="string"&&typeof x.query=="string"&&typeof x.scheme=="string"&&typeof x.fsPath=="string"&&typeof x.with=="function"&&typeof x.toString=="function"}scheme;authority;path;query;fragment;constructor(x,H,I,ie,X,K=!1){typeof x=="object"?(this.scheme=x.scheme||p,this.authority=x.authority||p,this.path=x.path||p,this.query=x.query||p,this.fragment=x.fragment||p):(this.scheme=function(ze,Ae){return ze||Ae?ze:"file"}(x,K),this.authority=H||p,this.path=function(ze,Ae){switch(ze){case"https":case"http":case"file":Ae?Ae[0]!==m&&(Ae=m+Ae):Ae=m}return Ae}(this.scheme,I||p),this.query=ie||p,this.fragment=X||p,c(this,K))}get fsPath(){return D(this,!1)}with(x){if(!x)return this;let{scheme:H,authority:I,path:ie,query:X,fragment:K}=x;return H===void 0?H=this.scheme:H===null&&(H=p),I===void 0?I=this.authority:I===null&&(I=p),ie===void 0?ie=this.path:ie===null&&(ie=p),X===void 0?X=this.query:X===null&&(X=p),K===void 0?K=this.fragment:K===null&&(K=p),H===this.scheme&&I===this.authority&&ie===this.path&&X===this.query&&K===this.fragment?this:new w(H,I,ie,X,K)}static parse(x,H=!1){let I=v.exec(x);return I?new w(I[2]||p,Z(I[4]||p),Z(I[5]||p),Z(I[7]||p),Z(I[9]||p),H):new w(p,p,p,p,p)}static file(x){let H=p;if(i&&(x=x.replace(/\\/g,m)),x[0]===m&&x[1]===m){let I=x.indexOf(m,2);I===-1?(H=x.substring(2),x=m):(H=x.substring(2,I),x=x.substring(I)||m)}return new w("file",H,x,p,p)}static from(x){let H=new w(x.scheme,x.authority,x.path,x.query,x.fragment);return c(H,!0),H}toString(x=!1){return b(this,x)}toJSON(){return this}static revive(x){if(x){if(x instanceof C)return x;{let H=new w(x);return H._formatted=x.external,H._fsPath=x._sep===P?x.fsPath:null,H}}return x}}let P=i?1:void 0;class w extends C{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=D(this,!1)),this._fsPath}toString(x=!1){return x?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){let x={$mid:1};return this._fsPath&&(x.fsPath=this._fsPath,x._sep=P),this._formatted&&(x.external=this._formatted),this.path&&(x.path=this.path),this.scheme&&(x.scheme=this.scheme),this.authority&&(x.authority=this.authority),this.query&&(x.query=this.query),this.fragment&&(x.fragment=this.fragment),x}}let A={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(F,x,H){let I,ie=-1;for(let X=0;X<F.length;X++){let K=F.charCodeAt(X);if(K>=97&&K<=122||K>=65&&K<=90||K>=48&&K<=57||K===45||K===46||K===95||K===126||x&&K===47||H&&K===91||H&&K===93||H&&K===58)ie!==-1&&(I+=encodeURIComponent(F.substring(ie,X)),ie=-1),I!==void 0&&(I+=F.charAt(X));else{I===void 0&&(I=F.substr(0,X));let ze=A[K];ze!==void 0?(ie!==-1&&(I+=encodeURIComponent(F.substring(ie,X)),ie=-1),I+=ze):ie===-1&&(ie=X)}}return ie!==-1&&(I+=encodeURIComponent(F.substring(ie))),I!==void 0?I:F}function L(F){let x;for(let H=0;H<F.length;H++){let I=F.charCodeAt(H);I===35||I===63?(x===void 0&&(x=F.substr(0,H)),x+=A[I]):x!==void 0&&(x+=F[H])}return x!==void 0?x:F}function D(F,x){let H;return H=F.authority&&F.path.length>1&&F.scheme==="file"?`//${F.authority}${F.path}`:F.path.charCodeAt(0)===47&&(F.path.charCodeAt(1)>=65&&F.path.charCodeAt(1)<=90||F.path.charCodeAt(1)>=97&&F.path.charCodeAt(1)<=122)&&F.path.charCodeAt(2)===58?x?F.path.substr(1):F.path[1].toLowerCase()+F.path.substr(2):F.path,i&&(H=H.replace(/\//g,"\\")),H}function b(F,x){let H=x?L:B,I="",{scheme:ie,authority:X,path:K,query:ze,fragment:Ae}=F;if(ie&&(I+=ie,I+=":"),(X||ie==="file")&&(I+=m,I+=m),X){let ce=X.indexOf("@");if(ce!==-1){let Ct=X.substr(0,ce);X=X.substr(ce+1),ce=Ct.lastIndexOf(":"),ce===-1?I+=H(Ct,!1,!1):(I+=H(Ct.substr(0,ce),!1,!1),I+=":",I+=H(Ct.substr(ce+1),!1,!0)),I+="@"}X=X.toLowerCase(),ce=X.lastIndexOf(":"),ce===-1?I+=H(X,!1,!0):(I+=H(X.substr(0,ce),!1,!0),I+=X.substr(ce))}if(K){if(K.length>=3&&K.charCodeAt(0)===47&&K.charCodeAt(2)===58){let ce=K.charCodeAt(1);ce>=65&&ce<=90&&(K=`/${String.fromCharCode(ce+32)}:${K.substr(3)}`)}else if(K.length>=2&&K.charCodeAt(1)===58){let ce=K.charCodeAt(0);ce>=65&&ce<=90&&(K=`${String.fromCharCode(ce+32)}:${K.substr(2)}`)}I+=H(K,!0,!1)}return ze&&(I+="?",I+=H(ze,!1,!1)),Ae&&(I+="#",I+=x?Ae:B(Ae,!1,!1)),I}function q(F){try{return decodeURIComponent(F)}catch{return F.length>3?F.substr(0,3)+q(F.substr(3)):F}}let $=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Z(F){return F.match($)?F.replace($,x=>q(x)):F}var ue=n(470);let Ue=ue.posix||ue,ut="/";var lt;(function(F){F.joinPath=function(x,...H){return x.with({path:Ue.join(x.path,...H)})},F.resolvePath=function(x,...H){let I=x.path,ie=!1;I[0]!==ut&&(I=ut+I,ie=!0);let X=Ue.resolve(I,...H);return ie&&X[0]===ut&&!x.authority&&(X=X.substring(1)),x.with({path:X})},F.dirname=function(x){if(x.path.length===0||x.path===ut)return x;let H=Ue.dirname(x.path);return H.length===1&&H.charCodeAt(0)===46&&(H=""),x.with({path:H})},F.basename=function(x){return Ue.basename(x.path)},F.extname=function(x){return Ue.extname(x.path)}})(lt||(lt={}))})(),tc=r})();var{URI:xn,Utils:ye}=tc;var nc={languageId:"yaml",filePattern:/\.ya?ml$/i},_o={languageId:"json",filePattern:/\.json$/i},bo=class{constructor(){this.supportedLanguages=[nc,_o]}registerFileSystemProvider(t){this._fs=t}registerDocumentsProvider(t){this._documentManager=t}get fs(){if(!this._fs)throw new Error("FileSystemProvider not registered.");return this._fs}get documents(){if(!this._documentManager)throw new Error("DocumentsProvider not registered.");return this._documentManager}},Ye=new bo;function rc(e,t){return ye.resolvePath(Fe(e)).toString()===ye.resolvePath(Fe(t)).toString()}function Fe(e){return xn.parse(e)}function ic(e){return xn.parse(e).fsPath}function oc(e){let t=["https","http"],{scheme:n}=xn.parse(e);return t.includes(n)}function er(e){return ye.basename(Fe(e))}async function sc(e,t="/"){let n=ye.resolvePath(Fe(t));for(console.log(e);e.path!=="/";)try{(await Ye.fs.stat(ye.resolvePath(n,e.path))).isDirectory()||(e=ye.dirname(e));break}catch{e=ye.dirname(e)}return e}import{BaseResolver as mm,Source as $u,readFileFromUrl as gm}from"@redocly/openapi-core";var ei=rt(Zr(),1);import{isAbsoluteUrl as pm}from"@redocly/openapi-core";function qu(e,t=100,n=!1){let r=new Map,i=new Map;function o(u,c,p){let m=i.get(u.uri),v=Date.now()-m;try{v<t&&v>=0?r.set(u.uri,setTimeout(()=>o(u,c,p),t-v)):(r.delete(u.uri),i.delete(u.uri),n||c(e(u)))}catch(C){p(C)}}function s(u){let c=r.get(u.uri),p=n&&!c;return i.set(u.uri,Date.now()),new Promise((m,v)=>{c||r.set(u.uri,setTimeout(()=>o(u,m,v),t)),p&&m(e(u))})}return s}function Eu(e){let t=new Set,n=r=>Array.isArray(n)?r.map(n):typeof r=="object"&&r!==null?t.has(r)?void 0:(t.add(r),Object.fromEntries(Object.entries(r).map(([i,o])=>[i,n(o)]))):r;return n(e)}function Ou(e){return e==="$ref"}async function Ko(e){let t=xn.parse("");return ye.joinPath(t,e).toString()}async function Mu(e,t){for(let[n,{root:r}]of Object.entries(e))if(await Ko(r)===t)return n}function Fu(e){return typeof e=="string"}function ti(e){return typeof e=="function"}function Lu(e){return e?.kind===ei.Kind.MAP}function Qo(e){return e?.kind===ei.Kind.MAPPING}function Jo(e){return e?.kind===ei.Kind.SEQ}function or(e,t){let n=t.singleQuoted?"'":'"';return`${n}${e}${n}`}function Go(e){return pm(e)||e.startsWith("file://")}var hn=class{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){for(let r of t)if(hn.isIncremental(r)){let i=ju(r.range),o=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,o)+r.text+this._content.substring(s,this._content.length);let u=Math.max(i.start.line,0),c=Math.max(i.end.line,0),p=this._lineOffsets,m=Iu(r.text,!1,o);if(c-u===m.length)for(let C=0,P=m.length;C<P;C++)p[C+u+1]=m[C];else m.length<1e4?p.splice(u+1,c-u,...m):this._lineOffsets=p=p.slice(0,u+1).concat(m,p.slice(c+1));let v=r.text.length-(s-o);if(v!==0)for(let C=u+1+m.length,P=p.length;C<P;C++)p[C]=p[C]+v}else if(hn.isFull(r))this._content=r.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Iu(this._content,!0)),this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return{line:0,character:t};for(;r<i;){let s=Math.floor((r+i)/2);n[s]>t?i=s:r=s+1}let o=r-1;return{line:o,character:t-n[o]}}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,i),r)}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(t){let n=t;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}},ni;(function(e){function t(i,o,s,u){return new hn(i,o,s,u)}e.create=t;function n(i,o,s){if(i instanceof hn)return i.update(o,s),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=n;function r(i,o){let s=i.getText(),u=Xo(o.map(hm),(m,v)=>{let C=m.range.start.line-v.range.start.line;return C===0?m.range.start.character-v.range.start.character:C}),c=0,p=[];for(let m of u){let v=i.offsetAt(m.range.start);if(v<c)throw new Error("Overlapping edit");v>c&&p.push(s.substring(c,v)),m.newText.length&&p.push(m.newText),c=i.offsetAt(m.range.end)}return p.push(s.substr(c)),p.join("")}e.applyEdits=r})(ni||(ni={}));function Xo(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Xo(r,t),Xo(i,t);let o=0,s=0,u=0;for(;o<r.length&&s<i.length;)t(r[o],i[s])<=0?e[u++]=r[o++]:e[u++]=i[s++];for(;o<r.length;)e[u++]=r[o++];for(;s<i.length;)e[u++]=i[s++];return e}function Iu(e,t,n=0){let r=t?[n]:[];for(let i=0;i<e.length;i++){let o=e.charCodeAt(i);(o===13||o===10)&&(o===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function ju(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function hm(e){let t=ju(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Wu=new Map;function Hu(e,t){return Wu.set(e,t)}function Uu(e){let t=[];for(let[n,r]of Wu.entries())r.dependencyPaths.has(e)&&t.push({documentPath:n,durationMS:r.durationMS});return t}async function mn(e){let t=Ye.documents.get(e);if(t)return t;let n=await Ye.fs.readFile(Fe(e),"utf-8");return ni.create(e,"yaml",1,n)}function Bu(e){return _o.filePattern.test(e)}var It=class extends mm{resolveExternalRef(t,n){return Go(n)?n:t&&Go(t)?new URL(n,t).href:ye.resolvePath(ye.dirname(Fe(t)),n).toString()}async loadExternalRef(t){if(oc(t)){let{body:n,mimeType:r}=await gm(t,{...this.config.http,customFetch:fetch});return new $u(t,n,r)}return new $u(t,(await mn(t)).getText())}};async function zu(e){if(!Ye.fs)return;let t=[];for(let n of ii)try{let r=ye.resolvePath(ye.dirname(Fe(e)),n);await Ye.fs.exists(r)&&t.push(r.toString())}catch{continue}if(t.length>1)throw new Error(`
|
|
68
68
|
Multiple configuration files are not allowed.
|
|
69
69
|
Found the following files: ${t.join(", ")}.
|
|
70
70
|
Please use 'redocly.yaml' instead.
|
|
71
|
-
`);return t[0]}var
|
|
71
|
+
`);return t[0]}var sr,ri,Zo,Yu;async function es(e){let t=new It,n=await zu(e);return sr=await ym({configPath:n,processRawConfig:async({document:r,resolvedRefMap:i})=>{Zo=i,Yu=r},externalRefResolver:t}),sr}async function ar(){return sr||await es(),{config:sr,configPath:ri,rootConfigDocument:Yu}}async function Vu(e){try{return ri=await zu(e),ri?es(ri):sr}catch{return es("")}}function cr(e){return ts(e)?!0:!!Zo&&[...Zo.keys()].map(n=>n.split("::")?.[1]?.split("#")[0]).some(n=>rc(er(e),n))}function ts(e){return ii.includes(er(e))}var Je=rt(on(),1);import{getLineColLocation as qb,lintDocument as Eb,makeDocumentFromString as Ba,lintConfig as Ob,detectSpec as Mb,getMergedConfig as Fb}from"@redocly/openapi-core";import{bundleDocument as Sb,makeDocumentFromString as kb}from"@redocly/openapi-core";var Ab=new Map,Qi=new Map;function Nb(e){return e?Array.from(e).map(([t,n])=>[t,Eu(n)]):[]}async function Zf(e,t){let{config:n}=await ar(),r=new It(n.resolve),i=kb(e.getText(),e.uri),{bundle:o,problems:s,fileDependencies:u,rootType:c,refTypes:p}=await Sb({document:i,config:n.styleguide,externalRefResolver:r}),m=Nb(p);p&&(Qi=new Map([...Qi,...p])),Ab.set(e.uri,{uri:e.uri,name:er(e.uri),definition:o.parsed,rootType:c,refTypes:m,errors:t})}function Ua(e){return Qi.has(e)?Qi.get(e):null}var Lb=800,Ib=5,za=qu(Hb,Lb);async function jb(e){let t=e.map(({documentPath:r})=>Fe(r).toString()),{config:n}=await ar();for(let{root:r}of Object.values(n.apis)){let i=await Ko(r);if(t.includes(i))return i}return t[0]}var $a;function Wb(e){try{return Mb(e),!0}catch{return!1}}async function Hb(e){let t=e.uri,{config:n,rootConfigDocument:r,configPath:i}=await ar();if(cr(ic(t))){let o=ts(t)?Ba(e.getText(),t):Ba(r.source.body,r.source.absoluteRef),s=new It,u=await Ob({document:o,externalRefResolver:s,config:n}),c=[{uri:e.uri,diagnostics:[]}];return ed(u,c),c}else{let o=Uu(t),s=await jb(o||[]);s&&(e=await mn(s),t=s);let u;try{u=Ba(e.getText(),t)}catch{return[{uri:e.uri,diagnostics:[]}]}if(!Wb(u.parsed))return[{uri:e.uri,diagnostics:[]}];let c=[];try{let p=new It(n.resolve);$a=e.uri;let m=await Mu(n.apis,$a),v=Date.now(),C=(await Eb({document:u,config:Fb(n,m).styleguide,externalRefResolver:p})).filter(({ignored:A})=>!A);$a=null;let P=$b(C);Zf(e,P);let w=Date.now()-v;c=[{uri:e.uri,diagnostics:[]},...Array.from(p.getFiles()).map(A=>({uri:Fe(A).toString(),diagnostics:[]}))],Hu(t,{dependencyPaths:p.getFiles(),durationMS:w}),ed(C,c)}catch(p){Ub(e.uri,p,c)}return c}}function Ji(){return Ye.documents.all().map(za)}function Ub(e,t,n){let r=n||[{uri:e,diagnostics:[]}];if(t.line&&t.col&&t.message){let i=t.source?.absoluteRef?Fe(t.source.absoluteRef).toString():e,o=t.line-1,s=t.col-1,u=Je.Position.create(o,s),c=Je.Diagnostic.create(Je.Range.create(u,u),t.message,Je.DiagnosticSeverity.Error);td(i,c,r)}else t.message.includes("This doesn\u2019t look like an OpenAPI document")||console.error(t);return r}function td(e,t,n){let r=n.find(i=>i.uri===e);return r||(r={uri:e,diagnostics:[]},n.push(r)),r.diagnostics.push(t),n}function Bb(e){return e.suggest.length===0?"":e.suggest.length===1?`
|
|
72
72
|
Did you mean: ${e.suggest[0]} ?`:`
|
|
73
73
|
Did you mean:
|
|
74
|
-
- ${e.suggest.slice(0,
|
|
75
|
-
- `)}`}function $f(e,t){e.forEach(n=>{let r;switch(n.severity){case"error":r=Ye.DiagnosticSeverity.Error;break;case"warn":r=Ye.DiagnosticSeverity.Warning;break;default:r=Ye.DiagnosticSeverity.Warning}let i=Db(n.location[0]),o=qe(i.source.absoluteRef).toString(),s=Ye.Position.create(i.start.line-1,i.start.col-1),a=i.end?Ye.Position.create(i.end.line-1,i.end.col-1):s,l=n.message+qb(n),p=Ye.Diagnostic.create(Ye.Range.create(s,a),l,r,void 0,"Redocly OpenAPI");zf(o,p,t)})}function Eb(e){return e.filter(({severity:t})=>t==="error").map(t=>({...t,location:t.location.map(n=>({...n,source:{...n.source,_ast:null}}))}))}var io=rt(cn(),1);var be=rt(cn(),1);function Se(e,t){return e?t?Ji[e+"_"+t]||t:Ji[e]||Ji[Mr.Default]:Ji[Mr.Default]}var Mr=(j=>(j.FileCompletion="FileCompletion",j.FolderCompletion="FolderCompletion",j.LocalComponentCompletion="LocalComponentCompletion",j.NewLine="newLine",j.PropertyName="propertyName",j.NewItem="newItem",j.PathMap="PathMap",j.MediaTypeMap="MediaTypeMap",j.Root="Root",j.RootOpenapi="Root_openapi",j.RootInfo="Root_info",j.RootJsonSchemaDialect="Root_jsonSchemaDialect",j.RootServers="Root_servers",j.RootPaths="Root_paths",j.RootWebhooks="Root_webhooks",j.RootComponents="Root_components",j.RootSecurity="Root_security",j.RootTags="Root_tags",j.RootExternalDocs="Root_externalDocs",j.Info="Info",j.InfoTitle="Info_title",j.InfoSummary="Info_summary",j.InfoDescription="Info_description",j.InfoTermsOfService="Info_termsOfService",j.InfoContact="Info_contact",j.ContactName="Contact_name",j.ContactUrl="Contact_url",j.ContactEmail="Contact_email",j.InfoLicense="Info_license",j.LicenseName="License_name",j.LicenseIdentifier="License_identifier",j.LicenseUrl="License_url",j.InfoVersion="Info_version",j.jsonSchemaDialect="jsonSchemaDialect",j.ServerList="Server_List",j.ServerUrl="Server_url",j.ServerDescription="Server_description",j.ServerVariables="Server_variables",j.Default="Default",j))(Mr||{}),Ob=["newLine","MediaTypeMap","PathMap","propertyName","newItem","Root_openapi","Root","Info","Root_info","Info_title","Info_summary","Info_description","Info_termsOfService","Info_contact","Contact_name","Contact_url","Contact_email","Info_license","License_name","License_identifier","License_url","Info_version","Root_jsonSchemaDialect","jsonSchemaDialect","Root_servers","Server_List","Server_url","Server_description","Server_variables","Root_paths","Root_webhooks","Root_components","Root_security","Root_tags","Root_externalDocs","LocalComponentCompletion","FolderCompletion","FileCompletion","Default"],Ji=Ob.reduce((e,t,n)=>(e[t]=String.fromCharCode(n),e),{});var ln="newItem",Fr="propertyName",er="newLine";function Gi(e){return!!(e?.name&&Yf[e.name])}function Ia(e){return Yf[e]||[]}var Yf={[er]:[{label:"newLine",kind:be.CompletionItemKind.Constructor,data:{},sortText:Se(er)}],[Fr]:[{label:Fr,kind:be.CompletionItemKind.Constructor,data:{properties:{}},sortText:Se(Fr)}],ServerVariable_Map:[{label:"newVariableName",kind:be.CompletionItemKind.Property,data:{properties:{}},sortText:Se("ServerVariable_Map")}],ResponsesMap:[{label:"200",kind:be.CompletionItemKind.Property,data:{properties:{}}},{label:"201",kind:be.CompletionItemKind.Property,data:{properties:{}}},{label:"204",kind:be.CompletionItemKind.Property,data:{properties:{}}},{label:"301",kind:be.CompletionItemKind.Property,data:{properties:{}}},{label:"303",kind:be.CompletionItemKind.Property,data:{properties:{}}},{label:"400",kind:be.CompletionItemKind.Property,data:{properties:{}}},{label:"401",kind:be.CompletionItemKind.Property,data:{properties:{}}},{label:"403",kind:be.CompletionItemKind.Property,data:{properties:{}}},{label:"404",kind:be.CompletionItemKind.Property,data:{properties:{}}},{label:"500",kind:be.CompletionItemKind.Property,data:{properties:{}}},{label:"503",kind:be.CompletionItemKind.Property,data:{properties:{}}}],PathMap:[{label:"/newPath",kind:be.CompletionItemKind.Property,data:{properties:{}},sortText:Se("PathMap")}],MediaTypeMap:[{label:"mime/type",kind:be.CompletionItemKind.Property,data:{properties:{}},sortText:Se("MediaTypeMap")},{label:"application/json",kind:be.CompletionItemKind.Property,data:{properties:{}},sortText:Se("MediaTypeMap")},{label:"application/octet-stream",kind:be.CompletionItemKind.Property,data:{properties:{}},sortText:Se("MediaTypeMap")},{label:"multipart/form-data",kind:be.CompletionItemKind.Property,data:{properties:{}},sortText:Se("MediaTypeMap")},{label:"application/x-www-form-urlencoded",kind:be.CompletionItemKind.Property,data:{properties:{}},sortText:Se("MediaTypeMap")},{label:"application/xml",kind:be.CompletionItemKind.Property,data:[],sortText:Se("MediaTypeMap")}]};var Sn=rt(ei(),1);import{normalizeTypes as Kf,Oas3Types as Mb,Oas2Types as Fb,Oas3_1Types as Vf,AsyncApi2Types as Lb,SpecVersion as Vt,ConfigTypes as Ib,getMajorSpecVersion as jb}from"@redocly/openapi-core";var ja=new Map;function Qf(e,t){if(!e)return null;let n=e,r=!0;return t.forEach(i=>{if(r=!1,Yo(n)&&n.items&&n.items[i])n=n.items[i],r=!0;else if(Sc(n)){let o=Zi(n);for(let s of o)if(zo(s)&&s.key?.value===i){n=s?.value,r=!0;break}}}),r?n:(console.warn("Cannot find node by path",t),null)}function Wb(e,t){for(let n=0;n<t.length;n++)if(n===t.length-1||t[n+1]>e)return n;return t.length-1}function Wa(e,t,n,r=!1){let{node:i,nodePath:o=[]}=e,s=n.offsetAt(t),a=Zi(i);if(a.length===0||Hb(i)||!r&&Ub(i,n,t))return e;let l=Bb(a,s);return Wa({nodePath:$b(o,i,a[l],l),node:a[l]},t,n,r)}function Hb(e){return e?.kind===Sn.Kind.MAPPING&&!e?.value}function Ub(e,t,n){let r=t.getText({start:t.positionAt(t._lineOffsets[n.line]),end:n}),i=zb(e,t),o=r?.match(/^\s+/)?.[0]?.length||0;return(/^\s*[\w\-\$\/\{\}]+$/.test(r)?o:n.character)===i}function Bb(e,t){for(let n=1;n<e.length;n++){let r=e[n];if(!!r&&r.startPosition>t)return n-1}return e.length-1}function $b(e,t,n,r){return Yo(t)?[...e,r]:zo(n)&&n?.key?.value&&typeof n.key.value=="string"?[...e,n.key.value]:e}function zb(e,t){let n=e?.startPosition??0,r=Wb(n,t._lineOffsets);if(r>=0){let i=t._lineOffsets[r];return n-i}return 0}function Ha(e,t){let n=e,r=null,i=new Array(t.length).fill(null);t.forEach((s,a)=>{let l;if(e?.name&&e?.name!==n?.name&&(n=e,r=s),e&&e?.properties&&!Object.keys(e?.properties).length&&e?.items?.properties)l=e.items;else if(e?.properties&&e.properties[s])l=e.properties[s],ni(l)&&(l=l(null,s));else if(e?.additionalProperties&&!ni(e?.additionalProperties))l=e.additionalProperties;else if(ni(e?.additionalProperties)&&s){let p=e.additionalProperties(null,s);p&&(l=p)}l&&(e=l,i[a]=l)}),e?.name&&n?.name&&e?.name!==n?.name&&(r=null);let o=i.every(s=>!!s);return{currentType:o||t[0]==="openapi"||t.length===0?e:null,parentType:o?n:null,endPath:r}}function Jf(e,t){if(pr(t))return Kf(Ib).ConfigRoot;let{types:n,isDefault:r}=Vb(e);if(!e)return n;let i=r?Oa(t):n;return r&&!Oa(t)&&e?null:i||n}function Yb(e){if(ja.has(e))return ja.get(e);let t=Kf(Kb(e)).Root;return ja.set(e,t),t}function Gf(e){let t,n=!1;if(e?.kind===Sn.Kind.MAP)for(let r of e.mappings){let i=r.key?.value,o=String(r?.value?.value);if(i==="openapi"&&o.startsWith("3.1")){t=Vt.OAS3_1;break}if(i==="openapi"&&o.startsWith("3.0")){t=Vt.OAS3_0;break}if(i==="swagger"&&o==="2.0"){t=Vt.OAS2;break}if(i==="asyncapi")return{version:Vt.Async2,isDefault:!1}}return t||(t=Vt.OAS3_1,n=!0),{version:t,isDefault:n}}function Xf(e){let{version:t,isDefault:n}=Gf(e);return{version:jb(t),isDefault:n}}function Vb(e){let{version:t,isDefault:n}=Gf(e);return{types:Yb(t),isDefault:n}}function Zi(e){switch(e?.kind){case Sn.Kind.MAPPING:return[e.key,e.value];case Sn.Kind.MAP:return e.mappings;case Sn.Kind.SEQ:return e?.items;default:return[]}}function Kb(e){switch(e){case Vt.OAS3_1:return Vf;case Vt.OAS3_0:return Mb;case Vt.OAS2:return Fb;case Vt.Async2:return Lb;default:return Vf}}function Xi(e,t,n){if(typeof t>"u"&&(t={}),typeof n>"u"&&(n=0),!e)return{};let r=e?.mappings||e?.items;if(r){let i=0;for(let o of r)o?.value===null||!o?.value?.value?t[o?.key?.value||i]={value:kc(o?.value)?o?.value:null,startOffset:o?.key?.value?o.startPosition+o.key.value.length+1:null,endOffset:null,indent:n}:t[o?.key?.value||i]={value:o?.value?.value,rawValue:o?.value?.rawValue||null,startOffset:o?.value?.startPosition||null,endOffset:o?.value?.endPosition||null,indent:n},Object.keys(o?.value||o||{}).includes("items")?(t[o?.key?.value||i]={type:"sequence",startOffset:o.startPosition,endOffset:o.endPosition,indent:n,value:null},Xi(o?.value||o,t[o?.key?.value||i],n+1)):Object.keys(o?.value||o||{}).includes("mappings")&&(t[o?.key?.value||i]={type:"map",startOffset:o.startPosition,endOffset:o.endPosition,indent:n,value:null},Xi(o?.value||o,t[o?.key?.value||i],n+1)),i++}return t}import{mapTypeToComponent as Zf}from"@redocly/openapi-core";var Ua={Schema:[{name:"$ref",value:{type:"string",name:"Schema"}}],PathItem:[{name:"$ref",value:{type:"string",name:"PathItem"}}],Parameter:[{name:"$ref",value:{type:"string",name:"Parameter"}}],Response:[{name:"$ref",value:{type:"string",name:"Response"}}],Example:[{name:"$ref",value:{type:"string",name:"Example"}}],RequestBody:[{name:"$ref",value:{type:"string",name:"RequestBody"}}],Header:[{name:"$ref",value:{type:"string",name:"Header"}}],SecuritySchema:[{name:"$ref",value:{type:"string",name:"SecuritySchema"}}],Link:[{name:"$ref",value:{type:"string",name:"Link"}}],Callback:[{name:"$ref",value:{type:"string",name:"Callback"}}]};function ed(e){let t=Ua[e.name];return t&&t.forEach(n=>{e.properties[n.name]=n.value}),e}var eo=rt(cn(),1),Dt=class{constructor({kind:t,label:n,value:r,textEdit:i,filterText:o,sortText:s,data:a}){this.kind=t||eo.CompletionItemKind.Value,this.label=n;let{node:l,lineOffset:p,position:m}=a;this.insertText=r??n,this.filterText=o||this.insertText,this.sortText=s,this.textEdit=i||(l.value==null?void 0:this.getTextEdit(l,m,p))}getTextEdit(t,n,r){let i=t.startPosition-r,o=t.singleQuoted||t.doubleQuoted?2:0,s=i+t.value.length+o;return eo.TextEdit.replace({start:{line:n.line,character:i},end:{line:n.line,character:s}},this.insertText)}};var tr=rt(cn(),1),An=class{constructor({kind:t,label:n,insertText:r,insertTextFormat:i,filterText:o,sortText:s,data:a}){this.insertTextFormat=i||n.includes("$")?tr.InsertTextFormat.PlainText:tr.InsertTextFormat.Snippet,this.kind=t||tr.CompletionItemKind.Property,this.label=n,this.data=a||{},this.insertText=r??n,this.filterText=o||this.insertText,this.sortText=s,this.command=this.kind===tr.CompletionItemKind.Property?{title:"Suggested values",command:"editor.action.triggerSuggest"}:null}};var Lr={example:"example",default:"default",enum:"enum",ref:"$ref"},to=[Lr.default,Lr.example];var id=rt(ei(),1);var He={};Ya(He,{default:()=>rd.default});ho(He,rt(Ba()));var rd=rt(Ba());function Jb(e,t){let n=t.slice(0,t.length-1),{currentType:r}=Ha(e,n);if(r?.name){let[i]=Ua[r.name]||[];return i?.value}return null}function Gb(e,t){let n=t[t.length-1];if(wc(n))return Jb(e,t);let{currentType:r}=Ha(e,t);return Gi(r)?r:r?r?.name&&(r?.name.includes("Map")||r?.name.includes("Named"))?{name:Fr,properties:{}}:r:null}async function od(e,t){let n=await Dn(e),r=n.getText(),i=(0,id.safeLoad)(r,{filename:e}),{node:o,nodePath:s}=Wa({node:i,nodePath:[]},t,n),a=Jf(i,e),l=Gb(a,s),p=n._lineOffsets[t.line],m=n.getText({start:n.positionAt(p),end:t});return{currentAst:i,node:o,nodePath:s,position:t,lineText:m,lineOffset:p,openApiType:l}}async function sd(e,t){let n=he.resolvePath(qe(e)),r=he.dirname(n),i=await Xa(he.joinPath(r,t),r.path),o=he.resolvePath(r,i.path);return{refPath:t,refDirPath:i,refDirAbsolutePath:o,isAbsolutePath:t&&(0,He.isAbsolute)(t),docAbsolutePath:n,docAbsoluteDirPath:r,root:"/"}}var ad=rt(cn(),1);var no=class extends Dt{constructor(n){super(n);this.kind=ad.CompletionItemKind.Folder,this.command={title:"Complete path",command:"editor.action.triggerSuggest",arguments:[]}}};var ud=rt(cn(),1),ro=class extends Dt{constructor(t){super(t),this.kind=ud.CompletionItemKind.File}};var Xb=Ue.supportedLanguages.concat({languageId:"markdown",filePattern:/\.md$/});function Zb(e){let{refPath:t,docAbsoluteDirPath:n,isAbsolutePath:r,root:i}=e,o=(0,He.resolve)(n.path,t,".."),s=r?o:(0,He.relative)(n.path,o),a=s&&s!==i?"/":"";return{name:"../",type:1,matchBy:t,sortBy:Se("FolderCompletion"),value:`${s}${a}`}}async function e0(e,t,n){let r=[],{refDirAbsolutePath:i,docAbsolutePath:o}=n;for(let s of e)try{let a=he.resolvePath(i,s),l=await Ue.fs.stat(a);l.isFile()&&a.path!==o.path&&t.supportedFiles.some(p=>p.filePattern.test(s))&&r.push({name:s,type:0}),l.isDirectory()&&r.push({name:s,type:1})}catch{continue}return r}function cd(e,t){let{docAbsoluteDirPath:n,isAbsolutePath:r,refDirAbsolutePath:i,root:o,refPath:s}=t,a=[];return i.path!==o&&a.push(Zb(t)),a.concat(e.map(({name:l,type:p})=>{let m=(0,He.resolve)(i.path,l),v=(0,He.relative)(n.path,m),C=s.slice(0,s.lastIndexOf(He.sep)+1),P=r?m:v;if(p===0)return{type:p,name:l,value:P,sortBy:`${Se("FileCompletion")}${l}`,matchBy:`${C}${l}`};let x=`${l}/`;return{type:p,name:x,value:`${P}${v?"/":""}`,sortBy:`${Se("FolderCompletion")}${l}`,matchBy:`${C}${l}`}}))}function ld(e,t){let{node:n,lineOffset:r,position:i}=t;return e.map(o=>{let{name:s,value:a,matchBy:l,sortBy:p,type:m}=o,v={label:s,filterText:lr(l,n),sortText:p,value:a,data:{lineOffset:r,position:i,node:n}};return m===1?new no(v):new ro(v)})}async function fd(e,t){let{node:n}=t,r=n.value??"",i=await sd(e,r),{refDirAbsolutePath:o}=i,s=[];try{s=await Ue.fs.readDir(o)}catch{return ld(cd([],i),t)}let a=await e0(s,{supportedFiles:Xb},i);return ld(cd(a,i),t)}function dd(e,t){if(t?.items)return"- "+dd(e,t.items);if(t?.required)return Object.values(t.required).map((n,r)=>`${n}: \${${r+1}}`).join(`
|
|
76
|
-
`);if(e==="openapi"){let n="3.1.0",[r,i,o]=n.split(".");return`\${1:${r}}.\${2:${i}}.\${3:${o}}`}return""}function
|
|
74
|
+
- ${e.suggest.slice(0,Ib).join(`
|
|
75
|
+
- `)}`}function ed(e,t){e.forEach(n=>{let r;switch(n.severity){case"error":r=Je.DiagnosticSeverity.Error;break;case"warn":r=Je.DiagnosticSeverity.Warning;break;default:r=Je.DiagnosticSeverity.Warning}let i=qb(n.location[0]),o=Fe(i.source.absoluteRef).toString(),s=Je.Position.create(i.start.line-1,i.start.col-1),u=i.end?Je.Position.create(i.end.line-1,i.end.col-1):s,c=n.message+Bb(n),p=Je.Diagnostic.create(Je.Range.create(s,u),c,r,void 0,"Redocly OpenAPI");td(o,p,t)})}function $b(e){return e.filter(({severity:t})=>t==="error").map(t=>({...t,location:t.location.map(n=>({...n,source:{...n.source,_ast:null}}))}))}var oo=rt(on(),1);var Ce=rt(on(),1);function qe(e,t){return e?t?Gi[e+"_"+t]||t:Gi[e]||Gi[Nr.Default]:Gi[Nr.Default]}var Nr=(Q=>(Q.FileCompletion="FileCompletion",Q.FolderCompletion="FolderCompletion",Q.LocalComponentCompletion="LocalComponentCompletion",Q.NewLine="newLine",Q.PropertyName="propertyName",Q.NewItem="newItem",Q.PathMap="PathMap",Q.MediaTypeMap="MediaTypeMap",Q.Root="Root",Q.RootOpenapi="Root_openapi",Q.RootInfo="Root_info",Q.RootJsonSchemaDialect="Root_jsonSchemaDialect",Q.RootServers="Root_servers",Q.RootPaths="Root_paths",Q.RootWebhooks="Root_webhooks",Q.RootComponents="Root_components",Q.RootSecurity="Root_security",Q.RootTags="Root_tags",Q.RootExternalDocs="Root_externalDocs",Q.Info="Info",Q.InfoTitle="Info_title",Q.InfoSummary="Info_summary",Q.InfoDescription="Info_description",Q.InfoTermsOfService="Info_termsOfService",Q.InfoContact="Info_contact",Q.ContactName="Contact_name",Q.ContactUrl="Contact_url",Q.ContactEmail="Contact_email",Q.InfoLicense="Info_license",Q.LicenseName="License_name",Q.LicenseIdentifier="License_identifier",Q.LicenseUrl="License_url",Q.InfoVersion="Info_version",Q.jsonSchemaDialect="jsonSchemaDialect",Q.ServerList="Server_List",Q.ServerUrl="Server_url",Q.ServerDescription="Server_description",Q.ServerVariables="Server_variables",Q.Default="Default",Q))(Nr||{}),zb=["newLine","MediaTypeMap","PathMap","propertyName","newItem","Root_openapi","Root","Info","Root_info","Info_title","Info_summary","Info_description","Info_termsOfService","Info_contact","Contact_name","Contact_url","Contact_email","Info_license","License_name","License_identifier","License_url","Info_version","Root_jsonSchemaDialect","jsonSchemaDialect","Root_servers","Server_List","Server_url","Server_description","Server_variables","Root_paths","Root_webhooks","Root_components","Root_security","Root_tags","Root_externalDocs","LocalComponentCompletion","FolderCompletion","FileCompletion","Default"],Gi=zb.reduce((e,t,n)=>(e[t]=String.fromCharCode(n),e),{});var sn="newItem",qr="propertyName",Kn="newLine";function Xi(e){return!!(e?.name&&nd[e.name])}function Ya(e){return nd[e]||[]}var nd={[Kn]:[{label:"newLine",kind:Ce.CompletionItemKind.Constructor,data:{},sortText:qe(Kn)}],[qr]:[{label:qr,kind:Ce.CompletionItemKind.Constructor,data:{properties:{}},sortText:qe(qr)}],ServerVariable_Map:[{label:"newVariableName",kind:Ce.CompletionItemKind.Property,data:{properties:{}},sortText:qe("ServerVariable_Map")}],ResponsesMap:[{label:"200",kind:Ce.CompletionItemKind.Property,data:{properties:{}}},{label:"201",kind:Ce.CompletionItemKind.Property,data:{properties:{}}},{label:"204",kind:Ce.CompletionItemKind.Property,data:{properties:{}}},{label:"301",kind:Ce.CompletionItemKind.Property,data:{properties:{}}},{label:"303",kind:Ce.CompletionItemKind.Property,data:{properties:{}}},{label:"400",kind:Ce.CompletionItemKind.Property,data:{properties:{}}},{label:"401",kind:Ce.CompletionItemKind.Property,data:{properties:{}}},{label:"403",kind:Ce.CompletionItemKind.Property,data:{properties:{}}},{label:"404",kind:Ce.CompletionItemKind.Property,data:{properties:{}}},{label:"500",kind:Ce.CompletionItemKind.Property,data:{properties:{}}},{label:"503",kind:Ce.CompletionItemKind.Property,data:{properties:{}}}],PathMap:[{label:"/newPath",kind:Ce.CompletionItemKind.Property,data:{properties:{}},sortText:qe("PathMap")}],MediaTypeMap:[{label:"mime/type",kind:Ce.CompletionItemKind.Property,data:{properties:{}},sortText:qe("MediaTypeMap")},{label:"application/json",kind:Ce.CompletionItemKind.Property,data:{properties:{}},sortText:qe("MediaTypeMap")},{label:"application/octet-stream",kind:Ce.CompletionItemKind.Property,data:{properties:{}},sortText:qe("MediaTypeMap")},{label:"multipart/form-data",kind:Ce.CompletionItemKind.Property,data:{properties:{}},sortText:qe("MediaTypeMap")},{label:"application/x-www-form-urlencoded",kind:Ce.CompletionItemKind.Property,data:{properties:{}},sortText:qe("MediaTypeMap")},{label:"application/xml",kind:Ce.CompletionItemKind.Property,data:[],sortText:qe("MediaTypeMap")}]};var Dn=rt(Zr(),1);import{normalizeTypes as id,Oas3Types as Yb,Oas2Types as Vb,Oas3_1Types as rd,AsyncApi2Types as Kb,SpecVersion as Bt,ConfigTypes as Qb,getMajorSpecVersion as Jb}from"@redocly/openapi-core";var Va=new Map;function od(e,t){if(!e)return null;let n=e,r=!0;return t.forEach(i=>{if(r=!1,Jo(n)&&n.items&&n.items[i])n=n.items[i],r=!0;else if(Lu(n)){let o=eo(n);for(let s of o)if(Qo(s)&&s.key?.value===i){n=s?.value,r=!0;break}}}),r?n:(console.warn("Cannot find node by path",t),null)}function Gb(e,t){for(let n=0;n<t.length;n++)if(n===t.length-1||t[n+1]>e)return n;return t.length-1}function Ka(e,t,n,r=!1){let{node:i,nodePath:o=[]}=e,s=n.offsetAt(t),u=eo(i);if(u.length===0||Xb(i)||!r&&Zb(i,n,t))return e;let c=e0(u,s);return Ka({nodePath:t0(o,i,u[c],c),node:u[c]},t,n,r)}function Xb(e){return e?.kind===Dn.Kind.MAPPING&&!e?.value}function Zb(e,t,n){let r=t.getText({start:t.positionAt(t._lineOffsets[n.line]),end:n}),i=n0(e,t),o=r?.match(/^\s+/)?.[0]?.length||0;return(/^\s*[\w\-\$\/\{\}]+$/.test(r)?o:n.character)===i}function e0(e,t){for(let n=1;n<e.length;n++){let r=e[n];if(!!r&&r.startPosition>t)return n-1}return e.length-1}function t0(e,t,n,r){return Jo(t)?[...e,r]:Qo(n)&&n?.key?.value&&typeof n.key.value=="string"?[...e,n.key.value]:e}function n0(e,t){let n=e?.startPosition??0,r=Gb(n,t._lineOffsets);if(r>=0){let i=t._lineOffsets[r];return n-i}return 0}function Qa(e,t){let n=e,r=null,i=new Array(t.length).fill(null);t.forEach((s,u)=>{let c;if(e?.name&&e?.name!==n?.name&&(n=e,r=s),e&&e?.properties&&!Object.keys(e?.properties).length&&e?.items?.properties)c=e.items;else if(e?.properties&&e.properties[s])c=e.properties[s],ti(c)&&(c=c(null,s));else if(e?.additionalProperties&&!ti(e?.additionalProperties))c=e.additionalProperties;else if(ti(e?.additionalProperties)&&s){let p=e.additionalProperties(null,s);p&&(c=p)}c&&(e=c,i[u]=c)}),e?.name&&n?.name&&e?.name!==n?.name&&(r=null);let o=i.every(s=>!!s);return{currentType:o||t[0]==="openapi"||t.length===0?e:null,parentType:o?n:null,endPath:r}}function sd(e,t){if(cr(t))return id(Qb).ConfigRoot;let{types:n,isDefault:r}=i0(e);if(!e)return n;let i=r?Ua(t):n;return r&&!Ua(t)&&e?null:i||n}function r0(e){if(Va.has(e))return Va.get(e);let t=id(o0(e)).Root;return Va.set(e,t),t}function ad(e){let t,n=!1;if(e?.kind===Dn.Kind.MAP)for(let r of e.mappings){let i=r.key?.value,o=String(r?.value?.value);if(i==="openapi"&&o.startsWith("3.1")){t=Bt.OAS3_1;break}if(i==="openapi"&&o.startsWith("3.0")){t=Bt.OAS3_0;break}if(i==="swagger"&&o==="2.0"){t=Bt.OAS2;break}if(i==="asyncapi")return{version:Bt.Async2,isDefault:!1}}return t||(t=Bt.OAS3_1,n=!0),{version:t,isDefault:n}}function cd(e){let{version:t,isDefault:n}=ad(e);return{version:Jb(t),isDefault:n}}function i0(e){let{version:t,isDefault:n}=ad(e);return{types:r0(t),isDefault:n}}function eo(e){switch(e?.kind){case Dn.Kind.MAPPING:return[e.key,e.value];case Dn.Kind.MAP:return e.mappings;case Dn.Kind.SEQ:return e?.items;default:return[]}}function o0(e){switch(e){case Bt.OAS3_1:return rd;case Bt.OAS3_0:return Yb;case Bt.OAS2:return Vb;case Bt.Async2:return Kb;default:return rd}}function Zi(e,t,n){if(typeof t>"u"&&(t={}),typeof n>"u"&&(n=0),!e)return{};let r=e?.mappings||e?.items;if(r){let i=0;for(let o of r)o?.value===null||!o?.value?.value?t[o?.key?.value||i]={value:Fu(o?.value)?o?.value:null,startOffset:o?.key?.value?o.startPosition+o.key.value.length+1:null,endOffset:null,indent:n}:t[o?.key?.value||i]={value:o?.value?.value,rawValue:o?.value?.rawValue||null,startOffset:o?.value?.startPosition||null,endOffset:o?.value?.endPosition||null,indent:n},Object.keys(o?.value||o||{}).includes("items")?(t[o?.key?.value||i]={type:"sequence",startOffset:o.startPosition,endOffset:o.endPosition,indent:n,value:null},Zi(o?.value||o,t[o?.key?.value||i],n+1)):Object.keys(o?.value||o||{}).includes("mappings")&&(t[o?.key?.value||i]={type:"map",startOffset:o.startPosition,endOffset:o.endPosition,indent:n,value:null},Zi(o?.value||o,t[o?.key?.value||i],n+1)),i++}return t}import{mapTypeToComponent as ud}from"@redocly/openapi-core";var Ja={Schema:[{name:"$ref",value:{type:"string",name:"Schema"}}],PathItem:[{name:"$ref",value:{type:"string",name:"PathItem"}}],Parameter:[{name:"$ref",value:{type:"string",name:"Parameter"}}],Response:[{name:"$ref",value:{type:"string",name:"Response"}}],Example:[{name:"$ref",value:{type:"string",name:"Example"}}],RequestBody:[{name:"$ref",value:{type:"string",name:"RequestBody"}}],Header:[{name:"$ref",value:{type:"string",name:"Header"}}],SecuritySchema:[{name:"$ref",value:{type:"string",name:"SecuritySchema"}}],Link:[{name:"$ref",value:{type:"string",name:"Link"}}],Callback:[{name:"$ref",value:{type:"string",name:"Callback"}}]};function ld(e){let t=Ja[e.name];return t&&t.forEach(n=>{e.properties[n.name]=n.value}),e}var to=rt(on(),1),Dt=class{constructor({kind:t,label:n,value:r,textEdit:i,filterText:o,sortText:s,data:u}){this.kind=t||to.CompletionItemKind.Value,this.label=n;let{node:c,lineOffset:p,position:m}=u;this.insertText=r??n,this.filterText=o||this.insertText,this.sortText=s,this.textEdit=i||(c.value==null?void 0:this.getTextEdit(c,m,p))}getTextEdit(t,n,r){let i=t.startPosition-r,o=t.singleQuoted||t.doubleQuoted?2:0,s=i+t.value.length+o;return to.TextEdit.replace({start:{line:n.line,character:i},end:{line:n.line,character:s}},this.insertText)}};var Qn=rt(on(),1),Cn=class{constructor({kind:t,label:n,insertText:r,insertTextFormat:i,filterText:o,sortText:s,data:u}){this.insertTextFormat=i||n.includes("$")?Qn.InsertTextFormat.PlainText:Qn.InsertTextFormat.Snippet,this.kind=t||Qn.CompletionItemKind.Property,this.label=n,this.data=u||{},this.insertText=r??n,this.filterText=o||this.insertText,this.sortText=s,this.command=this.kind===Qn.CompletionItemKind.Property?{title:"Suggested values",command:"editor.action.triggerSuggest"}:null}};var Er={example:"example",default:"default",enum:"enum",ref:"$ref"},no=[Er.default,Er.example];var hd=rt(Zr(),1);var $e={};ec($e,{default:()=>pd.default});vo($e,rt(Ga()));var pd=rt(Ga());function a0(e,t){let n=t.slice(0,t.length-1),{currentType:r}=Qa(e,n);if(r?.name){let[i]=Ja[r.name]||[];return i?.value}return null}function c0(e,t){let n=t[t.length-1];if(Ou(n))return a0(e,t);let{currentType:r}=Qa(e,t);return Xi(r)?r:r?r?.name&&(r?.name.includes("Map")||r?.name.includes("Named"))?{name:qr,properties:{}}:r:null}async function md(e,t){let n=await mn(e),r=n.getText(),i=(0,hd.safeLoad)(r,{filename:e}),{node:o,nodePath:s}=Ka({node:i,nodePath:[]},t,n),u=sd(i,e),c=c0(u,s),p=n._lineOffsets[t.line],m=n.getText({start:n.positionAt(p),end:t});return{currentAst:i,node:o,nodePath:s,position:t,lineText:m,lineOffset:p,openApiType:c}}async function gd(e,t){let n=ye.resolvePath(Fe(e)),r=ye.dirname(n),i=await sc(ye.joinPath(r,t),r.path),o=ye.resolvePath(r,i.path);return{refPath:t,refDirPath:i,refDirAbsolutePath:o,isAbsolutePath:t&&(0,$e.isAbsolute)(t),docAbsolutePath:n,docAbsoluteDirPath:r,root:"/"}}var yd=rt(on(),1);var ro=class extends Dt{constructor(n){super(n);this.kind=yd.CompletionItemKind.Folder,this.command={title:"Complete path",command:"editor.action.triggerSuggest",arguments:[]}}};var vd=rt(on(),1),io=class extends Dt{constructor(t){super(t),this.kind=vd.CompletionItemKind.File}};var u0=Ye.supportedLanguages.concat({languageId:"markdown",filePattern:/\.md$/});function l0(e){let{refPath:t,docAbsoluteDirPath:n,isAbsolutePath:r,root:i}=e,o=(0,$e.resolve)(n.path,t,".."),s=r?o:(0,$e.relative)(n.path,o),u=s&&s!==i?"/":"";return{name:"../",type:1,matchBy:t,sortBy:qe("FolderCompletion"),value:`${s}${u}`}}async function f0(e,t,n){let r=[],{refDirAbsolutePath:i,docAbsolutePath:o}=n;for(let s of e)try{let u=ye.resolvePath(i,s),c=await Ye.fs.stat(u);c.isFile()&&u.path!==o.path&&t.supportedFiles.some(p=>p.filePattern.test(s))&&r.push({name:s,type:0}),c.isDirectory()&&r.push({name:s,type:1})}catch{continue}return r}function bd(e,t){let{docAbsoluteDirPath:n,isAbsolutePath:r,refDirAbsolutePath:i,root:o,refPath:s}=t,u=[];return i.path!==o&&u.push(l0(t)),u.concat(e.map(({name:c,type:p})=>{let m=(0,$e.resolve)(i.path,c),v=(0,$e.relative)(n.path,m),C=s.slice(0,s.lastIndexOf($e.sep)+1),P=r?m:v;if(p===0)return{type:p,name:c,value:P,sortBy:`${qe("FileCompletion")}${c}`,matchBy:`${C}${c}`};let w=`${c}/`;return{type:p,name:w,value:`${P}${v?"/":""}`,sortBy:`${qe("FolderCompletion")}${c}`,matchBy:`${C}${c}`}}))}function _d(e,t){let{node:n,lineOffset:r,position:i}=t;return e.map(o=>{let{name:s,value:u,matchBy:c,sortBy:p,type:m}=o,v={label:s,filterText:or(c,n),sortText:p,value:u,data:{lineOffset:r,position:i,node:n}};return m===1?new ro(v):new io(v)})}async function Rd(e,t){let{node:n}=t,r=n.value??"",i=await gd(e,r),{refDirAbsolutePath:o}=i,s=[];try{s=await Ye.fs.readDir(o)}catch{return _d(bd([],i),t)}let u=await f0(s,{supportedFiles:u0},i);return _d(bd(u,i),t)}function Dd(e,t){if(t?.items)return"- "+Dd(e,t.items);if(t?.required)return Object.values(t.required).map((n,r)=>`${n}: \${${r+1}}`).join(`
|
|
76
|
+
`);if(e==="openapi"){let n="3.1.0",[r,i,o]=n.split(".");return`\${1:${r}}.\${2:${i}}.\${3:${o}}`}return""}function d0(e,t,n,r){if(e===sn)return"";if(r?.items||r?.required){let i=`
|
|
77
77
|
`;return n.includes(`
|
|
78
78
|
`)&&(i+=" "),i}return n.includes(`
|
|
79
|
-
`)||!t?"":" "}function
|
|
80
|
-
`:e?.includes(":")&&!e?.includes(": ")?" ":""}function
|
|
79
|
+
`)||!t?"":" "}function p0(e){return e===sn?"":": "}function h0(e){return e?.includes(":")||e?.includes(": ")?`
|
|
80
|
+
`:e?.includes(":")&&!e?.includes(": ")?" ":""}function m0(e,t){return t?e.includes(`
|
|
81
81
|
`)?`
|
|
82
82
|
`:`
|
|
83
|
-
`:""}function
|
|
84
|
-
`;let r=
|
|
83
|
+
`:""}function Or(e,t,n=!0){if(e===Kn)return`
|
|
84
|
+
`;let r=h0(t?.lineText),i=p0(e),o=e===sn?"":e,s=Dd(e,t),u=d0(e,s,r,t),c=n?m0(r,t?.properties):" ";return`${r}${o}${i}${u}${s}${c}`}function g0(e,t){let{version:n}=cd(e),r=ud(t,n);if(!r)return[];let i=od(e,["components",r]);return i?(eo(i.value||i)||[]).map(({key:{value:s}})=>`#/components/${r}/${s}`):[]}function y0(e){let{node:t,position:n,lineOffset:r}=e,i=no.includes(t.key?.value)?t:no.includes(t.parent?.key?.value)?t.parent:null;return i?i?.parent?.mappings?.find(({key:s})=>s?.value===Er.enum)?.value?.items?.map(({value:s})=>new Dt({label:s,data:{node:t,position:n,lineOffset:r}}))||[]:[]}async function v0(e,t){let{position:n,openApiType:r,currentAst:i,lineOffset:o,node:s}=t,u=g0(i,r.name);return[...await Rd(e,t),...u.map(p=>{let m=or(p,s);return new Dt({label:p,filterText:or(p,s),value:m,sortText:`${qe("LocalComponentCompletion")}${p}`,data:{lineOffset:o,position:n,node:s}})})]}function b0(e){let{openApiType:t,node:n,position:r,lineOffset:i}=e;return t.enum.map(o=>new Dt({label:o,kind:oo.CompletionItemKind.EnumMember,data:{node:n,position:r,lineOffset:i}}))}function _0(e,t){let{node:n,position:r,lineOffset:i}=t;return["true","false"].map(o=>new Dt({label:o,data:{node:n,position:r,lineOffset:i}}))}function R0(e){let{currentAst:t,nodePath:n,node:r,openApiType:i,lineText:o}=e,s=C0(t,n,r);return P0(i,s,o)}async function D0(e,t){let{node:n,nodePath:r,openApiType:i}=t;if(!n)return[];let o=n.key?.value||(r.length?r[r.length-1]:null);return o&&i?.name&&Er.ref===o?v0(e,t):no.includes(o)?y0(t):i?.enum?b0(t):i?.type==="boolean"?_0(e,t):[]}async function Cd(e,t){let n=await md(e,t);return n.openApiType?.properties?R0(n):D0(e,n)}function C0(e,t,n){if(!e)return[];let i=Zi(e);for(let u=0;u<t.length;u++)i[t[u]]&&(i=i[t[u]]);let o=i?Object.keys(i).filter(u=>i[u]&&typeof i[u]=="object"):[],s=n?.value?.mappings||n?.mappings;if(s){let u=s.map(c=>c.key?.value||null);o.push(...u)}return!o.length&&n?.value&&o.push(n.value),o}function P0(e,t,n){if(!e)return[];if(ld(e),Xi(e))return Ya(e?.name).filter(r=>!t.includes(r.label)).map(r=>new Cn({...r,insertText:Or(r.label,{...r.data,...e,lineText:n})}));if(e.properties&&Object.keys(e.properties).length){let r=Object.keys(e.properties).filter(i=>!t.includes(i)).map(i=>{let o={...e.properties[i]||{},lineText:n};return new Cn({label:i,kind:oo.CompletionItemKind.Property,insertText:Or(i,o,!o?.items),sortText:qe(e?.name,i)})});return n.endsWith(":")&&r.push(...Ya(Kn).map(i=>new Cn({...i,insertText:Or(i.label,{...i.data,lineText:n})}))),r}return e.items&&Object.keys(e.items).length?[new Cn({label:sn,kind:oo.CompletionItemKind.Constructor,insertText:Or(sn,{...e,lineText:n}),sortText:qe(sn)})]:[]}var Pd=class{async onCompletion(t){let{uri:n}=t.textDocument;return Bu(n)?[]:Cd(n,t.position)}async onCompletionResolve(t){return t}async validateOpenAPI(t){return za(t)}async onDidChangeWatchedFiles(t){if(t.changes.find(r=>ii.some(i=>r.uri.endsWith(i))))return Ji()}async onDidConfigChange(t){return await Vu(t),Ji()}async onDidChangeConfiguration(){return Ji()}};export{Pd as OpenapiLanguageServer,cr as isConfigFile,Ye as languageServerConfig};
|