@redocly/openapi-language-server 0.2.12 → 0.3.1
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 +635 -0
- package/lib/index.js +27 -26
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Ip=Object.create;var Zr=Object.defineProperty;var jp=Object.getOwnPropertyDescriptor;var Lp=Object.getOwnPropertyNames;var Fp=Object.getPrototypeOf,Up=Object.prototype.hasOwnProperty;var iu=(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 Error('Dynamic require of "'+e+'" is not supported')});var Wp=(e,t)=>()=>(e&&(t=e(e=0)),t);var A=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ou=(e,t)=>{for(var n in t)Zr(e,n,{get:t[n],enumerable:!0})},Xr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Lp(t))!Up.call(e,i)&&i!==n&&Zr(e,i,{get:()=>t[i],enumerable:!(r=jp(t,i))||r.enumerable});return e},ss=(e,t,n)=>(Xr(e,t,"default"),n&&Xr(n,t,"default")),Ge=(e,t,n)=>(n=e!=null?Ip(Fp(e)):{},Xr(t||!e||!e.__esModule?Zr(n,"default",{value:e,enumerable:!0}):n,e)),Hp=e=>Xr(Zr({},"__esModule",{value:!0}),e);var Lt=A(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.isYAMLNode=De.isNodesEqual=De.newMap=De.newSeq=De.newItems=De.newScalar=De.newAnchorRef=De.newMapping=De.Kind=void 0;var xt;(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"})(xt=De.Kind||(De.Kind={}));function zp(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:xt.MAPPING,parent:null,errors:[]};return i}De.newMapping=zp;function Vp(e,t,n,r,i=2){return{errors:[],referencesAnchor:e,value:r,nodeIndent:i,startPosition:t,endPosition:n,kind:xt.ANCHOR_REF,parent:null}}De.newAnchorRef=Vp;function $p(e="",t=2){let n={errors:[],startPosition:-1,endPosition:-1,value:""+e,nodeIndent:t,kind:xt.SCALAR,parent:null,doubleQuoted:!1,rawValue:""+e};return typeof e!="string"&&(n.valueObject=e),n}De.newScalar=$p;function uu(){return{errors:[],startPosition:-1,endPosition:-1,nodeIndent:2,items:[],kind:xt.SEQ,parent:null}}De.newItems=uu;function Yp(){return uu()}De.newSeq=Yp;function Kp(e,t=2){return{errors:[],startPosition:-1,endPosition:-1,nodeIndent:t,mappings:e||[],kind:xt.MAP,parent:null}}De.newMap=Kp;function dr(e,t){if(!e||!t||e.kind!==t.kind)return!1;if(e.kind===xt.SCALAR)return e.value===t.value;if(e.kind===xt.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(!dr(o,s))return!1}return!0}if(e.kind===xt.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=>dr(o,c.key));if(u){if(!dr(s,u.value))return!1}else return!1}return!0}if(xt.MAPPING===e.kind){let n=e,r=t;return dr(n.key,r.key)}return!1}De.isNodesEqual=dr;function Gp(e){return e.startPosition!==void 0&&e.endPosition!==void 0&&e.kind!==void 0}De.isYAMLNode=Gp});var fn=A(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.isNegativeZero=Qe.repeat=Qe.extend=Qe.toArray=Qe.isObject=Qe.isNothing=void 0;function lu(e){return typeof e>"u"||e===null}Qe.isNothing=lu;function Qp(e){return typeof e=="object"&&e!==null}Qe.isObject=Qp;function Jp(e){return Array.isArray(e)?e:lu(e)?[]:[e]}Qe.toArray=Jp;function Xp(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}Qe.extend=Xp;function Zp(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}Qe.repeat=Zp;function eg(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}Qe.isNegativeZero=eg});var Nn=A((F0,du)=>{"use strict";var ei=class e{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==e.CLASS_IDENTIFIER)return!0}return!1}getClassIdentifier(){var t=[];return t.concat(e.CLASS_IDENTIFIER)}toString(t=!1){var n;return n="JS-YAML: "+(this.reason||"(unknown reason)"),!t&&this.mark&&(n+=" "+this.mark.toString()),n}};ei.CLASS_IDENTIFIER="yaml-ast-parser.YAMLException";du.exports=ei});var gu=A((U0,pu)=>{"use strict";var fu=fn(),ls=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
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),fu.repeat(" ",t)+r+u+o+`
|
|
4
4
|
`+fu.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}};pu.exports=ls});var
|
|
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 _s(e,t){var n=Ss(e,t);e.onWarning&&e.onWarning.call(null,n)}var fl={YAML:function(t,n,r){var i,o,s;t.version!==null&&$(t,"duplication of %YAML directive"),r.length!==1&&$(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&$(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&$(t,"found incompatible YAML document (version 1.2 is required)"),t.version=r[0],t.checkLineBreaks=s<2,s!==2&&$(t,"found incompatible YAML document (version 1.2 is required)")},TAG:function(t,n,r){var i,o;r.length!==2&&$(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],yl.test(i)||$(t,"ill-formed tag handle (first argument) of the TAG directive"),ci.call(t.tagMap,i)&&$(t,'there is a previously declared suffix for "'+i+'" tag handle'),bl.test(o)||$(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=o}};function Jt(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||$(e,"expected valid JSON character");else
|
|
9
|
-
`,n-1))}function
|
|
5
|
+
`+n)),r}};pu.exports=ls});var Ie=A(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.Type=void 0;var mu=Nn(),tg=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],ng=["scalar","sequence","mapping"];function rg(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}var ds=class{constructor(t,n){if(n=n||{},Object.keys(n).forEach(function(r){if(tg.indexOf(r)===-1)throw new mu('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=rg(n.styleAliases||null),ng.indexOf(this.kind)===-1)throw new mu('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}};ti.Type=ds});var On=A(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.Schema=void 0;var hu=fn(),ni=Nn(),ig=Ie();function fs(e,t,n){var r=[];return e.include.forEach(function(i){n=fs(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 og(){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 Gt=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 ni("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=fs(this,"implicit",[]),this.compiledExplicit=fs(this,"explicit",[]),this.compiledTypeMap=og(this.compiledImplicit,this.compiledExplicit)}};ri.Schema=Gt;Gt.DEFAULT=null;Gt.create=function(...t){var n,r;switch(t.length){case 1:n=Gt.DEFAULT,r=t[0];break;case 2:n=t[0],r=t[1];break;default:throw new ni("Wrong number of arguments for Schema.create function")}if(n=hu.toArray(n),r=hu.toArray(r),!n.every(function(i){return i instanceof Gt}))throw new ni("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(i){return i instanceof ig.Type}))throw new ni("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Gt({include:n,explicit:r})}});var bu=A((B0,yu)=>{"use strict";var sg=Ie();yu.exports=new sg.Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var Cu=A((z0,vu)=>{"use strict";var ag=Ie();vu.exports=new ag.Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var _u=A((V0,Pu)=>{"use strict";var cg=Ie();Pu.exports=new cg.Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Ru=A(($0,Du)=>{"use strict";var ug=On();Du.exports=new ug.Schema({explicit:[bu(),Cu(),_u()]})});var xu=A((Y0,Tu)=>{"use strict";var lg=Ie(),Su=Lt();function dg(e){let t=Su.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 fg(e){return Su.isYAMLNode(e)?e:null}function pg(e){return e===null}Tu.exports=new lg.Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:dg,construct:fg,predicate:pg,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var Au=A((K0,ku)=>{"use strict";var gg=Ie(),wu=Lt();function mg(e){let t=wu.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 hg(e){return wu.isYAMLNode(e)?e:e==="true"||e==="True"||e==="TRUE"}function yg(e){return Object.prototype.toString.call(e)==="[object Boolean]"}ku.exports=new gg.Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:mg,construct:hg,predicate:yg,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 Ou=A((G0,Nu)=>{"use strict";var bg=fn(),vg=Ie(),qu=Lt();function Cg(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Pg(e){return 48<=e&&e<=55}function _g(e){return 48<=e&&e<=57}function Dg(e){let t=qu.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(!Cg(t.charCodeAt(r)))return!1;i=!0}return i}for(;r<n;r++)if(o=t[r],o!=="_"){if(!Pg(t.charCodeAt(r)))return!1;i=!0}return i}for(;r<n;r++)if(o=t[r],o!=="_"){if(o===":")break;if(!_g(t.charCodeAt(r)))return!1;i=!0}return i?o!==":"?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(r)):!1}function Rg(e){if(qu.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 Sg(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!bg.isNegativeZero(e)}Nu.exports=new vg.Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:Dg,construct:Rg,predicate:Sg,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 ju=A((Q0,Iu)=>{"use strict";var Eu=fn(),Tg=Ie(),Mu=Lt(),xg=new RegExp("-?(0|[1-9][0-9]*)(.[0-9]*)?([eE][-+]?[0-9]+)?|^0$|^[-+]?.(inf|Inf|INF)$|^.(nan|NaN|NAN)$");function wg(e){let t=Mu.isYAMLNode(e)?e.value:e;return!(t===null||!xg.test(t))}function kg(e){if(Mu.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 Ag(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(Eu.isNegativeZero(e))return"-0.0";return e.toString(10)}function qg(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Eu.isNegativeZero(e))}Iu.exports=new Tg.Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:wg,construct:kg,predicate:qg,represent:Ag,defaultStyle:"lowercase"})});var Fu=A((J0,Lu)=>{"use strict";var Ng=On();Lu.exports=new Ng.Schema({include:[Ru()],implicit:[xu(),Au(),Ou(),ju()]})});var Wu=A((X0,Uu)=>{"use strict";var Og=On();Uu.exports=new Og.Schema({include:[Fu()]})});var zu=A((Z0,Bu)=>{"use strict";var Eg=Ie(),Hu=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 Mg(e){if(e===null)return!1;var t,n,r,i,o,s,u,c=0,p=null,g,b,D;return t=Hu.exec(e),t!==null}function Ig(e){var t,n,r,i,o,s,u,c=0,p=null,g,b,D;if(t=Hu.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]&&(g=+t[10],b=+(t[11]||0),p=(g*60+b)*6e4,t[9]==="-"&&(p=-p)),D=new Date(Date.UTC(n,r,i,o,s,u,c)),p&&D.setTime(D.getTime()-p),D}function jg(e){return e.toISOString()}Bu.exports=new Eg.Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Mg,construct:Ig,instanceOf:Date,represent:jg})});var $u=A((eD,Vu)=>{"use strict";var Lg=Ie();function Fg(e){return e==="<<"||e===null}Vu.exports=new Lg.Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Fg})});var Yu={};ou(Yu,{default:()=>Ug});var Ug,Ku=Wp(()=>{Ug={}});var Qu=A((tD,Gu)=>{"use strict";var ii=(Ku(),Hp(Yu)).Buffer,Wg=Ie(),ps=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
6
|
+
\r`;function Hg(e){if(e===null)return!1;var t,n,r=0,i=0,o=e.length,s=ps;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 Bg(e){var t,n,r,i=e.replace(/[\r\n=]/g,""),o=i.length,s=ps,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),ii?new ii(c):c}function zg(e){var t="",n=0,r,i,o=e.length,s=ps;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 Vg(e){return ii&&ii.isBuffer(e)}Gu.exports=new Wg.Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Hg,construct:Bg,predicate:Vg,represent:zg})});var Xu=A((nD,Ju)=>{"use strict";var $g=Ie(),Yg=Object.prototype.hasOwnProperty,Kg=Object.prototype.toString;function Gg(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,Kg.call(i)!=="[object Object]")return!1;for(o in i)if(Yg.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 Qg(e){return e!==null?e:[]}Ju.exports=new $g.Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Gg,construct:Qg})});var el=A((rD,Zu)=>{"use strict";var Jg=Ie(),gs=Lt(),Xg=Object.prototype.toString;function Zg(e){if(e===null)return!0;if(e.kind!=gs.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],Xg.call(r)!=="[object Object]"||!Array.isArray(r.mappings)||r.mappings.length!==1)return!1;return!0}function em(e){if(e===null||!Array.isArray(e.items))return[];let t,n,r,i,o=e.items;for(i=gs.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=gs.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}Zu.exports=new Jg.Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Zg,construct:em})});var nl=A((iD,tl)=>{"use strict";var tm=Ie(),nm=Lt();function rm(e){return e===null?!0:e.kind==nm.Kind.MAP}function im(e){return e!==null?e:{}}tl.exports=new tm.Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:rm,construct:im})});var oi=A((oD,rl)=>{"use strict";var om=On(),sm=new om.Schema({include:[Wu()],implicit:[zu(),$u()],explicit:[Qu(),Xu(),el(),nl()]});rl.exports=sm});var ol=A((sD,il)=>{"use strict";var am=Ie();function cm(){return!0}function um(){}function lm(){return""}function dm(e){return typeof e>"u"}il.exports=new am.Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:cm,construct:um,predicate:dm,represent:lm})});var al=A((aD,sl)=>{"use strict";var fm=Ie();function pm(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 gm(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 mm(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function hm(e){return Object.prototype.toString.call(e)==="[object RegExp]"}sl.exports=new fm.Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:pm,construct:gm,predicate:hm,represent:mm})});var ms=A((cD,ll)=>{"use strict";var cl=On(),ul=new cl.Schema({include:[oi()],explicit:[ol(),al()]});cl.Schema.DEFAULT=ul;ll.exports=ul});var Dl=A((wt,pr)=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.safeLoad=wt.safeLoadAll=wt.load=wt.loadAll=void 0;var Xe=Lt(),Qt=fn(),Ds=Nn(),Rs=gu(),gl=oi(),ym=ms(),ci=Object.prototype.hasOwnProperty,si=1,ml=2,hl=3,ai=4,hs=1,bm=2,dl=3,vm=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Cm=/[\x85\u2028\u2029]/,Pm=/[,\[\]\{\}]/,yl=/^(?:!|!!|![a-z\-]+!)$/i,bl=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function mt(e){return e===10||e===13}function gn(e){return e===9||e===32}function Je(e){return e===9||e===32||e===10||e===13}function En(e){return e===44||e===91||e===93||e===123||e===125}function _m(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function Dm(e){return e===120?2:e===117?4:e===85?8:0}function Rm(e){return 48<=e&&e<=57?e-48:-1}function Sm(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 Tm(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var ys=new Array(256),bs=new Array(256),vl=new Array(256),vs=new Array(256);for(ot=0;ot<256;ot++)vs[ot]=bs[ot]=Sm(ot),ys[ot]=bs[ot]?1:0,vl[ot]=1,ys[ot]||(vs[ot]="\\"+String.fromCharCode(ot));var ot,Cs=class{constructor(t,n){this.errorMap={},this.errors=[],this.lines=[],this.input=t,this.filename=n.filename||null,this.schema=n.schema||ym,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 Ss(e,t,n=!1){return new Ds(t,new Rs(e.filename,e.input,e.position,e.line,e.position-e.lineStart),n)}function Ps(e,t,n,r=!1,i=!1){var o=xm(e,t);if(o){var s=n+t;if(!e.errorMap[s]){var u=new Rs(e.filename,e.input,t,o.line,t-o.start);i&&(u.toLineEnd=!0);var c=new Ds(n,u,r);e.errors.push(c)}}}function $(e,t){var n=Ss(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 _s(e,t){var n=Ss(e,t);e.onWarning&&e.onWarning.call(null,n)}var fl={YAML:function(t,n,r){var i,o,s;t.version!==null&&$(t,"duplication of %YAML directive"),r.length!==1&&$(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&$(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&$(t,"found incompatible YAML document (version 1.2 is required)"),t.version=r[0],t.checkLineBreaks=s<2,s!==2&&$(t,"found incompatible YAML document (version 1.2 is required)")},TAG:function(t,n,r){var i,o;r.length!==2&&$(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],yl.test(i)||$(t,"ill-formed tag handle (first argument) of the TAG directive"),ci.call(t.tagMap,i)&&$(t,'there is a previously declared suffix for "'+i+'" tag handle'),bl.test(o)||$(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=o}};function Jt(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||$(e,"expected valid JSON character");else vm.test(u)&&$(e,"the stream contains non-printable characters");c.value+=u,c.endPosition=n}}function pn(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:Xe.Kind.MAP,nodeIndent:o});var u=Xe.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=>{Xe.isNodesEqual(c,u)&&(Ps(e,u.key.startPosition,"duplicate key"),Ps(e,c.key.startPosition,"duplicate key"))}),t.mappings.push(u),t.endPosition=s,t}}function Ts(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++):$(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.lines.push({start:e.lineStart,line:e.line})}function xm(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 he(e,t,n,r=!1){for(var i=0,o=e.input.charCodeAt(e.position);o!==0;){for(;gn(o);)o===9&&e.errors.push(Ss(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(mt(o))for(Ts(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&&_s(e,"deficient indentation"),i}function fr(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||Je(n)))}function xs(e,t,n){n===1?t.value+=" ":n>1&&(t.value+=Qt.repeat(`
|
|
9
|
+
`,n-1))}function wm(e,t,n){var r,i,o,s,u,c,p,g,b=e.kind,D=e.result,R,T=Xe.newScalar("",t);if(T.plainScalar=!0,e.result=T,R=e.input.charCodeAt(e.position),Je(R)||En(R)||R===35||R===38||R===42||R===33||R===124||R===62||R===39||R===34||R===37||R===64||R===96)return e.result.startPosition=e.position-1,e.result.endPosition=e.position-1,!1;if((R===63||R===45)&&(i=e.input.charCodeAt(e.position+1),Je(i)||n&&En(i)))return!1;for(e.kind="scalar",o=s=e.position,u=!1;R!==0;){if(R===58){if(i=e.input.charCodeAt(e.position+1),Je(i)||n&&En(i))break}else if(R===35){if(r=e.input.charCodeAt(e.position-1),Je(r))break}else{if(e.position===e.lineStart&&fr(e)||n&&En(R))break;if(mt(R))if(c=e.line,p=e.lineStart,g=e.lineIndent,he(e,!1,-1),e.lineIndent>=t){u=!0,R=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=p,e.lineIndent=g;break}}if(u&&(Jt(e,o,s,!1),xs(e,T,e.line-c),o=s=e.position,u=!1),gn(R)||(s=e.position+1),R=e.input.charCodeAt(++e.position),e.position>=e.input.length)return!1}return Jt(e,o,s,!1),e.result.startPosition!=-1?(T.rawValue=e.input.substring(T.startPosition,T.endPosition),e.result.endPosition=he(e,!1,-1)?e.position-1:e.position,!0):(e.kind=b,e.result=D,!1)}function km(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;var o=Xe.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(Jt(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 mt(n)?(Jt(e,r,i,!0),xs(e,o,he(e,!1,t)),r=i=e.position):e.position===e.lineStart&&fr(e)?$(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position,o.endPosition=e.position);$(e,"unexpected end of the stream within a single quoted scalar")}function Am(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=Xe.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 Jt(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(Jt(e,n,e.position,!0),c=e.input.charCodeAt(++e.position),mt(c))he(e,!1,t);else if(c<256&&(e.allowAnyEscape?vl[c]:ys[c]))p.value+=e.allowAnyEscape?vs[c]:bs[c],e.position++;else if((s=Dm(c))>0){for(i=s,o=0;i>0;i--)c=e.input.charCodeAt(++e.position),(s=_m(c))>=0?o=(o<<4)+s:$(e,"expected hexadecimal character");p.value+=Tm(o),e.position++}else $(e,"unknown escape sequence");n=r=e.position}else mt(c)?(Jt(e,n,r,!0),xs(e,p,he(e,!1,t)),n=r=e.position):e.position===e.lineStart&&fr(e)?$(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}$(e,"unexpected end of the stream within a double quoted scalar")}function qm(e,t){var n=!0,r,i=e.tag,o,s=e.anchor,u,c,p,g,b,D,R,T,q;if(q=e.input.charCodeAt(e.position),q===91)c=93,b=!1,o=Xe.newItems(),o.startPosition=e.position;else if(q===123)c=125,b=!0,o=Xe.newMap(null,t),o.startPosition=e.position;else return!1;for(e.anchor!==null&&(o.anchorId=e.anchor,e.anchorMap[e.anchor]=o),q=e.input.charCodeAt(++e.position);q!==0;){if(he(e,!0,t),q=e.input.charCodeAt(e.position),q===c)return e.position++,e.tag=i,e.anchor=s,e.kind=b?"mapping":"sequence",e.result=o,o.endPosition=e.position,!0;if(!n){var B=e.position;$(e,"missed comma between flow collection entries"),e.position=B+1}if(R=D=T=null,p=g=!1,q===63&&(u=e.input.charCodeAt(e.position+1),Je(u)&&(p=g=!0,e.position++,he(e,!0,t))),r=e.line,Mn(e,t,si,!1,!0),R=e.tag,D=e.result,he(e,!0,t),q=e.input.charCodeAt(e.position),(g||e.line===r)&&q===58&&(p=!0,q=e.input.charCodeAt(++e.position),he(e,!0,t),Mn(e,t,si,!1,!0),T=e.result),b)pn(e,o,R,D,T,t);else if(p){var j=pn(e,null,R,D,T,t);j.parent=o,o.items.push(j)}else D&&(D.parent=o),o.items.push(D);o.endPosition=e.position+1,he(e,!0,t),q=e.input.charCodeAt(e.position),q===44?(n=!0,q=e.input.charCodeAt(++e.position)):n=!1}$(e,"unexpected end of the stream within a flow collection")}function Nm(e,t){var n,r,i=hs,o=!1,s=t,u=0,c=!1,p,g;if(g=e.input.charCodeAt(e.position),g===124)r=!1;else if(g===62)r=!0;else return!1;var b=Xe.newScalar("",t);for(e.kind="scalar",e.result=b,b.startPosition=e.position;g!==0;)if(g=e.input.charCodeAt(++e.position),g===43||g===45)hs===i?i=g===43?dl:bm:$(e,"repeat of a chomping mode identifier");else if((p=Rm(g))>=0)p===0?$(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?$(e,"repeat of an indentation width identifier"):(s=t+p-1,o=!0);else break;if(gn(g)){do g=e.input.charCodeAt(++e.position);while(gn(g));if(g===35)do g=e.input.charCodeAt(++e.position);while(!mt(g)&&g!==0)}for(;g!==0;){for(Ts(e),e.lineIndent=0,g=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&g===32;)e.lineIndent++,g=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),mt(g)){u++;continue}if(e.lineIndent<s){i===dl?b.value+=Qt.repeat(`
|
|
10
10
|
`,u):i===hs&&o&&(b.value+=`
|
|
11
11
|
`);break}for(r?gn(g)?(c=!0,b.value+=Qt.repeat(`
|
|
12
12
|
`,u+1)):c?(c=!1,b.value+=Qt.repeat(`
|
|
13
13
|
`,u+1)):u===0?o&&(b.value+=" "):b.value+=Qt.repeat(`
|
|
14
14
|
`,u):o&&(b.value+=Qt.repeat(`
|
|
15
15
|
`,u+1)),o=!0,u=0,n=e.position;!mt(g)&&g!==0;)g=e.input.charCodeAt(++e.position);Jt(e,n,e.position,!1)}b.endPosition=e.position;for(var D=e.position-1,R=!1;;){var T=e.input[D];if(T=="\r"||T==`
|
|
16
|
-
`){R&&D--;break}if(T!=" "&&T!=" ")break;D--}return b.endPosition=D,b.rawValue=e.input.substring(b.startPosition,b.endPosition),!0}function pl(e,t){var n,r=e.tag,i=e.anchor,o=Xe.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),!Je(s)));){if(u=!0,e.position++,he(e,!0,-1)&&e.lineIndent<=t){o.items.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,Mn(e,t,hl,!1,!0),e.result&&(e.result.parent=o,o.items.push(e.result)),o.endPosition=he(e,!0,t,!0)?e.position-1:e.position,c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)$(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
|
|
16
|
+
`){R&&D--;break}if(T!=" "&&T!=" ")break;D--}return b.endPosition=D,b.rawValue=e.input.substring(b.startPosition,b.endPosition),!0}function pl(e,t){var n,r=e.tag,i=e.anchor,o=Xe.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),!Je(s)));){if(u=!0,e.position++,he(e,!0,-1)&&e.lineIndent<=t){o.items.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,Mn(e,t,hl,!1,!0),e.result&&(e.result.parent=o,o.items.push(e.result)),o.endPosition=he(e,!0,t,!0)?e.position-1:e.position,c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)$(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 Om(e,t,n){var r,i,o,s=e.tag,u=e.anchor,c=Xe.newMap(null,t),p=null,g=null,b=null,D=!1,R=!1,T;for(c.startPosition=e.position,e.anchor!==null&&(c.anchorId=e.anchor,e.anchorMap[e.anchor]=c),T=e.input.charCodeAt(e.position);T!==0;){if(r=e.input.charCodeAt(e.position+1),o=e.line,(T===63||T===58)&&Je(r))T===63?(D&&(pn(e,c,p,g,null,t),p=g=b=null),R=!0,D=!0,i=!0):D?(D=!1,i=!0):$(e,"incomplete explicit mapping pair; a key node is missed"),e.position+=1,T=r;else if(Mn(e,n,ml,!1,!0))if(e.line===o){for(T=e.input.charCodeAt(e.position);gn(T);)T=e.input.charCodeAt(++e.position);if(T===58)T=e.input.charCodeAt(++e.position),Je(T)||$(e,"a whitespace character is expected after the key-value separator within a block mapping"),D&&(pn(e,c,p,g,null,t),p=g=b=null),R=!0,D=!1,i=!1,p=e.tag,g=e.result;else{if(e.position==e.lineStart&&fr(e))break;if(R)$(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=s,e.anchor=u,!0}}else if(R){for($(e,"can not read a block mapping entry; a multiline key may not be an implicit key");e.position>0;)if(T=e.input.charCodeAt(--e.position),mt(T)){e.position++;break}g=e.result,g.value=e.input.substring(e.result.startPosition,e.position-1),g.rawValue=g.value,g.endPosition=e.position-1,pn(e,c,p,g,null,t)}else return e.tag=s,e.anchor=u,!0;else break;if(e.line===o||e.lineIndent>t){let q=e.line;Mn(e,t,ai,!0,i)?(he(e,!0,t),D?g=e.result:(b=e.result,b.endPosition=e.line===q?e.position:e.position-1)):g&&(g.endPosition=e.line===q?e.position:e.position-1),D||(pn(e,c,p,g,b,t),p=g=b=null),he(e,!0,-1),T=e.input.charCodeAt(e.position)}if(e.lineIndent>t&&T!==0)$(e,"bad indentation of a mapping entry"+e.position),T=e.input.charCodeAt(++e.position),he(e,!0,-1);else if(e.lineIndent<t)break}return D&&pn(e,c,p,g,null,t),R&&(e.tag=s,e.anchor=u,e.kind="mapping",e.result=c),R}function Em(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&&$(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)):$(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Je(s);)s===33&&(r?$(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),yl.test(i)||$(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),Pm.test(o)&&$(e,"tag suffix cannot contain flow indicator characters")}return o&&!bl.test(o)&&$(e,"tag name cannot contain such characters: "+o),n?e.tag=o:ci.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:$(e,'undeclared tag handle "'+i+'"'),!0}function Mm(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&$(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Je(n)&&!En(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&$(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Im(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&&!Je(o)&&!En(o);)o=e.input.charCodeAt(++e.position);return e.position<=t&&($(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)||($(e,'unidentified alias "'+n+'"'),e.position<=t&&(e.position=t+1)),e.result=Xe.newAnchorRef(n,t,e.position,e.anchorMap[n],0),he(e,!0,-1),!0}function Mn(e,t,n,r,i){var o,s,u,c=1,p=!1,g=!1,b,D,R,T,q,B;e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=u=ai===n||hl===n,r&&he(e,!0,-1)&&(p=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1));let j=e.position;if(c===1)for(;Em(e)||Mm(e);)he(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||ai===n)&&(si===n||ml===n?T=t:T=t+1,q=e.position-e.lineStart,c===1?u&&(pl(e,q)||Om(e,q,T))||qm(e,T)?g=!0:(s&&Nm(e,T)||km(e,T)||Am(e,T)?g=!0:Im(e)?(g=!0,(e.tag!==null||e.anchor!==null)&&$(e,"alias node should not have any properties")):wm(e,T,si===n)&&(g=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result,e.result.anchorId=e.anchor)):c===0&&(g=u&&pl(e,q))),e.tag!==null&&e.tag!=="!")if(e.tag=="!include")e.result||(e.result=Xe.newScalar("",q),e.result.startPosition=e.position,e.result.endPosition=e.position,$(e,"!include without value")),e.result.kind=Xe.Kind.INCLUDE_REF;else if(e.tag==="?")for(b=0,D=e.implicitTypes.length;b<D;b+=1){R=e.implicitTypes[b];var _=e.result.value;if(R.resolve(_)){e.result.valueObject=R.construct(e.result.value),e.tag=R.tag,e.anchor!==null&&(e.result.anchorId=e.anchor,e.anchorMap[e.anchor]=e.result);break}}else ci.call(e.typeMap,e.tag)?(R=e.typeMap[e.tag],e.result!==null&&R.kind!==e.kind&&(!R.additionalKinds||R.additionalKinds&&R.additionalKinds.indexOf(e.kind)===-1)&&$(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+R.kind+'", not "'+e.kind+'"'),R.resolve(e.result)?(e.result=R.construct(e.result),e.anchor!==null&&(e.result.anchorId=e.anchor,e.anchorMap[e.anchor]=e.result)):$(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):Ps(e,j,"unknown tag <"+e.tag+">",!1,!0);return e.tag!==null||e.anchor!==null||g}function jm(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&&(he(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&&!Je(s);)s=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&$(e,"directive name must not be less than one character in length");s!==0;){for(;gn(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!mt(s));break}if(mt(s))break;for(n=e.position;s!==0&&!Je(s);)s=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}s!==0&&Ts(e),ci.call(fl,r)?fl[r](e,r,i):(_s(e,'unknown document directive "'+r+'"'),e.position++)}if(he(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,he(e,!0,-1)):o&&$(e,"directives end mark is expected"),Mn(e,e.lineIndent-1,ai,!1,!0),he(e,!0,-1),e.checkLineBreaks&&Cm.test(e.input.slice(t,e.position))&&_s(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&fr(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,he(e,!0,-1));return}if(e.position<e.length-1)$(e,"end of the stream or a document separator is expected");else return}function Cl(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
17
|
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Cs(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(jm(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 ws(e,t,n={}){var r=Cl(e,n),i,o;for(i=0,o=r.length;i<o;i+=1)t(r[i])}wt.loadAll=ws;function ks(e,t={}){var n=Cl(e,t),r,i;if(n.length!==0){if(n.length===1)return n[0];var o=new Ds("expected a single document in the stream, but found more");return o.mark=new Rs("","",0,0,0),o.mark.position=n[0].endPosition,n[0].errors.push(o),n[0]}}wt.load=ks;function Pl(e,t,n={}){ws(e,t,Qt.extend({schema:gl},n))}wt.safeLoadAll=Pl;function _l(e,t={}){return ks(e,Qt.extend({schema:gl},t))}wt.safeLoad=_l;pr.exports.loadAll=ws;pr.exports.load=ks;pr.exports.safeLoadAll=Pl;pr.exports.safeLoad=_l});var Al=A(
|
|
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 ws(e,t,n={}){var r=Cl(e,n),i,o;for(i=0,o=r.length;i<o;i+=1)t(r[i])}wt.loadAll=ws;function ks(e,t={}){var n=Cl(e,t),r,i;if(n.length!==0){if(n.length===1)return n[0];var o=new Ds("expected a single document in the stream, but found more");return o.mark=new Rs("","",0,0,0),o.mark.position=n[0].endPosition,n[0].errors.push(o),n[0]}}wt.load=ks;function Pl(e,t,n={}){ws(e,t,Qt.extend({schema:gl},n))}wt.safeLoadAll=Pl;function _l(e,t={}){return ks(e,Qt.extend({schema:gl},t))}wt.safeLoad=_l;pr.exports.loadAll=ws;pr.exports.load=ks;pr.exports.safeLoadAll=Pl;pr.exports.safeLoad=_l});var Al=A(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.safeDump=In.dump=void 0;var gr=fn(),Ms=Nn(),Lm=ms(),Fm=oi(),Is=Object.prototype.toString,xl=Object.prototype.hasOwnProperty,Um=9,mn=10,Wm=13,As=32,Hm=33,qs=34,Bm=35,zm=37,Vm=38,Ns=39,$m=42,Ym=44,Km=45,Gm=58,Qm=62,Jm=63,Xm=64,Zm=91,eh=93,th=96,nh=123,rh=124,ih=125,Oe={};Oe[0]="\\0";Oe[7]="\\a";Oe[8]="\\b";Oe[9]="\\t";Oe[10]="\\n";Oe[11]="\\v";Oe[12]="\\f";Oe[13]="\\r";Oe[27]="\\e";Oe[34]='\\"';Oe[92]="\\\\";Oe[133]="\\N";Oe[160]="\\_";Oe[8232]="\\L";Oe[8233]="\\P";var oh=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function sh(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&&xl.call(c.styleAliases,u)&&(u=c.styleAliases[u]),n[s]=u;return n}function ah(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 Ms("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+gr.repeat("0",r-t.length)+t}function ch(e){this.schema=e.schema||Lm,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=gr.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=sh(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 Rl(e,t){for(var n=gr.repeat(" ",t),r=0,i=-1,o="",s,u=e.length;r<u;)i=e.indexOf(`
|
|
19
19
|
`,r),i===-1?(s=e.slice(r),r=u):(s=e.slice(r,i+1),r=i+1),s.length&&s!==`
|
|
20
20
|
`&&(o+=n),o+=s;return o}function Os(e,t){return`
|
|
21
|
-
`+gr.repeat(" ",e.indent*t)}function
|
|
21
|
+
`+gr.repeat(" ",e.indent*t)}function uh(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 ui(e){this.source=e,this.result="",this.checkpoint=0}ui.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};ui.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=Oe[e]||ah(e),this.result+=t,this.checkpoint+=1,this};ui.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)};function lh(e,t,n){var r,i,o,s,u,c,p,g,b,D,R,T,q,B,j,_,v,N,z,J,ae;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(oh.indexOf(t)!==-1){e.dump="'"+t+"'";return}for(r=!0,i=t.length?t.charCodeAt(0):0,o=As===i||As===t.charCodeAt(t.length-1),(Km===i||Jm===i||Xm===i||th===i)&&(r=!1),o?(r=!1,s=!1,u=!1):(s=!0,u=!0),c=!0,p=new ui(t),g=!1,b=0,D=0,R=e.indent*n,T=80,R<40?T-=R:T=40,B=0;B<t.length;B++){if(q=t.charCodeAt(B),r)if(!fh(q))r=!1;else continue;c&&q===Ns&&(c=!1),j=Oe[q],_=wl(q),!(!j&&!_)&&(q!==mn&&q!==qs&&q!==Ns?(s=!1,u=!1):q===mn&&(g=!0,c=!1,B>0&&(v=t.charCodeAt(B-1),v===As&&(u=!1,s=!1)),s&&(N=B-b,b=B,N>D&&(D=N))),q!==qs&&(c=!1),p.takeUpTo(B),p.escapeChar())}if(r&&uh(e,t)&&(r=!1),z="",(s||u)&&(J=0,t.charCodeAt(t.length-1)===mn&&(J+=1,t.charCodeAt(t.length-2)===mn&&(J+=1)),J===0?z="-":J===2&&(z="+")),u&&D<T&&(s=!1),g||(u=!1),r)e.dump=t;else if(c)e.dump="'"+t+"'";else if(s)ae=dh(t,T),e.dump=">"+z+`
|
|
22
22
|
`+Rl(ae,R);else if(u)z||(t=t.replace(/\n$/,"")),e.dump="|"+z+`
|
|
23
|
-
`+Rl(t,R);else if(p)p.finish(),e.dump='"'+p.result+'"';else throw new Error("Failed to dump scalar value")}function
|
|
23
|
+
`+Rl(t,R);else if(p)p.finish(),e.dump='"'+p.result+'"';else throw new Error("Failed to dump scalar value")}function dh(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
26
|
`),n+=Sl(e.slice(r,i),t),r=i):(n&&(n+=`
|
|
@@ -29,12 +29,12 @@ var Mp=Object.create;var Zr=Object.defineProperty;var jp=Object.getOwnPropertyDe
|
|
|
29
29
|
`&&(n+=o[0]),n}function Sl(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
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=kl;function yh(e,t){return kl(e,gr.extend({schema:Lm},t))}jn.safeDump=yh});var ql=A(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.determineScalarType=et.ScalarType=et.parseYamlFloat=et.parseYamlInteger=et.parseYamlBoolean=void 0;function bh(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=bh;function vh(e){return e.lastIndexOf("0o",0)===0?parseInt(e.substring(2),8):parseInt(e)}function Ch(e){let t=vh(e);if(isNaN(t))throw`Invalid integer "${e}"`;return t}et.parseYamlInteger=Ch;function Ph(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=Ph;var Ft;(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"})(Ft=et.ScalarType||(et.ScalarType={}));function _h(e){if(e===void 0)return Ft.null;if(e.doubleQuoted||!e.plainScalar||e.singleQuoted)return Ft.string;let t=e.value;if(["null","Null","NULL","~",""].indexOf(t)>=0||t==null)return Ft.null;if(["true","True","TRUE","false","False","FALSE"].indexOf(t)>=0)return Ft.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 Ft.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?Ft.float:Ft.string}et.determineScalarType=_h});var mr=A(Re=>{"use strict";var Dh=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]}),Nl=Re&&Re.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Dh(t,e,n)};Object.defineProperty(Re,"__esModule",{value:!0});Re.safeDump=Re.dump=Re.safeLoadAll=Re.safeLoad=Re.loadAll=Re.load=void 0;var li=Dl();Object.defineProperty(Re,"load",{enumerable:!0,get:function(){return li.load}});Object.defineProperty(Re,"loadAll",{enumerable:!0,get:function(){return li.loadAll}});Object.defineProperty(Re,"safeLoad",{enumerable:!0,get:function(){return li.safeLoad}});Object.defineProperty(Re,"safeLoadAll",{enumerable:!0,get:function(){return li.safeLoadAll}});var Ol=Al();Object.defineProperty(Re,"dump",{enumerable:!0,get:function(){return Ol.dump}});Object.defineProperty(Re,"safeDump",{enumerable:!0,get:function(){return Ol.safeDump}});Re.YAMLException=Nn();Nl(Lt(),Re);Nl(ql(),Re)});var zn=A(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 ab(e){return e===!0||e===!1}Be.boolean=ab;function sd(e){return typeof e=="string"||e instanceof String}Be.string=sd;function cb(e){return typeof e=="number"||e instanceof Number}Be.number=cb;function ub(e){return e instanceof Error}Be.error=ub;function lb(e){return typeof e=="function"}Be.func=lb;function ad(e){return Array.isArray(e)}Be.array=ad;function db(e){return ad(e)&&e.every(t=>sd(t))}Be.stringArray=db});var xa=A(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.Message=H.NotificationType9=H.NotificationType8=H.NotificationType7=H.NotificationType6=H.NotificationType5=H.NotificationType4=H.NotificationType3=H.NotificationType2=H.NotificationType1=H.NotificationType0=H.NotificationType=H.RequestType9=H.RequestType8=H.RequestType7=H.RequestType6=H.RequestType5=H.RequestType4=H.RequestType3=H.RequestType2=H.RequestType1=H.RequestType=H.RequestType0=H.AbstractMessageSignature=H.ParameterStructures=H.ResponseError=H.ErrorCodes=void 0;var vn=zn(),cd;(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})(cd=H.ErrorCodes||(H.ErrorCodes={}));var ia=class e extends Error{constructor(t,n,r){super(n),this.code=vn.number(t)?t:cd.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,e.prototype)}toJson(){let t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),t}};H.ResponseError=ia;var Ze=class e{constructor(t){this.kind=t}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};H.ParameterStructures=Ze;Ze.auto=new Ze("auto");Ze.byPosition=new Ze("byPosition");Ze.byName=new Ze("byName");var pe=class{constructor(t,n){this.method=t,this.numberOfParams=n}get parameterStructures(){return Ze.auto}};H.AbstractMessageSignature=pe;var oa=class extends pe{constructor(t){super(t,0)}};H.RequestType0=oa;var sa=class extends pe{constructor(t,n=Ze.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};H.RequestType=sa;var aa=class extends pe{constructor(t,n=Ze.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};H.RequestType1=aa;var ca=class extends pe{constructor(t){super(t,2)}};H.RequestType2=ca;var ua=class extends pe{constructor(t){super(t,3)}};H.RequestType3=ua;var la=class extends pe{constructor(t){super(t,4)}};H.RequestType4=la;var da=class extends pe{constructor(t){super(t,5)}};H.RequestType5=da;var fa=class extends pe{constructor(t){super(t,6)}};H.RequestType6=fa;var pa=class extends pe{constructor(t){super(t,7)}};H.RequestType7=pa;var ga=class extends pe{constructor(t){super(t,8)}};H.RequestType8=ga;var ma=class extends pe{constructor(t){super(t,9)}};H.RequestType9=ma;var ha=class extends pe{constructor(t,n=Ze.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};H.NotificationType=ha;var ya=class extends pe{constructor(t){super(t,0)}};H.NotificationType0=ya;var ba=class extends pe{constructor(t,n=Ze.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};H.NotificationType1=ba;var va=class extends pe{constructor(t){super(t,2)}};H.NotificationType2=va;var Ca=class extends pe{constructor(t){super(t,3)}};H.NotificationType3=Ca;var Pa=class extends pe{constructor(t){super(t,4)}};H.NotificationType4=Pa;var _a=class extends pe{constructor(t){super(t,5)}};H.NotificationType5=_a;var Da=class extends pe{constructor(t){super(t,6)}};H.NotificationType6=Da;var Ra=class extends pe{constructor(t){super(t,7)}};H.NotificationType7=Ra;var Sa=class extends pe{constructor(t){super(t,8)}};H.NotificationType8=Sa;var Ta=class extends pe{constructor(t){super(t,9)}};H.NotificationType9=Ta;var fb;(function(e){function t(i){let o=i;return o&&vn.string(o.method)&&(vn.string(o.id)||vn.number(o.id))}e.isRequest=t;function n(i){let o=i;return o&&vn.string(o.method)&&i.id===void 0}e.isNotification=n;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(vn.string(o.id)||vn.number(o.id)||o.id===null)}e.isResponse=r})(fb=H.Message||(H.Message={}))});var ka=A(Wt=>{"use strict";var ud;Object.defineProperty(Wt,"__esModule",{value:!0});Wt.LRUCache=Wt.LinkedMap=Wt.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=Wt.Touch||(Wt.Touch={}));var Hi=class{constructor(){this[ud]="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}[(ud=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)}};Wt.LinkedMap=Hi;var wa=class extends Hi{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))}};Wt.LRUCache=wa});var ld=A(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.Disposable=void 0;var pb;(function(e){function t(n){return{dispose:n}}e.create=t})(pb=Cr.Disposable||(Cr.Disposable={}))});var Zt=A(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});var Aa;function qa(){if(Aa===void 0)throw new Error("No runtime abstraction layer installed");return Aa}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");Aa=n}e.install=t})(qa||(qa={}));Na.default=qa});var Vn=A(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.Emitter=Cn.Event=void 0;var gb=Zt(),mb;(function(e){let t={dispose(){}};e.None=function(){return t}})(mb=Cn.Event||(Cn.Event={}));var Oa=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,gb.default)().console.error(u)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Bi=class e{constructor(t){this._options=t}get event(){return this._event||(this._event=(t,n,r)=>{this._callbacks||(this._callbacks=new Oa),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=e._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)}};Cn.Emitter=Bi;Bi._noop=function(){}});var Vi=A(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.CancellationTokenSource=Pn.CancellationToken=void 0;var hb=Zt(),yb=zn(),Ea=Vn(),Ma;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ea.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ea.Event.None});function t(n){let r=n;return r&&(r===e.None||r===e.Cancelled||yb.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.is=t})(Ma=Pn.CancellationToken||(Pn.CancellationToken={}));var bb=Object.freeze(function(e,t){let n=(0,hb.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}),zi=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?bb:(this._emitter||(this._emitter=new Ea.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},ja=class{get token(){return this._token||(this._token=new zi),this._token}cancel(){this._token?this._token.cancel():this._token=Ma.Cancelled}dispose(){this._token?this._token instanceof zi&&this._token.dispose():this._token=Ma.None}};Pn.CancellationTokenSource=ja});var dd=A($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.SharedArrayReceiverStrategy=$n.SharedArraySenderStrategy=void 0;var vb=Vi(),Pr;(function(e){e.Continue=0,e.Cancelled=1})(Pr||(Pr={}));var Ia=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]=Pr.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,Pr.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};$n.SharedArraySenderStrategy=Ia;var La=class{constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Pr.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Fa=class{constructor(t){this.token=new La(t)}cancel(){}dispose(){}},Ua=class{constructor(){this.kind="request"}createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new vb.CancellationTokenSource:new Fa(n)}};$n.SharedArrayReceiverStrategy=Ua});var Ha=A($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.Semaphore=void 0;var Cb=Zt(),Wa=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,Cb.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()}}};$i.Semaphore=Wa});var fd=A(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.ReadableStreamMessageReader=Ht.AbstractMessageReader=Ht.MessageReader=void 0;var za=Zt(),Yn=zn(),Ba=Vn(),Pb=Ha(),_b;(function(e){function t(n){let r=n;return r&&Yn.func(r.listen)&&Yn.func(r.dispose)&&Yn.func(r.onError)&&Yn.func(r.onClose)&&Yn.func(r.onPartialMessage)}e.is=t})(_b=Ht.MessageReader||(Ht.MessageReader={}));var Yi=class{constructor(){this.errorEmitter=new Ba.Emitter,this.closeEmitter=new Ba.Emitter,this.partialMessageEmitter=new Ba.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: ${Yn.string(t.message)?t.message:"unknown"}`)}};Ht.AbstractMessageReader=Yi;var Va;(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,za.default)().applicationJson.decoder,c.set(u.name,u)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:u,contentTypeDecoders:c}}e.fromOptions=t})(Va||(Va={}));var $a=class extends Yi{constructor(t,n){super(),this.readable=t,this.options=Va.fromOptions(n),this.buffer=(0,za.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new Pb.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,za.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))}};Ht.ReadableStreamMessageReader=$a});var hd=A(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.WriteableStreamMessageWriter=Bt.AbstractMessageWriter=Bt.MessageWriter=void 0;var pd=Zt(),_r=zn(),Db=Ha(),gd=Vn(),Rb="Content-Length: ",md=`\r
|
|
36
|
-
`,
|
|
37
|
-
`,Ga=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];for(i=0;i<p.length;){switch(p[i]){case Tb:switch(n){case 0:n=1;break;case 2:n=3;break;default:n=0}break;case xb: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(wb);if(c.length<2)return u;for(let p=0;p<c.length-2;p++){let g=c[p],b=g.indexOf(":");if(b===-1)throw new Error("Message header must separate key and value using :");let D=g.substr(0,b),R=g.substr(b+1).trim();u.set(t?D.toLowerCase():D,R)}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}};Gi.AbstractMessageBuffer=Ga});var Rd=A(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.createMessageConnection=U.ConnectionOptions=U.MessageStrategy=U.CancellationStrategy=U.CancellationSenderStrategy=U.CancellationReceiverStrategy=U.RequestCancellationReceiverStrategy=U.IdCancellationReceiverStrategy=U.ConnectionStrategy=U.ConnectionError=U.ConnectionErrors=U.LogTraceNotification=U.SetTraceNotification=U.TraceFormat=U.TraceValues=U.Trace=U.NullLogger=U.ProgressType=U.ProgressToken=void 0;var bd=Zt(),ye=zn(),V=xa(),vd=ka(),Dr=Vn(),Qa=Vi(),Sr;(function(e){e.type=new V.NotificationType("$/cancelRequest")})(Sr||(Sr={}));var Cd;(function(e){function t(n){return typeof n=="string"||typeof n=="number"}e.is=t})(Cd=U.ProgressToken||(U.ProgressToken={}));var Rr;(function(e){e.type=new V.NotificationType("$/progress")})(Rr||(Rr={}));var Ja=class{constructor(){}};U.ProgressType=Ja;var Xa;(function(e){function t(n){return ye.func(n)}e.is=t})(Xa||(Xa={}));U.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=U.Trace||(U.Trace={}));var kb;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(kb=U.TraceValues||(U.TraceValues={}));(function(e){function t(r){if(!ye.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=U.Trace||(U.Trace={}));var ht;(function(e){e.Text="text",e.JSON="json"})(ht=U.TraceFormat||(U.TraceFormat={}));(function(e){function t(n){return ye.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(ht=U.TraceFormat||(U.TraceFormat={}));var Pd;(function(e){e.type=new V.NotificationType("$/setTrace")})(Pd=U.SetTraceNotification||(U.SetTraceNotification={}));var Za;(function(e){e.type=new V.NotificationType("$/logTrace")})(Za=U.LogTraceNotification||(U.LogTraceNotification={}));var Qi;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Qi=U.ConnectionErrors||(U.ConnectionErrors={}));var Kn=class e extends Error{constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};U.ConnectionError=Kn;var _d;(function(e){function t(n){let r=n;return r&&ye.func(r.cancelUndispatched)}e.is=t})(_d=U.ConnectionStrategy||(U.ConnectionStrategy={}));var nc;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&ye.func(r.createCancellationTokenSource)&&(r.dispose===void 0||ye.func(r.dispose))}e.is=t})(nc=U.IdCancellationReceiverStrategy||(U.IdCancellationReceiverStrategy={}));var Dd;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&ye.func(r.createCancellationTokenSource)&&(r.dispose===void 0||ye.func(r.dispose))}e.is=t})(Dd=U.RequestCancellationReceiverStrategy||(U.RequestCancellationReceiverStrategy={}));var ec;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Qa.CancellationTokenSource}});function t(n){return nc.is(n)||Dd.is(n)}e.is=t})(ec=U.CancellationReceiverStrategy||(U.CancellationReceiverStrategy={}));var tc;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(Sr.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&ye.func(r.sendCancellation)&&ye.func(r.cleanup)}e.is=t})(tc=U.CancellationSenderStrategy||(U.CancellationSenderStrategy={}));var rc;(function(e){e.Message=Object.freeze({receiver:ec.Message,sender:tc.Message});function t(n){let r=n;return r&&ec.is(r.receiver)&&tc.is(r.sender)}e.is=t})(rc=U.CancellationStrategy||(U.CancellationStrategy={}));var ic;(function(e){function t(n){let r=n;return r&&ye.func(r.handleMessage)}e.is=t})(ic=U.MessageStrategy||(U.MessageStrategy={}));var Ab;(function(e){function t(n){let r=n;return r&&(rc.is(r.cancellationStrategy)||_d.is(r.connectionStrategy)||ic.is(r.messageStrategy))}e.is=t})(Ab=U.ConnectionOptions||(U.ConnectionOptions={}));var yt;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(yt||(yt={}));function qb(e,t,n,r){let i=n!==void 0?n:U.NullLogger,o=0,s=0,u=0,c="2.0",p,g=new Map,b,D=new Map,R=new Map,T,q=new vd.LinkedMap,B=new Map,j=new Set,_=new Map,v=oe.Off,N=ht.Text,z,J=yt.New,ae=new Dr.Emitter,He=new Dr.Emitter,dt=new Dr.Emitter,ft=new Dr.Emitter,I=new Dr.Emitter,x=r&&r.cancellationStrategy?r.cancellationStrategy:rc.Message;function W(m){if(m===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+m.toString()}function L(m){return m===null?"res-unknown-"+(++u).toString():"res-"+m.toString()}function ne(){return"not-"+(++s).toString()}function Q(m,w){V.Message.isRequest(w)?m.set(W(w.id),w):V.Message.isResponse(w)?m.set(L(w.id),w):m.set(ne(),w)}function K(m){}function ze(){return J===yt.Listening}function we(){return J===yt.Closed}function se(){return J===yt.Disposed}function St(){(J===yt.New||J===yt.Listening)&&(J=yt.Closed,He.fire(void 0))}function xn(m){ae.fire([m,void 0,void 0])}function Ko(m){ae.fire(m)}e.onClose(St),e.onError(xn),t.onClose(St),t.onError(Ko);function $r(){T||q.size===0||(T=(0,bd.default)().timer.setImmediate(()=>{T=void 0,Go()}))}function Yr(m){V.Message.isRequest(m)?Jo(m):V.Message.isNotification(m)?Zo(m):V.Message.isResponse(m)?Xo(m):ar(m)}function Go(){if(q.size===0)return;let m=q.shift();try{let w=r?.messageStrategy;ic.is(w)?w.handleMessage(m,Yr):Yr(m)}finally{$r()}}let Qo=m=>{try{if(V.Message.isNotification(m)&&m.method===Sr.type.method){let w=m.params.id,E=W(w),F=q.get(E);if(V.Message.isRequest(F)){let ie=r?.connectionStrategy,ge=ie&&ie.cancelUndispatched?ie.cancelUndispatched(F,K):void 0;if(ge&&(ge.error!==void 0||ge.result!==void 0)){q.delete(E),_.delete(w),ge.id=F.id,wn(ge,m.method,Date.now()),t.write(ge).catch(()=>i.error("Sending response for canceled message failed."));return}}let ce=_.get(w);if(ce!==void 0){ce.cancel(),cr(m);return}else j.add(w)}Q(q,m)}finally{$r()}};function Jo(m){if(se())return;function w(X,ue,re){let _e={jsonrpc:c,id:m.id};X instanceof V.ResponseError?_e.error=X.toJson():_e.result=X===void 0?null:X,wn(_e,ue,re),t.write(_e).catch(()=>i.error("Sending response failed."))}function E(X,ue,re){let _e={jsonrpc:c,id:m.id,error:X.toJson()};wn(_e,ue,re),t.write(_e).catch(()=>i.error("Sending response failed."))}function F(X,ue,re){X===void 0&&(X=null);let _e={jsonrpc:c,id:m.id,result:X};wn(_e,ue,re),t.write(_e).catch(()=>i.error("Sending response failed."))}ns(m);let ce=g.get(m.method),ie,ge;ce&&(ie=ce.type,ge=ce.handler);let me=Date.now();if(ge||p){let X=m.id??String(Date.now()),ue=nc.is(x.receiver)?x.receiver.createCancellationTokenSource(X):x.receiver.createCancellationTokenSource(m);m.id!==null&&j.has(m.id)&&ue.cancel(),m.id!==null&&_.set(X,ue);try{let re;if(ge)if(m.params===void 0){if(ie!==void 0&&ie.numberOfParams!==0){E(new V.ResponseError(V.ErrorCodes.InvalidParams,`Request ${m.method} defines ${ie.numberOfParams} params but received none.`),m.method,me);return}re=ge(ue.token)}else if(Array.isArray(m.params)){if(ie!==void 0&&ie.parameterStructures===V.ParameterStructures.byName){E(new V.ResponseError(V.ErrorCodes.InvalidParams,`Request ${m.method} defines parameters by name but received parameters by position`),m.method,me);return}re=ge(...m.params,ue.token)}else{if(ie!==void 0&&ie.parameterStructures===V.ParameterStructures.byPosition){E(new V.ResponseError(V.ErrorCodes.InvalidParams,`Request ${m.method} defines parameters by position but received parameters by name`),m.method,me);return}re=ge(m.params,ue.token)}else p&&(re=p(m.method,m.params,ue.token));let _e=re;re?_e.then?_e.then(Ee=>{_.delete(X),w(Ee,m.method,me)},Ee=>{_.delete(X),Ee instanceof V.ResponseError?E(Ee,m.method,me):Ee&&ye.string(Ee.message)?E(new V.ResponseError(V.ErrorCodes.InternalError,`Request ${m.method} failed with message: ${Ee.message}`),m.method,me):E(new V.ResponseError(V.ErrorCodes.InternalError,`Request ${m.method} failed unexpectedly without providing any details.`),m.method,me)}):(_.delete(X),w(re,m.method,me)):(_.delete(X),F(re,m.method,me))}catch(re){_.delete(X),re instanceof V.ResponseError?w(re,m.method,me):re&&ye.string(re.message)?E(new V.ResponseError(V.ErrorCodes.InternalError,`Request ${m.method} failed with message: ${re.message}`),m.method,me):E(new V.ResponseError(V.ErrorCodes.InternalError,`Request ${m.method} failed unexpectedly without providing any details.`),m.method,me)}}else E(new V.ResponseError(V.ErrorCodes.MethodNotFound,`Unhandled method ${m.method}`),m.method,me)}function Xo(m){if(!se())if(m.id===null)m.error?i.error(`Received response message without id: Error is:
|
|
32
|
+
`+e.slice(i+1):r+=e.slice(o),r}function fh(e){return Um!==e&&mn!==e&&Wm!==e&&Ym!==e&&Zm!==e&&eh!==e&&nh!==e&&ih!==e&&Bm!==e&&Vm!==e&&$m!==e&&Hm!==e&&rh!==e&&Qm!==e&&Ns!==e&&qs!==e&&zm!==e&&Gm!==e&&!Oe[e]&&!wl(e)}function wl(e){return!(32<=e&&e<=126||e===133||160<=e&&e<=55295||57344<=e&&e<=65533||65536<=e&&e<=1114111)}function ph(e,t,n){var r="",i=e.tag,o,s;for(o=0,s=n.length;o<s;o+=1)hn(e,t,n[o],!1,!1)&&(o!==0&&(r+=", "),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function gh(e,t,n,r){var i="",o=e.tag,s,u;for(s=0,u=n.length;s<u;s+=1)hn(e,t+1,n[s],!0,!0)&&((!r||s!==0)&&(i+=Os(e,t)),i+="- "+e.dump);e.tag=o,e.dump=i||"[]"}function mh(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,u,c,p,g;for(s=0,u=o.length;s<u;s+=1)g="",s!==0&&(g+=", "),c=o[s],p=n[c],hn(e,t,c,!1,!1)&&(e.dump.length>1024&&(g+="? "),g+=e.dump+": ",hn(e,t,p,!1,!1)&&(g+=e.dump,r+=g));e.tag=i,e.dump="{"+r+"}"}function hh(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),u,c,p,g,b,D;for(u=0,c=s.length;u<c;u+=1)D="",(!r||u!==0)&&(D+=Os(e,t)),p=s[u],g=n[p],hn(e,t+1,p,!0,!0)&&(b=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,b&&(e.dump&&mn===e.dump.charCodeAt(0)?D+="?":D+="? "),D+=e.dump,b&&(D+=Os(e,t)),hn(e,t+1,g,!0,b)&&(e.dump&&mn===e.dump.charCodeAt(0)?D+=":":D+=": ",D+=e.dump,i+=D));e.tag=o,e.dump=i||"{}"}function Tl(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,Is.call(u.represent)==="[object Function]")r=u.represent(t,c);else if(xl.call(u.represent,c))r=u.represent[c](t,c);else throw new Ms("!<"+u.tag+'> tag resolver accepts not "'+c+'" style');e.dump=r}return!0}return!1}function hn(e,t,n,r,i){e.tag=null,e.dump=n,Tl(e,n,!1)||Tl(e,n,!0);var o=Is.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?(hh(e,t,e.dump,i),c&&(e.dump="&ref_"+u+(t===0?`
|
|
33
|
+
`:"")+e.dump)):(mh(e,t,e.dump),c&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object Array]")r&&e.dump.length!==0?(gh(e,t,e.dump,i),c&&(e.dump="&ref_"+u+(t===0?`
|
|
34
|
+
`:"")+e.dump)):(ph(e,t,e.dump),c&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&lh(e,e.dump,t);else{if(e.skipInvalid)return!1;throw new Ms("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function yh(e,t){var n=[],r=[],i,o;for(Es(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function Es(e,t,n){var r=Is.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)Es(e[o],t,n);else for(i=Object.keys(e),o=0,s=i.length;o<s;o+=1)Es(e[i[o]],t,n)}function kl(e,t){t=t||{};var n=new ch(t);return yh(e,n),hn(n,0,e,!0,!0)?n.dump+`
|
|
35
|
+
`:""}In.dump=kl;function bh(e,t){return kl(e,gr.extend({schema:Fm},t))}In.safeDump=bh});var ql=A(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.determineScalarType=et.ScalarType=et.parseYamlFloat=et.parseYamlInteger=et.parseYamlBoolean=void 0;function vh(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=vh;function Ch(e){return e.lastIndexOf("0o",0)===0?parseInt(e.substring(2),8):parseInt(e)}function Ph(e){let t=Ch(e);if(isNaN(t))throw`Invalid integer "${e}"`;return t}et.parseYamlInteger=Ph;function _h(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=_h;var Ft;(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"})(Ft=et.ScalarType||(et.ScalarType={}));function Dh(e){if(e===void 0)return Ft.null;if(e.doubleQuoted||!e.plainScalar||e.singleQuoted)return Ft.string;let t=e.value;if(["null","Null","NULL","~",""].indexOf(t)>=0||t==null)return Ft.null;if(["true","True","TRUE","false","False","FALSE"].indexOf(t)>=0)return Ft.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 Ft.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?Ft.float:Ft.string}et.determineScalarType=Dh});var mr=A(Re=>{"use strict";var Rh=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]}),Nl=Re&&Re.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Rh(t,e,n)};Object.defineProperty(Re,"__esModule",{value:!0});Re.safeDump=Re.dump=Re.safeLoadAll=Re.safeLoad=Re.loadAll=Re.load=void 0;var li=Dl();Object.defineProperty(Re,"load",{enumerable:!0,get:function(){return li.load}});Object.defineProperty(Re,"loadAll",{enumerable:!0,get:function(){return li.loadAll}});Object.defineProperty(Re,"safeLoad",{enumerable:!0,get:function(){return li.safeLoad}});Object.defineProperty(Re,"safeLoadAll",{enumerable:!0,get:function(){return li.safeLoadAll}});var Ol=Al();Object.defineProperty(Re,"dump",{enumerable:!0,get:function(){return Ol.dump}});Object.defineProperty(Re,"safeDump",{enumerable:!0,get:function(){return Ol.safeDump}});Re.YAMLException=Nn();Nl(Lt(),Re);Nl(ql(),Re)});var zn=A(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 cb(e){return e===!0||e===!1}Be.boolean=cb;function sd(e){return typeof e=="string"||e instanceof String}Be.string=sd;function ub(e){return typeof e=="number"||e instanceof Number}Be.number=ub;function lb(e){return e instanceof Error}Be.error=lb;function db(e){return typeof e=="function"}Be.func=db;function ad(e){return Array.isArray(e)}Be.array=ad;function fb(e){return ad(e)&&e.every(t=>sd(t))}Be.stringArray=fb});var xa=A(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.Message=H.NotificationType9=H.NotificationType8=H.NotificationType7=H.NotificationType6=H.NotificationType5=H.NotificationType4=H.NotificationType3=H.NotificationType2=H.NotificationType1=H.NotificationType0=H.NotificationType=H.RequestType9=H.RequestType8=H.RequestType7=H.RequestType6=H.RequestType5=H.RequestType4=H.RequestType3=H.RequestType2=H.RequestType1=H.RequestType=H.RequestType0=H.AbstractMessageSignature=H.ParameterStructures=H.ResponseError=H.ErrorCodes=void 0;var vn=zn(),cd;(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})(cd=H.ErrorCodes||(H.ErrorCodes={}));var ia=class e extends Error{constructor(t,n,r){super(n),this.code=vn.number(t)?t:cd.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,e.prototype)}toJson(){let t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),t}};H.ResponseError=ia;var Ze=class e{constructor(t){this.kind=t}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};H.ParameterStructures=Ze;Ze.auto=new Ze("auto");Ze.byPosition=new Ze("byPosition");Ze.byName=new Ze("byName");var pe=class{constructor(t,n){this.method=t,this.numberOfParams=n}get parameterStructures(){return Ze.auto}};H.AbstractMessageSignature=pe;var oa=class extends pe{constructor(t){super(t,0)}};H.RequestType0=oa;var sa=class extends pe{constructor(t,n=Ze.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};H.RequestType=sa;var aa=class extends pe{constructor(t,n=Ze.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};H.RequestType1=aa;var ca=class extends pe{constructor(t){super(t,2)}};H.RequestType2=ca;var ua=class extends pe{constructor(t){super(t,3)}};H.RequestType3=ua;var la=class extends pe{constructor(t){super(t,4)}};H.RequestType4=la;var da=class extends pe{constructor(t){super(t,5)}};H.RequestType5=da;var fa=class extends pe{constructor(t){super(t,6)}};H.RequestType6=fa;var pa=class extends pe{constructor(t){super(t,7)}};H.RequestType7=pa;var ga=class extends pe{constructor(t){super(t,8)}};H.RequestType8=ga;var ma=class extends pe{constructor(t){super(t,9)}};H.RequestType9=ma;var ha=class extends pe{constructor(t,n=Ze.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};H.NotificationType=ha;var ya=class extends pe{constructor(t){super(t,0)}};H.NotificationType0=ya;var ba=class extends pe{constructor(t,n=Ze.auto){super(t,1),this._parameterStructures=n}get parameterStructures(){return this._parameterStructures}};H.NotificationType1=ba;var va=class extends pe{constructor(t){super(t,2)}};H.NotificationType2=va;var Ca=class extends pe{constructor(t){super(t,3)}};H.NotificationType3=Ca;var Pa=class extends pe{constructor(t){super(t,4)}};H.NotificationType4=Pa;var _a=class extends pe{constructor(t){super(t,5)}};H.NotificationType5=_a;var Da=class extends pe{constructor(t){super(t,6)}};H.NotificationType6=Da;var Ra=class extends pe{constructor(t){super(t,7)}};H.NotificationType7=Ra;var Sa=class extends pe{constructor(t){super(t,8)}};H.NotificationType8=Sa;var Ta=class extends pe{constructor(t){super(t,9)}};H.NotificationType9=Ta;var pb;(function(e){function t(i){let o=i;return o&&vn.string(o.method)&&(vn.string(o.id)||vn.number(o.id))}e.isRequest=t;function n(i){let o=i;return o&&vn.string(o.method)&&i.id===void 0}e.isNotification=n;function r(i){let o=i;return o&&(o.result!==void 0||!!o.error)&&(vn.string(o.id)||vn.number(o.id)||o.id===null)}e.isResponse=r})(pb=H.Message||(H.Message={}))});var ka=A(Wt=>{"use strict";var ud;Object.defineProperty(Wt,"__esModule",{value:!0});Wt.LRUCache=Wt.LinkedMap=Wt.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=Wt.Touch||(Wt.Touch={}));var Hi=class{constructor(){this[ud]="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}[(ud=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)}};Wt.LinkedMap=Hi;var wa=class extends Hi{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))}};Wt.LRUCache=wa});var ld=A(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.Disposable=void 0;var gb;(function(e){function t(n){return{dispose:n}}e.create=t})(gb=Cr.Disposable||(Cr.Disposable={}))});var Zt=A(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});var Aa;function qa(){if(Aa===void 0)throw new Error("No runtime abstraction layer installed");return Aa}(function(e){function t(n){if(n===void 0)throw new Error("No runtime abstraction layer provided");Aa=n}e.install=t})(qa||(qa={}));Na.default=qa});var Vn=A(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.Emitter=Cn.Event=void 0;var mb=Zt(),hb;(function(e){let t={dispose(){}};e.None=function(){return t}})(hb=Cn.Event||(Cn.Event={}));var Oa=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,mb.default)().console.error(u)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},Bi=class e{constructor(t){this._options=t}get event(){return this._event||(this._event=(t,n,r)=>{this._callbacks||(this._callbacks=new Oa),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=e._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)}};Cn.Emitter=Bi;Bi._noop=function(){}});var Vi=A(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.CancellationTokenSource=Pn.CancellationToken=void 0;var yb=Zt(),bb=zn(),Ea=Vn(),Ma;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ea.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ea.Event.None});function t(n){let r=n;return r&&(r===e.None||r===e.Cancelled||bb.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.is=t})(Ma=Pn.CancellationToken||(Pn.CancellationToken={}));var vb=Object.freeze(function(e,t){let n=(0,yb.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}),zi=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?vb:(this._emitter||(this._emitter=new Ea.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},Ia=class{get token(){return this._token||(this._token=new zi),this._token}cancel(){this._token?this._token.cancel():this._token=Ma.Cancelled}dispose(){this._token?this._token instanceof zi&&this._token.dispose():this._token=Ma.None}};Pn.CancellationTokenSource=Ia});var dd=A($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.SharedArrayReceiverStrategy=$n.SharedArraySenderStrategy=void 0;var Cb=Vi(),Pr;(function(e){e.Continue=0,e.Cancelled=1})(Pr||(Pr={}));var ja=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]=Pr.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,Pr.Cancelled)}cleanup(t){this.buffers.delete(t)}dispose(){this.buffers.clear()}};$n.SharedArraySenderStrategy=ja;var La=class{constructor(t){this.data=new Int32Array(t,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===Pr.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},Fa=class{constructor(t){this.token=new La(t)}cancel(){}dispose(){}},Ua=class{constructor(){this.kind="request"}createCancellationTokenSource(t){let n=t.$cancellationData;return n===void 0?new Cb.CancellationTokenSource:new Fa(n)}};$n.SharedArrayReceiverStrategy=Ua});var Ha=A($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.Semaphore=void 0;var Pb=Zt(),Wa=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,Pb.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()}}};$i.Semaphore=Wa});var fd=A(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.ReadableStreamMessageReader=Ht.AbstractMessageReader=Ht.MessageReader=void 0;var za=Zt(),Yn=zn(),Ba=Vn(),_b=Ha(),Db;(function(e){function t(n){let r=n;return r&&Yn.func(r.listen)&&Yn.func(r.dispose)&&Yn.func(r.onError)&&Yn.func(r.onClose)&&Yn.func(r.onPartialMessage)}e.is=t})(Db=Ht.MessageReader||(Ht.MessageReader={}));var Yi=class{constructor(){this.errorEmitter=new Ba.Emitter,this.closeEmitter=new Ba.Emitter,this.partialMessageEmitter=new Ba.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: ${Yn.string(t.message)?t.message:"unknown"}`)}};Ht.AbstractMessageReader=Yi;var Va;(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,za.default)().applicationJson.decoder,c.set(u.name,u)),{charset:r,contentDecoder:o,contentDecoders:s,contentTypeDecoder:u,contentTypeDecoders:c}}e.fromOptions=t})(Va||(Va={}));var $a=class extends Yi{constructor(t,n){super(),this.readable=t,this.options=Va.fromOptions(n),this.buffer=(0,za.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new _b.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,za.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))}};Ht.ReadableStreamMessageReader=$a});var hd=A(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.WriteableStreamMessageWriter=Bt.AbstractMessageWriter=Bt.MessageWriter=void 0;var pd=Zt(),_r=zn(),Rb=Ha(),gd=Vn(),Sb="Content-Length: ",md=`\r
|
|
36
|
+
`,Tb;(function(e){function t(n){let r=n;return r&&_r.func(r.dispose)&&_r.func(r.onClose)&&_r.func(r.onError)&&_r.func(r.write)}e.is=t})(Tb=Bt.MessageWriter||(Bt.MessageWriter={}));var Ki=class{constructor(){this.errorEmitter=new gd.Emitter,this.closeEmitter=new gd.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: ${_r.string(t.message)?t.message:"unknown"}`)}};Bt.AbstractMessageWriter=Ki;var Ya;(function(e){function t(n){return n===void 0||typeof n=="string"?{charset:n??"utf-8",contentTypeEncoder:(0,pd.default)().applicationJson.encoder}:{charset:n.charset??"utf-8",contentEncoder:n.contentEncoder,contentTypeEncoder:n.contentTypeEncoder??(0,pd.default)().applicationJson.encoder}}e.fromOptions=t})(Ya||(Ya={}));var Ka=class extends Ki{constructor(t,n){super(),this.writable=t,this.options=Ya.fromOptions(n),this.errorCount=0,this.writeSemaphore=new Rb.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(Sb,r.byteLength.toString(),md),i.push(md),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()}};Bt.WriteableStreamMessageWriter=Ka});var yd=A(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.AbstractMessageBuffer=void 0;var xb=13,wb=10,kb=`\r
|
|
37
|
+
`,Ga=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];for(i=0;i<p.length;){switch(p[i]){case xb:switch(n){case 0:n=1;break;case 2:n=3;break;default:n=0}break;case wb: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(kb);if(c.length<2)return u;for(let p=0;p<c.length-2;p++){let g=c[p],b=g.indexOf(":");if(b===-1)throw new Error("Message header must separate key and value using :");let D=g.substr(0,b),R=g.substr(b+1).trim();u.set(t?D.toLowerCase():D,R)}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}};Gi.AbstractMessageBuffer=Ga});var Rd=A(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.createMessageConnection=U.ConnectionOptions=U.MessageStrategy=U.CancellationStrategy=U.CancellationSenderStrategy=U.CancellationReceiverStrategy=U.RequestCancellationReceiverStrategy=U.IdCancellationReceiverStrategy=U.ConnectionStrategy=U.ConnectionError=U.ConnectionErrors=U.LogTraceNotification=U.SetTraceNotification=U.TraceFormat=U.TraceValues=U.Trace=U.NullLogger=U.ProgressType=U.ProgressToken=void 0;var bd=Zt(),ye=zn(),V=xa(),vd=ka(),Dr=Vn(),Qa=Vi(),Sr;(function(e){e.type=new V.NotificationType("$/cancelRequest")})(Sr||(Sr={}));var Cd;(function(e){function t(n){return typeof n=="string"||typeof n=="number"}e.is=t})(Cd=U.ProgressToken||(U.ProgressToken={}));var Rr;(function(e){e.type=new V.NotificationType("$/progress")})(Rr||(Rr={}));var Ja=class{constructor(){}};U.ProgressType=Ja;var Xa;(function(e){function t(n){return ye.func(n)}e.is=t})(Xa||(Xa={}));U.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=U.Trace||(U.Trace={}));var Ab;(function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"})(Ab=U.TraceValues||(U.TraceValues={}));(function(e){function t(r){if(!ye.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=U.Trace||(U.Trace={}));var ht;(function(e){e.Text="text",e.JSON="json"})(ht=U.TraceFormat||(U.TraceFormat={}));(function(e){function t(n){return ye.string(n)?(n=n.toLowerCase(),n==="json"?e.JSON:e.Text):e.Text}e.fromString=t})(ht=U.TraceFormat||(U.TraceFormat={}));var Pd;(function(e){e.type=new V.NotificationType("$/setTrace")})(Pd=U.SetTraceNotification||(U.SetTraceNotification={}));var Za;(function(e){e.type=new V.NotificationType("$/logTrace")})(Za=U.LogTraceNotification||(U.LogTraceNotification={}));var Qi;(function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"})(Qi=U.ConnectionErrors||(U.ConnectionErrors={}));var Kn=class e extends Error{constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};U.ConnectionError=Kn;var _d;(function(e){function t(n){let r=n;return r&&ye.func(r.cancelUndispatched)}e.is=t})(_d=U.ConnectionStrategy||(U.ConnectionStrategy={}));var nc;(function(e){function t(n){let r=n;return r&&(r.kind===void 0||r.kind==="id")&&ye.func(r.createCancellationTokenSource)&&(r.dispose===void 0||ye.func(r.dispose))}e.is=t})(nc=U.IdCancellationReceiverStrategy||(U.IdCancellationReceiverStrategy={}));var Dd;(function(e){function t(n){let r=n;return r&&r.kind==="request"&&ye.func(r.createCancellationTokenSource)&&(r.dispose===void 0||ye.func(r.dispose))}e.is=t})(Dd=U.RequestCancellationReceiverStrategy||(U.RequestCancellationReceiverStrategy={}));var ec;(function(e){e.Message=Object.freeze({createCancellationTokenSource(n){return new Qa.CancellationTokenSource}});function t(n){return nc.is(n)||Dd.is(n)}e.is=t})(ec=U.CancellationReceiverStrategy||(U.CancellationReceiverStrategy={}));var tc;(function(e){e.Message=Object.freeze({sendCancellation(n,r){return n.sendNotification(Sr.type,{id:r})},cleanup(n){}});function t(n){let r=n;return r&&ye.func(r.sendCancellation)&&ye.func(r.cleanup)}e.is=t})(tc=U.CancellationSenderStrategy||(U.CancellationSenderStrategy={}));var rc;(function(e){e.Message=Object.freeze({receiver:ec.Message,sender:tc.Message});function t(n){let r=n;return r&&ec.is(r.receiver)&&tc.is(r.sender)}e.is=t})(rc=U.CancellationStrategy||(U.CancellationStrategy={}));var ic;(function(e){function t(n){let r=n;return r&&ye.func(r.handleMessage)}e.is=t})(ic=U.MessageStrategy||(U.MessageStrategy={}));var qb;(function(e){function t(n){let r=n;return r&&(rc.is(r.cancellationStrategy)||_d.is(r.connectionStrategy)||ic.is(r.messageStrategy))}e.is=t})(qb=U.ConnectionOptions||(U.ConnectionOptions={}));var yt;(function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"})(yt||(yt={}));function Nb(e,t,n,r){let i=n!==void 0?n:U.NullLogger,o=0,s=0,u=0,c="2.0",p,g=new Map,b,D=new Map,R=new Map,T,q=new vd.LinkedMap,B=new Map,j=new Set,_=new Map,v=oe.Off,N=ht.Text,z,J=yt.New,ae=new Dr.Emitter,He=new Dr.Emitter,dt=new Dr.Emitter,ft=new Dr.Emitter,I=new Dr.Emitter,x=r&&r.cancellationStrategy?r.cancellationStrategy:rc.Message;function W(m){if(m===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+m.toString()}function L(m){return m===null?"res-unknown-"+(++u).toString():"res-"+m.toString()}function ne(){return"not-"+(++s).toString()}function Q(m,w){V.Message.isRequest(w)?m.set(W(w.id),w):V.Message.isResponse(w)?m.set(L(w.id),w):m.set(ne(),w)}function K(m){}function ze(){return J===yt.Listening}function we(){return J===yt.Closed}function se(){return J===yt.Disposed}function St(){(J===yt.New||J===yt.Listening)&&(J=yt.Closed,He.fire(void 0))}function xn(m){ae.fire([m,void 0,void 0])}function Ko(m){ae.fire(m)}e.onClose(St),e.onError(xn),t.onClose(St),t.onError(Ko);function $r(){T||q.size===0||(T=(0,bd.default)().timer.setImmediate(()=>{T=void 0,Go()}))}function Yr(m){V.Message.isRequest(m)?Jo(m):V.Message.isNotification(m)?Zo(m):V.Message.isResponse(m)?Xo(m):ar(m)}function Go(){if(q.size===0)return;let m=q.shift();try{let w=r?.messageStrategy;ic.is(w)?w.handleMessage(m,Yr):Yr(m)}finally{$r()}}let Qo=m=>{try{if(V.Message.isNotification(m)&&m.method===Sr.type.method){let w=m.params.id,E=W(w),F=q.get(E);if(V.Message.isRequest(F)){let ie=r?.connectionStrategy,ge=ie&&ie.cancelUndispatched?ie.cancelUndispatched(F,K):void 0;if(ge&&(ge.error!==void 0||ge.result!==void 0)){q.delete(E),_.delete(w),ge.id=F.id,wn(ge,m.method,Date.now()),t.write(ge).catch(()=>i.error("Sending response for canceled message failed."));return}}let ce=_.get(w);if(ce!==void 0){ce.cancel(),cr(m);return}else j.add(w)}Q(q,m)}finally{$r()}};function Jo(m){if(se())return;function w(X,ue,re){let _e={jsonrpc:c,id:m.id};X instanceof V.ResponseError?_e.error=X.toJson():_e.result=X===void 0?null:X,wn(_e,ue,re),t.write(_e).catch(()=>i.error("Sending response failed."))}function E(X,ue,re){let _e={jsonrpc:c,id:m.id,error:X.toJson()};wn(_e,ue,re),t.write(_e).catch(()=>i.error("Sending response failed."))}function F(X,ue,re){X===void 0&&(X=null);let _e={jsonrpc:c,id:m.id,result:X};wn(_e,ue,re),t.write(_e).catch(()=>i.error("Sending response failed."))}ns(m);let ce=g.get(m.method),ie,ge;ce&&(ie=ce.type,ge=ce.handler);let me=Date.now();if(ge||p){let X=m.id??String(Date.now()),ue=nc.is(x.receiver)?x.receiver.createCancellationTokenSource(X):x.receiver.createCancellationTokenSource(m);m.id!==null&&j.has(m.id)&&ue.cancel(),m.id!==null&&_.set(X,ue);try{let re;if(ge)if(m.params===void 0){if(ie!==void 0&&ie.numberOfParams!==0){E(new V.ResponseError(V.ErrorCodes.InvalidParams,`Request ${m.method} defines ${ie.numberOfParams} params but received none.`),m.method,me);return}re=ge(ue.token)}else if(Array.isArray(m.params)){if(ie!==void 0&&ie.parameterStructures===V.ParameterStructures.byName){E(new V.ResponseError(V.ErrorCodes.InvalidParams,`Request ${m.method} defines parameters by name but received parameters by position`),m.method,me);return}re=ge(...m.params,ue.token)}else{if(ie!==void 0&&ie.parameterStructures===V.ParameterStructures.byPosition){E(new V.ResponseError(V.ErrorCodes.InvalidParams,`Request ${m.method} defines parameters by position but received parameters by name`),m.method,me);return}re=ge(m.params,ue.token)}else p&&(re=p(m.method,m.params,ue.token));let _e=re;re?_e.then?_e.then(Me=>{_.delete(X),w(Me,m.method,me)},Me=>{_.delete(X),Me instanceof V.ResponseError?E(Me,m.method,me):Me&&ye.string(Me.message)?E(new V.ResponseError(V.ErrorCodes.InternalError,`Request ${m.method} failed with message: ${Me.message}`),m.method,me):E(new V.ResponseError(V.ErrorCodes.InternalError,`Request ${m.method} failed unexpectedly without providing any details.`),m.method,me)}):(_.delete(X),w(re,m.method,me)):(_.delete(X),F(re,m.method,me))}catch(re){_.delete(X),re instanceof V.ResponseError?w(re,m.method,me):re&&ye.string(re.message)?E(new V.ResponseError(V.ErrorCodes.InternalError,`Request ${m.method} failed with message: ${re.message}`),m.method,me):E(new V.ResponseError(V.ErrorCodes.InternalError,`Request ${m.method} failed unexpectedly without providing any details.`),m.method,me)}}else E(new V.ResponseError(V.ErrorCodes.MethodNotFound,`Unhandled method ${m.method}`),m.method,me)}function Xo(m){if(!se())if(m.id===null)m.error?i.error(`Received response message without id: Error is:
|
|
38
38
|
${JSON.stringify(m.error,void 0,4)}`):i.error("Received response message without id. No further error information provided.");else{let w=m.id,E=B.get(w);if(rs(m,E),E!==void 0){B.delete(w);try{if(m.error){let F=m.error;E.reject(new V.ResponseError(F.code,F.message,F.data))}else if(m.result!==void 0)E.resolve(m.result);else throw new Error("Should never happen.")}catch(F){F.message?i.error(`Response handler '${E.method}' failed with message: ${F.message}`):i.error(`Response handler '${E.method}' failed unexpectedly.`)}}}}function Zo(m){if(se())return;let w,E;if(m.method===Sr.type.method){let F=m.params.id;j.delete(F),cr(m);return}else{let F=D.get(m.method);F&&(E=F.handler,w=F.type)}if(E||b)try{if(cr(m),E)if(m.params===void 0)w!==void 0&&w.numberOfParams!==0&&w.parameterStructures!==V.ParameterStructures.byName&&i.error(`Notification ${m.method} defines ${w.numberOfParams} params but received none.`),E();else if(Array.isArray(m.params)){let F=m.params;m.method===Rr.type.method&&F.length===2&&Cd.is(F[0])?E({token:F[0],value:F[1]}):(w!==void 0&&(w.parameterStructures===V.ParameterStructures.byName&&i.error(`Notification ${m.method} defines parameters by name but received parameters by position`),w.numberOfParams!==m.params.length&&i.error(`Notification ${m.method} defines ${w.numberOfParams} params but received ${F.length} arguments`)),E(...F))}else w!==void 0&&w.parameterStructures===V.ParameterStructures.byPosition&&i.error(`Notification ${m.method} defines parameters by position but received parameters by name`),E(m.params);else b&&b(m.method,m.params)}catch(F){F.message?i.error(`Notification handler '${m.method}' failed with message: ${F.message}`):i.error(`Notification handler '${m.method}' failed unexpectedly.`)}else dt.fire(m)}function ar(m){if(!m){i.error("Received empty message.");return}i.error(`Received message which is neither a response nor a notification message:
|
|
39
39
|
${JSON.stringify(m,null,4)}`);let w=m;if(ye.string(w.id)||ye.number(w.id)){let E=w.id,F=B.get(E);F&&F.reject(new Error("The received response has neither a result nor an error property."))}}function Tt(m){if(m!=null)switch(v){case oe.Verbose:return JSON.stringify(m,null,4);case oe.Compact:return JSON.stringify(m);default:return}}function es(m){if(!(v===oe.Off||!z))if(N===ht.Text){let w;(v===oe.Verbose||v===oe.Compact)&&m.params&&(w=`Params: ${Tt(m.params)}
|
|
40
40
|
|
|
@@ -60,25 +60,26 @@ ${JSON.stringify(m,null,4)}`);let w=m;if(ye.string(w.id)||ye.number(w.id)){let E
|
|
|
60
60
|
|
|
61
61
|
`:m.error===void 0&&(E=`No result returned.
|
|
62
62
|
|
|
63
|
-
`)),w){let F=m.error?` Request failed: ${m.error.message} (${m.error.code}).`:"";z.log(`Received response '${w.method} - (${m.id})' in ${Date.now()-w.timerStart}ms.${F}`,E)}else z.log(`Received response ${m.id} without active response promise.`,E)}else $t("receive-response",m)}function $t(m,w){if(!z||v===oe.Off)return;let E={isLSPMessage:!0,type:m,message:w,timestamp:Date.now()};z.log(E)}function dn(){if(we())throw new Kn(Qi.Closed,"Connection is closed.");if(se())throw new Kn(Qi.Disposed,"Connection is disposed.")}function is(){if(ze())throw new Kn(Qi.AlreadyListening,"Connection is already listening")}function os(){if(!ze())throw new Error("Call listen() first.")}function jt(m){return m===void 0?null:m}function Kr(m){if(m!==null)return m}function Gr(m){return m!=null&&!Array.isArray(m)&&typeof m=="object"}function ur(m,w){switch(m){case V.ParameterStructures.auto:return Gr(w)?Kr(w):[jt(w)];case V.ParameterStructures.byName:if(!Gr(w))throw new Error("Received parameters by name but param is not an object literal.");return Kr(w);case V.ParameterStructures.byPosition:return[jt(w)];default:throw new Error(`Unknown parameter structure ${m.toString()}`)}}function Qr(m,w){let E,F=m.numberOfParams;switch(F){case 0:E=void 0;break;case 1:E=ur(m.parameterStructures,w[0]);break;default:E=[];for(let ce=0;ce<w.length&&ce<F;ce++)E.push(jt(w[ce]));if(w.length<F)for(let ce=w.length;ce<F;ce++)E.push(null);break}return E}let Yt={sendNotification:(m,...w)=>{dn();let E,F;if(ye.string(m)){E=m;let ie=w[0],ge=0,me=V.ParameterStructures.auto;V.ParameterStructures.is(ie)&&(ge=1,me=ie);let X=w.length,ue=X-ge;switch(ue){case 0:F=void 0;break;case 1:F=ur(me,w[ge]);break;default:if(me===V.ParameterStructures.byName)throw new Error(`Received ${ue} parameters for 'by Name' notification parameter structure.`);F=w.slice(ge,X).map(re=>jt(re));break}}else{let ie=w;E=m.method,F=Qr(m,ie)}let ce={jsonrpc:c,method:E,params:F};return ts(ce),t.write(ce).catch(ie=>{throw i.error("Sending notification failed."),ie})},onNotification:(m,w)=>{dn();let E;return ye.func(m)?b=m:w&&(ye.string(m)?(E=m,D.set(m,{type:void 0,handler:w})):(E=m.method,D.set(m.method,{type:m,handler:w}))),{dispose:()=>{E!==void 0?D.delete(E):b=void 0}}},onProgress:(m,w,E)=>{if(R.has(w))throw new Error(`Progress handler for token ${w} already registered`);return R.set(w,E),{dispose:()=>{R.delete(w)}}},sendProgress:(m,w,E)=>Yt.sendNotification(Rr.type,{token:w,value:E}),onUnhandledProgress:ft.event,sendRequest:(m,...w)=>{dn(),os();let E,F,ce;if(ye.string(m)){E=m;let X=w[0],ue=w[w.length-1],re=0,_e=V.ParameterStructures.auto;V.ParameterStructures.is(X)&&(re=1,_e=X);let Ee=w.length;Qa.CancellationToken.is(ue)&&(Ee=Ee-1,ce=ue);let it=Ee-re;switch(it){case 0:F=void 0;break;case 1:F=ur(_e,w[re]);break;default:if(_e===V.ParameterStructures.byName)throw new Error(`Received ${it} parameters for 'by Name' request parameter structure.`);F=w.slice(re,Ee).map(C=>jt(C));break}}else{let X=w;E=m.method,F=Qr(m,X);let ue=m.numberOfParams;ce=Qa.CancellationToken.is(X[ue])?X[ue]:void 0}let ie=o++,ge;ce&&(ge=ce.onCancellationRequested(()=>{let X=x.sender.sendCancellation(Yt,ie);return X===void 0?(i.log(`Received no promise from cancellation strategy when cancelling id ${ie}`),Promise.resolve()):X.catch(()=>{i.log(`Sending cancellation messages for id ${ie} failed`)})}));let me={jsonrpc:c,id:ie,method:E,params:F};return es(me),typeof x.sender.enableCancellation=="function"&&x.sender.enableCancellation(me),new Promise(async(X,ue)=>{let re=it=>{X(it),x.sender.cleanup(ie),ge?.dispose()},_e=it=>{ue(it),x.sender.cleanup(ie),ge?.dispose()},Ee={method:E,timerStart:Date.now(),resolve:re,reject:_e};try{await t.write(me),B.set(ie,Ee)}catch(it){throw i.error("Sending request failed."),Ee.reject(new V.ResponseError(V.ErrorCodes.MessageWriteError,it.message?it.message:"Unknown reason")),it}})},onRequest:(m,w)=>{dn();let E=null;return Xa.is(m)?(E=void 0,p=m):ye.string(m)?(E=null,w!==void 0&&(E=m,g.set(m,{handler:w,type:void 0}))):w!==void 0&&(E=m.method,g.set(m.method,{type:m,handler:w})),{dispose:()=>{E!==null&&(E!==void 0?g.delete(E):p=void 0)}}},hasPendingResponse:()=>B.size>0,trace:async(m,w,E)=>{let F=!1,ce=ht.Text;E!==void 0&&(ye.boolean(E)?F=E:(F=E.sendNotification||!1,ce=E.traceFormat||ht.Text)),v=m,N=ce,v===oe.Off?z=void 0:z=w,F&&!we()&&!se()&&await Yt.sendNotification(Pd.type,{value:oe.toString(m)})},onError:ae.event,onClose:He.event,onUnhandledNotification:dt.event,onDispose:I.event,end:()=>{t.end()},dispose:()=>{if(se())return;J=yt.Disposed,I.fire(void 0);let m=new V.ResponseError(V.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let w of B.values())w.reject(m);B=new Map,_=new Map,j=new Set,q=new vd.LinkedMap,ye.func(t.dispose)&&t.dispose(),ye.func(e.dispose)&&e.dispose()},listen:()=>{dn(),is(),J=yt.Listening,e.listen(Qo)},inspect:()=>{(0,bd.default)().console.log("inspect")}};return Yt.onNotification(Za.type,m=>{if(v===oe.Off||!z)return;let w=v===oe.Verbose||v===oe.Compact;z.log(m.message,w?m.verbose:void 0)}),Yt.onNotification(Rr.type,m=>{let w=R.get(m.token);w?w(m.value):ft.fire(m)}),Yt}U.createMessageConnection=qb});var Ji=A(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.ProgressType=S.ProgressToken=S.createMessageConnection=S.NullLogger=S.ConnectionOptions=S.ConnectionStrategy=S.AbstractMessageBuffer=S.WriteableStreamMessageWriter=S.AbstractMessageWriter=S.MessageWriter=S.ReadableStreamMessageReader=S.AbstractMessageReader=S.MessageReader=S.SharedArrayReceiverStrategy=S.SharedArraySenderStrategy=S.CancellationToken=S.CancellationTokenSource=S.Emitter=S.Event=S.Disposable=S.LRUCache=S.Touch=S.LinkedMap=S.ParameterStructures=S.NotificationType9=S.NotificationType8=S.NotificationType7=S.NotificationType6=S.NotificationType5=S.NotificationType4=S.NotificationType3=S.NotificationType2=S.NotificationType1=S.NotificationType0=S.NotificationType=S.ErrorCodes=S.ResponseError=S.RequestType9=S.RequestType8=S.RequestType7=S.RequestType6=S.RequestType5=S.RequestType4=S.RequestType3=S.RequestType2=S.RequestType1=S.RequestType0=S.RequestType=S.Message=S.RAL=void 0;S.MessageStrategy=S.CancellationStrategy=S.CancellationSenderStrategy=S.CancellationReceiverStrategy=S.ConnectionError=S.ConnectionErrors=S.LogTraceNotification=S.SetTraceNotification=S.TraceFormat=S.TraceValues=S.Trace=void 0;var fe=xa();Object.defineProperty(S,"Message",{enumerable:!0,get:function(){return fe.Message}});Object.defineProperty(S,"RequestType",{enumerable:!0,get:function(){return fe.RequestType}});Object.defineProperty(S,"RequestType0",{enumerable:!0,get:function(){return fe.RequestType0}});Object.defineProperty(S,"RequestType1",{enumerable:!0,get:function(){return fe.RequestType1}});Object.defineProperty(S,"RequestType2",{enumerable:!0,get:function(){return fe.RequestType2}});Object.defineProperty(S,"RequestType3",{enumerable:!0,get:function(){return fe.RequestType3}});Object.defineProperty(S,"RequestType4",{enumerable:!0,get:function(){return fe.RequestType4}});Object.defineProperty(S,"RequestType5",{enumerable:!0,get:function(){return fe.RequestType5}});Object.defineProperty(S,"RequestType6",{enumerable:!0,get:function(){return fe.RequestType6}});Object.defineProperty(S,"RequestType7",{enumerable:!0,get:function(){return fe.RequestType7}});Object.defineProperty(S,"RequestType8",{enumerable:!0,get:function(){return fe.RequestType8}});Object.defineProperty(S,"RequestType9",{enumerable:!0,get:function(){return fe.RequestType9}});Object.defineProperty(S,"ResponseError",{enumerable:!0,get:function(){return fe.ResponseError}});Object.defineProperty(S,"ErrorCodes",{enumerable:!0,get:function(){return fe.ErrorCodes}});Object.defineProperty(S,"NotificationType",{enumerable:!0,get:function(){return fe.NotificationType}});Object.defineProperty(S,"NotificationType0",{enumerable:!0,get:function(){return fe.NotificationType0}});Object.defineProperty(S,"NotificationType1",{enumerable:!0,get:function(){return fe.NotificationType1}});Object.defineProperty(S,"NotificationType2",{enumerable:!0,get:function(){return fe.NotificationType2}});Object.defineProperty(S,"NotificationType3",{enumerable:!0,get:function(){return fe.NotificationType3}});Object.defineProperty(S,"NotificationType4",{enumerable:!0,get:function(){return fe.NotificationType4}});Object.defineProperty(S,"NotificationType5",{enumerable:!0,get:function(){return fe.NotificationType5}});Object.defineProperty(S,"NotificationType6",{enumerable:!0,get:function(){return fe.NotificationType6}});Object.defineProperty(S,"NotificationType7",{enumerable:!0,get:function(){return fe.NotificationType7}});Object.defineProperty(S,"NotificationType8",{enumerable:!0,get:function(){return fe.NotificationType8}});Object.defineProperty(S,"NotificationType9",{enumerable:!0,get:function(){return fe.NotificationType9}});Object.defineProperty(S,"ParameterStructures",{enumerable:!0,get:function(){return fe.ParameterStructures}});var oc=ka();Object.defineProperty(S,"LinkedMap",{enumerable:!0,get:function(){return oc.LinkedMap}});Object.defineProperty(S,"LRUCache",{enumerable:!0,get:function(){return oc.LRUCache}});Object.defineProperty(S,"Touch",{enumerable:!0,get:function(){return oc.Touch}});var Nb=ld();Object.defineProperty(S,"Disposable",{enumerable:!0,get:function(){return Nb.Disposable}});var Sd=Vn();Object.defineProperty(S,"Event",{enumerable:!0,get:function(){return Sd.Event}});Object.defineProperty(S,"Emitter",{enumerable:!0,get:function(){return Sd.Emitter}});var Td=Vi();Object.defineProperty(S,"CancellationTokenSource",{enumerable:!0,get:function(){return Td.CancellationTokenSource}});Object.defineProperty(S,"CancellationToken",{enumerable:!0,get:function(){return Td.CancellationToken}});var xd=dd();Object.defineProperty(S,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return xd.SharedArraySenderStrategy}});Object.defineProperty(S,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return xd.SharedArrayReceiverStrategy}});var sc=fd();Object.defineProperty(S,"MessageReader",{enumerable:!0,get:function(){return sc.MessageReader}});Object.defineProperty(S,"AbstractMessageReader",{enumerable:!0,get:function(){return sc.AbstractMessageReader}});Object.defineProperty(S,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return sc.ReadableStreamMessageReader}});var ac=hd();Object.defineProperty(S,"MessageWriter",{enumerable:!0,get:function(){return ac.MessageWriter}});Object.defineProperty(S,"AbstractMessageWriter",{enumerable:!0,get:function(){return ac.AbstractMessageWriter}});Object.defineProperty(S,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return ac.WriteableStreamMessageWriter}});var Ob=yd();Object.defineProperty(S,"AbstractMessageBuffer",{enumerable:!0,get:function(){return Ob.AbstractMessageBuffer}});var Le=Rd();Object.defineProperty(S,"ConnectionStrategy",{enumerable:!0,get:function(){return Le.ConnectionStrategy}});Object.defineProperty(S,"ConnectionOptions",{enumerable:!0,get:function(){return Le.ConnectionOptions}});Object.defineProperty(S,"NullLogger",{enumerable:!0,get:function(){return Le.NullLogger}});Object.defineProperty(S,"createMessageConnection",{enumerable:!0,get:function(){return Le.createMessageConnection}});Object.defineProperty(S,"ProgressToken",{enumerable:!0,get:function(){return Le.ProgressToken}});Object.defineProperty(S,"ProgressType",{enumerable:!0,get:function(){return Le.ProgressType}});Object.defineProperty(S,"Trace",{enumerable:!0,get:function(){return Le.Trace}});Object.defineProperty(S,"TraceValues",{enumerable:!0,get:function(){return Le.TraceValues}});Object.defineProperty(S,"TraceFormat",{enumerable:!0,get:function(){return Le.TraceFormat}});Object.defineProperty(S,"SetTraceNotification",{enumerable:!0,get:function(){return Le.SetTraceNotification}});Object.defineProperty(S,"LogTraceNotification",{enumerable:!0,get:function(){return Le.LogTraceNotification}});Object.defineProperty(S,"ConnectionErrors",{enumerable:!0,get:function(){return Le.ConnectionErrors}});Object.defineProperty(S,"ConnectionError",{enumerable:!0,get:function(){return Le.ConnectionError}});Object.defineProperty(S,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return Le.CancellationReceiverStrategy}});Object.defineProperty(S,"CancellationSenderStrategy",{enumerable:!0,get:function(){return Le.CancellationSenderStrategy}});Object.defineProperty(S,"CancellationStrategy",{enumerable:!0,get:function(){return Le.CancellationStrategy}});Object.defineProperty(S,"MessageStrategy",{enumerable:!0,get:function(){return Le.MessageStrategy}});var Eb=Zt();S.RAL=Eb.default});var kd=A(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var At=Ji(),Xi=class e extends At.AbstractMessageBuffer{constructor(t="utf-8"){super(t),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return e.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)}};Xi.emptyBuffer=new Uint8Array(0);var cc=class{constructor(t){this.socket=t,this._onData=new At.Emitter,this._messageListener=n=>{n.data.arrayBuffer().then(i=>{this._onData.fire(new Uint8Array(i))},()=>{(0,At.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(t){return this.socket.addEventListener("close",t),At.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),At.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),At.Disposable.create(()=>this.socket.removeEventListener("end",t))}onData(t){return this._onData.event(t)}},uc=class{constructor(t){this.socket=t}onClose(t){return this.socket.addEventListener("close",t),At.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),At.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),At.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()}},Mb=new TextEncoder,wd=Object.freeze({messageBuffer:Object.freeze({create:e=>new Xi(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(Mb.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 cc(e),asWritableStream:e=>new uc(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 lc(){return wd}(function(e){function t(){At.RAL.install(wd)}e.install=t})(lc||(lc={}));dc.default=lc});var _n=A(nt=>{"use strict";var jb=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]}),Ib=nt&&nt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&jb(t,e,n)};Object.defineProperty(nt,"__esModule",{value:!0});nt.createMessageConnection=nt.BrowserMessageWriter=nt.BrowserMessageReader=void 0;var Lb=kd();Lb.default.install();var Gn=Ji();Ib(Ji(),nt);var fc=class extends Gn.AbstractMessageReader{constructor(t){super(),this._onData=new Gn.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)}};nt.BrowserMessageReader=fc;var pc=class extends Gn.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(){}};nt.BrowserMessageWriter=pc;function Fb(e,t,n,r){return n===void 0&&(n=Gn.NullLogger),Gn.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Gn.createMessageConnection)(e,t,n,r)}nt.createMessageConnection=Fb});var gc=A((ER,Ad)=>{"use strict";Ad.exports=_n()});var eo=A((qd,Zi)=>{(function(e){if(typeof Zi=="object"&&typeof Zi.exports=="object"){var t=e(iu,qd);t!==void 0&&(Zi.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 h(y){return typeof y=="string"}l.is=h})(n=t.DocumentUri||(t.DocumentUri={}));var r;(function(l){function h(y){return typeof y=="string"}l.is=h})(r=t.URI||(t.URI={}));var i;(function(l){l.MIN_VALUE=-2147483648,l.MAX_VALUE=2147483647;function h(y){return typeof y=="number"&&l.MIN_VALUE<=y&&y<=l.MAX_VALUE}l.is=h})(i=t.integer||(t.integer={}));var o;(function(l){l.MIN_VALUE=0,l.MAX_VALUE=2147483647;function h(y){return typeof y=="number"&&l.MIN_VALUE<=y&&y<=l.MAX_VALUE}l.is=h})(o=t.uinteger||(t.uinteger={}));var s;(function(l){function h(f,a){return f===Number.MAX_VALUE&&(f=o.MAX_VALUE),a===Number.MAX_VALUE&&(a=o.MAX_VALUE),{line:f,character:a}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.uinteger(a.line)&&C.uinteger(a.character)}l.is=y})(s=t.Position||(t.Position={}));var u;(function(l){function h(f,a,P,k){if(C.uinteger(f)&&C.uinteger(a)&&C.uinteger(P)&&C.uinteger(k))return{start:s.create(f,a),end:s.create(P,k)};if(s.is(f)&&s.is(a))return{start:f,end:a};throw new Error("Range#create called with invalid arguments[".concat(f,", ").concat(a,", ").concat(P,", ").concat(k,"]"))}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&s.is(a.start)&&s.is(a.end)}l.is=y})(u=t.Range||(t.Range={}));var c;(function(l){function h(f,a){return{uri:f,range:a}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&u.is(a.range)&&(C.string(a.uri)||C.undefined(a.uri))}l.is=y})(c=t.Location||(t.Location={}));var p;(function(l){function h(f,a,P,k){return{targetUri:f,targetRange:a,targetSelectionRange:P,originSelectionRange:k}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&u.is(a.targetRange)&&C.string(a.targetUri)&&u.is(a.targetSelectionRange)&&(u.is(a.originSelectionRange)||C.undefined(a.originSelectionRange))}l.is=y})(p=t.LocationLink||(t.LocationLink={}));var g;(function(l){function h(f,a,P,k){return{red:f,green:a,blue:P,alpha:k}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.numberRange(a.red,0,1)&&C.numberRange(a.green,0,1)&&C.numberRange(a.blue,0,1)&&C.numberRange(a.alpha,0,1)}l.is=y})(g=t.Color||(t.Color={}));var b;(function(l){function h(f,a){return{range:f,color:a}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&u.is(a.range)&&g.is(a.color)}l.is=y})(b=t.ColorInformation||(t.ColorInformation={}));var D;(function(l){function h(f,a,P){return{label:f,textEdit:a,additionalTextEdits:P}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.string(a.label)&&(C.undefined(a.textEdit)||z.is(a))&&(C.undefined(a.additionalTextEdits)||C.typedArray(a.additionalTextEdits,z.is))}l.is=y})(D=t.ColorPresentation||(t.ColorPresentation={}));var R;(function(l){l.Comment="comment",l.Imports="imports",l.Region="region"})(R=t.FoldingRangeKind||(t.FoldingRangeKind={}));var T;(function(l){function h(f,a,P,k,G,Ce){var le={startLine:f,endLine:a};return C.defined(P)&&(le.startCharacter=P),C.defined(k)&&(le.endCharacter=k),C.defined(G)&&(le.kind=G),C.defined(Ce)&&(le.collapsedText=Ce),le}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.uinteger(a.startLine)&&C.uinteger(a.startLine)&&(C.undefined(a.startCharacter)||C.uinteger(a.startCharacter))&&(C.undefined(a.endCharacter)||C.uinteger(a.endCharacter))&&(C.undefined(a.kind)||C.string(a.kind))}l.is=y})(T=t.FoldingRange||(t.FoldingRange={}));var q;(function(l){function h(f,a){return{location:f,message:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&c.is(a.location)&&C.string(a.message)}l.is=y})(q=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 j;(function(l){l.Unnecessary=1,l.Deprecated=2})(j=t.DiagnosticTag||(t.DiagnosticTag={}));var _;(function(l){function h(y){var f=y;return C.objectLiteral(f)&&C.string(f.href)}l.is=h})(_=t.CodeDescription||(t.CodeDescription={}));var v;(function(l){function h(f,a,P,k,G,Ce){var le={range:f,message:a};return C.defined(P)&&(le.severity=P),C.defined(k)&&(le.code=k),C.defined(G)&&(le.source=G),C.defined(Ce)&&(le.relatedInformation=Ce),le}l.create=h;function y(f){var a,P=f;return C.defined(P)&&u.is(P.range)&&C.string(P.message)&&(C.number(P.severity)||C.undefined(P.severity))&&(C.integer(P.code)||C.string(P.code)||C.undefined(P.code))&&(C.undefined(P.codeDescription)||C.string((a=P.codeDescription)===null||a===void 0?void 0:a.href))&&(C.string(P.source)||C.undefined(P.source))&&(C.undefined(P.relatedInformation)||C.typedArray(P.relatedInformation,q.is))}l.is=y})(v=t.Diagnostic||(t.Diagnostic={}));var N;(function(l){function h(f,a){for(var P=[],k=2;k<arguments.length;k++)P[k-2]=arguments[k];var G={title:f,command:a};return C.defined(P)&&P.length>0&&(G.arguments=P),G}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.title)&&C.string(a.command)}l.is=y})(N=t.Command||(t.Command={}));var z;(function(l){function h(P,k){return{range:P,newText:k}}l.replace=h;function y(P,k){return{range:{start:P,end:P},newText:k}}l.insert=y;function f(P){return{range:P,newText:""}}l.del=f;function a(P){var k=P;return C.objectLiteral(k)&&C.string(k.newText)&&u.is(k.range)}l.is=a})(z=t.TextEdit||(t.TextEdit={}));var J;(function(l){function h(f,a,P){var k={label:f};return a!==void 0&&(k.needsConfirmation=a),P!==void 0&&(k.description=P),k}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.string(a.label)&&(C.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(C.string(a.description)||a.description===void 0)}l.is=y})(J=t.ChangeAnnotation||(t.ChangeAnnotation={}));var ae;(function(l){function h(y){var f=y;return C.string(f)}l.is=h})(ae=t.ChangeAnnotationIdentifier||(t.ChangeAnnotationIdentifier={}));var He;(function(l){function h(P,k,G){return{range:P,newText:k,annotationId:G}}l.replace=h;function y(P,k,G){return{range:{start:P,end:P},newText:k,annotationId:G}}l.insert=y;function f(P,k){return{range:P,newText:"",annotationId:k}}l.del=f;function a(P){var k=P;return z.is(k)&&(J.is(k.annotationId)||ae.is(k.annotationId))}l.is=a})(He=t.AnnotatedTextEdit||(t.AnnotatedTextEdit={}));var dt;(function(l){function h(f,a){return{textDocument:f,edits:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&we.is(a.textDocument)&&Array.isArray(a.edits)}l.is=y})(dt=t.TextDocumentEdit||(t.TextDocumentEdit={}));var ft;(function(l){function h(f,a,P){var k={kind:"create",uri:f};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(k.options=a),P!==void 0&&(k.annotationId=P),k}l.create=h;function y(f){var a=f;return a&&a.kind==="create"&&C.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||C.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||C.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||ae.is(a.annotationId))}l.is=y})(ft=t.CreateFile||(t.CreateFile={}));var I;(function(l){function h(f,a,P,k){var G={kind:"rename",oldUri:f,newUri:a};return P!==void 0&&(P.overwrite!==void 0||P.ignoreIfExists!==void 0)&&(G.options=P),k!==void 0&&(G.annotationId=k),G}l.create=h;function y(f){var a=f;return a&&a.kind==="rename"&&C.string(a.oldUri)&&C.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||C.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||C.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||ae.is(a.annotationId))}l.is=y})(I=t.RenameFile||(t.RenameFile={}));var x;(function(l){function h(f,a,P){var k={kind:"delete",uri:f};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(k.options=a),P!==void 0&&(k.annotationId=P),k}l.create=h;function y(f){var a=f;return a&&a.kind==="delete"&&C.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||C.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||C.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||ae.is(a.annotationId))}l.is=y})(x=t.DeleteFile||(t.DeleteFile={}));var W;(function(l){function h(y){var f=y;return f&&(f.changes!==void 0||f.documentChanges!==void 0)&&(f.documentChanges===void 0||f.documentChanges.every(function(a){return C.string(a.kind)?ft.is(a)||I.is(a)||x.is(a):dt.is(a)}))}l.is=h})(W=t.WorkspaceEdit||(t.WorkspaceEdit={}));var L=function(){function l(h,y){this.edits=h,this.changeAnnotations=y}return l.prototype.insert=function(h,y,f){var a,P;if(f===void 0?a=z.insert(h,y):ae.is(f)?(P=f,a=He.insert(h,y,f)):(this.assertChangeAnnotations(this.changeAnnotations),P=this.changeAnnotations.manage(f),a=He.insert(h,y,P)),this.edits.push(a),P!==void 0)return P},l.prototype.replace=function(h,y,f){var a,P;if(f===void 0?a=z.replace(h,y):ae.is(f)?(P=f,a=He.replace(h,y,f)):(this.assertChangeAnnotations(this.changeAnnotations),P=this.changeAnnotations.manage(f),a=He.replace(h,y,P)),this.edits.push(a),P!==void 0)return P},l.prototype.delete=function(h,y){var f,a;if(y===void 0?f=z.del(h):ae.is(y)?(a=y,f=He.del(h,y)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(y),f=He.del(h,a)),this.edits.push(f),a!==void 0)return a},l.prototype.add=function(h){this.edits.push(h)},l.prototype.all=function(){return this.edits},l.prototype.clear=function(){this.edits.splice(0,this.edits.length)},l.prototype.assertChangeAnnotations=function(h){if(h===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},l}(),ne=function(){function l(h){this._annotations=h===void 0?Object.create(null):h,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(h,y){var f;if(ae.is(h)?f=h:(f=this.nextId(),y=h),this._annotations[f]!==void 0)throw new Error("Id ".concat(f," is already in use."));if(y===void 0)throw new Error("No annotation provided for id ".concat(f));return this._annotations[f]=y,this._size++,f},l.prototype.nextId=function(){return this._counter++,this._counter.toString()},l}(),Q=function(){function l(h){var y=this;this._textEditChanges=Object.create(null),h!==void 0?(this._workspaceEdit=h,h.documentChanges?(this._changeAnnotations=new ne(h.changeAnnotations),h.changeAnnotations=this._changeAnnotations.all(),h.documentChanges.forEach(function(f){if(dt.is(f)){var a=new L(f.edits,y._changeAnnotations);y._textEditChanges[f.textDocument.uri]=a}})):h.changes&&Object.keys(h.changes).forEach(function(f){var a=new L(h.changes[f]);y._textEditChanges[f]=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(h){if(we.is(h)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var y={uri:h.uri,version:h.version},f=this._textEditChanges[y.uri];if(!f){var a=[],P={textDocument:y,edits:a};this._workspaceEdit.documentChanges.push(P),f=new L(a,this._changeAnnotations),this._textEditChanges[y.uri]=f}return f}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var f=this._textEditChanges[h];if(!f){var a=[];this._workspaceEdit.changes[h]=a,f=new L(a),this._textEditChanges[h]=f}return f}},l.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ne,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(h,y,f){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;J.is(y)||ae.is(y)?a=y:f=y;var P,k;if(a===void 0?P=ft.create(h,f):(k=ae.is(a)?a:this._changeAnnotations.manage(a),P=ft.create(h,f,k)),this._workspaceEdit.documentChanges.push(P),k!==void 0)return k},l.prototype.renameFile=function(h,y,f,a){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var P;J.is(f)||ae.is(f)?P=f:a=f;var k,G;if(P===void 0?k=I.create(h,y,a):(G=ae.is(P)?P:this._changeAnnotations.manage(P),k=I.create(h,y,a,G)),this._workspaceEdit.documentChanges.push(k),G!==void 0)return G},l.prototype.deleteFile=function(h,y,f){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;J.is(y)||ae.is(y)?a=y:f=y;var P,k;if(a===void 0?P=x.create(h,f):(k=ae.is(a)?a:this._changeAnnotations.manage(a),P=x.create(h,f,k)),this._workspaceEdit.documentChanges.push(P),k!==void 0)return k},l}();t.WorkspaceChange=Q;var K;(function(l){function h(f){return{uri:f}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.uri)}l.is=y})(K=t.TextDocumentIdentifier||(t.TextDocumentIdentifier={}));var ze;(function(l){function h(f,a){return{uri:f,version:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.uri)&&C.integer(a.version)}l.is=y})(ze=t.VersionedTextDocumentIdentifier||(t.VersionedTextDocumentIdentifier={}));var we;(function(l){function h(f,a){return{uri:f,version:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.uri)&&(a.version===null||C.integer(a.version))}l.is=y})(we=t.OptionalVersionedTextDocumentIdentifier||(t.OptionalVersionedTextDocumentIdentifier={}));var se;(function(l){function h(f,a,P,k){return{uri:f,languageId:a,version:P,text:k}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.uri)&&C.string(a.languageId)&&C.integer(a.version)&&C.string(a.text)}l.is=y})(se=t.TextDocumentItem||(t.TextDocumentItem={}));var St;(function(l){l.PlainText="plaintext",l.Markdown="markdown";function h(y){var f=y;return f===l.PlainText||f===l.Markdown}l.is=h})(St=t.MarkupKind||(t.MarkupKind={}));var xn;(function(l){function h(y){var f=y;return C.objectLiteral(y)&&St.is(f.kind)&&C.string(f.value)}l.is=h})(xn=t.MarkupContent||(t.MarkupContent={}));var Ko;(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})(Ko=t.CompletionItemKind||(t.CompletionItemKind={}));var $r;(function(l){l.PlainText=1,l.Snippet=2})($r=t.InsertTextFormat||(t.InsertTextFormat={}));var Yr;(function(l){l.Deprecated=1})(Yr=t.CompletionItemTag||(t.CompletionItemTag={}));var Go;(function(l){function h(f,a,P){return{newText:f,insert:a,replace:P}}l.create=h;function y(f){var a=f;return a&&C.string(a.newText)&&u.is(a.insert)&&u.is(a.replace)}l.is=y})(Go=t.InsertReplaceEdit||(t.InsertReplaceEdit={}));var Qo;(function(l){l.asIs=1,l.adjustIndentation=2})(Qo=t.InsertTextMode||(t.InsertTextMode={}));var Jo;(function(l){function h(y){var f=y;return f&&(C.string(f.detail)||f.detail===void 0)&&(C.string(f.description)||f.description===void 0)}l.is=h})(Jo=t.CompletionItemLabelDetails||(t.CompletionItemLabelDetails={}));var Xo;(function(l){function h(y){return{label:y}}l.create=h})(Xo=t.CompletionItem||(t.CompletionItem={}));var Zo;(function(l){function h(y,f){return{items:y||[],isIncomplete:!!f}}l.create=h})(Zo=t.CompletionList||(t.CompletionList={}));var ar;(function(l){function h(f){return f.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}l.fromPlainText=h;function y(f){var a=f;return C.string(a)||C.objectLiteral(a)&&C.string(a.language)&&C.string(a.value)}l.is=y})(ar=t.MarkedString||(t.MarkedString={}));var Tt;(function(l){function h(y){var f=y;return!!f&&C.objectLiteral(f)&&(xn.is(f.contents)||ar.is(f.contents)||C.typedArray(f.contents,ar.is))&&(y.range===void 0||u.is(y.range))}l.is=h})(Tt=t.Hover||(t.Hover={}));var es;(function(l){function h(y,f){return f?{label:y,documentation:f}:{label:y}}l.create=h})(es=t.ParameterInformation||(t.ParameterInformation={}));var ts;(function(l){function h(y,f){for(var a=[],P=2;P<arguments.length;P++)a[P-2]=arguments[P];var k={label:y};return C.defined(f)&&(k.documentation=f),C.defined(a)?k.parameters=a:k.parameters=[],k}l.create=h})(ts=t.SignatureInformation||(t.SignatureInformation={}));var wn;(function(l){l.Text=1,l.Read=2,l.Write=3})(wn=t.DocumentHighlightKind||(t.DocumentHighlightKind={}));var ns;(function(l){function h(y,f){var a={range:y};return C.number(f)&&(a.kind=f),a}l.create=h})(ns=t.DocumentHighlight||(t.DocumentHighlight={}));var cr;(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})(cr=t.SymbolKind||(t.SymbolKind={}));var rs;(function(l){l.Deprecated=1})(rs=t.SymbolTag||(t.SymbolTag={}));var $t;(function(l){function h(y,f,a,P,k){var G={name:y,kind:f,location:{uri:P,range:a}};return k&&(G.containerName=k),G}l.create=h})($t=t.SymbolInformation||(t.SymbolInformation={}));var dn;(function(l){function h(y,f,a,P){return P!==void 0?{name:y,kind:f,location:{uri:a,range:P}}:{name:y,kind:f,location:{uri:a}}}l.create=h})(dn=t.WorkspaceSymbol||(t.WorkspaceSymbol={}));var is;(function(l){function h(f,a,P,k,G,Ce){var le={name:f,detail:a,kind:P,range:k,selectionRange:G};return Ce!==void 0&&(le.children=Ce),le}l.create=h;function y(f){var a=f;return a&&C.string(a.name)&&C.number(a.kind)&&u.is(a.range)&&u.is(a.selectionRange)&&(a.detail===void 0||C.string(a.detail))&&(a.deprecated===void 0||C.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}l.is=y})(is=t.DocumentSymbol||(t.DocumentSymbol={}));var os;(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"})(os=t.CodeActionKind||(t.CodeActionKind={}));var jt;(function(l){l.Invoked=1,l.Automatic=2})(jt=t.CodeActionTriggerKind||(t.CodeActionTriggerKind={}));var Kr;(function(l){function h(f,a,P){var k={diagnostics:f};return a!=null&&(k.only=a),P!=null&&(k.triggerKind=P),k}l.create=h;function y(f){var a=f;return C.defined(a)&&C.typedArray(a.diagnostics,v.is)&&(a.only===void 0||C.typedArray(a.only,C.string))&&(a.triggerKind===void 0||a.triggerKind===jt.Invoked||a.triggerKind===jt.Automatic)}l.is=y})(Kr=t.CodeActionContext||(t.CodeActionContext={}));var Gr;(function(l){function h(f,a,P){var k={title:f},G=!0;return typeof a=="string"?(G=!1,k.kind=a):N.is(a)?k.command=a:k.edit=a,G&&P!==void 0&&(k.kind=P),k}l.create=h;function y(f){var a=f;return a&&C.string(a.title)&&(a.diagnostics===void 0||C.typedArray(a.diagnostics,v.is))&&(a.kind===void 0||C.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||N.is(a.command))&&(a.isPreferred===void 0||C.boolean(a.isPreferred))&&(a.edit===void 0||W.is(a.edit))}l.is=y})(Gr=t.CodeAction||(t.CodeAction={}));var ur;(function(l){function h(f,a){var P={range:f};return C.defined(a)&&(P.data=a),P}l.create=h;function y(f){var a=f;return C.defined(a)&&u.is(a.range)&&(C.undefined(a.command)||N.is(a.command))}l.is=y})(ur=t.CodeLens||(t.CodeLens={}));var Qr;(function(l){function h(f,a){return{tabSize:f,insertSpaces:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.uinteger(a.tabSize)&&C.boolean(a.insertSpaces)}l.is=y})(Qr=t.FormattingOptions||(t.FormattingOptions={}));var Yt;(function(l){function h(f,a,P){return{range:f,target:a,data:P}}l.create=h;function y(f){var a=f;return C.defined(a)&&u.is(a.range)&&(C.undefined(a.target)||C.string(a.target))}l.is=y})(Yt=t.DocumentLink||(t.DocumentLink={}));var m;(function(l){function h(f,a){return{range:f,parent:a}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&u.is(a.range)&&(a.parent===void 0||l.is(a.parent))}l.is=y})(m=t.SelectionRange||(t.SelectionRange={}));var w;(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"})(w=t.SemanticTokenTypes||(t.SemanticTokenTypes={}));var E;(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"})(E=t.SemanticTokenModifiers||(t.SemanticTokenModifiers={}));var F;(function(l){function h(y){var f=y;return C.objectLiteral(f)&&(f.resultId===void 0||typeof f.resultId=="string")&&Array.isArray(f.data)&&(f.data.length===0||typeof f.data[0]=="number")}l.is=h})(F=t.SemanticTokens||(t.SemanticTokens={}));var ce;(function(l){function h(f,a){return{range:f,text:a}}l.create=h;function y(f){var a=f;return a!=null&&u.is(a.range)&&C.string(a.text)}l.is=y})(ce=t.InlineValueText||(t.InlineValueText={}));var ie;(function(l){function h(f,a,P){return{range:f,variableName:a,caseSensitiveLookup:P}}l.create=h;function y(f){var a=f;return a!=null&&u.is(a.range)&&C.boolean(a.caseSensitiveLookup)&&(C.string(a.variableName)||a.variableName===void 0)}l.is=y})(ie=t.InlineValueVariableLookup||(t.InlineValueVariableLookup={}));var ge;(function(l){function h(f,a){return{range:f,expression:a}}l.create=h;function y(f){var a=f;return a!=null&&u.is(a.range)&&(C.string(a.expression)||a.expression===void 0)}l.is=y})(ge=t.InlineValueEvaluatableExpression||(t.InlineValueEvaluatableExpression={}));var me;(function(l){function h(f,a){return{frameId:f,stoppedLocation:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&u.is(f.stoppedLocation)}l.is=y})(me=t.InlineValueContext||(t.InlineValueContext={}));var X;(function(l){l.Type=1,l.Parameter=2;function h(y){return y===1||y===2}l.is=h})(X=t.InlayHintKind||(t.InlayHintKind={}));var ue;(function(l){function h(f){return{value:f}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&(a.tooltip===void 0||C.string(a.tooltip)||xn.is(a.tooltip))&&(a.location===void 0||c.is(a.location))&&(a.command===void 0||N.is(a.command))}l.is=y})(ue=t.InlayHintLabelPart||(t.InlayHintLabelPart={}));var re;(function(l){function h(f,a,P){var k={position:f,label:a};return P!==void 0&&(k.kind=P),k}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&s.is(a.position)&&(C.string(a.label)||C.typedArray(a.label,ue.is))&&(a.kind===void 0||X.is(a.kind))&&a.textEdits===void 0||C.typedArray(a.textEdits,z.is)&&(a.tooltip===void 0||C.string(a.tooltip)||xn.is(a.tooltip))&&(a.paddingLeft===void 0||C.boolean(a.paddingLeft))&&(a.paddingRight===void 0||C.boolean(a.paddingRight))}l.is=y})(re=t.InlayHint||(t.InlayHint={}));var _e;(function(l){function h(y){var f=y;return C.objectLiteral(f)&&r.is(f.uri)&&C.string(f.name)}l.is=h})(_e=t.WorkspaceFolder||(t.WorkspaceFolder={})),t.EOL=[`
|
|
63
|
+
`)),w){let F=m.error?` Request failed: ${m.error.message} (${m.error.code}).`:"";z.log(`Received response '${w.method} - (${m.id})' in ${Date.now()-w.timerStart}ms.${F}`,E)}else z.log(`Received response ${m.id} without active response promise.`,E)}else $t("receive-response",m)}function $t(m,w){if(!z||v===oe.Off)return;let E={isLSPMessage:!0,type:m,message:w,timestamp:Date.now()};z.log(E)}function dn(){if(we())throw new Kn(Qi.Closed,"Connection is closed.");if(se())throw new Kn(Qi.Disposed,"Connection is disposed.")}function is(){if(ze())throw new Kn(Qi.AlreadyListening,"Connection is already listening")}function os(){if(!ze())throw new Error("Call listen() first.")}function It(m){return m===void 0?null:m}function Kr(m){if(m!==null)return m}function Gr(m){return m!=null&&!Array.isArray(m)&&typeof m=="object"}function ur(m,w){switch(m){case V.ParameterStructures.auto:return Gr(w)?Kr(w):[It(w)];case V.ParameterStructures.byName:if(!Gr(w))throw new Error("Received parameters by name but param is not an object literal.");return Kr(w);case V.ParameterStructures.byPosition:return[It(w)];default:throw new Error(`Unknown parameter structure ${m.toString()}`)}}function Qr(m,w){let E,F=m.numberOfParams;switch(F){case 0:E=void 0;break;case 1:E=ur(m.parameterStructures,w[0]);break;default:E=[];for(let ce=0;ce<w.length&&ce<F;ce++)E.push(It(w[ce]));if(w.length<F)for(let ce=w.length;ce<F;ce++)E.push(null);break}return E}let Yt={sendNotification:(m,...w)=>{dn();let E,F;if(ye.string(m)){E=m;let ie=w[0],ge=0,me=V.ParameterStructures.auto;V.ParameterStructures.is(ie)&&(ge=1,me=ie);let X=w.length,ue=X-ge;switch(ue){case 0:F=void 0;break;case 1:F=ur(me,w[ge]);break;default:if(me===V.ParameterStructures.byName)throw new Error(`Received ${ue} parameters for 'by Name' notification parameter structure.`);F=w.slice(ge,X).map(re=>It(re));break}}else{let ie=w;E=m.method,F=Qr(m,ie)}let ce={jsonrpc:c,method:E,params:F};return ts(ce),t.write(ce).catch(ie=>{throw i.error("Sending notification failed."),ie})},onNotification:(m,w)=>{dn();let E;return ye.func(m)?b=m:w&&(ye.string(m)?(E=m,D.set(m,{type:void 0,handler:w})):(E=m.method,D.set(m.method,{type:m,handler:w}))),{dispose:()=>{E!==void 0?D.delete(E):b=void 0}}},onProgress:(m,w,E)=>{if(R.has(w))throw new Error(`Progress handler for token ${w} already registered`);return R.set(w,E),{dispose:()=>{R.delete(w)}}},sendProgress:(m,w,E)=>Yt.sendNotification(Rr.type,{token:w,value:E}),onUnhandledProgress:ft.event,sendRequest:(m,...w)=>{dn(),os();let E,F,ce;if(ye.string(m)){E=m;let X=w[0],ue=w[w.length-1],re=0,_e=V.ParameterStructures.auto;V.ParameterStructures.is(X)&&(re=1,_e=X);let Me=w.length;Qa.CancellationToken.is(ue)&&(Me=Me-1,ce=ue);let it=Me-re;switch(it){case 0:F=void 0;break;case 1:F=ur(_e,w[re]);break;default:if(_e===V.ParameterStructures.byName)throw new Error(`Received ${it} parameters for 'by Name' request parameter structure.`);F=w.slice(re,Me).map(C=>It(C));break}}else{let X=w;E=m.method,F=Qr(m,X);let ue=m.numberOfParams;ce=Qa.CancellationToken.is(X[ue])?X[ue]:void 0}let ie=o++,ge;ce&&(ge=ce.onCancellationRequested(()=>{let X=x.sender.sendCancellation(Yt,ie);return X===void 0?(i.log(`Received no promise from cancellation strategy when cancelling id ${ie}`),Promise.resolve()):X.catch(()=>{i.log(`Sending cancellation messages for id ${ie} failed`)})}));let me={jsonrpc:c,id:ie,method:E,params:F};return es(me),typeof x.sender.enableCancellation=="function"&&x.sender.enableCancellation(me),new Promise(async(X,ue)=>{let re=it=>{X(it),x.sender.cleanup(ie),ge?.dispose()},_e=it=>{ue(it),x.sender.cleanup(ie),ge?.dispose()},Me={method:E,timerStart:Date.now(),resolve:re,reject:_e};try{await t.write(me),B.set(ie,Me)}catch(it){throw i.error("Sending request failed."),Me.reject(new V.ResponseError(V.ErrorCodes.MessageWriteError,it.message?it.message:"Unknown reason")),it}})},onRequest:(m,w)=>{dn();let E=null;return Xa.is(m)?(E=void 0,p=m):ye.string(m)?(E=null,w!==void 0&&(E=m,g.set(m,{handler:w,type:void 0}))):w!==void 0&&(E=m.method,g.set(m.method,{type:m,handler:w})),{dispose:()=>{E!==null&&(E!==void 0?g.delete(E):p=void 0)}}},hasPendingResponse:()=>B.size>0,trace:async(m,w,E)=>{let F=!1,ce=ht.Text;E!==void 0&&(ye.boolean(E)?F=E:(F=E.sendNotification||!1,ce=E.traceFormat||ht.Text)),v=m,N=ce,v===oe.Off?z=void 0:z=w,F&&!we()&&!se()&&await Yt.sendNotification(Pd.type,{value:oe.toString(m)})},onError:ae.event,onClose:He.event,onUnhandledNotification:dt.event,onDispose:I.event,end:()=>{t.end()},dispose:()=>{if(se())return;J=yt.Disposed,I.fire(void 0);let m=new V.ResponseError(V.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let w of B.values())w.reject(m);B=new Map,_=new Map,j=new Set,q=new vd.LinkedMap,ye.func(t.dispose)&&t.dispose(),ye.func(e.dispose)&&e.dispose()},listen:()=>{dn(),is(),J=yt.Listening,e.listen(Qo)},inspect:()=>{(0,bd.default)().console.log("inspect")}};return Yt.onNotification(Za.type,m=>{if(v===oe.Off||!z)return;let w=v===oe.Verbose||v===oe.Compact;z.log(m.message,w?m.verbose:void 0)}),Yt.onNotification(Rr.type,m=>{let w=R.get(m.token);w?w(m.value):ft.fire(m)}),Yt}U.createMessageConnection=Nb});var Ji=A(S=>{"use strict";Object.defineProperty(S,"__esModule",{value:!0});S.ProgressType=S.ProgressToken=S.createMessageConnection=S.NullLogger=S.ConnectionOptions=S.ConnectionStrategy=S.AbstractMessageBuffer=S.WriteableStreamMessageWriter=S.AbstractMessageWriter=S.MessageWriter=S.ReadableStreamMessageReader=S.AbstractMessageReader=S.MessageReader=S.SharedArrayReceiverStrategy=S.SharedArraySenderStrategy=S.CancellationToken=S.CancellationTokenSource=S.Emitter=S.Event=S.Disposable=S.LRUCache=S.Touch=S.LinkedMap=S.ParameterStructures=S.NotificationType9=S.NotificationType8=S.NotificationType7=S.NotificationType6=S.NotificationType5=S.NotificationType4=S.NotificationType3=S.NotificationType2=S.NotificationType1=S.NotificationType0=S.NotificationType=S.ErrorCodes=S.ResponseError=S.RequestType9=S.RequestType8=S.RequestType7=S.RequestType6=S.RequestType5=S.RequestType4=S.RequestType3=S.RequestType2=S.RequestType1=S.RequestType0=S.RequestType=S.Message=S.RAL=void 0;S.MessageStrategy=S.CancellationStrategy=S.CancellationSenderStrategy=S.CancellationReceiverStrategy=S.ConnectionError=S.ConnectionErrors=S.LogTraceNotification=S.SetTraceNotification=S.TraceFormat=S.TraceValues=S.Trace=void 0;var fe=xa();Object.defineProperty(S,"Message",{enumerable:!0,get:function(){return fe.Message}});Object.defineProperty(S,"RequestType",{enumerable:!0,get:function(){return fe.RequestType}});Object.defineProperty(S,"RequestType0",{enumerable:!0,get:function(){return fe.RequestType0}});Object.defineProperty(S,"RequestType1",{enumerable:!0,get:function(){return fe.RequestType1}});Object.defineProperty(S,"RequestType2",{enumerable:!0,get:function(){return fe.RequestType2}});Object.defineProperty(S,"RequestType3",{enumerable:!0,get:function(){return fe.RequestType3}});Object.defineProperty(S,"RequestType4",{enumerable:!0,get:function(){return fe.RequestType4}});Object.defineProperty(S,"RequestType5",{enumerable:!0,get:function(){return fe.RequestType5}});Object.defineProperty(S,"RequestType6",{enumerable:!0,get:function(){return fe.RequestType6}});Object.defineProperty(S,"RequestType7",{enumerable:!0,get:function(){return fe.RequestType7}});Object.defineProperty(S,"RequestType8",{enumerable:!0,get:function(){return fe.RequestType8}});Object.defineProperty(S,"RequestType9",{enumerable:!0,get:function(){return fe.RequestType9}});Object.defineProperty(S,"ResponseError",{enumerable:!0,get:function(){return fe.ResponseError}});Object.defineProperty(S,"ErrorCodes",{enumerable:!0,get:function(){return fe.ErrorCodes}});Object.defineProperty(S,"NotificationType",{enumerable:!0,get:function(){return fe.NotificationType}});Object.defineProperty(S,"NotificationType0",{enumerable:!0,get:function(){return fe.NotificationType0}});Object.defineProperty(S,"NotificationType1",{enumerable:!0,get:function(){return fe.NotificationType1}});Object.defineProperty(S,"NotificationType2",{enumerable:!0,get:function(){return fe.NotificationType2}});Object.defineProperty(S,"NotificationType3",{enumerable:!0,get:function(){return fe.NotificationType3}});Object.defineProperty(S,"NotificationType4",{enumerable:!0,get:function(){return fe.NotificationType4}});Object.defineProperty(S,"NotificationType5",{enumerable:!0,get:function(){return fe.NotificationType5}});Object.defineProperty(S,"NotificationType6",{enumerable:!0,get:function(){return fe.NotificationType6}});Object.defineProperty(S,"NotificationType7",{enumerable:!0,get:function(){return fe.NotificationType7}});Object.defineProperty(S,"NotificationType8",{enumerable:!0,get:function(){return fe.NotificationType8}});Object.defineProperty(S,"NotificationType9",{enumerable:!0,get:function(){return fe.NotificationType9}});Object.defineProperty(S,"ParameterStructures",{enumerable:!0,get:function(){return fe.ParameterStructures}});var oc=ka();Object.defineProperty(S,"LinkedMap",{enumerable:!0,get:function(){return oc.LinkedMap}});Object.defineProperty(S,"LRUCache",{enumerable:!0,get:function(){return oc.LRUCache}});Object.defineProperty(S,"Touch",{enumerable:!0,get:function(){return oc.Touch}});var Ob=ld();Object.defineProperty(S,"Disposable",{enumerable:!0,get:function(){return Ob.Disposable}});var Sd=Vn();Object.defineProperty(S,"Event",{enumerable:!0,get:function(){return Sd.Event}});Object.defineProperty(S,"Emitter",{enumerable:!0,get:function(){return Sd.Emitter}});var Td=Vi();Object.defineProperty(S,"CancellationTokenSource",{enumerable:!0,get:function(){return Td.CancellationTokenSource}});Object.defineProperty(S,"CancellationToken",{enumerable:!0,get:function(){return Td.CancellationToken}});var xd=dd();Object.defineProperty(S,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return xd.SharedArraySenderStrategy}});Object.defineProperty(S,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return xd.SharedArrayReceiverStrategy}});var sc=fd();Object.defineProperty(S,"MessageReader",{enumerable:!0,get:function(){return sc.MessageReader}});Object.defineProperty(S,"AbstractMessageReader",{enumerable:!0,get:function(){return sc.AbstractMessageReader}});Object.defineProperty(S,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return sc.ReadableStreamMessageReader}});var ac=hd();Object.defineProperty(S,"MessageWriter",{enumerable:!0,get:function(){return ac.MessageWriter}});Object.defineProperty(S,"AbstractMessageWriter",{enumerable:!0,get:function(){return ac.AbstractMessageWriter}});Object.defineProperty(S,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return ac.WriteableStreamMessageWriter}});var Eb=yd();Object.defineProperty(S,"AbstractMessageBuffer",{enumerable:!0,get:function(){return Eb.AbstractMessageBuffer}});var Le=Rd();Object.defineProperty(S,"ConnectionStrategy",{enumerable:!0,get:function(){return Le.ConnectionStrategy}});Object.defineProperty(S,"ConnectionOptions",{enumerable:!0,get:function(){return Le.ConnectionOptions}});Object.defineProperty(S,"NullLogger",{enumerable:!0,get:function(){return Le.NullLogger}});Object.defineProperty(S,"createMessageConnection",{enumerable:!0,get:function(){return Le.createMessageConnection}});Object.defineProperty(S,"ProgressToken",{enumerable:!0,get:function(){return Le.ProgressToken}});Object.defineProperty(S,"ProgressType",{enumerable:!0,get:function(){return Le.ProgressType}});Object.defineProperty(S,"Trace",{enumerable:!0,get:function(){return Le.Trace}});Object.defineProperty(S,"TraceValues",{enumerable:!0,get:function(){return Le.TraceValues}});Object.defineProperty(S,"TraceFormat",{enumerable:!0,get:function(){return Le.TraceFormat}});Object.defineProperty(S,"SetTraceNotification",{enumerable:!0,get:function(){return Le.SetTraceNotification}});Object.defineProperty(S,"LogTraceNotification",{enumerable:!0,get:function(){return Le.LogTraceNotification}});Object.defineProperty(S,"ConnectionErrors",{enumerable:!0,get:function(){return Le.ConnectionErrors}});Object.defineProperty(S,"ConnectionError",{enumerable:!0,get:function(){return Le.ConnectionError}});Object.defineProperty(S,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return Le.CancellationReceiverStrategy}});Object.defineProperty(S,"CancellationSenderStrategy",{enumerable:!0,get:function(){return Le.CancellationSenderStrategy}});Object.defineProperty(S,"CancellationStrategy",{enumerable:!0,get:function(){return Le.CancellationStrategy}});Object.defineProperty(S,"MessageStrategy",{enumerable:!0,get:function(){return Le.MessageStrategy}});var Mb=Zt();S.RAL=Mb.default});var kd=A(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});var At=Ji(),Xi=class e extends At.AbstractMessageBuffer{constructor(t="utf-8"){super(t),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return e.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)}};Xi.emptyBuffer=new Uint8Array(0);var cc=class{constructor(t){this.socket=t,this._onData=new At.Emitter,this._messageListener=n=>{n.data.arrayBuffer().then(i=>{this._onData.fire(new Uint8Array(i))},()=>{(0,At.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(t){return this.socket.addEventListener("close",t),At.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),At.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),At.Disposable.create(()=>this.socket.removeEventListener("end",t))}onData(t){return this._onData.event(t)}},uc=class{constructor(t){this.socket=t}onClose(t){return this.socket.addEventListener("close",t),At.Disposable.create(()=>this.socket.removeEventListener("close",t))}onError(t){return this.socket.addEventListener("error",t),At.Disposable.create(()=>this.socket.removeEventListener("error",t))}onEnd(t){return this.socket.addEventListener("end",t),At.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()}},Ib=new TextEncoder,wd=Object.freeze({messageBuffer:Object.freeze({create:e=>new Xi(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(Ib.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 cc(e),asWritableStream:e=>new uc(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 lc(){return wd}(function(e){function t(){At.RAL.install(wd)}e.install=t})(lc||(lc={}));dc.default=lc});var _n=A(nt=>{"use strict";var jb=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]}),Lb=nt&&nt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&jb(t,e,n)};Object.defineProperty(nt,"__esModule",{value:!0});nt.createMessageConnection=nt.BrowserMessageWriter=nt.BrowserMessageReader=void 0;var Fb=kd();Fb.default.install();var Gn=Ji();Lb(Ji(),nt);var fc=class extends Gn.AbstractMessageReader{constructor(t){super(),this._onData=new Gn.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)}};nt.BrowserMessageReader=fc;var pc=class extends Gn.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(){}};nt.BrowserMessageWriter=pc;function Ub(e,t,n,r){return n===void 0&&(n=Gn.NullLogger),Gn.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,Gn.createMessageConnection)(e,t,n,r)}nt.createMessageConnection=Ub});var gc=A((LR,Ad)=>{"use strict";Ad.exports=_n()});var eo=A((qd,Zi)=>{(function(e){if(typeof Zi=="object"&&typeof Zi.exports=="object"){var t=e(iu,qd);t!==void 0&&(Zi.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 h(y){return typeof y=="string"}l.is=h})(n=t.DocumentUri||(t.DocumentUri={}));var r;(function(l){function h(y){return typeof y=="string"}l.is=h})(r=t.URI||(t.URI={}));var i;(function(l){l.MIN_VALUE=-2147483648,l.MAX_VALUE=2147483647;function h(y){return typeof y=="number"&&l.MIN_VALUE<=y&&y<=l.MAX_VALUE}l.is=h})(i=t.integer||(t.integer={}));var o;(function(l){l.MIN_VALUE=0,l.MAX_VALUE=2147483647;function h(y){return typeof y=="number"&&l.MIN_VALUE<=y&&y<=l.MAX_VALUE}l.is=h})(o=t.uinteger||(t.uinteger={}));var s;(function(l){function h(f,a){return f===Number.MAX_VALUE&&(f=o.MAX_VALUE),a===Number.MAX_VALUE&&(a=o.MAX_VALUE),{line:f,character:a}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.uinteger(a.line)&&C.uinteger(a.character)}l.is=y})(s=t.Position||(t.Position={}));var u;(function(l){function h(f,a,P,k){if(C.uinteger(f)&&C.uinteger(a)&&C.uinteger(P)&&C.uinteger(k))return{start:s.create(f,a),end:s.create(P,k)};if(s.is(f)&&s.is(a))return{start:f,end:a};throw new Error("Range#create called with invalid arguments[".concat(f,", ").concat(a,", ").concat(P,", ").concat(k,"]"))}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&s.is(a.start)&&s.is(a.end)}l.is=y})(u=t.Range||(t.Range={}));var c;(function(l){function h(f,a){return{uri:f,range:a}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&u.is(a.range)&&(C.string(a.uri)||C.undefined(a.uri))}l.is=y})(c=t.Location||(t.Location={}));var p;(function(l){function h(f,a,P,k){return{targetUri:f,targetRange:a,targetSelectionRange:P,originSelectionRange:k}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&u.is(a.targetRange)&&C.string(a.targetUri)&&u.is(a.targetSelectionRange)&&(u.is(a.originSelectionRange)||C.undefined(a.originSelectionRange))}l.is=y})(p=t.LocationLink||(t.LocationLink={}));var g;(function(l){function h(f,a,P,k){return{red:f,green:a,blue:P,alpha:k}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.numberRange(a.red,0,1)&&C.numberRange(a.green,0,1)&&C.numberRange(a.blue,0,1)&&C.numberRange(a.alpha,0,1)}l.is=y})(g=t.Color||(t.Color={}));var b;(function(l){function h(f,a){return{range:f,color:a}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&u.is(a.range)&&g.is(a.color)}l.is=y})(b=t.ColorInformation||(t.ColorInformation={}));var D;(function(l){function h(f,a,P){return{label:f,textEdit:a,additionalTextEdits:P}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.string(a.label)&&(C.undefined(a.textEdit)||z.is(a))&&(C.undefined(a.additionalTextEdits)||C.typedArray(a.additionalTextEdits,z.is))}l.is=y})(D=t.ColorPresentation||(t.ColorPresentation={}));var R;(function(l){l.Comment="comment",l.Imports="imports",l.Region="region"})(R=t.FoldingRangeKind||(t.FoldingRangeKind={}));var T;(function(l){function h(f,a,P,k,G,Ce){var le={startLine:f,endLine:a};return C.defined(P)&&(le.startCharacter=P),C.defined(k)&&(le.endCharacter=k),C.defined(G)&&(le.kind=G),C.defined(Ce)&&(le.collapsedText=Ce),le}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.uinteger(a.startLine)&&C.uinteger(a.startLine)&&(C.undefined(a.startCharacter)||C.uinteger(a.startCharacter))&&(C.undefined(a.endCharacter)||C.uinteger(a.endCharacter))&&(C.undefined(a.kind)||C.string(a.kind))}l.is=y})(T=t.FoldingRange||(t.FoldingRange={}));var q;(function(l){function h(f,a){return{location:f,message:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&c.is(a.location)&&C.string(a.message)}l.is=y})(q=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 j;(function(l){l.Unnecessary=1,l.Deprecated=2})(j=t.DiagnosticTag||(t.DiagnosticTag={}));var _;(function(l){function h(y){var f=y;return C.objectLiteral(f)&&C.string(f.href)}l.is=h})(_=t.CodeDescription||(t.CodeDescription={}));var v;(function(l){function h(f,a,P,k,G,Ce){var le={range:f,message:a};return C.defined(P)&&(le.severity=P),C.defined(k)&&(le.code=k),C.defined(G)&&(le.source=G),C.defined(Ce)&&(le.relatedInformation=Ce),le}l.create=h;function y(f){var a,P=f;return C.defined(P)&&u.is(P.range)&&C.string(P.message)&&(C.number(P.severity)||C.undefined(P.severity))&&(C.integer(P.code)||C.string(P.code)||C.undefined(P.code))&&(C.undefined(P.codeDescription)||C.string((a=P.codeDescription)===null||a===void 0?void 0:a.href))&&(C.string(P.source)||C.undefined(P.source))&&(C.undefined(P.relatedInformation)||C.typedArray(P.relatedInformation,q.is))}l.is=y})(v=t.Diagnostic||(t.Diagnostic={}));var N;(function(l){function h(f,a){for(var P=[],k=2;k<arguments.length;k++)P[k-2]=arguments[k];var G={title:f,command:a};return C.defined(P)&&P.length>0&&(G.arguments=P),G}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.title)&&C.string(a.command)}l.is=y})(N=t.Command||(t.Command={}));var z;(function(l){function h(P,k){return{range:P,newText:k}}l.replace=h;function y(P,k){return{range:{start:P,end:P},newText:k}}l.insert=y;function f(P){return{range:P,newText:""}}l.del=f;function a(P){var k=P;return C.objectLiteral(k)&&C.string(k.newText)&&u.is(k.range)}l.is=a})(z=t.TextEdit||(t.TextEdit={}));var J;(function(l){function h(f,a,P){var k={label:f};return a!==void 0&&(k.needsConfirmation=a),P!==void 0&&(k.description=P),k}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&C.string(a.label)&&(C.boolean(a.needsConfirmation)||a.needsConfirmation===void 0)&&(C.string(a.description)||a.description===void 0)}l.is=y})(J=t.ChangeAnnotation||(t.ChangeAnnotation={}));var ae;(function(l){function h(y){var f=y;return C.string(f)}l.is=h})(ae=t.ChangeAnnotationIdentifier||(t.ChangeAnnotationIdentifier={}));var He;(function(l){function h(P,k,G){return{range:P,newText:k,annotationId:G}}l.replace=h;function y(P,k,G){return{range:{start:P,end:P},newText:k,annotationId:G}}l.insert=y;function f(P,k){return{range:P,newText:"",annotationId:k}}l.del=f;function a(P){var k=P;return z.is(k)&&(J.is(k.annotationId)||ae.is(k.annotationId))}l.is=a})(He=t.AnnotatedTextEdit||(t.AnnotatedTextEdit={}));var dt;(function(l){function h(f,a){return{textDocument:f,edits:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&we.is(a.textDocument)&&Array.isArray(a.edits)}l.is=y})(dt=t.TextDocumentEdit||(t.TextDocumentEdit={}));var ft;(function(l){function h(f,a,P){var k={kind:"create",uri:f};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(k.options=a),P!==void 0&&(k.annotationId=P),k}l.create=h;function y(f){var a=f;return a&&a.kind==="create"&&C.string(a.uri)&&(a.options===void 0||(a.options.overwrite===void 0||C.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||C.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||ae.is(a.annotationId))}l.is=y})(ft=t.CreateFile||(t.CreateFile={}));var I;(function(l){function h(f,a,P,k){var G={kind:"rename",oldUri:f,newUri:a};return P!==void 0&&(P.overwrite!==void 0||P.ignoreIfExists!==void 0)&&(G.options=P),k!==void 0&&(G.annotationId=k),G}l.create=h;function y(f){var a=f;return a&&a.kind==="rename"&&C.string(a.oldUri)&&C.string(a.newUri)&&(a.options===void 0||(a.options.overwrite===void 0||C.boolean(a.options.overwrite))&&(a.options.ignoreIfExists===void 0||C.boolean(a.options.ignoreIfExists)))&&(a.annotationId===void 0||ae.is(a.annotationId))}l.is=y})(I=t.RenameFile||(t.RenameFile={}));var x;(function(l){function h(f,a,P){var k={kind:"delete",uri:f};return a!==void 0&&(a.recursive!==void 0||a.ignoreIfNotExists!==void 0)&&(k.options=a),P!==void 0&&(k.annotationId=P),k}l.create=h;function y(f){var a=f;return a&&a.kind==="delete"&&C.string(a.uri)&&(a.options===void 0||(a.options.recursive===void 0||C.boolean(a.options.recursive))&&(a.options.ignoreIfNotExists===void 0||C.boolean(a.options.ignoreIfNotExists)))&&(a.annotationId===void 0||ae.is(a.annotationId))}l.is=y})(x=t.DeleteFile||(t.DeleteFile={}));var W;(function(l){function h(y){var f=y;return f&&(f.changes!==void 0||f.documentChanges!==void 0)&&(f.documentChanges===void 0||f.documentChanges.every(function(a){return C.string(a.kind)?ft.is(a)||I.is(a)||x.is(a):dt.is(a)}))}l.is=h})(W=t.WorkspaceEdit||(t.WorkspaceEdit={}));var L=function(){function l(h,y){this.edits=h,this.changeAnnotations=y}return l.prototype.insert=function(h,y,f){var a,P;if(f===void 0?a=z.insert(h,y):ae.is(f)?(P=f,a=He.insert(h,y,f)):(this.assertChangeAnnotations(this.changeAnnotations),P=this.changeAnnotations.manage(f),a=He.insert(h,y,P)),this.edits.push(a),P!==void 0)return P},l.prototype.replace=function(h,y,f){var a,P;if(f===void 0?a=z.replace(h,y):ae.is(f)?(P=f,a=He.replace(h,y,f)):(this.assertChangeAnnotations(this.changeAnnotations),P=this.changeAnnotations.manage(f),a=He.replace(h,y,P)),this.edits.push(a),P!==void 0)return P},l.prototype.delete=function(h,y){var f,a;if(y===void 0?f=z.del(h):ae.is(y)?(a=y,f=He.del(h,y)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(y),f=He.del(h,a)),this.edits.push(f),a!==void 0)return a},l.prototype.add=function(h){this.edits.push(h)},l.prototype.all=function(){return this.edits},l.prototype.clear=function(){this.edits.splice(0,this.edits.length)},l.prototype.assertChangeAnnotations=function(h){if(h===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},l}(),ne=function(){function l(h){this._annotations=h===void 0?Object.create(null):h,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(h,y){var f;if(ae.is(h)?f=h:(f=this.nextId(),y=h),this._annotations[f]!==void 0)throw new Error("Id ".concat(f," is already in use."));if(y===void 0)throw new Error("No annotation provided for id ".concat(f));return this._annotations[f]=y,this._size++,f},l.prototype.nextId=function(){return this._counter++,this._counter.toString()},l}(),Q=function(){function l(h){var y=this;this._textEditChanges=Object.create(null),h!==void 0?(this._workspaceEdit=h,h.documentChanges?(this._changeAnnotations=new ne(h.changeAnnotations),h.changeAnnotations=this._changeAnnotations.all(),h.documentChanges.forEach(function(f){if(dt.is(f)){var a=new L(f.edits,y._changeAnnotations);y._textEditChanges[f.textDocument.uri]=a}})):h.changes&&Object.keys(h.changes).forEach(function(f){var a=new L(h.changes[f]);y._textEditChanges[f]=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(h){if(we.is(h)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var y={uri:h.uri,version:h.version},f=this._textEditChanges[y.uri];if(!f){var a=[],P={textDocument:y,edits:a};this._workspaceEdit.documentChanges.push(P),f=new L(a,this._changeAnnotations),this._textEditChanges[y.uri]=f}return f}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var f=this._textEditChanges[h];if(!f){var a=[];this._workspaceEdit.changes[h]=a,f=new L(a),this._textEditChanges[h]=f}return f}},l.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ne,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(h,y,f){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;J.is(y)||ae.is(y)?a=y:f=y;var P,k;if(a===void 0?P=ft.create(h,f):(k=ae.is(a)?a:this._changeAnnotations.manage(a),P=ft.create(h,f,k)),this._workspaceEdit.documentChanges.push(P),k!==void 0)return k},l.prototype.renameFile=function(h,y,f,a){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var P;J.is(f)||ae.is(f)?P=f:a=f;var k,G;if(P===void 0?k=I.create(h,y,a):(G=ae.is(P)?P:this._changeAnnotations.manage(P),k=I.create(h,y,a,G)),this._workspaceEdit.documentChanges.push(k),G!==void 0)return G},l.prototype.deleteFile=function(h,y,f){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;J.is(y)||ae.is(y)?a=y:f=y;var P,k;if(a===void 0?P=x.create(h,f):(k=ae.is(a)?a:this._changeAnnotations.manage(a),P=x.create(h,f,k)),this._workspaceEdit.documentChanges.push(P),k!==void 0)return k},l}();t.WorkspaceChange=Q;var K;(function(l){function h(f){return{uri:f}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.uri)}l.is=y})(K=t.TextDocumentIdentifier||(t.TextDocumentIdentifier={}));var ze;(function(l){function h(f,a){return{uri:f,version:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.uri)&&C.integer(a.version)}l.is=y})(ze=t.VersionedTextDocumentIdentifier||(t.VersionedTextDocumentIdentifier={}));var we;(function(l){function h(f,a){return{uri:f,version:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.uri)&&(a.version===null||C.integer(a.version))}l.is=y})(we=t.OptionalVersionedTextDocumentIdentifier||(t.OptionalVersionedTextDocumentIdentifier={}));var se;(function(l){function h(f,a,P,k){return{uri:f,languageId:a,version:P,text:k}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.string(a.uri)&&C.string(a.languageId)&&C.integer(a.version)&&C.string(a.text)}l.is=y})(se=t.TextDocumentItem||(t.TextDocumentItem={}));var St;(function(l){l.PlainText="plaintext",l.Markdown="markdown";function h(y){var f=y;return f===l.PlainText||f===l.Markdown}l.is=h})(St=t.MarkupKind||(t.MarkupKind={}));var xn;(function(l){function h(y){var f=y;return C.objectLiteral(y)&&St.is(f.kind)&&C.string(f.value)}l.is=h})(xn=t.MarkupContent||(t.MarkupContent={}));var Ko;(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})(Ko=t.CompletionItemKind||(t.CompletionItemKind={}));var $r;(function(l){l.PlainText=1,l.Snippet=2})($r=t.InsertTextFormat||(t.InsertTextFormat={}));var Yr;(function(l){l.Deprecated=1})(Yr=t.CompletionItemTag||(t.CompletionItemTag={}));var Go;(function(l){function h(f,a,P){return{newText:f,insert:a,replace:P}}l.create=h;function y(f){var a=f;return a&&C.string(a.newText)&&u.is(a.insert)&&u.is(a.replace)}l.is=y})(Go=t.InsertReplaceEdit||(t.InsertReplaceEdit={}));var Qo;(function(l){l.asIs=1,l.adjustIndentation=2})(Qo=t.InsertTextMode||(t.InsertTextMode={}));var Jo;(function(l){function h(y){var f=y;return f&&(C.string(f.detail)||f.detail===void 0)&&(C.string(f.description)||f.description===void 0)}l.is=h})(Jo=t.CompletionItemLabelDetails||(t.CompletionItemLabelDetails={}));var Xo;(function(l){function h(y){return{label:y}}l.create=h})(Xo=t.CompletionItem||(t.CompletionItem={}));var Zo;(function(l){function h(y,f){return{items:y||[],isIncomplete:!!f}}l.create=h})(Zo=t.CompletionList||(t.CompletionList={}));var ar;(function(l){function h(f){return f.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}l.fromPlainText=h;function y(f){var a=f;return C.string(a)||C.objectLiteral(a)&&C.string(a.language)&&C.string(a.value)}l.is=y})(ar=t.MarkedString||(t.MarkedString={}));var Tt;(function(l){function h(y){var f=y;return!!f&&C.objectLiteral(f)&&(xn.is(f.contents)||ar.is(f.contents)||C.typedArray(f.contents,ar.is))&&(y.range===void 0||u.is(y.range))}l.is=h})(Tt=t.Hover||(t.Hover={}));var es;(function(l){function h(y,f){return f?{label:y,documentation:f}:{label:y}}l.create=h})(es=t.ParameterInformation||(t.ParameterInformation={}));var ts;(function(l){function h(y,f){for(var a=[],P=2;P<arguments.length;P++)a[P-2]=arguments[P];var k={label:y};return C.defined(f)&&(k.documentation=f),C.defined(a)?k.parameters=a:k.parameters=[],k}l.create=h})(ts=t.SignatureInformation||(t.SignatureInformation={}));var wn;(function(l){l.Text=1,l.Read=2,l.Write=3})(wn=t.DocumentHighlightKind||(t.DocumentHighlightKind={}));var ns;(function(l){function h(y,f){var a={range:y};return C.number(f)&&(a.kind=f),a}l.create=h})(ns=t.DocumentHighlight||(t.DocumentHighlight={}));var cr;(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})(cr=t.SymbolKind||(t.SymbolKind={}));var rs;(function(l){l.Deprecated=1})(rs=t.SymbolTag||(t.SymbolTag={}));var $t;(function(l){function h(y,f,a,P,k){var G={name:y,kind:f,location:{uri:P,range:a}};return k&&(G.containerName=k),G}l.create=h})($t=t.SymbolInformation||(t.SymbolInformation={}));var dn;(function(l){function h(y,f,a,P){return P!==void 0?{name:y,kind:f,location:{uri:a,range:P}}:{name:y,kind:f,location:{uri:a}}}l.create=h})(dn=t.WorkspaceSymbol||(t.WorkspaceSymbol={}));var is;(function(l){function h(f,a,P,k,G,Ce){var le={name:f,detail:a,kind:P,range:k,selectionRange:G};return Ce!==void 0&&(le.children=Ce),le}l.create=h;function y(f){var a=f;return a&&C.string(a.name)&&C.number(a.kind)&&u.is(a.range)&&u.is(a.selectionRange)&&(a.detail===void 0||C.string(a.detail))&&(a.deprecated===void 0||C.boolean(a.deprecated))&&(a.children===void 0||Array.isArray(a.children))&&(a.tags===void 0||Array.isArray(a.tags))}l.is=y})(is=t.DocumentSymbol||(t.DocumentSymbol={}));var os;(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"})(os=t.CodeActionKind||(t.CodeActionKind={}));var It;(function(l){l.Invoked=1,l.Automatic=2})(It=t.CodeActionTriggerKind||(t.CodeActionTriggerKind={}));var Kr;(function(l){function h(f,a,P){var k={diagnostics:f};return a!=null&&(k.only=a),P!=null&&(k.triggerKind=P),k}l.create=h;function y(f){var a=f;return C.defined(a)&&C.typedArray(a.diagnostics,v.is)&&(a.only===void 0||C.typedArray(a.only,C.string))&&(a.triggerKind===void 0||a.triggerKind===It.Invoked||a.triggerKind===It.Automatic)}l.is=y})(Kr=t.CodeActionContext||(t.CodeActionContext={}));var Gr;(function(l){function h(f,a,P){var k={title:f},G=!0;return typeof a=="string"?(G=!1,k.kind=a):N.is(a)?k.command=a:k.edit=a,G&&P!==void 0&&(k.kind=P),k}l.create=h;function y(f){var a=f;return a&&C.string(a.title)&&(a.diagnostics===void 0||C.typedArray(a.diagnostics,v.is))&&(a.kind===void 0||C.string(a.kind))&&(a.edit!==void 0||a.command!==void 0)&&(a.command===void 0||N.is(a.command))&&(a.isPreferred===void 0||C.boolean(a.isPreferred))&&(a.edit===void 0||W.is(a.edit))}l.is=y})(Gr=t.CodeAction||(t.CodeAction={}));var ur;(function(l){function h(f,a){var P={range:f};return C.defined(a)&&(P.data=a),P}l.create=h;function y(f){var a=f;return C.defined(a)&&u.is(a.range)&&(C.undefined(a.command)||N.is(a.command))}l.is=y})(ur=t.CodeLens||(t.CodeLens={}));var Qr;(function(l){function h(f,a){return{tabSize:f,insertSpaces:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&C.uinteger(a.tabSize)&&C.boolean(a.insertSpaces)}l.is=y})(Qr=t.FormattingOptions||(t.FormattingOptions={}));var Yt;(function(l){function h(f,a,P){return{range:f,target:a,data:P}}l.create=h;function y(f){var a=f;return C.defined(a)&&u.is(a.range)&&(C.undefined(a.target)||C.string(a.target))}l.is=y})(Yt=t.DocumentLink||(t.DocumentLink={}));var m;(function(l){function h(f,a){return{range:f,parent:a}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&u.is(a.range)&&(a.parent===void 0||l.is(a.parent))}l.is=y})(m=t.SelectionRange||(t.SelectionRange={}));var w;(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"})(w=t.SemanticTokenTypes||(t.SemanticTokenTypes={}));var E;(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"})(E=t.SemanticTokenModifiers||(t.SemanticTokenModifiers={}));var F;(function(l){function h(y){var f=y;return C.objectLiteral(f)&&(f.resultId===void 0||typeof f.resultId=="string")&&Array.isArray(f.data)&&(f.data.length===0||typeof f.data[0]=="number")}l.is=h})(F=t.SemanticTokens||(t.SemanticTokens={}));var ce;(function(l){function h(f,a){return{range:f,text:a}}l.create=h;function y(f){var a=f;return a!=null&&u.is(a.range)&&C.string(a.text)}l.is=y})(ce=t.InlineValueText||(t.InlineValueText={}));var ie;(function(l){function h(f,a,P){return{range:f,variableName:a,caseSensitiveLookup:P}}l.create=h;function y(f){var a=f;return a!=null&&u.is(a.range)&&C.boolean(a.caseSensitiveLookup)&&(C.string(a.variableName)||a.variableName===void 0)}l.is=y})(ie=t.InlineValueVariableLookup||(t.InlineValueVariableLookup={}));var ge;(function(l){function h(f,a){return{range:f,expression:a}}l.create=h;function y(f){var a=f;return a!=null&&u.is(a.range)&&(C.string(a.expression)||a.expression===void 0)}l.is=y})(ge=t.InlineValueEvaluatableExpression||(t.InlineValueEvaluatableExpression={}));var me;(function(l){function h(f,a){return{frameId:f,stoppedLocation:a}}l.create=h;function y(f){var a=f;return C.defined(a)&&u.is(f.stoppedLocation)}l.is=y})(me=t.InlineValueContext||(t.InlineValueContext={}));var X;(function(l){l.Type=1,l.Parameter=2;function h(y){return y===1||y===2}l.is=h})(X=t.InlayHintKind||(t.InlayHintKind={}));var ue;(function(l){function h(f){return{value:f}}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&(a.tooltip===void 0||C.string(a.tooltip)||xn.is(a.tooltip))&&(a.location===void 0||c.is(a.location))&&(a.command===void 0||N.is(a.command))}l.is=y})(ue=t.InlayHintLabelPart||(t.InlayHintLabelPart={}));var re;(function(l){function h(f,a,P){var k={position:f,label:a};return P!==void 0&&(k.kind=P),k}l.create=h;function y(f){var a=f;return C.objectLiteral(a)&&s.is(a.position)&&(C.string(a.label)||C.typedArray(a.label,ue.is))&&(a.kind===void 0||X.is(a.kind))&&a.textEdits===void 0||C.typedArray(a.textEdits,z.is)&&(a.tooltip===void 0||C.string(a.tooltip)||xn.is(a.tooltip))&&(a.paddingLeft===void 0||C.boolean(a.paddingLeft))&&(a.paddingRight===void 0||C.boolean(a.paddingRight))}l.is=y})(re=t.InlayHint||(t.InlayHint={}));var _e;(function(l){function h(y){var f=y;return C.objectLiteral(f)&&r.is(f.uri)&&C.string(f.name)}l.is=h})(_e=t.WorkspaceFolder||(t.WorkspaceFolder={})),t.EOL=[`
|
|
64
64
|
`,`\r
|
|
65
|
-
`,"\r"];var
|
|
65
|
+
`,"\r"];var Me;(function(l){function h(P,k,G,Ce){return new it(P,k,G,Ce)}l.create=h;function y(P){var k=P;return!!(C.defined(k)&&C.string(k.uri)&&(C.undefined(k.languageId)||C.string(k.languageId))&&C.uinteger(k.lineCount)&&C.func(k.getText)&&C.func(k.positionAt)&&C.func(k.offsetAt))}l.is=y;function f(P,k){for(var G=P.getText(),Ce=a(k,function(kn,Jr){var ru=kn.range.start.line-Jr.range.start.line;return ru===0?kn.range.start.character-Jr.range.start.character:ru}),le=G.length,pt=Ce.length-1;pt>=0;pt--){var gt=Ce[pt],jt=P.offsetAt(gt.range.start),Z=P.offsetAt(gt.range.end);if(Z<=le)G=G.substring(0,jt)+gt.newText+G.substring(Z,G.length);else throw new Error("Overlapping edit");le=jt}return G}l.applyEdits=f;function a(P,k){if(P.length<=1)return P;var G=P.length/2|0,Ce=P.slice(0,G),le=P.slice(G);a(Ce,k),a(le,k);for(var pt=0,gt=0,jt=0;pt<Ce.length&><le.length;){var Z=k(Ce[pt],le[gt]);Z<=0?P[jt++]=Ce[pt++]:P[jt++]=le[gt++]}for(;pt<Ce.length;)P[jt++]=Ce[pt++];for(;gt<le.length;)P[jt++]=le[gt++];return P}})(Me=t.TextDocument||(t.TextDocument={}));var it=function(){function l(h,y,f,a){this._uri=h,this._languageId=y,this._version=f,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(h){if(h){var y=this.offsetAt(h.start),f=this.offsetAt(h.end);return this._content.substring(y,f)}return this._content},l.prototype.update=function(h,y){this._content=h.text,this._version=y,this._lineOffsets=void 0},l.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var h=[],y=this._content,f=!0,a=0;a<y.length;a++){f&&(h.push(a),f=!1);var P=y.charAt(a);f=P==="\r"||P===`
|
|
66
66
|
`,P==="\r"&&a+1<y.length&&y.charAt(a+1)===`
|
|
67
|
-
`&&a++}f&&y.length>0&&h.push(y.length),this._lineOffsets=h}return this._lineOffsets},l.prototype.positionAt=function(h){h=Math.max(Math.min(h,this._content.length),0);var y=this.getLineOffsets(),f=0,a=y.length;if(a===0)return s.create(0,h);for(;f<a;){var P=Math.floor((f+a)/2);y[P]>h?a=P:f=P+1}var k=f-1;return s.create(k,h-y[k])},l.prototype.offsetAt=function(h){var y=this.getLineOffsets();if(h.line>=y.length)return this._content.length;if(h.line<0)return 0;var f=y[h.line],a=h.line+1<y.length?y[h.line+1]:this._content.length;return Math.max(Math.min(f+h.character,a),f)},Object.defineProperty(l.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),l}(),C;(function(l){var h=Object.prototype.toString;function y(Z){return typeof Z<"u"}l.defined=y;function f(Z){return typeof Z>"u"}l.undefined=f;function a(Z){return Z===!0||Z===!1}l.boolean=a;function P(Z){return h.call(Z)==="[object String]"}l.string=P;function k(Z){return h.call(Z)==="[object Number]"}l.number=k;function G(Z,kn,Jr){return h.call(Z)==="[object Number]"&&kn<=Z&&Z<=Jr}l.numberRange=G;function Ce(Z){return h.call(Z)==="[object Number]"&&-2147483648<=Z&&Z<=2147483647}l.integer=Ce;function le(Z){return h.call(Z)==="[object Number]"&&0<=Z&&Z<=2147483647}l.uinteger=le;function pt(Z){return h.call(Z)==="[object Function]"}l.func=pt;function gt(Z){return Z!==null&&typeof Z=="object"}l.objectLiteral=gt;function It(Z,kn){return Array.isArray(Z)&&Z.every(kn)}l.typedArray=It})(C||(C={}))})});var be=A($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.ProtocolNotificationType=$e.ProtocolNotificationType0=$e.ProtocolRequestType=$e.ProtocolRequestType0=$e.RegistrationType=$e.MessageDirection=void 0;var Qn=_n(),Ub;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Ub=$e.MessageDirection||($e.MessageDirection={}));var mc=class{constructor(t){this.method=t}};$e.RegistrationType=mc;var hc=class extends Qn.RequestType0{constructor(t){super(t)}};$e.ProtocolRequestType0=hc;var yc=class extends Qn.RequestType{constructor(t){super(t,Qn.ParameterStructures.byName)}};$e.ProtocolRequestType=yc;var bc=class extends Qn.NotificationType0{constructor(t){super(t)}};$e.ProtocolNotificationType0=bc;var vc=class extends Qn.NotificationType{constructor(t){super(t,Qn.ParameterStructures.byName)}};$e.ProtocolNotificationType=vc});var to=A(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.objectLiteral=Se.typedArray=Se.stringArray=Se.array=Se.func=Se.error=Se.number=Se.string=Se.boolean=void 0;function Wb(e){return e===!0||e===!1}Se.boolean=Wb;function Nd(e){return typeof e=="string"||e instanceof String}Se.string=Nd;function Hb(e){return typeof e=="number"||e instanceof Number}Se.number=Hb;function Bb(e){return e instanceof Error}Se.error=Bb;function zb(e){return typeof e=="function"}Se.func=zb;function Od(e){return Array.isArray(e)}Se.array=Od;function Vb(e){return Od(e)&&e.every(t=>Nd(t))}Se.stringArray=Vb;function $b(e,t){return Array.isArray(e)&&e.every(t)}Se.typedArray=$b;function Yb(e){return e!==null&&typeof e=="object"}Se.objectLiteral=Yb});var Md=A(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.ImplementationRequest=void 0;var Ed=be(),Kb;(function(e){e.method="textDocument/implementation",e.messageDirection=Ed.MessageDirection.clientToServer,e.type=new Ed.ProtocolRequestType(e.method)})(Kb=Tr.ImplementationRequest||(Tr.ImplementationRequest={}))});var Id=A(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.TypeDefinitionRequest=void 0;var jd=be(),Gb;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=jd.MessageDirection.clientToServer,e.type=new jd.ProtocolRequestType(e.method)})(Gb=xr.TypeDefinitionRequest||(xr.TypeDefinitionRequest={}))});var Ld=A(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.DidChangeWorkspaceFoldersNotification=en.WorkspaceFoldersRequest=void 0;var no=be(),Qb;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=no.MessageDirection.serverToClient,e.type=new no.ProtocolRequestType0(e.method)})(Qb=en.WorkspaceFoldersRequest||(en.WorkspaceFoldersRequest={}));var Jb;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=no.MessageDirection.clientToServer,e.type=new no.ProtocolNotificationType(e.method)})(Jb=en.DidChangeWorkspaceFoldersNotification||(en.DidChangeWorkspaceFoldersNotification={}))});var Ud=A(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.ConfigurationRequest=void 0;var Fd=be(),Xb;(function(e){e.method="workspace/configuration",e.messageDirection=Fd.MessageDirection.serverToClient,e.type=new Fd.ProtocolRequestType(e.method)})(Xb=wr.ConfigurationRequest||(wr.ConfigurationRequest={}))});var Wd=A(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.ColorPresentationRequest=tn.DocumentColorRequest=void 0;var ro=be(),Zb;(function(e){e.method="textDocument/documentColor",e.messageDirection=ro.MessageDirection.clientToServer,e.type=new ro.ProtocolRequestType(e.method)})(Zb=tn.DocumentColorRequest||(tn.DocumentColorRequest={}));var ev;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=ro.MessageDirection.clientToServer,e.type=new ro.ProtocolRequestType(e.method)})(ev=tn.ColorPresentationRequest||(tn.ColorPresentationRequest={}))});var Bd=A(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.FoldingRangeRequest=void 0;var Hd=be(),tv;(function(e){e.method="textDocument/foldingRange",e.messageDirection=Hd.MessageDirection.clientToServer,e.type=new Hd.ProtocolRequestType(e.method)})(tv=kr.FoldingRangeRequest||(kr.FoldingRangeRequest={}))});var Vd=A(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.DeclarationRequest=void 0;var zd=be(),nv;(function(e){e.method="textDocument/declaration",e.messageDirection=zd.MessageDirection.clientToServer,e.type=new zd.ProtocolRequestType(e.method)})(nv=Ar.DeclarationRequest||(Ar.DeclarationRequest={}))});var Yd=A(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.SelectionRangeRequest=void 0;var $d=be(),rv;(function(e){e.method="textDocument/selectionRange",e.messageDirection=$d.MessageDirection.clientToServer,e.type=new $d.ProtocolRequestType(e.method)})(rv=qr.SelectionRangeRequest||(qr.SelectionRangeRequest={}))});var Kd=A(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.WorkDoneProgressCancelNotification=bt.WorkDoneProgressCreateRequest=bt.WorkDoneProgress=void 0;var iv=_n(),io=be(),ov;(function(e){e.type=new iv.ProgressType;function t(n){return n===e.type}e.is=t})(ov=bt.WorkDoneProgress||(bt.WorkDoneProgress={}));var sv;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=io.MessageDirection.serverToClient,e.type=new io.ProtocolRequestType(e.method)})(sv=bt.WorkDoneProgressCreateRequest||(bt.WorkDoneProgressCreateRequest={}));var av;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=io.MessageDirection.clientToServer,e.type=new io.ProtocolNotificationType(e.method)})(av=bt.WorkDoneProgressCancelNotification||(bt.WorkDoneProgressCancelNotification={}))});var Gd=A(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.CallHierarchyOutgoingCallsRequest=vt.CallHierarchyIncomingCallsRequest=vt.CallHierarchyPrepareRequest=void 0;var Jn=be(),cv;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=Jn.MessageDirection.clientToServer,e.type=new Jn.ProtocolRequestType(e.method)})(cv=vt.CallHierarchyPrepareRequest||(vt.CallHierarchyPrepareRequest={}));var uv;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=Jn.MessageDirection.clientToServer,e.type=new Jn.ProtocolRequestType(e.method)})(uv=vt.CallHierarchyIncomingCallsRequest||(vt.CallHierarchyIncomingCallsRequest={}));var lv;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=Jn.MessageDirection.clientToServer,e.type=new Jn.ProtocolRequestType(e.method)})(lv=vt.CallHierarchyOutgoingCallsRequest||(vt.CallHierarchyOutgoingCallsRequest={}))});var Qd=A(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.SemanticTokensRefreshRequest=Te.SemanticTokensRangeRequest=Te.SemanticTokensDeltaRequest=Te.SemanticTokensRequest=Te.SemanticTokensRegistrationType=Te.TokenFormat=void 0;var zt=be(),dv;(function(e){e.Relative="relative"})(dv=Te.TokenFormat||(Te.TokenFormat={}));var oo;(function(e){e.method="textDocument/semanticTokens",e.type=new zt.RegistrationType(e.method)})(oo=Te.SemanticTokensRegistrationType||(Te.SemanticTokensRegistrationType={}));var fv;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=zt.MessageDirection.clientToServer,e.type=new zt.ProtocolRequestType(e.method),e.registrationMethod=oo.method})(fv=Te.SemanticTokensRequest||(Te.SemanticTokensRequest={}));var pv;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=zt.MessageDirection.clientToServer,e.type=new zt.ProtocolRequestType(e.method),e.registrationMethod=oo.method})(pv=Te.SemanticTokensDeltaRequest||(Te.SemanticTokensDeltaRequest={}));var gv;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=zt.MessageDirection.clientToServer,e.type=new zt.ProtocolRequestType(e.method),e.registrationMethod=oo.method})(gv=Te.SemanticTokensRangeRequest||(Te.SemanticTokensRangeRequest={}));var mv;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=zt.MessageDirection.serverToClient,e.type=new zt.ProtocolRequestType0(e.method)})(mv=Te.SemanticTokensRefreshRequest||(Te.SemanticTokensRefreshRequest={}))});var Xd=A(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.ShowDocumentRequest=void 0;var Jd=be(),hv;(function(e){e.method="window/showDocument",e.messageDirection=Jd.MessageDirection.serverToClient,e.type=new Jd.ProtocolRequestType(e.method)})(hv=Nr.ShowDocumentRequest||(Nr.ShowDocumentRequest={}))});var ef=A(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.LinkedEditingRangeRequest=void 0;var Zd=be(),yv;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Zd.MessageDirection.clientToServer,e.type=new Zd.ProtocolRequestType(e.method)})(yv=Or.LinkedEditingRangeRequest||(Or.LinkedEditingRangeRequest={}))});var tf=A(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.WillDeleteFilesRequest=ve.DidDeleteFilesNotification=ve.DidRenameFilesNotification=ve.WillRenameFilesRequest=ve.DidCreateFilesNotification=ve.WillCreateFilesRequest=ve.FileOperationPatternKind=void 0;var at=be(),bv;(function(e){e.file="file",e.folder="folder"})(bv=ve.FileOperationPatternKind||(ve.FileOperationPatternKind={}));var vv;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolRequestType(e.method)})(vv=ve.WillCreateFilesRequest||(ve.WillCreateFilesRequest={}));var Cv;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolNotificationType(e.method)})(Cv=ve.DidCreateFilesNotification||(ve.DidCreateFilesNotification={}));var Pv;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolRequestType(e.method)})(Pv=ve.WillRenameFilesRequest||(ve.WillRenameFilesRequest={}));var _v;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolNotificationType(e.method)})(_v=ve.DidRenameFilesNotification||(ve.DidRenameFilesNotification={}));var Dv;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolNotificationType(e.method)})(Dv=ve.DidDeleteFilesNotification||(ve.DidDeleteFilesNotification={}));var Rv;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolRequestType(e.method)})(Rv=ve.WillDeleteFilesRequest||(ve.WillDeleteFilesRequest={}))});var rf=A(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.MonikerRequest=Ct.MonikerKind=Ct.UniquenessLevel=void 0;var nf=be(),Sv;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(Sv=Ct.UniquenessLevel||(Ct.UniquenessLevel={}));var Tv;(function(e){e.$import="import",e.$export="export",e.local="local"})(Tv=Ct.MonikerKind||(Ct.MonikerKind={}));var xv;(function(e){e.method="textDocument/moniker",e.messageDirection=nf.MessageDirection.clientToServer,e.type=new nf.ProtocolRequestType(e.method)})(xv=Ct.MonikerRequest||(Ct.MonikerRequest={}))});var of=A(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.TypeHierarchySubtypesRequest=Pt.TypeHierarchySupertypesRequest=Pt.TypeHierarchyPrepareRequest=void 0;var Xn=be(),wv;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Xn.MessageDirection.clientToServer,e.type=new Xn.ProtocolRequestType(e.method)})(wv=Pt.TypeHierarchyPrepareRequest||(Pt.TypeHierarchyPrepareRequest={}));var kv;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Xn.MessageDirection.clientToServer,e.type=new Xn.ProtocolRequestType(e.method)})(kv=Pt.TypeHierarchySupertypesRequest||(Pt.TypeHierarchySupertypesRequest={}));var Av;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Xn.MessageDirection.clientToServer,e.type=new Xn.ProtocolRequestType(e.method)})(Av=Pt.TypeHierarchySubtypesRequest||(Pt.TypeHierarchySubtypesRequest={}))});var sf=A(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.InlineValueRefreshRequest=nn.InlineValueRequest=void 0;var so=be(),qv;(function(e){e.method="textDocument/inlineValue",e.messageDirection=so.MessageDirection.clientToServer,e.type=new so.ProtocolRequestType(e.method)})(qv=nn.InlineValueRequest||(nn.InlineValueRequest={}));var Nv;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=so.MessageDirection.serverToClient,e.type=new so.ProtocolRequestType0(e.method)})(Nv=nn.InlineValueRefreshRequest||(nn.InlineValueRefreshRequest={}))});var af=A(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.InlayHintRefreshRequest=_t.InlayHintResolveRequest=_t.InlayHintRequest=void 0;var Zn=be(),Ov;(function(e){e.method="textDocument/inlayHint",e.messageDirection=Zn.MessageDirection.clientToServer,e.type=new Zn.ProtocolRequestType(e.method)})(Ov=_t.InlayHintRequest||(_t.InlayHintRequest={}));var Ev;(function(e){e.method="inlayHint/resolve",e.messageDirection=Zn.MessageDirection.clientToServer,e.type=new Zn.ProtocolRequestType(e.method)})(Ev=_t.InlayHintResolveRequest||(_t.InlayHintResolveRequest={}));var Mv;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=Zn.MessageDirection.serverToClient,e.type=new Zn.ProtocolRequestType0(e.method)})(Mv=_t.InlayHintRefreshRequest||(_t.InlayHintRefreshRequest={}))});var uf=A(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.DiagnosticRefreshRequest=Fe.WorkspaceDiagnosticRequest=Fe.DocumentDiagnosticRequest=Fe.DocumentDiagnosticReportKind=Fe.DiagnosticServerCancellationData=void 0;var cf=_n(),jv=to(),er=be(),Iv;(function(e){function t(n){let r=n;return r&&jv.boolean(r.retriggerRequest)}e.is=t})(Iv=Fe.DiagnosticServerCancellationData||(Fe.DiagnosticServerCancellationData={}));var Lv;(function(e){e.Full="full",e.Unchanged="unchanged"})(Lv=Fe.DocumentDiagnosticReportKind||(Fe.DocumentDiagnosticReportKind={}));var Fv;(function(e){e.method="textDocument/diagnostic",e.messageDirection=er.MessageDirection.clientToServer,e.type=new er.ProtocolRequestType(e.method),e.partialResult=new cf.ProgressType})(Fv=Fe.DocumentDiagnosticRequest||(Fe.DocumentDiagnosticRequest={}));var Uv;(function(e){e.method="workspace/diagnostic",e.messageDirection=er.MessageDirection.clientToServer,e.type=new er.ProtocolRequestType(e.method),e.partialResult=new cf.ProgressType})(Uv=Fe.WorkspaceDiagnosticRequest||(Fe.WorkspaceDiagnosticRequest={}));var Wv;(function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=er.MessageDirection.serverToClient,e.type=new er.ProtocolRequestType0(e.method)})(Wv=Fe.DiagnosticRefreshRequest||(Fe.DiagnosticRefreshRequest={}))});var ff=A(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.DidCloseNotebookDocumentNotification=te.DidSaveNotebookDocumentNotification=te.DidChangeNotebookDocumentNotification=te.NotebookCellArrayChange=te.DidOpenNotebookDocumentNotification=te.NotebookDocumentSyncRegistrationType=te.NotebookDocument=te.NotebookCell=te.ExecutionSummary=te.NotebookCellKind=void 0;var Er=eo(),Dt=to(),qt=be(),lf;(function(e){e.Markup=1,e.Code=2;function t(n){return n===1||n===2}e.is=t})(lf=te.NotebookCellKind||(te.NotebookCellKind={}));var df;(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 Dt.objectLiteral(o)&&Er.uinteger.is(o.executionOrder)&&(o.success===void 0||Dt.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})(df=te.ExecutionSummary||(te.ExecutionSummary={}));var Cc;(function(e){function t(o,s){return{kind:o,document:s}}e.create=t;function n(o){let s=o;return Dt.objectLiteral(s)&&lf.is(s.kind)&&Er.DocumentUri.is(s.document)&&(s.metadata===void 0||Dt.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)&&!df.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(Dt.objectLiteral(o)&&Dt.objectLiteral(s)){let p=Object.keys(o),g=Object.keys(s);if(p.length!==g.length||(p.sort(),g.sort(),!i(p,g)))return!1;for(let b=0;b<p.length;b++){let D=p[b];if(!i(o[D],s[D]))return!1}}return!0}})(Cc=te.NotebookCell||(te.NotebookCell={}));var Hv;(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 Dt.objectLiteral(i)&&Dt.string(i.uri)&&Er.integer.is(i.version)&&Dt.typedArray(i.cells,Cc.is)}e.is=n})(Hv=te.NotebookDocument||(te.NotebookDocument={}));var Mr;(function(e){e.method="notebookDocument/sync",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.RegistrationType(e.method)})(Mr=te.NotebookDocumentSyncRegistrationType||(te.NotebookDocumentSyncRegistrationType={}));var Bv;(function(e){e.method="notebookDocument/didOpen",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method),e.registrationMethod=Mr.method})(Bv=te.DidOpenNotebookDocumentNotification||(te.DidOpenNotebookDocumentNotification={}));var zv;(function(e){function t(r){let i=r;return Dt.objectLiteral(i)&&Er.uinteger.is(i.start)&&Er.uinteger.is(i.deleteCount)&&(i.cells===void 0||Dt.typedArray(i.cells,Cc.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})(zv=te.NotebookCellArrayChange||(te.NotebookCellArrayChange={}));var Vv;(function(e){e.method="notebookDocument/didChange",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method),e.registrationMethod=Mr.method})(Vv=te.DidChangeNotebookDocumentNotification||(te.DidChangeNotebookDocumentNotification={}));var $v;(function(e){e.method="notebookDocument/didSave",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method),e.registrationMethod=Mr.method})($v=te.DidSaveNotebookDocumentNotification||(te.DidSaveNotebookDocumentNotification={}));var Yv;(function(e){e.method="notebookDocument/didClose",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method),e.registrationMethod=Mr.method})(Yv=te.DidCloseNotebookDocumentNotification||(te.DidCloseNotebookDocumentNotification={}))});var Pf=A(d=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0});d.WorkspaceSymbolRequest=d.CodeActionResolveRequest=d.CodeActionRequest=d.DocumentSymbolRequest=d.DocumentHighlightRequest=d.ReferencesRequest=d.DefinitionRequest=d.SignatureHelpRequest=d.SignatureHelpTriggerKind=d.HoverRequest=d.CompletionResolveRequest=d.CompletionRequest=d.CompletionTriggerKind=d.PublishDiagnosticsNotification=d.WatchKind=d.RelativePattern=d.FileChangeType=d.DidChangeWatchedFilesNotification=d.WillSaveTextDocumentWaitUntilRequest=d.WillSaveTextDocumentNotification=d.TextDocumentSaveReason=d.DidSaveTextDocumentNotification=d.DidCloseTextDocumentNotification=d.DidChangeTextDocumentNotification=d.TextDocumentContentChangeEvent=d.DidOpenTextDocumentNotification=d.TextDocumentSyncKind=d.TelemetryEventNotification=d.LogMessageNotification=d.ShowMessageRequest=d.ShowMessageNotification=d.MessageType=d.DidChangeConfigurationNotification=d.ExitNotification=d.ShutdownRequest=d.InitializedNotification=d.InitializeErrorCodes=d.InitializeRequest=d.WorkDoneProgressOptions=d.TextDocumentRegistrationOptions=d.StaticRegistrationOptions=d.PositionEncodingKind=d.FailureHandlingKind=d.ResourceOperationKind=d.UnregistrationRequest=d.RegistrationRequest=d.DocumentSelector=d.NotebookCellTextDocumentFilter=d.NotebookDocumentFilter=d.TextDocumentFilter=void 0;d.TypeHierarchySubtypesRequest=d.TypeHierarchyPrepareRequest=d.MonikerRequest=d.MonikerKind=d.UniquenessLevel=d.WillDeleteFilesRequest=d.DidDeleteFilesNotification=d.WillRenameFilesRequest=d.DidRenameFilesNotification=d.WillCreateFilesRequest=d.DidCreateFilesNotification=d.FileOperationPatternKind=d.LinkedEditingRangeRequest=d.ShowDocumentRequest=d.SemanticTokensRegistrationType=d.SemanticTokensRefreshRequest=d.SemanticTokensRangeRequest=d.SemanticTokensDeltaRequest=d.SemanticTokensRequest=d.TokenFormat=d.CallHierarchyPrepareRequest=d.CallHierarchyOutgoingCallsRequest=d.CallHierarchyIncomingCallsRequest=d.WorkDoneProgressCancelNotification=d.WorkDoneProgressCreateRequest=d.WorkDoneProgress=d.SelectionRangeRequest=d.DeclarationRequest=d.FoldingRangeRequest=d.ColorPresentationRequest=d.DocumentColorRequest=d.ConfigurationRequest=d.DidChangeWorkspaceFoldersNotification=d.WorkspaceFoldersRequest=d.TypeDefinitionRequest=d.ImplementationRequest=d.ApplyWorkspaceEditRequest=d.ExecuteCommandRequest=d.PrepareRenameRequest=d.RenameRequest=d.PrepareSupportDefaultBehavior=d.DocumentOnTypeFormattingRequest=d.DocumentRangeFormattingRequest=d.DocumentFormattingRequest=d.DocumentLinkResolveRequest=d.DocumentLinkRequest=d.CodeLensRefreshRequest=d.CodeLensResolveRequest=d.CodeLensRequest=d.WorkspaceSymbolResolveRequest=void 0;d.DidCloseNotebookDocumentNotification=d.DidSaveNotebookDocumentNotification=d.DidChangeNotebookDocumentNotification=d.NotebookCellArrayChange=d.DidOpenNotebookDocumentNotification=d.NotebookDocumentSyncRegistrationType=d.NotebookDocument=d.NotebookCell=d.ExecutionSummary=d.NotebookCellKind=d.DiagnosticRefreshRequest=d.WorkspaceDiagnosticRequest=d.DocumentDiagnosticRequest=d.DocumentDiagnosticReportKind=d.DiagnosticServerCancellationData=d.InlayHintRefreshRequest=d.InlayHintResolveRequest=d.InlayHintRequest=d.InlineValueRefreshRequest=d.InlineValueRequest=d.TypeHierarchySupertypesRequest=void 0;var O=be(),pf=eo(),Ue=to(),Kv=Md();Object.defineProperty(d,"ImplementationRequest",{enumerable:!0,get:function(){return Kv.ImplementationRequest}});var Gv=Id();Object.defineProperty(d,"TypeDefinitionRequest",{enumerable:!0,get:function(){return Gv.TypeDefinitionRequest}});var gf=Ld();Object.defineProperty(d,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return gf.WorkspaceFoldersRequest}});Object.defineProperty(d,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return gf.DidChangeWorkspaceFoldersNotification}});var Qv=Ud();Object.defineProperty(d,"ConfigurationRequest",{enumerable:!0,get:function(){return Qv.ConfigurationRequest}});var mf=Wd();Object.defineProperty(d,"DocumentColorRequest",{enumerable:!0,get:function(){return mf.DocumentColorRequest}});Object.defineProperty(d,"ColorPresentationRequest",{enumerable:!0,get:function(){return mf.ColorPresentationRequest}});var Jv=Bd();Object.defineProperty(d,"FoldingRangeRequest",{enumerable:!0,get:function(){return Jv.FoldingRangeRequest}});var Xv=Vd();Object.defineProperty(d,"DeclarationRequest",{enumerable:!0,get:function(){return Xv.DeclarationRequest}});var Zv=Yd();Object.defineProperty(d,"SelectionRangeRequest",{enumerable:!0,get:function(){return Zv.SelectionRangeRequest}});var Pc=Kd();Object.defineProperty(d,"WorkDoneProgress",{enumerable:!0,get:function(){return Pc.WorkDoneProgress}});Object.defineProperty(d,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return Pc.WorkDoneProgressCreateRequest}});Object.defineProperty(d,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return Pc.WorkDoneProgressCancelNotification}});var _c=Gd();Object.defineProperty(d,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return _c.CallHierarchyIncomingCallsRequest}});Object.defineProperty(d,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return _c.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(d,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return _c.CallHierarchyPrepareRequest}});var tr=Qd();Object.defineProperty(d,"TokenFormat",{enumerable:!0,get:function(){return tr.TokenFormat}});Object.defineProperty(d,"SemanticTokensRequest",{enumerable:!0,get:function(){return tr.SemanticTokensRequest}});Object.defineProperty(d,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return tr.SemanticTokensDeltaRequest}});Object.defineProperty(d,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return tr.SemanticTokensRangeRequest}});Object.defineProperty(d,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return tr.SemanticTokensRefreshRequest}});Object.defineProperty(d,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return tr.SemanticTokensRegistrationType}});var eC=Xd();Object.defineProperty(d,"ShowDocumentRequest",{enumerable:!0,get:function(){return eC.ShowDocumentRequest}});var tC=ef();Object.defineProperty(d,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return tC.LinkedEditingRangeRequest}});var Dn=tf();Object.defineProperty(d,"FileOperationPatternKind",{enumerable:!0,get:function(){return Dn.FileOperationPatternKind}});Object.defineProperty(d,"DidCreateFilesNotification",{enumerable:!0,get:function(){return Dn.DidCreateFilesNotification}});Object.defineProperty(d,"WillCreateFilesRequest",{enumerable:!0,get:function(){return Dn.WillCreateFilesRequest}});Object.defineProperty(d,"DidRenameFilesNotification",{enumerable:!0,get:function(){return Dn.DidRenameFilesNotification}});Object.defineProperty(d,"WillRenameFilesRequest",{enumerable:!0,get:function(){return Dn.WillRenameFilesRequest}});Object.defineProperty(d,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return Dn.DidDeleteFilesNotification}});Object.defineProperty(d,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return Dn.WillDeleteFilesRequest}});var Dc=rf();Object.defineProperty(d,"UniquenessLevel",{enumerable:!0,get:function(){return Dc.UniquenessLevel}});Object.defineProperty(d,"MonikerKind",{enumerable:!0,get:function(){return Dc.MonikerKind}});Object.defineProperty(d,"MonikerRequest",{enumerable:!0,get:function(){return Dc.MonikerRequest}});var Rc=of();Object.defineProperty(d,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return Rc.TypeHierarchyPrepareRequest}});Object.defineProperty(d,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return Rc.TypeHierarchySubtypesRequest}});Object.defineProperty(d,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return Rc.TypeHierarchySupertypesRequest}});var hf=sf();Object.defineProperty(d,"InlineValueRequest",{enumerable:!0,get:function(){return hf.InlineValueRequest}});Object.defineProperty(d,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return hf.InlineValueRefreshRequest}});var Sc=af();Object.defineProperty(d,"InlayHintRequest",{enumerable:!0,get:function(){return Sc.InlayHintRequest}});Object.defineProperty(d,"InlayHintResolveRequest",{enumerable:!0,get:function(){return Sc.InlayHintResolveRequest}});Object.defineProperty(d,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return Sc.InlayHintRefreshRequest}});var jr=uf();Object.defineProperty(d,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return jr.DiagnosticServerCancellationData}});Object.defineProperty(d,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return jr.DocumentDiagnosticReportKind}});Object.defineProperty(d,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return jr.DocumentDiagnosticRequest}});Object.defineProperty(d,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return jr.WorkspaceDiagnosticRequest}});Object.defineProperty(d,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return jr.DiagnosticRefreshRequest}});var Nt=ff();Object.defineProperty(d,"NotebookCellKind",{enumerable:!0,get:function(){return Nt.NotebookCellKind}});Object.defineProperty(d,"ExecutionSummary",{enumerable:!0,get:function(){return Nt.ExecutionSummary}});Object.defineProperty(d,"NotebookCell",{enumerable:!0,get:function(){return Nt.NotebookCell}});Object.defineProperty(d,"NotebookDocument",{enumerable:!0,get:function(){return Nt.NotebookDocument}});Object.defineProperty(d,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return Nt.NotebookDocumentSyncRegistrationType}});Object.defineProperty(d,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return Nt.DidOpenNotebookDocumentNotification}});Object.defineProperty(d,"NotebookCellArrayChange",{enumerable:!0,get:function(){return Nt.NotebookCellArrayChange}});Object.defineProperty(d,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return Nt.DidChangeNotebookDocumentNotification}});Object.defineProperty(d,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return Nt.DidSaveNotebookDocumentNotification}});Object.defineProperty(d,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return Nt.DidCloseNotebookDocumentNotification}});var yf;(function(e){function t(n){let r=n;return Ue.string(r.language)||Ue.string(r.scheme)||Ue.string(r.pattern)}e.is=t})(yf=d.TextDocumentFilter||(d.TextDocumentFilter={}));var bf;(function(e){function t(n){let r=n;return Ue.objectLiteral(r)&&(Ue.string(r.notebookType)||Ue.string(r.scheme)||Ue.string(r.pattern))}e.is=t})(bf=d.NotebookDocumentFilter||(d.NotebookDocumentFilter={}));var vf;(function(e){function t(n){let r=n;return Ue.objectLiteral(r)&&(Ue.string(r.notebook)||bf.is(r.notebook))&&(r.language===void 0||Ue.string(r.language))}e.is=t})(vf=d.NotebookCellTextDocumentFilter||(d.NotebookCellTextDocumentFilter={}));var Cf;(function(e){function t(n){if(!Array.isArray(n))return!1;for(let r of n)if(!Ue.string(r)&&!yf.is(r)&&!vf.is(r))return!1;return!0}e.is=t})(Cf=d.DocumentSelector||(d.DocumentSelector={}));var nC;(function(e){e.method="client/registerCapability",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType(e.method)})(nC=d.RegistrationRequest||(d.RegistrationRequest={}));var rC;(function(e){e.method="client/unregisterCapability",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType(e.method)})(rC=d.UnregistrationRequest||(d.UnregistrationRequest={}));var iC;(function(e){e.Create="create",e.Rename="rename",e.Delete="delete"})(iC=d.ResourceOperationKind||(d.ResourceOperationKind={}));var oC;(function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"})(oC=d.FailureHandlingKind||(d.FailureHandlingKind={}));var sC;(function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"})(sC=d.PositionEncodingKind||(d.PositionEncodingKind={}));var aC;(function(e){function t(n){let r=n;return r&&Ue.string(r.id)&&r.id.length>0}e.hasId=t})(aC=d.StaticRegistrationOptions||(d.StaticRegistrationOptions={}));var cC;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||Cf.is(r.documentSelector))}e.is=t})(cC=d.TextDocumentRegistrationOptions||(d.TextDocumentRegistrationOptions={}));var uC;(function(e){function t(r){let i=r;return Ue.objectLiteral(i)&&(i.workDoneProgress===void 0||Ue.boolean(i.workDoneProgress))}e.is=t;function n(r){let i=r;return i&&Ue.boolean(i.workDoneProgress)}e.hasWorkDoneProgress=n})(uC=d.WorkDoneProgressOptions||(d.WorkDoneProgressOptions={}));var lC;(function(e){e.method="initialize",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(lC=d.InitializeRequest||(d.InitializeRequest={}));var dC;(function(e){e.unknownProtocolVersion=1})(dC=d.InitializeErrorCodes||(d.InitializeErrorCodes={}));var fC;(function(e){e.method="initialized",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(fC=d.InitializedNotification||(d.InitializedNotification={}));var pC;(function(e){e.method="shutdown",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType0(e.method)})(pC=d.ShutdownRequest||(d.ShutdownRequest={}));var gC;(function(e){e.method="exit",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType0(e.method)})(gC=d.ExitNotification||(d.ExitNotification={}));var mC;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(mC=d.DidChangeConfigurationNotification||(d.DidChangeConfigurationNotification={}));var hC;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4})(hC=d.MessageType||(d.MessageType={}));var yC;(function(e){e.method="window/showMessage",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolNotificationType(e.method)})(yC=d.ShowMessageNotification||(d.ShowMessageNotification={}));var bC;(function(e){e.method="window/showMessageRequest",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType(e.method)})(bC=d.ShowMessageRequest||(d.ShowMessageRequest={}));var vC;(function(e){e.method="window/logMessage",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolNotificationType(e.method)})(vC=d.LogMessageNotification||(d.LogMessageNotification={}));var CC;(function(e){e.method="telemetry/event",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolNotificationType(e.method)})(CC=d.TelemetryEventNotification||(d.TelemetryEventNotification={}));var PC;(function(e){e.None=0,e.Full=1,e.Incremental=2})(PC=d.TextDocumentSyncKind||(d.TextDocumentSyncKind={}));var _C;(function(e){e.method="textDocument/didOpen",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(_C=d.DidOpenTextDocumentNotification||(d.DidOpenTextDocumentNotification={}));var DC;(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})(DC=d.TextDocumentContentChangeEvent||(d.TextDocumentContentChangeEvent={}));var RC;(function(e){e.method="textDocument/didChange",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(RC=d.DidChangeTextDocumentNotification||(d.DidChangeTextDocumentNotification={}));var SC;(function(e){e.method="textDocument/didClose",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(SC=d.DidCloseTextDocumentNotification||(d.DidCloseTextDocumentNotification={}));var TC;(function(e){e.method="textDocument/didSave",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(TC=d.DidSaveTextDocumentNotification||(d.DidSaveTextDocumentNotification={}));var xC;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(xC=d.TextDocumentSaveReason||(d.TextDocumentSaveReason={}));var wC;(function(e){e.method="textDocument/willSave",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(wC=d.WillSaveTextDocumentNotification||(d.WillSaveTextDocumentNotification={}));var kC;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(kC=d.WillSaveTextDocumentWaitUntilRequest||(d.WillSaveTextDocumentWaitUntilRequest={}));var AC;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(AC=d.DidChangeWatchedFilesNotification||(d.DidChangeWatchedFilesNotification={}));var qC;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(qC=d.FileChangeType||(d.FileChangeType={}));var NC;(function(e){function t(n){let r=n;return Ue.objectLiteral(r)&&(pf.URI.is(r.baseUri)||pf.WorkspaceFolder.is(r.baseUri))&&Ue.string(r.pattern)}e.is=t})(NC=d.RelativePattern||(d.RelativePattern={}));var OC;(function(e){e.Create=1,e.Change=2,e.Delete=4})(OC=d.WatchKind||(d.WatchKind={}));var EC;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolNotificationType(e.method)})(EC=d.PublishDiagnosticsNotification||(d.PublishDiagnosticsNotification={}));var MC;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(MC=d.CompletionTriggerKind||(d.CompletionTriggerKind={}));var jC;(function(e){e.method="textDocument/completion",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(jC=d.CompletionRequest||(d.CompletionRequest={}));var IC;(function(e){e.method="completionItem/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(IC=d.CompletionResolveRequest||(d.CompletionResolveRequest={}));var LC;(function(e){e.method="textDocument/hover",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(LC=d.HoverRequest||(d.HoverRequest={}));var FC;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(FC=d.SignatureHelpTriggerKind||(d.SignatureHelpTriggerKind={}));var UC;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(UC=d.SignatureHelpRequest||(d.SignatureHelpRequest={}));var WC;(function(e){e.method="textDocument/definition",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(WC=d.DefinitionRequest||(d.DefinitionRequest={}));var HC;(function(e){e.method="textDocument/references",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(HC=d.ReferencesRequest||(d.ReferencesRequest={}));var BC;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(BC=d.DocumentHighlightRequest||(d.DocumentHighlightRequest={}));var zC;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(zC=d.DocumentSymbolRequest||(d.DocumentSymbolRequest={}));var VC;(function(e){e.method="textDocument/codeAction",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(VC=d.CodeActionRequest||(d.CodeActionRequest={}));var $C;(function(e){e.method="codeAction/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})($C=d.CodeActionResolveRequest||(d.CodeActionResolveRequest={}));var YC;(function(e){e.method="workspace/symbol",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(YC=d.WorkspaceSymbolRequest||(d.WorkspaceSymbolRequest={}));var KC;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(KC=d.WorkspaceSymbolResolveRequest||(d.WorkspaceSymbolResolveRequest={}));var GC;(function(e){e.method="textDocument/codeLens",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(GC=d.CodeLensRequest||(d.CodeLensRequest={}));var QC;(function(e){e.method="codeLens/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(QC=d.CodeLensResolveRequest||(d.CodeLensResolveRequest={}));var JC;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType0(e.method)})(JC=d.CodeLensRefreshRequest||(d.CodeLensRefreshRequest={}));var XC;(function(e){e.method="textDocument/documentLink",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(XC=d.DocumentLinkRequest||(d.DocumentLinkRequest={}));var ZC;(function(e){e.method="documentLink/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(ZC=d.DocumentLinkResolveRequest||(d.DocumentLinkResolveRequest={}));var eP;(function(e){e.method="textDocument/formatting",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(eP=d.DocumentFormattingRequest||(d.DocumentFormattingRequest={}));var tP;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(tP=d.DocumentRangeFormattingRequest||(d.DocumentRangeFormattingRequest={}));var nP;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(nP=d.DocumentOnTypeFormattingRequest||(d.DocumentOnTypeFormattingRequest={}));var rP;(function(e){e.Identifier=1})(rP=d.PrepareSupportDefaultBehavior||(d.PrepareSupportDefaultBehavior={}));var iP;(function(e){e.method="textDocument/rename",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(iP=d.RenameRequest||(d.RenameRequest={}));var oP;(function(e){e.method="textDocument/prepareRename",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(oP=d.PrepareRenameRequest||(d.PrepareRenameRequest={}));var sP;(function(e){e.method="workspace/executeCommand",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(sP=d.ExecuteCommandRequest||(d.ExecuteCommandRequest={}));var aP;(function(e){e.method="workspace/applyEdit",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType("workspace/applyEdit")})(aP=d.ApplyWorkspaceEditRequest||(d.ApplyWorkspaceEditRequest={}))});var Df=A(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.createProtocolConnection=void 0;var _f=_n();function cP(e,t,n,r){return _f.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,_f.createMessageConnection)(e,t,n,r)}ao.createProtocolConnection=cP});var Rf=A(Ye=>{"use strict";var uP=Ye&&Ye.__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]}),co=Ye&&Ye.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&uP(t,e,n)};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.LSPErrorCodes=Ye.createProtocolConnection=void 0;co(_n(),Ye);co(eo(),Ye);co(be(),Ye);co(Pf(),Ye);var lP=Df();Object.defineProperty(Ye,"createProtocolConnection",{enumerable:!0,get:function(){return lP.createProtocolConnection}});var dP;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(dP=Ye.LSPErrorCodes||(Ye.LSPErrorCodes={}))});var ke=A(Ot=>{"use strict";var fP=Ot&&Ot.__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]}),Sf=Ot&&Ot.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&fP(t,e,n)};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.createProtocolConnection=void 0;var pP=gc();Sf(gc(),Ot);Sf(Rf(),Ot);function gP(e,t,n,r){return(0,pP.createMessageConnection)(e,t,n,r)}Ot.createProtocolConnection=gP});var xc=A(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.SemanticTokensBuilder=rn.SemanticTokensDiff=rn.SemanticTokensFeature=void 0;var uo=ke(),mP=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(uo.SemanticTokensRefreshRequest.type),on:t=>{let n=uo.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=uo.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=uo.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};rn.SemanticTokensFeature=mP;var lo=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}]:[]}};rn.SemanticTokensDiff=lo;var Tc=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 lo(this._prevData,this._data).computeDiff()}:this.build()}};rn.SemanticTokensBuilder=Tc});var kc=A(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.TextDocuments=void 0;var Rn=ke(),wc=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())})}};fo.TextDocuments=wc});var qc=A(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.NotebookDocuments=nr.NotebookSyncFeature=void 0;var ct=ke(),Tf=kc(),hP=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(ct.DidOpenNotebookDocumentNotification.type,n=>{t(n)}),onDidChangeNotebookDocument:t=>this.connection.onNotification(ct.DidChangeNotebookDocumentNotification.type,n=>{t(n)}),onDidSaveNotebookDocument:t=>this.connection.onNotification(ct.DidSaveNotebookDocumentNotification.type,n=>{t(n)}),onDidCloseNotebookDocument:t=>this.connection.onNotification(ct.DidCloseNotebookDocumentNotification.type,n=>{t(n)})}}};nr.NotebookSyncFeature=hP;var po=class e{onDidOpenTextDocument(t){return this.openHandler=t,ct.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,ct.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,ct.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}};po.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var Ac=class{constructor(t){t instanceof Tf.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new Tf.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new ct.Emitter,this._onDidChange=new ct.Emitter,this._onDidSave=new ct.Emitter,this._onDidClose=new ct.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 po,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=[],g=[],b=[],D=[];if(c.cells!==void 0){let j=c.cells;if(j.structure!==void 0){let _=j.structure.array;if(o.cells.splice(_.start,_.deleteCount,..._.cells!==void 0?_.cells:[]),j.structure.didOpen!==void 0)for(let v of j.structure.didOpen)n.openTextDocument({textDocument:v}),p.push(v.uri);if(j.structure.didClose)for(let v of j.structure.didClose)n.closeTextDocument({textDocument:v}),g.push(v.uri)}if(j.data!==void 0){let _=new Map(j.data.map(v=>[v.document,v]));for(let v=0;v<=o.cells.length;v++){let N=_.get(o.cells[v].document);if(N!==void 0){let z=o.cells.splice(v,1,N);if(b.push({old:z[0],new:N}),_.delete(N.document),_.size===0)break}}}if(j.textContent!==void 0)for(let _ of j.textContent)n.changeTextDocument({textDocument:_.document,contentChanges:_.changes}),D.push(_.document.uri)}this.updateCellMap(o);let R={notebookDocument:o};u&&(R.metadata={old:s,new:o.metadata});let T=[];for(let j of p)T.push(this.getNotebookCell(j));let q=[];for(let j of g)q.push(this.getNotebookCell(j));let B=[];for(let j of D)B.push(this.getNotebookCell(j));(T.length>0||q.length>0||b.length>0||B.length>0)&&(R.cells={added:T,removed:q,changed:{data:b,textContent:B}}),(R.metadata!==void 0||R.cells!==void 0)&&this._onDidChange.fire(R)})),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)}})),ct.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};nr.NotebookDocuments=Ac});var Nc=A(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.thenable=xe.typedArray=xe.stringArray=xe.array=xe.func=xe.error=xe.number=xe.string=xe.boolean=void 0;function yP(e){return e===!0||e===!1}xe.boolean=yP;function xf(e){return typeof e=="string"||e instanceof String}xe.string=xf;function bP(e){return typeof e=="number"||e instanceof Number}xe.number=bP;function vP(e){return e instanceof Error}xe.error=vP;function wf(e){return typeof e=="function"}xe.func=wf;function kf(e){return Array.isArray(e)}xe.array=kf;function CP(e){return kf(e)&&e.every(t=>xf(t))}xe.stringArray=CP;function PP(e,t){return Array.isArray(e)&&e.every(t)}xe.typedArray=PP;function _P(e){return e&&wf(e.then)}xe.thenable=_P});var Oc=A(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.generateUuid=ut.parse=ut.isUUID=ut.v4=ut.empty=void 0;var Ir=class{constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},Lr=class e extends Ir{constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}};Lr._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];Lr._timeHighBits=["8","9","a","b"];ut.empty=new Ir("00000000-0000-0000-0000-000000000000");function Af(){return new Lr}ut.v4=Af;var DP=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function qf(e){return DP.test(e)}ut.isUUID=qf;function RP(e){if(!qf(e))throw new Error("invalid uuid");return new Ir(e)}ut.parse=RP;function SP(){return Af().asHex()}ut.generateUuid=SP});var Nf=A(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.attachPartialResult=sn.ProgressFeature=sn.attachWorkDone=void 0;var on=ke(),TP=Oc(),Sn=class e{constructor(t,n){this._connection=t,this._token=n,e.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(on.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(on.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(on.WorkDoneProgress.type,this._token,{kind:"end"})}};Sn.Instances=new Map;var go=class extends Sn{constructor(t,n){super(t,n),this._source=new on.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Fr=class{constructor(){}begin(){}report(){}done(){}},mo=class extends Fr{constructor(){super(),this._source=new on.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function xP(e,t){if(t===void 0||t.workDoneToken===void 0)return new Fr;let n=t.workDoneToken;return delete t.workDoneToken,new Sn(e,n)}sn.attachWorkDone=xP;var wP=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(on.WorkDoneProgressCancelNotification.type,n=>{let r=Sn.Instances.get(n.token);(r instanceof go||r instanceof mo)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new Fr:new Sn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,TP.generateUuid)();return this.connection.sendRequest(on.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new go(this.connection,t))}else return Promise.resolve(new mo)}};sn.ProgressFeature=wP;var Ec;(function(e){e.type=new on.ProgressType})(Ec||(Ec={}));var Mc=class{constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(Ec.type,this._token,t)}};function kP(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new Mc(e,n)}sn.attachPartialResult=kP});var Of=A(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.ConfigurationFeature=void 0;var AP=ke(),qP=Nc(),NP=e=>class extends e{getConfiguration(t){return t?qP.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(AP.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};ho.ConfigurationFeature=NP});var Ef=A(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.WorkspaceFoldersFeature=void 0;var yo=ke(),OP=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new yo.Emitter,this.connection.onNotification(yo.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(yo.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(yo.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};bo.WorkspaceFoldersFeature=OP});var Mf=A(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.CallHierarchyFeature=void 0;var jc=ke(),EP=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(jc.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=jc.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=jc.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};vo.CallHierarchyFeature=EP});var jf=A(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.ShowDocumentFeature=void 0;var MP=ke(),jP=e=>class extends e{showDocument(t){return this.connection.sendRequest(MP.ShowDocumentRequest.type,t)}};Co.ShowDocumentFeature=jP});var If=A(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.FileOperationsFeature=void 0;var rr=ke(),IP=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(rr.DidCreateFilesNotification.type,n=>{t(n)})}onDidRenameFiles(t){return this.connection.onNotification(rr.DidRenameFilesNotification.type,n=>{t(n)})}onDidDeleteFiles(t){return this.connection.onNotification(rr.DidDeleteFilesNotification.type,n=>{t(n)})}onWillCreateFiles(t){return this.connection.onRequest(rr.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(rr.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(rr.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Po.FileOperationsFeature=IP});var Lf=A(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.LinkedEditingRangeFeature=void 0;var LP=ke(),FP=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(LP.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};_o.LinkedEditingRangeFeature=FP});var Ff=A(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.TypeHierarchyFeature=void 0;var Ic=ke(),UP=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(Ic.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=Ic.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=Ic.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Do.TypeHierarchyFeature=UP});var Wf=A(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.InlineValueFeature=void 0;var Uf=ke(),WP=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(Uf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(Uf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Ro.InlineValueFeature=WP});var Hf=A(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.InlayHintFeature=void 0;var Lc=ke(),HP=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Lc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(Lc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(Lc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};So.InlayHintFeature=HP});var Bf=A(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.DiagnosticFeature=void 0;var Ur=ke(),BP=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Ur.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Ur.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Ur.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Ur.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Ur.WorkspaceDiagnosticRequest.partialResult,n)))}}};To.DiagnosticFeature=BP});var zf=A(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.MonikerFeature=void 0;var zP=ke(),VP=e=>class extends e{get moniker(){return{on:t=>{let n=zP.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};xo.MonikerFeature=VP});var rp=A(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.createConnection=ee.combineFeatures=ee.combineNotebooksFeatures=ee.combineLanguagesFeatures=ee.combineWorkspaceFeatures=ee.combineWindowFeatures=ee.combineClientFeatures=ee.combineTracerFeatures=ee.combineTelemetryFeatures=ee.combineConsoleFeatures=ee._NotebooksImpl=ee._LanguagesImpl=ee.BulkUnregistration=ee.BulkRegistration=ee.ErrorMessageTracker=void 0;var M=ke(),lt=Nc(),Uc=Oc(),Y=Nf(),$P=Of(),YP=Ef(),KP=Mf(),GP=xc(),QP=jf(),JP=If(),XP=Lf(),ZP=Ff(),e_=Wf(),t_=Hf(),n_=Bf(),r_=qc(),i_=zf();function Fc(e){if(e!==null)return e}var Wc=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)})}};ee.ErrorMessageTracker=Wc;var wo=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")})}},Hc=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(Fc)}showWarningMessage(t,...n){let r={type:M.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(M.ShowMessageRequest.type,r).then(Fc)}showInformationMessage(t,...n){let r={type:M.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(M.ShowMessageRequest.type,r).then(Fc)}},Vf=(0,QP.ShowDocumentFeature)((0,Y.ProgressFeature)(Hc)),o_;(function(e){function t(){return new ko}e.create=t})(o_=ee.BulkRegistration||(ee.BulkRegistration={}));var ko=class{constructor(){this._registrations=[],this._registered=new Set}add(t,n){let r=lt.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let i=Uc.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},s_;(function(e){function t(){return new Wr(void 0,[])}e.create=t})(s_=ee.BulkUnregistration||(ee.BulkUnregistration={}));var Wr=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=lt.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}},Ao=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 ko?this.registerMany(t):t instanceof Wr?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let i=lt.string(n)?n:n.method,o=Uc.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=lt.string(t)?t:t.method,i=Uc.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 Wr(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Bc=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)}},$f=(0,JP.FileOperationsFeature)((0,YP.WorkspaceFoldersFeature)((0,$P.ConfigurationFeature)(Bc))),qo=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(()=>{})}},No=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")})}},Oo=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,Y.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,Y.attachPartialResult)(this.connection,n)}};ee._LanguagesImpl=Oo;var Yf=(0,i_.MonikerFeature)((0,n_.DiagnosticFeature)((0,t_.InlayHintFeature)((0,e_.InlineValueFeature)((0,ZP.TypeHierarchyFeature)((0,XP.LinkedEditingRangeFeature)((0,GP.SemanticTokensFeature)((0,KP.CallHierarchyFeature)(Oo)))))))),Eo=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,Y.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,Y.attachPartialResult)(this.connection,n)}};ee._NotebooksImpl=Eo;var Kf=(0,r_.NotebookSyncFeature)(Eo);function Gf(e,t){return function(n){return t(e(n))}}ee.combineConsoleFeatures=Gf;function Qf(e,t){return function(n){return t(e(n))}}ee.combineTelemetryFeatures=Qf;function Jf(e,t){return function(n){return t(e(n))}}ee.combineTracerFeatures=Jf;function Xf(e,t){return function(n){return t(e(n))}}ee.combineClientFeatures=Xf;function Zf(e,t){return function(n){return t(e(n))}}ee.combineWindowFeatures=Zf;function ep(e,t){return function(n){return t(e(n))}}ee.combineWorkspaceFeatures=ep;function tp(e,t){return function(n){return t(e(n))}}ee.combineLanguagesFeatures=tp;function np(e,t){return function(n){return t(e(n))}}ee.combineNotebooksFeatures=np;function a_(e,t){function n(i,o,s){return i&&o?s(i,o):i||o}return{__brand:"features",console:n(e.console,t.console,Gf),tracer:n(e.tracer,t.tracer,Jf),telemetry:n(e.telemetry,t.telemetry,Qf),client:n(e.client,t.client,Xf),window:n(e.window,t.window,Zf),workspace:n(e.workspace,t.workspace,ep),languages:n(e.languages,t.languages,tp),notebooks:n(e.notebooks,t.notebooks,np)}}ee.combineFeatures=a_;function c_(e,t,n){let r=n&&n.console?new(n.console(wo)):new wo,i=e(r);r.rawAttach(i);let o=n&&n.tracer?new(n.tracer(qo)):new qo,s=n&&n.telemetry?new(n.telemetry(No)):new No,u=n&&n.client?new(n.client(Ao)):new Ao,c=n&&n.window?new(n.window(Vf)):new Vf,p=n&&n.workspace?new(n.workspace($f)):new $f,g=n&&n.languages?new(n.languages(Yf)):new Yf,b=n&&n.notebooks?new(n.notebooks(Kf)):new Kf,D=[r,o,s,u,c,p,g,b];function R(_){return _ instanceof Promise?_:lt.thenable(_)?new Promise((v,N)=>{_.then(z=>v(z),z=>N(z))}):Promise.resolve(_)}let T,q,B,j={listen:()=>i.listen(),sendRequest:(_,...v)=>i.sendRequest(lt.string(_)?_:_.method,...v),onRequest:(_,v)=>i.onRequest(_,v),sendNotification:(_,v)=>{let N=lt.string(_)?_:_.method;return arguments.length===1?i.sendNotification(N):i.sendNotification(N,v)},onNotification:(_,v)=>i.onNotification(_,v),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:_=>(q=_,{dispose:()=>{q=void 0}}),onInitialized:_=>i.onNotification(M.InitializedNotification.type,_),onShutdown:_=>(T=_,{dispose:()=>{T=void 0}}),onExit:_=>(B=_,{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 g},get notebooks(){return b},onDidChangeConfiguration:_=>i.onNotification(M.DidChangeConfigurationNotification.type,_),onDidChangeWatchedFiles:_=>i.onNotification(M.DidChangeWatchedFilesNotification.type,_),__textDocumentSync:void 0,onDidOpenTextDocument:_=>i.onNotification(M.DidOpenTextDocumentNotification.type,_),onDidChangeTextDocument:_=>i.onNotification(M.DidChangeTextDocumentNotification.type,_),onDidCloseTextDocument:_=>i.onNotification(M.DidCloseTextDocumentNotification.type,_),onWillSaveTextDocument:_=>i.onNotification(M.WillSaveTextDocumentNotification.type,_),onWillSaveTextDocumentWaitUntil:_=>i.onRequest(M.WillSaveTextDocumentWaitUntilRequest.type,_),onDidSaveTextDocument:_=>i.onNotification(M.DidSaveTextDocumentNotification.type,_),sendDiagnostics:_=>i.sendNotification(M.PublishDiagnosticsNotification.type,_),onHover:_=>i.onRequest(M.HoverRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onCompletion:_=>i.onRequest(M.CompletionRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onCompletionResolve:_=>i.onRequest(M.CompletionResolveRequest.type,_),onSignatureHelp:_=>i.onRequest(M.SignatureHelpRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onDeclaration:_=>i.onRequest(M.DeclarationRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onDefinition:_=>i.onRequest(M.DefinitionRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onTypeDefinition:_=>i.onRequest(M.TypeDefinitionRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onImplementation:_=>i.onRequest(M.ImplementationRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onReferences:_=>i.onRequest(M.ReferencesRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onDocumentHighlight:_=>i.onRequest(M.DocumentHighlightRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onDocumentSymbol:_=>i.onRequest(M.DocumentSymbolRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onWorkspaceSymbol:_=>i.onRequest(M.WorkspaceSymbolRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onWorkspaceSymbolResolve:_=>i.onRequest(M.WorkspaceSymbolResolveRequest.type,_),onCodeAction:_=>i.onRequest(M.CodeActionRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onCodeActionResolve:_=>i.onRequest(M.CodeActionResolveRequest.type,(v,N)=>_(v,N)),onCodeLens:_=>i.onRequest(M.CodeLensRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onCodeLensResolve:_=>i.onRequest(M.CodeLensResolveRequest.type,(v,N)=>_(v,N)),onDocumentFormatting:_=>i.onRequest(M.DocumentFormattingRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onDocumentRangeFormatting:_=>i.onRequest(M.DocumentRangeFormattingRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onDocumentOnTypeFormatting:_=>i.onRequest(M.DocumentOnTypeFormattingRequest.type,(v,N)=>_(v,N)),onRenameRequest:_=>i.onRequest(M.RenameRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onPrepareRename:_=>i.onRequest(M.PrepareRenameRequest.type,(v,N)=>_(v,N)),onDocumentLinks:_=>i.onRequest(M.DocumentLinkRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onDocumentLinkResolve:_=>i.onRequest(M.DocumentLinkResolveRequest.type,(v,N)=>_(v,N)),onDocumentColor:_=>i.onRequest(M.DocumentColorRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onColorPresentation:_=>i.onRequest(M.ColorPresentationRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onFoldingRanges:_=>i.onRequest(M.FoldingRangeRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onSelectionRanges:_=>i.onRequest(M.SelectionRangeRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onExecuteCommand:_=>i.onRequest(M.ExecuteCommandRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),dispose:()=>i.dispose()};for(let _ of D)_.attach(j);return i.onRequest(M.InitializeRequest.type,_=>{t.initialize(_),lt.string(_.trace)&&(o.trace=M.Trace.fromString(_.trace));for(let v of D)v.initialize(_.capabilities);if(q){let v=q(_,new M.CancellationTokenSource().token,(0,Y.attachWorkDone)(i,_),void 0);return R(v).then(N=>{if(N instanceof M.ResponseError)return N;let z=N;z||(z={capabilities:{}});let J=z.capabilities;J||(J={},z.capabilities=J),J.textDocumentSync===void 0||J.textDocumentSync===null?J.textDocumentSync=lt.number(j.__textDocumentSync)?j.__textDocumentSync:M.TextDocumentSyncKind.None:!lt.number(J.textDocumentSync)&&!lt.number(J.textDocumentSync.change)&&(J.textDocumentSync.change=lt.number(j.__textDocumentSync)?j.__textDocumentSync:M.TextDocumentSyncKind.None);for(let ae of D)ae.fillServerCapabilities(J);return z})}else{let v={capabilities:{textDocumentSync:M.TextDocumentSyncKind.None}};for(let N of D)N.fillServerCapabilities(v.capabilities);return v}}),i.onRequest(M.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,T)return T(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,_=>{o.trace=M.Trace.fromString(_.value)}),j}ee.createConnection=c_});var zc=A(We=>{"use strict";var u_=We&&We.__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]}),ip=We&&We.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&u_(t,e,n)};Object.defineProperty(We,"__esModule",{value:!0});We.ProposedFeatures=We.NotebookDocuments=We.TextDocuments=We.SemanticTokensBuilder=void 0;var l_=xc();Object.defineProperty(We,"SemanticTokensBuilder",{enumerable:!0,get:function(){return l_.SemanticTokensBuilder}});ip(ke(),We);var d_=kc();Object.defineProperty(We,"TextDocuments",{enumerable:!0,get:function(){return d_.TextDocuments}});var f_=qc();Object.defineProperty(We,"NotebookDocuments",{enumerable:!0,get:function(){return f_.NotebookDocuments}});ip(rp(),We);var p_;(function(e){e.all={__brand:"features"}})(p_=We.ProposedFeatures||(We.ProposedFeatures={}))});var sp=A((WS,op)=>{"use strict";op.exports=ke()});var Vc=A(Et=>{"use strict";var g_=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]}),cp=Et&&Et.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&g_(t,e,n)};Object.defineProperty(Et,"__esModule",{value:!0});Et.createConnection=void 0;var Mo=zc();cp(sp(),Et);cp(zc(),Et);var ap=!1,m_={initialize:e=>{},get shutdownReceived(){return ap},set shutdownReceived(e){ap=e},exit:e=>{}};function h_(e,t,n,r){let i,o,s,u;e!==void 0&&e.__brand==="features"&&(i=e,e=t,t=n,n=r),Mo.ConnectionStrategy.is(e)||Mo.ConnectionOptions.is(e)?u=e:(o=e,s=t,u=n);let c=p=>(0,Mo.createProtocolConnection)(o,s,p,u);return(0,Mo.createConnection)(c,m_,i)}Et.createConnection=h_});var an=A((BS,up)=>{"use strict";up.exports=Vc()});var nu=A((IT,Pp)=>{"use strict";function Mt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Cp(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 Z_(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 sr={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),Mt(o),o.length!==0&&(t=o+"/"+t,n=o.charCodeAt(0)===47)}return t=Cp(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(Mt(t),t.length===0)return".";var n=t.charCodeAt(0)===47,r=t.charCodeAt(t.length-1)===47;return t=Cp(t,!n),t.length===0&&!n&&(t="."),t.length>0&&r&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return Mt(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];Mt(r),r.length>0&&(t===void 0?t=r:t+="/"+r)}return t===void 0?".":sr.normalize(t)},relative:function(t,n){if(Mt(t),Mt(n),t===n||(t=sr.resolve(t),n=sr.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,g=-1,b=0;b<=p;++b){if(b===p){if(c>p){if(n.charCodeAt(s+b)===47)return n.slice(s+b+1);if(b===0)return n.slice(s+b)}else o>p&&(t.charCodeAt(r+b)===47?g=b:b===0&&(g=0));break}var D=t.charCodeAt(r+b),R=n.charCodeAt(s+b);if(D!==R)break;D===47&&(g=b)}var T="";for(b=r+g+1;b<=i;++b)(b===i||t.charCodeAt(b)===47)&&(T.length===0?T+="..":T+="/..");return T.length>0?T+n.slice(s+g):(s+=g,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(Mt(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');Mt(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){Mt(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 Z_("/",t)},parse:function(t){Mt(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,g=t.length-1,b=0;g>=o;--g){if(r=t.charCodeAt(g),r===47){if(!p){u=g+1;break}continue}c===-1&&(p=!1,c=g+1),r===46?s===-1?s=g:b!==1&&(b=1):s!==-1&&(b=-1)}return s===-1||c===-1||b===0||b===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};sr.posix=sr;Pp.exports=sr});import{CONFIG_FILE_NAMES as $s,loadConfig as kh}from"@redocly/openapi-core";var su;(()=>{"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 g,b="",D=0,R=-1,T=0,q=0;q<=c.length;++q){if(q<c.length)g=c.charCodeAt(q);else{if(g===47)break;g=47}if(g===47){if(!(R===q-1||T===1))if(R!==q-1&&T===2){if(b.length<2||D!==2||b.charCodeAt(b.length-1)!==46||b.charCodeAt(b.length-2)!==46){if(b.length>2){var B=b.lastIndexOf("/");if(B!==b.length-1){B===-1?(b="",D=0):D=(b=b.slice(0,B)).length-1-b.lastIndexOf("/"),R=q,T=0;continue}}else if(b.length===2||b.length===1){b="",D=0,R=q,T=0;continue}}p&&(b.length>0?b+="/..":b="..",D=2)}else b.length>0?b+="/"+c.slice(R+1,q):b=c.slice(R+1,q),D=q-R-1;R=q,T=0}else g===46&&T!==-1?++T:T=-1}return b}var u={resolve:function(){for(var c,p="",g=!1,b=arguments.length-1;b>=-1&&!g;b--){var D;b>=0?D=arguments[b]:(c===void 0&&(c=process.cwd()),D=c),o(D),D.length!==0&&(p=D+"/"+p,g=D.charCodeAt(0)===47)}return p=s(p,!g),g?p.length>0?"/"+p:"/":p.length>0?p:"."},normalize:function(c){if(o(c),c.length===0)return".";var p=c.charCodeAt(0)===47,g=c.charCodeAt(c.length-1)===47;return(c=s(c,!p)).length!==0||p||(c="."),c.length>0&&g&&(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 g=arguments[p];o(g),g.length>0&&(c===void 0?c=g:c+="/"+g)}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 g=1;g<c.length&&c.charCodeAt(g)===47;++g);for(var b=c.length,D=b-g,R=1;R<p.length&&p.charCodeAt(R)===47;++R);for(var T=p.length-R,q=D<T?D:T,B=-1,j=0;j<=q;++j){if(j===q){if(T>q){if(p.charCodeAt(R+j)===47)return p.slice(R+j+1);if(j===0)return p.slice(R+j)}else D>q&&(c.charCodeAt(g+j)===47?B=j:j===0&&(B=0));break}var _=c.charCodeAt(g+j);if(_!==p.charCodeAt(R+j))break;_===47&&(B=j)}var v="";for(j=g+B+1;j<=b;++j)j!==b&&c.charCodeAt(j)!==47||(v.length===0?v+="..":v+="/..");return v.length>0?v+p.slice(R+B):(R+=B,p.charCodeAt(R)===47&&++R,p.slice(R))},_makeLong:function(c){return c},dirname:function(c){if(o(c),c.length===0)return".";for(var p=c.charCodeAt(0),g=p===47,b=-1,D=!0,R=c.length-1;R>=1;--R)if((p=c.charCodeAt(R))===47){if(!D){b=R;break}}else D=!1;return b===-1?g?"/":".":g&&b===1?"//":c.slice(0,b)},basename:function(c,p){if(p!==void 0&&typeof p!="string")throw new TypeError('"ext" argument must be a string');o(c);var g,b=0,D=-1,R=!0;if(p!==void 0&&p.length>0&&p.length<=c.length){if(p.length===c.length&&p===c)return"";var T=p.length-1,q=-1;for(g=c.length-1;g>=0;--g){var B=c.charCodeAt(g);if(B===47){if(!R){b=g+1;break}}else q===-1&&(R=!1,q=g+1),T>=0&&(B===p.charCodeAt(T)?--T==-1&&(D=g):(T=-1,D=q))}return b===D?D=q:D===-1&&(D=c.length),c.slice(b,D)}for(g=c.length-1;g>=0;--g)if(c.charCodeAt(g)===47){if(!R){b=g+1;break}}else D===-1&&(R=!1,D=g+1);return D===-1?"":c.slice(b,D)},extname:function(c){o(c);for(var p=-1,g=0,b=-1,D=!0,R=0,T=c.length-1;T>=0;--T){var q=c.charCodeAt(T);if(q!==47)b===-1&&(D=!1,b=T+1),q===46?p===-1?p=T:R!==1&&(R=1):p!==-1&&(R=-1);else if(!D){g=T+1;break}}return p===-1||b===-1||R===0||R===1&&p===b-1&&p===g+1?"":c.slice(p,b)},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,g){var b=g.dir||g.root,D=g.base||(g.name||"")+(g.ext||"");return b?b===g.root?b+D:b+"/"+D:D}(0,c)},parse:function(c){o(c);var p={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return p;var g,b=c.charCodeAt(0),D=b===47;D?(p.root="/",g=1):g=0;for(var R=-1,T=0,q=-1,B=!0,j=c.length-1,_=0;j>=g;--j)if((b=c.charCodeAt(j))!==47)q===-1&&(B=!1,q=j+1),b===46?R===-1?R=j:_!==1&&(_=1):R!==-1&&(_=-1);else if(!B){T=j+1;break}return R===-1||q===-1||_===0||_===1&&R===q-1&&R===T+1?q!==-1&&(p.base=p.name=T===0&&D?c.slice(1,q):c.slice(T,q)):(T===0&&D?(p.name=c.slice(1,R),p.base=c.slice(1,q)):(p.name=c.slice(T,R),p.base=c.slice(T,q)),p.ext=c.slice(R,q)),T>0?p.dir=c.slice(0,T-1):D&&(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:()=>D,Utils:()=>ft}),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(I,x){if(!I.scheme&&x)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${I.authority}", path: "${I.path}", query: "${I.query}", fragment: "${I.fragment}"}`);if(I.scheme&&!o.test(I.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(I.path){if(I.authority){if(!s.test(I.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(I.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="",g="/",b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class D{static isUri(x){return x instanceof D||!!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,W,L,ne,Q,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,we){return ze||we?ze:"file"}(x,K),this.authority=W||p,this.path=function(ze,we){switch(ze){case"https":case"http":case"file":we?we[0]!==g&&(we=g+we):we=g}return we}(this.scheme,L||p),this.query=ne||p,this.fragment=Q||p,c(this,K))}get fsPath(){return _(this,!1)}with(x){if(!x)return this;let{scheme:W,authority:L,path:ne,query:Q,fragment:K}=x;return W===void 0?W=this.scheme:W===null&&(W=p),L===void 0?L=this.authority:L===null&&(L=p),ne===void 0?ne=this.path:ne===null&&(ne=p),Q===void 0?Q=this.query:Q===null&&(Q=p),K===void 0?K=this.fragment:K===null&&(K=p),W===this.scheme&&L===this.authority&&ne===this.path&&Q===this.query&&K===this.fragment?this:new T(W,L,ne,Q,K)}static parse(x,W=!1){let L=b.exec(x);return L?new T(L[2]||p,J(L[4]||p),J(L[5]||p),J(L[7]||p),J(L[9]||p),W):new T(p,p,p,p,p)}static file(x){let W=p;if(i&&(x=x.replace(/\\/g,g)),x[0]===g&&x[1]===g){let L=x.indexOf(g,2);L===-1?(W=x.substring(2),x=g):(W=x.substring(2,L),x=x.substring(L)||g)}return new T("file",W,x,p,p)}static from(x){let W=new T(x.scheme,x.authority,x.path,x.query,x.fragment);return c(W,!0),W}toString(x=!1){return v(this,x)}toJSON(){return this}static revive(x){if(x){if(x instanceof D)return x;{let W=new T(x);return W._formatted=x.external,W._fsPath=x._sep===R?x.fsPath:null,W}}return x}}let R=i?1:void 0;class T extends D{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=_(this,!1)),this._fsPath}toString(x=!1){return x?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){let x={$mid:1};return this._fsPath&&(x.fsPath=this._fsPath,x._sep=R),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 q={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(I,x,W){let L,ne=-1;for(let Q=0;Q<I.length;Q++){let K=I.charCodeAt(Q);if(K>=97&&K<=122||K>=65&&K<=90||K>=48&&K<=57||K===45||K===46||K===95||K===126||x&&K===47||W&&K===91||W&&K===93||W&&K===58)ne!==-1&&(L+=encodeURIComponent(I.substring(ne,Q)),ne=-1),L!==void 0&&(L+=I.charAt(Q));else{L===void 0&&(L=I.substr(0,Q));let ze=q[K];ze!==void 0?(ne!==-1&&(L+=encodeURIComponent(I.substring(ne,Q)),ne=-1),L+=ze):ne===-1&&(ne=Q)}}return ne!==-1&&(L+=encodeURIComponent(I.substring(ne))),L!==void 0?L:I}function j(I){let x;for(let W=0;W<I.length;W++){let L=I.charCodeAt(W);L===35||L===63?(x===void 0&&(x=I.substr(0,W)),x+=q[L]):x!==void 0&&(x+=I[W])}return x!==void 0?x:I}function _(I,x){let W;return W=I.authority&&I.path.length>1&&I.scheme==="file"?`//${I.authority}${I.path}`:I.path.charCodeAt(0)===47&&(I.path.charCodeAt(1)>=65&&I.path.charCodeAt(1)<=90||I.path.charCodeAt(1)>=97&&I.path.charCodeAt(1)<=122)&&I.path.charCodeAt(2)===58?x?I.path.substr(1):I.path[1].toLowerCase()+I.path.substr(2):I.path,i&&(W=W.replace(/\//g,"\\")),W}function v(I,x){let W=x?j:B,L="",{scheme:ne,authority:Q,path:K,query:ze,fragment:we}=I;if(ne&&(L+=ne,L+=":"),(Q||ne==="file")&&(L+=g,L+=g),Q){let se=Q.indexOf("@");if(se!==-1){let St=Q.substr(0,se);Q=Q.substr(se+1),se=St.lastIndexOf(":"),se===-1?L+=W(St,!1,!1):(L+=W(St.substr(0,se),!1,!1),L+=":",L+=W(St.substr(se+1),!1,!0)),L+="@"}Q=Q.toLowerCase(),se=Q.lastIndexOf(":"),se===-1?L+=W(Q,!1,!0):(L+=W(Q.substr(0,se),!1,!0),L+=Q.substr(se))}if(K){if(K.length>=3&&K.charCodeAt(0)===47&&K.charCodeAt(2)===58){let se=K.charCodeAt(1);se>=65&&se<=90&&(K=`/${String.fromCharCode(se+32)}:${K.substr(3)}`)}else if(K.length>=2&&K.charCodeAt(1)===58){let se=K.charCodeAt(0);se>=65&&se<=90&&(K=`${String.fromCharCode(se+32)}:${K.substr(2)}`)}L+=W(K,!0,!1)}return ze&&(L+="?",L+=W(ze,!1,!1)),we&&(L+="#",L+=x?we:B(we,!1,!1)),L}function N(I){try{return decodeURIComponent(I)}catch{return I.length>3?I.substr(0,3)+N(I.substr(3)):I}}let z=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function J(I){return I.match(z)?I.replace(z,x=>N(x)):I}var ae=n(470);let He=ae.posix||ae,dt="/";var ft;(function(I){I.joinPath=function(x,...W){return x.with({path:He.join(x.path,...W)})},I.resolvePath=function(x,...W){let L=x.path,ne=!1;L[0]!==dt&&(L=dt+L,ne=!0);let Q=He.resolve(L,...W);return ne&&Q[0]===dt&&!x.authority&&(Q=Q.substring(1)),x.with({path:Q})},I.dirname=function(x){if(x.path.length===0||x.path===dt)return x;let W=He.dirname(x.path);return W.length===1&&W.charCodeAt(0)===46&&(W=""),x.with({path:W})},I.basename=function(x){return He.basename(x.path)},I.extname=function(x){return He.extname(x.path)}})(ft||(ft={}))})(),su=r})();var{URI:Kt,Utils:de}=su;import{CONFIG_FILE_NAMES as Hp}from"@redocly/openapi-core";var cs={languageId:"yaml",filePattern:/\.ya?ml$/i},us={languageId:"json",filePattern:/\.json$/i},as=class{constructor(){this.supportedLanguages=[cs,us];this.registerConfigFinder(async t=>{if(!this._fs)return;let n=[];for(let r of Hp)try{let i=de.resolvePath(de.dirname(qe(t)),r);await this._fs.exists(i)&&n.push(i.toString())}catch{continue}if(n.length>1)throw new Error(`
|
|
67
|
+
`&&a++}f&&y.length>0&&h.push(y.length),this._lineOffsets=h}return this._lineOffsets},l.prototype.positionAt=function(h){h=Math.max(Math.min(h,this._content.length),0);var y=this.getLineOffsets(),f=0,a=y.length;if(a===0)return s.create(0,h);for(;f<a;){var P=Math.floor((f+a)/2);y[P]>h?a=P:f=P+1}var k=f-1;return s.create(k,h-y[k])},l.prototype.offsetAt=function(h){var y=this.getLineOffsets();if(h.line>=y.length)return this._content.length;if(h.line<0)return 0;var f=y[h.line],a=h.line+1<y.length?y[h.line+1]:this._content.length;return Math.max(Math.min(f+h.character,a),f)},Object.defineProperty(l.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),l}(),C;(function(l){var h=Object.prototype.toString;function y(Z){return typeof Z<"u"}l.defined=y;function f(Z){return typeof Z>"u"}l.undefined=f;function a(Z){return Z===!0||Z===!1}l.boolean=a;function P(Z){return h.call(Z)==="[object String]"}l.string=P;function k(Z){return h.call(Z)==="[object Number]"}l.number=k;function G(Z,kn,Jr){return h.call(Z)==="[object Number]"&&kn<=Z&&Z<=Jr}l.numberRange=G;function Ce(Z){return h.call(Z)==="[object Number]"&&-2147483648<=Z&&Z<=2147483647}l.integer=Ce;function le(Z){return h.call(Z)==="[object Number]"&&0<=Z&&Z<=2147483647}l.uinteger=le;function pt(Z){return h.call(Z)==="[object Function]"}l.func=pt;function gt(Z){return Z!==null&&typeof Z=="object"}l.objectLiteral=gt;function jt(Z,kn){return Array.isArray(Z)&&Z.every(kn)}l.typedArray=jt})(C||(C={}))})});var be=A($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.ProtocolNotificationType=$e.ProtocolNotificationType0=$e.ProtocolRequestType=$e.ProtocolRequestType0=$e.RegistrationType=$e.MessageDirection=void 0;var Qn=_n(),Wb;(function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"})(Wb=$e.MessageDirection||($e.MessageDirection={}));var mc=class{constructor(t){this.method=t}};$e.RegistrationType=mc;var hc=class extends Qn.RequestType0{constructor(t){super(t)}};$e.ProtocolRequestType0=hc;var yc=class extends Qn.RequestType{constructor(t){super(t,Qn.ParameterStructures.byName)}};$e.ProtocolRequestType=yc;var bc=class extends Qn.NotificationType0{constructor(t){super(t)}};$e.ProtocolNotificationType0=bc;var vc=class extends Qn.NotificationType{constructor(t){super(t,Qn.ParameterStructures.byName)}};$e.ProtocolNotificationType=vc});var to=A(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.objectLiteral=Se.typedArray=Se.stringArray=Se.array=Se.func=Se.error=Se.number=Se.string=Se.boolean=void 0;function Hb(e){return e===!0||e===!1}Se.boolean=Hb;function Nd(e){return typeof e=="string"||e instanceof String}Se.string=Nd;function Bb(e){return typeof e=="number"||e instanceof Number}Se.number=Bb;function zb(e){return e instanceof Error}Se.error=zb;function Vb(e){return typeof e=="function"}Se.func=Vb;function Od(e){return Array.isArray(e)}Se.array=Od;function $b(e){return Od(e)&&e.every(t=>Nd(t))}Se.stringArray=$b;function Yb(e,t){return Array.isArray(e)&&e.every(t)}Se.typedArray=Yb;function Kb(e){return e!==null&&typeof e=="object"}Se.objectLiteral=Kb});var Md=A(Tr=>{"use strict";Object.defineProperty(Tr,"__esModule",{value:!0});Tr.ImplementationRequest=void 0;var Ed=be(),Gb;(function(e){e.method="textDocument/implementation",e.messageDirection=Ed.MessageDirection.clientToServer,e.type=new Ed.ProtocolRequestType(e.method)})(Gb=Tr.ImplementationRequest||(Tr.ImplementationRequest={}))});var jd=A(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.TypeDefinitionRequest=void 0;var Id=be(),Qb;(function(e){e.method="textDocument/typeDefinition",e.messageDirection=Id.MessageDirection.clientToServer,e.type=new Id.ProtocolRequestType(e.method)})(Qb=xr.TypeDefinitionRequest||(xr.TypeDefinitionRequest={}))});var Ld=A(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.DidChangeWorkspaceFoldersNotification=en.WorkspaceFoldersRequest=void 0;var no=be(),Jb;(function(e){e.method="workspace/workspaceFolders",e.messageDirection=no.MessageDirection.serverToClient,e.type=new no.ProtocolRequestType0(e.method)})(Jb=en.WorkspaceFoldersRequest||(en.WorkspaceFoldersRequest={}));var Xb;(function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=no.MessageDirection.clientToServer,e.type=new no.ProtocolNotificationType(e.method)})(Xb=en.DidChangeWorkspaceFoldersNotification||(en.DidChangeWorkspaceFoldersNotification={}))});var Ud=A(wr=>{"use strict";Object.defineProperty(wr,"__esModule",{value:!0});wr.ConfigurationRequest=void 0;var Fd=be(),Zb;(function(e){e.method="workspace/configuration",e.messageDirection=Fd.MessageDirection.serverToClient,e.type=new Fd.ProtocolRequestType(e.method)})(Zb=wr.ConfigurationRequest||(wr.ConfigurationRequest={}))});var Wd=A(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.ColorPresentationRequest=tn.DocumentColorRequest=void 0;var ro=be(),ev;(function(e){e.method="textDocument/documentColor",e.messageDirection=ro.MessageDirection.clientToServer,e.type=new ro.ProtocolRequestType(e.method)})(ev=tn.DocumentColorRequest||(tn.DocumentColorRequest={}));var tv;(function(e){e.method="textDocument/colorPresentation",e.messageDirection=ro.MessageDirection.clientToServer,e.type=new ro.ProtocolRequestType(e.method)})(tv=tn.ColorPresentationRequest||(tn.ColorPresentationRequest={}))});var Bd=A(kr=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});kr.FoldingRangeRequest=void 0;var Hd=be(),nv;(function(e){e.method="textDocument/foldingRange",e.messageDirection=Hd.MessageDirection.clientToServer,e.type=new Hd.ProtocolRequestType(e.method)})(nv=kr.FoldingRangeRequest||(kr.FoldingRangeRequest={}))});var Vd=A(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});Ar.DeclarationRequest=void 0;var zd=be(),rv;(function(e){e.method="textDocument/declaration",e.messageDirection=zd.MessageDirection.clientToServer,e.type=new zd.ProtocolRequestType(e.method)})(rv=Ar.DeclarationRequest||(Ar.DeclarationRequest={}))});var Yd=A(qr=>{"use strict";Object.defineProperty(qr,"__esModule",{value:!0});qr.SelectionRangeRequest=void 0;var $d=be(),iv;(function(e){e.method="textDocument/selectionRange",e.messageDirection=$d.MessageDirection.clientToServer,e.type=new $d.ProtocolRequestType(e.method)})(iv=qr.SelectionRangeRequest||(qr.SelectionRangeRequest={}))});var Kd=A(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.WorkDoneProgressCancelNotification=bt.WorkDoneProgressCreateRequest=bt.WorkDoneProgress=void 0;var ov=_n(),io=be(),sv;(function(e){e.type=new ov.ProgressType;function t(n){return n===e.type}e.is=t})(sv=bt.WorkDoneProgress||(bt.WorkDoneProgress={}));var av;(function(e){e.method="window/workDoneProgress/create",e.messageDirection=io.MessageDirection.serverToClient,e.type=new io.ProtocolRequestType(e.method)})(av=bt.WorkDoneProgressCreateRequest||(bt.WorkDoneProgressCreateRequest={}));var cv;(function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=io.MessageDirection.clientToServer,e.type=new io.ProtocolNotificationType(e.method)})(cv=bt.WorkDoneProgressCancelNotification||(bt.WorkDoneProgressCancelNotification={}))});var Gd=A(vt=>{"use strict";Object.defineProperty(vt,"__esModule",{value:!0});vt.CallHierarchyOutgoingCallsRequest=vt.CallHierarchyIncomingCallsRequest=vt.CallHierarchyPrepareRequest=void 0;var Jn=be(),uv;(function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=Jn.MessageDirection.clientToServer,e.type=new Jn.ProtocolRequestType(e.method)})(uv=vt.CallHierarchyPrepareRequest||(vt.CallHierarchyPrepareRequest={}));var lv;(function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=Jn.MessageDirection.clientToServer,e.type=new Jn.ProtocolRequestType(e.method)})(lv=vt.CallHierarchyIncomingCallsRequest||(vt.CallHierarchyIncomingCallsRequest={}));var dv;(function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=Jn.MessageDirection.clientToServer,e.type=new Jn.ProtocolRequestType(e.method)})(dv=vt.CallHierarchyOutgoingCallsRequest||(vt.CallHierarchyOutgoingCallsRequest={}))});var Qd=A(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.SemanticTokensRefreshRequest=Te.SemanticTokensRangeRequest=Te.SemanticTokensDeltaRequest=Te.SemanticTokensRequest=Te.SemanticTokensRegistrationType=Te.TokenFormat=void 0;var zt=be(),fv;(function(e){e.Relative="relative"})(fv=Te.TokenFormat||(Te.TokenFormat={}));var oo;(function(e){e.method="textDocument/semanticTokens",e.type=new zt.RegistrationType(e.method)})(oo=Te.SemanticTokensRegistrationType||(Te.SemanticTokensRegistrationType={}));var pv;(function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=zt.MessageDirection.clientToServer,e.type=new zt.ProtocolRequestType(e.method),e.registrationMethod=oo.method})(pv=Te.SemanticTokensRequest||(Te.SemanticTokensRequest={}));var gv;(function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=zt.MessageDirection.clientToServer,e.type=new zt.ProtocolRequestType(e.method),e.registrationMethod=oo.method})(gv=Te.SemanticTokensDeltaRequest||(Te.SemanticTokensDeltaRequest={}));var mv;(function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=zt.MessageDirection.clientToServer,e.type=new zt.ProtocolRequestType(e.method),e.registrationMethod=oo.method})(mv=Te.SemanticTokensRangeRequest||(Te.SemanticTokensRangeRequest={}));var hv;(function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=zt.MessageDirection.serverToClient,e.type=new zt.ProtocolRequestType0(e.method)})(hv=Te.SemanticTokensRefreshRequest||(Te.SemanticTokensRefreshRequest={}))});var Xd=A(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.ShowDocumentRequest=void 0;var Jd=be(),yv;(function(e){e.method="window/showDocument",e.messageDirection=Jd.MessageDirection.serverToClient,e.type=new Jd.ProtocolRequestType(e.method)})(yv=Nr.ShowDocumentRequest||(Nr.ShowDocumentRequest={}))});var ef=A(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.LinkedEditingRangeRequest=void 0;var Zd=be(),bv;(function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=Zd.MessageDirection.clientToServer,e.type=new Zd.ProtocolRequestType(e.method)})(bv=Or.LinkedEditingRangeRequest||(Or.LinkedEditingRangeRequest={}))});var tf=A(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.WillDeleteFilesRequest=ve.DidDeleteFilesNotification=ve.DidRenameFilesNotification=ve.WillRenameFilesRequest=ve.DidCreateFilesNotification=ve.WillCreateFilesRequest=ve.FileOperationPatternKind=void 0;var at=be(),vv;(function(e){e.file="file",e.folder="folder"})(vv=ve.FileOperationPatternKind||(ve.FileOperationPatternKind={}));var Cv;(function(e){e.method="workspace/willCreateFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolRequestType(e.method)})(Cv=ve.WillCreateFilesRequest||(ve.WillCreateFilesRequest={}));var Pv;(function(e){e.method="workspace/didCreateFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolNotificationType(e.method)})(Pv=ve.DidCreateFilesNotification||(ve.DidCreateFilesNotification={}));var _v;(function(e){e.method="workspace/willRenameFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolRequestType(e.method)})(_v=ve.WillRenameFilesRequest||(ve.WillRenameFilesRequest={}));var Dv;(function(e){e.method="workspace/didRenameFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolNotificationType(e.method)})(Dv=ve.DidRenameFilesNotification||(ve.DidRenameFilesNotification={}));var Rv;(function(e){e.method="workspace/didDeleteFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolNotificationType(e.method)})(Rv=ve.DidDeleteFilesNotification||(ve.DidDeleteFilesNotification={}));var Sv;(function(e){e.method="workspace/willDeleteFiles",e.messageDirection=at.MessageDirection.clientToServer,e.type=new at.ProtocolRequestType(e.method)})(Sv=ve.WillDeleteFilesRequest||(ve.WillDeleteFilesRequest={}))});var rf=A(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.MonikerRequest=Ct.MonikerKind=Ct.UniquenessLevel=void 0;var nf=be(),Tv;(function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"})(Tv=Ct.UniquenessLevel||(Ct.UniquenessLevel={}));var xv;(function(e){e.$import="import",e.$export="export",e.local="local"})(xv=Ct.MonikerKind||(Ct.MonikerKind={}));var wv;(function(e){e.method="textDocument/moniker",e.messageDirection=nf.MessageDirection.clientToServer,e.type=new nf.ProtocolRequestType(e.method)})(wv=Ct.MonikerRequest||(Ct.MonikerRequest={}))});var of=A(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.TypeHierarchySubtypesRequest=Pt.TypeHierarchySupertypesRequest=Pt.TypeHierarchyPrepareRequest=void 0;var Xn=be(),kv;(function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=Xn.MessageDirection.clientToServer,e.type=new Xn.ProtocolRequestType(e.method)})(kv=Pt.TypeHierarchyPrepareRequest||(Pt.TypeHierarchyPrepareRequest={}));var Av;(function(e){e.method="typeHierarchy/supertypes",e.messageDirection=Xn.MessageDirection.clientToServer,e.type=new Xn.ProtocolRequestType(e.method)})(Av=Pt.TypeHierarchySupertypesRequest||(Pt.TypeHierarchySupertypesRequest={}));var qv;(function(e){e.method="typeHierarchy/subtypes",e.messageDirection=Xn.MessageDirection.clientToServer,e.type=new Xn.ProtocolRequestType(e.method)})(qv=Pt.TypeHierarchySubtypesRequest||(Pt.TypeHierarchySubtypesRequest={}))});var sf=A(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.InlineValueRefreshRequest=nn.InlineValueRequest=void 0;var so=be(),Nv;(function(e){e.method="textDocument/inlineValue",e.messageDirection=so.MessageDirection.clientToServer,e.type=new so.ProtocolRequestType(e.method)})(Nv=nn.InlineValueRequest||(nn.InlineValueRequest={}));var Ov;(function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=so.MessageDirection.serverToClient,e.type=new so.ProtocolRequestType0(e.method)})(Ov=nn.InlineValueRefreshRequest||(nn.InlineValueRefreshRequest={}))});var af=A(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.InlayHintRefreshRequest=_t.InlayHintResolveRequest=_t.InlayHintRequest=void 0;var Zn=be(),Ev;(function(e){e.method="textDocument/inlayHint",e.messageDirection=Zn.MessageDirection.clientToServer,e.type=new Zn.ProtocolRequestType(e.method)})(Ev=_t.InlayHintRequest||(_t.InlayHintRequest={}));var Mv;(function(e){e.method="inlayHint/resolve",e.messageDirection=Zn.MessageDirection.clientToServer,e.type=new Zn.ProtocolRequestType(e.method)})(Mv=_t.InlayHintResolveRequest||(_t.InlayHintResolveRequest={}));var Iv;(function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=Zn.MessageDirection.serverToClient,e.type=new Zn.ProtocolRequestType0(e.method)})(Iv=_t.InlayHintRefreshRequest||(_t.InlayHintRefreshRequest={}))});var uf=A(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.DiagnosticRefreshRequest=Fe.WorkspaceDiagnosticRequest=Fe.DocumentDiagnosticRequest=Fe.DocumentDiagnosticReportKind=Fe.DiagnosticServerCancellationData=void 0;var cf=_n(),jv=to(),er=be(),Lv;(function(e){function t(n){let r=n;return r&&jv.boolean(r.retriggerRequest)}e.is=t})(Lv=Fe.DiagnosticServerCancellationData||(Fe.DiagnosticServerCancellationData={}));var Fv;(function(e){e.Full="full",e.Unchanged="unchanged"})(Fv=Fe.DocumentDiagnosticReportKind||(Fe.DocumentDiagnosticReportKind={}));var Uv;(function(e){e.method="textDocument/diagnostic",e.messageDirection=er.MessageDirection.clientToServer,e.type=new er.ProtocolRequestType(e.method),e.partialResult=new cf.ProgressType})(Uv=Fe.DocumentDiagnosticRequest||(Fe.DocumentDiagnosticRequest={}));var Wv;(function(e){e.method="workspace/diagnostic",e.messageDirection=er.MessageDirection.clientToServer,e.type=new er.ProtocolRequestType(e.method),e.partialResult=new cf.ProgressType})(Wv=Fe.WorkspaceDiagnosticRequest||(Fe.WorkspaceDiagnosticRequest={}));var Hv;(function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=er.MessageDirection.serverToClient,e.type=new er.ProtocolRequestType0(e.method)})(Hv=Fe.DiagnosticRefreshRequest||(Fe.DiagnosticRefreshRequest={}))});var ff=A(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.DidCloseNotebookDocumentNotification=te.DidSaveNotebookDocumentNotification=te.DidChangeNotebookDocumentNotification=te.NotebookCellArrayChange=te.DidOpenNotebookDocumentNotification=te.NotebookDocumentSyncRegistrationType=te.NotebookDocument=te.NotebookCell=te.ExecutionSummary=te.NotebookCellKind=void 0;var Er=eo(),Dt=to(),qt=be(),lf;(function(e){e.Markup=1,e.Code=2;function t(n){return n===1||n===2}e.is=t})(lf=te.NotebookCellKind||(te.NotebookCellKind={}));var df;(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 Dt.objectLiteral(o)&&Er.uinteger.is(o.executionOrder)&&(o.success===void 0||Dt.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})(df=te.ExecutionSummary||(te.ExecutionSummary={}));var Cc;(function(e){function t(o,s){return{kind:o,document:s}}e.create=t;function n(o){let s=o;return Dt.objectLiteral(s)&&lf.is(s.kind)&&Er.DocumentUri.is(s.document)&&(s.metadata===void 0||Dt.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)&&!df.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(Dt.objectLiteral(o)&&Dt.objectLiteral(s)){let p=Object.keys(o),g=Object.keys(s);if(p.length!==g.length||(p.sort(),g.sort(),!i(p,g)))return!1;for(let b=0;b<p.length;b++){let D=p[b];if(!i(o[D],s[D]))return!1}}return!0}})(Cc=te.NotebookCell||(te.NotebookCell={}));var Bv;(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 Dt.objectLiteral(i)&&Dt.string(i.uri)&&Er.integer.is(i.version)&&Dt.typedArray(i.cells,Cc.is)}e.is=n})(Bv=te.NotebookDocument||(te.NotebookDocument={}));var Mr;(function(e){e.method="notebookDocument/sync",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.RegistrationType(e.method)})(Mr=te.NotebookDocumentSyncRegistrationType||(te.NotebookDocumentSyncRegistrationType={}));var zv;(function(e){e.method="notebookDocument/didOpen",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method),e.registrationMethod=Mr.method})(zv=te.DidOpenNotebookDocumentNotification||(te.DidOpenNotebookDocumentNotification={}));var Vv;(function(e){function t(r){let i=r;return Dt.objectLiteral(i)&&Er.uinteger.is(i.start)&&Er.uinteger.is(i.deleteCount)&&(i.cells===void 0||Dt.typedArray(i.cells,Cc.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})(Vv=te.NotebookCellArrayChange||(te.NotebookCellArrayChange={}));var $v;(function(e){e.method="notebookDocument/didChange",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method),e.registrationMethod=Mr.method})($v=te.DidChangeNotebookDocumentNotification||(te.DidChangeNotebookDocumentNotification={}));var Yv;(function(e){e.method="notebookDocument/didSave",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method),e.registrationMethod=Mr.method})(Yv=te.DidSaveNotebookDocumentNotification||(te.DidSaveNotebookDocumentNotification={}));var Kv;(function(e){e.method="notebookDocument/didClose",e.messageDirection=qt.MessageDirection.clientToServer,e.type=new qt.ProtocolNotificationType(e.method),e.registrationMethod=Mr.method})(Kv=te.DidCloseNotebookDocumentNotification||(te.DidCloseNotebookDocumentNotification={}))});var Pf=A(d=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0});d.WorkspaceSymbolRequest=d.CodeActionResolveRequest=d.CodeActionRequest=d.DocumentSymbolRequest=d.DocumentHighlightRequest=d.ReferencesRequest=d.DefinitionRequest=d.SignatureHelpRequest=d.SignatureHelpTriggerKind=d.HoverRequest=d.CompletionResolveRequest=d.CompletionRequest=d.CompletionTriggerKind=d.PublishDiagnosticsNotification=d.WatchKind=d.RelativePattern=d.FileChangeType=d.DidChangeWatchedFilesNotification=d.WillSaveTextDocumentWaitUntilRequest=d.WillSaveTextDocumentNotification=d.TextDocumentSaveReason=d.DidSaveTextDocumentNotification=d.DidCloseTextDocumentNotification=d.DidChangeTextDocumentNotification=d.TextDocumentContentChangeEvent=d.DidOpenTextDocumentNotification=d.TextDocumentSyncKind=d.TelemetryEventNotification=d.LogMessageNotification=d.ShowMessageRequest=d.ShowMessageNotification=d.MessageType=d.DidChangeConfigurationNotification=d.ExitNotification=d.ShutdownRequest=d.InitializedNotification=d.InitializeErrorCodes=d.InitializeRequest=d.WorkDoneProgressOptions=d.TextDocumentRegistrationOptions=d.StaticRegistrationOptions=d.PositionEncodingKind=d.FailureHandlingKind=d.ResourceOperationKind=d.UnregistrationRequest=d.RegistrationRequest=d.DocumentSelector=d.NotebookCellTextDocumentFilter=d.NotebookDocumentFilter=d.TextDocumentFilter=void 0;d.TypeHierarchySubtypesRequest=d.TypeHierarchyPrepareRequest=d.MonikerRequest=d.MonikerKind=d.UniquenessLevel=d.WillDeleteFilesRequest=d.DidDeleteFilesNotification=d.WillRenameFilesRequest=d.DidRenameFilesNotification=d.WillCreateFilesRequest=d.DidCreateFilesNotification=d.FileOperationPatternKind=d.LinkedEditingRangeRequest=d.ShowDocumentRequest=d.SemanticTokensRegistrationType=d.SemanticTokensRefreshRequest=d.SemanticTokensRangeRequest=d.SemanticTokensDeltaRequest=d.SemanticTokensRequest=d.TokenFormat=d.CallHierarchyPrepareRequest=d.CallHierarchyOutgoingCallsRequest=d.CallHierarchyIncomingCallsRequest=d.WorkDoneProgressCancelNotification=d.WorkDoneProgressCreateRequest=d.WorkDoneProgress=d.SelectionRangeRequest=d.DeclarationRequest=d.FoldingRangeRequest=d.ColorPresentationRequest=d.DocumentColorRequest=d.ConfigurationRequest=d.DidChangeWorkspaceFoldersNotification=d.WorkspaceFoldersRequest=d.TypeDefinitionRequest=d.ImplementationRequest=d.ApplyWorkspaceEditRequest=d.ExecuteCommandRequest=d.PrepareRenameRequest=d.RenameRequest=d.PrepareSupportDefaultBehavior=d.DocumentOnTypeFormattingRequest=d.DocumentRangeFormattingRequest=d.DocumentFormattingRequest=d.DocumentLinkResolveRequest=d.DocumentLinkRequest=d.CodeLensRefreshRequest=d.CodeLensResolveRequest=d.CodeLensRequest=d.WorkspaceSymbolResolveRequest=void 0;d.DidCloseNotebookDocumentNotification=d.DidSaveNotebookDocumentNotification=d.DidChangeNotebookDocumentNotification=d.NotebookCellArrayChange=d.DidOpenNotebookDocumentNotification=d.NotebookDocumentSyncRegistrationType=d.NotebookDocument=d.NotebookCell=d.ExecutionSummary=d.NotebookCellKind=d.DiagnosticRefreshRequest=d.WorkspaceDiagnosticRequest=d.DocumentDiagnosticRequest=d.DocumentDiagnosticReportKind=d.DiagnosticServerCancellationData=d.InlayHintRefreshRequest=d.InlayHintResolveRequest=d.InlayHintRequest=d.InlineValueRefreshRequest=d.InlineValueRequest=d.TypeHierarchySupertypesRequest=void 0;var O=be(),pf=eo(),Ue=to(),Gv=Md();Object.defineProperty(d,"ImplementationRequest",{enumerable:!0,get:function(){return Gv.ImplementationRequest}});var Qv=jd();Object.defineProperty(d,"TypeDefinitionRequest",{enumerable:!0,get:function(){return Qv.TypeDefinitionRequest}});var gf=Ld();Object.defineProperty(d,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return gf.WorkspaceFoldersRequest}});Object.defineProperty(d,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return gf.DidChangeWorkspaceFoldersNotification}});var Jv=Ud();Object.defineProperty(d,"ConfigurationRequest",{enumerable:!0,get:function(){return Jv.ConfigurationRequest}});var mf=Wd();Object.defineProperty(d,"DocumentColorRequest",{enumerable:!0,get:function(){return mf.DocumentColorRequest}});Object.defineProperty(d,"ColorPresentationRequest",{enumerable:!0,get:function(){return mf.ColorPresentationRequest}});var Xv=Bd();Object.defineProperty(d,"FoldingRangeRequest",{enumerable:!0,get:function(){return Xv.FoldingRangeRequest}});var Zv=Vd();Object.defineProperty(d,"DeclarationRequest",{enumerable:!0,get:function(){return Zv.DeclarationRequest}});var eC=Yd();Object.defineProperty(d,"SelectionRangeRequest",{enumerable:!0,get:function(){return eC.SelectionRangeRequest}});var Pc=Kd();Object.defineProperty(d,"WorkDoneProgress",{enumerable:!0,get:function(){return Pc.WorkDoneProgress}});Object.defineProperty(d,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return Pc.WorkDoneProgressCreateRequest}});Object.defineProperty(d,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return Pc.WorkDoneProgressCancelNotification}});var _c=Gd();Object.defineProperty(d,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return _c.CallHierarchyIncomingCallsRequest}});Object.defineProperty(d,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return _c.CallHierarchyOutgoingCallsRequest}});Object.defineProperty(d,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return _c.CallHierarchyPrepareRequest}});var tr=Qd();Object.defineProperty(d,"TokenFormat",{enumerable:!0,get:function(){return tr.TokenFormat}});Object.defineProperty(d,"SemanticTokensRequest",{enumerable:!0,get:function(){return tr.SemanticTokensRequest}});Object.defineProperty(d,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return tr.SemanticTokensDeltaRequest}});Object.defineProperty(d,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return tr.SemanticTokensRangeRequest}});Object.defineProperty(d,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return tr.SemanticTokensRefreshRequest}});Object.defineProperty(d,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return tr.SemanticTokensRegistrationType}});var tC=Xd();Object.defineProperty(d,"ShowDocumentRequest",{enumerable:!0,get:function(){return tC.ShowDocumentRequest}});var nC=ef();Object.defineProperty(d,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return nC.LinkedEditingRangeRequest}});var Dn=tf();Object.defineProperty(d,"FileOperationPatternKind",{enumerable:!0,get:function(){return Dn.FileOperationPatternKind}});Object.defineProperty(d,"DidCreateFilesNotification",{enumerable:!0,get:function(){return Dn.DidCreateFilesNotification}});Object.defineProperty(d,"WillCreateFilesRequest",{enumerable:!0,get:function(){return Dn.WillCreateFilesRequest}});Object.defineProperty(d,"DidRenameFilesNotification",{enumerable:!0,get:function(){return Dn.DidRenameFilesNotification}});Object.defineProperty(d,"WillRenameFilesRequest",{enumerable:!0,get:function(){return Dn.WillRenameFilesRequest}});Object.defineProperty(d,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return Dn.DidDeleteFilesNotification}});Object.defineProperty(d,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return Dn.WillDeleteFilesRequest}});var Dc=rf();Object.defineProperty(d,"UniquenessLevel",{enumerable:!0,get:function(){return Dc.UniquenessLevel}});Object.defineProperty(d,"MonikerKind",{enumerable:!0,get:function(){return Dc.MonikerKind}});Object.defineProperty(d,"MonikerRequest",{enumerable:!0,get:function(){return Dc.MonikerRequest}});var Rc=of();Object.defineProperty(d,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return Rc.TypeHierarchyPrepareRequest}});Object.defineProperty(d,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return Rc.TypeHierarchySubtypesRequest}});Object.defineProperty(d,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return Rc.TypeHierarchySupertypesRequest}});var hf=sf();Object.defineProperty(d,"InlineValueRequest",{enumerable:!0,get:function(){return hf.InlineValueRequest}});Object.defineProperty(d,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return hf.InlineValueRefreshRequest}});var Sc=af();Object.defineProperty(d,"InlayHintRequest",{enumerable:!0,get:function(){return Sc.InlayHintRequest}});Object.defineProperty(d,"InlayHintResolveRequest",{enumerable:!0,get:function(){return Sc.InlayHintResolveRequest}});Object.defineProperty(d,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return Sc.InlayHintRefreshRequest}});var Ir=uf();Object.defineProperty(d,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return Ir.DiagnosticServerCancellationData}});Object.defineProperty(d,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return Ir.DocumentDiagnosticReportKind}});Object.defineProperty(d,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return Ir.DocumentDiagnosticRequest}});Object.defineProperty(d,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return Ir.WorkspaceDiagnosticRequest}});Object.defineProperty(d,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return Ir.DiagnosticRefreshRequest}});var Nt=ff();Object.defineProperty(d,"NotebookCellKind",{enumerable:!0,get:function(){return Nt.NotebookCellKind}});Object.defineProperty(d,"ExecutionSummary",{enumerable:!0,get:function(){return Nt.ExecutionSummary}});Object.defineProperty(d,"NotebookCell",{enumerable:!0,get:function(){return Nt.NotebookCell}});Object.defineProperty(d,"NotebookDocument",{enumerable:!0,get:function(){return Nt.NotebookDocument}});Object.defineProperty(d,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return Nt.NotebookDocumentSyncRegistrationType}});Object.defineProperty(d,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return Nt.DidOpenNotebookDocumentNotification}});Object.defineProperty(d,"NotebookCellArrayChange",{enumerable:!0,get:function(){return Nt.NotebookCellArrayChange}});Object.defineProperty(d,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return Nt.DidChangeNotebookDocumentNotification}});Object.defineProperty(d,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return Nt.DidSaveNotebookDocumentNotification}});Object.defineProperty(d,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return Nt.DidCloseNotebookDocumentNotification}});var yf;(function(e){function t(n){let r=n;return Ue.string(r.language)||Ue.string(r.scheme)||Ue.string(r.pattern)}e.is=t})(yf=d.TextDocumentFilter||(d.TextDocumentFilter={}));var bf;(function(e){function t(n){let r=n;return Ue.objectLiteral(r)&&(Ue.string(r.notebookType)||Ue.string(r.scheme)||Ue.string(r.pattern))}e.is=t})(bf=d.NotebookDocumentFilter||(d.NotebookDocumentFilter={}));var vf;(function(e){function t(n){let r=n;return Ue.objectLiteral(r)&&(Ue.string(r.notebook)||bf.is(r.notebook))&&(r.language===void 0||Ue.string(r.language))}e.is=t})(vf=d.NotebookCellTextDocumentFilter||(d.NotebookCellTextDocumentFilter={}));var Cf;(function(e){function t(n){if(!Array.isArray(n))return!1;for(let r of n)if(!Ue.string(r)&&!yf.is(r)&&!vf.is(r))return!1;return!0}e.is=t})(Cf=d.DocumentSelector||(d.DocumentSelector={}));var rC;(function(e){e.method="client/registerCapability",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType(e.method)})(rC=d.RegistrationRequest||(d.RegistrationRequest={}));var iC;(function(e){e.method="client/unregisterCapability",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType(e.method)})(iC=d.UnregistrationRequest||(d.UnregistrationRequest={}));var oC;(function(e){e.Create="create",e.Rename="rename",e.Delete="delete"})(oC=d.ResourceOperationKind||(d.ResourceOperationKind={}));var sC;(function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"})(sC=d.FailureHandlingKind||(d.FailureHandlingKind={}));var aC;(function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"})(aC=d.PositionEncodingKind||(d.PositionEncodingKind={}));var cC;(function(e){function t(n){let r=n;return r&&Ue.string(r.id)&&r.id.length>0}e.hasId=t})(cC=d.StaticRegistrationOptions||(d.StaticRegistrationOptions={}));var uC;(function(e){function t(n){let r=n;return r&&(r.documentSelector===null||Cf.is(r.documentSelector))}e.is=t})(uC=d.TextDocumentRegistrationOptions||(d.TextDocumentRegistrationOptions={}));var lC;(function(e){function t(r){let i=r;return Ue.objectLiteral(i)&&(i.workDoneProgress===void 0||Ue.boolean(i.workDoneProgress))}e.is=t;function n(r){let i=r;return i&&Ue.boolean(i.workDoneProgress)}e.hasWorkDoneProgress=n})(lC=d.WorkDoneProgressOptions||(d.WorkDoneProgressOptions={}));var dC;(function(e){e.method="initialize",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(dC=d.InitializeRequest||(d.InitializeRequest={}));var fC;(function(e){e.unknownProtocolVersion=1})(fC=d.InitializeErrorCodes||(d.InitializeErrorCodes={}));var pC;(function(e){e.method="initialized",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(pC=d.InitializedNotification||(d.InitializedNotification={}));var gC;(function(e){e.method="shutdown",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType0(e.method)})(gC=d.ShutdownRequest||(d.ShutdownRequest={}));var mC;(function(e){e.method="exit",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType0(e.method)})(mC=d.ExitNotification||(d.ExitNotification={}));var hC;(function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(hC=d.DidChangeConfigurationNotification||(d.DidChangeConfigurationNotification={}));var yC;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4})(yC=d.MessageType||(d.MessageType={}));var bC;(function(e){e.method="window/showMessage",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolNotificationType(e.method)})(bC=d.ShowMessageNotification||(d.ShowMessageNotification={}));var vC;(function(e){e.method="window/showMessageRequest",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType(e.method)})(vC=d.ShowMessageRequest||(d.ShowMessageRequest={}));var CC;(function(e){e.method="window/logMessage",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolNotificationType(e.method)})(CC=d.LogMessageNotification||(d.LogMessageNotification={}));var PC;(function(e){e.method="telemetry/event",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolNotificationType(e.method)})(PC=d.TelemetryEventNotification||(d.TelemetryEventNotification={}));var _C;(function(e){e.None=0,e.Full=1,e.Incremental=2})(_C=d.TextDocumentSyncKind||(d.TextDocumentSyncKind={}));var DC;(function(e){e.method="textDocument/didOpen",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(DC=d.DidOpenTextDocumentNotification||(d.DidOpenTextDocumentNotification={}));var RC;(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})(RC=d.TextDocumentContentChangeEvent||(d.TextDocumentContentChangeEvent={}));var SC;(function(e){e.method="textDocument/didChange",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(SC=d.DidChangeTextDocumentNotification||(d.DidChangeTextDocumentNotification={}));var TC;(function(e){e.method="textDocument/didClose",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(TC=d.DidCloseTextDocumentNotification||(d.DidCloseTextDocumentNotification={}));var xC;(function(e){e.method="textDocument/didSave",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(xC=d.DidSaveTextDocumentNotification||(d.DidSaveTextDocumentNotification={}));var wC;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(wC=d.TextDocumentSaveReason||(d.TextDocumentSaveReason={}));var kC;(function(e){e.method="textDocument/willSave",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(kC=d.WillSaveTextDocumentNotification||(d.WillSaveTextDocumentNotification={}));var AC;(function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(AC=d.WillSaveTextDocumentWaitUntilRequest||(d.WillSaveTextDocumentWaitUntilRequest={}));var qC;(function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolNotificationType(e.method)})(qC=d.DidChangeWatchedFilesNotification||(d.DidChangeWatchedFilesNotification={}));var NC;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(NC=d.FileChangeType||(d.FileChangeType={}));var OC;(function(e){function t(n){let r=n;return Ue.objectLiteral(r)&&(pf.URI.is(r.baseUri)||pf.WorkspaceFolder.is(r.baseUri))&&Ue.string(r.pattern)}e.is=t})(OC=d.RelativePattern||(d.RelativePattern={}));var EC;(function(e){e.Create=1,e.Change=2,e.Delete=4})(EC=d.WatchKind||(d.WatchKind={}));var MC;(function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolNotificationType(e.method)})(MC=d.PublishDiagnosticsNotification||(d.PublishDiagnosticsNotification={}));var IC;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(IC=d.CompletionTriggerKind||(d.CompletionTriggerKind={}));var jC;(function(e){e.method="textDocument/completion",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(jC=d.CompletionRequest||(d.CompletionRequest={}));var LC;(function(e){e.method="completionItem/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(LC=d.CompletionResolveRequest||(d.CompletionResolveRequest={}));var FC;(function(e){e.method="textDocument/hover",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(FC=d.HoverRequest||(d.HoverRequest={}));var UC;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(UC=d.SignatureHelpTriggerKind||(d.SignatureHelpTriggerKind={}));var WC;(function(e){e.method="textDocument/signatureHelp",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(WC=d.SignatureHelpRequest||(d.SignatureHelpRequest={}));var HC;(function(e){e.method="textDocument/definition",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(HC=d.DefinitionRequest||(d.DefinitionRequest={}));var BC;(function(e){e.method="textDocument/references",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(BC=d.ReferencesRequest||(d.ReferencesRequest={}));var zC;(function(e){e.method="textDocument/documentHighlight",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(zC=d.DocumentHighlightRequest||(d.DocumentHighlightRequest={}));var VC;(function(e){e.method="textDocument/documentSymbol",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(VC=d.DocumentSymbolRequest||(d.DocumentSymbolRequest={}));var $C;(function(e){e.method="textDocument/codeAction",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})($C=d.CodeActionRequest||(d.CodeActionRequest={}));var YC;(function(e){e.method="codeAction/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(YC=d.CodeActionResolveRequest||(d.CodeActionResolveRequest={}));var KC;(function(e){e.method="workspace/symbol",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(KC=d.WorkspaceSymbolRequest||(d.WorkspaceSymbolRequest={}));var GC;(function(e){e.method="workspaceSymbol/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(GC=d.WorkspaceSymbolResolveRequest||(d.WorkspaceSymbolResolveRequest={}));var QC;(function(e){e.method="textDocument/codeLens",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(QC=d.CodeLensRequest||(d.CodeLensRequest={}));var JC;(function(e){e.method="codeLens/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(JC=d.CodeLensResolveRequest||(d.CodeLensResolveRequest={}));var XC;(function(e){e.method="workspace/codeLens/refresh",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType0(e.method)})(XC=d.CodeLensRefreshRequest||(d.CodeLensRefreshRequest={}));var ZC;(function(e){e.method="textDocument/documentLink",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(ZC=d.DocumentLinkRequest||(d.DocumentLinkRequest={}));var eP;(function(e){e.method="documentLink/resolve",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(eP=d.DocumentLinkResolveRequest||(d.DocumentLinkResolveRequest={}));var tP;(function(e){e.method="textDocument/formatting",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(tP=d.DocumentFormattingRequest||(d.DocumentFormattingRequest={}));var nP;(function(e){e.method="textDocument/rangeFormatting",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(nP=d.DocumentRangeFormattingRequest||(d.DocumentRangeFormattingRequest={}));var rP;(function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(rP=d.DocumentOnTypeFormattingRequest||(d.DocumentOnTypeFormattingRequest={}));var iP;(function(e){e.Identifier=1})(iP=d.PrepareSupportDefaultBehavior||(d.PrepareSupportDefaultBehavior={}));var oP;(function(e){e.method="textDocument/rename",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(oP=d.RenameRequest||(d.RenameRequest={}));var sP;(function(e){e.method="textDocument/prepareRename",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(sP=d.PrepareRenameRequest||(d.PrepareRenameRequest={}));var aP;(function(e){e.method="workspace/executeCommand",e.messageDirection=O.MessageDirection.clientToServer,e.type=new O.ProtocolRequestType(e.method)})(aP=d.ExecuteCommandRequest||(d.ExecuteCommandRequest={}));var cP;(function(e){e.method="workspace/applyEdit",e.messageDirection=O.MessageDirection.serverToClient,e.type=new O.ProtocolRequestType("workspace/applyEdit")})(cP=d.ApplyWorkspaceEditRequest||(d.ApplyWorkspaceEditRequest={}))});var Df=A(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.createProtocolConnection=void 0;var _f=_n();function uP(e,t,n,r){return _f.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,_f.createMessageConnection)(e,t,n,r)}ao.createProtocolConnection=uP});var Rf=A(Ye=>{"use strict";var lP=Ye&&Ye.__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]}),co=Ye&&Ye.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&lP(t,e,n)};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.LSPErrorCodes=Ye.createProtocolConnection=void 0;co(_n(),Ye);co(eo(),Ye);co(be(),Ye);co(Pf(),Ye);var dP=Df();Object.defineProperty(Ye,"createProtocolConnection",{enumerable:!0,get:function(){return dP.createProtocolConnection}});var fP;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(fP=Ye.LSPErrorCodes||(Ye.LSPErrorCodes={}))});var ke=A(Ot=>{"use strict";var pP=Ot&&Ot.__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]}),Sf=Ot&&Ot.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&pP(t,e,n)};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.createProtocolConnection=void 0;var gP=gc();Sf(gc(),Ot);Sf(Rf(),Ot);function mP(e,t,n,r){return(0,gP.createMessageConnection)(e,t,n,r)}Ot.createProtocolConnection=mP});var xc=A(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.SemanticTokensBuilder=rn.SemanticTokensDiff=rn.SemanticTokensFeature=void 0;var uo=ke(),hP=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(uo.SemanticTokensRefreshRequest.type),on:t=>{let n=uo.SemanticTokensRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onDelta:t=>{let n=uo.SemanticTokensDeltaRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onRange:t=>{let n=uo.SemanticTokensRangeRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};rn.SemanticTokensFeature=hP;var lo=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}]:[]}};rn.SemanticTokensDiff=lo;var Tc=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 lo(this._prevData,this._data).computeDiff()}:this.build()}};rn.SemanticTokensBuilder=Tc});var kc=A(fo=>{"use strict";Object.defineProperty(fo,"__esModule",{value:!0});fo.TextDocuments=void 0;var Rn=ke(),wc=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())})}};fo.TextDocuments=wc});var qc=A(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.NotebookDocuments=nr.NotebookSyncFeature=void 0;var ct=ke(),Tf=kc(),yP=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:t=>this.connection.onNotification(ct.DidOpenNotebookDocumentNotification.type,n=>{t(n)}),onDidChangeNotebookDocument:t=>this.connection.onNotification(ct.DidChangeNotebookDocumentNotification.type,n=>{t(n)}),onDidSaveNotebookDocument:t=>this.connection.onNotification(ct.DidSaveNotebookDocumentNotification.type,n=>{t(n)}),onDidCloseNotebookDocument:t=>this.connection.onNotification(ct.DidCloseNotebookDocumentNotification.type,n=>{t(n)})}}};nr.NotebookSyncFeature=yP;var po=class e{onDidOpenTextDocument(t){return this.openHandler=t,ct.Disposable.create(()=>{this.openHandler=void 0})}openTextDocument(t){this.openHandler&&this.openHandler(t)}onDidChangeTextDocument(t){return this.changeHandler=t,ct.Disposable.create(()=>{this.changeHandler=t})}changeTextDocument(t){this.changeHandler&&this.changeHandler(t)}onDidCloseTextDocument(t){return this.closeHandler=t,ct.Disposable.create(()=>{this.closeHandler=void 0})}closeTextDocument(t){this.closeHandler&&this.closeHandler(t)}onWillSaveTextDocument(){return e.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return e.NULL_DISPOSE}onDidSaveTextDocument(){return e.NULL_DISPOSE}};po.NULL_DISPOSE=Object.freeze({dispose:()=>{}});var Ac=class{constructor(t){t instanceof Tf.TextDocuments?this._cellTextDocuments=t:this._cellTextDocuments=new Tf.TextDocuments(t),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new ct.Emitter,this._onDidChange=new ct.Emitter,this._onDidSave=new ct.Emitter,this._onDidClose=new ct.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 po,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=[],g=[],b=[],D=[];if(c.cells!==void 0){let j=c.cells;if(j.structure!==void 0){let _=j.structure.array;if(o.cells.splice(_.start,_.deleteCount,..._.cells!==void 0?_.cells:[]),j.structure.didOpen!==void 0)for(let v of j.structure.didOpen)n.openTextDocument({textDocument:v}),p.push(v.uri);if(j.structure.didClose)for(let v of j.structure.didClose)n.closeTextDocument({textDocument:v}),g.push(v.uri)}if(j.data!==void 0){let _=new Map(j.data.map(v=>[v.document,v]));for(let v=0;v<=o.cells.length;v++){let N=_.get(o.cells[v].document);if(N!==void 0){let z=o.cells.splice(v,1,N);if(b.push({old:z[0],new:N}),_.delete(N.document),_.size===0)break}}}if(j.textContent!==void 0)for(let _ of j.textContent)n.changeTextDocument({textDocument:_.document,contentChanges:_.changes}),D.push(_.document.uri)}this.updateCellMap(o);let R={notebookDocument:o};u&&(R.metadata={old:s,new:o.metadata});let T=[];for(let j of p)T.push(this.getNotebookCell(j));let q=[];for(let j of g)q.push(this.getNotebookCell(j));let B=[];for(let j of D)B.push(this.getNotebookCell(j));(T.length>0||q.length>0||b.length>0||B.length>0)&&(R.cells={added:T,removed:q,changed:{data:b,textContent:B}}),(R.metadata!==void 0||R.cells!==void 0)&&this._onDidChange.fire(R)})),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)}})),ct.Disposable.create(()=>{r.forEach(i=>i.dispose())})}updateCellMap(t){for(let n of t.cells)this.notebookCellMap.set(n.document,[n,t])}};nr.NotebookDocuments=Ac});var Nc=A(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.thenable=xe.typedArray=xe.stringArray=xe.array=xe.func=xe.error=xe.number=xe.string=xe.boolean=void 0;function bP(e){return e===!0||e===!1}xe.boolean=bP;function xf(e){return typeof e=="string"||e instanceof String}xe.string=xf;function vP(e){return typeof e=="number"||e instanceof Number}xe.number=vP;function CP(e){return e instanceof Error}xe.error=CP;function wf(e){return typeof e=="function"}xe.func=wf;function kf(e){return Array.isArray(e)}xe.array=kf;function PP(e){return kf(e)&&e.every(t=>xf(t))}xe.stringArray=PP;function _P(e,t){return Array.isArray(e)&&e.every(t)}xe.typedArray=_P;function DP(e){return e&&wf(e.then)}xe.thenable=DP});var Oc=A(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.generateUuid=ut.parse=ut.isUUID=ut.v4=ut.empty=void 0;var jr=class{constructor(t){this._value=t}asHex(){return this._value}equals(t){return this.asHex()===t.asHex()}},Lr=class e extends jr{constructor(){super([e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),"-","4",e._randomHex(),e._randomHex(),e._randomHex(),"-",e._oneOf(e._timeHighBits),e._randomHex(),e._randomHex(),e._randomHex(),"-",e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex(),e._randomHex()].join(""))}static _oneOf(t){return t[Math.floor(t.length*Math.random())]}static _randomHex(){return e._oneOf(e._chars)}};Lr._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"];Lr._timeHighBits=["8","9","a","b"];ut.empty=new jr("00000000-0000-0000-0000-000000000000");function Af(){return new Lr}ut.v4=Af;var RP=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function qf(e){return RP.test(e)}ut.isUUID=qf;function SP(e){if(!qf(e))throw new Error("invalid uuid");return new jr(e)}ut.parse=SP;function TP(){return Af().asHex()}ut.generateUuid=TP});var Nf=A(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.attachPartialResult=sn.ProgressFeature=sn.attachWorkDone=void 0;var on=ke(),xP=Oc(),Sn=class e{constructor(t,n){this._connection=t,this._token=n,e.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(on.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(on.WorkDoneProgress.type,this._token,r)}done(){e.Instances.delete(this._token),this._connection.sendProgress(on.WorkDoneProgress.type,this._token,{kind:"end"})}};Sn.Instances=new Map;var go=class extends Sn{constructor(t,n){super(t,n),this._source=new on.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}},Fr=class{constructor(){}begin(){}report(){}done(){}},mo=class extends Fr{constructor(){super(),this._source=new on.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}};function wP(e,t){if(t===void 0||t.workDoneToken===void 0)return new Fr;let n=t.workDoneToken;return delete t.workDoneToken,new Sn(e,n)}sn.attachWorkDone=wP;var kP=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(t){super.initialize(t),t?.window?.workDoneProgress===!0&&(this._progressSupported=!0,this.connection.onNotification(on.WorkDoneProgressCancelNotification.type,n=>{let r=Sn.Instances.get(n.token);(r instanceof go||r instanceof mo)&&r.cancel()}))}attachWorkDoneProgress(t){return t===void 0?new Fr:new Sn(this.connection,t)}createWorkDoneProgress(){if(this._progressSupported){let t=(0,xP.generateUuid)();return this.connection.sendRequest(on.WorkDoneProgressCreateRequest.type,{token:t}).then(()=>new go(this.connection,t))}else return Promise.resolve(new mo)}};sn.ProgressFeature=kP;var Ec;(function(e){e.type=new on.ProgressType})(Ec||(Ec={}));var Mc=class{constructor(t,n){this._connection=t,this._token=n}report(t){this._connection.sendProgress(Ec.type,this._token,t)}};function AP(e,t){if(t===void 0||t.partialResultToken===void 0)return;let n=t.partialResultToken;return delete t.partialResultToken,new Mc(e,n)}sn.attachPartialResult=AP});var Of=A(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.ConfigurationFeature=void 0;var qP=ke(),NP=Nc(),OP=e=>class extends e{getConfiguration(t){return t?NP.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(qP.ConfigurationRequest.type,n).then(r=>Array.isArray(r)?Array.isArray(t)?r:r[0]:Array.isArray(t)?[]:null)}};ho.ConfigurationFeature=OP});var Ef=A(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.WorkspaceFoldersFeature=void 0;var yo=ke(),EP=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(t){super.initialize(t);let n=t.workspace;n&&n.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new yo.Emitter,this.connection.onNotification(yo.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(yo.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(yo.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}};bo.WorkspaceFoldersFeature=EP});var Mf=A(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.CallHierarchyFeature=void 0;var Ic=ke(),MP=e=>class extends e{get callHierarchy(){return{onPrepare:t=>this.connection.onRequest(Ic.CallHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onIncomingCalls:t=>{let n=Ic.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onOutgoingCalls:t=>{let n=Ic.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};vo.CallHierarchyFeature=MP});var If=A(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.ShowDocumentFeature=void 0;var IP=ke(),jP=e=>class extends e{showDocument(t){return this.connection.sendRequest(IP.ShowDocumentRequest.type,t)}};Co.ShowDocumentFeature=jP});var jf=A(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.FileOperationsFeature=void 0;var rr=ke(),LP=e=>class extends e{onDidCreateFiles(t){return this.connection.onNotification(rr.DidCreateFilesNotification.type,n=>{t(n)})}onDidRenameFiles(t){return this.connection.onNotification(rr.DidRenameFilesNotification.type,n=>{t(n)})}onDidDeleteFiles(t){return this.connection.onNotification(rr.DidDeleteFilesNotification.type,n=>{t(n)})}onWillCreateFiles(t){return this.connection.onRequest(rr.WillCreateFilesRequest.type,(n,r)=>t(n,r))}onWillRenameFiles(t){return this.connection.onRequest(rr.WillRenameFilesRequest.type,(n,r)=>t(n,r))}onWillDeleteFiles(t){return this.connection.onRequest(rr.WillDeleteFilesRequest.type,(n,r)=>t(n,r))}};Po.FileOperationsFeature=LP});var Lf=A(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.LinkedEditingRangeFeature=void 0;var FP=ke(),UP=e=>class extends e{onLinkedEditingRange(t){return this.connection.onRequest(FP.LinkedEditingRangeRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0))}};_o.LinkedEditingRangeFeature=UP});var Ff=A(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.TypeHierarchyFeature=void 0;var jc=ke(),WP=e=>class extends e{get typeHierarchy(){return{onPrepare:t=>this.connection.onRequest(jc.TypeHierarchyPrepareRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),void 0)),onSupertypes:t=>{let n=jc.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))},onSubtypes:t=>{let n=jc.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};Do.TypeHierarchyFeature=WP});var Wf=A(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.InlineValueFeature=void 0;var Uf=ke(),HP=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(Uf.InlineValueRefreshRequest.type),on:t=>this.connection.onRequest(Uf.InlineValueRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n)))}}};Ro.InlineValueFeature=HP});var Hf=A(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.InlayHintFeature=void 0;var Lc=ke(),BP=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(Lc.InlayHintRefreshRequest.type),on:t=>this.connection.onRequest(Lc.InlayHintRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n))),resolve:t=>this.connection.onRequest(Lc.InlayHintResolveRequest.type,(n,r)=>t(n,r))}}};So.InlayHintFeature=BP});var Bf=A(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.DiagnosticFeature=void 0;var Ur=ke(),zP=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(Ur.DiagnosticRefreshRequest.type),on:t=>this.connection.onRequest(Ur.DocumentDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Ur.DocumentDiagnosticRequest.partialResult,n))),onWorkspace:t=>this.connection.onRequest(Ur.WorkspaceDiagnosticRequest.type,(n,r)=>t(n,r,this.attachWorkDoneProgress(n),this.attachPartialResultProgress(Ur.WorkspaceDiagnosticRequest.partialResult,n)))}}};To.DiagnosticFeature=zP});var zf=A(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.MonikerFeature=void 0;var VP=ke(),$P=e=>class extends e{get moniker(){return{on:t=>{let n=VP.MonikerRequest.type;return this.connection.onRequest(n,(r,i)=>t(r,i,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(n,r)))}}}};xo.MonikerFeature=$P});var rp=A(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.createConnection=ee.combineFeatures=ee.combineNotebooksFeatures=ee.combineLanguagesFeatures=ee.combineWorkspaceFeatures=ee.combineWindowFeatures=ee.combineClientFeatures=ee.combineTracerFeatures=ee.combineTelemetryFeatures=ee.combineConsoleFeatures=ee._NotebooksImpl=ee._LanguagesImpl=ee.BulkUnregistration=ee.BulkRegistration=ee.ErrorMessageTracker=void 0;var M=ke(),lt=Nc(),Uc=Oc(),Y=Nf(),YP=Of(),KP=Ef(),GP=Mf(),QP=xc(),JP=If(),XP=jf(),ZP=Lf(),e_=Ff(),t_=Wf(),n_=Hf(),r_=Bf(),i_=qc(),o_=zf();function Fc(e){if(e!==null)return e}var Wc=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)})}};ee.ErrorMessageTracker=Wc;var wo=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")})}},Hc=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(Fc)}showWarningMessage(t,...n){let r={type:M.MessageType.Warning,message:t,actions:n};return this.connection.sendRequest(M.ShowMessageRequest.type,r).then(Fc)}showInformationMessage(t,...n){let r={type:M.MessageType.Info,message:t,actions:n};return this.connection.sendRequest(M.ShowMessageRequest.type,r).then(Fc)}},Vf=(0,JP.ShowDocumentFeature)((0,Y.ProgressFeature)(Hc)),s_;(function(e){function t(){return new ko}e.create=t})(s_=ee.BulkRegistration||(ee.BulkRegistration={}));var ko=class{constructor(){this._registrations=[],this._registered=new Set}add(t,n){let r=lt.string(t)?t:t.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);let i=Uc.generateUuid();this._registrations.push({id:i,method:r,registerOptions:n||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}},a_;(function(e){function t(){return new Wr(void 0,[])}e.create=t})(a_=ee.BulkUnregistration||(ee.BulkUnregistration={}));var Wr=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=lt.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}},Ao=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 ko?this.registerMany(t):t instanceof Wr?this.registerSingle1(t,n,r):this.registerSingle2(t,n)}registerSingle1(t,n,r){let i=lt.string(n)?n:n.method,o=Uc.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=lt.string(t)?t:t.method,i=Uc.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 Wr(this._connection,n.registrations.map(r=>({id:r.id,method:r.method}))),r=>(this.connection.console.info("Bulk registration failed."),Promise.reject(r)))}},Bc=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)}},$f=(0,XP.FileOperationsFeature)((0,KP.WorkspaceFoldersFeature)((0,YP.ConfigurationFeature)(Bc))),qo=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(()=>{})}},No=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")})}},Oo=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,Y.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,Y.attachPartialResult)(this.connection,n)}};ee._LanguagesImpl=Oo;var Yf=(0,o_.MonikerFeature)((0,r_.DiagnosticFeature)((0,n_.InlayHintFeature)((0,t_.InlineValueFeature)((0,e_.TypeHierarchyFeature)((0,ZP.LinkedEditingRangeFeature)((0,QP.SemanticTokensFeature)((0,GP.CallHierarchyFeature)(Oo)))))))),Eo=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,Y.attachWorkDone)(this.connection,t)}attachPartialResultProgress(t,n){return(0,Y.attachPartialResult)(this.connection,n)}};ee._NotebooksImpl=Eo;var Kf=(0,i_.NotebookSyncFeature)(Eo);function Gf(e,t){return function(n){return t(e(n))}}ee.combineConsoleFeatures=Gf;function Qf(e,t){return function(n){return t(e(n))}}ee.combineTelemetryFeatures=Qf;function Jf(e,t){return function(n){return t(e(n))}}ee.combineTracerFeatures=Jf;function Xf(e,t){return function(n){return t(e(n))}}ee.combineClientFeatures=Xf;function Zf(e,t){return function(n){return t(e(n))}}ee.combineWindowFeatures=Zf;function ep(e,t){return function(n){return t(e(n))}}ee.combineWorkspaceFeatures=ep;function tp(e,t){return function(n){return t(e(n))}}ee.combineLanguagesFeatures=tp;function np(e,t){return function(n){return t(e(n))}}ee.combineNotebooksFeatures=np;function c_(e,t){function n(i,o,s){return i&&o?s(i,o):i||o}return{__brand:"features",console:n(e.console,t.console,Gf),tracer:n(e.tracer,t.tracer,Jf),telemetry:n(e.telemetry,t.telemetry,Qf),client:n(e.client,t.client,Xf),window:n(e.window,t.window,Zf),workspace:n(e.workspace,t.workspace,ep),languages:n(e.languages,t.languages,tp),notebooks:n(e.notebooks,t.notebooks,np)}}ee.combineFeatures=c_;function u_(e,t,n){let r=n&&n.console?new(n.console(wo)):new wo,i=e(r);r.rawAttach(i);let o=n&&n.tracer?new(n.tracer(qo)):new qo,s=n&&n.telemetry?new(n.telemetry(No)):new No,u=n&&n.client?new(n.client(Ao)):new Ao,c=n&&n.window?new(n.window(Vf)):new Vf,p=n&&n.workspace?new(n.workspace($f)):new $f,g=n&&n.languages?new(n.languages(Yf)):new Yf,b=n&&n.notebooks?new(n.notebooks(Kf)):new Kf,D=[r,o,s,u,c,p,g,b];function R(_){return _ instanceof Promise?_:lt.thenable(_)?new Promise((v,N)=>{_.then(z=>v(z),z=>N(z))}):Promise.resolve(_)}let T,q,B,j={listen:()=>i.listen(),sendRequest:(_,...v)=>i.sendRequest(lt.string(_)?_:_.method,...v),onRequest:(_,v)=>i.onRequest(_,v),sendNotification:(_,v)=>{let N=lt.string(_)?_:_.method;return arguments.length===1?i.sendNotification(N):i.sendNotification(N,v)},onNotification:(_,v)=>i.onNotification(_,v),onProgress:i.onProgress,sendProgress:i.sendProgress,onInitialize:_=>(q=_,{dispose:()=>{q=void 0}}),onInitialized:_=>i.onNotification(M.InitializedNotification.type,_),onShutdown:_=>(T=_,{dispose:()=>{T=void 0}}),onExit:_=>(B=_,{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 g},get notebooks(){return b},onDidChangeConfiguration:_=>i.onNotification(M.DidChangeConfigurationNotification.type,_),onDidChangeWatchedFiles:_=>i.onNotification(M.DidChangeWatchedFilesNotification.type,_),__textDocumentSync:void 0,onDidOpenTextDocument:_=>i.onNotification(M.DidOpenTextDocumentNotification.type,_),onDidChangeTextDocument:_=>i.onNotification(M.DidChangeTextDocumentNotification.type,_),onDidCloseTextDocument:_=>i.onNotification(M.DidCloseTextDocumentNotification.type,_),onWillSaveTextDocument:_=>i.onNotification(M.WillSaveTextDocumentNotification.type,_),onWillSaveTextDocumentWaitUntil:_=>i.onRequest(M.WillSaveTextDocumentWaitUntilRequest.type,_),onDidSaveTextDocument:_=>i.onNotification(M.DidSaveTextDocumentNotification.type,_),sendDiagnostics:_=>i.sendNotification(M.PublishDiagnosticsNotification.type,_),onHover:_=>i.onRequest(M.HoverRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onCompletion:_=>i.onRequest(M.CompletionRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onCompletionResolve:_=>i.onRequest(M.CompletionResolveRequest.type,_),onSignatureHelp:_=>i.onRequest(M.SignatureHelpRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onDeclaration:_=>i.onRequest(M.DeclarationRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onDefinition:_=>i.onRequest(M.DefinitionRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onTypeDefinition:_=>i.onRequest(M.TypeDefinitionRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onImplementation:_=>i.onRequest(M.ImplementationRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onReferences:_=>i.onRequest(M.ReferencesRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onDocumentHighlight:_=>i.onRequest(M.DocumentHighlightRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onDocumentSymbol:_=>i.onRequest(M.DocumentSymbolRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onWorkspaceSymbol:_=>i.onRequest(M.WorkspaceSymbolRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onWorkspaceSymbolResolve:_=>i.onRequest(M.WorkspaceSymbolResolveRequest.type,_),onCodeAction:_=>i.onRequest(M.CodeActionRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onCodeActionResolve:_=>i.onRequest(M.CodeActionResolveRequest.type,(v,N)=>_(v,N)),onCodeLens:_=>i.onRequest(M.CodeLensRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onCodeLensResolve:_=>i.onRequest(M.CodeLensResolveRequest.type,(v,N)=>_(v,N)),onDocumentFormatting:_=>i.onRequest(M.DocumentFormattingRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onDocumentRangeFormatting:_=>i.onRequest(M.DocumentRangeFormattingRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onDocumentOnTypeFormatting:_=>i.onRequest(M.DocumentOnTypeFormattingRequest.type,(v,N)=>_(v,N)),onRenameRequest:_=>i.onRequest(M.RenameRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),onPrepareRename:_=>i.onRequest(M.PrepareRenameRequest.type,(v,N)=>_(v,N)),onDocumentLinks:_=>i.onRequest(M.DocumentLinkRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onDocumentLinkResolve:_=>i.onRequest(M.DocumentLinkResolveRequest.type,(v,N)=>_(v,N)),onDocumentColor:_=>i.onRequest(M.DocumentColorRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onColorPresentation:_=>i.onRequest(M.ColorPresentationRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onFoldingRanges:_=>i.onRequest(M.FoldingRangeRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onSelectionRanges:_=>i.onRequest(M.SelectionRangeRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),(0,Y.attachPartialResult)(i,v))),onExecuteCommand:_=>i.onRequest(M.ExecuteCommandRequest.type,(v,N)=>_(v,N,(0,Y.attachWorkDone)(i,v),void 0)),dispose:()=>i.dispose()};for(let _ of D)_.attach(j);return i.onRequest(M.InitializeRequest.type,_=>{t.initialize(_),lt.string(_.trace)&&(o.trace=M.Trace.fromString(_.trace));for(let v of D)v.initialize(_.capabilities);if(q){let v=q(_,new M.CancellationTokenSource().token,(0,Y.attachWorkDone)(i,_),void 0);return R(v).then(N=>{if(N instanceof M.ResponseError)return N;let z=N;z||(z={capabilities:{}});let J=z.capabilities;J||(J={},z.capabilities=J),J.textDocumentSync===void 0||J.textDocumentSync===null?J.textDocumentSync=lt.number(j.__textDocumentSync)?j.__textDocumentSync:M.TextDocumentSyncKind.None:!lt.number(J.textDocumentSync)&&!lt.number(J.textDocumentSync.change)&&(J.textDocumentSync.change=lt.number(j.__textDocumentSync)?j.__textDocumentSync:M.TextDocumentSyncKind.None);for(let ae of D)ae.fillServerCapabilities(J);return z})}else{let v={capabilities:{textDocumentSync:M.TextDocumentSyncKind.None}};for(let N of D)N.fillServerCapabilities(v.capabilities);return v}}),i.onRequest(M.ShutdownRequest.type,()=>{if(t.shutdownReceived=!0,T)return T(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,_=>{o.trace=M.Trace.fromString(_.value)}),j}ee.createConnection=u_});var zc=A(We=>{"use strict";var l_=We&&We.__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]}),ip=We&&We.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&l_(t,e,n)};Object.defineProperty(We,"__esModule",{value:!0});We.ProposedFeatures=We.NotebookDocuments=We.TextDocuments=We.SemanticTokensBuilder=void 0;var d_=xc();Object.defineProperty(We,"SemanticTokensBuilder",{enumerable:!0,get:function(){return d_.SemanticTokensBuilder}});ip(ke(),We);var f_=kc();Object.defineProperty(We,"TextDocuments",{enumerable:!0,get:function(){return f_.TextDocuments}});var p_=qc();Object.defineProperty(We,"NotebookDocuments",{enumerable:!0,get:function(){return p_.NotebookDocuments}});ip(rp(),We);var g_;(function(e){e.all={__brand:"features"}})(g_=We.ProposedFeatures||(We.ProposedFeatures={}))});var sp=A((VS,op)=>{"use strict";op.exports=ke()});var Vc=A(Et=>{"use strict";var m_=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]}),cp=Et&&Et.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&m_(t,e,n)};Object.defineProperty(Et,"__esModule",{value:!0});Et.createConnection=void 0;var Mo=zc();cp(sp(),Et);cp(zc(),Et);var ap=!1,h_={initialize:e=>{},get shutdownReceived(){return ap},set shutdownReceived(e){ap=e},exit:e=>{}};function y_(e,t,n,r){let i,o,s,u;e!==void 0&&e.__brand==="features"&&(i=e,e=t,t=n,n=r),Mo.ConnectionStrategy.is(e)||Mo.ConnectionOptions.is(e)?u=e:(o=e,s=t,u=n);let c=p=>(0,Mo.createProtocolConnection)(o,s,p,u);return(0,Mo.createConnection)(c,h_,i)}Et.createConnection=y_});var an=A((YS,up)=>{"use strict";up.exports=Vc()});var nu=A((zT,_p)=>{"use strict";function Mt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Pp(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 r0(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 sr={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),Mt(o),o.length!==0&&(t=o+"/"+t,n=o.charCodeAt(0)===47)}return t=Pp(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(Mt(t),t.length===0)return".";var n=t.charCodeAt(0)===47,r=t.charCodeAt(t.length-1)===47;return t=Pp(t,!n),t.length===0&&!n&&(t="."),t.length>0&&r&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return Mt(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];Mt(r),r.length>0&&(t===void 0?t=r:t+="/"+r)}return t===void 0?".":sr.normalize(t)},relative:function(t,n){if(Mt(t),Mt(n),t===n||(t=sr.resolve(t),n=sr.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,g=-1,b=0;b<=p;++b){if(b===p){if(c>p){if(n.charCodeAt(s+b)===47)return n.slice(s+b+1);if(b===0)return n.slice(s+b)}else o>p&&(t.charCodeAt(r+b)===47?g=b:b===0&&(g=0));break}var D=t.charCodeAt(r+b),R=n.charCodeAt(s+b);if(D!==R)break;D===47&&(g=b)}var T="";for(b=r+g+1;b<=i;++b)(b===i||t.charCodeAt(b)===47)&&(T.length===0?T+="..":T+="/..");return T.length>0?T+n.slice(s+g):(s+=g,n.charCodeAt(s)===47&&++s,n.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(Mt(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');Mt(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){Mt(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 r0("/",t)},parse:function(t){Mt(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,g=t.length-1,b=0;g>=o;--g){if(r=t.charCodeAt(g),r===47){if(!p){u=g+1;break}continue}c===-1&&(p=!1,c=g+1),r===46?s===-1?s=g:b!==1&&(b=1):s!==-1&&(b=-1)}return s===-1||c===-1||b===0||b===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};sr.posix=sr;_p.exports=sr});import{CONFIG_FILE_NAMES as $s,loadConfig as Ah}from"@redocly/openapi-core";var su;(()=>{"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 g,b="",D=0,R=-1,T=0,q=0;q<=c.length;++q){if(q<c.length)g=c.charCodeAt(q);else{if(g===47)break;g=47}if(g===47){if(!(R===q-1||T===1))if(R!==q-1&&T===2){if(b.length<2||D!==2||b.charCodeAt(b.length-1)!==46||b.charCodeAt(b.length-2)!==46){if(b.length>2){var B=b.lastIndexOf("/");if(B!==b.length-1){B===-1?(b="",D=0):D=(b=b.slice(0,B)).length-1-b.lastIndexOf("/"),R=q,T=0;continue}}else if(b.length===2||b.length===1){b="",D=0,R=q,T=0;continue}}p&&(b.length>0?b+="/..":b="..",D=2)}else b.length>0?b+="/"+c.slice(R+1,q):b=c.slice(R+1,q),D=q-R-1;R=q,T=0}else g===46&&T!==-1?++T:T=-1}return b}var u={resolve:function(){for(var c,p="",g=!1,b=arguments.length-1;b>=-1&&!g;b--){var D;b>=0?D=arguments[b]:(c===void 0&&(c=process.cwd()),D=c),o(D),D.length!==0&&(p=D+"/"+p,g=D.charCodeAt(0)===47)}return p=s(p,!g),g?p.length>0?"/"+p:"/":p.length>0?p:"."},normalize:function(c){if(o(c),c.length===0)return".";var p=c.charCodeAt(0)===47,g=c.charCodeAt(c.length-1)===47;return(c=s(c,!p)).length!==0||p||(c="."),c.length>0&&g&&(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 g=arguments[p];o(g),g.length>0&&(c===void 0?c=g:c+="/"+g)}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 g=1;g<c.length&&c.charCodeAt(g)===47;++g);for(var b=c.length,D=b-g,R=1;R<p.length&&p.charCodeAt(R)===47;++R);for(var T=p.length-R,q=D<T?D:T,B=-1,j=0;j<=q;++j){if(j===q){if(T>q){if(p.charCodeAt(R+j)===47)return p.slice(R+j+1);if(j===0)return p.slice(R+j)}else D>q&&(c.charCodeAt(g+j)===47?B=j:j===0&&(B=0));break}var _=c.charCodeAt(g+j);if(_!==p.charCodeAt(R+j))break;_===47&&(B=j)}var v="";for(j=g+B+1;j<=b;++j)j!==b&&c.charCodeAt(j)!==47||(v.length===0?v+="..":v+="/..");return v.length>0?v+p.slice(R+B):(R+=B,p.charCodeAt(R)===47&&++R,p.slice(R))},_makeLong:function(c){return c},dirname:function(c){if(o(c),c.length===0)return".";for(var p=c.charCodeAt(0),g=p===47,b=-1,D=!0,R=c.length-1;R>=1;--R)if((p=c.charCodeAt(R))===47){if(!D){b=R;break}}else D=!1;return b===-1?g?"/":".":g&&b===1?"//":c.slice(0,b)},basename:function(c,p){if(p!==void 0&&typeof p!="string")throw new TypeError('"ext" argument must be a string');o(c);var g,b=0,D=-1,R=!0;if(p!==void 0&&p.length>0&&p.length<=c.length){if(p.length===c.length&&p===c)return"";var T=p.length-1,q=-1;for(g=c.length-1;g>=0;--g){var B=c.charCodeAt(g);if(B===47){if(!R){b=g+1;break}}else q===-1&&(R=!1,q=g+1),T>=0&&(B===p.charCodeAt(T)?--T==-1&&(D=g):(T=-1,D=q))}return b===D?D=q:D===-1&&(D=c.length),c.slice(b,D)}for(g=c.length-1;g>=0;--g)if(c.charCodeAt(g)===47){if(!R){b=g+1;break}}else D===-1&&(R=!1,D=g+1);return D===-1?"":c.slice(b,D)},extname:function(c){o(c);for(var p=-1,g=0,b=-1,D=!0,R=0,T=c.length-1;T>=0;--T){var q=c.charCodeAt(T);if(q!==47)b===-1&&(D=!1,b=T+1),q===46?p===-1?p=T:R!==1&&(R=1):p!==-1&&(R=-1);else if(!D){g=T+1;break}}return p===-1||b===-1||R===0||R===1&&p===b-1&&p===g+1?"":c.slice(p,b)},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,g){var b=g.dir||g.root,D=g.base||(g.name||"")+(g.ext||"");return b?b===g.root?b+D:b+"/"+D:D}(0,c)},parse:function(c){o(c);var p={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return p;var g,b=c.charCodeAt(0),D=b===47;D?(p.root="/",g=1):g=0;for(var R=-1,T=0,q=-1,B=!0,j=c.length-1,_=0;j>=g;--j)if((b=c.charCodeAt(j))!==47)q===-1&&(B=!1,q=j+1),b===46?R===-1?R=j:_!==1&&(_=1):R!==-1&&(_=-1);else if(!B){T=j+1;break}return R===-1||q===-1||_===0||_===1&&R===q-1&&R===T+1?q!==-1&&(p.base=p.name=T===0&&D?c.slice(1,q):c.slice(T,q)):(T===0&&D?(p.name=c.slice(1,R),p.base=c.slice(1,q)):(p.name=c.slice(T,R),p.base=c.slice(T,q)),p.ext=c.slice(R,q)),T>0?p.dir=c.slice(0,T-1):D&&(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:()=>D,Utils:()=>ft}),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(I,x){if(!I.scheme&&x)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${I.authority}", path: "${I.path}", query: "${I.query}", fragment: "${I.fragment}"}`);if(I.scheme&&!o.test(I.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(I.path){if(I.authority){if(!s.test(I.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(I.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="",g="/",b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class D{static isUri(x){return x instanceof D||!!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,W,L,ne,Q,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,we){return ze||we?ze:"file"}(x,K),this.authority=W||p,this.path=function(ze,we){switch(ze){case"https":case"http":case"file":we?we[0]!==g&&(we=g+we):we=g}return we}(this.scheme,L||p),this.query=ne||p,this.fragment=Q||p,c(this,K))}get fsPath(){return _(this,!1)}with(x){if(!x)return this;let{scheme:W,authority:L,path:ne,query:Q,fragment:K}=x;return W===void 0?W=this.scheme:W===null&&(W=p),L===void 0?L=this.authority:L===null&&(L=p),ne===void 0?ne=this.path:ne===null&&(ne=p),Q===void 0?Q=this.query:Q===null&&(Q=p),K===void 0?K=this.fragment:K===null&&(K=p),W===this.scheme&&L===this.authority&&ne===this.path&&Q===this.query&&K===this.fragment?this:new T(W,L,ne,Q,K)}static parse(x,W=!1){let L=b.exec(x);return L?new T(L[2]||p,J(L[4]||p),J(L[5]||p),J(L[7]||p),J(L[9]||p),W):new T(p,p,p,p,p)}static file(x){let W=p;if(i&&(x=x.replace(/\\/g,g)),x[0]===g&&x[1]===g){let L=x.indexOf(g,2);L===-1?(W=x.substring(2),x=g):(W=x.substring(2,L),x=x.substring(L)||g)}return new T("file",W,x,p,p)}static from(x){let W=new T(x.scheme,x.authority,x.path,x.query,x.fragment);return c(W,!0),W}toString(x=!1){return v(this,x)}toJSON(){return this}static revive(x){if(x){if(x instanceof D)return x;{let W=new T(x);return W._formatted=x.external,W._fsPath=x._sep===R?x.fsPath:null,W}}return x}}let R=i?1:void 0;class T extends D{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=_(this,!1)),this._fsPath}toString(x=!1){return x?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){let x={$mid:1};return this._fsPath&&(x.fsPath=this._fsPath,x._sep=R),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 q={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(I,x,W){let L,ne=-1;for(let Q=0;Q<I.length;Q++){let K=I.charCodeAt(Q);if(K>=97&&K<=122||K>=65&&K<=90||K>=48&&K<=57||K===45||K===46||K===95||K===126||x&&K===47||W&&K===91||W&&K===93||W&&K===58)ne!==-1&&(L+=encodeURIComponent(I.substring(ne,Q)),ne=-1),L!==void 0&&(L+=I.charAt(Q));else{L===void 0&&(L=I.substr(0,Q));let ze=q[K];ze!==void 0?(ne!==-1&&(L+=encodeURIComponent(I.substring(ne,Q)),ne=-1),L+=ze):ne===-1&&(ne=Q)}}return ne!==-1&&(L+=encodeURIComponent(I.substring(ne))),L!==void 0?L:I}function j(I){let x;for(let W=0;W<I.length;W++){let L=I.charCodeAt(W);L===35||L===63?(x===void 0&&(x=I.substr(0,W)),x+=q[L]):x!==void 0&&(x+=I[W])}return x!==void 0?x:I}function _(I,x){let W;return W=I.authority&&I.path.length>1&&I.scheme==="file"?`//${I.authority}${I.path}`:I.path.charCodeAt(0)===47&&(I.path.charCodeAt(1)>=65&&I.path.charCodeAt(1)<=90||I.path.charCodeAt(1)>=97&&I.path.charCodeAt(1)<=122)&&I.path.charCodeAt(2)===58?x?I.path.substr(1):I.path[1].toLowerCase()+I.path.substr(2):I.path,i&&(W=W.replace(/\//g,"\\")),W}function v(I,x){let W=x?j:B,L="",{scheme:ne,authority:Q,path:K,query:ze,fragment:we}=I;if(ne&&(L+=ne,L+=":"),(Q||ne==="file")&&(L+=g,L+=g),Q){let se=Q.indexOf("@");if(se!==-1){let St=Q.substr(0,se);Q=Q.substr(se+1),se=St.lastIndexOf(":"),se===-1?L+=W(St,!1,!1):(L+=W(St.substr(0,se),!1,!1),L+=":",L+=W(St.substr(se+1),!1,!0)),L+="@"}Q=Q.toLowerCase(),se=Q.lastIndexOf(":"),se===-1?L+=W(Q,!1,!0):(L+=W(Q.substr(0,se),!1,!0),L+=Q.substr(se))}if(K){if(K.length>=3&&K.charCodeAt(0)===47&&K.charCodeAt(2)===58){let se=K.charCodeAt(1);se>=65&&se<=90&&(K=`/${String.fromCharCode(se+32)}:${K.substr(3)}`)}else if(K.length>=2&&K.charCodeAt(1)===58){let se=K.charCodeAt(0);se>=65&&se<=90&&(K=`${String.fromCharCode(se+32)}:${K.substr(2)}`)}L+=W(K,!0,!1)}return ze&&(L+="?",L+=W(ze,!1,!1)),we&&(L+="#",L+=x?we:B(we,!1,!1)),L}function N(I){try{return decodeURIComponent(I)}catch{return I.length>3?I.substr(0,3)+N(I.substr(3)):I}}let z=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function J(I){return I.match(z)?I.replace(z,x=>N(x)):I}var ae=n(470);let He=ae.posix||ae,dt="/";var ft;(function(I){I.joinPath=function(x,...W){return x.with({path:He.join(x.path,...W)})},I.resolvePath=function(x,...W){let L=x.path,ne=!1;L[0]!==dt&&(L=dt+L,ne=!0);let Q=He.resolve(L,...W);return ne&&Q[0]===dt&&!x.authority&&(Q=Q.substring(1)),x.with({path:Q})},I.dirname=function(x){if(x.path.length===0||x.path===dt)return x;let W=He.dirname(x.path);return W.length===1&&W.charCodeAt(0)===46&&(W=""),x.with({path:W})},I.basename=function(x){return He.basename(x.path)},I.extname=function(x){return He.extname(x.path)}})(ft||(ft={}))})(),su=r})();var{URI:Kt,Utils:de}=su;import{CONFIG_FILE_NAMES as Bp}from"@redocly/openapi-core";var cs={languageId:"yaml",filePattern:/\.ya?ml$/i},us={languageId:"json",filePattern:/\.json$/i},as=class{constructor(){this._scorecardEnabled=!1;this.supportedLanguages=[cs,us];this.registerConfigFinder(async t=>{if(!this._fs)return;let n=[];for(let r of Bp)try{let i=de.resolvePath(de.dirname(Ne(t)),r);await this._fs.exists(i)&&n.push(i.toString())}catch{continue}if(n.length>1)throw new Error(`
|
|
68
68
|
Multiple configuration files are not allowed.
|
|
69
69
|
Found the following files: ${n.join(", ")}.
|
|
70
70
|
Please use 'redocly.yaml' instead.
|
|
71
|
-
`);return n[0]}),this.registerRootWorkspaceFolderURIGetter(async()=>"")}registerFileSystemProvider(t){this._fs=t}registerDocumentsProvider(t){this._documentManager=t}registerConfigFinder(t){this._findConfig=t}registerRootWorkspaceFolderURIGetter(t){this._getRootWorkspaceFolderURI=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}get findConfig(){return this._findConfig}get getRootWorkspaceFolderURI(){return this._getRootWorkspaceFolderURI}},Me=new as;function au(e,t){return de.resolvePath(qe(e)).toString()===de.resolvePath(qe(t)).toString()}function qe(e){return Kt.parse(e)}function An(e){return Kt.parse(e).fsPath}function lr(e){let t=["https","http"],{scheme:n}=Kt.parse(e);return t.includes(n)}function qn(e){return de.basename(qe(e))}async function cu(e,t="/"){let n=de.resolvePath(qe(t));for(;e.path!=="/";)try{(await Me.fs.stat(de.resolvePath(n,e.path))).isDirectory()||(e=de.dirname(e));break}catch{e=de.dirname(e)}return e}import{BaseResolver as xh,Source as zl,readFileFromUrl as wh}from"@redocly/openapi-core";var di=Ge(mr(),1);import{isAbsoluteUrl as Rh}from"@redocly/openapi-core";function El(e,t=100,n=!1){let r=new Map,i=new Map;function o(u,c,p){let g=i.get(u.uri),b=Date.now()-g;try{b<t&&b>=0?r.set(u.uri,setTimeout(()=>o(u,c,p),t-b)):(r.delete(u.uri),i.delete(u.uri),n||c(e(u)))}catch(D){p(D)}}function s(u){let c=r.get(u.uri),p=n&&!c;return i.set(u.uri,Date.now()),new Promise((g,b)=>{c||r.set(u.uri,setTimeout(()=>o(u,g,b),t)),p&&g(e(u))})}return s}function Is(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 Ml(e){return e==="$ref"}async function Ls(e,t){let n=Kt.parse(t);return de.joinPath(n,e).toString()}async function jl(e,t,n){for(let[r,{root:i}]of Object.entries(e))if(await Ls(i,n)===t)return r}function Il(e){return typeof e=="string"}function fi(e){return typeof e=="function"}function Ll(e){return e?.kind===di.Kind.MAP}function Fs(e){return e?.kind===di.Kind.MAPPING}function Us(e){return e?.kind===di.Kind.SEQ}function hr(e,t){let n=t.singleQuoted?"'":'"';return`${n}${e}${n}`}function Ws(e){return Rh(e)||e.startsWith("file://")}var pi=class e{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(e.isIncremental(r)){let i=Ul(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,g=Fl(r.text,!1,o);if(c-u===g.length)for(let D=0,R=g.length;D<R;D++)p[D+u+1]=g[D];else g.length<1e4?p.splice(u+1,c-u,...g):this._lineOffsets=p=p.slice(0,u+1).concat(g,p.slice(c+1));let b=r.text.length-(s-o);if(b!==0)for(let D=u+1+g.length,R=p.length;D<R;D++)p[D]=p[D]+b}else if(e.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=Fl(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}},gi;(function(e){function t(i,o,s,u){return new pi(i,o,s,u)}e.create=t;function n(i,o,s){if(i instanceof pi)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=Hs(o.map(Sh),(g,b)=>{let D=g.range.start.line-b.range.start.line;return D===0?g.range.start.character-b.range.start.character:D}),c=0,p=[];for(let g of u){let b=i.offsetAt(g.range.start);if(b<c)throw new Error("Overlapping edit");b>c&&p.push(s.substring(c,b)),g.newText.length&&p.push(g.newText),c=i.offsetAt(g.range.end)}return p.push(s.substr(c)),p.join("")}e.applyEdits=r})(gi||(gi={}));function Hs(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Hs(r,t),Hs(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 Fl(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 Ul(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 Sh(e){let t=Ul(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Wl=new Map;function Hl(e,t){return Wl.set(e,t)}function Bl(e){let t=[];for(let[n,r]of Wl.entries())r.dependencyPaths.has(e)&&t.push({documentPath:n,durationMS:r.durationMS});return t}async function st(e){let t=Me.documents.get(e);if(t)return t;let n=await Me.fs.readFile(qe(e),"utf-8");return gi.create(e,"yaml",1,n)}function Bs(e){return us.filePattern.test(e)}function Th(e){return cs.filePattern.test(e)}var Ut=class extends xh{resolveExternalRef(t,n){return Ws(n)?n:t&&Ws(t)?new URL(n,t).href:de.resolvePath(de.dirname(qe(t)),n).toString()}async loadExternalRef(t){if(lr(t)){let{body:n,mimeType:r}=await wh(t,{...this.config.http,customFetch:fetch});return new zl(t,n,r)}return new zl(t,(await st(t)).getText())}};var yr,mi,zs,Vl;async function Vs(e){let t=new Ut,n=await Me.findConfig(e);return yr=await kh({configPath:n,externalRefResolver:t,processRawConfig:async({document:r,resolvedRefMap:i})=>{zs=i,Vl=r}}),yr}async function In(){return yr||await Vs(),{config:yr,configPath:mi,rootConfigDocument:Vl}}async function $l(e,t){try{return mi=await Me.findConfig(e),mi?await Vs(mi):yr}catch(n){return t?.createEventHandleLoadConfigError?.(n?.message),Vs("")}}function br(e){return Ys(e)?!0:!!zs&&[...zs.keys()].map(n=>n.split("::")?.[1]?.split("#")[0]).some(n=>au(qn(e),n))}function Ys(e){return $s.includes(qn(e))}var Yl={hide:{type:"boolean",default:!1},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},label:{type:"string"},items:{type:"array",items:{type:"string"}}},vr={type:"object",properties:Yl,additionalProperties:!1},Ah={type:"object",properties:{hide:{type:"boolean",default:!1},label:{type:"string"},placeholder:{type:"string"}},additionalProperties:!1},Xt={type:"object",properties:{hide:{type:"boolean",default:!1},type:{type:"string",enum:["rating","sentiment","comment","reasons","mood","scale"],default:"sentiment"},settings:{type:"object",properties:{label:{type:"string"},submitText:{type:"string"},buttonText:{type:"string"},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},items:{type:"array",items:{type:"string"},minItems:1},leftScaleLabel:{type:"string"},rightScaleLabel:{type:"string"},reasons:{type:"object",properties:Object.assign(Object.assign({},Yl),{like:vr,dislike:vr,satisfied:vr,neutral:vr,dissatisfied:vr}),additionalProperties:!1},comment:{type:"object",properties:{hide:{type:"boolean",default:!1},label:{type:"string"},likeLabel:{type:"string"},dislikeLabel:{type:"string"},satisfiedLabel:{type:"string"},neutralLabel:{type:"string"},dissatisfiedLabel:{type:"string"}},additionalProperties:!1},optionalEmail:Ah},additionalProperties:!1}},additionalProperties:!1};var Ln={type:"object",properties:{includeByName:{type:"array",items:{type:"string"}},excludeByName:{type:"array",items:{type:"string"}}},additionalProperties:!1},qh={type:"object",properties:{name:{type:"string"},items:Ln,queries:Ln,mutations:Ln,subscriptions:Ln,types:Ln,directives:Ln},required:["name"],additionalProperties:!1},Nh={type:"object",properties:{requireExactGroups:{type:"boolean"},groups:{type:"array",items:qh},otherItemsGroupName:{type:"string"}},required:["requireExactGroups","groups","otherItemsGroupName"],additionalProperties:!1},Fn={type:"object",properties:{hidePaginationButtons:{type:"boolean"},menu:{type:"object",properties:Object.assign({},Nh.properties),additionalProperties:!1},sidebar:{type:"object",properties:{hide:{type:"boolean"}}},apiLogo:{type:"object",properties:{imageUrl:{type:"string"},href:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"}}},jsonSamplesDepth:{type:"number"},samplesMaxInlineArgs:{type:"number"},licenseKey:{type:"string"},fieldExpandLevel:{type:"number"},baseUrlPath:{type:"string"},feedback:Xt},additionalProperties:!1};var Oh={type:"object",properties:{languages:{type:"array",items:{type:"object",properties:{lang:{type:"string",examples:["curl","JavaScript","Node.js","Python","Java8+Apache","Java","C#","C#+Newtonsoft","PHP","Go","Ruby","R","Payload"]},label:{type:"string"},options:{type:"object",properties:{indent:{type:"string"},withImports:{type:"boolean"},withComments:{type:"boolean"},binary:{type:"boolean"},credentials:{type:"string",enum:["omit","same-origin","include"]}},additionalProperties:!1}},required:["lang"],additionalProperties:!1}},skipOptionalParameters:{type:"boolean"},withOAuth2Call:{type:"boolean"}},required:["languages"],additionalProperties:!1},Eh={type:"array",items:{type:"object",properties:{title:{type:"string"},url:{type:"string"}},required:["url"],additionalProperties:!1}},hi={type:"object",properties:{licenseKey:{type:"string"},hideLoading:{type:"boolean"},disableRouter:{type:"boolean"},hideSidebar:{type:"boolean"},feedback:Xt,hideReplay:{type:"boolean"},oAuth2RedirectURI:{type:"string",nullable:!0},corsProxyUrl:{type:"string"},sortRequiredPropsFirst:{type:"boolean"},sanitize:{type:"boolean"},hideDownloadButtons:{type:"boolean"},downloadUrls:Eh,onlyRequiredInSamples:{type:"boolean"},generatedSamplesMaxDepth:{oneOf:[{type:"number"},{type:"string"}]},showExtensions:{oneOf:[{type:"boolean"},{type:"string"},{type:"array",items:{type:"string"}}]},hideSchemaTitles:{type:"boolean"},jsonSamplesExpandLevel:{oneOf:[{type:"number"},{type:"string"}]},schemasExpansionLevel:{oneOf:[{type:"number"},{type:"string"}]},mockServer:{type:"object",properties:{url:{type:"string"},position:{type:"string",enum:["first","last","replace","off"]},description:{type:"string"}}},maxDisplayedEnumValues:{type:"number"},schemaDefinitionsTagName:{type:"string"},layout:{type:"string",enum:["stacked","three-panel"]},hideInfoMetadata:{type:"boolean"},events:{type:"object"},skipBundle:{type:"boolean"},routingBasePath:{type:"string"},codeSamples:Oh,ignoreNamedSchemas:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},hidePropertiesPrefix:{type:"boolean"},excludeFromSearch:{type:"boolean"}},additionalProperties:!1};var Mh={type:"object",properties:{label:{type:"string"},lang:{enum:["curl","C#","Go","Java","Java8+Apache","JavaScript","Node.js","PHP","Python","R","Ruby"]}},required:["lang"]},jh={type:"object",properties:{enum:{type:"string"},enumSingleValue:{type:"string"},enumArray:{type:"string"},default:{type:"string"},deprecated:{type:"string"},example:{type:"string"},examples:{type:"string"},nullable:{type:"string"},recursive:{type:"string"},arrayOf:{type:"string"},webhook:{type:"string"},authorizations:{type:"string"},tryItAuthBasicUsername:{type:"string"},tryItAuthBasicPassword:{type:"string"}}},Kl={type:"object",properties:{label:{type:"string"},link:{type:"string"},target:{type:"string"}},required:["label","link"]},Ih={type:"object",properties:{beforeInfo:{type:"array",items:Kl},end:{type:"array",items:Kl}}},yn={type:"object",properties:{main:{type:"string"},light:{type:"string"},dark:{type:"string"},contrastText:{type:"string"}}},yi={type:"object",properties:{backgroundColor:{type:"string"},borderColor:{type:"string"},color:{type:"string"},tabTextColor:{type:"string"}}},Lh={type:"object",properties:Pi(yn.properties,["light","dark"])},Fh={type:"object",properties:{basic:{type:"string"},delete:{type:"string"},get:{type:"string"},head:{type:"string"},link:{type:"string"},options:{type:"string"},patch:{type:"string"},post:{type:"string"},put:{type:"string"}}},Uh={type:"object",properties:{error:yi,info:yi,redirect:yi,success:yi}},Wh={type:"object",properties:Un(yn.properties,["dark"])},Hh={type:"object",properties:{primary:{type:"string"},secondary:{type:"string"},light:{type:"string"}}},Bh={type:"object",properties:{accent:yn,border:Lh,error:yn,http:Fh,primary:yn,responses:Uh,secondary:Wh,success:yn,text:Hh,tonalOffset:{type:"number"},warning:yn}},bi={type:"object",properties:{fontSize:{type:"string"},padding:{type:"string"},minWidth:{type:"string"}}},zh={type:"object",properties:{small:bi,medium:bi,large:bi,xlarge:bi}},kt={type:"object",properties:{fontFamily:{type:"string"},fontSize:{type:"string"},fontWeight:{type:"string"},lineHeight:{type:"string"}}},Vh={type:"object",properties:Object.assign(Object.assign({},Un(kt.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},hoverStyle:{type:"string"},boxShadow:{type:"string"},hoverBoxShadow:{type:"string"},sizes:zh})},Gl={type:"object",properties:Pi(kt.properties,["fontSize","lineHeight"])},$h={type:"object",properties:{medium:Gl,small:Gl}},Yh={type:"object",properties:Object.assign(Object.assign({},Un(kt.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},color:{type:"string"},sizes:$h})},Kh={type:"object",properties:{top:{type:"string"},width:{type:"string"},height:{type:"string"}}},Gh={type:"object",properties:{borderRadius:{type:"string"},backgroundColor:{type:"string"}}},Ql={type:"object",properties:{fullWidth:{type:"boolean"}}},Qh={type:"object",properties:{buttons:Vh,httpBadges:Yh,layoutControls:Kh,panels:Gh,tryItButton:Ql,tryItSendButton:Ql}},Ci={type:"object",properties:{small:{type:"string"},medium:{type:"string"},large:{type:"string"}}},Jh={type:"object",properties:{maxWidth:Ci}},Xh={type:"object",properties:{maxWidth:Ci,middlePanelMaxWidth:Ci}},Zh={type:"object",properties:{showDarkRightPanel:{type:"boolean"},stacked:Jh,"three-panel":Xh}},Jl={type:"object",properties:{backgroundColor:{type:"string"},border:{type:"string"}}},ey={type:"object",properties:{breakFieldNames:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},constraints:Jl,defaultDetailsWidth:{type:"string"},examples:Jl,labelsTextSize:{type:"string"},linesColor:{type:"string"},nestedBackground:{type:"string"},nestingSpacing:{type:"string"},requireLabelColor:{type:"string"},typeNameColor:{type:"string"},typeTitleColor:{type:"string"}}},Zl={type:"object",properties:{subItemsColor:{type:"string"},textTransform:{type:"string"},fontWeight:{type:"string"}}},ty={type:"object",properties:Pi(Zl.properties,["textTransform"])},ny={type:"object",properties:{unit:{type:"number"},paddingHorizontal:{type:"string"},paddingVertical:{type:"string"},offsetTop:{type:"string"},offsetLeft:{type:"string"},offsetNesting:{type:"string"}}},ry={type:"object",properties:Object.assign(Object.assign({},Un(kt.properties,["fontWeight","lineHeight"])),{activeBgColor:{type:"string"},activeTextColor:{type:"string"},backgroundColor:{type:"string"},borderRadius:{type:"string"},breakPath:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},groupItems:Zl,level1items:ty,rightLineColor:{type:"string"},separatorLabelColor:{type:"string"},showAtBreakpoint:{type:"string"},spacing:ny,textColor:{type:"string"},width:{type:"string"}})},vi={type:"object",properties:Object.assign(Object.assign({},kt.properties),{color:{type:"string"},transform:{type:"string"}})},iy={type:"object",properties:Object.assign(Object.assign({},kt.properties),{backgroundColor:{type:"string"},color:{type:"string"},wordBreak:{type:"string",enum:["break-all","break-word","keep-all","normal","revert","unset","inherit","initial"]},wrap:{type:"boolean"}})},oy={type:"object",properties:Un(kt.properties,["fontSize"])},sy={type:"object",properties:{color:{type:"string"},hover:{type:"string"},textDecoration:{type:"string"},hoverTextDecoration:{type:"string"},visited:{type:"string"}}},ay={type:"object",properties:Object.assign(Object.assign({code:iy,fieldName:kt},Pi(kt.properties,["fontSize","fontFamily"])),{fontWeightBold:{type:"string"},fontWeightLight:{type:"string"},fontWeightRegular:{type:"string"},heading1:vi,heading2:vi,heading3:vi,headings:oy,lineHeight:{type:"string"},links:sy,optimizeSpeed:{type:"boolean"},rightPanelHeading:vi,smoothing:{type:"string",enum:["auto","none","antialiased","subpixel-antialiased","grayscale"]}})},cy={type:"object",properties:Object.assign({color:{type:"string"}},Un(kt.properties,["fontWeight"]))},uy={type:"object",properties:{backgroundColor:{type:"string"},borderRadius:{type:"string"},tokens:cy}},ly={type:"object",properties:{gutter:{type:"string"},maxHeight:{type:"string"},maxWidth:{type:"string"}}},dy={type:"object",properties:{backgroundColor:{type:"string"},color:{type:"string"}}},Xl={type:"object",properties:{custom:{type:"string"}}},fy={type:"object",properties:{DownloadButton:Xl,NextSectionButton:Xl}},py={type:"object",properties:{backgroundColor:{type:"string"},panelBackgroundColor:{type:"string"},panelControlsBackgroundColor:{type:"string"},showAtBreakpoint:{type:"string"},textColor:{type:"string"},width:{type:"string"}}},gy={type:"object",properties:{borderRadius:{type:"string"}}},my={type:"object",properties:{sectionHorizontal:{type:"number"},sectionVertical:{type:"number"},unit:{type:"number"}}},hy={type:"object",properties:{breakpoints:Ci,codeBlock:uy,colors:Bh,components:Qh,layout:Zh,logo:ly,fab:dy,overrides:fy,rightPanel:py,schema:ey,shape:gy,sidebar:ry,spacing:my,typography:ay,links:{properties:{color:{type:"string"}}},codeSample:{properties:{backgroundColor:{type:"string"}}}}},yy={type:"object",properties:{skipOptionalParameters:{type:"boolean"},languages:{type:"array",items:Mh}},required:["languages"]},ed={type:"object",properties:{theme:hy,ctrlFHijack:{type:"boolean"},defaultSampleLanguage:{type:"string"},disableDeepLinks:{type:"boolean"},disableSearch:{type:"boolean"},disableSidebar:{type:"boolean"},downloadDefinitionUrl:{type:"string"},expandDefaultServerVariables:{type:"boolean"},enumSkipQuotes:{type:"boolean"},expandDefaultRequest:{type:"boolean"},expandDefaultResponse:{type:"boolean"},expandResponses:{type:"string"},expandSingleSchemaField:{type:"boolean"},generateCodeSamples:yy,generatedPayloadSamplesMaxDepth:{type:"number"},hideDownloadButton:{type:"boolean"},hideHostname:{type:"boolean"},hideInfoSection:{type:"boolean"},hideLogo:{type:"boolean"},hideRequestPayloadSample:{type:"boolean"},hideRightPanel:{type:"boolean"},hideSchemaPattern:{type:"boolean"},hideSingleRequestSampleTab:{type:"boolean"},hideSecuritySection:{type:"boolean"},hideTryItPanel:{type:"boolean"},hideFab:{type:"boolean"},hideOneOfDescription:{type:"boolean"},htmlTemplate:{type:"string"},jsonSampleExpandLevel:{oneOf:[{type:"number",minimum:1},{type:"string"}]},labels:jh,menuToggle:{type:"boolean"},nativeScrollbars:{type:"boolean"},noAutoAuth:{type:"boolean"},onDeepLinkClick:{type:"object"},pagination:{enum:["none","section","item"]},pathInMiddlePanel:{type:"boolean"},payloadSampleIdx:{type:"number",minimum:0},requestInterceptor:{type:"object"},requiredPropsFirst:{type:"boolean"},routingStrategy:{type:"string"},samplesTabsMaxCount:{type:"number"},schemaExpansionLevel:{oneOf:[{type:"number",minimum:0},{type:"string"}]},minCharacterLengthToInitSearch:{type:"number",minimum:1},maxResponseHeadersToShowInTryIt:{type:"number",minimum:0},scrollYOffset:{oneOf:[{type:"number"},{type:"string"}]},searchAutoExpand:{type:"boolean"},searchFieldLevelBoost:{type:"number",minimum:0},searchMaxDepth:{type:"number",minimum:1},searchMode:{type:"string",enum:["default","path-only"]},searchOperationTitleBoost:{type:"number"},searchTagTitleBoost:{type:"number"},sendXUserAgentInTryIt:{type:"boolean"},showChangeLayoutButton:{type:"boolean"},showConsole:{type:"boolean"},showNextButton:{type:"boolean"},showRightPanelToggle:{type:"boolean"},showSecuritySchemeType:{type:"boolean"},showWebhookVerb:{type:"boolean"},showObjectSchemaExamples:{type:"boolean"},disableTryItRequestUrlEncoding:{type:"boolean"},sidebarLinks:Ih,sideNavStyle:{type:"string",enum:["summary-only","path-first","id-only","path-only"]},simpleOneOfTypeLabel:{type:"boolean"},sortEnumValuesAlphabetically:{type:"boolean"},sortOperationsAlphabetically:{type:"boolean"},sortPropsAlphabetically:{type:"boolean"},sortTagsAlphabetically:{type:"boolean"},suppressWarnings:{type:"boolean"},unstable_externalDescription:{type:"boolean"},unstable_ignoreMimeParameters:{type:"boolean"},untrustedDefinition:{type:"boolean"},showAccessMode:{type:"boolean"},preserveOriginalExtensionsName:{type:"boolean"},markdownHeadingsAnchorLevel:{type:"number"}},additionalProperties:!1};function Pi(e,t){return Object.fromEntries(t.filter(n=>n in e).map(n=>[n,e[n]]))}function Un(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>!t.includes(n)))}var Ie={type:"object",properties:{hide:{type:"boolean"}},additionalProperties:!1},td={type:"object",properties:{src:{type:"string"},async:{type:"boolean"},crossorigin:{type:"string"},defer:{type:"boolean"},fetchpriority:{type:"string"},integrity:{type:"string"},module:{type:"boolean"},nomodule:{type:"boolean"},nonce:{type:"string"},referrerpolicy:{type:"string"},type:{type:"string"}},required:["src"],additionalProperties:!0},Ks={type:"object",properties:{page:{type:"string"},directory:{type:"string"},disconnect:{type:"boolean",default:!1},group:{type:"string"},label:{type:"string"},href:{type:"string"},external:{type:"boolean"},labelTranslationKey:{type:"string"},groupTranslationKey:{type:"string"},icon:{oneOf:[{type:"string"},{type:"object",properties:{srcSet:{type:"string"}},required:["srcSet"]}]},separator:{type:"string"},separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"],default:"top"},version:{type:"string"},menuStyle:{type:"string",enum:["drilldown"]},expanded:{type:"string",const:"always"},selectFirstItemOnExpand:{type:"boolean"},flatten:{type:"boolean"},linkedSidebars:{type:"array",items:{type:"string"}},items:{type:"array",items:{type:"object",additionalProperties:!0}},rbac:{type:"object",additionalProperties:{type:"string"}}}},Gs={type:"array",items:Object.assign(Object.assign({},Ks),{properties:Object.assign(Object.assign({},Ks.properties),{items:{type:"array",items:Ks}})})},by={type:"object",properties:{name:{type:"string"},icon:{type:"string"},folder:{type:"string"}},additionalProperties:!1,required:["name","folder"]},vy={type:"object",properties:{hide:{type:"boolean",default:!1},suggestions:{default:[],type:"array",items:{type:"string"}},prompt:{type:"string"}},additionalProperties:!1},Cy={type:"array",items:{type:"object",required:["name","field","type"],properties:{name:{type:"string"},field:{type:"string"},type:{type:"string",enum:["multi-select","select","tags"]}},additionalProperties:!1}},Py={type:"object",properties:Object.assign({facets:Cy},Ie.properties),additionalProperties:!1},_y={type:"object",properties:{page:{type:"string"},label:{type:"string"},labelTranslationKey:{type:"string"}},required:["page"]},_i={type:"object",properties:{image:{type:"string"},srcSet:{type:"string"},altText:{type:"string"},link:{type:"string"},favicon:{type:"string"}},additionalProperties:!1},Di={type:"object",properties:Object.assign({items:Gs},Ie.properties),additionalProperties:!1},Ri={type:"object",additionalProperties:by},Si={type:"object",properties:Object.assign({items:Gs,copyrightText:{type:"string"},logo:Ie},Ie.properties),additionalProperties:!1},Ti={type:"object",properties:Object.assign({separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"],default:"bottom"}},Ie.properties),additionalProperties:!1},xi={type:"object",properties:{head:{type:"array",items:td},body:{type:"array",items:td}},additionalProperties:!1},wi={type:"array",items:{type:"object",properties:{href:{type:"string"},as:{type:"string"},crossorigin:{type:"string"},fetchpriority:{type:"string"},hreflang:{type:"string"},imagesizes:{type:"string"},imagesrcset:{type:"string"},integrity:{type:"string"},media:{type:"string"},prefetch:{type:"string"},referrerpolicy:{type:"string"},rel:{type:"string"},sizes:{type:"string"},title:{type:"string"},type:{type:"string"}},required:["href"],additionalProperties:!0}},ki={type:"object",properties:Object.assign({engine:{type:"string",enum:["flexsearch","typesense"],default:"flexsearch"},ai:vy,filters:Py,placement:{type:"string",default:"navbar"},shortcuts:{type:"array",items:{type:"string"},default:["/"]},suggestedPages:{type:"array",items:_y}},Ie.properties),additionalProperties:!1},Ai={type:"object",properties:Object.assign({ignoreDetection:{type:"boolean"},modes:{type:"array",items:{type:"string"},default:["light","dark"]}},Ie.properties),additionalProperties:!1},qi={type:"object",properties:{nextButton:{type:"object",properties:Object.assign({text:{type:"string",default:"Next page"}},Ie.properties),additionalProperties:!1,default:{}},previousButton:{type:"object",properties:Object.assign({text:{type:"string",default:"Previous page"}},Ie.properties),additionalProperties:!1,default:{}}},additionalProperties:!1},Ni={type:"object",properties:{elementFormat:{type:"string",default:"icon"},copy:{type:"object",properties:Object.assign({},Ie.properties),additionalProperties:!1,default:{hide:!1}},report:{type:"object",properties:Object.assign({tooltipText:{type:"string"},buttonText:{type:"string"},label:{type:"string"}},Ie.properties),additionalProperties:!1,default:{hide:!1}},expand:{type:"object",properties:Object.assign({},Ie.properties),additionalProperties:!1,default:{hide:!1}},collapse:{type:"object",properties:Object.assign({},Ie.properties),additionalProperties:!1,default:{hide:!1}}},additionalProperties:!1},Oi={type:"object",properties:{frontMatterKeysToResolve:{type:"array",items:{type:"string"},default:["image","links"]},partialsFolders:{type:"array",items:{type:"string"},default:["_partials"]},lastUpdatedBlock:{type:"object",properties:Object.assign({format:{type:"string",enum:["timeago","iso","long","short"],default:"timeago"},locale:{type:"string"}},Ie.properties),additionalProperties:!1,default:{}},toc:{type:"object",properties:Object.assign({header:{type:"string",default:"On this page"},depth:{type:"integer",default:3,minimum:1}},Ie.properties),additionalProperties:!1,default:{}},editPage:{type:"object",properties:Object.assign({baseUrl:{type:"string"}},Ie.properties),additionalProperties:!1,default:{}}},additionalProperties:!1,default:{}},Wn=Object.assign(Object.assign({},hi),{properties:Object.assign(Object.assign({},hi.properties),ed.properties)}),Dy={type:"object",properties:{includeInDevelopment:{type:"boolean"},scriptUrl:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["scriptUrl"]},Ry={type:"object",properties:{includeInDevelopment:{type:"boolean"},apiKey:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},outboundClickEventName:{type:"string"},pageViewEventName:{type:"string"},amplitudeConfig:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["apiKey"]},Sy={type:"object",properties:{includeInDevelopment:{type:"boolean"},orgId:{type:"string"}},additionalProperties:!1,required:["orgId"]},Ty={type:"object",properties:{includeInDevelopment:{type:"boolean"},appId:{type:"string"}},additionalProperties:!1,required:["appId"]},xy={type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},dataPlaneUrl:{type:"string"},controlPlaneUrl:{type:"string"},sdkUrl:{type:"string"},loadOptions:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["writeKey"]},wy={type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},includeTitleInPageCall:{type:"boolean"},host:{type:"string"}},additionalProperties:!1,required:["writeKey"]},ky={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},gtmAuth:{type:"string"},gtmPreview:{type:"string"},defaultDataLayer:{},dataLayerName:{type:"string"},enableWebVitalsTracking:{type:"boolean"},selfHostedOrigin:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["trackingId"]},Qs={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},optimizeId:{type:"string"},exclude:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["trackingId"]},Ay={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},optimizeId:{type:"string"},anonymizeIp:{type:"boolean"},cookieExpires:{type:"number"},trackers:{type:"object",additionalProperties:Qs}},additionalProperties:!1,required:["trackingId"]},Ei={type:"object",properties:{adobe:Dy,amplitude:Ry,fullstory:Sy,heap:Ty,rudderstack:xy,segment:wy,gtm:ky,ga:Ay}},Mi={type:"object",properties:Object.assign({items:{type:"array",items:{type:"object",properties:{label:{type:"string"},external:{type:"boolean"},link:{type:"string"},separatorLine:{type:"boolean"}},additionalProperties:!0},default:[]},hideLoginButton:{type:"boolean"}},Ie.properties),additionalProperties:!1},ji={type:"object",properties:{hide:{type:"boolean"},showForUnversioned:{type:"boolean"}}},Ii={type:"object",properties:{hide:{type:"boolean"},prefixItems:{type:"array",items:{type:"object",properties:{label:{type:"string"},labelTranslationKey:{type:"string"},page:{type:"string"}},additionalProperties:!1,default:{}}}},additionalProperties:!1},qy={type:"object",additionalProperties:!1,required:["title","property"],properties:{type:{type:"string",enum:["select","checkboxes","date-range"],default:"checkboxes"},title:{type:"string"},titleTranslationKey:{type:"string"},property:{type:"string"},parentFilter:{type:"string"},valuesMapping:{type:"object",additionalProperties:{type:"string"}},missingCategoryName:{type:"string"},missingCategoryNameTranslationKey:{type:"string"},options:{type:"array",items:{type:"string"}}}},Ny={type:"object",additionalProperties:!0,required:["slug","items"],properties:{slug:{type:"string"},filters:{type:"array",items:qy},groupByFirstFilter:{type:"boolean"},filterValuesCasing:{type:"string",enum:["sentence","original","lowercase","uppercase"]},items:Gs,requiredPermission:{type:"string"},separateVersions:{type:"boolean"},title:{type:"string"},titleTranslationKey:{type:"string"},description:{type:"string"},descriptionTranslationKey:{type:"string"}}},Li={type:"object",patternProperties:{".*":Ny}},Fi={type:"object",additionalProperties:!0,required:[],properties:{ignoreNonCompliant:{type:"boolean",default:!1},teamMetadataProperty:{type:"object",properties:{property:{type:"string"},label:{type:"string"},default:{type:"string"}}},levels:{type:"array",items:{type:"object",required:["name"],properties:{name:{type:"string"},color:{type:"string"},extends:{type:"array",items:{type:"string"}},rules:{type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]}}},additionalProperties:!1}},targets:{type:"array",items:{type:"object",required:["where"],properties:{minimumLevel:{type:"string"},rules:{type:"object",additionalProperties:!0},where:{type:"object",required:["metadata"],properties:{metadata:{type:"object",additionalProperties:{type:"string"}}},additionalProperties:!1}},additionalProperties:!1}},ignore:{type:"array",items:{type:"string"}}}};var tt={type:"object",properties:{imports:{type:"array",items:{type:"string"}},logo:_i,navbar:Di,products:Ri,footer:Si,sidebar:Ti,scripts:xi,links:wi,feedback:Xt,search:ki,colorMode:Ai,navigation:qi,codeSnippet:Ni,markdown:Oi,openapi:Wn,graphql:Fn,analytics:Ei,userMenu:Mi,versionPicker:ji,breadcrumbs:Ii,catalog:Li,scorecard:Fi},additionalProperties:!0},BD=Object.assign(Object.assign({},tt),{additionalProperties:!1});var Xs="https://redocly.com/sso/teams",Hn;(function(e){e.OIDC="OIDC",e.SAML2="SAML2"})(Hn||(Hn={}));var Bn;(function(e){e.SERVICE_ACCOUNT="SERVICE_ACCOUNT",e.OAUTH2="OAUTH2"})(Bn||(Bn={}));var Js;(function(e){e.STACKED="stacked",e.THREE_PANEL="three-panel"})(Js||(Js={}));function Ui(e,t){return Object.fromEntries(Object.entries(e).map(([n,r])=>{if(n!==t)return typeof r!="object"||!r?[n,r]:Array.isArray(r)?[n,r.map(i=>typeof i=="object"?Ui(i,t):i)]:[n,Ui(r,t)]}).filter(Boolean))}var Oy={type:"object",additionalProperties:{type:"string"}},Ey={type:"object",additionalProperties:!1,patternProperties:{"^[a-zA-Z0-9_-]+$":{type:"string",pattern:"^https?://[^\\s/$.?#].[^\\s]*$"}}},Wi={type:"string",enum:["error","warn","off"]},My={type:"object",additionalProperties:!1,properties:{schemaCheck:Wi,statusCodeCheck:Wi,contentTypeCheck:Wi,successCriteriaCheck:Wi}},jy={type:"object",properties:{event:{type:"string",enum:["schedule"]},interval:{type:"string",enum:["1m","2m","5m","10m","15m","30m","1h","3h","6h","12h","1d","7d"]}},required:["event"],additionalProperties:!1},Iy={type:"object",properties:{event:{type:"string",enum:["build"]}},required:["event"],additionalProperties:!1},nd={type:"object",properties:{ignoreLint:{oneOf:[{type:"boolean",default:!1},{type:"object",additionalProperties:{type:"boolean"}}]},ignoreLinkChecker:{type:"boolean"},ignoreMarkdocErrors:{type:"boolean"},jobs:{type:"array",items:{type:"object",properties:{path:{type:"string",pattern:"^(?!\\.\\./)(/[a-zA-Z0-9_\\-\\./]+|./[a-zA-Z0-9_\\-\\./]+|[a-zA-Z0-9_\\-\\./]+)$"},agent:{type:"string",enum:["respect"]},trigger:{oneOf:[jy,Iy]},inputs:Oy,servers:Ey,severity:My},required:["path","trigger","agent"],additionalProperties:!1}}},additionalProperties:!1};var Ly={type:"object",properties:{end_session_endpoint:{type:"string"},token_endpoint:{type:"string"},authorization_endpoint:{type:"string"},jwks_uri:{type:"string"}},required:["token_endpoint","authorization_endpoint"],additionalProperties:!0},Fy={type:"object",properties:{type:{type:"string",const:Hn.OIDC},title:{type:"string"},pkce:{type:"boolean",default:!1},configurationUrl:{type:"string",minLength:1},configuration:Ly,clientId:{type:"string",minLength:1},clientSecret:{type:"string",minLength:0},teamsClaimName:{type:"string"},teamsClaimMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}},scopes:{type:"array",items:{type:"string"}},tokenExpirationTime:{type:"number"},authorizationRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},tokenRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},audience:{type:"array",items:{type:"string"}}},required:["type","clientId"],oneOf:[{required:["configurationUrl"]},{required:["configuration"]}],additionalProperties:!1},Uy={type:"object",properties:{type:{type:"string",const:Hn.SAML2},title:{type:"string"},issuerId:{type:"string"},entityId:{type:"string"},ssoUrl:{type:"string"},x509PublicCert:{type:"string"},teamsAttributeName:{type:"string",default:Xs},teamsAttributeMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["type","issuerId","ssoUrl","x509PublicCert"]},Wy={oneOf:[Fy,Uy],discriminator:{propertyName:"type"}},Hy={type:"object",additionalProperties:Wy},By={oneOf:[{type:"array",items:{type:"string",enum:["REDOCLY","CORPORATE","GUEST"]},uniqueItems:!0},{type:"string",enum:["REDOCLY","CORPORATE","GUEST"]}]},zy={type:"object",properties:{to:{type:"string"},type:{type:"number",default:301}},additionalProperties:!1},Vy={type:"object",additionalProperties:zy,default:{}},id={type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]}},ta={type:"object",properties:{root:{type:"string"},output:{type:"string",pattern:"(.ya?ml|.json)$"},rbac:{type:"object",additionalProperties:!0},openapi:Wn,graphql:Fn,theme:{type:"object",properties:{openapi:Wn,graphql:Fn},additionalProperties:!1},title:{type:"string"},metadata:{type:"object",additionalProperties:!0},rules:id,decorators:{type:"object",additionalProperties:!0},preprocessors:{type:"object",additionalProperties:!0}},required:["root"]},$y={type:"object",additionalProperties:!0},Yy={type:"object",additionalProperties:{type:"object",additionalProperties:!0}},Ky={type:"object",properties:{title:{type:"string"},description:{type:"string"},siteUrl:{type:"string"},image:{type:"string"},keywords:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},lang:{type:"string"},jsonLd:{type:"object"},meta:{type:"array",items:{type:"object",properties:{name:{type:"string"},content:{type:"string"}},required:["name","content"],additionalProperties:!1}}},additionalProperties:!1},Gy={type:"object",properties:{folders:{type:"array",items:{type:"string"}}},additionalProperties:!1},bn={type:"object",additionalProperties:{type:"string"}},od={type:"object",properties:{teamNamePatterns:{type:"array",items:{type:"string"}},teamFolders:{type:"array",items:{type:"string"}},teamFoldersBaseRoles:bn,cms:bn,reunite:bn,features:{type:"object",properties:{aiSearch:bn},additionalProperties:!1},content:{type:"object",properties:{"**":bn},additionalProperties:bn}},additionalProperties:bn},Qy={type:"object",properties:{static:{type:"string"}},additionalProperties:!1,required:["static"]},Jy={type:"object",properties:{idp:{type:"string"}},additionalProperties:!1,required:["idp"]},Xy={type:"object",properties:{type:{type:"string",const:"GRAVITEE"},apiBaseUrl:{type:"string"},env:{type:"string"},allowApiProductsOutsideCatalog:{type:"boolean",default:!1},stage:{type:"string",default:"non-production"},auth:{oneOf:[Qy,Jy]}},additionalProperties:!1,required:["type","apiBaseUrl"]},Zy={type:"object",properties:{type:{type:"string",const:Bn.OAUTH2},tokenEndpoint:{type:"string"},clientId:{type:"string"},clientSecret:{type:"string"}},additionalProperties:!1,required:["type","tokenEndpoint","clientId","clientSecret"]},eb={type:"object",properties:{type:{type:"string",const:Bn.SERVICE_ACCOUNT},serviceAccountEmail:{type:"string"},serviceAccountPrivateKey:{type:"string"}},additionalProperties:!1,required:["type","serviceAccountEmail","serviceAccountPrivateKey"]},Zs={type:"object",properties:{type:{type:"string",const:"APIGEE_X"},apiUrl:{type:"string"},stage:{type:"string",default:"non-production"},organizationName:{type:"string"},ignoreApiProducts:{type:"array",items:{type:"string"}},allowApiProductsOutsideCatalog:{type:"boolean",default:!1},auth:{type:"object",oneOf:[Zy,eb],discriminator:{propertyName:"type"}}},additionalProperties:!1,required:["type","organizationName","auth"]},tb=Object.assign(Object.assign({},Zs),{properties:Object.assign(Object.assign({},Zs.properties),{type:{type:"string",const:"APIGEE_EDGE"}})}),nb={type:"object",oneOf:[Zs,tb,Xy],discriminator:{propertyName:"type"}},rb={type:"object",required:["adapters"],additionalProperties:!1,properties:{adapters:{type:"array",items:nb}}},rd={type:"object",properties:{defaultLocale:{type:"string"},locales:{type:"array",items:{type:"object",properties:{code:{type:"string"},name:{type:"string"}},required:["code"]}}},additionalProperties:!1,required:["defaultLocale"]},ib={type:"object",properties:{name:{type:"string"},value:{type:"string"}},additionalProperties:!1,required:["name","value"]},ea={type:"object",properties:{imports:{type:"array",items:{type:"string"}},licenseKey:{type:"string"},redirects:Vy,seo:Ky,rbac:od,apiFunctions:Gy,requiresLogin:{type:"boolean"},responseHeaders:{type:"object",additionalProperties:{type:"array",items:ib}},mockServer:{type:"object",properties:{off:{type:"boolean",default:!1},position:{type:"string",enum:["first","last","replace","off"],default:"first"},strictExamples:{type:"boolean",default:!1},errorIfForcedExampleNotFound:{type:"boolean",default:!1},description:{type:"string"}}},apis:{type:"object",additionalProperties:ta},rules:id,decorators:{type:"object",additionalProperties:!0},preprocessors:{type:"object",additionalProperties:!0},ssoDirect:Hy,sso:By,residency:{type:"string"},developerOnboarding:rb,removeAttribution:{type:"boolean"},i18n:rd,l10n:rd,metadata:$y,metadataGlobs:Yy,ignore:{type:"array",items:{type:"string"}},theme:tt,reunite:nd,logo:_i,navbar:Di,products:Ri,footer:Si,sidebar:Ti,scripts:xi,links:wi,feedback:Xt,search:ki,colorMode:Ai,navigation:qi,codeSnippet:Ni,markdown:Oi,openapi:Wn,graphql:Fn,analytics:Ei,userMenu:Mi,versionPicker:ji,breadcrumbs:Ii,catalog:Li,scorecard:Fi},default:{redirects:{}},additionalProperties:!0},ob=Object.assign(Object.assign({},Ui(ea,"default")),{additionalProperties:!1}),na=Object.assign(Object.assign({$id:"root-redocly-config"},ea),{properties:Object.assign(Object.assign({plugins:{type:"array",items:{type:"string"}}},ea.properties),{env:{type:"object",additionalProperties:ob}}),default:{},additionalProperties:!1});var ra={type:"object",properties:{logo:tt.properties.logo,navbar:tt.properties.navbar,footer:tt.properties.footer,sidebar:tt.properties.sidebar,search:tt.properties.search,codeSnippet:tt.properties.codeSnippet,breadcrumbs:tt.properties.breadcrumbs,openapi:tt.properties.openapi,feedback:tt.properties.feedback,analytics:{type:"object",properties:{ga:Qs}}},additionalProperties:!0,default:{}},sb={$id:"product-config-override",type:"object",properties:Object.assign(Object.assign({},ra.properties),{apis:{type:"object",additionalProperties:ta},theme:ra}),additionalProperties:!1};var Ke=Ge(an(),1);import{getLineColLocation as P_,lintDocument as __,makeDocumentFromString as Kc,lintConfig as D_,detectSpec as R_,getMergedConfig as S_,createConfigTypes as T_}from"@redocly/openapi-core";import{bundleDocument as y_,makeDocumentFromString as b_}from"@redocly/openapi-core";var lp=new Map,jo=new Map;function v_(e){return e?Array.from(e).map(([t,n])=>[t,Is(n)]):[]}async function $c(e,t){let{config:n}=await In(),r=new Ut(n.resolve),i=b_(e.getText(),e.uri),{bundle:o,problems:s,fileDependencies:u,rootType:c,refTypes:p}=await y_({document:i,config:n.styleguide,externalRefResolver:r}),g=v_(p);p&&(jo=new Map([...jo,...p])),lp.set(e.uri,{uri:e.uri,name:qn(e.uri),definition:o.parsed,rootType:c,refTypes:g,errors:t})}function C_(){return Array.from(lp).map(([e,{definition:t,rootType:n,refTypes:r,errors:i}])=>({name:qn(e),uri:e,definition:t,rootType:n,refTypes:r,errors:i}))}function Yc(e){return jo.has(e)?jo.get(e):null}var x_=800,w_=5,Qc=El(q_,x_);async function k_(e){let t=e.map(({documentPath:i})=>qe(i).toString()),{config:n}=await In(),r=await Me.getRootWorkspaceFolderURI();for(let{root:i}of Object.values(n.apis)){let o=await Ls(i,r);if(t.includes(o))return o}return t[0]}var Gc;function A_(e){try{return R_(e),!0}catch{return!1}}async function q_(e){let t=e.uri,{config:n,rootConfigDocument:r,configPath:i}=await In();if(br(An(t))){let o=Ys(t)?Kc(e.getText(),t):Kc(r.source.body,r.source.absoluteRef),s=new Ut,u=await D_({document:o,externalRefResolver:s,config:n,externalConfigTypes:T_(na,n)}),c=[{uri:e.uri,diagnostics:[]}];return dp(u,c),c}else{let o=Bl(t),s=await k_(o||[]);s&&(e=await st(s),t=s);let u;try{u=Kc(e.getText(),t)}catch{return[{uri:e.uri,diagnostics:[]}]}if(!A_(u.parsed))return[{uri:e.uri,diagnostics:[]}];let c=[];try{let p=new Ut(n.resolve);Gc=e.uri;let g=await Me.getRootWorkspaceFolderURI(),b=await jl(n.apis,Gc,g),D=Date.now(),R=(await __({document:u,config:S_(n,b).styleguide,externalRefResolver:p})).filter(({ignored:j})=>!j);Gc=null;let T=E_(R);$c(e,T);let q=Date.now()-D;c=[...new Set([e.uri,...[...p.getFiles()].map(j=>qe(j).toString())])].map(j=>({uri:j,diagnostics:[]})),Hl(t,{dependencyPaths:p.getFiles(),durationMS:q}),dp(R,c)}catch(p){N_(e.uri,p,c)}return c}}function Io(){return Me.documents.all().map(Qc)}function N_(e,t,n){let r=n||[{uri:e,diagnostics:[]}];if(t.line&&t.col&&t.message){let i=t.source?.absoluteRef?qe(t.source.absoluteRef).toString():e,o=t.line-1,s=t.col-1,u=Ke.Position.create(o,s),c=Ke.Diagnostic.create(Ke.Range.create(u,u),t.message,Ke.DiagnosticSeverity.Error);fp(i,c,r)}else t.message.includes("This doesn\u2019t look like an OpenAPI document")||console.error(t);return r}function fp(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 O_(e){return e.suggest.length===0?"":e.suggest.length===1?`
|
|
71
|
+
`);return n[0]}),this.registerRootWorkspaceFolderURIGetter(async()=>"")}registerFileSystemProvider(t){this._fs=t}registerDocumentsProvider(t){this._documentManager=t}registerConfigFinder(t){this._findConfig=t}registerRootWorkspaceFolderURIGetter(t){this._getRootWorkspaceFolderURI=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}get findConfig(){return this._findConfig}get getRootWorkspaceFolderURI(){return this._getRootWorkspaceFolderURI}enableScorecard(t){this._scorecardEnabled=t}get scorecardEnabled(){return this._scorecardEnabled}},qe=new as;function au(e,t){return de.resolvePath(Ne(e)).toString()===de.resolvePath(Ne(t)).toString()}function Ne(e){return Kt.parse(e)}function An(e){return Kt.parse(e).fsPath}function lr(e){let t=["https","http"],{scheme:n}=Kt.parse(e);return t.includes(n)}function qn(e){return de.basename(Ne(e))}async function cu(e,t="/"){let n=de.resolvePath(Ne(t));for(;e.path!=="/";)try{(await qe.fs.stat(de.resolvePath(n,e.path))).isDirectory()||(e=de.dirname(e));break}catch{e=de.dirname(e)}return e}import{BaseResolver as wh,Source as zl,readFileFromUrl as kh}from"@redocly/openapi-core";var di=Ge(mr(),1);import{isAbsoluteUrl as Sh}from"@redocly/openapi-core";function El(e,t=100,n=!1){let r=new Map,i=new Map;function o(u,c,p){let g=i.get(u.uri),b=g?Date.now()-g:0;try{b<t&&b>=0?r.set(u.uri,setTimeout(()=>o(u,c,p),t-b)):(r.delete(u.uri),i.delete(u.uri),n||c(e(u)))}catch(D){p(D)}}function s(u){let c=r.get(u.uri),p=n&&!c;return i.set(u.uri,Date.now()),new Promise((g,b)=>{c||r.set(u.uri,setTimeout(()=>o(u,g,b),t)),p&&g(e(u))})}return s}function js(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 Ml(e){return e==="$ref"}async function Ls(e,t){let n=Kt.parse(t);return de.joinPath(n,e).toString()}async function Il(e,t,n){for(let[r,{root:i}]of Object.entries(e))if(await Ls(i,n)===t)return r}function jl(e){return typeof e=="string"}function fi(e){return typeof e=="function"}function Ll(e){return e?.kind===di.Kind.MAP}function Fs(e){return e?.kind===di.Kind.MAPPING}function Us(e){return e?.kind===di.Kind.SEQ}function hr(e,t){let n=t.singleQuoted?"'":'"';return`${n}${e}${n}`}function Ws(e){return Sh(e)||e.startsWith("file://")}var pi=class e{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(e.isIncremental(r)){let i=Ul(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,g=Fl(r.text,!1,o);if(c-u===g.length)for(let D=0,R=g.length;D<R;D++)p[D+u+1]=g[D];else g.length<1e4?p.splice(u+1,c-u,...g):this._lineOffsets=p=p.slice(0,u+1).concat(g,p.slice(c+1));let b=r.text.length-(s-o);if(b!==0)for(let D=u+1+g.length,R=p.length;D<R;D++)p[D]=p[D]+b}else if(e.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=Fl(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}},gi;(function(e){function t(i,o,s,u){return new pi(i,o,s,u)}e.create=t;function n(i,o,s){if(i instanceof pi)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=Hs(o.map(Th),(g,b)=>{let D=g.range.start.line-b.range.start.line;return D===0?g.range.start.character-b.range.start.character:D}),c=0,p=[];for(let g of u){let b=i.offsetAt(g.range.start);if(b<c)throw new Error("Overlapping edit");b>c&&p.push(s.substring(c,b)),g.newText.length&&p.push(g.newText),c=i.offsetAt(g.range.end)}return p.push(s.substr(c)),p.join("")}e.applyEdits=r})(gi||(gi={}));function Hs(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Hs(r,t),Hs(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 Fl(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 Ul(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 Th(e){let t=Ul(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Wl=new Map;function Hl(e,t){return Wl.set(e,t)}function Bl(e){let t=[];for(let[n,r]of Wl.entries())r.dependencyPaths.has(e)&&t.push({documentPath:n,durationMS:r.durationMS});return t}async function st(e){let t=qe.documents.get(e);if(t)return t;let n=await qe.fs.readFile(Ne(e),"utf-8");return gi.create(e,"yaml",1,n)}function Bs(e){return us.filePattern.test(e)}function xh(e){return cs.filePattern.test(e)}var Ut=class extends wh{resolveExternalRef(t,n){return Ws(n)?n:t&&Ws(t)?new URL(n,t).href:t?de.resolvePath(de.dirname(Ne(t)),n).toString():n}async loadExternalRef(t){if(lr(t)){let{body:n,mimeType:r}=await kh(t,{...this.config.http,customFetch:fetch});return new zl(t,n,r)}return new zl(t,(await st(t)).getText())}};var yr,mi,zs,Vl;async function Vs(e){let t=new Ut,n=e?await qe.findConfig(e):void 0;return yr=await Ah({configPath:n,externalRefResolver:t,processRawConfig:async({document:r,resolvedRefMap:i})=>{zs=i,Vl=r}}),yr}async function jn(){return yr||await Vs(),{config:yr,configPath:mi,rootConfigDocument:Vl}}async function $l(e,t){try{return mi=e?await qe.findConfig(e):void 0,mi?await Vs(mi):yr}catch(n){return t?.createEventHandleLoadConfigError?.(n?.message),Vs()}}function br(e){return Ys(e)?!0:!!zs&&[...zs.keys()].map(n=>n.split("::")?.[1]?.split("#")[0]).some(n=>au(qn(e),n))}function Ys(e){return $s.includes(qn(e))}var Yl={hide:{type:"boolean",default:!1},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},label:{type:"string"},items:{type:"array",items:{type:"string"}}},vr={type:"object",properties:Yl,additionalProperties:!1},qh={type:"object",properties:{hide:{type:"boolean",default:!1},label:{type:"string"},placeholder:{type:"string"}},additionalProperties:!1},Xt={type:"object",properties:{hide:{type:"boolean",default:!1},type:{type:"string",enum:["rating","sentiment","comment","reasons","mood","scale"],default:"sentiment"},settings:{type:"object",properties:{label:{type:"string"},submitText:{type:"string"},buttonText:{type:"string"},component:{type:"string",enum:["radio","checkbox"],default:"checkbox"},items:{type:"array",items:{type:"string"},minItems:1},leftScaleLabel:{type:"string"},rightScaleLabel:{type:"string"},reasons:{type:"object",properties:Object.assign(Object.assign({},Yl),{like:vr,dislike:vr,satisfied:vr,neutral:vr,dissatisfied:vr}),additionalProperties:!1},comment:{type:"object",properties:{hide:{type:"boolean",default:!1},label:{type:"string"},likeLabel:{type:"string"},dislikeLabel:{type:"string"},satisfiedLabel:{type:"string"},neutralLabel:{type:"string"},dissatisfiedLabel:{type:"string"}},additionalProperties:!1},optionalEmail:qh},additionalProperties:!1}},additionalProperties:!1};var Ln={type:"object",properties:{includeByName:{type:"array",items:{type:"string"}},excludeByName:{type:"array",items:{type:"string"}}},additionalProperties:!1},Nh={type:"object",properties:{name:{type:"string"},items:Ln,queries:Ln,mutations:Ln,subscriptions:Ln,types:Ln,directives:Ln},required:["name"],additionalProperties:!1},Oh={type:"object",properties:{requireExactGroups:{type:"boolean"},groups:{type:"array",items:Nh},otherItemsGroupName:{type:"string"}},required:["requireExactGroups","groups","otherItemsGroupName"],additionalProperties:!1},Fn={type:"object",properties:{hidePaginationButtons:{type:"boolean"},menu:{type:"object",properties:Object.assign({},Oh.properties),additionalProperties:!1},sidebar:{type:"object",properties:{hide:{type:"boolean"}}},apiLogo:{type:"object",properties:{imageUrl:{type:"string"},href:{type:"string"},altText:{type:"string"},backgroundColor:{type:"string"}}},jsonSamplesDepth:{type:"number"},samplesMaxInlineArgs:{type:"number"},licenseKey:{type:"string"},fieldExpandLevel:{type:"number"},baseUrlPath:{type:"string"},feedback:Xt},additionalProperties:!1};var Eh={type:"object",properties:{languages:{type:"array",items:{type:"object",properties:{lang:{type:"string",examples:["curl","JavaScript","Node.js","Python","Java8+Apache","Java","C#","C#+Newtonsoft","PHP","Go","Ruby","R","Payload"]},label:{type:"string"},options:{type:"object",properties:{indent:{type:"string"},withImports:{type:"boolean"},withComments:{type:"boolean"},binary:{type:"boolean"},credentials:{type:"string",enum:["omit","same-origin","include"]}},additionalProperties:!1}},required:["lang"],additionalProperties:!1}},skipOptionalParameters:{type:"boolean"},withOAuth2Call:{type:"boolean"}},required:["languages"],additionalProperties:!1},Mh={type:"array",items:{type:"object",properties:{title:{type:"string"},url:{type:"string"}},required:["url"],additionalProperties:!1}},hi={type:"object",properties:{licenseKey:{type:"string"},hideLoading:{type:"boolean"},disableRouter:{type:"boolean"},hideSidebar:{type:"boolean"},feedback:Xt,hideReplay:{type:"boolean"},oAuth2RedirectURI:{type:"string",nullable:!0},corsProxyUrl:{type:"string"},sortRequiredPropsFirst:{type:"boolean"},sanitize:{type:"boolean"},hideDownloadButtons:{type:"boolean"},downloadUrls:Mh,onlyRequiredInSamples:{type:"boolean"},generatedSamplesMaxDepth:{oneOf:[{type:"number"},{type:"string"}]},showExtensions:{oneOf:[{type:"boolean"},{type:"string"},{type:"array",items:{type:"string"}}]},hideSchemaTitles:{type:"boolean"},jsonSamplesExpandLevel:{oneOf:[{type:"number"},{type:"string"}]},schemasExpansionLevel:{oneOf:[{type:"number"},{type:"string"}]},mockServer:{type:"object",properties:{url:{type:"string"},position:{type:"string",enum:["first","last","replace","off"]},description:{type:"string"}}},maxDisplayedEnumValues:{type:"number"},schemaDefinitionsTagName:{type:"string"},layout:{type:"string",enum:["stacked","three-panel"]},hideInfoMetadata:{type:"boolean"},events:{type:"object"},skipBundle:{type:"boolean"},routingBasePath:{type:"string"},codeSamples:Eh,ignoreNamedSchemas:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},hidePropertiesPrefix:{type:"boolean"},excludeFromSearch:{type:"boolean"}},additionalProperties:!1};var Ih={type:"object",properties:{label:{type:"string"},lang:{enum:["curl","C#","Go","Java","Java8+Apache","JavaScript","Node.js","PHP","Python","R","Ruby"]}},required:["lang"]},jh={type:"object",properties:{enum:{type:"string"},enumSingleValue:{type:"string"},enumArray:{type:"string"},default:{type:"string"},deprecated:{type:"string"},example:{type:"string"},examples:{type:"string"},nullable:{type:"string"},recursive:{type:"string"},arrayOf:{type:"string"},webhook:{type:"string"},authorizations:{type:"string"},tryItAuthBasicUsername:{type:"string"},tryItAuthBasicPassword:{type:"string"}}},Kl={type:"object",properties:{label:{type:"string"},link:{type:"string"},target:{type:"string"}},required:["label","link"]},Lh={type:"object",properties:{beforeInfo:{type:"array",items:Kl},end:{type:"array",items:Kl}}},yn={type:"object",properties:{main:{type:"string"},light:{type:"string"},dark:{type:"string"},contrastText:{type:"string"}}},yi={type:"object",properties:{backgroundColor:{type:"string"},borderColor:{type:"string"},color:{type:"string"},tabTextColor:{type:"string"}}},Fh={type:"object",properties:Pi(yn.properties,["light","dark"])},Uh={type:"object",properties:{basic:{type:"string"},delete:{type:"string"},get:{type:"string"},head:{type:"string"},link:{type:"string"},options:{type:"string"},patch:{type:"string"},post:{type:"string"},put:{type:"string"}}},Wh={type:"object",properties:{error:yi,info:yi,redirect:yi,success:yi}},Hh={type:"object",properties:Un(yn.properties,["dark"])},Bh={type:"object",properties:{primary:{type:"string"},secondary:{type:"string"},light:{type:"string"}}},zh={type:"object",properties:{accent:yn,border:Fh,error:yn,http:Uh,primary:yn,responses:Wh,secondary:Hh,success:yn,text:Bh,tonalOffset:{type:"number"},warning:yn}},bi={type:"object",properties:{fontSize:{type:"string"},padding:{type:"string"},minWidth:{type:"string"}}},Vh={type:"object",properties:{small:bi,medium:bi,large:bi,xlarge:bi}},kt={type:"object",properties:{fontFamily:{type:"string"},fontSize:{type:"string"},fontWeight:{type:"string"},lineHeight:{type:"string"}}},$h={type:"object",properties:Object.assign(Object.assign({},Un(kt.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},hoverStyle:{type:"string"},boxShadow:{type:"string"},hoverBoxShadow:{type:"string"},sizes:Vh})},Gl={type:"object",properties:Pi(kt.properties,["fontSize","lineHeight"])},Yh={type:"object",properties:{medium:Gl,small:Gl}},Kh={type:"object",properties:Object.assign(Object.assign({},Un(kt.properties,["fontSize","lineHeight"])),{borderRadius:{type:"string"},color:{type:"string"},sizes:Yh})},Gh={type:"object",properties:{top:{type:"string"},width:{type:"string"},height:{type:"string"}}},Qh={type:"object",properties:{borderRadius:{type:"string"},backgroundColor:{type:"string"}}},Ql={type:"object",properties:{fullWidth:{type:"boolean"}}},Jh={type:"object",properties:{buttons:$h,httpBadges:Kh,layoutControls:Gh,panels:Qh,tryItButton:Ql,tryItSendButton:Ql}},Ci={type:"object",properties:{small:{type:"string"},medium:{type:"string"},large:{type:"string"}}},Xh={type:"object",properties:{maxWidth:Ci}},Zh={type:"object",properties:{maxWidth:Ci,middlePanelMaxWidth:Ci}},ey={type:"object",properties:{showDarkRightPanel:{type:"boolean"},stacked:Xh,"three-panel":Zh}},Jl={type:"object",properties:{backgroundColor:{type:"string"},border:{type:"string"}}},ty={type:"object",properties:{breakFieldNames:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},constraints:Jl,defaultDetailsWidth:{type:"string"},examples:Jl,labelsTextSize:{type:"string"},linesColor:{type:"string"},nestedBackground:{type:"string"},nestingSpacing:{type:"string"},requireLabelColor:{type:"string"},typeNameColor:{type:"string"},typeTitleColor:{type:"string"}}},Zl={type:"object",properties:{subItemsColor:{type:"string"},textTransform:{type:"string"},fontWeight:{type:"string"}}},ny={type:"object",properties:Pi(Zl.properties,["textTransform"])},ry={type:"object",properties:{unit:{type:"number"},paddingHorizontal:{type:"string"},paddingVertical:{type:"string"},offsetTop:{type:"string"},offsetLeft:{type:"string"},offsetNesting:{type:"string"}}},iy={type:"object",properties:Object.assign(Object.assign({},Un(kt.properties,["fontWeight","lineHeight"])),{activeBgColor:{type:"string"},activeTextColor:{type:"string"},backgroundColor:{type:"string"},borderRadius:{type:"string"},breakPath:{type:"boolean"},caretColor:{type:"string"},caretSize:{type:"string"},groupItems:Zl,level1items:ny,rightLineColor:{type:"string"},separatorLabelColor:{type:"string"},showAtBreakpoint:{type:"string"},spacing:ry,textColor:{type:"string"},width:{type:"string"}})},vi={type:"object",properties:Object.assign(Object.assign({},kt.properties),{color:{type:"string"},transform:{type:"string"}})},oy={type:"object",properties:Object.assign(Object.assign({},kt.properties),{backgroundColor:{type:"string"},color:{type:"string"},wordBreak:{type:"string",enum:["break-all","break-word","keep-all","normal","revert","unset","inherit","initial"]},wrap:{type:"boolean"}})},sy={type:"object",properties:Un(kt.properties,["fontSize"])},ay={type:"object",properties:{color:{type:"string"},hover:{type:"string"},textDecoration:{type:"string"},hoverTextDecoration:{type:"string"},visited:{type:"string"}}},cy={type:"object",properties:Object.assign(Object.assign({code:oy,fieldName:kt},Pi(kt.properties,["fontSize","fontFamily"])),{fontWeightBold:{type:"string"},fontWeightLight:{type:"string"},fontWeightRegular:{type:"string"},heading1:vi,heading2:vi,heading3:vi,headings:sy,lineHeight:{type:"string"},links:ay,optimizeSpeed:{type:"boolean"},rightPanelHeading:vi,smoothing:{type:"string",enum:["auto","none","antialiased","subpixel-antialiased","grayscale"]}})},uy={type:"object",properties:Object.assign({color:{type:"string"}},Un(kt.properties,["fontWeight"]))},ly={type:"object",properties:{backgroundColor:{type:"string"},borderRadius:{type:"string"},tokens:uy}},dy={type:"object",properties:{gutter:{type:"string"},maxHeight:{type:"string"},maxWidth:{type:"string"}}},fy={type:"object",properties:{backgroundColor:{type:"string"},color:{type:"string"}}},Xl={type:"object",properties:{custom:{type:"string"}}},py={type:"object",properties:{DownloadButton:Xl,NextSectionButton:Xl}},gy={type:"object",properties:{backgroundColor:{type:"string"},panelBackgroundColor:{type:"string"},panelControlsBackgroundColor:{type:"string"},showAtBreakpoint:{type:"string"},textColor:{type:"string"},width:{type:"string"}}},my={type:"object",properties:{borderRadius:{type:"string"}}},hy={type:"object",properties:{sectionHorizontal:{type:"number"},sectionVertical:{type:"number"},unit:{type:"number"}}},yy={type:"object",properties:{breakpoints:Ci,codeBlock:ly,colors:zh,components:Jh,layout:ey,logo:dy,fab:fy,overrides:py,rightPanel:gy,schema:ty,shape:my,sidebar:iy,spacing:hy,typography:cy,links:{properties:{color:{type:"string"}}},codeSample:{properties:{backgroundColor:{type:"string"}}}}},by={type:"object",properties:{skipOptionalParameters:{type:"boolean"},languages:{type:"array",items:Ih}},required:["languages"]},ed={type:"object",properties:{theme:yy,ctrlFHijack:{type:"boolean"},defaultSampleLanguage:{type:"string"},disableDeepLinks:{type:"boolean"},disableSearch:{type:"boolean"},disableSidebar:{type:"boolean"},downloadDefinitionUrl:{type:"string"},expandDefaultServerVariables:{type:"boolean"},enumSkipQuotes:{type:"boolean"},expandDefaultRequest:{type:"boolean"},expandDefaultResponse:{type:"boolean"},expandResponses:{type:"string"},expandSingleSchemaField:{type:"boolean"},generateCodeSamples:by,generatedPayloadSamplesMaxDepth:{type:"number"},hideDownloadButton:{type:"boolean"},hideHostname:{type:"boolean"},hideInfoSection:{type:"boolean"},hideLogo:{type:"boolean"},hideRequestPayloadSample:{type:"boolean"},hideRightPanel:{type:"boolean"},hideSchemaPattern:{type:"boolean"},hideSingleRequestSampleTab:{type:"boolean"},hideSecuritySection:{type:"boolean"},hideTryItPanel:{type:"boolean"},hideFab:{type:"boolean"},hideOneOfDescription:{type:"boolean"},htmlTemplate:{type:"string"},jsonSampleExpandLevel:{oneOf:[{type:"number",minimum:1},{type:"string"}]},labels:jh,menuToggle:{type:"boolean"},nativeScrollbars:{type:"boolean"},noAutoAuth:{type:"boolean"},onDeepLinkClick:{type:"object"},pagination:{enum:["none","section","item"]},pathInMiddlePanel:{type:"boolean"},payloadSampleIdx:{type:"number",minimum:0},requestInterceptor:{type:"object"},requiredPropsFirst:{type:"boolean"},routingStrategy:{type:"string"},samplesTabsMaxCount:{type:"number"},schemaExpansionLevel:{oneOf:[{type:"number",minimum:0},{type:"string"}]},minCharacterLengthToInitSearch:{type:"number",minimum:1},maxResponseHeadersToShowInTryIt:{type:"number",minimum:0},scrollYOffset:{oneOf:[{type:"number"},{type:"string"}]},searchAutoExpand:{type:"boolean"},searchFieldLevelBoost:{type:"number",minimum:0},searchMaxDepth:{type:"number",minimum:1},searchMode:{type:"string",enum:["default","path-only"]},searchOperationTitleBoost:{type:"number"},searchTagTitleBoost:{type:"number"},sendXUserAgentInTryIt:{type:"boolean"},showChangeLayoutButton:{type:"boolean"},showConsole:{type:"boolean"},showNextButton:{type:"boolean"},showRightPanelToggle:{type:"boolean"},showSecuritySchemeType:{type:"boolean"},showWebhookVerb:{type:"boolean"},showObjectSchemaExamples:{type:"boolean"},disableTryItRequestUrlEncoding:{type:"boolean"},sidebarLinks:Lh,sideNavStyle:{type:"string",enum:["summary-only","path-first","id-only","path-only"]},simpleOneOfTypeLabel:{type:"boolean"},sortEnumValuesAlphabetically:{type:"boolean"},sortOperationsAlphabetically:{type:"boolean"},sortPropsAlphabetically:{type:"boolean"},sortTagsAlphabetically:{type:"boolean"},suppressWarnings:{type:"boolean"},unstable_externalDescription:{type:"boolean"},unstable_ignoreMimeParameters:{type:"boolean"},untrustedDefinition:{type:"boolean"},showAccessMode:{type:"boolean"},preserveOriginalExtensionsName:{type:"boolean"},markdownHeadingsAnchorLevel:{type:"number"}},additionalProperties:!1};function Pi(e,t){return Object.fromEntries(t.filter(n=>n in e).map(n=>[n,e[n]]))}function Un(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>!t.includes(n)))}var je={type:"object",properties:{hide:{type:"boolean"}},additionalProperties:!1},td={type:"object",properties:{src:{type:"string"},async:{type:"boolean"},crossorigin:{type:"string"},defer:{type:"boolean"},fetchpriority:{type:"string"},integrity:{type:"string"},module:{type:"boolean"},nomodule:{type:"boolean"},nonce:{type:"string"},referrerpolicy:{type:"string"},type:{type:"string"}},required:["src"],additionalProperties:!0},Ks={type:"object",properties:{page:{type:"string"},directory:{type:"string"},disconnect:{type:"boolean",default:!1},group:{type:"string"},label:{type:"string"},href:{type:"string"},external:{type:"boolean"},labelTranslationKey:{type:"string"},groupTranslationKey:{type:"string"},icon:{oneOf:[{type:"string"},{type:"object",properties:{srcSet:{type:"string"}},required:["srcSet"]}]},separator:{type:"string"},separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"],default:"top"},version:{type:"string"},menuStyle:{type:"string",enum:["drilldown"]},expanded:{type:"string",const:"always"},selectFirstItemOnExpand:{type:"boolean"},flatten:{type:"boolean"},linkedSidebars:{type:"array",items:{type:"string"}},items:{type:"array",items:{type:"object",additionalProperties:!0}},rbac:{type:"object",additionalProperties:{type:"string"}}}},Gs={type:"array",items:Object.assign(Object.assign({},Ks),{properties:Object.assign(Object.assign({},Ks.properties),{items:{type:"array",items:Ks}})})},vy={type:"object",properties:{name:{type:"string"},icon:{type:"string"},folder:{type:"string"}},additionalProperties:!1,required:["name","folder"]},Cy={type:"object",properties:{hide:{type:"boolean",default:!1},suggestions:{default:[],type:"array",items:{type:"string"}},prompt:{type:"string"}},additionalProperties:!1},Py={type:"array",items:{type:"object",required:["name","field","type"],properties:{name:{type:"string"},field:{type:"string"},type:{type:"string",enum:["multi-select","select","tags"]}},additionalProperties:!1}},_y={type:"object",properties:Object.assign({facets:Py},je.properties),additionalProperties:!1},Dy={type:"object",properties:{page:{type:"string"},label:{type:"string"},labelTranslationKey:{type:"string"}},required:["page"]},_i={type:"object",properties:{image:{type:"string"},srcSet:{type:"string"},altText:{type:"string"},link:{type:"string"},favicon:{type:"string"}},additionalProperties:!1},Di={type:"object",properties:Object.assign({items:Gs},je.properties),additionalProperties:!1},Ri={type:"object",additionalProperties:vy},Si={type:"object",properties:Object.assign({items:Gs,copyrightText:{type:"string"},logo:je},je.properties),additionalProperties:!1},Ti={type:"object",properties:Object.assign({separatorLine:{type:"boolean"},linePosition:{type:"string",enum:["top","bottom"],default:"bottom"}},je.properties),additionalProperties:!1},xi={type:"object",properties:{head:{type:"array",items:td},body:{type:"array",items:td}},additionalProperties:!1},wi={type:"array",items:{type:"object",properties:{href:{type:"string"},as:{type:"string"},crossorigin:{type:"string"},fetchpriority:{type:"string"},hreflang:{type:"string"},imagesizes:{type:"string"},imagesrcset:{type:"string"},integrity:{type:"string"},media:{type:"string"},prefetch:{type:"string"},referrerpolicy:{type:"string"},rel:{type:"string"},sizes:{type:"string"},title:{type:"string"},type:{type:"string"}},required:["href"],additionalProperties:!0}},ki={type:"object",properties:Object.assign({engine:{type:"string",enum:["flexsearch","typesense"],default:"flexsearch"},ai:Cy,filters:_y,placement:{type:"string",default:"navbar"},shortcuts:{type:"array",items:{type:"string"},default:["/"]},suggestedPages:{type:"array",items:Dy}},je.properties),additionalProperties:!1},Ai={type:"object",properties:Object.assign({ignoreDetection:{type:"boolean"},modes:{type:"array",items:{type:"string"},default:["light","dark"]}},je.properties),additionalProperties:!1},qi={type:"object",properties:{nextButton:{type:"object",properties:Object.assign({text:{type:"string",default:"Next page"}},je.properties),additionalProperties:!1,default:{}},previousButton:{type:"object",properties:Object.assign({text:{type:"string",default:"Previous page"}},je.properties),additionalProperties:!1,default:{}}},additionalProperties:!1},Ni={type:"object",properties:{elementFormat:{type:"string",default:"icon"},copy:{type:"object",properties:Object.assign({},je.properties),additionalProperties:!1,default:{hide:!1}},report:{type:"object",properties:Object.assign({tooltipText:{type:"string"},buttonText:{type:"string"},label:{type:"string"}},je.properties),additionalProperties:!1,default:{hide:!1}},expand:{type:"object",properties:Object.assign({},je.properties),additionalProperties:!1,default:{hide:!1}},collapse:{type:"object",properties:Object.assign({},je.properties),additionalProperties:!1,default:{hide:!1}}},additionalProperties:!1},Oi={type:"object",properties:{frontMatterKeysToResolve:{type:"array",items:{type:"string"},default:["image","links"]},partialsFolders:{type:"array",items:{type:"string"},default:["_partials"]},lastUpdatedBlock:{type:"object",properties:Object.assign({format:{type:"string",enum:["timeago","iso","long","short"],default:"timeago"},locale:{type:"string"}},je.properties),additionalProperties:!1,default:{}},toc:{type:"object",properties:Object.assign({header:{type:"string",default:"On this page"},depth:{type:"integer",default:3,minimum:1}},je.properties),additionalProperties:!1,default:{}},editPage:{type:"object",properties:Object.assign({baseUrl:{type:"string"}},je.properties),additionalProperties:!1,default:{}}},additionalProperties:!1,default:{}},Wn=Object.assign(Object.assign({},hi),{properties:Object.assign(Object.assign({},hi.properties),ed.properties)}),Ry={type:"object",properties:{includeInDevelopment:{type:"boolean"},scriptUrl:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["scriptUrl"]},Sy={type:"object",properties:{includeInDevelopment:{type:"boolean"},apiKey:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},outboundClickEventName:{type:"string"},pageViewEventName:{type:"string"},amplitudeConfig:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["apiKey"]},Ty={type:"object",properties:{includeInDevelopment:{type:"boolean"},orgId:{type:"string"}},additionalProperties:!1,required:["orgId"]},xy={type:"object",properties:{includeInDevelopment:{type:"boolean"},appId:{type:"string"}},additionalProperties:!1,required:["appId"]},wy={type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},dataPlaneUrl:{type:"string"},controlPlaneUrl:{type:"string"},sdkUrl:{type:"string"},loadOptions:{type:"object",additionalProperties:!0}},additionalProperties:!1,required:["writeKey"]},ky={type:"object",properties:{includeInDevelopment:{type:"boolean"},writeKey:{type:"string",minLength:10},trackPage:{type:"boolean"},includeTitleInPageCall:{type:"boolean"},host:{type:"string"}},additionalProperties:!1,required:["writeKey"]},Ay={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},gtmAuth:{type:"string"},gtmPreview:{type:"string"},defaultDataLayer:{},dataLayerName:{type:"string"},enableWebVitalsTracking:{type:"boolean"},selfHostedOrigin:{type:"string"},pageViewEventName:{type:"string"}},additionalProperties:!1,required:["trackingId"]},Qs={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},optimizeId:{type:"string"},exclude:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["trackingId"]},qy={type:"object",properties:{includeInDevelopment:{type:"boolean"},trackingId:{type:"string"},conversionId:{type:"string"},floodlightId:{type:"string"},head:{type:"boolean"},respectDNT:{type:"boolean"},exclude:{type:"array",items:{type:"string"}},optimizeId:{type:"string"},anonymizeIp:{type:"boolean"},cookieExpires:{type:"number"},trackers:{type:"object",additionalProperties:Qs}},additionalProperties:!1,required:["trackingId"]},Ei={type:"object",properties:{adobe:Ry,amplitude:Sy,fullstory:Ty,heap:xy,rudderstack:wy,segment:ky,gtm:Ay,ga:qy}},Mi={type:"object",properties:Object.assign({items:{type:"array",items:{type:"object",properties:{label:{type:"string"},external:{type:"boolean"},link:{type:"string"},separatorLine:{type:"boolean"}},additionalProperties:!0},default:[]},hideLoginButton:{type:"boolean"}},je.properties),additionalProperties:!1},Ii={type:"object",properties:{hide:{type:"boolean"},showForUnversioned:{type:"boolean"}}},ji={type:"object",properties:{hide:{type:"boolean"},prefixItems:{type:"array",items:{type:"object",properties:{label:{type:"string"},labelTranslationKey:{type:"string"},page:{type:"string"}},additionalProperties:!1,default:{}}}},additionalProperties:!1},Ny={type:"object",additionalProperties:!1,required:["title","property"],properties:{type:{type:"string",enum:["select","checkboxes","date-range"],default:"checkboxes"},title:{type:"string"},titleTranslationKey:{type:"string"},property:{type:"string"},parentFilter:{type:"string"},valuesMapping:{type:"object",additionalProperties:{type:"string"}},missingCategoryName:{type:"string"},missingCategoryNameTranslationKey:{type:"string"},options:{type:"array",items:{type:"string"}}}},Oy={type:"object",additionalProperties:!0,required:["slug","items"],properties:{slug:{type:"string"},filters:{type:"array",items:Ny},groupByFirstFilter:{type:"boolean"},filterValuesCasing:{type:"string",enum:["sentence","original","lowercase","uppercase"]},items:Gs,requiredPermission:{type:"string"},separateVersions:{type:"boolean"},title:{type:"string"},titleTranslationKey:{type:"string"},description:{type:"string"},descriptionTranslationKey:{type:"string"}}},Li={type:"object",patternProperties:{".*":Oy}},Fi={type:"object",additionalProperties:!0,required:[],properties:{ignoreNonCompliant:{type:"boolean",default:!1},teamMetadataProperty:{type:"object",properties:{property:{type:"string"},label:{type:"string"},default:{type:"string"}}},levels:{type:"array",items:{type:"object",required:["name"],properties:{name:{type:"string"},color:{type:"string"},extends:{type:"array",items:{type:"string"}},rules:{type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]}}},additionalProperties:!1}},targets:{type:"array",items:{type:"object",required:["where"],properties:{minimumLevel:{type:"string"},rules:{type:"object",additionalProperties:!0},where:{type:"object",required:["metadata"],properties:{metadata:{type:"object",additionalProperties:{type:"string"}}},additionalProperties:!1}},additionalProperties:!1}},ignore:{type:"array",items:{type:"string"}}}};var tt={type:"object",properties:{imports:{type:"array",items:{type:"string"}},logo:_i,navbar:Di,products:Ri,footer:Si,sidebar:Ti,scripts:xi,links:wi,feedback:Xt,search:ki,colorMode:Ai,navigation:qi,codeSnippet:Ni,markdown:Oi,openapi:Wn,graphql:Fn,analytics:Ei,userMenu:Mi,versionPicker:Ii,breadcrumbs:ji,catalog:Li,scorecard:Fi},additionalProperties:!0},YD=Object.assign(Object.assign({},tt),{additionalProperties:!1});var Xs="https://redocly.com/sso/teams",Hn;(function(e){e.OIDC="OIDC",e.SAML2="SAML2"})(Hn||(Hn={}));var Bn;(function(e){e.SERVICE_ACCOUNT="SERVICE_ACCOUNT",e.OAUTH2="OAUTH2"})(Bn||(Bn={}));var Js;(function(e){e.STACKED="stacked",e.THREE_PANEL="three-panel"})(Js||(Js={}));function Ui(e,t){return Object.fromEntries(Object.entries(e).map(([n,r])=>{if(n!==t)return typeof r!="object"||!r?[n,r]:Array.isArray(r)?[n,r.map(i=>typeof i=="object"?Ui(i,t):i)]:[n,Ui(r,t)]}).filter(Boolean))}var Ey={type:"object",additionalProperties:{type:"string"}},My={type:"object",additionalProperties:!1,patternProperties:{"^[a-zA-Z0-9_-]+$":{type:"string",pattern:"^https?://[^\\s/$.?#].[^\\s]*$"}}},Wi={type:"string",enum:["error","warn","off"]},Iy={type:"object",additionalProperties:!1,properties:{schemaCheck:Wi,statusCodeCheck:Wi,contentTypeCheck:Wi,successCriteriaCheck:Wi}},jy={type:"object",properties:{event:{type:"string",enum:["schedule"]},interval:{type:"string",enum:["1m","2m","5m","10m","15m","30m","1h","3h","6h","12h","1d","7d"]}},required:["event"],additionalProperties:!1},Ly={type:"object",properties:{event:{type:"string",enum:["build"]}},required:["event"],additionalProperties:!1},nd={type:"object",properties:{ignoreLint:{oneOf:[{type:"boolean",default:!1},{type:"object",additionalProperties:{type:"boolean"}}]},ignoreLinkChecker:{type:"boolean"},ignoreMarkdocErrors:{type:"boolean"},jobs:{type:"array",items:{type:"object",properties:{path:{type:"string",pattern:"^(?!\\.\\./)(/[a-zA-Z0-9_\\-\\./]+|./[a-zA-Z0-9_\\-\\./]+|[a-zA-Z0-9_\\-\\./]+)$"},agent:{type:"string",enum:["respect"]},trigger:{oneOf:[jy,Ly]},inputs:Ey,servers:My,severity:Iy},required:["path","trigger","agent"],additionalProperties:!1}}},additionalProperties:!1};var Fy={type:"object",properties:{end_session_endpoint:{type:"string"},token_endpoint:{type:"string"},authorization_endpoint:{type:"string"},jwks_uri:{type:"string"}},required:["token_endpoint","authorization_endpoint"],additionalProperties:!0},Uy={type:"object",properties:{type:{type:"string",const:Hn.OIDC},title:{type:"string"},pkce:{type:"boolean",default:!1},configurationUrl:{type:"string",minLength:1},configuration:Fy,clientId:{type:"string",minLength:1},clientSecret:{type:"string",minLength:0},teamsClaimName:{type:"string"},teamsClaimMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}},scopes:{type:"array",items:{type:"string"}},tokenExpirationTime:{type:"number"},authorizationRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},tokenRequestCustomParams:{type:"object",additionalProperties:{type:"string"}},audience:{type:"array",items:{type:"string"}}},required:["type","clientId"],oneOf:[{required:["configurationUrl"]},{required:["configuration"]}],additionalProperties:!1},Wy={type:"object",properties:{type:{type:"string",const:Hn.SAML2},title:{type:"string"},issuerId:{type:"string"},entityId:{type:"string"},ssoUrl:{type:"string"},x509PublicCert:{type:"string"},teamsAttributeName:{type:"string",default:Xs},teamsAttributeMap:{type:"object",additionalProperties:{type:"string"}},defaultTeams:{type:"array",items:{type:"string"}}},additionalProperties:!1,required:["type","issuerId","ssoUrl","x509PublicCert"]},Hy={oneOf:[Uy,Wy],discriminator:{propertyName:"type"}},By={type:"object",additionalProperties:Hy},zy={oneOf:[{type:"array",items:{type:"string",enum:["REDOCLY","CORPORATE","GUEST"]},uniqueItems:!0},{type:"string",enum:["REDOCLY","CORPORATE","GUEST"]}]},Vy={type:"object",properties:{to:{type:"string"},type:{type:"number",default:301}},additionalProperties:!1},$y={type:"object",additionalProperties:Vy,default:{}},id={type:"object",additionalProperties:{oneOf:[{type:"string"},{type:"object"}]}},ta={type:"object",properties:{root:{type:"string"},output:{type:"string",pattern:"(.ya?ml|.json)$"},rbac:{type:"object",additionalProperties:!0},openapi:Wn,graphql:Fn,theme:{type:"object",properties:{openapi:Wn,graphql:Fn},additionalProperties:!1},title:{type:"string"},metadata:{type:"object",additionalProperties:!0},rules:id,decorators:{type:"object",additionalProperties:!0},preprocessors:{type:"object",additionalProperties:!0}},required:["root"]},Yy={type:"object",additionalProperties:!0},Ky={type:"object",additionalProperties:{type:"object",additionalProperties:!0}},Gy={type:"object",properties:{title:{type:"string"},description:{type:"string"},siteUrl:{type:"string"},image:{type:"string"},keywords:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"}]},lang:{type:"string"},jsonLd:{type:"object"},meta:{type:"array",items:{type:"object",properties:{name:{type:"string"},content:{type:"string"}},required:["name","content"],additionalProperties:!1}}},additionalProperties:!1},Qy={type:"object",properties:{folders:{type:"array",items:{type:"string"}}},additionalProperties:!1},bn={type:"object",additionalProperties:{type:"string"}},od={type:"object",properties:{teamNamePatterns:{type:"array",items:{type:"string"}},teamFolders:{type:"array",items:{type:"string"}},teamFoldersBaseRoles:bn,cms:bn,reunite:bn,features:{type:"object",properties:{aiSearch:bn},additionalProperties:!1},content:{type:"object",properties:{"**":bn},additionalProperties:bn}},additionalProperties:bn},Jy={type:"object",properties:{static:{type:"string"}},additionalProperties:!1,required:["static"]},Xy={type:"object",properties:{idp:{type:"string"}},additionalProperties:!1,required:["idp"]},Zy={type:"object",properties:{type:{type:"string",const:"GRAVITEE"},apiBaseUrl:{type:"string"},env:{type:"string"},allowApiProductsOutsideCatalog:{type:"boolean",default:!1},stage:{type:"string",default:"non-production"},auth:{oneOf:[Jy,Xy]}},additionalProperties:!1,required:["type","apiBaseUrl"]},eb={type:"object",properties:{type:{type:"string",const:Bn.OAUTH2},tokenEndpoint:{type:"string"},clientId:{type:"string"},clientSecret:{type:"string"}},additionalProperties:!1,required:["type","tokenEndpoint","clientId","clientSecret"]},tb={type:"object",properties:{type:{type:"string",const:Bn.SERVICE_ACCOUNT},serviceAccountEmail:{type:"string"},serviceAccountPrivateKey:{type:"string"}},additionalProperties:!1,required:["type","serviceAccountEmail","serviceAccountPrivateKey"]},Zs={type:"object",properties:{type:{type:"string",const:"APIGEE_X"},apiUrl:{type:"string"},stage:{type:"string",default:"non-production"},organizationName:{type:"string"},ignoreApiProducts:{type:"array",items:{type:"string"}},allowApiProductsOutsideCatalog:{type:"boolean",default:!1},auth:{type:"object",oneOf:[eb,tb],discriminator:{propertyName:"type"}}},additionalProperties:!1,required:["type","organizationName","auth"]},nb=Object.assign(Object.assign({},Zs),{properties:Object.assign(Object.assign({},Zs.properties),{type:{type:"string",const:"APIGEE_EDGE"}})}),rb={type:"object",oneOf:[Zs,nb,Zy],discriminator:{propertyName:"type"}},ib={type:"object",required:["adapters"],additionalProperties:!1,properties:{adapters:{type:"array",items:rb}}},rd={type:"object",properties:{defaultLocale:{type:"string"},locales:{type:"array",items:{type:"object",properties:{code:{type:"string"},name:{type:"string"}},required:["code"]}}},additionalProperties:!1,required:["defaultLocale"]},ob={type:"object",properties:{name:{type:"string"},value:{type:"string"}},additionalProperties:!1,required:["name","value"]},ea={type:"object",properties:{imports:{type:"array",items:{type:"string"}},licenseKey:{type:"string"},redirects:$y,seo:Gy,rbac:od,apiFunctions:Qy,requiresLogin:{type:"boolean"},responseHeaders:{type:"object",additionalProperties:{type:"array",items:ob}},mockServer:{type:"object",properties:{off:{type:"boolean",default:!1},position:{type:"string",enum:["first","last","replace","off"],default:"first"},strictExamples:{type:"boolean",default:!1},errorIfForcedExampleNotFound:{type:"boolean",default:!1},description:{type:"string"}}},apis:{type:"object",additionalProperties:ta},rules:id,decorators:{type:"object",additionalProperties:!0},preprocessors:{type:"object",additionalProperties:!0},ssoDirect:By,sso:zy,residency:{type:"string"},developerOnboarding:ib,removeAttribution:{type:"boolean"},i18n:rd,l10n:rd,metadata:Yy,metadataGlobs:Ky,ignore:{type:"array",items:{type:"string"}},theme:tt,reunite:nd,logo:_i,navbar:Di,products:Ri,footer:Si,sidebar:Ti,scripts:xi,links:wi,feedback:Xt,search:ki,colorMode:Ai,navigation:qi,codeSnippet:Ni,markdown:Oi,openapi:Wn,graphql:Fn,analytics:Ei,userMenu:Mi,versionPicker:Ii,breadcrumbs:ji,catalog:Li,scorecard:Fi},default:{redirects:{}},additionalProperties:!0},sb=Object.assign(Object.assign({},Ui(ea,"default")),{additionalProperties:!1}),na=Object.assign(Object.assign({$id:"root-redocly-config"},ea),{properties:Object.assign(Object.assign({plugins:{type:"array",items:{type:"string"}}},ea.properties),{env:{type:"object",additionalProperties:sb}}),default:{},additionalProperties:!1});var ra={type:"object",properties:{logo:tt.properties.logo,navbar:tt.properties.navbar,footer:tt.properties.footer,sidebar:tt.properties.sidebar,search:tt.properties.search,codeSnippet:tt.properties.codeSnippet,breadcrumbs:tt.properties.breadcrumbs,openapi:tt.properties.openapi,feedback:tt.properties.feedback,analytics:{type:"object",properties:{ga:Qs}}},additionalProperties:!0,default:{}},ab={$id:"product-config-override",type:"object",properties:Object.assign(Object.assign({},ra.properties),{apis:{type:"object",additionalProperties:ta},theme:ra}),additionalProperties:!1};var Ke=Ge(an(),1);import{getLineColLocation as R_,lintDocument as S_,makeDocumentFromString as Kc,lintConfig as T_,detectSpec as x_,getMergedConfig as w_,createConfigTypes as k_}from"@redocly/openapi-core";import{bundleDocument as b_,makeDocumentFromString as v_}from"@redocly/openapi-core";var lp=new Map,Io=new Map;function C_(e){return e?Array.from(e).map(([t,n])=>[t,js(n)]):[]}async function $c(e,t){let{config:n}=await jn(),r=new Ut(n.resolve),i=v_(e.getText(),e.uri),{bundle:o,problems:s,fileDependencies:u,rootType:c,refTypes:p}=await b_({document:i,config:n.styleguide,externalRefResolver:r}),g=C_(p);p&&(Io=new Map([...Io,...p])),lp.set(e.uri,{uri:e.uri,name:qn(e.uri),definition:o.parsed,rootType:c,refTypes:g,errors:t})}function P_(){return Array.from(lp).map(([e,{definition:t,rootType:n,refTypes:r,errors:i}])=>({name:qn(e),uri:e,definition:t,rootType:n,refTypes:r,errors:i}))}function Yc(e){return Io.has(e)?Io.get(e):null}import{createConfig as __,lintDocument as D_}from"@redocly/openapi-core";async function dp(e,t,n,r){let i=[];for(let o of n?.levels||[]){let s=await __(o,{configPath:r}),u=await D_({document:e,externalRefResolver:t,config:s.styleguide});i.push(...u.filter(({ignored:c})=>!c).map(c=>({...c,scorecardLevel:o.name})))}return i}var A_=800,q_=5,Qc=El(E_,A_);async function N_(e){let t=e.map(({documentPath:i})=>Ne(i).toString()),{config:n}=await jn(),r=await qe.getRootWorkspaceFolderURI();for(let{root:i}of Object.values(n.apis)){let o=await Ls(i,r);if(t.includes(o))return o}return t[0]}var Gc;function O_(e){try{return x_(e),!0}catch{return!1}}async function E_(e){let t=e.uri,{config:n,rootConfigDocument:r,configPath:i}=await jn();if(br(An(t))){let o=Ys(t)?Kc(e.getText(),t):Kc(r?.source.body||"",r?.source.absoluteRef||""),s=new Ut,u=await T_({document:o,externalRefResolver:s,config:n,externalConfigTypes:k_(na,n)}),c=[{uri:e.uri,diagnostics:[]}];return fp(u,c),c}else{let o=Bl(t),s=await N_(o||[]);s&&(e=await st(s),t=s);let u;try{u=Kc(e.getText(),t)}catch{return[{uri:e.uri,diagnostics:[]}]}if(!O_(u.parsed))return[{uri:e.uri,diagnostics:[]}];let c=[];try{let p=new Ut(n.resolve);Gc=e.uri;let g=await qe.getRootWorkspaceFolderURI(),b=await Il(n.apis,Gc,g),D=Date.now(),R=(await S_({document:u,config:w_(n,b).styleguide,externalRefResolver:p})).filter(({ignored:N})=>!N),T=r?.parsed?.scorecard,q=T&&qe.scorecardEnabled?await dp(u,p,T,i):[],B=[...R,...q];Gc="";let j=L_(R);$c(e,j);let _=Date.now()-D;c=[...new Set([e.uri,...[...p.getFiles()].map(N=>Ne(N).toString())])].map(N=>({uri:N,diagnostics:[]})),Hl(t,{dependencyPaths:p.getFiles(),durationMS:_}),fp(B,c)}catch(p){M_(e.uri,p,c)}return c}}function jo(){return qe.documents.all().map(Qc)}function M_(e,t,n){let r=n||[{uri:e,diagnostics:[]}];if(t.line&&t.col&&t.message){let i=t.source?.absoluteRef?Ne(t.source.absoluteRef).toString():e,o=t.line-1,s=t.col-1,u=Ke.Position.create(o,s),c=Ke.Diagnostic.create(Ke.Range.create(u,u),t.message,Ke.DiagnosticSeverity.Error);pp(i,c,r)}else t.message.includes("This doesn\u2019t look like an OpenAPI document")||console.error(t);return r}function pp(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 I_(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 dp(e,t){e.forEach(n=>{let r;switch(n.severity){case"error":r=Ke.DiagnosticSeverity.Error;break;case"warn":r=Ke.DiagnosticSeverity.Warning;break;default:r=Ke.DiagnosticSeverity.Warning}let i=P_(n.location[0]),o=qe(i.source.absoluteRef).toString(),s=Ke.Position.create(i.start.line-1,i.start.col-1),u=i.end?Ke.Position.create(i.end.line-1,i.end.col-1):s,c=n.message+O_(n),p=Ke.Diagnostic.create(Ke.Range.create(s,u),c,r,void 0,"Redocly OpenAPI");fp(o,p,t)})}function E_(e){return e.filter(({severity:t})=>t==="error").map(t=>({...t,location:t.location.map(n=>({...n,source:{...n.source,_ast:null}}))}))}var Yo=Ge(an(),1);var Pe=Ge(an(),1);function Ae(e,t){return e?t?Lo[e+"_"+t]||t:Lo[e]||Lo.Default:Lo.Default}var M_=["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"],Lo=M_.reduce((e,t,n)=>(e[t]=String.fromCharCode(n),e),{});var cn="newItem",Hr="propertyName",ir="newLine";function Fo(e){return!!(e?.name&&pp[e.name])}function Jc(e){return pp[e]||[]}var pp={[ir]:[{label:"newLine",kind:Pe.CompletionItemKind.Constructor,data:{},sortText:Ae(ir)}],[Hr]:[{label:Hr,kind:Pe.CompletionItemKind.Constructor,data:{properties:{}},sortText:Ae(Hr)}],ServerVariable_Map:[{label:"newVariableName",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("ServerVariable_Map")}],ResponsesMap:[{label:"200",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"201",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"204",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"301",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"303",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"400",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"401",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"403",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"404",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"500",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"503",kind:Pe.CompletionItemKind.Property,data:{properties:{}}}],PathMap:[{label:"/newPath",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("PathMap")}],MediaTypeMap:[{label:"mime/type",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"application/json",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"application/octet-stream",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"multipart/form-data",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"application/x-www-form-urlencoded",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"application/xml",kind:Pe.CompletionItemKind.Property,data:[],sortText:Ae("MediaTypeMap")}]};var un=Ge(mr(),1);import{normalizeTypes as mp,Oas3Types as j_,Oas2Types as I_,Oas3_1Types as gp,AsyncApi2Types as L_,SpecVersion as rt,ConfigTypes as F_,getMajorSpecVersion as U_,Arazzo1Types as W_,AsyncApi3Types as H_}from"@redocly/openapi-core";var Xc=new Map;async function B_(e,t){let n=await st(e),r=n.getText(),i=un.safeLoad(r,{filename:e.toString()}),{nodePath:o}=Uo({node:i,nodePath:[]},t,n,!0),s=Zc(i,e),{version:u}=eu(i),{currentType:c,parentType:p,endPath:g}=Wo(s,o),b=Br(i),D=c?.name?c:p;return{nodePath:o,endPath:g,type:D,existingValues:b,types:s,descriptionVersion:u}}function hp(e,t){if(!e)return null;let n=e,r=!0;return t.forEach(i=>{if(r=!1,Us(n)&&n.items&&n.items[i])n=n.items[i],r=!0;else if(Ll(n)){let o=Ho(n);for(let s of o)if(Fs(s)&&s.key?.value===i){n=s?.value,r=!0;break}}}),r?n:(console.warn("Cannot find node by path",t),null)}function z_(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 Uo(e,t,n,r=!1){let{node:i,nodePath:o=[]}=e,s=n.offsetAt(t),u=Ho(i);if(u.length===0||V_(i)||!r&&$_(i,n,t))return e;let c=Y_(u,s);return Uo({nodePath:K_(o,i,u[c],c),node:u[c]},t,n,r)}function V_(e){return e?.kind===un.Kind.MAPPING&&!e?.value}function $_(e,t,n){let r=t.getText({start:t.positionAt(t._lineOffsets[n.line]),end:n}),i=G_(e,t),o=r?.match(/^\s+/)?.[0]?.length||0;return(/^\s*[\w\-\$\/\{\}]+$/.test(r)?o:n.character)===i}function Y_(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 K_(e,t,n,r){return Us(t)?[...e,r]:Fs(n)&&n?.key?.value&&typeof n.key.value=="string"?[...e,n.key.value]:e}function G_(e,t){let n=e?.startPosition??0,r=z_(n,t._lineOffsets);if(r>=0){let i=t._lineOffsets[r];return n-i}return 0}function Wo(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],fi(c)&&(c=c(null,s));else if(e?.additionalProperties&&!fi(e?.additionalProperties))c=e.additionalProperties;else if(fi(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 Zc(e,t){if(br(t))return mp(F_).ConfigRoot;let{types:n,isDefault:r}=J_(e);if(!e)return n;let i=r?Yc(t):n;return r&&!Yc(t)&&e?null:i||n}function Q_(e){if(Xc.has(e))return Xc.get(e);let t=mp(X_(e)).Root;return Xc.set(e,t),t}function yp(e){let t,n=!1;if(e?.kind===un.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=rt.OAS3_1;break}if(i==="openapi"&&o.startsWith("3.0")){t=rt.OAS3_0;break}if(i==="swagger"&&o==="2.0"){t=rt.OAS2;break}if(i==="asyncapi"&&o.startsWith("2."))return{version:rt.Async2,isDefault:!1};if(i==="asyncapi"&&o.startsWith("3."))return{version:rt.Async3,isDefault:!1};if(i==="arazzo")return{version:rt.Arazzo1,isDefault:!1}}return t||(t=rt.OAS3_1,n=!0),{version:t,isDefault:n}}function eu(e){let{version:t,isDefault:n}=yp(e);return{version:U_(t),isDefault:n}}function J_(e){let{version:t,isDefault:n}=yp(e);return{types:Q_(t),isDefault:n}}function Ho(e){switch(e?.kind){case un.Kind.MAPPING:return[e.key,e.value];case un.Kind.MAP:return e.mappings;case un.Kind.SEQ:return e?.items;default:return[]}}function X_(e){switch(e){case rt.OAS3_1:return gp;case rt.OAS3_0:return j_;case rt.OAS2:return I_;case rt.Async2:return L_;case rt.Async3:return H_;case rt.Arazzo1:return W_;default:return gp}}function Br(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:Il(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},Br(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},Br(o?.value||o,t[o?.key?.value||i],n+1)),i++}return t}import{mapTypeToComponent as bp}from"@redocly/openapi-core";var tu={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 vp(e){let t=tu[e.name];return t&&t.forEach(n=>{e.properties[n.name]=n.value}),e}var Bo=Ge(an(),1),Rt=class{constructor({kind:t,label:n,value:r,textEdit:i,filterText:o,sortText:s,data:u}){this.kind=t||Bo.CompletionItemKind.Value,this.label=n;let{node:c,lineOffset:p,position:g}=u;this.insertText=r??n,this.filterText=o||this.insertText,this.sortText=s,this.textEdit=i||(c.value==null?void 0:this.getTextEdit(c,g,p))}getTextEdit(t,n,r){let i=t.startPosition-r,o=t.singleQuoted||t.doubleQuoted?2:0,s=i+t.value.length+o;return Bo.TextEdit.replace({start:{line:n.line,character:i},end:{line:n.line,character:s}},this.insertText)}};var or=Ge(an(),1),Tn=class{constructor({kind:t,label:n,insertText:r,insertTextFormat:i,filterText:o,sortText:s,data:u}){this.insertTextFormat=i||n.includes("$")?or.InsertTextFormat.PlainText:or.InsertTextFormat.Snippet,this.kind=t||or.CompletionItemKind.Property,this.label=n,this.data=u||{},this.insertText=r??n,this.filterText=o||this.insertText,this.sortText=s,this.command=this.kind===or.CompletionItemKind.Property?{title:"Suggested values",command:"editor.action.triggerSuggest"}:null}};var zr={example:"example",default:"default",enum:"enum",ref:"$ref"},zo=[zr.default,zr.example];var Dp=Ge(mr(),1);var Oe={};ou(Oe,{default:()=>_p.default});ss(Oe,Ge(nu()));var _p=Ge(nu());function e0(e,t){let n=t.slice(0,t.length-1),{currentType:r}=Wo(e,n);if(r?.name){let[i]=tu[r.name]||[];return i?.value}return null}function t0(e,t){let n=t[t.length-1];if(Ml(n))return e0(e,t);let{currentType:r}=Wo(e,t);return Fo(r)?r:r?r?.name&&(r?.name.includes("Map")||r?.name.includes("Named"))?{name:Hr,properties:{}}:r:null}async function Rp(e,t){let n=await st(e),r=n.getText(),i=(0,Dp.safeLoad)(r,{filename:e}),{node:o,nodePath:s}=Uo({node:i,nodePath:[]},t,n),u=Zc(i,e),c=t0(u,s),p=n._lineOffsets[t.line],g=n.getText({start:n.positionAt(p),end:t});return{currentAst:i,node:o,nodePath:s,position:t,lineText:g,lineOffset:p,openApiType:c}}async function Sp(e,t){let n=de.resolvePath(qe(e)),r=de.dirname(n),i=await cu(de.joinPath(r,t),r.path),o=de.resolvePath(r,i.path);return{refPath:t,refDirPath:i,refDirAbsolutePath:o,isAbsolutePath:t&&(0,Oe.isAbsolute)(t),docAbsolutePath:n,docAbsoluteDirPath:r,root:"/"}}var Tp=Ge(an(),1);var Vo=class extends Rt{constructor(t){super(t),this.kind=Tp.CompletionItemKind.Folder,this.command={title:"Complete path",command:"editor.action.triggerSuggest",arguments:[]}}};var xp=Ge(an(),1);var $o=class extends Rt{constructor(t){super(t),this.kind=xp.CompletionItemKind.File}};var r0=Me.supportedLanguages.concat({languageId:"markdown",filePattern:/\.md$/});function i0(e){let{refPath:t,docAbsoluteDirPath:n,isAbsolutePath:r,root:i}=e,o=(0,Oe.resolve)(n.path,t,".."),s=r?o:(0,Oe.relative)(n.path,o),u=s&&s!==i?"/":"";return{name:"../",type:1,matchBy:t,sortBy:Ae("FolderCompletion"),value:`${s}${u}`}}async function o0(e,t,n){let r=[],{refDirAbsolutePath:i,docAbsolutePath:o}=n;for(let s of e)try{let u=de.resolvePath(i,s),c=await Me.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 wp(e,t){let{docAbsoluteDirPath:n,isAbsolutePath:r,refDirAbsolutePath:i,root:o,refPath:s}=t,u=[];return i.path!==o&&u.push(i0(t)),u.concat(e.map(({name:c,type:p})=>{let g=(0,Oe.resolve)(i.path,c),b=(0,Oe.relative)(n.path,g),D=s.includes(Oe.sep)?s.slice(0,s.lastIndexOf(Oe.sep)+1):s+Oe.sep,R=r?g:b;if(p===0)return{type:p,name:c,value:R,sortBy:`${Ae("FileCompletion")}${c}`,matchBy:`${D}${c}`};let T=`${c}/`;return{type:p,name:T,value:`${R}${b?"/":""}`,sortBy:`${Ae("FolderCompletion")}${c}`,matchBy:`${D}${c}`}}))}function kp(e,t){let{node:n,lineOffset:r,position:i}=t;return e.map(o=>{let{name:s,value:u,matchBy:c,sortBy:p,type:g}=o,b={label:s,filterText:hr(c,n),sortText:p,value:u,data:{lineOffset:r,position:i,node:n}};return g===1?new Vo(b):new $o(b)})}async function Ap(e,t){let{node:n}=t,r=n.value??"",i=await Sp(e,r),{refDirAbsolutePath:o}=i,s=[];try{s=await Me.fs.readDir(o)}catch{return kp(wp([],i),t)}let u=await o0(s,{supportedFiles:r0},i);return kp(wp(u,i),t)}import{isEmptyObject as s0}from"@redocly/openapi-core";function qp(e,t){if(t?.items)return"- "+qp(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 a0(e,t,n,r){if(e===cn)return"";if(r?.items||r?.required){let i=`
|
|
74
|
+
- ${e.suggest.slice(0,q_).join(`
|
|
75
|
+
- `)}`}function j_(e){return e.scorecardLevel?`
|
|
76
|
+
Scorecard level: ${e.scorecardLevel}`:""}function fp(e,t){e.forEach(n=>{let r;switch(n.severity){case"error":r=Ke.DiagnosticSeverity.Error;break;case"warn":r=Ke.DiagnosticSeverity.Warning;break;default:r=Ke.DiagnosticSeverity.Warning}let i=R_(n.location[0]),o=Ne(i.source.absoluteRef).toString(),s=Ke.Position.create(i.start.line-1,i.start.col-1),u=i.end?Ke.Position.create(i.end.line-1,i.end.col-1):s,c=n.message+` Rule: ${n.ruleId}.`+I_(n)+j_(n),p=Ke.Diagnostic.create(Ke.Range.create(s,u),c,r,void 0,"Redocly OpenAPI");pp(o,p,t)})}function L_(e){return e.filter(({severity:t})=>t==="error").map(t=>({...t,location:t.location.map(n=>({...n,source:{...n.source,_ast:null}}))}))}var Yo=Ge(an(),1);var Pe=Ge(an(),1);function Ae(e,t){return e?t?Lo[e+"_"+t]||t:Lo[e]||Lo.Default:Lo.Default}var F_=["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"],Lo=F_.reduce((e,t,n)=>(e[t]=String.fromCharCode(n),e),{});var cn="newItem",Hr="propertyName",ir="newLine";function Fo(e){return!!(e?.name&&gp[e.name])}function Jc(e){return gp[e]||[]}var gp={[ir]:[{label:"newLine",kind:Pe.CompletionItemKind.Constructor,data:{},sortText:Ae(ir)}],[Hr]:[{label:Hr,kind:Pe.CompletionItemKind.Constructor,data:{properties:{}},sortText:Ae(Hr)}],ServerVariable_Map:[{label:"newVariableName",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("ServerVariable_Map")}],ResponsesMap:[{label:"200",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"201",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"204",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"301",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"303",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"400",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"401",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"403",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"404",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"500",kind:Pe.CompletionItemKind.Property,data:{properties:{}}},{label:"503",kind:Pe.CompletionItemKind.Property,data:{properties:{}}}],PathMap:[{label:"/newPath",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("PathMap")}],MediaTypeMap:[{label:"mime/type",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"application/json",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"application/octet-stream",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"multipart/form-data",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"application/x-www-form-urlencoded",kind:Pe.CompletionItemKind.Property,data:{properties:{}},sortText:Ae("MediaTypeMap")},{label:"application/xml",kind:Pe.CompletionItemKind.Property,data:[],sortText:Ae("MediaTypeMap")}]};var un=Ge(mr(),1);import{normalizeTypes as hp,Oas3Types as U_,Oas2Types as W_,Oas3_1Types as mp,AsyncApi2Types as H_,SpecVersion as rt,ConfigTypes as B_,getMajorSpecVersion as z_,Arazzo1Types as V_,AsyncApi3Types as $_}from"@redocly/openapi-core";var Xc=new Map;async function Y_(e,t){let n=await st(e),r=n.getText(),i=un.safeLoad(r,{filename:e.toString()}),{nodePath:o}=Uo({node:i,nodePath:[]},t,n,!0),s=Zc(i,e),{version:u}=eu(i),{currentType:c,parentType:p,endPath:g}=Wo(s,o),b=Br(i),D=c?.name?c:p;return{nodePath:o,endPath:g,type:D,existingValues:b,types:s,descriptionVersion:u}}function yp(e,t){if(!e)return null;let n=e,r=!0;return t.forEach(i=>{if(r=!1,Us(n)&&n.items&&n.items[i])n=n.items[i],r=!0;else if(Ll(n)){let o=Ho(n);for(let s of o)if(Fs(s)&&s.key?.value===i){n=s?.value,r=!0;break}}}),r?n:(console.warn("Cannot find node by path",t),null)}function K_(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 Uo(e,t,n,r=!1){let{node:i,nodePath:o=[]}=e,s=n.offsetAt(t),u=Ho(i);if(u.length===0||G_(i)||!r&&Q_(i,n,t))return e;let c=J_(u,s);return Uo({nodePath:X_(o,i,u[c],c),node:u[c]},t,n,r)}function G_(e){return e?.kind===un.Kind.MAPPING&&!e?.value}function Q_(e,t,n){let r=t.getText({start:t.positionAt(t._lineOffsets[n.line]),end:n}),i=Z_(e,t),o=r?.match(/^\s+/)?.[0]?.length||0;return(/^\s*[\w\-\$\/\{\}]+$/.test(r)?o:n.character)===i}function J_(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 X_(e,t,n,r){return Us(t)?[...e,r]:Fs(n)&&n?.key?.value&&typeof n.key.value=="string"?[...e,n.key.value]:e}function Z_(e,t){let n=e?.startPosition??0,r=K_(n,t._lineOffsets);if(r>=0){let i=t._lineOffsets[r];return n-i}return 0}function Wo(e,t){let n=e,r,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],fi(c)&&(c=c(null,s));else if(e?.additionalProperties&&!fi(e?.additionalProperties))c=e.additionalProperties;else if(fi(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 Zc(e,t){if(br(t))return hp(B_).ConfigRoot;let{types:n,isDefault:r}=t0(e);if(!e)return n;let i=r?Yc(t):n;return r&&!Yc(t)&&e?null:i||n}function e0(e){if(Xc.has(e))return Xc.get(e);let t=hp(n0(e)).Root;return Xc.set(e,t),t}function bp(e){let t,n=!1;if(e?.kind===un.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=rt.OAS3_1;break}if(i==="openapi"&&o.startsWith("3.0")){t=rt.OAS3_0;break}if(i==="swagger"&&o==="2.0"){t=rt.OAS2;break}if(i==="asyncapi"&&o.startsWith("2."))return{version:rt.Async2,isDefault:!1};if(i==="asyncapi"&&o.startsWith("3."))return{version:rt.Async3,isDefault:!1};if(i==="arazzo")return{version:rt.Arazzo1,isDefault:!1}}return t||(t=rt.OAS3_1,n=!0),{version:t,isDefault:n}}function eu(e){let{version:t,isDefault:n}=bp(e);return{version:z_(t),isDefault:n}}function t0(e){let{version:t,isDefault:n}=bp(e);return{types:e0(t),isDefault:n}}function Ho(e){switch(e?.kind){case un.Kind.MAPPING:return[e.key,e.value];case un.Kind.MAP:return e.mappings;case un.Kind.SEQ:return e?.items;default:return[]}}function n0(e){switch(e){case rt.OAS3_1:return mp;case rt.OAS3_0:return U_;case rt.OAS2:return W_;case rt.Async2:return H_;case rt.Async3:return $_;case rt.Arazzo1:return V_;default:return mp}}function Br(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:jl(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},Br(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},Br(o?.value||o,t[o?.key?.value||i],n+1)),i++}return t}import{mapTypeToComponent as vp}from"@redocly/openapi-core";var tu={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 Cp(e){let t=tu[e.name];return t&&t.forEach(n=>{e.properties[n.name]=n.value}),e}var Bo=Ge(an(),1),Rt=class{constructor({kind:t,label:n,value:r,textEdit:i,filterText:o,sortText:s,data:u}){this.kind=t||Bo.CompletionItemKind.Value,this.label=n;let{node:c,lineOffset:p,position:g}=u;this.insertText=r??n,this.filterText=o||this.insertText,this.sortText=s,this.textEdit=i||(c?.value&&g&&p?this.getTextEdit(c,g,p):void 0)}getTextEdit(t,n,r){let i=t.startPosition-r,o=t.singleQuoted||t.doubleQuoted?2:0,s=i+t.value.length+o;return Bo.TextEdit.replace({start:{line:n.line,character:i},end:{line:n.line,character:s}},this.insertText)}};var or=Ge(an(),1),Tn=class{constructor({kind:t,label:n,insertText:r,insertTextFormat:i,filterText:o,sortText:s,data:u}){this.insertTextFormat=i||n.includes("$")?or.InsertTextFormat.PlainText:or.InsertTextFormat.Snippet,this.kind=t||or.CompletionItemKind.Property,this.label=n,this.data=u||{},this.insertText=r??n,this.filterText=o||this.insertText,this.sortText=s,this.command=this.kind===or.CompletionItemKind.Property?{title:"Suggested values",command:"editor.action.triggerSuggest"}:void 0}};var zr={example:"example",default:"default",enum:"enum",ref:"$ref"},zo=[zr.default,zr.example];var Rp=Ge(mr(),1);var Ee={};ou(Ee,{default:()=>Dp.default});ss(Ee,Ge(nu()));var Dp=Ge(nu());function i0(e,t){let n=t.slice(0,t.length-1),{currentType:r}=Wo(e,n);if(r?.name){let[i]=tu[r.name]||[];return i?.value}return null}function o0(e,t){let n=t[t.length-1];if(Ml(n))return i0(e,t);let{currentType:r}=Wo(e,t);return r?Fo(r)?r:r?.name&&(r?.name.includes("Map")||r?.name.includes("Named"))?{name:Hr,properties:{}}:r:null}async function Sp(e,t){let n=await st(e),r=n.getText(),i=(0,Rp.safeLoad)(r,{filename:e}),{node:o,nodePath:s}=Uo({node:i,nodePath:[]},t,n),u=Zc(i,e),c=o0(u,s),p=n._lineOffsets[t.line],g=n.getText({start:n.positionAt(p),end:t});return{currentAst:i,node:o,nodePath:s,position:t,lineText:g,lineOffset:p,openApiType:c}}async function Tp(e,t){let n=de.resolvePath(Ne(e)),r=de.dirname(n),i=await cu(de.joinPath(r,t),r.path),o=de.resolvePath(r,i.path);return{refPath:t,refDirPath:i,refDirAbsolutePath:o,isAbsolutePath:t?(0,Ee.isAbsolute)(t):!1,docAbsolutePath:n,docAbsoluteDirPath:r,root:"/"}}var xp=Ge(an(),1);var Vo=class extends Rt{constructor(t){super(t),this.kind=xp.CompletionItemKind.Folder,this.command={title:"Complete path",command:"editor.action.triggerSuggest",arguments:[]}}};var wp=Ge(an(),1);var $o=class extends Rt{constructor(t){super(t),this.kind=wp.CompletionItemKind.File}};var a0=qe.supportedLanguages.concat({languageId:"markdown",filePattern:/\.md$/});function c0(e){let{refPath:t,docAbsoluteDirPath:n,isAbsolutePath:r,root:i}=e,o=(0,Ee.resolve)(n.path,t,".."),s=r?o:(0,Ee.relative)(n.path,o),u=s&&s!==i?"/":"";return{name:"../",type:1,matchBy:t,sortBy:Ae("FolderCompletion"),value:`${s}${u}`}}async function u0(e,t,n){let r=[],{refDirAbsolutePath:i,docAbsolutePath:o}=n;for(let s of e)try{let u=de.resolvePath(i,s),c=await qe.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 kp(e,t){let{docAbsoluteDirPath:n,isAbsolutePath:r,refDirAbsolutePath:i,root:o,refPath:s}=t,u=[];return i.path!==o&&u.push(c0(t)),u.concat(e.map(({name:c,type:p})=>{let g=(0,Ee.resolve)(i.path,c),b=(0,Ee.relative)(n.path,g),D=s.includes(Ee.sep)?s.slice(0,s.lastIndexOf(Ee.sep)+1):s+Ee.sep,R=r?g:b;if(p===0)return{type:p,name:c,value:R,sortBy:`${Ae("FileCompletion")}${c}`,matchBy:`${D}${c}`};let T=`${c}/`;return{type:p,name:T,value:`${R}${b?"/":""}`,sortBy:`${Ae("FolderCompletion")}${c}`,matchBy:`${D}${c}`}}))}function Ap(e,t){let{node:n,lineOffset:r,position:i}=t;return e.map(o=>{let{name:s,value:u,matchBy:c,sortBy:p,type:g}=o,b={label:s,filterText:hr(c,n),sortText:p,value:u,data:{lineOffset:r,position:i,node:n}};return g===1?new Vo(b):new $o(b)})}async function qp(e,t){let{node:n}=t,r=n.value??"",i=await Tp(e,r),{refDirAbsolutePath:o}=i,s=[];try{s=await qe.fs.readDir(o)}catch{return Ap(kp([],i),t)}let u=await u0(s,{supportedFiles:a0},i);return Ap(kp(u,i),t)}import{isEmptyObject as l0}from"@redocly/openapi-core";function Np(e,t){if(t?.items)return"- "+Np(e,t.items);if(t?.required)return Object.values(t.required).map((n,r)=>`${n}: \${${r+1}}`).join(`
|
|
77
|
+
`);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===cn)return"";if(r?.items||r?.required){let i=`
|
|
77
78
|
`;return n.includes(`
|
|
78
79
|
`)&&(i+=" "),i}return n.includes(`
|
|
79
|
-
`)||!t?"":" "}function
|
|
80
|
-
`:e?.includes(":")&&!e?.includes(": ")?" ":""}function
|
|
80
|
+
`)||!t?"":" "}function f0(e){return e===cn?"":": "}function p0(e){return e?.includes(":")||e?.includes(": ")?`
|
|
81
|
+
`:e?.includes(":")&&!e?.includes(": ")?" ":""}function g0(e,t){return!t||l0(t)?"":e.includes(`
|
|
81
82
|
`)?`
|
|
82
83
|
`:`
|
|
83
84
|
`}function Vr(e,t,n=!0){if(e===ir)return`
|
|
84
|
-
`;let r=
|
|
85
|
+
`;let r=p0(t?.lineText),i=f0(e),o=e===cn?"":e,s=Np(e,t),u=d0(e,s,r,t),c=n?g0(r,t?.properties):" ";return`${r}${o}${i}${u}${s}${c}`}function m0(e,t){let{version:n}=eu(e),r=vp(t,n);if(!r)return[];let i=yp(e,["components",r]);return i?(Ho(i.value||i)||[]).map(({key:{value:s}})=>`#/components/${r}/${s}`):[]}function h0(e){let{node:t,position:n,lineOffset:r}=e,i=zo.includes(t.key?.value)?t:zo.includes(t.parent?.key?.value)?t.parent:null;return i?i?.parent?.mappings?.find(({key:s})=>s?.value===zr.enum)?.value?.items?.map(({value:s})=>new Rt({label:s,data:{node:t,position:n,lineOffset:r}}))||[]:[]}async function y0(e,t){let{position:n,openApiType:r,currentAst:i,lineOffset:o,node:s}=t,u=r?.name?m0(i,r.name):[];return[...await qp(e,t),...u.map(p=>{let g=hr(p,s);return new Rt({label:p,filterText:hr(p,s),value:g,sortText:`${Ae("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?t.enum.map(o=>new Rt({label:o,kind:Yo.CompletionItemKind.EnumMember,data:{node:n,position:r,lineOffset:i}})):[]}function v0(e,t){let{node:n,position:r,lineOffset:i}=t;return["true","false"].map(o=>new Rt({label:o,data:{node:n,position:r,lineOffset:i}}))}function C0(e){let{currentAst:t,nodePath:n,node:r,openApiType:i,lineText:o}=e,s=_0(t,n,r);return D0(i,s,o)}async function P0(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&&zr.ref===o?y0(e,t):zo.includes(o)?h0(t):i?.enum?b0(t):i?.type==="boolean"?v0(e,t):[]}async function Op(e,t){let n=await Sp(e,t);return n.openApiType?.properties?C0(n):P0(e,n)}function _0(e,t,n){if(!e)return[];let i=Br(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 D0(e,t,n){if(!e)return[];if(Cp(e),Fo(e))return Jc(e?.name).filter(r=>!t.includes(r.label)).map(r=>new Tn({...r,insertText:Vr(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 Tn({label:i,kind:Yo.CompletionItemKind.Property,insertText:Vr(i,o,!o?.items),sortText:Ae(e?.name,i)})});return n.endsWith(":")&&r.push(...Jc(ir).map(i=>new Tn({...i,insertText:Vr(i.label,{...i.data,lineText:n})}))),r}return e.items&&Object.keys(e.items).length?[new Tn({label:cn,kind:Yo.CompletionItemKind.Constructor,insertText:Vr(cn,{...e,lineText:n}),sortText:Ae(cn)})]:[]}var Vt=Ge(Vc(),1);var ln=Ge(mr(),1);import{getAstNodeByPointer as R0}from"@redocly/openapi-core";async function S0({position:e,textDocument:t,value:n,line:r,document:i}){let[o,s]=n.split("#/"),u=r.indexOf(n),c=u+n.length;if(e.character>=u&&u!==-1){let p=o?de.joinPath(de.dirname(Kt.parse(i.uri)),o).toString():t.uri,g;try{g=await st(p)}catch{return}let b=(0,ln.safeLoad)(g.getText(),{filename:An(p)}),D=R0(b,`#/${s}`,!0),R=Vt.Range.create(g.positionAt(D?.startPosition||0),g.positionAt(D?.endPosition||0));return[Vt.LocationLink.create(p,Vt.Range.create(0,0,g.lineCount,0),R,Vt.Range.create(Vt.Position.create(e.line,u),Vt.Position.create(e.line,c)))]}}async function Ep({position:e,textDocument:t}){let n;try{n=await st(t.uri)}catch{return}let o=n.getText().split(/\r\n|[\n\r]/g)[e.line],s=(0,ln.safeLoad)(o,{filename:An(t.uri)}),u;switch(s.kind){case ln.Kind.SCALAR:{u=s.parent||{value:{value:s?.value}};break}case ln.Kind.MAP:{u=s?.mappings?.[0];break}case ln.Kind.SEQ:{let p=s?.items?.[0];u=p?.kind===ln.Kind.MAP?p?.mappings?.[0]:{value:{value:p?.value}};break}default:u=null}let c=u?.value?.value;if(c&&!lr(c))return S0({position:e,textDocument:t,value:c,line:o,document:n})}var T0=(t=>(t[t.FILE_TYPE_NOT_SUPPORTED=0]="FILE_TYPE_NOT_SUPPORTED",t))(T0||{});var Mp=class{async onCompletion(t){let{uri:n}=t.textDocument;return Bs(n)?[]:Op(n,t.position)}async onCompletionResolve(t){return t}async validateOpenAPI(t){return Qc(t)}async onDidChangeWatchedFiles(t){if(t.changes.find(r=>$s.some(i=>r.uri.endsWith(i))))return jo()}async onDidConfigChange(t){return await $l(t),jo()}async onDidChangeConfiguration(){return jo()}async onDefinition(t){let{uri:n}=t.textDocument;return Bs(n)?[]:await Ep(t)||[]}};export{T0 as ContextErrorCodes,Mp as OpenapiLanguageServer,$c as bundleOpenAPI,P_ as getBundles,jn as getConfigData,Y_ as getContextData,st as getDocumentByURI,br as isConfigFile,lr as isHttpPath,xh as isYamlFile,qe as languageServerConfig,Ne as parseUri,js as removeCirculars,jo as revalidateAllDocuments,$l as updateOpenAPIConfigByURI,An as uriToAbsFSPath};
|