File: C:/Users/fred/.vscode/extensions/docker.docker-0.18.0-win32-x64/dist/extension.js
(()=>{var e={4147:(e,t,n)=>{e.exports=n(6263)},6263:(e,t,n)=>{e.exports=function(){var e=function(){function e(e,t,n,i){void 0===i&&(i=new Date),this.type=n,this.message=e,this.metadata=t,this.timestamp=i}return e.prototype.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},e}(),t=["navigation","request","process","log","user","state","error","manual"],i=function(e,t,n){for(var i=n,r=0,o=e.length;r<o;r++)i=t(i,e[r],r,e);return i},r=function(e,t){return i(e,(function(e,n,i,r){return t(n,i,r)?e.concat(n):e}),[])},o=function(e,t){return i(e,(function(e,n,i,r){return!0===e||n===t}),!1)},s=function(e){return"[object Array]"===Object.prototype.toString.call(e)},a=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(e){var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);if(!a)return n;for(var i=0,r=c.length;i<r;i++)Object.prototype.hasOwnProperty.call(e,c[i])&&n.push(c[i]);return n},l=function(e,t){return void 0===e&&(e=1),void 0===t&&(t=1/0),function(n){return"number"==typeof n&&parseInt(""+n,10)===n&&n>=e&&n<=t}},d=function(e){return"function"==typeof e||s(e)&&r(e,(function(e){return"function"==typeof e})).length===e.length},h=function(e){return"string"==typeof e&&!!e.length},g={};g.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:h},appVersion:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||h(e)}},appType:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||h(e)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledErrorTypes:{defaultValue:function(){return{unhandledExceptions:!0,unhandledRejections:!0}},message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(e){if("object"!=typeof e||!e)return!1;var t=u(e),n=u({unhandledExceptions:!0,unhandledRejections:!0});return!(r(t,(function(e){return o(n,e)})).length<t.length||r(u(e),(function(t){return"boolean"!=typeof e[t]})).length>0)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:d},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:d},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:d},endpoints:{defaultValue:function(e){return void 0===e?{notify:"https://notify.bugsnag.com",sessions:"https://sessions.bugsnag.com"}:{notify:null,sessions:null}},message:"should be an object containing endpoint URLs { notify, sessions }",validate:function(e){return e&&"object"==typeof e&&h(e.notify)&&h(e.sessions)&&0===r(u(e),(function(e){return!o(["notify","sessions"],e)})).length}},autoTrackSessions:{defaultValue:function(e){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(e){return null===e||s(e)&&r(e,(function(e){return"string"==typeof e})).length===e.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(e){return"string"==typeof e&&e.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:"should be a number ≤100",validate:function(e){return l(0,100)(e)}},enabledBreadcrumbTypes:{defaultValue:function(){return t},message:"should be null or a list of available breadcrumb types ("+t.join(",")+")",validate:function(e){return null===e||s(e)&&i(e,(function(e,n){return!1===e?e:o(t,n)}),!0)}},context:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||"string"==typeof e}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(e){return null===e||e&&i(u(e),(function(e,t){return e&&o(["id","email","name"],t)}),!0)}},metadata:{defaultValue:function(){return{}},message:"should be an object",validate:function(e){return"object"==typeof e&&null!==e}},logger:{defaultValue:function(){},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(e){return!e||e&&i(["debug","info","warn","error"],(function(t,n){return t&&"function"==typeof e[n]}),!0)}},redactedKeys:{defaultValue:function(){return["password"]},message:"should be an array of strings|regexes",validate:function(e){return s(e)&&e.length===r(e,(function(e){return"string"==typeof e||e&&"function"==typeof e.test})).length}},plugins:{defaultValue:function(){return[]},message:"should be an array of plugin objects",validate:function(e){return s(e)&&e.length===r(e,(function(e){return e&&"object"==typeof e&&"function"==typeof e.load})).length}},featureFlags:{defaultValue:function(){return[]},message:'should be an array of objects that have a "name" property',validate:function(e){return s(e)&&e.length===r(e,(function(e){return e&&"object"==typeof e&&"string"==typeof e.name})).length}},reportUnhandledPromiseRejectionsAsHandled:{defaultValue:function(){return!1},message:"should be true|false",validate:function(e){return!0===e||!1===e}},sendPayloadChecksums:{defaultValue:function(){return!1},message:"should be true|false",validate:function(e){return!0===e||!1===e}}};var p=n(4263),f=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},m=function(e,t){return i(e,(function(e,n,i,r){return e.concat(t(n,i,r))}),[])},v=function(e,t,n,i){var r=i&&i.redactedKeys?i.redactedKeys:[],o=i&&i.redactedPaths?i.redactedPaths:[];return JSON.stringify(function(e,t,n){var i=[],r=0;function o(e,s){function a(){return s.length>C&&r>b}if(r++,s.length>y)return R;if(a())return R;if(null===e||"object"!=typeof e)return e;if(function(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return!0;return!1}(i,e))return"[Circular]";if(i.push(e),"function"==typeof e.toJSON)try{r--;var c=o(e.toJSON(),s);return i.pop(),c}catch(e){return _(e)}if((l=e)instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(l))){r--;var u=o({name:e.name,message:e.message},s);return i.pop(),u}var l;if(function(e){return"[object Array]"===Object.prototype.toString.call(e)}(e)){for(var d=[],h=0,g=e.length;h<g;h++){if(a()){d.push(R);break}d.push(o(e[h],s.concat("[]")))}return i.pop(),d}var p={};try{for(var f in e)if(Object.prototype.hasOwnProperty.call(e,f))if(D(n,s.join("."))&&S(t,f))p[f]="[REDACTED]";else{if(a()){p[f]=R;break}p[f]=o(w(e,f),s.concat(f))}}catch(e){}return i.pop(),p}return o(e,[])}(e,r,o),t,n)},y=20,b=25e3,C=8,R="...";function _(e){return"[Throws: "+(e?e.message:"?")+"]"}function D(e,t){for(var n=0,i=e.length;n<i;n++)if(0===t.indexOf(e[n]))return!0;return!1}function S(e,t){for(var n=0,i=e.length;n<i;n++){if("string"==typeof e[n]&&e[n].toLowerCase()===t.toLowerCase())return!0;if(e[n]&&"function"==typeof e[n].test&&e[n].test(t))return!0}return!1}function w(e,t){try{return e[t]}catch(e){return _(e)}}function T(e,t,n,i){if("string"==typeof n){void 0===i?i=null:null!==i&&"string"!=typeof i&&(i=v(i));var r=t[n];"number"!=typeof r?(e.push({name:n,variant:i}),t[n]=e.length-1):e[r]={name:n,variant:i}}}var k={add:T,clear:function(e,t,n){var i=t[n];"number"==typeof i&&(e[i]=null,delete t[n])},merge:function(e,t,n){if(s(t)){for(var i=0;i<t.length;++i){var r=t[i];null!==r&&"object"==typeof r&&T(e,n,r.name,r.variant)}return e}},toEventApi:function(e){return m(r(e,Boolean),(function(e){var t=e.name,n=e.variant,i={featureFlag:t};return"string"==typeof n&&(i.variant=n),i}))}},P=function(e){return!(!e||!e.stack&&!e.stacktrace&&!e["opera#sourceloc"]||"string"!=typeof(e.stack||e.stacktrace||e["opera#sourceloc"])||e.stack===e.name+": "+e.message)},x=n(7209),E=function(e,t,n){"string"==typeof t&&(n?"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&e[t]&&delete e[t][n]:delete e[t])},O={add:function(e,t,n,i){var r;if(t){var o;if(null===n)return E(e,t);"object"==typeof n&&(o=n),"string"==typeof n&&((r={})[n]=i,o=r),o&&"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&(e[t]||(e[t]={}),e[t]=f({},e[t],o))}},get:function(e,t,n){if("string"==typeof t)return n?e[t]?e[t][n]:void 0:e[t]},clear:E};function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},I.apply(this,arguments)}var A=n(8887),F=function(){function e(t,n,i,r,o){void 0===i&&(i=[]),void 0===r&&(r=q()),this.apiKey=void 0,this.context=void 0,this.groupingHash=void 0,this.originalError=o,this._handledState=r,this.severity=this._handledState.severity,this.unhandled=this._handledState.unhandled,this.app={},this.device={},this.request={},this.breadcrumbs=[],this.threads=[],this._metadata={},this._features=[],this._featuresIndex={},this._user={},this._session=void 0,this._correlation=void 0,this.errors=[j(t,n,e.__type,i)]}var t=e.prototype;return t.addMetadata=function(e,t,n){return O.add(this._metadata,e,t,n)},t.setTraceCorrelation=function(e,t){"string"==typeof e&&(this._correlation=I({traceId:e},"string"==typeof t?{spanId:t}:{}))},t.getMetadata=function(e,t){return O.get(this._metadata,e,t)},t.clearMetadata=function(e,t){return O.clear(this._metadata,e,t)},t.addFeatureFlag=function(e,t){void 0===t&&(t=null),k.add(this._features,this._featuresIndex,e,t)},t.addFeatureFlags=function(e){k.merge(this._features,e,this._featuresIndex)},t.getFeatureFlags=function(){return k.toEventApi(this._features)},t.clearFeatureFlag=function(e){k.clear(this._features,this._featuresIndex,e)},t.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},t.getUser=function(){return this._user},t.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},t.toJSON=function(){return{payloadVersion:"4",exceptions:m(this.errors,(function(e){return f({},e,{message:e.errorMessage})})),severity:this.severity,unhandled:this._handledState.unhandled,severityReason:this._handledState.severityReason,app:this.app,device:this.device,request:this.request,breadcrumbs:this.breadcrumbs,context:this.context,groupingHash:this.groupingHash,metaData:this._metadata,user:this._user,session:this._session,featureFlags:this.getFeatureFlags(),correlation:this._correlation}},e}(),N=function(e){var t={file:e.fileName,method:M(e.functionName),lineNumber:e.lineNumber,columnNumber:e.columnNumber,code:void 0,inProject:void 0};return t.lineNumber>-1&&!t.file&&!t.method&&(t.file="global code"),t},M=function(e){return/^global code$/i.test(e)?"global code":e},q=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},L=function(e){return"string"==typeof e?e:""};function j(e,t,n,r){return{errorClass:L(e),errorMessage:L(t),type:n,stacktrace:i(r,(function(e,t){var n=N(t);try{return"{}"===JSON.stringify(n)?e:e.concat(n)}catch(t){return e}}),[])}}function $(e){return e.cause?[e].concat($(e.cause)):[e]}F.getStacktrace=function(e,t,n){if(P(e))return p.parse(e).slice(t);try{return r(A.backtrace(),(function(e){return-1===(e.functionName||"").indexOf("StackGenerator$$")})).slice(1+n)}catch(e){return[]}},F.create=function(e,t,n,i,r,o){void 0===r&&(r=0);var s,a=K(e,t,i,o),c=a[0],u=a[1];try{var l=F.getStacktrace(c,u>0?1+u+r:0,1+r);s=new F(c.name,c.message,l,n,e)}catch(t){s=new F(c.name,c.message,[],n,e)}if("InvalidError"===c.name&&s.addMetadata(""+i,"non-error parameter",H(e)),c.cause){var d,h=$(c).slice(1),g=m(h,(function(e){var t=x(e)&&P(e)?p.parse(e):[],n=K(e,!0,"error cause")[0];return"InvalidError"===n.name&&s.addMetadata("error cause",H(e)),j(n.name,n.message,F.__type,t)}));(d=s.errors).push.apply(d,g)}return s};var H=function(e){return null===e?"null":void 0===e?"undefined":e},K=function(e,t,n,i){var r,o=0,s=function(e){var t="error cause"===n?"was":"received";i&&i.warn(n+" "+t+' a non-error: "'+e+'"');var r=new Error(n+" "+t+' a non-error. See "'+n+'" tab for more detail.');return r.name="InvalidError",r};if(t)switch(typeof e){case"string":case"number":case"boolean":r=new Error(String(e)),o+=1;break;case"function":r=s("function"),o+=2;break;case"object":null!==e&&x(e)?r=e:null!==e&&W(e)?((r=new Error(e.message||e.errorMessage)).name=e.name||e.errorClass,o+=1):(r=s(null===e?"null":"unsupported object"),o+=2);break;default:r=s("nothing"),o+=2}else x(e)?r=e:(r=s(typeof e),o+=2);if(!P(r))try{throw r}catch(e){P(e)&&(r=e,o=1)}return[r,o]};F.__type="browserjs";var W=function(e){return!("string"!=typeof e.name&&"string"!=typeof e.errorClass||"string"!=typeof e.message&&"string"!=typeof e.errorMessage)},U=F,V=function(e,t,n,i){for(var r=!1,o=e.slice();!r&&o.length;)try{r=!1===o.pop()(t)}catch(e){i.error("Error occurred in "+n+" callback, continuing anyway…"),i.error(e)}return r},z=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},B=n(857);var G=z(process.pid.toString(36),2),X=function(){try{return B.hostname()}catch(e){return process.env._CLUSTER_NETWORK_NAME_||process.env.COMPUTERNAME||"hostname"}}(),J=X.length,Y=z(X.split("").reduce((function(e,t){return+e+t.charCodeAt(0)}),+J+36).toString(36),2),Q=function(){return G+Y},Z=0,ee=4,te=36,ne=Math.pow(te,ee);function ie(){return z((Math.random()*ne|0).toString(te),ee)}function re(){return"c"+(new Date).getTime().toString(te)+z((Z=Z<ne?Z:0,++Z-1).toString(te),ee)+Q()+(ie()+ie())}re.fingerprint=Q,re.isCuid=function(e){return"string"==typeof e&&/^c[a-z0-9]{20,32}$/.test(e)};var oe=re,se=function(){function e(){this.id=oe(),this.startedAt=new Date,this._handled=0,this._unhandled=0,this._user={},this.app={},this.device={}}var t=e.prototype;return t.getUser=function(){return this._user},t.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},t.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},t._track=function(e){this[e._handledState.unhandled?"_unhandled":"_handled"]+=1},e}(),ae=k.add,ce=k.clear,ue=k.merge,le=function(){},de=function(){function n(t,i,r,o){var s=this;void 0===i&&(i=g.schema),void 0===r&&(r=[]),this._notifier=o,this._config={},this._schema=i,this._delivery={sendSession:le,sendEvent:le},this._logger={debug:le,info:le,warn:le,error:le},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._featuresIndex={},this._features=[],this._context=void 0,this._user={},this._cbs={e:[],s:[],sp:[],b:[]},this.Client=n,this.Event=U,this.Breadcrumb=e,this.Session=se,this._config=this._configure(t,r),m(r.concat(this._config.plugins),(function(e){e&&s._loadPlugin(e)})),this._depth=1;var a=this,c=this.notify;this.notify=function(){return c.apply(a,arguments)}}var s=n.prototype;return s.addMetadata=function(e,t,n){return O.add(this._metadata,e,t,n)},s.getMetadata=function(e,t){return O.get(this._metadata,e,t)},s.clearMetadata=function(e,t){return O.clear(this._metadata,e,t)},s.addFeatureFlag=function(e,t){void 0===t&&(t=null),ae(this._features,this._featuresIndex,e,t)},s.addFeatureFlags=function(e){ue(this._features,e,this._featuresIndex)},s.clearFeatureFlag=function(e){ce(this._features,this._featuresIndex,e)},s.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},s.getContext=function(){return this._context},s.setContext=function(e){this._context=e},s._configure=function(e,t){var n=i(t,(function(e,t){return t&&t.configSchema?f({},e,t.configSchema):e}),this._schema);e.endpoints||(e.sendPayloadChecksums=!("sendPayloadChecksums"in e)||e.sendPayloadChecksums);var r=i(u(n),(function(t,i){var r=n[i].defaultValue(e[i]);return void 0!==e[i]?n[i].validate(e[i])?n[i].allowPartialObject?t.config[i]=f(r,e[i]):t.config[i]=e[i]:(t.errors[i]=n[i].message,t.config[i]=r):t.config[i]=r,t}),{errors:{},config:{}}),o=r.errors,s=r.config;if(n.apiKey){if(!s.apiKey)throw new Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(s.apiKey)||(o.apiKey="should be a string of 32 hexadecimal characters")}return this._metadata=f({},s.metadata),ue(this._features,s.featureFlags,this._featuresIndex),this._user=f({},s.user),this._context=s.context,s.logger&&(this._logger=s.logger),s.onError&&(this._cbs.e=this._cbs.e.concat(s.onError)),s.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(s.onBreadcrumb)),s.onSession&&(this._cbs.s=this._cbs.s.concat(s.onSession)),u(o).length&&this._logger.warn(he(o,e)),s},s.getUser=function(){return this._user},s.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},s._loadPlugin=function(e){var t=e.load(this);e.name&&(this._plugins["~"+e.name+"~"]=t)},s.getPlugin=function(e){return this._plugins["~"+e+"~"]},s._setDelivery=function(e){this._delivery=e(this)},s.startSession=function(){var e=new se;return e.app.releaseStage=this._config.releaseStage,e.app.version=this._config.appVersion,e.app.type=this._config.appType,e._user=f({},this._user),V(this._cbs.s,e,"onSession",this._logger)?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,e)},s.addOnError=function(e,t){void 0===t&&(t=!1),this._cbs.e[t?"unshift":"push"](e)},s.removeOnError=function(e){this._cbs.e=r(this._cbs.e,(function(t){return t!==e}))},s._addOnSessionPayload=function(e){this._cbs.sp.push(e)},s.addOnSession=function(e){this._cbs.s.push(e)},s.removeOnSession=function(e){this._cbs.s=r(this._cbs.s,(function(t){return t!==e}))},s.addOnBreadcrumb=function(e,t){void 0===t&&(t=!1),this._cbs.b[t?"unshift":"push"](e)},s.removeOnBreadcrumb=function(e){this._cbs.b=r(this._cbs.b,(function(t){return t!==e}))},s.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},s.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},s.leaveBreadcrumb=function(n,i,r){if(n="string"==typeof n?n:"",r="string"==typeof r&&o(t,r)?r:"manual",i="object"==typeof i&&null!==i?i:{},n){var s=new e(n,i,r);V(this._cbs.b,s,"onBreadcrumb",this._logger)?this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback"):(this._breadcrumbs.push(s),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs)))}},s._isBreadcrumbTypeEnabled=function(e){var t=this._config.enabledBreadcrumbTypes;return null===t||o(t,e)},s.notify=function(e,t,n){void 0===n&&(n=le);var i=U.create(e,!0,void 0,"notify()",this._depth+1,this._logger);this._notify(i,t,n)},s._notify=function(e,t,i){var r=this;if(void 0===i&&(i=le),e.app=f({},e.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),e.context=e.context||this._context,e._metadata=f({},e._metadata,this._metadata),e._user=f({},e._user,this._user),e.breadcrumbs=this._breadcrumbs.slice(),ue(e._features,this._features,e._featuresIndex),null!==this._config.enabledReleaseStages&&!o(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),i(null,e);var s=e.severity,a=function(e){r._logger.error("Error occurred in onError callback, continuing anyway…"),r._logger.error(e)};!function(e,t,n,i){!function(e,t,n){var i=0,r=function(){if(i>=e.length)return n(null,!0);t(e[i],(function(e,t){return e?n(e):!1===t?n(null,!1):(i++,void r())}))};r()}(e,(function(e,i){if("function"!=typeof e)return i(null);try{if(2!==e.length){var r=e(t);return r&&"function"==typeof r.then?r.then((function(e){return setTimeout((function(){return i(null,e)}))}),(function(e){setTimeout((function(){return n(e),i(null,!0)}))})):i(null,r)}e(t,(function(e,t){if(e)return n(e),i(null);i(null,t)}))}catch(e){n(e),i(null)}}),i)}([].concat(this._cbs.e).concat(t),e,a,(function(t,o){if(t&&a(t),!o)return r._logger.debug("Event not sent due to onError callback"),i(null,e);r._isBreadcrumbTypeEnabled("error")&&n.prototype.leaveBreadcrumb.call(r,e.errors[0].errorClass,{errorClass:e.errors[0].errorClass,errorMessage:e.errors[0].errorMessage,severity:e.severity},"error"),s!==e.severity&&(e._handledState.severityReason={type:"userCallbackSetSeverity"}),e.unhandled!==e._handledState.unhandled&&(e._handledState.severityReason.unhandledOverridden=!0,e._handledState.unhandled=e.unhandled),r._session&&(r._session._track(e),e._session=r._session),r._delivery.sendEvent({apiKey:e.apiKey||r._config.apiKey,notifier:r._notifier,events:[e]},(function(t){return i(t,e)}))}))},n}(),he=function(e,t){return new Error("Invalid configuration\n"+m(u(e),(function(n){return" - "+n+" "+e[n]+", got "+ge(t[n])})).join("\n\n"))},ge=function(e){switch(typeof e){case"string":case"number":case"object":return JSON.stringify(e);default:return String(e)}},pe=de,fe={},me=["events.[].metaData","events.[].breadcrumbs.[].metaData","events.[].request"];fe.event=function(e,t){var n=v(e,null,null,{redactedPaths:me,redactedKeys:t});return n.length>1e6&&(e.events[0]._metadata={notifier:"WARNING!\nSerialized payload was "+n.length/1e6+"MB (limit = 1MB)\nmetadata was removed"},n=v(e,null,null,{redactedPaths:me,redactedKeys:t})),n},fe.session=function(e,t){return v(e,null,null)};var ve=n(8611),ye=n(5692),be=n(7016).parse,Ce=function(e,t){var n=e.url,i=e.headers,r=e.body,o=e.agent,s=!1,a=function(e){s||(s=!0,t(e))},c=be(n),u=("https:"===c.protocol?ye:ve).request({method:"POST",hostname:c.hostname,port:c.port,path:c.path,headers:i,agent:o});u.on("error",a),u.on("response",(function(e){Re(e,(function(n,i){return n?a(n):e.statusCode<200||e.statusCode>=300?a(new Error("Bad statusCode from API: "+e.statusCode+"\n"+i)):void t(null,i)}))})),u.write(r),u.end()},Re=function(e,t){var n="";e.on("error",t),e.setEncoding("utf8"),e.on("data",(function(e){n+=e})),e.on("end",(function(){return t(null,n)}))},_e=function(e){return{sendEvent:function(t,n){void 0===n&&(n=function(){});var i=fe.event(t,e._config.redactedKeys),r=function(t){t&&e._logger.error("Event failed to send…\n"+(t&&t.stack?t.stack:t),t),i.length>1e6&&e._logger.warn("Event oversized ("+(i.length/1e6).toFixed(2)+" MB)"),n(t)};if(null===e._config.endpoints.notify){var o=new Error("Event not sent due to incomplete endpoint configuration");return r(o)}try{Ce({url:e._config.endpoints.notify,headers:{"Content-Type":"application/json","Bugsnag-Api-Key":t.apiKey||e._config.apiKey,"Bugsnag-Payload-Version":"4","Bugsnag-Sent-At":(new Date).toISOString()},body:i,agent:e._config.agent},(function(e,t){return r(e)}))}catch(e){r(e)}},sendSession:function(t,n){void 0===n&&(n=function(){});var i=function(t){t&&e._logger.error("Session failed to send…\n"+(t&&t.stack?t.stack:t),t),n(t)};if(null===e._config.endpoints.session){var r=new Error("Session not sent due to incomplete endpoint configuration");return i(r)}try{Ce({url:e._config.endpoints.sessions,headers:{"Content-Type":"application/json","Bugsnag-Api-Key":e._config.apiKey,"Bugsnag-Payload-Version":"1","Bugsnag-Sent-At":(new Date).toISOString()},body:fe.session(t,e._config.redactedKeys),agent:e._config.agent},(function(e){return i(e)}))}catch(e){i(e)}}}};function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},De.apply(this,arguments)}var Se=g.schema,we=n(857),Te=n(9023).inspect,ke={appType:De({},Se.appType,{defaultValue:function(){return"node"}}),projectRoot:{defaultValue:function(){return process.cwd()},validate:function(e){return null===e||h(e)},message:"should be string"},hostname:{defaultValue:function(){return we.hostname()},message:"should be a string",validate:function(e){return null===e||h(e)}},logger:De({},Se.logger,{defaultValue:function(){return xe()}}),releaseStage:De({},Se.releaseStage,{defaultValue:function(){return"production"}}),agent:{defaultValue:function(){},message:"should be an HTTP(s) agent",validate:function(e){return void 0===e||Oe(e)}},onUncaughtException:{defaultValue:function(){return function(e,t,n){n.error("Uncaught exception"+Ee(t)+", the process will now terminate…\n"+Pe(e)),process.exit(1)}},message:"should be a function",validate:function(e){return"function"==typeof e}},onUnhandledRejection:{defaultValue:function(){return function(e,t,n){n.error("Unhandled rejection"+Ee(t)+"…\n"+Pe(e))}},message:"should be a function",validate:function(e){return"function"==typeof e}}},Pe=function(e){return e&&e.stack?e.stack:Te(e)},xe=function(){return["debug","info","warn","error"].reduce((function(e,t){var n=console[t]||console.log;return e[t]=n.bind(console,"[bugsnag]"),e}),{})},Ee=function(e){return e.request&&Object.keys(e.request).length?" at "+e.request.httpMethod+" "+(e.request.path||e.request.url):""},Oe=function(e){return"object"==typeof e&&null!==e||"boolean"==typeof e},Ie=new Date,Ae=function(){Ie=new Date},Fe={name:"appDuration",load:function(e){return e.addOnError((function(e){var t=new Date;e.app.duration=t-Ie}),!0),{reset:Ae}}},Ne={load:function(e){!/^(local-)?dev(elopment)?$/.test(e._config.releaseStage)&&e._isBreadcrumbTypeEnabled("log")&&m(Me,(function(t){var n=console[t];console[t]=function(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];e.leaveBreadcrumb("Console output",i(o,(function(e,t,n){var i="[Unknown value]";try{i=String(t)}catch(e){}if("[object Object]"===i)try{i=JSON.stringify(t)}catch(e){}return e["["+n+"]"]=i,e}),{severity:0===t.indexOf("group")?"log":t}),"log"),n.apply(console,o)},console[t]._restore=function(){console[t]=n}}))}},Me=r(["log","debug","info","warn","error"],(function(e){return"undefined"!=typeof console&&"function"==typeof console[e]})),qe={},Le=[];(qe=function(e){var t=new e.Client({},{},[],e._notifier);return t._config=e._config,t._breadcrumbs=e._breadcrumbs.slice(),t._metadata=f({},e._metadata),t._features=[].concat(e._features),t._featuresIndex=f({},e._featuresIndex),t._user=f({},e._user),t._context=e._context,t._cbs={e:e._cbs.e.slice(),s:e._cbs.s.slice(),sp:e._cbs.sp.slice(),b:e._cbs.b.slice()},t._logger=e._logger,t._delivery=e._delivery,t._sessionDelegate=e._sessionDelegate,Le.forEach((function(e){e(t)})),t}).registerCallback=function(e){Le.push(e)};var je=function(){return(new Error).stack.split("\n").slice(3).join("\n")},$e=function(e,t){var n=e.stack.split("\n");return(1===n.length||2===n.length&&/at Error \(native\)/.test(n[1]))&&(e.stack=n[0]+"\n"+t),e},He={},Ke=je;(He={name:"contextualize",load:function(e){return function(t,n){var i=Ke(),r=qe(e);r.fallbackStack=i,r.addOnError(n),e._clientContext.run(r,t)}}}).default=He;var We={},Ue=je,Ve=$e;function ze(){return ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ze.apply(this,arguments)}We={name:"intercept",load:function(e){return function(t,n){void 0===t&&(t=function(){}),"function"!=typeof n&&(n=t,t=function(){});var i=Ue();return function(r){if(r){r.stack&&Ve(r,i);var o=e.Event.create(r,!0,{severity:"warning",unhandled:!1,severityReason:{type:"callbackErrorIntercept"}},"intercept()",1);e._notify(o,t)}else{for(var s=arguments.length,a=new Array(s>1?s-1:0),c=1;c<s;c++)a[c-1]=arguments[c];n.apply(void 0,a)}}}}},We.default=We;var Be=n(857),Ge={load:function(e){var t={osName:Be.platform()+" ("+Be.arch()+")",osVersion:Be.release(),totalMemory:Be.totalmem(),hostname:e._config.hostname,runtimeVersions:{node:process.versions.node}};e._addOnSessionPayload((function(e){e.device=ze({},e.device,t)})),e.addOnError((function(e){e.device=ze({},e.device,t,{freeMemory:Be.freemem(),time:new Date})}),!0)}},Xe=n(6928),Je=Xe.join,Ye=Xe.resolve,Qe=function(e){return Je(Ye(e),"/")},Ze={load:function(e){return e.addOnError((function(t){if(e._config.projectRoot){var n=Qe(e._config.projectRoot);t.errors.reduce((function(e,t){return e.concat(t.stacktrace)}),[]).map((function(e){e.inProject="string"==typeof e.file&&0===e.file.indexOf(n)&&!/\/node_modules\//.test(e.file)}))}}))}};function et(){return et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},et.apply(this,arguments)}function tt(e,t){return tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tt(e,t)}var nt,it,rt=n(9896).createReadStream,ot=n(2203).Writable,st=n(815),at=n(5607),ct=n(6928),ut={load:function(e){if(e._config.sendCode){e.addOnError((function(t){return new Promise((function(n,i){var r=Object.create(null),o=t.errors.reduce((function(e,t){return e.concat(t.stacktrace)}),[]);ht(o.map((function(t){return function(){return function(t,n){return new Promise((function(i,r){try{if(!t.lineNumber||!t.file)return i(t);var o=ct.resolve(e._config.projectRoot,t.file),s=o+"@"+t.lineNumber;if(s in n)return t.code=n[s],i(t);lt(o,t.lineNumber,(function(e,r){return e||(t.code=n[s]=r),i(t)}))}catch(e){return i(t)}}))}(t,r)}}))).then(n).catch(i)}))}))}},configSchema:{sendCode:{defaultValue:function(){return!0},validate:function(e){return!0===e||!1===e},message:"should be true or false"}}},lt=function(e,t,n){var i=t-3,r=t+3,o=rt(e,{encoding:"utf8"}),s=new at.LineStream({keepEmptyLines:!0}),a=new dt({start:i,end:r});a.on("done",(function(){return o.destroy()})),st(o,s,a,(function(e){if(e&&"premature close"!==e.message)return n(e);n(null,a.getCode())}))},dt=function(e){function t(t){var n;return(n=e.call(this,et({},t,{decodeStrings:!1}))||this)._start=t.start,n._end=t.end,n._n=0,n._code={},n}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,tt(n,i);var r=t.prototype;return r._write=function(e,t,n){return this._n++,this._n<this._start?n(null):this._n<=this._end?(this._code[String(this._n)]=e.length<=200?e:e.substr(0,200),n(null)):(this.emit("done"),n(null))},r.getCode=function(){return this._code},t}(ot),ht=function(e){return new Promise((function(t,n){var i=[];e.reduce((function(e,t){return e.then((function(e){return i.push(e),t()}))}),Promise.resolve()).then((function(e){i.push(e)})).then((function(){t(i.slice(1))}))}))},gt=$e,pt={load:function(e){e._config.autoDetectErrors&&e._config.enabledErrorTypes.unhandledExceptions&&(nt=function(t){var n=e._clientContext&&e._clientContext.getStore()||e;t.stack&&n.fallbackStack&>(t,n.fallbackStack);var i=n.Event.create(t,!1,{severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},"uncaughtException handler",1);return new Promise((function(e){n._notify(i,(function(){}),(function(i,r){i&&n._logger.error("Failed to send event to Bugsnag"),n._config.onUncaughtException(t,r,n._logger),e()}))}))},process.prependListener("uncaughtException",nt))},destroy:function(){process.removeListener("uncaughtException",nt)}},ft={load:function(e){e._config.autoDetectErrors&&e._config.enabledErrorTypes.unhandledRejections&&(it=function(t){var n=e._clientContext&&e._clientContext.getStore()||e,i=!e._config.reportUnhandledPromiseRejectionsAsHandled,r=n.Event.create(t,!1,{severity:"error",unhandled:i,severityReason:{type:"unhandledPromiseRejection"}},"unhandledRejection handler",1);return new Promise((function(e){n._notify(r,(function(){}),(function(i,r){i&&n._logger.error("Failed to send event to Bugsnag"),n._config.onUnhandledRejection(t,r,n._logger),e()}))}))},process.prependListener?process.prependListener("unhandledRejection",it):process.on("unhandledRejection",it))},destroy:function(){process.removeListener("unhandledRejection",it)}},mt=vt;function vt(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}function yt(e,t){return yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yt(e,t)}vt.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,this.max)},vt.prototype.reset=function(){this.attempts=0};var bt=function(e){function t(t){var n;return(n=e.call(this)||this)._sessions=new Map,n._interval=null,n._intervalLength=t||1e4,n._summarize=n._summarize.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}var n,i;i=e,(n=t).prototype=Object.create(i.prototype),n.prototype.constructor=n,yt(n,i);var r=t.prototype;return r.start=function(){this._interval||(this._interval=setInterval(this._summarize,this._intervalLength).unref())},r.stop=function(){clearInterval(this._interval),this._interval=null},r.track=function(e){var t=Ct(e.startedAt),n=this._sessions.get(t);return this._sessions.set(t,void 0===n?1:n+1),e},r._summarize=function(){var e=this,t=[];this._sessions.forEach((function(n,i){t.push({startedAt:i,sessionsStarted:n}),e._sessions.delete(i)})),t.length&&this.emit("summary",t)},t}(n(4434).EventEmitter),Ct=function(e){var t=new Date(e);return t.setSeconds(0),t.setMilliseconds(0),t.toISOString()},Rt={load:function(e){var t=new bt(e._config.sessionSummaryInterval);t.on("summary",_t(e)),t.start(),e._sessionDelegate={startSession:function(e,n){return e._session=n,e._pausedSession=null,t.track(e._session),e},pauseSession:function(e){e._pausedSession=e._session,e._session=null},resumeSession:function(e){return e._session?e:e._pausedSession?(e._session=e._pausedSession,e._pausedSession=null,e):e.startSession()}}},configSchema:{sessionSummaryInterval:{defaultValue:function(){},validate:function(e){return void 0===e||l()(e)},message:"should be a positive integer"}}},_t=function(e){return function(t){if(null===e._config.enabledReleaseStages||e._config.enabledReleaseStages.includes(e._config.releaseStage)){if(t.length){var n=new mt({min:1e3,max:1e4}),i=10;r((function o(s){if(!s){var a=t.reduce((function(e,t){return e+t.sessionsStarted}),0);return e._logger.debug(a+" session(s) reported")}10!==n.attempts?(e._logger.debug("Session delivery failed, retry #"+(n.attempts+1)+"/"+i,s),setTimeout((function(){return r(o)}),n.duration())):e._logger.error("Session delivery failed, max retries exceeded",s)}))}}else e._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration");function r(n){var i={notifier:e._notifier,device:{},app:{releaseStage:e._config.releaseStage,version:e._config.appVersion,type:e._config.appType},sessionCounts:t};if(V(e._cbs.sp,i,"onSessionPayload",e._logger))return e._logger.debug("Session not sent due to onSessionPayload callback"),n(null);e._delivery.sendSession(i,n)}}},Dt={load:function(e){return e.addOnError((function(t){if(e._config.projectRoot){var n=Qe(e._config.projectRoot);t.errors.reduce((function(e,t){return e.concat(t.stacktrace)}),[]).map((function(e){"string"==typeof e.file&&0===e.file.indexOf(n)&&(e.file=e.file.replace(n,""))}))}}))}},St={};function wt(){return wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},wt.apply(this,arguments)}var Tt=n(290).AsyncLocalStorage;U.__type="nodejs";var kt=wt({},g.schema,ke),Pt=[Fe,ut,Ze,Dt,Rt,Ge,pt,ft,We,He,{load:function(e){e.addOnError((function(e){e.errors.reduce((function(e,t){return e.concat(t.stacktrace)}),[]).forEach((function(e){"string"==typeof e.file&&(e.file=e.file.replace(/\\/g,"/"))}))}))}},Ne],xt={_client:null,createClient:function(e){"string"==typeof e&&(e={apiKey:e}),e||(e={});var t=new pe(e,kt,Pt,{name:"Bugsnag Node",version:"8.2.0",url:"https://github.com/bugsnag/bugsnag-js"});return Object.keys(pe.prototype).forEach((function(e){var n=t[e];t[e]=function(){var i=t._clientContext&&"function"==typeof t._clientContext.getStore?t._clientContext.getStore():null,r=i||t,o=i?i[e]:n;r._depth+=1;var s=o.apply(r,arguments);return r._depth-=1,s}})),t._clientContext=new Tt,t._setDelivery(_e),t._logger.debug("Loaded!"),t},start:function(e){return xt._client?(xt._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."),xt._client):(xt._client=xt.createClient(e),xt._client)},isStarted:function(){return null!=xt._client}};return Object.keys(pe.prototype).forEach((function(e){/^_/.test(e)||(xt[e]=function(){var t=xt._client,n=t&&t._clientContext&&t._clientContext.getStore();if(n&&(t=n),!t)return console.error("Bugsnag."+e+"() was called before Bugsnag.start()");t._depth+=1;var i=t[e].apply(t,arguments);return t._depth-=1,i})})),(St=xt).Client=pe,St.Event=U,St.Session=se,St.Breadcrumb=e,St.default=xt,St}()},8505:e=>{"use strict";function t(e,t,r){e instanceof RegExp&&(e=n(e,r)),t instanceof RegExp&&(t=n(t,r));var o=i(e,t,r);return o&&{start:o[0],end:o[1],pre:r.slice(0,o[0]),body:r.slice(o[0]+e.length,o[1]),post:r.slice(o[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function i(e,t,n){var i,r,o,s,a,c=n.indexOf(e),u=n.indexOf(t,c+1),l=c;if(c>=0&&u>0){if(e===t)return[c,u];for(i=[],o=n.length;l>=0&&!a;)l==c?(i.push(l),c=n.indexOf(e,l+1)):1==i.length?a=[i.pop(),u]:((r=i.pop())<o&&(o=r,s=u),u=n.indexOf(t,l+1)),l=c<u&&c>=0?c:u;i.length&&(a=[o,s])}return a}e.exports=t,t.range=i},8928:(e,t,n)=>{var i=n(8505);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),m(function(e){return e.split("\\\\").join(r).split("\\{").join(o).split("\\}").join(s).split("\\,").join(a).split("\\.").join(c)}(e),!0).map(l)):[]};var r="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",s="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function u(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function l(e){return e.split(r).join("\\").split(o).join("{").split(s).join("}").split(a).join(",").split(c).join(".")}function d(e){if(!e)return[""];var t=[],n=i("{","}",e);if(!n)return e.split(",");var r=n.pre,o=n.body,s=n.post,a=r.split(",");a[a.length-1]+="{"+o+"}";var c=d(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function h(e){return"{"+e+"}"}function g(e){return/^-?0\d/.test(e)}function p(e,t){return e<=t}function f(e,t){return e>=t}function m(e,t){var n=[],r=i("{","}",e);if(!r)return[e];var o=r.pre,a=r.post.length?m(r.post,!1):[""];if(/\$$/.test(r.pre))for(var c=0;c<a.length;c++){var l=o+"{"+r.body+"}"+a[c];n.push(l)}else{var v,y,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),C=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),R=b||C,_=r.body.indexOf(",")>=0;if(!R&&!_)return r.post.match(/,(?!,).*\}/)?m(e=r.pre+"{"+r.body+s+r.post):[e];if(R)v=r.body.split(/\.\./);else if(1===(v=d(r.body)).length&&1===(v=m(v[0],!1).map(h)).length)return a.map((function(e){return r.pre+v[0]+e}));if(R){var D=u(v[0]),S=u(v[1]),w=Math.max(v[0].length,v[1].length),T=3==v.length?Math.abs(u(v[2])):1,k=p;S<D&&(T*=-1,k=f);var P=v.some(g);y=[];for(var x=D;k(x,S);x+=T){var E;if(C)"\\"===(E=String.fromCharCode(x))&&(E="");else if(E=String(x),P){var O=w-E.length;if(O>0){var I=new Array(O+1).join("0");E=x<0?"-"+I+E.slice(1):I+E}}y.push(E)}}else{y=[];for(var A=0;A<v.length;A++)y.push.apply(y,m(v[A],!1))}for(A=0;A<y.length;A++)for(c=0;c<a.length;c++)l=o+y[A]+a[c],(!t||R||l)&&n.push(l)}return n}},5607:(e,t,n)=>{var i=n(2203),r=n(9023),o=n(3557);function s(e,t){if(!e)throw new Error("expected readStream");if(!e.readable)throw new Error("readStream must be readable");var n=new a(t);return e.pipe(n),n}function a(e){i.Transform.call(this,e),e=e||{},this._readableState.objectMode=!0,this._lineBuffer=[],this._keepEmptyLines=e.keepEmptyLines||!1,this._lastChunkEndedWithCR=!1;var t=this;this.on("pipe",(function(e){t.encoding||e instanceof i.Readable&&(t.encoding=e._readableState.encoding)}))}e.exports=function(t,n){return e.exports.createStream(t,n)},e.exports.createStream=function(e,t){return e?s(e,t):new a(t)},e.exports.createLineStream=function(e){return console.log("WARNING: byline#createLineStream is deprecated and will be removed soon"),s(e)},e.exports.LineStream=a,r.inherits(a,i.Transform),a.prototype._transform=function(e,t,n){t=t||"utf8",Buffer.isBuffer(e)&&("buffer"==t?(e=e.toString(),t="utf8"):e=e.toString(t)),this._chunkEncoding=t;var i=e.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g);this._lastChunkEndedWithCR&&"\n"==e[0]&&i.shift(),this._lineBuffer.length>0&&(this._lineBuffer[this._lineBuffer.length-1]+=i[0],i.shift()),this._lastChunkEndedWithCR="\r"==e[e.length-1],this._lineBuffer=this._lineBuffer.concat(i),this._pushBuffer(t,1,n)},a.prototype._pushBuffer=function(e,t,n){for(;this._lineBuffer.length>t;){var i=this._lineBuffer.shift();if((this._keepEmptyLines||i.length>0)&&!this.push(this._reencode(i,e))){var r=this;return void o.setImmediate((function(){r._pushBuffer(e,t,n)}))}}n()},a.prototype._flush=function(e){this._pushBuffer(this._chunkEncoding,0,e)},a.prototype._reencode=function(e,t){return this.encoding&&this.encoding!=t?new Buffer(e,t).toString(this.encoding):this.encoding?e:new Buffer(e,t)}},9051:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Argument=void 0,t.Argument=class{constructor(e,t){this.value=e,this.range=t}toString(){return this.value}getRange(){return this.range}getValue(){return this.value}isAfter(e){return!(this.range.end.line<e.line)&&(this.range.start.line>e.line||this.range.start.character>e.character)}isBefore(e){return this.range.start.line<e.line||!(this.range.end.line>e.line)&&this.range.end.character<e.character}}},1799:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Comment=void 0;const i=n(4815),r=n(4526),o=n(5328);class s extends r.Line{constructor(e,t){super(e,t)}toString(){const e=this.getContent();return e?"# "+e:"#"}getContent(){let e=this.getContentRange();return null===e?"":this.document.getText().substring(this.document.offsetAt(e.start),this.document.offsetAt(e.end))}getContentRange(){let e=this.getRange();const t=this.document.offsetAt(e.start);let n=this.document.getText().substring(t,this.document.offsetAt(e.end)),r=-1,s=-1;for(let e=1;e<n.length;e++)if(!o.Util.isWhitespace(n.charAt(e))){r=e;break}if(-1===r)return null;for(let e=n.length-1;e>=1;e--)if(!o.Util.isWhitespace(n.charAt(e))){s=e+1;break}return i.Range.create(this.document.positionAt(t+r),this.document.positionAt(t+s))}}t.Comment=s},9594:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Dockerfile=void 0;const i=n(4815),r=n(9585),o=n(4209),s=n(4888),a=n(5328),c=n(9585);class u extends o.ImageTemplate{constructor(e){super(),this.initialInstructions=new o.ImageTemplate,this.buildStages=[],this.directives=[],this.foundFrom=!1,this.document=e}getEscapeCharacter(){for(const e of this.directives)if(e.getDirective()===r.Directive.escape){const t=e.getValue();if("\\"===t||"`"===t)return t}return"\\"}getInitialARGs(){return this.initialInstructions.getARGs()}getContainingImage(e){let t=i.Range.create(i.Position.create(0,0),this.document.positionAt(this.document.getText().length));if(!a.Util.isInsideRange(e,t))return null;if((this.initialInstructions.getComments().length>0||this.initialInstructions.getInstructions().length>0)&&a.Util.isInsideRange(e,this.initialInstructions.getRange()))return this.initialInstructions;for(const t of this.buildStages)if(a.Util.isInsideRange(e,t.getRange()))return t;return this}addInstruction(e){e.getKeyword()===c.Keyword.FROM?(this.currentBuildStage=new o.ImageTemplate,this.buildStages.push(this.currentBuildStage),this.foundFrom=!0):this.foundFrom||this.initialInstructions.addInstruction(e),this.foundFrom&&this.currentBuildStage.addInstruction(e),super.addInstruction(e)}setDirectives(e){this.directives=e}getDirective(){return 0===this.directives.length?null:this.directives[0]}getDirectives(){return this.directives}resolveVariable(e,t){for(let n of this.getFROMs()){let i=n.getRange();if(i.start.line<=t&&t<=i.end.line){let n=new o.ImageTemplate;for(let e of this.initialInstructions.getARGs())n.addInstruction(e);return n.resolveVariable(e,t)}}let n=this.getContainingImage(i.Position.create(t,0));if(null===n)return;let r=n.resolveVariable(e,t);if(null===r){let n=new o.ImageTemplate;for(let e of this.initialInstructions.getARGs())n.addInstruction(e);return n.resolveVariable(e,t)}return r}getAvailableVariables(e){if(this.getInstructionAt(e)instanceof s.From){let e=[];for(let t of this.getInitialARGs()){let n=t.getProperty();n&&e.push(n.getName())}return e}let t=this.getContainingImage(i.Position.create(e,0));return t?t.getAvailableVariables(e):[]}getParentStage(e){const t=e.getFROM(),n=null===t?null:t.getImageName();if(null===n)return null;for(const e of this.getFROMs())if(e.getBuildStage()===n){const n=e.getRange();return n.start.line===t.getRange().start.line?null:this.getContainingImage(n.start)}return null}getStageHierarchy(e){const t=this.getContainingImage(i.Position.create(e,0));if(null===t)return[];const n=[t];let r=this.getParentStage(t);for(;null!==r;)n.splice(0,0,r),r=this.getParentStage(r);return n}getAvailableWorkingDirectories(e){const t=new Set;for(const n of this.getStageHierarchy(e))for(const i of n.getWORKDIRs())if(i.getRange().end.line<e){let e=i.getAbsolutePath();null!=e&&(e.endsWith("/")||(e+="/"),t.add(e))}return Array.from(t)}organizeComments(){const e=this.getComments();for(let t=0;t<e.length;t++)if(a.Util.isInsideRange(e[t].getRange().end,this.initialInstructions.getRange()))this.initialInstructions.addComment(e[t]);else for(const n of this.buildStages)a.Util.isInsideRange(e[t].getRange().start,n.getRange())&&n.addComment(e[t])}getRange(){const e=this.getComments(),t=this.getInstructions();let n=null;if(0===e.length)t.length>0&&(n=i.Range.create(t[0].getRange().start,t[t.length-1].getRange().end));else if(0===t.length)n=i.Range.create(e[0].getRange().start,e[e.length-1].getRange().end);else{const r=e[0].getRange().start,o=e[e.length-1].getRange().end,s=t[0].getRange().start,a=t[t.length-1].getRange().end;r.line<s.line?(o.line<a.line&&(n=i.Range.create(r,a)),n=i.Range.create(r,o)):n=o.line<a.line?i.Range.create(s,a):i.Range.create(s,o)}return null===n?0===this.directives.length?null:this.directives[0].getRange():0===this.directives.length?n:i.Range.create(this.directives[0].getRange().start,n.end)}}t.Dockerfile=u},8874:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Flag=void 0;const i=n(4815),r=n(9151);t.Flag=class{constructor(e,t,n,i,r,o){if(this.options=[],this.range=t,this.name=n,this.nameRange=i,this.value=r,this.valueRange=o,null!==this.value){let t=e.offsetAt(o.start),n=-1,i=-1,s=!1;for(let o=0;o<r.length;o++)switch(r.charAt(o)){case"=":if(s=!0,-1===i){i=o+1;break}break;case",":this.options.push(this.createFlagOption(e,r,t,n,i,o)),n=-1,i=-1;break;default:-1===n&&(n=o)}s&&-1!==n&&this.options.push(this.createFlagOption(e,r,t,n,i,r.length))}}createFlagOption(e,t,n,o,s,a){const c=i.Range.create(e.positionAt(n+o),e.positionAt(n+a));return-1===s?new r.FlagOption(c,t.substring(o,a),c,null,null):new r.FlagOption(c,t.substring(o,s-1),i.Range.create(e.positionAt(n+o),e.positionAt(n+s-1)),t.substring(s,a),i.Range.create(e.positionAt(n+s),e.positionAt(n+a)))}toString(){return this.valueRange?"--"+this.name+"="+this.value:"--"+this.name}getRange(){return this.range}getName(){return this.name}getNameRange(){return this.nameRange}getValue(){return this.value}getValueRange(){return this.valueRange}getOption(e){for(const t of this.options)if(t.getName()===e)return t;return null}getOptions(){return this.options}hasOptions(){return this.options.length>0}}},9151:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FlagOption=void 0,t.FlagOption=class{constructor(e,t,n,i,r){this.range=e,this.name=t,this.nameRange=n,this.value=i,this.valueRange=r}toString(){return null!==this.valueRange?this.name+"="+this.value:this.name}getRange(){return this.range}getName(){return this.name}getNameRange(){return this.nameRange}getValue(){return this.value}getValueRange(){return this.valueRange}}},7146:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Heredoc=void 0,t.Heredoc=class{constructor(e,t,n,i,r){this.startRange=e,this.name=t,this.nameRange=n,this.contentRange=i,this.endRange=r}getName(){return this.name}getStartRange(){return this.startRange}getNameRange(){return this.nameRange}getContentRange(){return this.contentRange}getDelimiterRange(){return this.endRange}}},4209:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImageTemplate=void 0;const i=n(4815),r=n(838),o=n(1342),s=n(8233),a=n(6829),c=n(7342),u=n(4888),l=n(9952),d=n(6797),h=n(5328),g=n(2962);t.ImageTemplate=class{constructor(){this.comments=[],this.instructions=[]}addComment(e){this.comments.push(e)}getComments(){return this.comments}addInstruction(e){this.instructions.push(e)}getInstructions(){return this.instructions}getInstructionAt(e){for(let t of this.instructions)if(h.Util.isInsideRange(i.Position.create(e,0),t.getRange()))return t;return null}getARGs(){let e=[];for(let t of this.instructions)t instanceof r.Arg&&e.push(t);return e}getCMDs(){let e=[];for(let t of this.instructions)t instanceof o.Cmd&&e.push(t);return e}getCOPYs(){let e=[];for(let t of this.instructions)t instanceof s.Copy&&e.push(t);return e}getENTRYPOINTs(){let e=[];for(let t of this.instructions)t instanceof c.Entrypoint&&e.push(t);return e}getENVs(){let e=[];for(let t of this.instructions)t instanceof a.Env&&e.push(t);return e}getFROM(){for(const e of this.instructions)if(e instanceof u.From)return e;return null}getFROMs(){let e=[];for(let t of this.instructions)t instanceof u.From&&e.push(t);return e}getHEALTHCHECKs(){let e=[];for(let t of this.instructions)t instanceof l.Healthcheck&&e.push(t);return e}getWORKDIRs(){const e=[];for(const t of this.instructions)t instanceof g.Workdir&&e.push(t);return e}getOnbuildTriggers(){let e=[];for(let t of this.instructions)if(t instanceof d.Onbuild){let n=t.getTriggerInstruction();n&&e.push(n)}return e}getAvailableVariables(e){const t=[];for(const n of this.getARGs())if(n.isBefore(e)){const e=n.getProperty();if(e){const n=e.getName();-1===t.indexOf(n)&&t.push(n)}}for(const n of this.getENVs())if(n.isBefore(e))for(const e of n.getProperties()){const n=e.getName();-1===t.indexOf(n)&&t.push(n)}return t}resolveVariable(e,t){let n=this.getENVs();for(let i=n.length-1;i>=0;i--)if(n[i].isBefore(t))for(let t of n[i].getProperties())if(t.getName()===e)return t.getValue();let i=this.getARGs();for(let n=i.length-1;n>=0;n--)if(i[n].isBefore(t)){let t=i[n].getProperty();if(t&&t.getName()===e)return t.getValue()}}getRange(){const e=this.getInstructions();if(0===e.length)return i.Range.create(0,0,0,0);const t=e[0].getRange().start,n=e[e.length-1].getRange().end;return i.Range.create(t,n)}contains(e){const t=this.getRange();return null!==t&&h.Util.isInsideRange(e,t)}}},14:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Instruction=void 0;const i=n(4815),r=n(5328),o=n(4526),s=n(9051),a=n(7146),c=n(3784),u=n(9585);class l extends o.Line{constructor(e,t,n,i,r,o){super(e,t),this.dockerfile=n,this.escapeChar=i,this.instruction=r,this.instructionRange=o}toString(){let e=this.getKeyword();for(let t of this.getRawArguments())e+=" ",e+=t.getValue();return e}getRangeContent(e){return null===e?null:this.document.getText().substring(this.document.offsetAt(e.start),this.document.offsetAt(e.end))}getInstructionRange(){return this.instructionRange}getInstruction(){return this.instruction}getKeyword(){return this.getInstruction().toUpperCase()}getArgumentsRange(){let e=this.getArguments();return 0===e.length?null:i.Range.create(e[0].getRange().start,e[e.length-1].getRange().end)}getArgumentsRanges(){let e=this.getArguments();if(0===e.length)return[];if(e[0].getRange().start.line===e[e.length-1].getRange().end.line)return[i.Range.create(e[0].getRange().start,e[e.length-1].getRange().end)];let t=[],n=-1,o=e[0].getRange().start,s=this.getInstructionRange(),a=this.document.offsetAt(o)-this.document.offsetAt(s.start),c=this.getTextContent().substring(a,this.document.offsetAt(e[e.length-1].getRange().end)-this.document.offsetAt(s.start)),u=this.document.offsetAt(s.start)+a,l=!1,d=!1;for(let e=0;e<c.length;e++){let s=c.charAt(e);if(s===this.escapeChar){let r=c.charAt(e+1);if(" "===r||"\t"===r)e:for(let r=e+2;r<c.length;r++)switch(c.charAt(r)){case" ":case"\t":continue;case"\r":r++;case"\n":null!==o&&t.push(i.Range.create(o,this.document.positionAt(u+n+1))),o=null,l=!0,d=!1,e=r;break e;default:break e}else"\r"===r?(null!==o&&(t.push(i.Range.create(o,this.document.positionAt(u+n+1))),o=null),l=!0,d=!1,e+=2):"\n"===r?(null!==o&&t.push(i.Range.create(o,this.document.positionAt(u+n+1))),o=null,l=!0,d=!1,e++):e++}else if(r.Util.isNewline(s))d&&(o=null,l=!0,d=!1);else if(!d){if(null===o){if("#"===s){d=!0;continue}let t=this.document.positionAt(u+e);0!==t.character&&(o=i.Position.create(t.line,0))}n=e}}return null===o?t.push(i.Range.create(this.document.positionAt(u+n),this.document.positionAt(u+n+1))):t.push(i.Range.create(o,this.document.positionAt(u+n+1))),t}getRawArgumentsContent(){let e=this.getArguments();return 0===e.length?null:this.getRangeContent(i.Range.create(e[0].getRange().start,e[e.length-1].getRange().end))}getArgumentsContent(){if(0===this.getArguments().length)return null;let e="",t=this.getArgumentsRanges(),n=this.document.getText();for(let i of t)e+=n.substring(this.document.offsetAt(i.start),this.document.offsetAt(i.end));return e}getArguments(){return this.getRawArguments()}getRawArguments(){let e=[],t=this.getInstructionRange(),n=this.document.offsetAt(t.end)-this.document.offsetAt(t.start),o=this.getTextContent().substring(n),a=this.document.offsetAt(t.start)+n,c=!1,u=!1,l=-1,d=!1,h=!1,g=-1,p="";for(let t=0;t<o.length;t++){let n=o.charAt(t);if(r.Util.isWhitespace(n)){if(h){d=!0,r.Util.isNewline(n)&&(d=!1,u&&(u=!1,c=!0));continue}-1!==l&&(-1===g?e.push(new s.Argument(p,i.Range.create(this.document.positionAt(a+l),this.document.positionAt(a+t)))):e.push(new s.Argument(p,i.Range.create(this.document.positionAt(a+l),this.document.positionAt(a+g)))),g=-1,p="",l=-1)}else if(n===this.escapeChar){let r=o.charAt(t+1);if(" "===r||"\t"===r)e:for(let e=t+2;e<o.length;e++)switch(o.charAt(e)){case" ":case"\t":continue;case"\r":e++;case"\n":u=!1,h=!0,c=!0,-1!==l&&(g=t),t=e;break e;default:g=t,-1===l&&(t=e-1);break e}else if("\r"===r)u=!1,h=!0,c=!0,-1!==l&&-1===g&&(g=t),t+=2;else if("\n"===r)u=!1,h=!0,c=!0,-1!==l&&-1===g&&(g=t),t++;else{if(d&&-1!==g&&(e.push(new s.Argument(p,i.Range.create(this.document.positionAt(a+l),this.document.positionAt(a+g)))),p="",l=-1),g=-1,d=!1,h=!1,"$"===r)p=p+n+r;else{if(""===r)break;p+=r}-1===l&&(l=t),t++}}else u||(c&&"#"===n?u=!0:(d&&-1!==g&&(e.push(new s.Argument(p,i.Range.create(this.document.positionAt(a+l),this.document.positionAt(a+g)))),p="",l=-1),d=!1,h=!1,g=-1,p+=n,-1===l&&(l=t)),c=!1)}return-1!==l&&(-1===g?e.push(new s.Argument(p,i.Range.create(this.document.positionAt(a+l),this.document.positionAt(a+o.length)))):e.push(new s.Argument(p,i.Range.create(this.document.positionAt(a+l),this.document.positionAt(a+g))))),e}getExpandedArguments(){let e=this.getArguments();for(let t=0;t<e.length;t++){const n=e[t].getRange();let i=this.document.offsetAt(n.start);const r=this.parseVariables(i,e[t].getValue()),o=[];let a=!1;for(let e of r){const t=this.dockerfile.resolveVariable(e.getName(),e.getNameRange().start.line);o.push(t),a=a||void 0!==t}if(a){let a="";for(let e=0;e<o.length;e++){const t=r[e].getRange(),n=this.document.offsetAt(t.start),s=this.document.offsetAt(t.end);o[e]?(a+=this.document.getText().substring(i,n),a+=o[e],i=s):(a+=this.document.getText().substring(i,s),i=s)}const c=this.document.offsetAt(n.end);c!==i&&(a+=this.document.getText().substring(i,c)),e[t]=new s.Argument(a,n)}}return e}getVariables(){const e=[],t=this.getRawArguments();for(const n of t){let t=n.getRange(),i=this.document.getText().substring(this.document.offsetAt(t.start),this.document.offsetAt(t.end));const r=this.parseVariables(this.document.offsetAt(n.getRange().start),i);for(const t of r)e.push(t)}return e}parseVariables(e,t){let n=[];e:for(let o=0;o<t.length;o++)switch(t.charAt(o)){case this.escapeChar:"$"===t.charAt(o+1)&&o++;break;case"$":if("{"===t.charAt(o+1)){let r="${",s="",a=-1,u="",l=-1,d=-1,h=-1;t:for(let g=o+2;g<t.length;g++){let p=t.charAt(g);switch(p){case this.escapeChar:for(let e=g+1;e<t.length;e++)switch(t.charAt(e)){case" ":case"\t":case"\r":continue;case"\n":g=e;continue t}break;case"}":r+="}";let f=null,m=null,v=-1!==h?u:null,y=null;-1===a?a=g:a+1===g?(f="",m=i.Range.create(this.document.positionAt(e+a+1),this.document.positionAt(e+a+1))):(-1===l?(l=h+1,d=h+1):d+=1,f=t.substring(h,h+1),m=i.Range.create(this.document.positionAt(e+h),this.document.positionAt(e+h+1)),y=i.Range.create(this.document.positionAt(e+l),this.document.positionAt(e+d)));let b=this.document.positionAt(e+o);n.push(new c.Variable(s,i.Range.create(this.document.positionAt(e+o+2),this.document.positionAt(e+a)),i.Range.create(b,this.document.positionAt(e+g+1)),f,m,v,y,void 0!==this.dockerfile.resolveVariable(s,b.line),this.isBuildVariable(s,b.line),r)),o=g;continue e;case":":-1===a?a=g:-1!==h?(-1===l?(l=g,d=g):d=g,u+=":"):h=g,r+=":";break;case"\n":case"\r":case" ":case"\t":break;default:-1===a?s+=p:-1!==h?(-1===l?(l=g,d=g):d=g,u+=p):h=g,r+=p}}break e}if(r.Util.isWhitespace(t.charAt(o+1))||o===t.length-1)continue;{let r="";t:for(let s=o+1;s<t.length;s++){let a=t.charAt(s);switch(a){case"\r":case"\n":case" ":case"\t":continue;case"$":case"'":case'"':let a=this.document.positionAt(e+o);n.push(new c.Variable(r,i.Range.create(this.document.positionAt(e+o+1),this.document.positionAt(e+s)),i.Range.create(a,this.document.positionAt(e+s)),null,null,null,null,void 0!==this.dockerfile.resolveVariable(r,a.line),this.isBuildVariable(r,a.line),"$"+r)),o=s-1;continue e;case this.escapeChar:for(let e=s+1;e<t.length;e++)switch(t.charAt(e)){case" ":case"\t":case"\r":continue;case"\n":s=e;continue t}let u=this.document.positionAt(e+o);n.push(new c.Variable(r,i.Range.create(this.document.positionAt(e+o+1),this.document.positionAt(e+s)),i.Range.create(u,this.document.positionAt(e+s)),null,null,null,null,void 0!==this.dockerfile.resolveVariable(r,u.line),this.isBuildVariable(r,u.line),"$"+r));break e}if(null===a.match(/^[a-z0-9_]+$/i)){let t=this.document.positionAt(e+o);n.push(new c.Variable(r,i.Range.create(this.document.positionAt(e+o+1),this.document.positionAt(e+s)),i.Range.create(t,this.document.positionAt(e+s)),null,null,null,null,void 0!==this.dockerfile.resolveVariable(r,t.line),this.isBuildVariable(r,t.line),"$"+r)),o=s-1;continue e}r+=a}let s=this.document.positionAt(e+o);n.push(new c.Variable(r,i.Range.create(this.document.positionAt(e+o+1),this.document.positionAt(e+t.length)),i.Range.create(s,this.document.positionAt(e+t.length)),null,null,null,null,void 0!==this.dockerfile.resolveVariable(r,s.line),this.isBuildVariable(r,s.line),"$"+r))}break e}return n}isBuildVariable(e,t){if(this.getKeyword()===u.Keyword.FROM){for(const t of this.dockerfile.getInitialARGs()){const n=t.getProperty();if(n&&e===n.getName())return!0}return}let n=this.dockerfile.getContainingImage(i.Position.create(t,0)),r=n.getENVs();for(let n=r.length-1;n>=0;n--)if(r[n].isBefore(t))for(let t of r[n].getProperties())if(t.getName()===e)return!1;let o=n.getARGs();for(let n=o.length-1;n>=0;n--)if(o[n].isBefore(t)){let t=o[n].getProperty();if(t&&t.getName()===e)return!0}}createSingleLineHeredocs(e){const t=[];for(const n of e){const e=n.getValue();if(e.startsWith("<<")&&null!==r.Util.parseHeredocName(e)){const e=n.getRange(),i=this.getNameRange(e),r=this.getName(i);t.push(new a.Heredoc(e,r,i,null,null))}}return t}getName(e){const t=this.document.getText(e);let n=!1,i="";e:for(let e=0;e<t.length;e++){const r=t.charAt(e);switch(r){case this.escapeChar:n=!0;for(let n=e+1;n<t.length;n++)switch(t.charAt(n)){case" ":case"\t":break;case"\r":e=n+1;continue e;case"\n":e=n;continue e;default:i+=t.charAt(n),e=n;continue e}break;case"#":if(n)for(let n=e+1;n<t.length;n++)if("\n"===t.charAt(n)){e=n;continue e}case" ":case"\t":case"\r":case"\n":if(n)break;default:i+=r}}return i}getNameRange(e){const t=this.document.getText(e);let n=!1,r=!1,o=-1,s=-1,a=!1,c=null;e:for(let e=0;e<t.length;e++){const i=t.charAt(e);switch(i){case'"':case"'":if(c===i)break e;c=i;continue;case this.escapeChar:for(let n=e+1;n<t.length;n++)if("\n"===t.charAt(n)){a=!0,n=e;continue e}break;case" ":case"\t":case"\r":case"\n":break;case"<":n?r=!0:n=!0;break;case"-":if(r){r=!1;break}case"#":if(a)for(let n=e+1;n<t.length;n++)if("\n"===t.charAt(n)){e=n;continue e}default:if(-1===o&&(o=e),null!==c){s=e+1;break}break e}}if(-1===o)return i.Range.create(e.end,e.end);const u=this.document.positionAt(this.document.offsetAt(e.start)+o),l=null!==c?this.document.positionAt(this.document.offsetAt(e.start)+s):e.end;return i.Range.create(u,l)}getHeredocs(){const e=this.getArguments();if(0===e.length)return[];const t=[],n=this.getRange();if(n.start.line===n.end.line)return this.createSingleLineHeredocs(e);const r=[];let o=!1,s=!1,c=-1,u=-1,l=-1,d=0;const h=this.document.offsetAt(e[0].getRange().start),g=this.getRangeContent(i.Range.create(e[0].getRange().start,this.getRange().end));e:for(let n=0;n<g.length;n++)switch(g.charAt(n)){case this.escapeChar:s=!0;for(let e=n+1;e<g.length;e++)switch(g.charAt(e)){case" ":case"\t":break;case"\r":e++;default:n=e;continue e}break;case"\r":break;case"\n":if(s)break;if(!o){const t=h+n;for(const n of e){if(!(this.document.offsetAt(n.getRange().start)<t))break;n.getValue().startsWith("<<")&&r.push(n)}o=!0,l=-1;continue e}{-1===c&&(c=n),u=n;const e=r[d],o=e.getRange(),s=this.getNameRange(o),g=this.getName(s),p=this.getDelimiterRange(e,g,i.Range.create(this.document.positionAt(h+l),this.document.positionAt(h+n)));if(null!==p){const e=i.Range.create(this.document.positionAt(h+c),this.document.positionAt(h+l-1));t.push(new a.Heredoc(o,g,s,e,p)),c=-1,d++}l=-1}break;case" ":case"\t":if(s)break;case"#":if(s)for(let e=n+1;e<g.length;e++)if("\n"===g.charAt(e)){n=e;continue e}default:s&&(s=!1),o&&(-1===c&&(c=n),-1===l&&(l=n))}if(!o)return this.createSingleLineHeredocs(e);{const e=r[d],o=e.getRange(),s=this.getNameRange(o),g=this.getName(s);let p=null;const f=this.getDelimiterRange(e,g,i.Range.create(this.document.positionAt(h+l),n.end));null===f?p=i.Range.create(this.document.positionAt(h+c),n.end):-1!==u&&(p=i.Range.create(this.document.positionAt(h+c),this.document.positionAt(h+u))),t.push(new a.Heredoc(o,g,s,p,f)),d++;for(let e=d;e<r.length;e++){const e=r[d].getRange(),n=this.getNameRange(e),i=this.getName(n);t.push(new a.Heredoc(e,i,n,null,null)),d++}}return t}getDelimiterRange(e,t,n){const r=this.document.getText(n);if(e.getValue().startsWith("<<-")){let e=0;for(;"\t"===r.charAt(e);)e++;return r.substring(e)===t?i.Range.create(i.Position.create(n.start.line,e),n.end):null}return r===t?n:null}}t.Instruction=l},7917:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Add=void 0;const i=n(3156);class r extends i.JSONInstruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}stopSearchingForFlags(e){return-1===e.indexOf("--")}}t.Add=r},838:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Arg=void 0;const i=n(3238),r=n(3437);class o extends r.PropertyInstruction{constructor(e,t,n,r,o,s){super(e,t,n,r,o,s),this.property=null;const a=this.getPropertyArguments();1===a.length?this.property=new i.Property(this.document,this.escapeChar,a[0]):this.property=null}getProperty(){return this.property}}t.Arg=o},1342:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cmd=void 0;const i=n(3156);class r extends i.JSONInstruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}}t.Cmd=r},8233:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Copy=void 0;const i=n(3156);class r extends i.JSONInstruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}stopSearchingForFlags(e){return-1===e.indexOf("--")}getFromFlag(){let e=super.getFlags();return 1===e.length&&"from"===e[0].getName()?e[0]:null}getHeredocs(){return super.getHeredocs()}}t.Copy=r},7342:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Entrypoint=void 0;const i=n(3156);class r extends i.JSONInstruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}}t.Entrypoint=r},6829:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Env=void 0;const i=n(3437);class r extends i.PropertyInstruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}getProperties(){return super.getProperties()}}t.Env=r},4888:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.From=void 0;const i=n(4815),r=n(1500);class o extends r.ModifiableInstruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}stopSearchingForFlags(e){return-1===e.indexOf("--")}getImage(){const e=this.getArguments();return e.length>0?e[0].getValue():null}getImageName(){const e=this.getRangeContent(this.getImageNameRange());if(null===e)return null;let t=!1,n=!1,i="";for(let r=0;r<e.length;r++){const o=e.charAt(r);switch(o){case this.escapeChar:n=!0;break;case"\r":continue;case"\n":t=!1;break;case" ":case"\t":break;case"#":n?t=!0:(i+=o,n=!1);break;default:t||(i+=o,n=!1)}}return i}getImageNameRange(){let e=this.getImageRange();if(e){let t=this.getRegistryRange();t&&(e.start=this.document.positionAt(this.document.offsetAt(t.end)+1));let n=this.getImageTagRange(),i=this.getImageDigestRange();return null===n?null!==i&&(e.end=this.document.positionAt(this.document.offsetAt(i.start)-1)):e.end=this.document.positionAt(this.document.offsetAt(n.start)-1),e}return null}getImageRange(){let e=this.getArguments();return 0!==e.length?e[0].getRange():null}getImageTag(){return this.getRangeContent(this.getImageTagRange())}getImageTagRange(){const e=this.getImageRange();if(e){const t=this.document.offsetAt(e.start),n=this.getRangeContent(e),r=this.indexOf(t,n,"@"),o=n.indexOf("/");if(-1===r){const r=this.lastIndexOf(t,n,":");if(r>o)return i.Range.create(this.document.positionAt(t+r+1),e.end)}const s=n.substring(0,r),a=s.indexOf(":");return-1===a?null:-1===o?i.Range.create(this.document.positionAt(t+a+1),this.document.positionAt(t+r)):a<o?null:i.Range.create(this.document.positionAt(t+a+1),this.document.positionAt(t+s.length))}return null}getImageDigest(){return this.getRangeContent(this.getImageDigestRange())}getImageDigestRange(){let e=this.getImageRange();if(e){let t=this.getRangeContent(e),n=this.lastIndexOf(this.document.offsetAt(e.start),t,"@");if(-1!==n)return i.Range.create(e.start.line,e.start.character+n+1,e.end.line,e.end.character)}return null}indexOf(e,t,n){let i=t.indexOf(n);const r=this.getVariables();for(let o=0;o<r.length;o++){const s=e+i,a=r[o].getRange();if(this.document.offsetAt(a.start)<s&&s<this.document.offsetAt(a.end)){const r=this.document.offsetAt(a.end)-e,s=t.substring(r).indexOf(n);if(-1===s)return-1;i=s+r,o=-1}}return i}lastIndexOf(e,t,n){let i=t.lastIndexOf(n);const r=this.getVariables();for(let o=0;o<r.length;o++){const s=e+i,a=r[o].getRange();if(this.document.offsetAt(a.start)<s&&s<this.document.offsetAt(a.end)){if(i=t.substring(0,i).lastIndexOf(n),-1===i)return-1;o=-1}}return i}getRegistry(){return this.getRangeContent(this.getRegistryRange())}getRegistryRange(){const e=this.getImageRange();if(e){const t=this.getImageTagRange(),n=this.getImageDigestRange();null===t?null!==n&&(e.end=this.document.positionAt(this.document.offsetAt(n.start)-1)):e.end=this.document.positionAt(this.document.offsetAt(t.start)-1);const r=this.getRangeContent(e),o=this.document.offsetAt(e.start),s=this.indexOf(o,r,"/");if(-1===s)return null;const a=this.indexOf(o,r,":"),c=this.indexOf(o,r,".");if(-1!==a||-1!==c)return i.Range.create(e.start,this.document.positionAt(o+s));if("localhost"===r.substring(0,s))return i.Range.create(e.start,this.document.positionAt(o+s))}return null}getBuildStage(){let e=this.getBuildStageRange();return null===e?null:this.getRangeContent(e)}getBuildStageRange(){let e=this.getArguments();return e.length>2&&"AS"===e[1].getValue().toUpperCase()?e[2].getRange():null}getPlatformFlag(){let e=super.getFlags();return 1===e.length&&"platform"===e[0].getName()?e[0]:null}}t.From=o},9952:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Healthcheck=void 0;const i=n(1500);class r extends i.ModifiableInstruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}stopSearchingForFlags(e){return"CMD"===(e=e.toUpperCase())||"NONE"===e}getSubcommand(){let e=this.getArguments();return 0!==e.length?e[0]:null}}t.Healthcheck=r},3564:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Label=void 0;const i=n(3437),r=n(5328);class o extends i.PropertyInstruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}getVariables(){const e=super.getVariables(),t=this.getProperties();for(const n of t){const t=n.getUnescapedValue();if(null!==t&&t.length>2&&"'"===t.charAt(0)&&"'"===t.charAt(t.length-1)){const t=n.getValueRange();for(let n=0;n<e.length;n++)r.Util.isInsideRange(e[n].getRange().start,t)&&(e.splice(n,1),n--)}}return e}getProperties(){return super.getProperties()}}t.Label=o},6797:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Onbuild=void 0;const i=n(4815),r=n(1471),o=n(14);class s extends o.Instruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}getTrigger(){let e=this.getTriggerWord();return null===e?null:e.toUpperCase()}getTriggerWord(){return this.getRangeContent(this.getTriggerRange())}getTriggerRange(){let e=this.getArguments();return e.length>0?e[0].getRange():null}getTriggerInstruction(){let e=this.getTriggerRange();if(null===e)return null;let t=this.getArguments();return r.Parser.createInstruction(this.document,this.dockerfile,this.escapeChar,i.Range.create(t[0].getRange().start,this.getRange().end),this.getTriggerWord(),e)}}t.Onbuild=s},9959:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Run=void 0;const i=n(3156);class r extends i.JSONInstruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}stopSearchingForFlags(e){return-1===e.indexOf("--")}getHeredocs(){return super.getHeredocs()}}t.Run=r},2672:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Shell=void 0;const i=n(3156);class r extends i.JSONInstruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}}t.Shell=r},9004:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Stopsignal=void 0;const i=n(14);class r extends i.Instruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}}t.Stopsignal=r},5771:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.User=void 0;const i=n(14);class r extends i.Instruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}}t.User=r},1850:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Volume=void 0;const i=n(3156);class r extends i.JSONInstruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}}t.Volume=r},2962:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Workdir=void 0;const i=n(14);class r extends i.Instruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}getPath(){return this.getArgumentsContent()}getAbsolutePath(){const e=this.getPath();if(null===e||e.startsWith("/"))return e;const t=this.getRange().start.line,n=this.dockerfile.getStageHierarchy(t);for(let i=n.length-1;i>=0;i--){const r=n[i].getWORKDIRs();for(let n=r.length-1;n>=0;n--)if(r[n].getRange().start.line<t){const t=r[n].getAbsolutePath();if(null==t)return;return t.endsWith("/")?t+e:t+"/"+e}}}}t.Workdir=r},6513:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONArgument=void 0;const i=n(9051);class r extends i.Argument{constructor(e,t,n){super(e,t),this.jsonRange=n}getJSONRange(){return this.jsonRange}getJSONValue(){let e=super.getValue();return e=e.substring(1,e.length-1),e}}t.JSONArgument=r},3156:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSONInstruction=void 0;const i=n(4815),r=n(9051),o=n(6513),s=n(1500);class a extends s.ModifiableInstruction{constructor(e,t,n,s,a,c){super(e,t,n,s,a,c),this.openingBracket=null,this.closingBracket=null,this.jsonStrings=[];const u=this.getRawArgumentsContent();if(null===u)return;const l=this.getArguments();if(1===l.length&&"[]"===l[0].getValue()){let e=l[0].getRange();return this.openingBracket=new r.Argument("[",i.Range.create(e.start.line,e.start.character,e.start.line,e.start.character+1)),void(this.closingBracket=new r.Argument("]",i.Range.create(e.start.line,e.start.character+1,e.end.line,e.end.character)))}if(2===l.length&&"["===l[0].getValue()&&"]"===l[1].getValue())return this.openingBracket=l[0],void(this.closingBracket=l[1]);const d=e.offsetAt(this.getArgumentsRange().start);let h=-1,g="",p=!1,f="";e:for(let t=0;t<u.length;t++){let n=u.charAt(t);switch(n){case"[":if(""===g)this.openingBracket=new r.Argument("[",i.Range.create(e.positionAt(d+t),e.positionAt(d+t+1))),g="[";else{if(!p)break e;f+=n}break;case'"':if("["===g||","===g){h=t,p=!0,g='"',f+=n;continue}if('"'!==g)break e;if(!p)break e;f+=n,p=!1,this.jsonStrings.push(new o.JSONArgument(f,i.Range.create(e.positionAt(d+h),e.positionAt(d+t+1)),i.Range.create(e.positionAt(d+h+1),e.positionAt(d+t)))),f="";break;case",":if(p)f+=n;else{if('"'!==g)break e;g=","}break;case"]":if(p)f+=n;else if(""!==g){this.closingBracket=new r.Argument("]",i.Range.create(e.positionAt(d+t),e.positionAt(d+t+1)));break e}break;case" ":case"\t":break;case"\\":if(p)switch(u.charAt(t+1)){case'"':case"\\":f+=u.charAt(t+1),t++;continue;case" ":case"\t":t:for(let e=t+2;e<u.length;e++)switch(u.charAt(e)){case"\r":e++;case"\n":t=e;continue e;case" ":case"\t":break;default:break t}break;case"\r":t++;default:t++;continue}else t:for(let e=t+1;e<u.length;e++)switch(u.charAt(e)){case"\r":e++;case"\n":t=e;continue e;case" ":case"\t":break;default:break t}break e;default:if(!p)break e;f+=n}}}stopSearchingForFlags(e){return!0}getOpeningBracket(){return this.openingBracket}getJSONStrings(){return this.jsonStrings}getClosingBracket(){return this.closingBracket}}t.JSONInstruction=a},4526:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Line=void 0,t.Line=class{constructor(e,t){this.document=e,this.range=t}getRange(){return this.range}getTextContent(){return this.document.getText().substring(this.document.offsetAt(this.range.start),this.document.offsetAt(this.range.end))}isAfter(e){return this.range.start.line>e.range.start.line}isBefore(e){return this.range.start.line<e}}},9585:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DockerfileParser=t.DefaultVariables=t.Directive=t.Keyword=t.Workdir=t.Volume=t.User=t.Stopsignal=t.Shell=t.Run=t.PropertyInstruction=t.Onbuild=t.ModifiableInstruction=t.Label=t.JSONInstruction=t.Heredoc=t.Healthcheck=t.From=t.Env=t.Entrypoint=t.Copy=t.Cmd=t.Arg=t.Add=t.Variable=t.Property=t.ParserDirective=t.Line=t.Instruction=t.Flag=t.Comment=t.JSONArgument=t.Argument=void 0;var i=n(9051);Object.defineProperty(t,"Argument",{enumerable:!0,get:function(){return i.Argument}});var r=n(6513);Object.defineProperty(t,"JSONArgument",{enumerable:!0,get:function(){return r.JSONArgument}});const o=n(1799);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return o.Comment}});const s=n(1471);var a=n(8874);Object.defineProperty(t,"Flag",{enumerable:!0,get:function(){return a.Flag}});const c=n(14);Object.defineProperty(t,"Instruction",{enumerable:!0,get:function(){return c.Instruction}});var u=n(4526);Object.defineProperty(t,"Line",{enumerable:!0,get:function(){return u.Line}});const l=n(2494);Object.defineProperty(t,"ParserDirective",{enumerable:!0,get:function(){return l.ParserDirective}});var d=n(3238);Object.defineProperty(t,"Property",{enumerable:!0,get:function(){return d.Property}});var h=n(3784);Object.defineProperty(t,"Variable",{enumerable:!0,get:function(){return h.Variable}});var g=n(7917);Object.defineProperty(t,"Add",{enumerable:!0,get:function(){return g.Add}});const p=n(838);Object.defineProperty(t,"Arg",{enumerable:!0,get:function(){return p.Arg}});const f=n(1342);Object.defineProperty(t,"Cmd",{enumerable:!0,get:function(){return f.Cmd}});const m=n(8233);Object.defineProperty(t,"Copy",{enumerable:!0,get:function(){return m.Copy}});const v=n(7342);Object.defineProperty(t,"Entrypoint",{enumerable:!0,get:function(){return v.Entrypoint}});const y=n(6829);Object.defineProperty(t,"Env",{enumerable:!0,get:function(){return y.Env}});const b=n(4888);Object.defineProperty(t,"From",{enumerable:!0,get:function(){return b.From}});const C=n(9952);Object.defineProperty(t,"Healthcheck",{enumerable:!0,get:function(){return C.Healthcheck}});var R=n(7146);Object.defineProperty(t,"Heredoc",{enumerable:!0,get:function(){return R.Heredoc}});var _=n(3156);Object.defineProperty(t,"JSONInstruction",{enumerable:!0,get:function(){return _.JSONInstruction}});var D=n(3564);Object.defineProperty(t,"Label",{enumerable:!0,get:function(){return D.Label}});var S=n(1500);Object.defineProperty(t,"ModifiableInstruction",{enumerable:!0,get:function(){return S.ModifiableInstruction}});var w=n(6797);Object.defineProperty(t,"Onbuild",{enumerable:!0,get:function(){return w.Onbuild}});var T=n(3437);Object.defineProperty(t,"PropertyInstruction",{enumerable:!0,get:function(){return T.PropertyInstruction}});var k=n(9959);Object.defineProperty(t,"Run",{enumerable:!0,get:function(){return k.Run}});var P=n(2672);Object.defineProperty(t,"Shell",{enumerable:!0,get:function(){return P.Shell}});var x=n(9004);Object.defineProperty(t,"Stopsignal",{enumerable:!0,get:function(){return x.Stopsignal}});var E=n(5771);Object.defineProperty(t,"User",{enumerable:!0,get:function(){return E.User}});var O=n(1850);Object.defineProperty(t,"Volume",{enumerable:!0,get:function(){return O.Volume}});const I=n(2962);var A,F,N;Object.defineProperty(t,"Workdir",{enumerable:!0,get:function(){return I.Workdir}}),function(e){e.ADD="ADD",e.ARG="ARG",e.CMD="CMD",e.COPY="COPY",e.ENTRYPOINT="ENTRYPOINT",e.ENV="ENV",e.EXPOSE="EXPOSE",e.FROM="FROM",e.HEALTHCHECK="HEALTHCHECK",e.LABEL="LABEL",e.MAINTAINER="MAINTAINER",e.ONBUILD="ONBUILD",e.RUN="RUN",e.SHELL="SHELL",e.STOPSIGNAL="STOPSIGNAL",e.USER="USER",e.VOLUME="VOLUME",e.WORKDIR="WORKDIR"}(A||(t.Keyword=A={})),function(e){e.escape="escape",e.syntax="syntax"}(F||(t.Directive=F={})),t.DefaultVariables=["ALL_PROXY","all_proxy","FTP_PROXY","ftp_proxy","HTTP_PROXY","http_proxy","HTTPS_PROXY","https_proxy","NO_PROXY","no_proxy"],function(e){e.parse=function(e){return(new s.Parser).parse(e)}}(N||(t.DockerfileParser=N={}))},1500:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModifiableInstruction=void 0;const i=n(4815),r=n(8874),o=n(14);class s extends o.Instruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o)}getFlags(){if(!this.flags){this.flags=[];for(let e of this.getArguments()){let t=e.getValue();if(this.stopSearchingForFlags(t))return this.flags;if(0===t.indexOf("--")){let n=e.getRange(),o=this.document.getText().substring(this.document.offsetAt(n.start),this.document.offsetAt(n.end)),s=t.indexOf("="),a=o.indexOf("="),c=!1,u=!1,l=-1;e:for(let e=0;e<o.length;e++)switch(o.charAt(e)){case"\\":case" ":case"\t":case"\r":case"\n":break;case"-":if(u){l=e;break e}c?u=!0:c=!0;break;default:l=e;break e}let d=this.document.positionAt(this.document.offsetAt(n.start)+l);if(-1===a)this.flags.push(new r.Flag(this.document,n,t.substring(2),i.Range.create(d,n.end),null,null));else if(a===t.length-1){let e=this.document.positionAt(this.document.offsetAt(n.start)+a);this.flags.push(new r.Flag(this.document,n,t.substring(2,a),i.Range.create(d,e),"",i.Range.create(n.end,n.end)))}else{let e=this.document.positionAt(this.document.offsetAt(n.start)+a);this.flags.push(new r.Flag(this.document,n,t.substring(2,s),i.Range.create(d,e),t.substring(s+1),i.Range.create(this.document.positionAt(this.document.offsetAt(n.start)+a+1),n.end)))}}}}return this.flags}getArguments(){const e=super.getArguments(),t=this.getFlags();if(0===t.length)return e;for(let n=0;n<t.length;n++)e.shift();return e}}t.ModifiableInstruction=s},1471:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;const i=n(5172),r=n(4815),o=n(1799),s=n(2494),a=n(14),c=n(7917),u=n(838),l=n(1342),d=n(8233),h=n(6829),g=n(7342),p=n(4888),f=n(9952),m=n(3564),v=n(6797),y=n(9959),b=n(2672),C=n(9004),R=n(2962),_=n(5771),D=n(1850),S=n(9594),w=n(5328),T=n(9585);class k{constructor(){this.escapeChar=null}static createInstruction(e,t,n,i,r,o){switch(r.toUpperCase()){case"ADD":return new c.Add(e,i,t,n,r,o);case"ARG":return new u.Arg(e,i,t,n,r,o);case"CMD":return new l.Cmd(e,i,t,n,r,o);case"COPY":return new d.Copy(e,i,t,n,r,o);case"ENTRYPOINT":return new g.Entrypoint(e,i,t,n,r,o);case"ENV":return new h.Env(e,i,t,n,r,o);case"FROM":return new p.From(e,i,t,n,r,o);case"HEALTHCHECK":return new f.Healthcheck(e,i,t,n,r,o);case"LABEL":return new m.Label(e,i,t,n,r,o);case"ONBUILD":return new v.Onbuild(e,i,t,n,r,o);case"RUN":return new y.Run(e,i,t,n,r,o);case"SHELL":return new b.Shell(e,i,t,n,r,o);case"STOPSIGNAL":return new C.Stopsignal(e,i,t,n,r,o);case"WORKDIR":return new R.Workdir(e,i,t,n,r,o);case"USER":return new _.User(e,i,t,n,r,o);case"VOLUME":return new D.Volume(e,i,t,n,r,o)}return new a.Instruction(e,i,t,n,r,o)}getParserDirectives(e,t){const n=[];this.escapeChar="";e:for(let i=w.Util.isUTF8BOM(t.substring(0,1))?1:0;i<t.length;i++)switch(t.charAt(i)){case" ":case"\t":break;case"\r":case"\n":default:break e;case"#":let o=-1,a=-1;for(let c=i+1;c<t.length;c++){let u=t.charAt(c);switch(u){case" ":case"\t":-1!==o&&-1===a&&(a=c);break;case"\r":case"\n":break e;case"=":let l=-1,d=-1;-1===a&&(a=c);let h=t.length;t:for(let e=c+1;e<t.length;e++)switch(u=t.charAt(e),u){case"\r":case"\n":-1!==l&&-1===d&&(d=e),h=e;break t;case"\t":case" ":-1!==l&&-1===d&&(d=e);continue;default:-1===l&&(l=e)}if(-1===o)break e;-1===l?(l=c+1,d=h):-1===d&&(d=t.length);const g=r.Range.create(e.positionAt(i),e.positionAt(h)),p=r.Range.create(e.positionAt(o),e.positionAt(a)),f=r.Range.create(e.positionAt(l),e.positionAt(d));n.push(new s.ParserDirective(e,g,p,f)),o=-1,i="\r"===t.charAt(d)?d+1:d;continue e;default:-1===o&&(o=c)}}}return n}parse(e){this.document=i.TextDocument.create("","",0,e),this.buffer=e;let t=new S.Dockerfile(this.document),n=this.getParserDirectives(this.document,this.buffer),o=0;this.escapeChar="\\",n.length>0?(t.setDirectives(n),this.escapeChar=t.getEscapeCharacter(),o=this.document.offsetAt(r.Position.create(n.length,0))):w.Util.isUTF8BOM(e.substring(0,1))&&(o=1);for(let e=o;e<this.buffer.length;e++){const n=this.buffer.charAt(e);switch(n){case" ":case"\t":case"\r":case"\n":break;case"#":e=this.processComment(t,e);break;default:e=this.processInstruction(t,n,e)}}return t.organizeComments(),t}processInstruction(e,t,n){let i=t,r=-1,o=!1;e:for(let s=n+1;s<this.buffer.length;s++)switch(t=this.buffer.charAt(s)){case this.escapeChar:if(o=!0,"\r"===(t=this.buffer.charAt(s+1))||"\n"===t)-1===r&&(r=s),s++;else{if(" "===t||"\t"===t){for(let e=s+2;e<this.buffer.length;e++)switch(this.buffer.charAt(e)){case" ":case"\t":break;case"\r":case"\n":s=e;continue e;default:r=s+1,i+=this.escapeChar,s=e-2;continue e}r=s+1,i+=this.escapeChar;break e}r=s+1,i+=this.escapeChar,o=!1}break;case" ":case"\t":if(o){t:for(let e=s+1;e<this.buffer.length;e++)switch(this.buffer.charAt(e)){case" ":case"\t":break;case"\r":case"\n":s=e;continue e;default:break t}o=!1}return-1===r&&(r=s),s=this.processArguments(e,i,r,n,s),e.addInstruction(this.createInstruction(e,i,n,r,s)),s;case"\r":case"\n":if(o)continue;return-1===r&&(r=s),e.addInstruction(this.createInstruction(e,i,n,s,s)),s;case"#":if(o)continue;default:r=s+1,i+=t,o=!1}return-1===r&&(r=this.buffer.length),e.addInstruction(this.createInstruction(e,i,n,r,this.buffer.length)),this.buffer.length}processHeredocs(e,t){let n=e.getKeyword();if(n===T.Keyword.ONBUILD){if(null===(e=e.getTriggerInstruction()))return t;n=e.getKeyword()}if(n!==T.Keyword.ADD&&n!==T.Keyword.COPY&&n!==T.Keyword.RUN)return t;const i=[];let r=!1;for(const t of e.getArguments()){const e=t.getValue();if(e.startsWith("<<")&&e.length>2){e.startsWith("<<-")&&(r=!0);const t=w.Util.parseHeredocName(e);null!==t&&i.push(t)}}if(i.length>0)for(const e of i)t=this.parseHeredoc(e,t,r);return t}processArguments(e,t,n,i,r){let o=!1;e:for(let s=r+1;s<this.buffer.length;s++)switch(this.buffer.charAt(s)){case"\r":case"\n":if(o)continue;return this.processHeredocs(this.createInstruction(e,t,i,n,s),s);case this.escapeChar:const r=this.buffer.charAt(s+1);if("\n"===r||"\r"===r)o=!0,s++;else if(" "===r||"\t"===r){for(let e=s+2;e<this.buffer.length;e++)switch(this.buffer.charAt(e)){case" ":case"\t":break;case"\r":case"\n":o=!0;default:s=e;continue e}return this.buffer.length}continue;case"#":if(o){s=this.processComment(e,s);continue e}break;case" ":case"\t":break;default:o&&(o=!1)}return this.buffer.length}processComment(e,t){let n=this.buffer.length;e:for(let e=t+1;e<this.buffer.length;e++)switch(this.buffer.charAt(e)){case"\r":case"\n":n=e;break e}const i=r.Range.create(this.document.positionAt(t),this.document.positionAt(n));return e.addComment(new o.Comment(this.document,i)),n}parseHeredoc(e,t,n){let i=-1,r=!0;for(let o=t;o<this.buffer.length;o++)switch(this.buffer.charAt(o)){case" ":r=!1;break;case"\t":n||(r=!1);break;case"\r":case"\n":if(-1!==i&&e===this.buffer.substring(i,o))return o;i=-1,r=!0;break;default:r&&(i=o,r=!1)}return this.buffer.length}createInstruction(e,t,n,i,o){const s=this.document.positionAt(n),a=r.Range.create(s,this.document.positionAt(i)),c=r.Range.create(s,this.document.positionAt(o));return k.createInstruction(this.document,e,this.escapeChar,c,t,a)}}t.Parser=k},2494:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParserDirective=void 0;const i=n(9585),r=n(4526);class o extends r.Line{constructor(e,t,n,i){super(e,t),this.nameRange=n,this.valueRange=i}toString(){return"# "+this.getName()+"="+this.getValue()}getNameRange(){return this.nameRange}getValueRange(){return this.valueRange}getName(){return this.document.getText().substring(this.document.offsetAt(this.nameRange.start),this.document.offsetAt(this.nameRange.end))}getValue(){return this.document.getText().substring(this.document.offsetAt(this.valueRange.start),this.document.offsetAt(this.valueRange.end))}getDirective(){const e=i.Directive[this.getName().toLowerCase()];return void 0===e?null:e}}t.ParserDirective=o},3238:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Property=void 0;const i=n(4815),r=n(5328);class o{constructor(e,t,n,r){this.assignmentOperatorRange=null,this.assignmentOperator=null,this.valueRange=null,this.value=null,this.document=e,this.escapeChar=t,this.nameRange=o.getNameRange(e,n);let s=e.getText().substring(e.offsetAt(this.nameRange.start),e.offsetAt(this.nameRange.end));if(this.name=o.getValue(s,t),r)this.valueRange=r.getRange(),s=e.getText().substring(e.offsetAt(this.valueRange.start),e.offsetAt(this.valueRange.end)),this.value=o.getValue(s,t),this.range=i.Range.create(this.nameRange.start,this.valueRange.end);else{let r=n.getRange();this.nameRange.start.line===r.start.line&&this.nameRange.start.character===r.start.character&&this.nameRange.end.line===r.end.line&&this.nameRange.end.character===r.end.character||(this.valueRange=o.getValueRange(e,n),s=e.getText().substring(e.offsetAt(this.valueRange.start),e.offsetAt(this.valueRange.end)),this.value=o.getValue(s,t),this.assignmentOperatorRange=i.Range.create(this.nameRange.end,this.valueRange.start),this.assignmentOperator="="),this.range=r}}getRange(){return this.range}getName(){return this.name}getNameRange(){return this.nameRange}getValue(){return this.value}getValueRange(){return this.valueRange}getAssignmentOperator(){return this.assignmentOperator}getAssignmentOperatorRange(){return this.assignmentOperatorRange}getUnescapedValue(){if(null===this.valueRange)return null;let e=!1,t="",n=this.document.getText().substring(this.document.offsetAt(this.valueRange.start),this.document.offsetAt(this.valueRange.end));e:for(let i=0;i<n.length;i++){let r=n.charAt(i);switch(r){case this.escapeChar:for(let o=i+1;o<n.length;o++)switch(n.charAt(o)){case"\r":o++;case"\n":e=!0,i=o;continue e;case" ":case"\t":break;default:t+=r;continue e}t+=r;break;case"\r":case"\n":break;case" ":case"\t":e||(t+=r);break;case"#":if(e)for(let e=i+1;e<n.length;e++)switch(n.charAt(e)){case"\r":e++;case"\n":i=e;continue e}else t+=r;break;default:t+=r,e=!1}}return t}static getNameRange(e,t){let n=t.getValue(),r=n.indexOf("=");if(-1!==r){let o=n.charAt(0),s=n.charAt(r-1);if('"'===o&&'"'===s||"'"===o&&"'"===s||'"'!==o&&"'"!==o)return i.Range.create(t.getRange().start,e.positionAt(e.offsetAt(t.getRange().start)+r))}return t.getRange()}static getValueRange(e,t){return i.Range.create(e.positionAt(e.offsetAt(t.getRange().start)+t.getValue().indexOf("=")+1),e.positionAt(e.offsetAt(t.getRange().end)))}static getValue(e,t){let n=!1;const i=r.Util.findLeadingNonWhitespace(e,t);0!==i&&"#"===e.charAt(i)&&(n=!0);let o=(e=e.substring(i)).charAt(0),s=e.charAt(e.length-1),a="'"===o||'"'===o,c="'"===o&&"'"===s,u=!1;if('"'===o)for(let n=1;n<e.length;n++)e.charAt(n)===t?n++:'"'===e.charAt(n)&&n===e.length-1&&(u=!0);(c||u)&&(e=e.substring(1,e.length-1));let l=-1,d="",h=0;e:for(let i=0;i<e.length;i++){let r=e.charAt(i);switch(r){case t:if(i+1===e.length){d+=t;break e}if(r=e.charAt(i+1)," "===r||"\t"===r)t:for(let o=i+2;o<e.length;o++){let s=e.charAt(o);switch(s){case" ":case"\t":break;case"\r":o++;case"\n":n=!0,i=o;continue e;default:if(!u&&!c&&!a){s===t?(d+=r,i+=1):(d=d+r+s,i=o);continue e}break t}}if(u){"\r"===r?(n=!0,i+=2):"\n"===r?(n=!0,i++):'"'!==r&&(r===t&&i++,d+=t);continue e}if(c||a){"\r"===r?(n=!0,i+=2):"\n"===r?(n=!0,i++):d+=t;continue e}r===t?(d+=t,i++):"\r"===r?(n=!0,i+=2):"\n"===r?(n=!0,i++,h=i):(d+=r,i++);break;case" ":case"\t":n&&-1===l&&(l=i),d+=r;break;case"\r":i++;case"\n":n&&-1!==l&&(d=d.substring(0,d.length-(i-l-1)),l=-1);break;case"#":if(n){-1!==l&&(d=d.substring(0,d.length-(i-l)),l=-1);t:for(let t=i+1;t<e.length;t++)switch(e.charAt(t)){case"\r":t++;case"\n":i=t;break t}continue e}default:n&&(n=!1,l=-1),d+=r}}return d}}t.Property=o},3437:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyInstruction=void 0;const i=n(4815),r=n(14),o=n(3238),s=n(9051),a=n(5328);class c extends r.Instruction{constructor(e,t,n,i,r,o){super(e,t,n,i,r,o),this.properties=void 0}getProperties(){if(void 0===this.properties){let e=this.getPropertyArguments();if(0===e.length)this.properties=[];else if(1===e.length)this.properties=[new o.Property(this.document,this.escapeChar,e[0])];else if(2===e.length)-1===e[0].getValue().indexOf("=")?this.properties=[new o.Property(this.document,this.escapeChar,e[0],e[1])]:this.properties=[new o.Property(this.document,this.escapeChar,e[0]),new o.Property(this.document,this.escapeChar,e[1])];else if(-1===e[0].getValue().indexOf("=")){let t=this.document.getText(),n=e[1].getRange().start,r=e[e.length-1].getRange().end;t=t.substring(this.document.offsetAt(n),this.document.offsetAt(r)),this.properties=[new o.Property(this.document,this.escapeChar,e[0],new s.Argument(t,i.Range.create(e[1].getRange().start,e[e.length-1].getRange().end)))]}else{this.properties=[];for(let t=0;t<e.length;t++)this.properties.push(new o.Property(this.document,this.escapeChar,e[t]))}}return this.properties}findTrailingNonWhitespace(e){let t=e.length;e:for(let n=e.length-1;n>=0;n--)switch(e.charAt(n)){case" ":case"\t":continue;case"\n":"\r"===e.charAt(n-1)&&(n-=1);case"\r":t:for(let i=n-1;i>=0;i--)switch(e.charAt(i)){case" ":case"\t":case"\r":case"\n":case this.escapeChar:continue;default:t=i;break t}break e;default:t=n;break e}return t}getPropertyArguments(){const e=[];let t=this.getInstructionRange(),n=this.document.offsetAt(t.end),r=n-this.document.offsetAt(t.start),o=this.getTextContent(),c=o.substring(r),u=a.Util.findLeadingNonWhitespace(c,this.escapeChar);if(-1===u)return[];const l=this.document.positionAt(n+u);let d=t.start.line!==l.line,h=!1,g=-1,p=this.findTrailingNonWhitespace(c);o=c.substring(u,p+1);let f=d?-1:0,m=!1;e:for(let t=0;t<o.length;t++){let r=o.charAt(t);switch(r){case this.escapeChar:if(t+1===o.length){h=!0;break e}switch(d||(g=t),o.charAt(t+1)){case" ":case"\t":if(!a.Util.isWhitespace(o.charAt(t+2))){t+=1;continue e}t:for(let r=t+2;r<o.length;r++)switch(o.charAt(r)){case"\r":r++;case"\n":d=!0,t=r;continue e;case" ":case"\t":break;default:e.push(new s.Argument(o.substring(f,t),i.Range.create(this.document.positionAt(n+u+f),this.document.positionAt(n+u+t+2)))),f=r;break t}t=f-1;continue e;case"\r":t++;case"\n":d=!0,t+=1;continue e;case this.escapeChar:-1===f&&(f=t),t+=1;continue e;default:-1===f&&(f=t);continue e}case"'":case'"':m&&(this.createSpacedArgument(f,e,o,g,n,u),f=t,m=!1),-1===f&&(f=t);for(let a=t+1;a<o.length;a++)switch(o.charAt(a)){case r:if(" "!==o.charAt(a+1)&&""!==o.charAt(a+1)){t=a;continue e}e.push(new s.Argument(o.substring(f,a+1),i.Range.create(this.document.positionAt(n+u+f),this.document.positionAt(n+u+a+1)))),t=a,f=-1;continue e;case this.escapeChar:a++}break e;case" ":case"\t":d?-1!==f&&(m=!0):-1!==f&&(e.push(new s.Argument(o.substring(f,t),i.Range.create(this.document.positionAt(n+u+f),this.document.positionAt(n+u+t)))),f=-1);break;case"\r":t++;case"\n":m=!1;break;case"#":if(d){for(let e=t+1;e<o.length;e++)switch(o.charAt(e)){case"\r":e++;case"\n":t=e,m=!1;continue e}if(-1!==f){let t=o.substring(f,g);e.push(new s.Argument(t,i.Range.create(this.document.positionAt(n+u+f),this.document.positionAt(n+u+g)))),f=-1}break e}-1===f&&(f=t);break;default:if(m&&(this.createSpacedArgument(f,e,o,g,n,u),f=t,m=!1),d=!1,-1===f&&(f=t),"$"===r&&"{"===o.charAt(t+1)){let e=!1,n=!1,i=!1;for(let r=t+1;r<o.length;r++)switch(o.charAt(r)){case this.escapeChar:i=!0;break;case"\r":case"\n":break;case"'":e=!e,i=!1;break;case'"':n=!n,i=!1;break;case" ":case"\t":if(i||e||n)break;t=r-1;continue e;case"}":t=r;continue e;default:i=!1}break e}}}if(-1!==f&&f!==o.length){let t=h?o.length-1:o.length,r=o.substring(f,t);e.push(new s.Argument(r,i.Range.create(this.document.positionAt(n+u+f),this.document.positionAt(n+u+t))))}return e}createSpacedArgument(e,t,n,r,o,a){-1!==e&&t.push(new s.Argument(n.substring(e,r),i.Range.create(this.document.positionAt(o+a+e),this.document.positionAt(o+a+r))))}}t.PropertyInstruction=c},5328:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;class n{static isUTF8BOM(e){const t=Uint8Array.from(Buffer.from(e,"UTF-8"));return 239===t[0]&&187==t[1]&&191==t[2]}static isWhitespace(e){return" "===e||"\t"===e||n.isNewline(e)}static isNewline(e){return"\r"===e||"\n"===e}static findLeadingNonWhitespace(e,t){e:for(let n=0;n<e.length;n++)switch(e.charAt(n)){case" ":case"\t":continue;case t:t:for(let t=n+1;t<e.length;t++)switch(e.charAt(t)){case" ":case"\t":continue;case"\r":n=t+1;continue e;case"\n":n=t;continue e;default:break t}return-1;default:return n}return-1}static isInsideRange(e,t){return t.start.line===t.end.line?t.start.line===e.line&&t.start.character<=e.character&&e.character<=t.end.character:t.start.line===e.line?t.start.character<=e.character:t.end.line===e.line?e.character<=t.end.character:t.start.line<e.line&&e.line<t.end.line}static parseHeredocName(e){if("-"===(e=e.substring(2)).charAt(0)&&(e=e.substring(1)),'"'===e.charAt(0)){if('"'!==e.charAt(e.length-1))return null;e=e.substring(1,e.length-1)}if("'"===e.charAt(0)){if("'"!==e.charAt(e.length-1))return null;e=e.substring(1,e.length-1)}return"<"===e.charAt(0)?null:e}}t.Util=n},3784:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Variable=void 0,t.Variable=class{constructor(e,t,n,i,r,o,s,a,c,u){this.name=e,this.nameRange=t,this.range=n,this.modifier=i,this.modifierRange=r,this.substitutionParameter=o,this.substitutionRange=s,this.defined=a,this.buildVariable=c,this.stringValue=u}toString(){return this.stringValue}getName(){return this.name}getNameRange(){return this.nameRange}getRange(){return this.range}getModifier(){return this.modifier}getModifierRange(){return this.modifierRange}getSubstitutionParameter(){return this.substitutionParameter}getSubstitutionRange(){return this.substitutionRange}isDefined(){return this.defined}isBuildVariable(){return!0===this.buildVariable}isEnvironmentVariable(){return!1===this.buildVariable}}},6611:(e,t,n)=>{var i=n(3519),r=function(){},o=function(e,t,n){if("function"==typeof t)return o(e,null,t);t||(t={}),n=i(n||r);var s=e._writableState,a=e._readableState,c=t.readable||!1!==t.readable&&e.readable,u=t.writable||!1!==t.writable&&e.writable,l=!1,d=function(){e.writable||h()},h=function(){u=!1,c||n.call(e)},g=function(){c=!1,u||n.call(e)},p=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},f=function(t){n.call(e,t)},m=function(){process.nextTick(v)},v=function(){if(!l)return(!c||a&&a.ended&&!a.destroyed)&&(!u||s&&s.ended&&!s.destroyed)?void 0:n.call(e,new Error("premature close"))},y=function(){e.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(e)?(e.on("complete",h),e.on("abort",m),e.req?y():e.on("request",y)):u&&!s&&(e.on("end",d),e.on("close",d)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",p),e.on("end",g),e.on("finish",h),!1!==t.error&&e.on("error",f),e.on("close",m),function(){l=!0,e.removeListener("complete",h),e.removeListener("abort",m),e.removeListener("request",y),e.req&&e.req.removeListener("finish",h),e.removeListener("end",d),e.removeListener("close",d),e.removeListener("finish",h),e.removeListener("exit",p),e.removeListener("end",g),e.removeListener("error",f),e.removeListener("close",m)}};e.exports=o},4263:function(e,t,n){var i,r,o;!function(){"use strict";r=[n(343)],void 0===(o="function"==typeof(i=function(e){var t=/(^|@)\S+:\d+/,n=/^\s*at .*(\S+:\d+|\(native\))/m,i=/^(eval@)?(\[native code])?$/;return{parse:function(e){if(void 0!==e.stacktrace||void 0!==e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(n))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw new Error("Cannot parse given Error object")},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter((function(e){return!!e.match(n)}),this).map((function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),i=n.match(/ (\(.+\)$)/);n=i?n.replace(i[0],""):n;var r=this.extractLocation(i?i[1]:n),o=i&&n||void 0,s=["eval","<anonymous>"].indexOf(r[0])>-1?void 0:r[0];return new e({functionName:o,fileName:s,lineNumber:r[1],columnNumber:r[2],source:t})}),this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter((function(e){return!e.match(i)}),this).map((function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new e({functionName:t});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,i=t.match(n),r=i&&i[1]?i[1]:void 0,o=this.extractLocation(t.replace(n,""));return new e({functionName:r,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:t})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,i=t.message.split("\n"),r=[],o=2,s=i.length;o<s;o+=2){var a=n.exec(i[o]);a&&r.push(new e({fileName:a[2],lineNumber:a[1],source:i[o]}))}return r},parseOpera10:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,i=t.stacktrace.split("\n"),r=[],o=0,s=i.length;o<s;o+=2){var a=n.exec(i[o]);a&&r.push(new e({functionName:a[3]||void 0,fileName:a[2],lineNumber:a[1],source:i[o]}))}return r},parseOpera11:function(n){return n.stack.split("\n").filter((function(e){return!!e.match(t)&&!e.match(/^Error created at/)}),this).map((function(t){var n,i=t.split("@"),r=this.extractLocation(i.pop()),o=i.shift()||"",s=o.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;o.match(/\(([^)]*)\)/)&&(n=o.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===n||"[arguments not available]"===n?void 0:n.split(",");return new e({functionName:s,args:a,fileName:r[0],lineNumber:r[1],columnNumber:r[2],source:t})}),this)}}})?i.apply(t,r):i)||(e.exports=o)}()},7209:e=>{e.exports=function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}}},3519:(e,t,n)=>{var i=n(6587);function r(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}e.exports=i(r),e.exports.strict=i(o),r.proto=r((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return r(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},815:(e,t,n)=>{var i=n(3519),r=n(6611),o=n(9896),s=function(){},a=/^v?\.0/.test(process.version),c=function(e){return"function"==typeof e},u=function(e){e()},l=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),n=c(t[t.length-1]||s)&&t.pop()||s;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var d=t.map((function(l,h){var g=h<t.length-1;return function(e,t,n,u){u=i(u);var l=!1;e.on("close",(function(){l=!0})),r(e,{readable:t,writable:n},(function(e){if(e)return u(e);l=!0,u()}));var d=!1;return function(t){if(!l&&!d)return d=!0,function(e){return!!a&&!!o&&(e instanceof(o.ReadStream||s)||e instanceof(o.WriteStream||s))&&c(e.close)}(e)?e.close(s):function(e){return e.setHeader&&c(e.abort)}(e)?e.abort():c(e.destroy)?e.destroy():void u(t||new Error("stream was destroyed"))}}(l,g,h>0,(function(t){e||(e=t),t&&d.forEach(u),g||(d.forEach(u),n(e))}))}));return t.reduce(l)}},3904:(e,t,n)=>{const i=Symbol("SemVer ANY");class r{static get ANY(){return i}constructor(e,t){if(t=o(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===i?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new l(n[2],this.options.loose):this.semver=i}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===i||e===i)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=o(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=r;const o=n(8587),{safeRe:s,t:a}=n(9718),c=n(2111),u=n(7272),l=n(3908),d=n(8311)},8311:(e,t,n)=>{const i=/\s+/g;class r{constructor(e,t){if(t=s(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof a)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(i," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!v(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&y(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&m))+":"+e,n=o.get(t);if(n)return n;const i=this.options.loose,r=i?l[d.HYPHENRANGELOOSE]:l[d.HYPHENRANGE];e=e.replace(r,E(this.options.includePrerelease)),c("hyphen replace",e),e=e.replace(l[d.COMPARATORTRIM],h),c("comparator trim",e),e=e.replace(l[d.TILDETRIM],g),c("tilde trim",e),e=e.replace(l[d.CARETTRIM],p),c("caret trim",e);let s=e.split(" ").map((e=>C(e,this.options))).join(" ").split(/\s+/).map((e=>x(e,this.options)));i&&(s=s.filter((e=>(c("loose invalid filter",e,this.options),!!e.match(l[d.COMPARATORLOOSE]))))),c("range list",s);const u=new Map,y=s.map((e=>new a(e,this.options)));for(const e of y){if(v(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");const b=[...u.values()];return o.set(t,b),b}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some((n=>b(n,t)&&e.set.some((e=>b(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(O(this.set[t],e,this.options))return!0;return!1}}e.exports=r;const o=new(n(8794)),s=n(8587),a=n(3904),c=n(7272),u=n(3908),{safeRe:l,t:d,comparatorTrimReplace:h,tildeTrimReplace:g,caretTrimReplace:p}=n(9718),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:m}=n(6874),v=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,b=(e,t)=>{let n=!0;const i=e.slice();let r=i.pop();for(;n&&i.length;)n=i.every((e=>r.intersects(e,t))),r=i.pop();return n},C=(e,t)=>(c("comp",e,t),e=S(e,t),c("caret",e),e=_(e,t),c("tildes",e),e=T(e,t),c("xrange",e),e=P(e,t),c("stars",e),e),R=e=>!e||"x"===e.toLowerCase()||"*"===e,_=(e,t)=>e.trim().split(/\s+/).map((e=>D(e,t))).join(" "),D=(e,t)=>{const n=t.loose?l[d.TILDELOOSE]:l[d.TILDE];return e.replace(n,((t,n,i,r,o)=>{let s;return c("tilde",e,t,n,i,r,o),R(n)?s="":R(i)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:R(r)?s=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:o?(c("replaceTilde pr",o),s=`>=${n}.${i}.${r}-${o} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${r} <${n}.${+i+1}.0-0`,c("tilde return",s),s}))},S=(e,t)=>e.trim().split(/\s+/).map((e=>w(e,t))).join(" "),w=(e,t)=>{c("caret",e,t);const n=t.loose?l[d.CARETLOOSE]:l[d.CARET],i=t.includePrerelease?"-0":"";return e.replace(n,((t,n,r,o,s)=>{let a;return c("caret",e,t,n,r,o,s),R(n)?a="":R(r)?a=`>=${n}.0.0${i} <${+n+1}.0.0-0`:R(o)?a="0"===n?`>=${n}.${r}.0${i} <${n}.${+r+1}.0-0`:`>=${n}.${r}.0${i} <${+n+1}.0.0-0`:s?(c("replaceCaret pr",s),a="0"===n?"0"===r?`>=${n}.${r}.${o}-${s} <${n}.${r}.${+o+1}-0`:`>=${n}.${r}.${o}-${s} <${n}.${+r+1}.0-0`:`>=${n}.${r}.${o}-${s} <${+n+1}.0.0-0`):(c("no pr"),a="0"===n?"0"===r?`>=${n}.${r}.${o}${i} <${n}.${r}.${+o+1}-0`:`>=${n}.${r}.${o}${i} <${n}.${+r+1}.0-0`:`>=${n}.${r}.${o} <${+n+1}.0.0-0`),c("caret return",a),a}))},T=(e,t)=>(c("replaceXRanges",e,t),e.split(/\s+/).map((e=>k(e,t))).join(" ")),k=(e,t)=>{e=e.trim();const n=t.loose?l[d.XRANGELOOSE]:l[d.XRANGE];return e.replace(n,((n,i,r,o,s,a)=>{c("xRange",e,n,i,r,o,s,a);const u=R(r),l=u||R(o),d=l||R(s),h=d;return"="===i&&h&&(i=""),a=t.includePrerelease?"-0":"",u?n=">"===i||"<"===i?"<0.0.0-0":"*":i&&h?(l&&(o=0),s=0,">"===i?(i=">=",l?(r=+r+1,o=0,s=0):(o=+o+1,s=0)):"<="===i&&(i="<",l?r=+r+1:o=+o+1),"<"===i&&(a="-0"),n=`${i+r}.${o}.${s}${a}`):l?n=`>=${r}.0.0${a} <${+r+1}.0.0-0`:d&&(n=`>=${r}.${o}.0${a} <${r}.${+o+1}.0-0`),c("xRange return",n),n}))},P=(e,t)=>(c("replaceStars",e,t),e.trim().replace(l[d.STAR],"")),x=(e,t)=>(c("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),E=e=>(t,n,i,r,o,s,a,c,u,l,d,h)=>`${n=R(i)?"":R(r)?`>=${i}.0.0${e?"-0":""}`:R(o)?`>=${i}.${r}.0${e?"-0":""}`:s?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=R(u)?"":R(l)?`<${+u+1}.0.0-0`:R(d)?`<${u}.${+l+1}.0-0`:h?`<=${u}.${l}.${d}-${h}`:e?`<${u}.${l}.${+d+1}-0`:`<=${c}`}`.trim(),O=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(c(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){const i=e[n].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}},3908:(e,t,n)=>{const i=n(7272),{MAX_LENGTH:r,MAX_SAFE_INTEGER:o}=n(6874),{safeRe:s,t:a}=n(9718),c=n(8587),{compareIdentifiers:u}=n(1123);class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>r)throw new TypeError(`version is longer than ${r} characters`);i("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(i("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],r=e.prerelease[t];if(i("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return u(n,r)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const n=this.build[t],r=e.build[t];if(i("build compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return u(n,r)}while(++t)}inc(e,t,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];!1===n&&(i=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=l},2111:(e,t,n)=>{const i=n(4641),r=n(3999),o=n(5580),s=n(4089),a=n(7059),c=n(5200);e.exports=(e,t,n,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return i(e,n,u);case"!=":return r(e,n,u);case">":return o(e,n,u);case">=":return s(e,n,u);case"<":return a(e,n,u);case"<=":return c(e,n,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},560:(e,t,n)=>{const i=n(3908);e.exports=(e,t,n)=>new i(e,n).compare(new i(t,n))},4641:(e,t,n)=>{const i=n(560);e.exports=(e,t,n)=>0===i(e,t,n)},5580:(e,t,n)=>{const i=n(560);e.exports=(e,t,n)=>i(e,t,n)>0},4089:(e,t,n)=>{const i=n(560);e.exports=(e,t,n)=>i(e,t,n)>=0},7059:(e,t,n)=>{const i=n(560);e.exports=(e,t,n)=>i(e,t,n)<0},5200:(e,t,n)=>{const i=n(560);e.exports=(e,t,n)=>i(e,t,n)<=0},3999:(e,t,n)=>{const i=n(560);e.exports=(e,t,n)=>0!==i(e,t,n)},144:(e,t,n)=>{const i=n(3908);e.exports=(e,t,n=!1)=>{if(e instanceof i)return e;try{return new i(e,t)}catch(e){if(!n)return null;throw e}}},7638:(e,t,n)=>{const i=n(8311);e.exports=(e,t,n)=>{try{t=new i(t,n)}catch(e){return!1}return t.test(e)}},6874:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},7272:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},1123:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const i=t.test(e),r=t.test(n);return i&&r&&(e=+e,n=+n),e===n?0:i&&!r?-1:r&&!i?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},8794:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},8587:e=>{const t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},9718:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:o}=n(6874),s=n(7272),a=(t=e.exports={}).re=[],c=t.safeRe=[],u=t.src=[],l=t.t={};let d=0;const h="[a-zA-Z0-9-]",g=[["\\s",1],["\\d",o],[h,r]],p=(e,t,n)=>{const i=(e=>{for(const[t,n]of g)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),r=d++;s(e,r,t),l[e]=r,u[r]=t,a[r]=new RegExp(t,n?"g":void 0),c[r]=new RegExp(i,n?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),p("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${u[l.NUMERICIDENTIFIER]}|${u[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NUMERICIDENTIFIERLOOSE]}|${u[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${h}+`),p("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`),p("FULL",`^${u[l.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`),p("LOOSE",`^${u[l.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?)?)?`),p("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),p("COERCE",`${u[l.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",u[l.COERCEPLAIN]+`(?:${u[l.PRERELEASE]})?`+`(?:${u[l.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",u[l.COERCE],!0),p("COERCERTLFULL",u[l.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})\\s+-\\s+(${u[l.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[l.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},8887:function(e,t,n){var i,r,o;!function(){"use strict";r=[n(343)],i=function(e){return{backtrace:function(t){var n=[],i=10;"object"==typeof t&&"number"==typeof t.maxStackSize&&(i=t.maxStackSize);for(var r=arguments.callee;r&&n.length<i&&r.arguments;){for(var o=new Array(r.arguments.length),s=0;s<o.length;++s)o[s]=r.arguments[s];/function(?:\s+([\w$]+))+\s*\(/.test(r.toString())?n.push(new e({functionName:RegExp.$1||void 0,args:o})):n.push(new e({args:o}));try{r=r.caller}catch(e){break}}return n}}},void 0===(o=i.apply(t,r))||(e.exports=o)}()},343:function(e,t){var n,i,r;!function(){"use strict";i=[],void 0===(r="function"==typeof(n=function(){function e(e){return e.charAt(0).toUpperCase()+e.substring(1)}function t(e){return function(){return this[e]}}var n=["isConstructor","isEval","isNative","isToplevel"],i=["columnNumber","lineNumber"],r=["fileName","functionName","source"],o=n.concat(i,r,["args"],["evalOrigin"]);function s(t){if(t)for(var n=0;n<o.length;n++)void 0!==t[o[n]]&&this["set"+e(o[n])](t[o[n]])}s.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof s)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new s(e)}},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",n=this.getColumnNumber()||"",i=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+n+")":"[eval]:"+t+":"+n:i?i+" ("+e+":"+t+":"+n+")":e+":"+t+":"+n}},s.fromString=function(e){var t=e.indexOf("("),n=e.lastIndexOf(")"),i=e.substring(0,t),r=e.substring(t+1,n).split(","),o=e.substring(n+1);if(0===o.indexOf("@"))var a=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(o,""),c=a[1],u=a[2],l=a[3];return new s({functionName:i,args:r||void 0,fileName:c,lineNumber:u||void 0,columnNumber:l||void 0})};for(var a=0;a<n.length;a++)s.prototype["get"+e(n[a])]=t(n[a]),s.prototype["set"+e(n[a])]=function(e){return function(t){this[e]=Boolean(t)}}(n[a]);for(var c=0;c<i.length;c++)s.prototype["get"+e(i[c])]=t(i[c]),s.prototype["set"+e(i[c])]=function(e){return function(t){if(n=t,isNaN(parseFloat(n))||!isFinite(n))throw new TypeError(e+" must be a Number");var n;this[e]=Number(t)}}(i[c]);for(var u=0;u<r.length;u++)s.prototype["get"+e(r[u])]=t(r[u]),s.prototype["set"+e(r[u])]=function(e){return function(t){this[e]=String(t)}}(r[u]);return s})?n.apply(t,i):n)||(e.exports=r)}()},2742:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.DebugEditorContentsCommandId=void 0,t.setupDebugging=function(e){let t=s.window.createOutputChannel("Docker Buildx DAP","log");e.subscriptions.push(s.debug.registerDebugConfigurationProvider("dockerfile",new u)),e.subscriptions.push(s.debug.registerDebugAdapterDescriptorFactory("dockerfile",new c)),s.debug.registerDebugAdapterTrackerFactory("dockerfile",{createDebugAdapterTracker:e=>new l(e.id,e.name,t)})};const s=o(n(1398)),a=n(9929);t.DebugEditorContentsCommandId="docker.debug.editorContents";class c{createDebugAdapterDescriptor(e){(0,a.queueTelemetryEvent)("client_user_action",!1,{action_id:"docker.buildx.debug.createDebugAdapterDescriptor",result:!0});var t=["buildx"];e.configuration?.builder&&(t=t.concat(["--builder",e.configuration?.builder])),t=t.concat(["dap","build"]),e.configuration?.args&&(t=t.concat(e.configuration?.args));const n={cwd:e.configuration.cwd??e.workspaceFolder?.uri.fsPath,env:{BUILDX_EXPERIMENTAL:"1"}};return new s.DebugAdapterExecutable("docker",t,n)}}class u{resolveDebugConfiguration(e,t){const n=0===Object.keys(t).length?"undefined":"defined";if((0,a.queueTelemetryEvent)("client_user_action",!1,{action_id:"docker.buildx.debug.resolveDebugConfiguration",result:n}),!t.type&&!t.request&&!t.name){const e=s.window.activeTextEditor;void 0!==e&&"dockerfile"===e.document.languageId&&(t.type="dockerfile",t.name="Docker: Build",t.request="launch",t.dockerfile=e.document.uri.fsPath,t.contextPath="${workspaceFolder}",t.cwd="${workspaceFolder}")}return t}}class l{id;name;channel;constructor(e,t,n){this.id=e,this.name=t,this.channel=n}log(e,t){t.id=this.id,t.name=this.name,this.channel.appendLine(`${(new Date).toISOString()} [${e}] ${JSON.stringify(t)}`)}onWillStartSession(){this.log("debug",{message:"DAP session about to be started"})}onWillStopSession(){this.log("debug",{message:"DAP session about to be stopped"})}onWillReceiveMessage(e){this.log("debug",{message:"DAP message will be received from the editor",dapMessage:e})}onDidSendMessage(e){this.log("debug",{message:"DAP message has been sent to the editor",dapMessage:e})}onExit(e,t){const n={message:"DAP exited",code:e,signal:t};0===e?this.log("debug",n):this.log("error",n)}onError(e){this.log("error",{message:"DAP error occurred",dapMessage:{error:String(e)}})}}},4265:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.extensionVersion=t.ScoutImageScanCommandId=t.BakeBuildCommandId=void 0,t.registerCommand=D,t.activate=async function(e){(0,b.setupDebugging)(e),(0,y.hookDecorators)(e);const n=await async function(){const e=(0,m.inspectExtensionSetting)("enableComposeLanguageServer");return void 0!==u.extensions.getExtension("redhat.vscode-yaml")&&void 0!==e&&void 0===e.globalValue?(await(0,m.disableEnableComposeLanguageServer)(),"false"):void 0===e?"undefined":String(e.globalValue)}();t.extensionVersion=String(e.extension.packageJSON.version),""!==R&&l.default.start({apiKey:R,appType:"vscode",appVersion:t.extensionVersion,autoDetectErrors:!1,hostname:u.env.machineId,metadata:{system:{os:"win32"===process.platform?"windows":process.platform,arch:"x64"===process.arch?"amd64":process.arch,app_host:u.env.appHost,app_name:u.env.appName,machine_id:u.env.machineId,client_session:u.env.sessionId}},onError:e=>{for(let t=0;t<e.errors.length;t++){e.errors[t].errorMessage=(0,v.redact)(e.errors[t].errorMessage);for(let n=0;n<e.errors[t].stacktrace.length;n++)e.errors[t].stacktrace[n].file=(0,v.redact)(e.errors[t].stacktrace[n].file)}e.device.hostname=u.env.machineId},onSession:e=>{e.id=u.env.sessionId},sendCode:!1}),await async function(e){const t=u.extensions.all.filter((e=>"ms-azuretools.vscode-docker"===e.id||"ms-azuretools.vscode-containers"===e.id||"redhat.vscode-yaml"===e.id)).map((e=>e.id)),n=await w("-v"),i=await w("buildx","version");(0,g.queueTelemetryEvent)(g.EVENT_CLIENT_HEARTBEAT,!1,{docker_version:n,buildx_version:i,installedExtensions:t,settings:{"docker.extension.enableComposeLanguageServer":e}}),(0,g.publishTelemetry)()}(n),function(e){D(e,t.BakeBuildCommandId,(async e=>{const t=await(0,f.spawnDockerCommand)("buildx",["bake","--help"],"Bake is not available. To access Docker Bake's features, install Docker Desktop."),n=["buildx","bake"];"print"===e.call?(n.push("--print"),n.push(e.target)):(n.push("--call"),n.push(e.call),n.push(e.target));const i=new u.Task({type:"shell"},u.TaskScope.Workspace,"docker buildx bake","docker-vscode-extension",new u.ShellExecution("docker",n,{cwd:e.cwd}));return u.tasks.executeTask(i),t})),D(e,t.ScoutImageScanCommandId,(async e=>{const t=(0,f.spawnDockerCommand)("scout",[],"Docker Scout is not available. To access Docker Scout's features, install Docker Desktop."),n={};void 0!==u.workspace.workspaceFolders&&0!==u.workspace.workspaceFolders.length||(n.cwd=(0,c.homedir)());const i=new u.Task({type:"shell"},u.TaskScope.Workspace,"docker scout","docker scout",new u.ShellExecution("docker",["scout","cves",e.fullTag],n));return u.tasks.executeTask(i),t}))}(e),async function(e,t,n){let i=!1;for(const r of u.workspace.textDocuments)if(r.languageId===e&&"file"===r.uri.scheme){t()&&await n(),i=!0;break}if(!i){const i=u.workspace.onDidOpenTextDocument((r=>{r.languageId===e&&"file"===r.uri.scheme&&(t()&&n(),i.dispose())}))}}("dockerfile",(()=>!0===(0,m.getExtensionSetting)("dockerEngineAvailabilityPrompt")),p.checkForDockerEngine),S(e),function(e){e.subscriptions.push(u.env.onDidChangeTelemetryEnabled((()=>{const e=(0,d.getNativeClient)();void 0!==e&&e.isRunning()&&e.sendNotification(h.DidChangeConfigurationNotification.type,{settings:["docker.lsp.telemetry"]})}))),e.subscriptions.push(u.workspace.onDidChangeConfiguration((e=>{const t=(0,d.getNativeClient)();if(void 0===t||!t.isRunning())return;const n=["docker.lsp.telemetry","docker.lsp.experimental.vulnerabilityScanning","docker.lsp.experimental.scout.criticalHighVulnerabilities","docker.lsp.experimental.scout.notPinnedDigest","docker.lsp.experimental.scout.recommendedTag","docker.lsp.experimental.scout.vulnerabilities"].filter((t=>e.affectsConfiguration(t)));n.length>0&&t.sendNotification(h.DidChangeConfigurationNotification.type,{settings:n})})))}(e)},t.deactivate=async function(){const e=(0,d.getNativeClient)();void 0!==e&&e.stop()};const a=n(5317),c=n(857),u=o(n(1398)),l=s(n(4147)),d=n(953),h=n(2339),g=n(9929),p=n(7024),f=n(1036),m=n(2089),v=n(504),y=n(6809),b=n(2742),C=n(6461);t.BakeBuildCommandId="dockerLspClient.bake.build",t.ScoutImageScanCommandId="docker.scout.imageScan";const R=C.SECRETS.BUGSNAG_API_KEY,_=new RegExp("(E[A-Z]+)");function D(e,t,n){e.subscriptions.push(u.commands.registerCommand(t,(async e=>{const i=await n(e);(0,g.queueTelemetryEvent)("client_user_action",!1,{action_id:t,result:i})})))}const S=async e=>{await(0,d.activateDockerNativeLanguageClient)(e)&&(0,d.getNativeClient)().start().then((()=>{}),(e=>{if((0,g.notifyBugsnag)(e),"string"==typeof e){const t=e.match(_);if(null!==t&&t.length>0)return void(0,g.queueTelemetryEvent)(g.EVENT_CLIENT_HEARTBEAT,!0,{error_function:"DockerLanguageClient.start",message:t[0]})}else if(void 0!==e.code)return void(0,g.queueTelemetryEvent)(g.EVENT_CLIENT_HEARTBEAT,!0,{error_function:"DockerLanguageClient.start",message:String(e.code)});(0,g.queueTelemetryEvent)("client_heartbeat",!0,{error_function:"DockerLanguageClient.start",message:"unrecognized"})}))};function w(...e){return new Promise((t=>{let n=null;const i=(0,a.spawn)("docker",e);i.stdout.on("data",(e=>{null===n&&(n=""),n+=String(e).trim()})),i.on("error",(()=>{t("spawn docker -v failed")})),i.on("exit",(e=>{t(String(0===e?n:e))}))}))}},6461:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SECRETS=void 0,t.SECRETS={TELEMETRY_HOST:String("api.docker.com"),TELEMETRY_PATH:String("/events/v1/track"),TELEMETRY_KEY:String("pqy0oGzgG44OJ6MxCniQC20zRWwjG4zPalfPt1Te"),BUGSNAG_API_KEY:String("c5b75b41a335069129747c7196ec207a")}},9929:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_CLIENT_HEARTBEAT=void 0,t.notifyBugsnag=function(e){(function(){if(!c.env.isTelemetryEnabled)return!1;const e=c.workspace.getConfiguration("docker.lsp").get("telemetry");return"error"===e||"all"===e})()&&l.default.notify(e)},t.queueTelemetryEvent=function(e,t,n){if(!c.env.isTelemetryEnabled||""===h||""===g||""===p)return;const i=c.workspace.getConfiguration("docker.lsp").get("telemetry");"off"!==i&&("error"!==i||t)&&(n.os="win32"===process.platform?"windows":process.platform,n.arch="x64"===process.arch?"amd64":process.arch,n.app_host=c.env.appHost,n.app_name=c.env.appName,n.client_name="vscode",n.machine_id=c.env.machineId,n.client_session=c.env.sessionId,n.extension_version=u.extensionVersion,f.push({event:e,event_timestamp:Date.now(),properties:n,source:"editor_integration"}))},t.publishTelemetry=function e(){setTimeout(e,3e4);const t=f.splice(0,500);if(0===t.length)return;const n=a.default.request({host:g,path:p,method:"POST",headers:{"Content-Type":"application/json","User-Agent":"docker-vscode-extension","x-api-key":h}},(e=>{e.on("data",(()=>{})),e.on("end",(()=>{}))}));n.write(JSON.stringify({records:t})),n.end()};const a=s(n(5692)),c=o(n(1398)),u=n(4265),l=s(n(4147)),d=n(6461);t.EVENT_CLIENT_HEARTBEAT="client_heartbeat";const h=d.SECRETS.TELEMETRY_KEY,g=d.SECRETS.TELEMETRY_HOST,p=d.SECRETS.TELEMETRY_PATH,f=[]},504:(e,t)=>{"use strict";function n(e){const t=e.split(/[/\\]/);if(t.length<2)return e;const n=t.pop();return void 0===n?"":`REDACTED/${n}`}Object.defineProperty(t,"__esModule",{value:!0}),t.redact=function(e){const t=e.split(/\s+/);for(let e=0;e<t.length;e++)t[e]=n(t[e]);return t.join(" ")}},6809:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.hookDecorators=function(e){s.workspace.onDidChangeConfiguration((e=>{e.affectsConfiguration("docker.extension.editor.dockerfileBuildStageDecorationLines")&&s.window.visibleTextEditors.forEach((e=>e.setDecorations(c,u(e.document))))}),null,e.subscriptions),s.window.visibleTextEditors.forEach((e=>e.setDecorations(c,u(e.document)))),s.window.onDidChangeVisibleTextEditors((e=>{for(const t of e)t.setDecorations(c,u(t.document))}),null,e.subscriptions),s.workspace.onDidChangeTextDocument((e=>{for(const t of s.window.visibleTextEditors)e.document.uri.scheme===t.document.uri.scheme&&e.document.uri.path===t.document.uri.path&&t.setDecorations(c,u(t.document))}),null,e.subscriptions)};const s=o(n(1398)),a=n(9585),c=s.window.createTextEditorDecorationType({isWholeLine:!0,borderWidth:"1px 0 0 0",borderStyle:"solid",borderColor:new s.ThemeColor("panelTitle.activeBorder")});function u(e){return s.workspace.getConfiguration("docker.extension.editor",e).get("dockerfileBuildStageDecorationLines")&&"dockerfile"===e.languageId&&"file"===e.uri.scheme?a.DockerfileParser.parse(e.getText()).getFROMs().map((e=>{const t=e.getRange().start.line;return new s.Range(t,0,t,0)})):[]}},6589:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.DockerLanguageClient=void 0;const s=o(n(1398)),a=n(2339),c=n(4265),u=n(953),l=n(9929);class d extends a.LanguageClient{fillInitializeParams(e){super.fillInitializeParams(e);const t=void 0!==s.extensions.getExtension("ms-azuretools.vscode-docker")||void 0!==s.extensions.getExtension("ms-azuretools.vscode-containers"),n=s.workspace.getConfiguration("docker.lsp"),i=s.workspace.getConfiguration("docker.extension");e.initializationOptions={dockercomposeExperimental:{composeSupport:i.get("enableComposeLanguageServer")},dockerfileExperimental:{removeOverlappingIssues:t},telemetry:(0,u.getTelemetryValue)(n.get("telemetry"))},e.capabilities.experimental={dockerLanguageServerCapabilities:{clientInfoExtras:{client_name:"vscode",client_session:s.env.sessionId},commands:[c.BakeBuildCommandId]}}}error(e,t,n){return(0,l.queueTelemetryEvent)(l.EVENT_CLIENT_HEARTBEAT,!0,{message:h(e),error_function:"DockerLanguageClient.error",show_notification:n}),super.error(e,t,n)}createDefaultErrorHandler(e){const t=super.createDefaultErrorHandler(e);return{error(e,n,i){const r=t.error(e,n,i);return void 0!==r.action&&(0,l.queueTelemetryEvent)(l.EVENT_CLIENT_HEARTBEAT,!0,{error_function:"ErrorHandler.error",count:i,action:r.action}),(0,l.notifyBugsnag)(e),r},closed(){const e=t.closed();return void 0!==e.action&&(0,l.queueTelemetryEvent)(l.EVENT_CLIENT_HEARTBEAT,!0,{message:h(e.message),error_function:"ErrorHandler.closed",action:e.action}),e}}}}function h(e){return"The Docker Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information."===e||"Docker Language Server client: couldn't create connection to server."===e||"Connection to server got closed. Server will not be restarted."===e||"Server initialization failed."===e||"Connection to server got closed. Server will restart."===e||"Restarting server failed"===e||"Stopping server failed"===e?e:"unrecognized"}t.DockerLanguageClient=d},953:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getNativeClient=void 0,t.getTelemetryValue=m,t.activateDockerNativeLanguageClient=async function(e){return void 0===l.extensions.getExtension("ms-azuretools.vscode-docker")&&void 0===l.extensions.getExtension("ms-azuretools.vscode-containers")&&await async function(e){const t=e.asAbsolutePath(c.join("dist","dockerfile-language-server-nodejs","lib","server.js")),n={run:{module:t,transport:d.TransportKind.ipc},debug:{module:t,transport:d.TransportKind.ipc,options:{execArgv:["--nolazy","--inspect=6009"]}}},i=new d.LanguageClient("dockerfile-language-server","Dockerfile Language Server",n,{documentSelector:[{language:"dockerfile",scheme:"file"}],middleware:{handleDiagnostics:()=>[],workspace:{configuration:e=>e.items.map((e=>"docker.languageserver.formatter"===e.section?{ignoreMultilineInstructions:!0}:{}))}}});i.registerProposedFeatures(),await i.start(),e.subscriptions.push(i)}(e),!!await async function(e){const t={progressOnInitialization:!0,outputChannel:l.window.createOutputChannel("Docker Language Server"),markdown:{isTrusted:!1,supportHtml:!0},middleware:{handleDiagnostics(e,t,n){t.map((e=>{e.source=`Docker DX (${e.source})`})),n(e,t)},workspace:{configuration:(e,t,n)=>n(e,t).map((e=>(e.telemetry=m(e.telemetry),e)))}},documentSelector:[{scheme:"file",language:"dockerfile"},{scheme:"file",language:"dockerbake"},{scheme:"file",language:"dockercompose"}]},n=await async function(e){const t=await async function(){const e=l.workspace.getConfiguration("docker.lsp").get("debugServerPort");return null==e||e<=0?null:new Promise((t=>{try{const n=a.connect({port:e});n.on("connect",(()=>{t(e),n.destroy()})),n.on("error",(()=>{t(null)}))}catch(e){t(null)}}))}();if(null!==t)return()=>{const e=a.connect({port:Number(t)}),n={writer:e,reader:e};return Promise.resolve(n)};const n=function(e){if(!function(){if("x64"===u.arch||"arm64"===u.arch)switch(u.platform){case"win32":case"linux":case"darwin":return!0}return!1}())return null;const t="win32"===u.platform?"windows":u.platform,n="x64"===u.arch?"amd64":u.arch,i="win32"===u.platform?".exe":"";return c.join(e.extensionPath,"bin",`docker-language-server-${t}-${n}${i}`)}(e);return null!==n?(await async function(e){return new Promise((t=>{s.access(e,s.constants.X_OK,(n=>{null!==n?s.chmod(e,493,(e=>{null!==e&&(0,p.queueTelemetryEvent)(p.EVENT_CLIENT_HEARTBEAT,!0,{error_function:"chmod",code:e.code,errno:e.errno}),t()})):t()}))}))}(n),{command:n,transport:d.TransportKind.stdio,args:["start"]}):null}(e);return null!==n&&(f=new h.DockerLanguageClient("dockerLanguageClient","Docker Language Server",n,t),f.registerFeature(new g.InlineCompletionItemFeature(f)),!0)}(e)&&(l.languages.registerCodeActionsProvider("dockerfile",{provideCodeActions:(e,t,n)=>n.diagnostics.filter((e=>{if("Docker DX (docker-language-server)"===e.source){let t=e.code;switch("object"==typeof t&&void 0!==t.value&&(t=t.value),t){case"critical_high_vulnerabilities":case"not_pinned_digest":case"recommended_tag":case"vulnerabilities":return!0}}return!1})).map((e=>{let t=e.code;"object"==typeof t&&void 0!==t.value&&(t=t.value);const n={command:"workbench.action.openSettings",title:`Ignore ${t} errors`};switch(t){case"critical_high_vulnerabilities":n.arguments=["docker.lsp.experimental.scout.criticalHighVulnerabilities"];break;case"not_pinned_digest":n.arguments=["docker.lsp.experimental.scout.notPinnedDigest"];break;case"recommended_tag":n.arguments=["docker.lsp.experimental.scout.recommendedTag"];break;case"vulnerabilities":n.arguments=["docker.lsp.experimental.scout.vulnerabilities"]}return n}))}),e.subscriptions.push(f),!0)};const s=o(n(9896)),a=o(n(9278)),c=o(n(6928)),u=o(n(932)),l=o(n(1398)),d=n(2339),h=n(6589),g=n(3370),p=n(9929);let f;function m(e){if(!l.env.isTelemetryEnabled)return"off";switch(e){case"all":case"error":case"off":return e}return"all"}t.getNativeClient=()=>f},7024:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkForDockerEngine=async function(){if(!(0,o.getExtensionSetting)("dockerEngineAvailabilityPrompt"))return;const e=await new Promise((e=>{let t="";(0,s.spawnDockerCommand)("ps",[],void 0,{onError:()=>e(a.Unavailable),onStderr:e=>{t+=String(e)},onExit:n=>0===n?e(a.Available):t.includes("Sign-in enforcement is enabled")||t.includes("request returned Internal Server Error for API route and version")?e(a.Unauthenticated):e(a.Unavailable)})}));e===a.Unavailable?await(0,r.isDockerDesktopInstalled)()?(0,i.promptOpenDockerDesktop)():(0,i.promptInstallDesktop)():e===a.Unauthenticated&&(0,i.promptUnauthenticatedDesktop)()};const i=n(8194),r=n(1934),o=n(2089),s=n(1036);var a;!function(e){e[e.Unavailable=0]="Unavailable",e[e.Unauthenticated=1]="Unauthenticated",e[e.Available=2]="Available"}(a||(a={}))},1934:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDockerDesktopPath=o,t.isDockerDesktopInstalled=async function(){return new Promise((e=>{(0,r.spawnDockerCommand)("desktop",["version"],void 0,{onError:()=>e(!1),onExit:t=>{if(0===t)return e(!0);(0,i.access)(o(),(t=>{e(null===t)}))}})}))};const i=n(9896),r=n(1036);function o(){switch(process.platform){case"win32":return"C:\\Program Files\\Docker\\Docker\\Docker Desktop.exe";case"darwin":return"/Applications/Docker.app"}return"/opt/docker-desktop/bin/com.docker.backend"}},8194:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.promptUnauthenticatedDesktop=async function(){"Don't show again"===await s.window.showInformationMessage("Docker is not running. To get help with your Dockerfile, sign in to Docker Desktop.","Don't show again")&&await(0,c.disableDockerEngineAvailabilityPrompt)()},t.promptOpenDockerDesktop=async function(){const e=await s.window.showInformationMessage("Docker is not running. To get help with your Dockerfile, start Docker.","Don't show again","Open Docker Desktop");if("Don't show again"===e)await(0,c.disableDockerEngineAvailabilityPrompt)();else if("Open Docker Desktop"===e){const e=(0,u.getDockerDesktopPath)();"darwin"===process.platform?(0,a.spawn)("open",[e]).on("exit",(t=>{0!==t&&s.window.showErrorMessage(`Failed to open Docker Desktop: open ${e}`,{modal:!0})})):(0,a.spawn)(e).on("exit",(t=>{0!==t&&s.window.showErrorMessage(`Failed to open Docker Desktop: ${e}`,{modal:!0})}))}},t.promptInstallDesktop=async function(e="Docker is not running. To get help with your Dockerfile, install Docker."){const t=await s.window.showInformationMessage(e,"Don't show again","Install Docker Desktop");"Don't show again"===t?await(0,c.disableDockerEngineAvailabilityPrompt)():"Install Docker Desktop"===t&&s.env.openExternal(s.Uri.parse("https://docs.docker.com/install/"))};const s=o(n(1398)),a=n(5317),c=n(2089),u=n(1934)},2089:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getExtensionSetting=function(e){return s.workspace.getConfiguration("docker.extension").get(e)},t.inspectExtensionSetting=function(e){return s.workspace.getConfiguration("docker.extension").inspect(e)},t.disableDockerEngineAvailabilityPrompt=async function(){return a("dockerEngineAvailabilityPrompt",!1)},t.disableEnableComposeLanguageServer=async function(){return a("enableComposeLanguageServer",!1)};const s=o(n(1398));async function a(e,t,n=s.ConfigurationTarget.Global){return s.workspace.getConfiguration("docker.extension").update(e,t,n)}},1036:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.spawnDockerCommand=async function(e,t=[],n,s={}){return await new Promise((a=>{const{onExit:c,onError:u,onStdout:l,onStderr:d}=s,h=(0,i.spawn)("docker",[e,...t]);h.on("error",(e=>{u&&u(e),a(!1)})),h.on("exit",(e=>{c&&c(e),a(0===e)})),h.stderr.on("data",(e=>{e.includes("docker: unknown command")&&(0,o.getExtensionSetting)("dockerEngineAvailabilityPrompt")&&(0,r.promptInstallDesktop)(n),d&&d(e)})),l&&h.stdout.on("data",(e=>{l(e)}))}))};const i=n(5317),r=n(8194),o=n(2089)},3281:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;const i=n(6177);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return i.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return i.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return i.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return i.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return i.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return i.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return i.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return i.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return i.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return i.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return i.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return i.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return i.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return i.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return i.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return i.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return i.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return i.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return i.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return i.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return i.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return i.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return i.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return i.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return i.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return i.ParameterStructures}});const r=n(3352);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return r.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return r.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return r.Touch}});const o=n(4019);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return o.Disposable}});const s=n(2676);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});const a=n(9850);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const c=n(4996);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return c.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return c.SharedArrayReceiverStrategy}});const u=n(9085);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return u.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return u.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return u.ReadableStreamMessageReader}});const l=n(3193);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return l.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return l.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return l.WriteableStreamMessageWriter}});const d=n(9244);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const h=n(577);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return h.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return h.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return h.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return h.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return h.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return h.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return h.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return h.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return h.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return h.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return h.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return h.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return h.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return h.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return h.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return h.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return h.MessageStrategy}});const g=n(9590);t.RAL=g.default},9850:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const i=n(9590),r=n(8585),o=n(2676);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:o.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||r.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(s||(t.CancellationToken=s={}));const a=Object.freeze((function(e,t){const n=(0,i.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class c{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?a:(this._emitter||(this._emitter=new o.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=s.None}}},577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const i=n(9590),r=n(8585),o=n(6177),s=n(3352),a=n(2676),c=n(9850);var u,l,d,h,g,p,f,m,v,y,b,C,R,_,D,S,w,T,k;!function(e){e.type=new o.NotificationType("$/cancelRequest")}(u||(u={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(l||(t.ProgressToken=l={})),function(e){e.type=new o.NotificationType("$/progress")}(d||(d={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return r.func(e)}}(h||(h={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(g||(t.Trace=g={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(p||(t.TraceValues=p={})),function(e){e.fromString=function(t){if(!r.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(g||(t.Trace=g={})),function(e){e.Text="text",e.JSON="json"}(f||(t.TraceFormat=f={})),function(e){e.fromString=function(t){return r.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(f||(t.TraceFormat=f={})),function(e){e.type=new o.NotificationType("$/setTrace")}(m||(t.SetTraceNotification=m={})),function(e){e.type=new o.NotificationType("$/logTrace")}(v||(t.LogTraceNotification=v={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(y||(t.ConnectionErrors=y={}));class P extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,P.prototype)}}t.ConnectionError=P,function(e){e.is=function(e){const t=e;return t&&r.func(t.cancelUndispatched)}}(b||(t.ConnectionStrategy=b={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&r.func(t.createCancellationTokenSource)&&(void 0===t.dispose||r.func(t.dispose))}}(C||(t.IdCancellationReceiverStrategy=C={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&r.func(t.createCancellationTokenSource)&&(void 0===t.dispose||r.func(t.dispose))}}(R||(t.RequestCancellationReceiverStrategy=R={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){return C.is(e)||R.is(e)}}(_||(t.CancellationReceiverStrategy=_={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(u.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&r.func(t.sendCancellation)&&r.func(t.cleanup)}}(D||(t.CancellationSenderStrategy=D={})),function(e){e.Message=Object.freeze({receiver:_.Message,sender:D.Message}),e.is=function(e){const t=e;return t&&_.is(t.receiver)&&D.is(t.sender)}}(S||(t.CancellationStrategy=S={})),function(e){e.is=function(e){const t=e;return t&&r.func(t.handleMessage)}}(w||(t.MessageStrategy=w={})),function(e){e.is=function(e){const t=e;return t&&(S.is(t.cancellationStrategy)||b.is(t.connectionStrategy)||w.is(t.messageStrategy))}}(T||(t.ConnectionOptions=T={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(k||(k={})),t.createMessageConnection=function(e,n,p,b){const R=void 0!==p?p:t.NullLogger;let _=0,D=0,T=0;const x="2.0";let E;const O=new Map;let I;const A=new Map,F=new Map;let N,M,q=new s.LinkedMap,L=new Map,j=new Set,$=new Map,H=g.Off,K=f.Text,W=k.New;const U=new a.Emitter,V=new a.Emitter,z=new a.Emitter,B=new a.Emitter,G=new a.Emitter,X=b&&b.cancellationStrategy?b.cancellationStrategy:S.Message;function J(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function Y(e){}function Q(){return W===k.Listening}function Z(){return W===k.Closed}function ee(){return W===k.Disposed}function te(){W!==k.New&&W!==k.Listening||(W=k.Closed,V.fire(void 0))}function ne(){N||0===q.size||(N=(0,i.default)().timer.setImmediate((()=>{N=void 0,function(){if(0===q.size)return;const e=q.shift();try{const t=b?.messageStrategy;w.is(t)?t.handleMessage(e,ie):ie(e)}finally{ne()}}()})))}function ie(e){o.Message.isRequest(e)?function(e){if(ee())return;function t(t,i,r){const s={jsonrpc:x,id:e.id};t instanceof o.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,se(s,i,r),n.write(s).catch((()=>R.error("Sending response failed.")))}function i(t,i,r){const o={jsonrpc:x,id:e.id,error:t.toJson()};se(o,i,r),n.write(o).catch((()=>R.error("Sending response failed.")))}!function(e){if(H!==g.Off&&M)if(K===f.Text){let t;H!==g.Verbose&&H!==g.Compact||!e.params||(t=`Params: ${oe(e.params)}\n\n`),M.log(`Received request '${e.method} - (${e.id})'.`,t)}else ce("receive-request",e)}(e);const s=O.get(e.method);let a,c;s&&(a=s.type,c=s.handler);const u=Date.now();if(c||E){const s=e.id??String(Date.now()),l=C.is(X.receiver)?X.receiver.createCancellationTokenSource(s):X.receiver.createCancellationTokenSource(e);null!==e.id&&j.has(e.id)&&l.cancel(),null!==e.id&&$.set(s,l);try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void i(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,u);d=c(l.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byName)return void i(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);d=c(...e.params,l.token)}else{if(void 0!==a&&a.parameterStructures===o.ParameterStructures.byPosition)return void i(new o.ResponseError(o.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);d=c(e.params,l.token)}else E&&(d=E(e.method,e.params,l.token));const h=d;d?h.then?h.then((n=>{$.delete(s),t(n,e.method,u)}),(t=>{$.delete(s),t instanceof o.ResponseError?i(t,e.method,u):t&&r.string(t.message)?i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)})):($.delete(s),t(d,e.method,u)):($.delete(s),function(t,i,r){void 0===t&&(t=null);const o={jsonrpc:x,id:e.id,result:t};se(o,i,r),n.write(o).catch((()=>R.error("Sending response failed.")))}(d,e.method,u))}catch(n){$.delete(s),n instanceof o.ResponseError?t(n,e.method,u):n&&r.string(n.message)?i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${n.message}`),e.method,u):i(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else i(new o.ResponseError(o.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}(e):o.Message.isNotification(e)?function(e){if(ee())return;let t,n;if(e.method===u.type.method){const t=e.params.id;return j.delete(t),void ae(e)}{const i=A.get(e.method);i&&(n=i.handler,t=i.type)}if(n||I)try{if(ae(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==o.ParameterStructures.byName&&R.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){const i=e.params;e.method===d.type.method&&2===i.length&&l.is(i[0])?n({token:i[0],value:i[1]}):(void 0!==t&&(t.parameterStructures===o.ParameterStructures.byName&&R.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&R.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${i.length} arguments`)),n(...i))}else void 0!==t&&t.parameterStructures===o.ParameterStructures.byPosition&&R.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else I&&I(e.method,e.params)}catch(t){t.message?R.error(`Notification handler '${e.method}' failed with message: ${t.message}`):R.error(`Notification handler '${e.method}' failed unexpectedly.`)}else z.fire(e)}(e):o.Message.isResponse(e)?function(e){if(!ee())if(null===e.id)e.error?R.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):R.error("Received response message without id. No further error information provided.");else{const t=e.id,n=L.get(t);if(function(e,t){if(H!==g.Off&&M)if(K===f.Text){let n;if(H!==g.Verbose&&H!==g.Compact||(e.error&&e.error.data?n=`Error data: ${oe(e.error.data)}\n\n`:e.result?n=`Result: ${oe(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const i=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";M.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${i}`,n)}else M.log(`Received response ${e.id} without active response promise.`,n)}else ce("receive-response",e)}(e,n),void 0!==n){L.delete(t);try{if(e.error){const t=e.error;n.reject(new o.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(e){e.message?R.error(`Response handler '${n.method}' failed with message: ${e.message}`):R.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void R.error("Received empty message.");R.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(r.string(t.id)||r.number(t.id)){const e=t.id,n=L.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(te),e.onError((function(e){U.fire([e,void 0,void 0])})),n.onClose(te),n.onError((function(e){U.fire(e)}));const re=e=>{try{if(o.Message.isNotification(e)&&e.method===u.type.method){const t=e.params.id,i=J(t),r=q.get(i);if(o.Message.isRequest(r)){const o=b?.connectionStrategy,s=o&&o.cancelUndispatched?o.cancelUndispatched(r,Y):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return q.delete(i),$.delete(t),s.id=r.id,se(s,e.method,Date.now()),void n.write(s).catch((()=>R.error("Sending response for canceled message failed.")))}const s=$.get(t);if(void 0!==s)return s.cancel(),void ae(e);j.add(t)}!function(e,t){var n;o.Message.isRequest(t)?e.set(J(t.id),t):o.Message.isResponse(t)?e.set(null===(n=t.id)?"res-unknown-"+(++T).toString():"res-"+n.toString(),t):e.set("not-"+(++D).toString(),t)}(q,e)}finally{ne()}};function oe(e){if(null!=e)switch(H){case g.Verbose:return JSON.stringify(e,null,4);case g.Compact:return JSON.stringify(e);default:return}}function se(e,t,n){if(H!==g.Off&&M)if(K===f.Text){let i;H!==g.Verbose&&H!==g.Compact||(e.error&&e.error.data?i=`Error data: ${oe(e.error.data)}\n\n`:e.result?i=`Result: ${oe(e.result)}\n\n`:void 0===e.error&&(i="No result returned.\n\n")),M.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,i)}else ce("send-response",e)}function ae(e){if(H!==g.Off&&M&&e.method!==v.type.method)if(K===f.Text){let t;H!==g.Verbose&&H!==g.Compact||(t=e.params?`Params: ${oe(e.params)}\n\n`:"No parameters provided.\n\n"),M.log(`Received notification '${e.method}'.`,t)}else ce("receive-notification",e)}function ce(e,t){if(!M||H===g.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};M.log(n)}function ue(){if(Z())throw new P(y.Closed,"Connection is closed.");if(ee())throw new P(y.Disposed,"Connection is disposed.")}function le(e){return void 0===e?null:e}function de(e){return null===e?void 0:e}function he(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ge(e,t){switch(e){case o.ParameterStructures.auto:return he(t)?de(t):[le(t)];case o.ParameterStructures.byName:if(!he(t))throw new Error("Received parameters by name but param is not an object literal.");return de(t);case o.ParameterStructures.byPosition:return[le(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function pe(e,t){let n;const i=e.numberOfParams;switch(i){case 0:n=void 0;break;case 1:n=ge(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<i;e++)n.push(le(t[e]));if(t.length<i)for(let e=t.length;e<i;e++)n.push(null)}return n}const fe={sendNotification:(e,...t)=>{let i,s;if(ue(),r.string(e)){i=e;const n=t[0];let r=0,a=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(r=1,a=n);let c=t.length;const u=c-r;switch(u){case 0:s=void 0;break;case 1:s=ge(a,t[r]);break;default:if(a===o.ParameterStructures.byName)throw new Error(`Received ${u} parameters for 'by Name' notification parameter structure.`);s=t.slice(r,c).map((e=>le(e)))}}else{const n=t;i=e.method,s=pe(e,n)}const a={jsonrpc:x,method:i,params:s};return function(e){if(H!==g.Off&&M)if(K===f.Text){let t;H!==g.Verbose&&H!==g.Compact||(t=e.params?`Params: ${oe(e.params)}\n\n`:"No parameters provided.\n\n"),M.log(`Sending notification '${e.method}'.`,t)}else ce("send-notification",e)}(a),n.write(a).catch((e=>{throw R.error("Sending notification failed."),e}))},onNotification:(e,t)=>{let n;return ue(),r.func(e)?I=e:t&&(r.string(e)?(n=e,A.set(e,{type:void 0,handler:t})):(n=e.method,A.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?A.delete(n):I=void 0}}},onProgress:(e,t,n)=>{if(F.has(t))throw new Error(`Progress handler for token ${t} already registered`);return F.set(t,n),{dispose:()=>{F.delete(t)}}},sendProgress:(e,t,n)=>fe.sendNotification(d.type,{token:t,value:n}),onUnhandledProgress:B.event,sendRequest:(e,...t)=>{let i,s,a;if(ue(),function(){if(!Q())throw new Error("Call listen() first.")}(),r.string(e)){i=e;const n=t[0],r=t[t.length-1];let u=0,l=o.ParameterStructures.auto;o.ParameterStructures.is(n)&&(u=1,l=n);let d=t.length;c.CancellationToken.is(r)&&(d-=1,a=r);const h=d-u;switch(h){case 0:s=void 0;break;case 1:s=ge(l,t[u]);break;default:if(l===o.ParameterStructures.byName)throw new Error(`Received ${h} parameters for 'by Name' request parameter structure.`);s=t.slice(u,d).map((e=>le(e)))}}else{const n=t;i=e.method,s=pe(e,n);const r=e.numberOfParams;a=c.CancellationToken.is(n[r])?n[r]:void 0}const u=_++;let l;a&&(l=a.onCancellationRequested((()=>{const e=X.sender.sendCancellation(fe,u);return void 0===e?(R.log(`Received no promise from cancellation strategy when cancelling id ${u}`),Promise.resolve()):e.catch((()=>{R.log(`Sending cancellation messages for id ${u} failed`)}))})));const d={jsonrpc:x,id:u,method:i,params:s};return function(e){if(H!==g.Off&&M)if(K===f.Text){let t;H!==g.Verbose&&H!==g.Compact||!e.params||(t=`Params: ${oe(e.params)}\n\n`),M.log(`Sending request '${e.method} - (${e.id})'.`,t)}else ce("send-request",e)}(d),"function"==typeof X.sender.enableCancellation&&X.sender.enableCancellation(d),new Promise((async(e,t)=>{const r={method:i,timerStart:Date.now(),resolve:t=>{e(t),X.sender.cleanup(u),l?.dispose()},reject:e=>{t(e),X.sender.cleanup(u),l?.dispose()}};try{await n.write(d),L.set(u,r)}catch(e){throw R.error("Sending request failed."),r.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),e}}))},onRequest:(e,t)=>{ue();let n=null;return h.is(e)?(n=void 0,E=e):r.string(e)?(n=null,void 0!==t&&(n=e,O.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,O.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?O.delete(n):E=void 0)}}},hasPendingResponse:()=>L.size>0,trace:async(e,t,n)=>{let i=!1,o=f.Text;void 0!==n&&(r.boolean(n)?i=n:(i=n.sendNotification||!1,o=n.traceFormat||f.Text)),H=e,K=o,M=H===g.Off?void 0:t,!i||Z()||ee()||await fe.sendNotification(m.type,{value:g.toString(e)})},onError:U.event,onClose:V.event,onUnhandledNotification:z.event,onDispose:G.event,end:()=>{n.end()},dispose:()=>{if(ee())return;W=k.Disposed,G.fire(void 0);const t=new o.ResponseError(o.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of L.values())e.reject(t);L=new Map,$=new Map,j=new Set,q=new s.LinkedMap,r.func(n.dispose)&&n.dispose(),r.func(e.dispose)&&e.dispose()},listen:()=>{ue(),function(){if(Q())throw new P(y.AlreadyListening,"Connection is already listening")}(),W=k.Listening,e.listen(re)},inspect:()=>{(0,i.default)().console.log("inspect")}};return fe.onNotification(v.type,(e=>{if(H===g.Off||!M)return;const t=H===g.Verbose||H===g.Compact;M.log(e.message,t?e.verbose:void 0)})),fe.onNotification(d.type,(e=>{const t=F.get(e.token);t?t(e.value):B.fire(e)})),fe}},4019:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(n||(t.Disposable=n={}))},2676:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const i=n(9590);var r;!function(e){const t={dispose(){}};e.None=function(){return t}}(r||(t.Event=r={}));class o{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let i=0,r=this._callbacks.length;i<r;i++)if(this._callbacks[i]===e){if(this._contexts[i]===t)return this._callbacks.splice(i,1),void this._contexts.splice(i,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],n=this._callbacks.slice(0),r=this._contexts.slice(0);for(let o=0,s=n.length;o<s;o++)try{t.push(n[o].apply(r[o],e))}catch(e){(0,i.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class s{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,n)=>{this._callbacks||(this._callbacks=new o),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=s._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=s,s._noop=function(){}},8585:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))}},3352:(e,t)=>{"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(i||(t.Touch=i={}));class r{constructor(){this[n]="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(e){return this._map.has(e)}get(e,t=i.None){const n=this._map.get(e);if(n)return t!==i.None&&this.touch(n,t),n.value}set(e,t,n=i.None){let r=this._map.get(e);if(r)r.value=t,n!==i.None&&this.touch(r,n);else{switch(r={key:e,value:t,next:void 0,previous:void 0},n){case i.None:this.addItemLast(r);break;case i.First:this.addItemFirst(r);break;case i.Last:default:this.addItemLast(r)}this._map.set(e,r),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let i=this._head;for(;i;){if(t?e.bind(t)(i.value,i.key,this):e(i.value,i.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===i.First||t===i.Last)if(t===i.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===i.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,n)=>{e.push([n,t])})),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=r,t.LRUCache=class extends r{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=i.AsNew){return super.get(e,t)}peek(e){return super.get(e,i.None)}set(e,t){return super.set(e,t,i.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},9244:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,n=0,i=0,r=0;e:for(;n<this._chunks.length;){const e=this._chunks[n];for(i=0;i<e.length;){switch(e[i]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,i++;break e;default:t=0}break;default:t=0}i++}r+=e.byteLength,n++}if(4!==t)return;const o=this._read(r+i),s=new Map,a=this.toString(o,"ascii").split("\r\n");if(a.length<2)return s;for(let t=0;t<a.length-2;t++){const n=a[t],i=n.indexOf(":");if(-1===i)throw new Error(`Message header must separate key and value using ':'\n${n}`);const r=n.substr(0,i),o=n.substr(i+1).trim();s.set(e?r.toLowerCase():r,o)}return s}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const i=this._chunks[0];if(i.byteLength>e){const r=i.slice(0,e);t.set(r,n),n+=e,this._chunks[0]=i.slice(e),this._totalLength-=e,e-=e}else t.set(i,n),n+=i.byteLength,this._chunks.shift(),this._totalLength-=i.byteLength,e-=i.byteLength}return t}}},9085:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const i=n(9590),r=n(8585),o=n(2676),s=n(4323);var a,c;!function(e){e.is=function(e){let t=e;return t&&r.func(t.listen)&&r.func(t.dispose)&&r.func(t.onError)&&r.func(t.onClose)&&r.func(t.onPartialMessage)}}(a||(t.MessageReader=a={}));class u{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter,this.partialMessageEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${r.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=u,function(e){e.fromOptions=function(e){let t,n;const r=new Map;let o;const s=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,r.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)r.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(o=e.contentTypeDecoder,s.set(o.name,o)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===o&&(o=(0,i.default)().applicationJson.decoder,s.set(o.name,o)),{charset:t,contentDecoder:n,contentDecoders:r,contentTypeDecoder:o,contentTypeDecoders:s}}}(c||(c={})),t.ReadableStreamMessageReader=class extends u{constructor(e,t){super(),this.readable=e,this.options=c.fromOptions(t),this.buffer=(0,i.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new s.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData((e=>{this.onData(e)}));return this.readable.onError((e=>this.fireError(e))),this.readable.onClose((()=>this.fireClose())),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const n=parseInt(t);if(isNaN(n))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock((async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)})).catch((e=>{this.fireError(e)}))}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,i.default)().timer.setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},3193:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const i=n(9590),r=n(8585),o=n(4323),s=n(2676);var a,c;!function(e){e.is=function(e){let t=e;return t&&r.func(t.dispose)&&r.func(t.onClose)&&r.func(t.onError)&&r.func(t.write)}}(a||(t.MessageWriter=a={}));class u{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${r.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=u,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,i.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,i.default)().applicationJson.encoder}}}(c||(c={})),t.WriteableStreamMessageWriter=class extends u{constructor(e,t){super(),this.writable=e,this.options=c.fromOptions(t),this.errorCount=0,this.writeSemaphore=new o.Semaphore(1),this.writable.onError((e=>this.fireError(e))),this.writable.onClose((()=>this.fireClose()))}async write(e){return this.writeSemaphore.lock((async()=>this.options.contentTypeEncoder.encode(e,this.options).then((e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e)).then((t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)}),(e=>{throw this.fireError(e),e}))))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},6177:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const i=n(8585);var r,o;!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}(r||(t.ErrorCodes=r={}));class s extends Error{constructor(e,t,n){super(t),this.code=i.number(e)?e:r.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,s.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=s;class a{constructor(e){this.kind=e}static is(e){return e===a.auto||e===a.byName||e===a.byPosition}toString(){return this.kind}}t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");class c{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}}t.AbstractMessageSignature=c,t.RequestType0=class extends c{constructor(e){super(e,0)}},t.RequestType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends c{constructor(e){super(e,2)}},t.RequestType3=class extends c{constructor(e){super(e,3)}},t.RequestType4=class extends c{constructor(e){super(e,4)}},t.RequestType5=class extends c{constructor(e){super(e,5)}},t.RequestType6=class extends c{constructor(e){super(e,6)}},t.RequestType7=class extends c{constructor(e){super(e,7)}},t.RequestType8=class extends c{constructor(e){super(e,8)}},t.RequestType9=class extends c{constructor(e){super(e,9)}},t.NotificationType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends c{constructor(e){super(e,0)}},t.NotificationType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends c{constructor(e){super(e,2)}},t.NotificationType3=class extends c{constructor(e){super(e,3)}},t.NotificationType4=class extends c{constructor(e){super(e,4)}},t.NotificationType5=class extends c{constructor(e){super(e,5)}},t.NotificationType6=class extends c{constructor(e){super(e,6)}},t.NotificationType7=class extends c{constructor(e){super(e,7)}},t.NotificationType8=class extends c{constructor(e){super(e,8)}},t.NotificationType9=class extends c{constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&i.string(t.method)&&(i.string(t.id)||i.number(t.id))},e.isNotification=function(e){const t=e;return t&&i.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(i.string(t.id)||i.number(t.id)||null===t.id)}}(o||(t.Message=o={}))},9590:(e,t)=>{"use strict";let n;function i(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(i||(i={})),t.default=i},4323:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const i=n(9590);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,i.default)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},4996:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const i=n(9850);var r;!function(e){e.Continue=0,e.Cancelled=1}(r||(r={})),t.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=r.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const n=this.buffers.get(t);if(void 0===n)return;const i=new Int32Array(n,0,1);Atomics.store(i,0,r.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class o{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class s{constructor(e){this.token=new o(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new i.CancellationTokenSource:new s(t)}}},7123:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.PortMessageWriter=t.PortMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const o=n(9571);o.default.install();const s=n(6928),a=n(857),c=n(6982),u=n(9278),l=n(3281);r(n(3281),t);class d extends l.AbstractMessageReader{constructor(e){super(),this.process=e;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){return this.process.on("message",e),l.Disposable.create((()=>this.process.off("message",e)))}}t.IPCMessageReader=d;class h extends l.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;const t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose))}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,(t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0})),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.IPCMessageWriter=h;class g extends l.AbstractMessageReader{constructor(e){super(),this.onData=new l.Emitter,e.on("close",(()=>this.fireClose)),e.on("error",(e=>this.fireError(e))),e.on("message",(e=>{this.onData.fire(e)}))}listen(e){return this.onData.event(e)}}t.PortMessageReader=g;class p extends l.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",(()=>this.fireClose())),e.on("error",(e=>this.fireError(e)))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.PortMessageWriter=p;class f extends l.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,o.default)().stream.asReadableStream(e),t)}}t.SocketMessageReader=f;class m extends l.WriteableStreamMessageWriter{constructor(e,t){super((0,o.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=m;class v extends l.ReadableStreamMessageReader{constructor(e,t){super((0,o.default)().stream.asReadableStream(e),t)}}t.StreamMessageReader=v;class y extends l.WriteableStreamMessageWriter{constructor(e,t){super((0,o.default)().stream.asWritableStream(e),t)}}t.StreamMessageWriter=y;const b=process.env.XDG_RUNTIME_DIR,C=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){const e=(0,c.randomBytes)(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=b?s.join(b,`vscode-ipc-${e}.sock`):s.join(a.tmpdir(),`vscode-${e}.sock`);const n=C.get(process.platform);return void 0!==n&&t.length>n&&(0,o.default)().console.warn(`WARNING: IPC handle "${t}" is longer than ${n} characters.`),t},t.createClientPipeTransport=function(e,t="utf-8"){let n;const i=new Promise(((e,t)=>{n=e}));return new Promise(((r,o)=>{let s=(0,u.createServer)((e=>{s.close(),n([new f(e,t),new m(e,t)])}));s.on("error",o),s.listen(e,(()=>{s.removeListener("error",o),r({onConnected:()=>i})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const n=(0,u.createConnection)(e);return[new f(n,t),new m(n,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let n;const i=new Promise(((e,t)=>{n=e}));return new Promise(((r,o)=>{const s=(0,u.createServer)((e=>{s.close(),n([new f(e,t),new m(e,t)])}));s.on("error",o),s.listen(e,"127.0.0.1",(()=>{s.removeListener("error",o),r({onConnected:()=>i})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const n=(0,u.createConnection)(e,"127.0.0.1");return[new f(n,t),new m(n,t)]},t.createMessageConnection=function(e,t,n,i){n||(n=l.NullLogger);const r=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new v(e):e,o=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new y(t):t;return l.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,l.createMessageConnection)(r,o,n,i)}},9571:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(9023),r=n(3281);class o extends r.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return o.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new i.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}o.emptyBuffer=Buffer.allocUnsafe(0);class s{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),r.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),r.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),r.Disposable.create((()=>this.stream.off("end",e)))}onData(e){return this.stream.on("data",e),r.Disposable.create((()=>this.stream.off("data",e)))}}class a{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),r.Disposable.create((()=>this.stream.off("close",e)))}onError(e){return this.stream.on("error",e),r.Disposable.create((()=>this.stream.off("error",e)))}onEnd(e){return this.stream.on("end",e),r.Disposable.create((()=>this.stream.off("end",e)))}write(e,t){return new Promise(((n,i)=>{const r=e=>{null==e?n():i(e)};"string"==typeof e?this.stream.write(e,t,r):this.stream.write(e,r)}))}end(){this.stream.end()}}const c=Object.freeze({messageBuffer:Object.freeze({create:e=>new o(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new i.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new s(e),asWritableStream:e=>new a(e)}),console,timer:Object.freeze({setTimeout(e,t,...n){const i=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(i)}},setImmediate(e,...t){const n=setImmediate(e,...t);return{dispose:()=>clearImmediate(n)}},setInterval(e,t,...n){const i=setInterval(e,t,...n);return{dispose:()=>clearInterval(i)}}})});function u(){return c}!function(e){e.install=function(){r.RAL.install(c)}}(u||(u={})),t.default=u},2067:(e,t,n)=>{"use strict";e.exports=n(7123)},6353:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticPullMode=t.vsdiag=void 0,r(n(7354),t),r(n(4294),t);var o=n(9214);Object.defineProperty(t,"vsdiag",{enumerable:!0,get:function(){return o.vsdiag}}),Object.defineProperty(t,"DiagnosticPullMode",{enumerable:!0,get:function(){return o.DiagnosticPullMode}}),r(n(9538),t)},490:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const i=n(1398),r=n(7354),o=n(4294);class s{constructor(e){this.client=e,this.middleware=e.middleware}prepareCallHierarchy(e,t,n){const i=this.client,o=this.middleware,s=(e,t,n)=>{const o=i.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return i.sendRequest(r.CallHierarchyPrepareRequest.type,o,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asCallHierarchyItems(e,n)),(e=>i.handleFailedRequest(r.CallHierarchyPrepareRequest.type,n,e,null)))};return o.prepareCallHierarchy?o.prepareCallHierarchy(e,t,n,s):s(e,t,n)}provideCallHierarchyIncomingCalls(e,t){const n=this.client,i=this.middleware,o=(e,t)=>{const i={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(r.CallHierarchyIncomingCallsRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyIncomingCalls(e,t)),(e=>n.handleFailedRequest(r.CallHierarchyIncomingCallsRequest.type,t,e,null)))};return i.provideCallHierarchyIncomingCalls?i.provideCallHierarchyIncomingCalls(e,t,o):o(e,t)}provideCallHierarchyOutgoingCalls(e,t){const n=this.client,i=this.middleware,o=(e,t)=>{const i={item:n.code2ProtocolConverter.asCallHierarchyItem(e)};return n.sendRequest(r.CallHierarchyOutgoingCallsRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCallHierarchyOutgoingCalls(e,t)),(e=>n.handleFailedRequest(r.CallHierarchyOutgoingCallsRequest.type,t,e,null)))};return i.provideCallHierarchyOutgoingCalls?i.provideCallHierarchyOutgoingCalls(e,t,o):o(e,t)}}class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.CallHierarchyPrepareRequest.type)}fillClientCapabilities(e){const t=e;(0,o.ensure)((0,o.ensure)(t,"textDocument"),"callHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.callHierarchyProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=this._client,n=new s(t);return[i.languages.registerCallHierarchyProvider(this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector),n),n]}}t.CallHierarchyFeature=a},9538:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.BaseLanguageClient=t.MessageTransports=t.SuspendMode=t.State=t.CloseAction=t.ErrorAction=t.RevealOutputChannelOn=void 0;const i=n(1398),r=n(7354),o=n(1798),s=n(7605),a=n(8319),c=n(483),u=n(9032),l=n(9403),d=n(4294),h=n(9214),g=n(1872),p=n(5199),f=n(1596),m=n(6535),v=n(1507),y=n(600),b=n(1400),C=n(9014),R=n(9228),_=n(8312),D=n(420),S=n(8430),w=n(8140),T=n(7298),k=n(875),P=n(7656),x=n(9073),E=n(9084),O=n(3515),I=n(191),A=n(5432),F=n(6804),N=n(3963),M=n(7061),q=n(6258),L=n(9870),j=n(490),$=n(7691),H=n(2485),K=n(4913),W=n(4622),U=n(3131),V=n(2767),z=n(3370);var B,G,X,J,Y,Q,Z,ee,te;!function(e){e[e.Debug=0]="Debug",e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(B||(t.RevealOutputChannelOn=B={})),function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(G||(t.ErrorAction=G={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(X||(t.CloseAction=X={})),function(e){e[e.Stopped=1]="Stopped",e[e.Starting=3]="Starting",e[e.Running=2]="Running"}(J||(t.State=J={})),function(e){e.off="off",e.on="on"}(Y||(t.SuspendMode=Y={})),function(e){e.sanitizeIsTrusted=function(e){return null!=e&&!!("boolean"==typeof e||"object"==typeof e&&null!==e&&a.stringArray(e.enabledCommands))&&e}}(Q||(Q={}));class ne{constructor(e,t){this.client=e,this.maxRestartCount=t,this.restarts=[]}error(e,t,n){return n&&n<=3?{action:G.Continue}:{action:G.Shutdown}}closed(){return this.restarts.push(Date.now()),this.restarts.length<=this.maxRestartCount?{action:X.Restart}:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?{action:X.DoNotRestart,message:`The ${this.client.name} server crashed ${this.maxRestartCount+1} times in the last 3 minutes. The server will not be restarted. See the output for more information.`}:(this.restarts.shift(),{action:X.Restart})}}!function(e){e.Initial="initial",e.Starting="starting",e.StartFailed="startFailed",e.Running="running",e.Stopping="stopping",e.Stopped="stopped"}(Z||(Z={})),function(e){e.is=function(e){return e&&r.MessageReader.is(e.reader)&&r.MessageWriter.is(e.writer)}}(ee||(t.MessageTransports=ee={}));class ie{constructor(e,t,n){this._traceFormat=r.TraceFormat.Text,this._diagnosticQueue=new Map,this._diagnosticQueueState={state:"idle"},this._features=[],this._dynamicFeatures=new Map,this.workspaceEditLock=new c.Semaphore(1),this._id=e,this._name=t;const i={isTrusted:!1,supportHtml:!1};void 0!==(n=n||{}).markdown&&(i.isTrusted=Q.sanitizeIsTrusted(n.markdown.isTrusted),i.supportHtml=!0===n.markdown.supportHtml),this._clientOptions={documentSelector:n.documentSelector??[],synchronize:n.synchronize??{},diagnosticCollectionName:n.diagnosticCollectionName,outputChannelName:n.outputChannelName??this._name,revealOutputChannelOn:n.revealOutputChannelOn??B.Error,stdioEncoding:n.stdioEncoding??"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,progressOnInitialization:!!n.progressOnInitialization,errorHandler:n.errorHandler??this.createDefaultErrorHandler(n.connectionOptions?.maxRestartCount),middleware:n.middleware??{},uriConverters:n.uriConverters,workspaceFolder:n.workspaceFolder,connectionOptions:n.connectionOptions,markdown:i,diagnosticPullOptions:n.diagnosticPullOptions??{onChange:!0,onSave:!1},notebookDocumentOptions:n.notebookDocumentOptions??{}},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this._state=Z.Initial,this._ignoredRegistrations=new Set,this._listeners=[],this._notificationHandlers=new Map,this._pendingNotificationHandlers=new Map,this._notificationDisposables=new Map,this._requestHandlers=new Map,this._pendingRequestHandlers=new Map,this._requestDisposables=new Map,this._progressHandlers=new Map,this._pendingProgressHandlers=new Map,this._progressDisposables=new Map,this._connection=void 0,this._initializeResult=void 0,n.outputChannel?(this._outputChannel=n.outputChannel,this._disposeOutputChannel=!1):(this._outputChannel=void 0,this._disposeOutputChannel=!0),this._traceOutputChannel=n.traceOutputChannel,this._diagnostics=void 0,this._pendingOpenNotifications=new Set,this._pendingChangeSemaphore=new c.Semaphore(1),this._pendingChangeDelayer=new c.Delayer(250),this._fileEvents=[],this._fileEventDelayer=new c.Delayer(250),this._onStop=void 0,this._telemetryEmitter=new r.Emitter,this._stateChangeEmitter=new r.Emitter,this._trace=r.Trace.Off,this._tracer={log:(e,t)=>{a.string(e)?this.logTrace(e,t):this.logObjectTrace(e)}},this._c2p=o.createConverter(n.uriConverters?n.uriConverters.code2Protocol:void 0),this._p2c=s.createConverter(n.uriConverters?n.uriConverters.protocol2Code:void 0,this._clientOptions.markdown.isTrusted,this._clientOptions.markdown.supportHtml),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}get name(){return this._name}get middleware(){return this._clientOptions.middleware??Object.create(null)}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=i.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get traceOutputChannel(){return this._traceOutputChannel?this._traceOutputChannel:this.outputChannel}get diagnostics(){return this._diagnostics}get state(){return this.getPublicState()}get $state(){return this._state}set $state(e){let t=this.getPublicState();this._state=e;let n=this.getPublicState();n!==t&&this._stateChangeEmitter.fire({oldState:t,newState:n})}getPublicState(){switch(this.$state){case Z.Starting:return J.Starting;case Z.Running:return J.Running;default:return J.Stopped}}get initializeResult(){return this._initializeResult}async sendRequest(e,...t){if(this.$state===Z.StartFailed||this.$state===Z.Stopping||this.$state===Z.Stopped)return Promise.reject(new r.ResponseError(r.ErrorCodes.ConnectionInactive,"Client is not running"));const n=await this.$start();this._didChangeTextDocumentFeature.syncKind===r.TextDocumentSyncKind.Full&&await this.sendPendingFullTextDocumentChanges(n);const i=this._clientOptions.middleware?.sendRequest;if(void 0!==i){let o,s;return 1===t.length?r.CancellationToken.is(t[0])?s=t[0]:o=t[0]:2===t.length&&(o=t[0],s=t[1]),i(e,o,s,((e,t,i)=>{const r=[];return void 0!==t&&r.push(t),void 0!==i&&r.push(i),n.sendRequest(e,...r)}))}return n.sendRequest(e,...t)}onRequest(e,t){const n="string"==typeof e?e:e.method;this._requestHandlers.set(n,t);const i=this.activeConnection();let r;return void 0!==i?(this._requestDisposables.set(n,i.onRequest(e,t)),r={dispose:()=>{const e=this._requestDisposables.get(n);void 0!==e&&(e.dispose(),this._requestDisposables.delete(n))}}):(this._pendingRequestHandlers.set(n,t),r={dispose:()=>{this._pendingRequestHandlers.delete(n);const e=this._requestDisposables.get(n);void 0!==e&&(e.dispose(),this._requestDisposables.delete(n))}}),{dispose:()=>{this._requestHandlers.delete(n),r.dispose()}}}async sendNotification(e,t){if(this.$state===Z.StartFailed||this.$state===Z.Stopping||this.$state===Z.Stopped)return Promise.reject(new r.ResponseError(r.ErrorCodes.ConnectionInactive,"Client is not running"));const n=this._didChangeTextDocumentFeature.syncKind===r.TextDocumentSyncKind.Full;let i;n&&"string"!=typeof e&&e.method===r.DidOpenTextDocumentNotification.method&&(i=t?.textDocument.uri,this._pendingOpenNotifications.add(i));const o=await this.$start();n&&await this.sendPendingFullTextDocumentChanges(o),void 0!==i&&this._pendingOpenNotifications.delete(i);const s=this._clientOptions.middleware?.sendNotification;return s?s(e,o.sendNotification.bind(o),t):o.sendNotification(e,t)}onNotification(e,t){const n="string"==typeof e?e:e.method;this._notificationHandlers.set(n,t);const i=this.activeConnection();let r;return void 0!==i?(this._notificationDisposables.set(n,i.onNotification(e,t)),r={dispose:()=>{const e=this._notificationDisposables.get(n);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(n))}}):(this._pendingNotificationHandlers.set(n,t),r={dispose:()=>{this._pendingNotificationHandlers.delete(n);const e=this._notificationDisposables.get(n);void 0!==e&&(e.dispose(),this._notificationDisposables.delete(n))}}),{dispose:()=>{this._notificationHandlers.delete(n),r.dispose()}}}async sendProgress(e,t,n){if(this.$state===Z.StartFailed||this.$state===Z.Stopping||this.$state===Z.Stopped)return Promise.reject(new r.ResponseError(r.ErrorCodes.ConnectionInactive,"Client is not running"));try{return(await this.$start()).sendProgress(e,t,n)}catch(e){throw this.error(`Sending progress for token ${t} failed.`,e),e}}onProgress(e,t,n){this._progressHandlers.set(t,{type:e,handler:n});const i=this.activeConnection();let o;const s=this._clientOptions.middleware?.handleWorkDoneProgress,a=r.WorkDoneProgress.is(e)&&void 0!==s?e=>{s(t,e,(()=>n(e)))}:n;return void 0!==i?(this._progressDisposables.set(t,i.onProgress(e,t,a)),o={dispose:()=>{const e=this._progressDisposables.get(t);void 0!==e&&(e.dispose(),this._progressDisposables.delete(t))}}):(this._pendingProgressHandlers.set(t,{type:e,handler:n}),o={dispose:()=>{this._pendingProgressHandlers.delete(t);const e=this._progressDisposables.get(t);void 0!==e&&(e.dispose(),this._progressDisposables.delete(t))}}),{dispose:()=>{this._progressHandlers.delete(t),o.dispose()}}}createDefaultErrorHandler(e){if(void 0!==e&&e<0)throw new Error(`Invalid maxRestartCount: ${e}`);return new ne(this,e??4)}async setTrace(e){this._trace=e;const t=this.activeConnection();void 0!==t&&await t.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}data2String(e){if(e instanceof r.ResponseError){const t=e;return` Message: ${t.message}\n Code: ${t.code} ${t.data?"\n"+t.data.toString():""}`}return e instanceof Error?a.string(e.stack)?e.stack:e.message:a.string(e)?e:e.toString()}debug(e,t,n=!0){this.logOutputMessage(r.MessageType.Debug,B.Debug,"Debug",e,t,n)}info(e,t,n=!0){this.logOutputMessage(r.MessageType.Info,B.Info,"Info",e,t,n)}warn(e,t,n=!0){this.logOutputMessage(r.MessageType.Warning,B.Warn,"Warn",e,t,n)}error(e,t,n=!0){this.logOutputMessage(r.MessageType.Error,B.Error,"Error",e,t,n)}logOutputMessage(e,t,n,i,r,o){this.outputChannel.appendLine(`[${n.padEnd(5)} - ${(new Date).toLocaleTimeString()}] ${i}`),null!=r&&this.outputChannel.appendLine(this.data2String(r)),("force"===o||o&&this._clientOptions.revealOutputChannelOn<=t)&&this.showNotificationMessage(e,i)}showNotificationMessage(e,t){t=t??"A request has failed. See the output for more information.",(e===r.MessageType.Error?i.window.showErrorMessage:e===r.MessageType.Warning?i.window.showWarningMessage:i.window.showInformationMessage)(t,"Go to output").then((e=>{void 0!==e&&this.outputChannel.show(!0)}))}logTrace(e,t){this.traceOutputChannel.appendLine(`[Trace - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.traceOutputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.traceOutputChannel.append(`[LSP - ${(new Date).toLocaleTimeString()}] `):this.traceOutputChannel.append(`[Trace - ${(new Date).toLocaleTimeString()}] `),e&&this.traceOutputChannel.appendLine(`${JSON.stringify(e)}`)}needsStart(){return this.$state===Z.Initial||this.$state===Z.Stopping||this.$state===Z.Stopped}needsStop(){return this.$state===Z.Starting||this.$state===Z.Running}activeConnection(){return this.$state===Z.Running&&void 0!==this._connection?this._connection:void 0}isRunning(){return this.$state===Z.Running}async start(){if("disposing"===this._disposed||"disposed"===this._disposed)throw new Error("Client got disposed and can't be restarted.");if(this.$state===Z.Stopping)throw new Error("Client is currently stopping. Can only restart a full stopped client");if(void 0!==this._onStart)return this._onStart;const[e,t,n]=this.createOnStartPromise();this._onStart=e,void 0===this._diagnostics&&(this._diagnostics=this._clientOptions.diagnosticCollectionName?i.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):i.languages.createDiagnosticCollection());for(const[e,t]of this._notificationHandlers)this._pendingNotificationHandlers.has(e)||this._pendingNotificationHandlers.set(e,t);for(const[e,t]of this._requestHandlers)this._pendingRequestHandlers.has(e)||this._pendingRequestHandlers.set(e,t);for(const[e,t]of this._progressHandlers)this._pendingProgressHandlers.has(e)||this._pendingProgressHandlers.set(e,t);this.$state=Z.Starting;try{const e=await this.createConnection();e.onNotification(r.LogMessageNotification.type,(e=>{switch(e.type){case r.MessageType.Error:this.error(e.message,void 0,!1);break;case r.MessageType.Warning:this.warn(e.message,void 0,!1);break;case r.MessageType.Info:this.info(e.message,void 0,!1);break;case r.MessageType.Debug:this.debug(e.message,void 0,!1);break;default:this.outputChannel.appendLine(e.message)}})),e.onNotification(r.ShowMessageNotification.type,(e=>{switch(e.type){case r.MessageType.Error:i.window.showErrorMessage(e.message);break;case r.MessageType.Warning:i.window.showWarningMessage(e.message);break;case r.MessageType.Info:default:i.window.showInformationMessage(e.message)}})),e.onRequest(r.ShowMessageRequest.type,(e=>{let t;switch(e.type){case r.MessageType.Error:t=i.window.showErrorMessage;break;case r.MessageType.Warning:t=i.window.showWarningMessage;break;case r.MessageType.Info:default:t=i.window.showInformationMessage}let n=e.actions||[];return t(e.message,...n)})),e.onNotification(r.TelemetryEventNotification.type,(e=>{this._telemetryEmitter.fire(e)})),e.onRequest(r.ShowDocumentRequest.type,(async e=>{const t=async e=>{const t=this.protocol2CodeConverter.asUri(e.uri);try{if(!0===e.external)return{success:await i.env.openExternal(t)};{const n={};return void 0!==e.selection&&(n.selection=this.protocol2CodeConverter.asRange(e.selection)),void 0===e.takeFocus||!1===e.takeFocus?n.preserveFocus=!0:!0===e.takeFocus&&(n.preserveFocus=!1),await i.window.showTextDocument(t,n),{success:!0}}}catch(e){return{success:!1}}},n=this._clientOptions.middleware.window?.showDocument;return void 0!==n?n(e,t):t(e)})),e.listen(),await this.initialize(e),t()}catch(e){this.$state=Z.StartFailed,this.error(`${this._name} client: couldn't create connection to server.`,e,"force"),n(e)}return this._onStart}createOnStartPromise(){let e,t;return[new Promise(((n,i)=>{e=n,t=i})),e,t]}async initialize(e){this.refreshTrace(e,!1);const t=this._clientOptions.initializationOptions,[n,o]=void 0!==this._clientOptions.workspaceFolder?[this._clientOptions.workspaceFolder.uri.fsPath,[{uri:this._c2p.asUri(this._clientOptions.workspaceFolder.uri),name:this._clientOptions.workspaceFolder.name}]]:[this._clientGetRootPath(),null],s={processId:null,clientInfo:{name:i.env.appName,version:i.version},locale:this.getLocale(),rootPath:n||null,rootUri:n?this._c2p.asUri(i.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:a.func(t)?t():t,trace:r.Trace.toString(this._trace),workspaceFolders:o};if(this.fillInitializeParams(s),!this._clientOptions.progressOnInitialization)return this.doInitialize(e,s);{const t=u.generateUuid(),n=new l.ProgressPart(e,t);s.workDoneToken=t;try{const t=await this.doInitialize(e,s);return n.done(),t}catch(e){throw n.cancel(),e}}}async doInitialize(e,t){try{const n=await e.initialize(t);if(void 0!==n.capabilities.positionEncoding&&n.capabilities.positionEncoding!==r.PositionEncodingKind.UTF16)throw new Error(`Unsupported position encoding (${n.capabilities.positionEncoding}) received from server ${this.name}`);let i;this._initializeResult=n,this.$state=Z.Running,a.number(n.capabilities.textDocumentSync)?i=n.capabilities.textDocumentSync===r.TextDocumentSyncKind.None?{openClose:!1,change:r.TextDocumentSyncKind.None,save:void 0}:{openClose:!0,change:n.capabilities.textDocumentSync,save:{includeText:!1}}:void 0!==n.capabilities.textDocumentSync&&null!==n.capabilities.textDocumentSync&&(i=n.capabilities.textDocumentSync),this._capabilities=Object.assign({},n.capabilities,{resolvedTextDocumentSync:i}),e.onNotification(r.PublishDiagnosticsNotification.type,(e=>this.handleDiagnostics(e))),e.onRequest(r.RegistrationRequest.type,(e=>this.handleRegistrationRequest(e))),e.onRequest("client/registerFeature",(e=>this.handleRegistrationRequest(e))),e.onRequest(r.UnregistrationRequest.type,(e=>this.handleUnregistrationRequest(e))),e.onRequest("client/unregisterFeature",(e=>this.handleUnregistrationRequest(e))),e.onRequest(r.ApplyWorkspaceEditRequest.type,(e=>this.handleApplyWorkspaceEdit(e)));for(const[t,n]of this._pendingNotificationHandlers)this._notificationDisposables.set(t,e.onNotification(t,n));this._pendingNotificationHandlers.clear();for(const[t,n]of this._pendingRequestHandlers)this._requestDisposables.set(t,e.onRequest(t,n));this._pendingRequestHandlers.clear();for(const[t,n]of this._pendingProgressHandlers)this._progressDisposables.set(t,e.onProgress(n.type,t,n.handler));return this._pendingProgressHandlers.clear(),await e.sendNotification(r.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),n}catch(t){throw this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(t)?this.initialize(e):this.stop():t instanceof r.ResponseError&&t.data&&t.data.retry?i.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then((t=>{t&&"retry"===t.id?this.initialize(e):this.stop()})):(t&&t.message&&i.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop()),t}}_clientGetRootPath(){let e=i.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(e=2e3){return this.shutdown("stop",e)}dispose(e=2e3){try{return this._disposed="disposing",this.stop(e)}finally{this._disposed="disposed"}}async shutdown(e,t){if(this.$state===Z.Stopped||this.$state===Z.Initial)return;if(this.$state===Z.Stopping){if(void 0!==this._onStop)return this._onStop;throw new Error("Client is stopping but no stop promise available.")}const n=this.activeConnection();if(void 0===n||this.$state!==Z.Running)throw new Error(`Client is not running and can't be stopped. It's current state is: ${this.$state}`);this._initializeResult=void 0,this.$state=Z.Stopping,this.cleanUp(e);const i=new Promise((e=>{(0,r.RAL)().timer.setTimeout(e,t)})),o=(async e=>(await e.shutdown(),await e.exit(),e))(n);return this._onStop=Promise.race([i,o]).then((e=>{if(void 0===e)throw this.error("Stopping server timed out",void 0,!1),new Error("Stopping the server timed out");e.end(),e.dispose()}),(e=>{throw this.error("Stopping server failed",e,!1),e})).finally((()=>{this.$state=Z.Stopped,"stop"===e&&this.cleanUpChannel(),this._onStart=void 0,this._onStop=void 0,this._connection=void 0,this._ignoredRegistrations.clear()}))}cleanUp(e){this._fileEvents=[],this._fileEventDelayer.cancel();const t=this._listeners.splice(0,this._listeners.length);for(const e of t)e.dispose();this._syncedDocuments&&this._syncedDocuments.clear();for(const e of Array.from(this._features.entries()).map((e=>e[1])).reverse())e.clear();"stop"===e&&void 0!==this._diagnostics&&(this._diagnostics.dispose(),this._diagnostics=void 0),void 0!==this._idleInterval&&(this._idleInterval.dispose(),this._idleInterval=void 0)}cleanUpChannel(){void 0!==this._outputChannel&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0)}notifyFileEvent(e){const t=this;async function n(e){return t._fileEvents.push(e),t._fileEventDelayer.trigger((async()=>{await t.sendNotification(r.DidChangeWatchedFilesNotification.type,{changes:t._fileEvents}),t._fileEvents=[]}))}const i=this.clientOptions.middleware?.workspace;(i?.didChangeWatchedFile?i.didChangeWatchedFile(e,n):n(e)).catch((e=>{t.error("Notify file events failed.",e)}))}async sendPendingFullTextDocumentChanges(e){return this._pendingChangeSemaphore.lock((async()=>{try{const t=this._didChangeTextDocumentFeature.getPendingDocumentChanges(this._pendingOpenNotifications);if(0===t.length)return;for(const n of t){const t=this.code2ProtocolConverter.asChangeTextDocumentParams(n);await e.sendNotification(r.DidChangeTextDocumentNotification.type,t),this._didChangeTextDocumentFeature.notificationSent(n,r.DidChangeTextDocumentNotification.type,t)}}catch(e){throw this.error("Sending pending changes failed",e,!1),e}}))}triggerPendingChangeDelivery(){this._pendingChangeDelayer.trigger((async()=>{const e=this.activeConnection();void 0!==e?await this.sendPendingFullTextDocumentChanges(e):this.triggerPendingChangeDelivery()})).catch((e=>this.error("Delivering pending changes failed",e,!1)))}handleDiagnostics(e){if(!this._diagnostics)return;const t=e.uri;"busy"===this._diagnosticQueueState.state&&this._diagnosticQueueState.document===t&&this._diagnosticQueueState.tokenSource.cancel(),this._diagnosticQueue.set(e.uri,e.diagnostics),this.triggerDiagnosticQueue()}triggerDiagnosticQueue(){(0,r.RAL)().timer.setImmediate((()=>{this.workDiagnosticQueue()}))}workDiagnosticQueue(){if("busy"===this._diagnosticQueueState.state)return;const e=this._diagnosticQueue.entries().next();if(!0===e.done)return;const[t,n]=e.value;this._diagnosticQueue.delete(t);const r=new i.CancellationTokenSource;this._diagnosticQueueState={state:"busy",document:t,tokenSource:r},this._p2c.asDiagnostics(n,r.token).then((e=>{if(!r.token.isCancellationRequested){const n=this._p2c.asUri(t),i=this.clientOptions.middleware;i.handleDiagnostics?i.handleDiagnostics(n,e,((e,t)=>this.setDiagnostics(e,t))):this.setDiagnostics(n,e)}})).finally((()=>{this._diagnosticQueueState={state:"idle"},this.triggerDiagnosticQueue()}))}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}getLocale(){return i.env.language}async $start(){if(this.$state===Z.StartFailed)throw new Error("Previous start failed. Can't restart server.");await this.start();const e=this.activeConnection();if(void 0===e)throw new Error("Starting server failed");return e}async createConnection(){const e=await this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8");return this._connection=function(e,t,n,i,o){const s=new re,c=(0,r.createProtocolConnection)(e,t,s,o);return c.onError((e=>{n(e[0],e[1],e[2])})),c.onClose(i),{listen:()=>c.listen(),sendRequest:c.sendRequest,onRequest:c.onRequest,hasPendingResponse:c.hasPendingResponse,sendNotification:c.sendNotification,onNotification:c.onNotification,onProgress:c.onProgress,sendProgress:c.sendProgress,trace:(e,t,n)=>{const i={sendNotification:!1,traceFormat:r.TraceFormat.Text};return void 0===n?c.trace(e,t,i):(a.boolean(n),c.trace(e,t,n))},initialize:e=>c.sendRequest(r.InitializeRequest.type,e),shutdown:()=>c.sendRequest(r.ShutdownRequest.type,void 0),exit:()=>c.sendNotification(r.ExitNotification.type),end:()=>c.end(),dispose:()=>c.dispose()}}(e.reader,e.writer,((e,t,n)=>{this.handleConnectionError(e,t,n).catch((e=>this.error("Handling connection error failed",e)))}),(()=>{this.handleConnectionClosed().catch((e=>this.error("Handling connection close failed",e)))}),this._clientOptions.connectionOptions),this._connection}async handleConnectionClosed(){if(this.$state===Z.Stopped)return;try{void 0!==this._connection&&this._connection.dispose()}catch(e){}let e={action:X.DoNotRestart};if(this.$state!==Z.Stopping)try{e=await this._clientOptions.errorHandler.closed()}catch(e){}this._connection=void 0,e.action===X.DoNotRestart?(this.error(e.message??"Connection to server got closed. Server will not be restarted.",void 0,!0!==e.handled&&"force"),this.cleanUp("stop"),this.$state===Z.Starting?this.$state=Z.StartFailed:this.$state=Z.Stopped,this._onStop=Promise.resolve(),this._onStart=void 0):e.action===X.Restart&&(this.info(e.message??"Connection to server got closed. Server will restart.",!e.handled),this.cleanUp("restart"),this.$state=Z.Initial,this._onStop=Promise.resolve(),this._onStart=void 0,this.start().catch((e=>this.error("Restarting server failed",e,"force"))))}async handleConnectionError(e,t,n){const i=await this._clientOptions.errorHandler.error(e,t,n);i.action===G.Shutdown?(this.error(i.message??`Client ${this._name}: connection to server is erroring.\n${e.message}\nShutting down server.`,void 0,!0!==i.handled&&"force"),this.stop().catch((e=>{this.error("Stopping server failed",e,!1)}))):this.error(i.message??`Client ${this._name}: connection to server is erroring.\n${e.message}`,void 0,!0!==i.handled&&"force")}hookConfigurationChanged(e){this._listeners.push(i.workspace.onDidChangeConfiguration((()=>{this.refreshTrace(e,!0)})))}refreshTrace(e,t=!1){const n=i.workspace.getConfiguration(this._id);let o=r.Trace.Off,s=r.TraceFormat.Text;if(n){const e=n.get("trace.server","off");"string"==typeof e?o=r.Trace.fromString(e):(o=r.Trace.fromString(n.get("trace.server.verbosity","off")),s=r.TraceFormat.fromString(n.get("trace.server.format","text")))}this._trace=o,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat}).catch((e=>{this.error("Updating trace failed with error",e,!1)}))}hookFileEvents(e){let t,n=this._clientOptions.synchronize.fileEvents;n&&(t=a.array(n)?n:[n],t&&this._dynamicFeatures.get(r.DidChangeWatchedFilesNotification.type.method).registerRaw(u.generateUuid(),t))}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),d.DynamicFeature.is(e)){const t=e.registrationType;this._dynamicFeatures.set(t.method,e)}}getFeature(e){return this._dynamicFeatures.get(e)}hasDedicatedTextSynchronizationFeature(e){const t=this.getFeature(r.NotebookDocumentSyncRegistrationType.method);return void 0!==t&&t instanceof g.NotebookDocumentSyncFeature&&t.handles(e)}registerBuiltinFeatures(){const e=new Map;this.registerFeature(new p.ConfigurationFeature(this)),this.registerFeature(new f.DidOpenTextDocumentFeature(this,this._syncedDocuments)),this._didChangeTextDocumentFeature=new f.DidChangeTextDocumentFeature(this,e),this._didChangeTextDocumentFeature.onPendingChangeAdded((()=>{this.triggerPendingChangeDelivery()})),this.registerFeature(this._didChangeTextDocumentFeature),this.registerFeature(new f.WillSaveFeature(this)),this.registerFeature(new f.WillSaveWaitUntilFeature(this)),this.registerFeature(new f.DidSaveTextDocumentFeature(this)),this.registerFeature(new f.DidCloseTextDocumentFeature(this,this._syncedDocuments,e)),this.registerFeature(new E.FileSystemWatcherFeature(this,(e=>this.notifyFileEvent(e)))),this.registerFeature(new m.CompletionItemFeature(this)),this.registerFeature(new v.HoverFeature(this)),this.registerFeature(new b.SignatureHelpFeature(this)),this.registerFeature(new y.DefinitionFeature(this)),this.registerFeature(new D.ReferencesFeature(this)),this.registerFeature(new C.DocumentHighlightFeature(this)),this.registerFeature(new R.DocumentSymbolFeature(this)),this.registerFeature(new _.WorkspaceSymbolFeature(this)),this.registerFeature(new S.CodeActionFeature(this)),this.registerFeature(new w.CodeLensFeature(this)),this.registerFeature(new T.DocumentFormattingFeature(this)),this.registerFeature(new T.DocumentRangeFormattingFeature(this)),this.registerFeature(new T.DocumentOnTypeFormattingFeature(this)),this.registerFeature(new k.RenameFeature(this)),this.registerFeature(new P.DocumentLinkFeature(this)),this.registerFeature(new x.ExecuteCommandFeature(this)),this.registerFeature(new p.SyncConfigurationFeature(this)),this.registerFeature(new A.TypeDefinitionFeature(this)),this.registerFeature(new I.ImplementationFeature(this)),this.registerFeature(new O.ColorProviderFeature(this)),void 0===this.clientOptions.workspaceFolder&&this.registerFeature(new F.WorkspaceFoldersFeature(this)),this.registerFeature(new N.FoldingRangeFeature(this)),this.registerFeature(new M.DeclarationFeature(this)),this.registerFeature(new q.SelectionRangeFeature(this)),this.registerFeature(new L.ProgressFeature(this)),this.registerFeature(new j.CallHierarchyFeature(this)),this.registerFeature(new $.SemanticTokensFeature(this)),this.registerFeature(new K.LinkedEditingFeature(this)),this.registerFeature(new H.DidCreateFilesFeature(this)),this.registerFeature(new H.DidRenameFilesFeature(this)),this.registerFeature(new H.DidDeleteFilesFeature(this)),this.registerFeature(new H.WillCreateFilesFeature(this)),this.registerFeature(new H.WillRenameFilesFeature(this)),this.registerFeature(new H.WillDeleteFilesFeature(this)),this.registerFeature(new W.TypeHierarchyFeature(this)),this.registerFeature(new U.InlineValueFeature(this)),this.registerFeature(new V.InlayHintsFeature(this)),this.registerFeature(new h.DiagnosticFeature(this)),this.registerFeature(new g.NotebookDocumentSyncFeature(this))}registerProposedFeatures(){this.registerFeatures(te.createAll(this))}fillInitializeParams(e){for(let t of this._features)a.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){const e={};(0,d.ensure)(e,"workspace").applyEdit=!0;const t=(0,d.ensure)((0,d.ensure)(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[r.ResourceOperationKind.Create,r.ResourceOperationKind.Rename,r.ResourceOperationKind.Delete],t.failureHandling=r.FailureHandlingKind.TextOnlyTransactional,t.normalizesLineEndings=!0,t.changeAnnotationSupport={groupsOnLabel:!0};const n=(0,d.ensure)((0,d.ensure)(e,"textDocument"),"publishDiagnostics");n.relatedInformation=!0,n.versionSupport=!1,n.tagSupport={valueSet:[r.DiagnosticTag.Unnecessary,r.DiagnosticTag.Deprecated]},n.codeDescriptionSupport=!0,n.dataSupport=!0;const i=(0,d.ensure)(e,"window");(0,d.ensure)(i,"showMessage").messageActionItem={additionalPropertiesSupport:!0},(0,d.ensure)(i,"showDocument").support=!0;const o=(0,d.ensure)(e,"general");o.staleRequestSupport={cancel:!0,retryOnContentModified:Array.from(ie.RequestsToCancelOnContentModified)},o.regularExpressions={engine:"ECMAScript",version:"ES2020"},o.markdown={parser:"marked",version:"1.1.0"},o.positionEncodings=["utf-16"],this._clientOptions.markdown.supportHtml&&(o.markdown.allowedTags=["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"]);for(let t of this._features)t.fillClientCapabilities(e);return e}initializeFeatures(e){const t=this._clientOptions.documentSelector;for(const e of this._features)a.func(e.preInitialize)&&e.preInitialize(this._capabilities,t);for(const e of this._features)e.initialize(this._capabilities,t)}async handleRegistrationRequest(e){const t=this.clientOptions.middleware?.handleRegisterCapability;return t?t(e,(e=>this.doRegisterCapability(e))):this.doRegisterCapability(e)}async doRegisterCapability(e){if(this.isRunning())for(const t of e.registrations){const e=this._dynamicFeatures.get(t.method);if(void 0===e)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Registration failed.`));const n=t.registerOptions??{};n.documentSelector=n.documentSelector??this._clientOptions.documentSelector;const i={id:t.id,registerOptions:n};try{e.register(i)}catch(e){return Promise.reject(e)}}else for(const t of e.registrations)this._ignoredRegistrations.add(t.id)}async handleUnregistrationRequest(e){const t=this.clientOptions.middleware?.handleUnregisterCapability;return t?t(e,(e=>this.doUnregisterCapability(e))):this.doUnregisterCapability(e)}async doUnregisterCapability(e){for(const t of e.unregisterations){if(this._ignoredRegistrations.has(t.id))continue;const e=this._dynamicFeatures.get(t.method);if(!e)return Promise.reject(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));e.unregister(t.id)}}async handleApplyWorkspaceEdit(e){const t=e.edit,n=await this.workspaceEditLock.lock((()=>this._p2c.asWorkspaceEdit(t))),o=new Map;i.workspace.textDocuments.forEach((e=>o.set(e.uri.toString(),e)));let s=!1;if(t.documentChanges)for(const e of t.documentChanges)if(r.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){const t=this._p2c.asUri(e.textDocument.uri).toString(),n=o.get(t);if(n&&n.version!==e.textDocument.version){s=!0;break}}return s?Promise.resolve({applied:!1}):a.asPromise(i.workspace.applyEdit(n).then((e=>({applied:e}))))}handleFailedRequest(e,t,n,o,s=!0){if(n instanceof r.ResponseError){if(n.code===r.ErrorCodes.PendingResponseRejected||n.code===r.ErrorCodes.ConnectionInactive)return o;if(n.code===r.LSPErrorCodes.RequestCancelled||n.code===r.LSPErrorCodes.ServerCancelled){if(void 0!==t&&t.isCancellationRequested)return o;throw void 0!==n.data?new d.LSPCancellationError(n.data):new i.CancellationError}if(n.code===r.LSPErrorCodes.ContentModified){if(ie.RequestsToCancelOnContentModified.has(e.method)||ie.CancellableResolveCalls.has(e.method))throw new i.CancellationError;return o}}throw this.error(`Request ${e.method} failed.`,n,s),n}}t.BaseLanguageClient=ie,ie.RequestsToCancelOnContentModified=new Set([r.SemanticTokensRequest.method,r.SemanticTokensRangeRequest.method,r.SemanticTokensDeltaRequest.method]),ie.CancellableResolveCalls=new Set([r.CompletionResolveRequest.method,r.CodeLensResolveRequest.method,r.CodeActionResolveRequest.method,r.InlayHintResolveRequest.method,r.DocumentLinkResolveRequest.method,r.WorkspaceSymbolResolveRequest.method]);class re{error(e){(0,r.RAL)().console.error(e)}warn(e){(0,r.RAL)().console.warn(e)}info(e){(0,r.RAL)().console.info(e)}log(e){(0,r.RAL)().console.log(e)}}!function(e){e.createAll=function(e){return[new z.InlineCompletionItemFeature(e)]}}(te||(t.ProposedFeatures=te={}))},8430:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeActionFeature=void 0;const i=n(1398),r=n(7354),o=n(9032),s=n(4294);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,r.CodeActionRequest.type)}fillClientCapabilities(e){const t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.isPreferredSupport=!0,t.disabledSupport=!0,t.dataSupport=!0,t.resolveSupport={properties:["edit"]},t.codeActionLiteralSupport={codeActionKind:{valueSet:[r.CodeActionKind.Empty,r.CodeActionKind.QuickFix,r.CodeActionKind.Refactor,r.CodeActionKind.RefactorExtract,r.CodeActionKind.RefactorInline,r.CodeActionKind.RefactorRewrite,r.CodeActionKind.Source,r.CodeActionKind.SourceOrganizeImports]}},t.honorsChangeAnnotations=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.codeActionProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideCodeActions:(e,t,n,i)=>{const o=this._client,s=async(e,t,n,i)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),context:o.code2ProtocolConverter.asCodeActionContextSync(n)};return o.sendRequest(r.CodeActionRequest.type,s,i).then((e=>i.isCancellationRequested||null==e?null:o.protocol2CodeConverter.asCodeActionResult(e,i)),(e=>o.handleFailedRequest(r.CodeActionRequest.type,i,e,null)))},a=o.middleware;return a.provideCodeActions?a.provideCodeActions(e,t,n,i,s):s(e,t,n,i)},resolveCodeAction:e.resolveProvider?(e,t)=>{const n=this._client,i=this._client.middleware,o=async(e,t)=>n.sendRequest(r.CodeActionResolveRequest.type,n.code2ProtocolConverter.asCodeActionSync(e),t).then((i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asCodeAction(i,t)),(i=>n.handleFailedRequest(r.CodeActionResolveRequest.type,t,i,e)));return i.resolveCodeAction?i.resolveCodeAction(e,t,o):o(e,t)}:void 0};return[i.languages.registerCodeActionsProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,e.codeActionKinds?{providedCodeActionKinds:this._client.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0),n]}}t.CodeActionFeature=a},1798:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const i=n(1398),r=n(7354),o=n(8319),s=n(483),a=n(7652),c=n(5588),u=n(7424),l=n(9206),d=n(7894),h=n(8717),g=n(7321),p=n(6144),f=n(7511);var m;!function(e){e.is=function(e){const t=e;return t&&!!t.inserting&&!!t.replacing}}(m||(m={})),t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function v(e){return{uri:t(e.uri)}}function y(e){return{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}function b(e){switch(e){case i.TextDocumentSaveReason.Manual:return r.TextDocumentSaveReason.Manual;case i.TextDocumentSaveReason.AfterDelay:return r.TextDocumentSaveReason.AfterDelay;case i.TextDocumentSaveReason.FocusOut:return r.TextDocumentSaveReason.FocusOut}return r.TextDocumentSaveReason.Manual}function C(e){switch(e){case i.CompletionTriggerKind.TriggerCharacter:return r.CompletionTriggerKind.TriggerCharacter;case i.CompletionTriggerKind.TriggerForIncompleteCompletions:return r.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return r.CompletionTriggerKind.Invoked}}function R(e){switch(e){case i.SignatureHelpTriggerKind.Invoke:return r.SignatureHelpTriggerKind.Invoked;case i.SignatureHelpTriggerKind.TriggerCharacter:return r.SignatureHelpTriggerKind.TriggerCharacter;case i.SignatureHelpTriggerKind.ContentChange:return r.SignatureHelpTriggerKind.ContentChange}}function _(e){return{label:e.label}}function D(e){return{label:e.label,parameters:(t=e.parameters,t.map(_))};var t}function S(e){return{line:e.line,character:e.character}}function w(e){return null==e?e:{line:e.line>r.uinteger.MAX_VALUE?r.uinteger.MAX_VALUE:e.line,character:e.character>r.uinteger.MAX_VALUE?r.uinteger.MAX_VALUE:e.character}}function T(e){return null==e?e:{start:w(e.start),end:w(e.end)}}function k(e){return null==e?e:r.Location.create(n(e.uri),T(e.range))}function P(e){switch(e){case i.DiagnosticSeverity.Error:return r.DiagnosticSeverity.Error;case i.DiagnosticSeverity.Warning:return r.DiagnosticSeverity.Warning;case i.DiagnosticSeverity.Information:return r.DiagnosticSeverity.Information;case i.DiagnosticSeverity.Hint:return r.DiagnosticSeverity.Hint}}function x(e){switch(e){case i.DiagnosticTag.Unnecessary:return r.DiagnosticTag.Unnecessary;case i.DiagnosticTag.Deprecated:return r.DiagnosticTag.Deprecated;default:return}}function E(e){return{message:e.message,location:k(e.location)}}function O(e){const t=r.Diagnostic.create(T(e.range),e.message),i=e instanceof d.ProtocolDiagnostic?e:void 0;void 0!==i&&void 0!==i.data&&(t.data=i.data);const s=function(e){if(null!=e)return o.number(e)||o.string(e)?e:{value:e.value,target:n(e.target)}}(e.code);return d.DiagnosticCode.is(s)?void 0!==i&&i.hasDiagnosticCode?t.code=s:(t.code=s.value,t.codeDescription={href:s.target}):t.code=s,o.number(e.severity)&&(t.severity=P(e.severity)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=x(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(E)),e.source&&(t.source=e.source),t}function I(e,t){return null==e?e:s.map(e,O,t)}function A(e){return null==e?e:e.map(O)}function F(e){if(e===i.CompletionItemTag.Deprecated)return r.CompletionItemTag.Deprecated}function N(e){return{range:T(e.range),newText:e.newText}}function M(e){return null==e?e:e.map(N)}function q(e){return e<=i.SymbolKind.TypeParameter?e+1:r.SymbolKind.Property}function L(e){return e}function j(e){return e.map(L)}function $(e){switch(e){case i.CodeActionTriggerKind.Invoke:return r.CodeActionTriggerKind.Invoked;case i.CodeActionTriggerKind.Automatic:return r.CodeActionTriggerKind.Automatic;default:return}}function H(e){if(null!=e)return e.value}function K(e){let t=r.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}function W(e){const t=r.InlayHintLabelPart.create(e.value);return void 0!==e.location&&(t.location=k(e.location)),void 0!==e.command&&(t.command=K(e.command)),void 0!==e.tooltip&&(t.tooltip=U(e.tooltip)),t}function U(e){return"string"==typeof e?e:{kind:r.MarkupKind.Markdown,value:e.value}}return{asUri:n,asTextDocumentIdentifier:v,asTextDocumentItem:y,asVersionedTextDocumentIdentifier:function(e){return{uri:t(e.uri),version:e.version}},asOpenTextDocumentParams:function(e){return{textDocument:y(e)}},asChangeTextDocumentParams:function(e,n,i){if(function(e){const t=e;return!!t.uri&&!!t.version}(e))return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]};if(function(e){const t=e;return!!t.document&&!!t.contentChanges}(e)){const r=i;return{textDocument:{uri:t(n),version:r},contentChanges:e.contentChanges.map((e=>{const t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}}))}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:v(e)}},asSaveTextDocumentParams:function(e,t=!1){let n={textDocument:v(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:v(e.document),reason:b(e.reason)}},asDidCreateFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asDidRenameFilesParams:function(e){return{files:e.files.map((e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)})))}},asDidDeleteFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asWillCreateFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asWillRenameFilesParams:function(e){return{files:e.files.map((e=>({oldUri:t(e.oldUri),newUri:t(e.newUri)})))}},asWillDeleteFilesParams:function(e){return{files:e.files.map((e=>({uri:t(e)})))}},asTextDocumentPositionParams:function(e,t){return{textDocument:v(e),position:S(t)}},asCompletionParams:function(e,t,n){return{textDocument:v(e),position:S(t),context:{triggerKind:C(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asSignatureHelpParams:function(e,t,n){return{textDocument:v(e),position:S(t),context:{isRetrigger:n.isRetrigger,triggerCharacter:n.triggerCharacter,triggerKind:R(n.triggerKind),activeSignatureHelp:(i=n.activeSignatureHelp,void 0===i?i:{signatures:(r=i.signatures,r.map(D)),activeSignature:i.activeSignature,activeParameter:i.activeParameter})}};var i,r},asWorkerPosition:S,asRange:T,asRanges:function(e){return e.map(T)},asPosition:w,asPositions:function(e,t){return s.map(e,w,t)},asPositionsSync:function(e){return e.map(w)},asLocation:k,asDiagnosticSeverity:P,asDiagnosticTag:x,asDiagnostic:O,asDiagnostics:I,asDiagnosticsSync:A,asCompletionItem:function(e,t=!1){let n,s;o.string(e.label)?n=e.label:(n=e.label.label,!t||void 0===e.label.detail&&void 0===e.label.description||(s={detail:e.label.detail,description:e.label.description}));let c={label:n};void 0!==s&&(c.labelDetails=s);let u=e instanceof a.default?e:void 0;var l,d;e.detail&&(c.detail=e.detail),e.documentation&&(u&&"$string"!==u.documentationFormat?c.documentation=function(e,t){switch(e){case"$string":return t;case r.MarkupKind.PlainText:return{kind:e,value:t};case r.MarkupKind.Markdown:return{kind:e,value:t.value};default:return`Unsupported Markup content received. Kind is: ${e}`}}(u.documentationFormat,e.documentation):c.documentation=e.documentation),e.filterText&&(c.filterText=e.filterText),function(e,t){let n,o,s=r.InsertTextFormat.PlainText;t.textEdit?(n=t.textEdit.newText,o=t.textEdit.range):t.insertText instanceof i.SnippetString?(s=r.InsertTextFormat.Snippet,n=t.insertText.value):n=t.insertText,t.range&&(o=t.range),e.insertTextFormat=s,t.fromEdit&&void 0!==n&&void 0!==o?e.textEdit=function(e,t){return m.is(t)?r.InsertReplaceEdit.create(e,T(t.inserting),T(t.replacing)):{newText:e,range:T(t)}}(n,o):e.insertText=n}(c,e),o.number(e.kind)&&(c.kind=(l=e.kind,void 0!==(d=u&&u.originalItemKind)?d:l+1)),e.sortText&&(c.sortText=e.sortText),e.additionalTextEdits&&(c.additionalTextEdits=M(e.additionalTextEdits)),e.commitCharacters&&(c.commitCharacters=e.commitCharacters.slice()),e.command&&(c.command=K(e.command)),!0!==e.preselect&&!1!==e.preselect||(c.preselect=e.preselect);const h=function(e){if(void 0===e)return e;const t=[];for(let n of e){const e=F(n);void 0!==e&&t.push(e)}return t}(e.tags);if(u){if(void 0!==u.data&&(c.data=u.data),!0===u.deprecated||!1===u.deprecated){if(!0===u.deprecated&&void 0!==h&&h.length>0){const e=h.indexOf(i.CompletionItemTag.Deprecated);-1!==e&&h.splice(e,1)}c.deprecated=u.deprecated}void 0!==u.insertTextMode&&(c.insertTextMode=u.insertTextMode)}return void 0!==h&&h.length>0&&(c.tags=h),void 0===c.insertTextMode&&!0===e.keepWhitespace&&(c.insertTextMode=r.InsertTextMode.adjustIndentation),c},asTextEdit:N,asSymbolKind:q,asSymbolTag:L,asSymbolTags:j,asReferenceParams:function(e,t,n){return{textDocument:v(e),position:S(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeAction:async function(e,t){let n=r.CodeAction.create(e.title);if(e instanceof l.default&&void 0!==e.data&&(n.data=e.data),void 0!==e.kind&&(n.kind=H(e.kind)),void 0!==e.diagnostics&&(n.diagnostics=await I(e.diagnostics,t)),void 0!==e.edit)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return void 0!==e.command&&(n.command=K(e.command)),void 0!==e.isPreferred&&(n.isPreferred=e.isPreferred),void 0!==e.disabled&&(n.disabled={reason:e.disabled.reason}),n},asCodeActionSync:function(e){let t=r.CodeAction.create(e.title);if(e instanceof l.default&&void 0!==e.data&&(t.data=e.data),void 0!==e.kind&&(t.kind=H(e.kind)),void 0!==e.diagnostics&&(t.diagnostics=A(e.diagnostics)),void 0!==e.edit)throw new Error("VS Code code actions can only be converted to a protocol code action without an edit.");return void 0!==e.command&&(t.command=K(e.command)),void 0!==e.isPreferred&&(t.isPreferred=e.isPreferred),void 0!==e.disabled&&(t.disabled={reason:e.disabled.reason}),t},asCodeActionContext:async function(e,t){if(null==e)return e;let n;return e.only&&o.string(e.only.value)&&(n=[e.only.value]),r.CodeActionContext.create(await I(e.diagnostics,t),n,$(e.triggerKind))},asCodeActionContextSync:function(e){if(null==e)return e;let t;return e.only&&o.string(e.only.value)&&(t=[e.only.value]),r.CodeActionContext.create(A(e.diagnostics),t,$(e.triggerKind))},asInlineValueContext:function(e){return null==e?e:r.InlineValueContext.create(e.frameId,T(e.stoppedLocation))},asCommand:K,asCodeLens:function(e){let t=r.CodeLens.create(T(e.range));return e.command&&(t.command=K(e.command)),e instanceof c.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e,t){const n={tabSize:e.tabSize,insertSpaces:e.insertSpaces};return t.trimTrailingWhitespace&&(n.trimTrailingWhitespace=!0),t.trimFinalNewlines&&(n.trimFinalNewlines=!0),t.insertFinalNewline&&(n.insertFinalNewline=!0),n},asDocumentSymbolParams:function(e){return{textDocument:v(e)}},asCodeLensParams:function(e){return{textDocument:v(e)}},asDocumentLink:function(e){let t=r.DocumentLink.create(T(e.range));e.target&&(t.target=n(e.target)),void 0!==e.tooltip&&(t.tooltip=e.tooltip);let i=e instanceof u.default?e:void 0;return i&&i.data&&(t.data=i.data),t},asDocumentLinkParams:function(e){return{textDocument:v(e)}},asCallHierarchyItem:function(e){const t={name:e.name,kind:q(e.kind),uri:n(e.uri),range:T(e.range),selectionRange:T(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=j(e.tags)),e instanceof h.default&&void 0!==e.data&&(t.data=e.data),t},asTypeHierarchyItem:function(e){const t={name:e.name,kind:q(e.kind),uri:n(e.uri),range:T(e.range),selectionRange:T(e.selectionRange)};return void 0!==e.detail&&e.detail.length>0&&(t.detail=e.detail),void 0!==e.tags&&(t.tags=j(e.tags)),e instanceof g.default&&void 0!==e.data&&(t.data=e.data),t},asInlayHint:function(e){const t="string"==typeof e.label?e.label:e.label.map(W),n=r.InlayHint.create(w(e.position),t);return void 0!==e.kind&&(n.kind=e.kind),void 0!==e.textEdits&&(n.textEdits=M(e.textEdits)),void 0!==e.tooltip&&(n.tooltip=U(e.tooltip)),void 0!==e.paddingLeft&&(n.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(n.paddingRight=e.paddingRight),e instanceof f.default&&void 0!==e.data&&(n.data=e.data),n},asWorkspaceSymbol:function(e){const n=e instanceof p.default?{name:e.name,kind:q(e.kind),location:e.hasRange?k(e.location):{uri:t(e.location.uri)},data:e.data}:{name:e.name,kind:q(e.kind),location:k(e.location)};return void 0!==e.tags&&(n.tags=j(e.tags)),""!==e.containerName&&(n.containerName=e.containerName),n},asInlineCompletionParams:function(e,t,n){return{context:r.InlineCompletionContext.create(n.triggerKind,n.selectedCompletionInfo),textDocument:v(e),position:w(t)}}}}},8140:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeLensFeature=void 0;const i=n(1398),r=n(7354),o=n(9032),s=n(4294);class a extends s.TextDocumentLanguageFeature{constructor(e){super(e,r.CodeLensRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"codeLens").dynamicRegistration=!0,(0,s.ensure)((0,s.ensure)(e,"workspace"),"codeLens").refreshSupport=!0}initialize(e,t){this._client.onRequest(r.CodeLensRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeCodeLensEmitter.fire()}));const n=this.getRegistrationOptions(t,e.codeLensProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,o={onDidChangeCodeLenses:n.event,provideCodeLenses:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.CodeLensRequest.type,n.code2ProtocolConverter.asCodeLensParams(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asCodeLenses(e,t)),(e=>n.handleFailedRequest(r.CodeLensRequest.type,t,e,null))),o=n.middleware;return o.provideCodeLenses?o.provideCodeLenses(e,t,i):i(e,t)},resolveCodeLens:e.resolveProvider?(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.CodeLensResolveRequest.type,n.code2ProtocolConverter.asCodeLens(e),t).then((i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asCodeLens(i)),(i=>n.handleFailedRequest(r.CodeLensResolveRequest.type,t,i,e))),o=n.middleware;return o.resolveCodeLens?o.resolveCodeLens(e,t,i):i(e,t)}:void 0};return[i.languages.registerCodeLensProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),o),{provider:o,onDidChangeCodeLensEmitter:n}]}}t.CodeLensFeature=a},3515:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorProviderFeature=void 0;const i=n(1398),r=n(7354),o=n(4294);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.DocumentColorRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.colorProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideColorPresentations:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={color:e,textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(t.document),range:i.code2ProtocolConverter.asRange(t.range)};return i.sendRequest(r.ColorPresentationRequest.type,o,n).then((e=>n.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorPresentations(e,n)),(e=>i.handleFailedRequest(r.ColorPresentationRequest.type,n,e,null)))},s=i.middleware;return s.provideColorPresentations?s.provideColorPresentations(e,t,n,o):o(e,t,n)},provideDocumentColors:(e,t)=>{const n=this._client,i=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(r.DocumentColorRequest.type,i,t).then((e=>t.isCancellationRequested?null:this._client.protocol2CodeConverter.asColorInformations(e,t)),(e=>n.handleFailedRequest(r.DocumentColorRequest.type,t,e,null)))},o=n.middleware;return o.provideDocumentColors?o.provideDocumentColors(e,t,i):i(e,t)}};return[i.languages.registerColorProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.ColorProviderFeature=s},6535:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompletionItemFeature=void 0;const i=n(1398),r=n(7354),o=n(4294),s=n(9032),a=[r.CompletionItemKind.Text,r.CompletionItemKind.Method,r.CompletionItemKind.Function,r.CompletionItemKind.Constructor,r.CompletionItemKind.Field,r.CompletionItemKind.Variable,r.CompletionItemKind.Class,r.CompletionItemKind.Interface,r.CompletionItemKind.Module,r.CompletionItemKind.Property,r.CompletionItemKind.Unit,r.CompletionItemKind.Value,r.CompletionItemKind.Enum,r.CompletionItemKind.Keyword,r.CompletionItemKind.Snippet,r.CompletionItemKind.Color,r.CompletionItemKind.File,r.CompletionItemKind.Reference,r.CompletionItemKind.Folder,r.CompletionItemKind.EnumMember,r.CompletionItemKind.Constant,r.CompletionItemKind.Struct,r.CompletionItemKind.Event,r.CompletionItemKind.Operator,r.CompletionItemKind.TypeParameter];class c extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.CompletionRequest.type),this.labelDetailsSupport=new Map}fillClientCapabilities(e){let t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[r.MarkupKind.Markdown,r.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0,tagSupport:{valueSet:[r.CompletionItemTag.Deprecated]},insertReplaceSupport:!0,resolveSupport:{properties:["documentation","detail","additionalTextEdits"]},insertTextModeSupport:{valueSet:[r.InsertTextMode.asIs,r.InsertTextMode.adjustIndentation]},labelDetailsSupport:!0},t.insertTextMode=r.InsertTextMode.adjustIndentation,t.completionItemKind={valueSet:a},t.completionList={itemDefaults:["commitCharacters","editRange","insertTextFormat","insertTextMode","data"]}}initialize(e,t){const n=this.getRegistrationOptions(t,e.completionProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e,t){this.labelDetailsSupport.set(t,!!e.completionItem?.labelDetailsSupport);const n=e.triggerCharacters??[],o=e.allCommitCharacters,s=e.documentSelector,a={provideCompletionItems:(e,t,n,i)=>{const s=this._client,a=this._client.middleware,c=(e,t,n,i)=>s.sendRequest(r.CompletionRequest.type,s.code2ProtocolConverter.asCompletionParams(e,t,n),i).then((e=>i.isCancellationRequested?null:s.protocol2CodeConverter.asCompletionResult(e,o,i)),(e=>s.handleFailedRequest(r.CompletionRequest.type,i,e,null)));return a.provideCompletionItem?a.provideCompletionItem(e,t,i,n,c):c(e,t,i,n)},resolveCompletionItem:e.resolveProvider?(e,n)=>{const i=this._client,o=this._client.middleware,s=(e,n)=>i.sendRequest(r.CompletionResolveRequest.type,i.code2ProtocolConverter.asCompletionItem(e,!!this.labelDetailsSupport.get(t)),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asCompletionItem(e)),(t=>i.handleFailedRequest(r.CompletionResolveRequest.type,n,t,e)));return o.resolveCompletionItem?o.resolveCompletionItem(e,n,s):s(e,n)}:void 0};return[i.languages.registerCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(s),a,...n),a]}}t.CompletionItemFeature=c},5199:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncConfigurationFeature=t.toJSONObject=t.ConfigurationFeature=void 0;const i=n(1398),r=n(7354),o=n(8319),s=n(9032),a=n(4294);function c(e){if(e){if(Array.isArray(e))return e.map(c);if("object"==typeof e){const t=Object.create(null);for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=c(e[n]));return t}}return e}t.ConfigurationFeature=class{constructor(e){this._client=e}getState(){return{kind:"static"}}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(r.ConfigurationRequest.type,((t,n)=>{let i=e=>{let t=[];for(let n of e.items){let e=void 0!==n.scopeUri&&null!==n.scopeUri?this._client.protocol2CodeConverter.asUri(n.scopeUri):void 0;t.push(this.getConfiguration(e,null!==n.section?n.section:void 0))}return t},r=e.middleware.workspace;return r&&r.configuration?r.configuration(t,n,i):i(t)}))}getConfiguration(e,t){let n=null;if(t){let r=t.lastIndexOf(".");if(-1===r)n=c(i.workspace.getConfiguration(void 0,e).get(t));else{let o=i.workspace.getConfiguration(t.substr(0,r),e);o&&(n=c(o.get(t.substr(r+1))))}}else{let t=i.workspace.getConfiguration(void 0,e);n={};for(let e of Object.keys(t))t.has(e)&&(n[e]=c(t.get(e)))}return void 0===n&&(n=null),n}clear(){}},t.toJSONObject=c,t.SyncConfigurationFeature=class{constructor(e){this._client=e,this.isCleared=!1,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return r.DidChangeConfigurationNotification.type}fillClientCapabilities(e){(0,a.ensure)((0,a.ensure)(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){this.isCleared=!1;let e=this._client.clientOptions.synchronize?.configurationSection;void 0!==e&&this.register({id:s.generateUuid(),registerOptions:{section:e}})}register(e){let t=i.workspace.onDidChangeConfiguration((t=>{this.onDidChangeConfiguration(e.registerOptions.section,t)}));this._listeners.set(e.id,t),void 0!==e.registerOptions.section&&this.onDidChangeConfiguration(e.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}clear(){for(const e of this._listeners.values())e.dispose();this._listeners.clear(),this.isCleared=!0}onDidChangeConfiguration(e,t){if(this.isCleared)return;let n;if(n=o.string(e)?[e]:e,void 0!==n&&void 0!==t&&!n.some((e=>t.affectsConfiguration(e))))return;const i=async e=>void 0===e?this._client.sendNotification(r.DidChangeConfigurationNotification.type,{settings:null}):this._client.sendNotification(r.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)});let s=this._client.middleware.workspace?.didChangeConfiguration;(s?s(n,i):i(n)).catch((e=>{this._client.error(`Sending notification ${r.DidChangeConfigurationNotification.type.method} failed`,e)}))}extractSettingsInformation(e){function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let i=n[t[e]];i||(i=Object.create(null),n[t[e]]=i),n=i}return n}let n=this._client.clientOptions.workspaceFolder?this._client.clientOptions.workspaceFolder.uri:void 0,r=Object.create(null);for(let o=0;o<e.length;o++){let s=e[o],a=s.indexOf("."),u=null;if(u=a>=0?i.workspace.getConfiguration(s.substr(0,a),n).get(s.substr(a+1)):i.workspace.getConfiguration(void 0,n).get(s),u){let n=e[o].split(".");t(r,n)[n[n.length-1]]=c(u)}}return r}}},7061:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationFeature=void 0;const i=n(1398),r=n(7354),o=n(4294);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.DeclarationRequest.type)}fillClientCapabilities(e){const t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.declarationProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDeclaration:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.DeclarationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDeclarationResult(e,n)),(e=>i.handleFailedRequest(r.DeclarationRequest.type,n,e,null))),s=i.middleware;return s.provideDeclaration?s.provideDeclaration(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerDeclarationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DeclarationFeature=s},600:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefinitionFeature=void 0;const i=n(1398),r=n(7354),o=n(4294),s=n(9032);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.DefinitionRequest.type)}fillClientCapabilities(e){let t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.definitionProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDefinition:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.DefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>i.handleFailedRequest(r.DefinitionRequest.type,n,e,null))),s=i.middleware;return s.provideDefinition?s.provideDefinition(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.DefinitionFeature=a},9214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=t.DiagnosticPullMode=t.vsdiag=void 0;const i=n(6045),r=n(1398),o=n(7354),s=n(9032),a=n(4294);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var u,l,d,h,g;!function(e){let t;!function(e){e.full="full",e.unChanged="unChanged"}(t=e.DocumentDiagnosticReportKind||(e.DocumentDiagnosticReportKind={}))}(u||(t.vsdiag=u={})),function(e){e.onType="onType",e.onSave="onSave"}(l||(t.DiagnosticPullMode=l={})),function(e){e.active="open",e.reschedule="reschedule",e.outDated="drop"}(d||(d={}));class p{constructor(){this.open=new Set,this._onOpen=new r.EventEmitter,this._onClose=new r.EventEmitter,p.fillTabResources(this.open);void 0!==r.window.tabGroups.onDidChangeTabs?this.disposable=r.window.tabGroups.onDidChangeTabs((e=>{if(0===e.closed.length&&0===e.opened.length)return;const t=this.open,n=new Set;p.fillTabResources(n);const i=new Set,o=new Set(n);for(const e of t.values())n.has(e)?o.delete(e):i.add(e);if(this.open=n,i.size>0){const e=new Set;for(const t of i)e.add(r.Uri.parse(t));this._onClose.fire(e)}if(o.size>0){const e=new Set;for(const t of o)e.add(r.Uri.parse(t));this._onOpen.fire(e)}})):this.disposable={dispose:()=>{}}}get onClose(){return this._onClose.event}get onOpen(){return this._onOpen.event}dispose(){this.disposable.dispose()}isActive(e){return e instanceof r.Uri?r.window.activeTextEditor?.document.uri===e:r.window.activeTextEditor?.document===e}isVisible(e){const t=e instanceof r.Uri?e:e.uri;return this.open.has(t.toString())}getTabResources(){const e=new Set;return p.fillTabResources(new Set,e),e}static fillTabResources(e,t){const n=e??new Set;for(const e of r.window.tabGroups.all)for(const i of e.tabs){const e=i.input;let o;e instanceof r.TabInputText?o=e.uri:e instanceof r.TabInputTextDiff?o=e.modified:e instanceof r.TabInputCustom&&(o=e.uri),void 0===o||n.has(o.toString())||(n.add(o.toString()),void 0!==t&&t.add(o))}}}!function(e){e[e.document=1]="document",e[e.workspace=2]="workspace"}(h||(h={})),function(e){e.asKey=function(e){return e instanceof r.Uri?e.toString():e.uri.toString()}}(g||(g={}));class f{constructor(){this.documentPullStates=new Map,this.workspacePullStates=new Map}track(e,t,n){const i=e===h.document?this.documentPullStates:this.workspacePullStates,[o,s,a]=t instanceof r.Uri?[t.toString(),t,n]:[t.uri.toString(),t.uri,t.version];let c=i.get(o);return void 0===c&&(c={document:s,pulledVersion:a,resultId:void 0},i.set(o,c)),c}update(e,t,n,i){const o=e===h.document?this.documentPullStates:this.workspacePullStates,[s,a,c,u]=t instanceof r.Uri?[t.toString(),t,n,i]:[t.uri.toString(),t.uri,t.version,n];let l=o.get(s);void 0===l?(l={document:a,pulledVersion:c,resultId:u},o.set(s,l)):(l.pulledVersion=c,l.resultId=u)}unTrack(e,t){const n=g.asKey(t);(e===h.document?this.documentPullStates:this.workspacePullStates).delete(n)}tracks(e,t){const n=g.asKey(t);return(e===h.document?this.documentPullStates:this.workspacePullStates).has(n)}getResultId(e,t){const n=g.asKey(t),i=e===h.document?this.documentPullStates:this.workspacePullStates;return i.get(n)?.resultId}getAllResultIds(){const e=[];for(let[t,n]of this.workspacePullStates)this.documentPullStates.has(t)&&(n=this.documentPullStates.get(t)),void 0!==n.resultId&&e.push({uri:t,value:n.resultId});return e}}class m{constructor(e,t,n){this.client=e,this.tabs=t,this.options=n,this.isDisposed=!1,this.onDidChangeDiagnosticsEmitter=new r.EventEmitter,this.provider=this.createProvider(),this.diagnostics=r.languages.createDiagnosticCollection(n.identifier),this.openRequests=new Map,this.documentStates=new f,this.workspaceErrorCounter=0}knows(e,t){const n=t instanceof r.Uri?t:t.uri;return this.documentStates.tracks(e,t)||this.openRequests.has(n.toString())}forget(e,t){this.documentStates.unTrack(e,t)}pull(e,t){if(this.isDisposed)return;const n=e instanceof r.Uri?e:e.uri;this.pullAsync(e).then((()=>{t&&t()}),(e=>{this.client.error(`Document pull failed for text document ${n.toString()}`,e,!1)}))}async pullAsync(e,t){if(this.isDisposed)return;const n=e instanceof r.Uri,i=n?e:e.uri,s=i.toString();t=n?t:e.version;const c=this.openRequests.get(s),l=n?this.documentStates.track(h.document,e,t):this.documentStates.track(h.document,e);if(void 0===c){const n=new r.CancellationTokenSource;let c,g;this.openRequests.set(s,{state:d.active,document:e,version:t,tokenSource:n});try{c=await this.provider.provideDiagnostics(e,l.resultId,n.token)??{kind:u.DocumentDiagnosticReportKind.full,items:[]}}catch(t){if(t instanceof a.LSPCancellationError&&o.DiagnosticServerCancellationData.is(t.data)&&!1===t.data.retriggerRequest&&(g={state:d.outDated,document:e}),!(void 0===g&&t instanceof r.CancellationError))throw t;g={state:d.reschedule,document:e}}if(g=g??this.openRequests.get(s),void 0===g)return this.client.error(`Lost request state in diagnostic pull model. Clearing diagnostics for ${s}`),void this.diagnostics.delete(i);if(this.openRequests.delete(s),!this.tabs.isVisible(e))return void this.documentStates.unTrack(h.document,e);if(g.state===d.outDated)return;void 0!==c&&(c.kind===u.DocumentDiagnosticReportKind.full&&this.diagnostics.set(i,c.items),l.pulledVersion=t,l.resultId=c.resultId),g.state===d.reschedule&&this.pull(e)}else c.state===d.active?(c.tokenSource.cancel(),this.openRequests.set(s,{state:d.reschedule,document:c.document})):c.state===d.outDated&&this.openRequests.set(s,{state:d.reschedule,document:c.document})}forgetDocument(e){const t=e instanceof r.Uri?e:e.uri,n=t.toString(),i=this.openRequests.get(n);this.options.workspaceDiagnostics?void 0!==i?this.openRequests.set(n,{state:d.reschedule,document:e}):this.pull(e,(()=>{this.forget(h.document,e)})):(void 0!==i&&(i.state===d.active&&i.tokenSource.cancel(),this.openRequests.set(n,{state:d.outDated,document:e})),this.diagnostics.delete(t),this.forget(h.document,e))}pullWorkspace(){this.isDisposed||this.pullWorkspaceAsync().then((()=>{this.workspaceTimeout=(0,o.RAL)().timer.setTimeout((()=>{this.pullWorkspace()}),2e3)}),(e=>{e instanceof a.LSPCancellationError||o.DiagnosticServerCancellationData.is(e.data)||(this.client.error("Workspace diagnostic pull failed.",e,!1),this.workspaceErrorCounter++),this.workspaceErrorCounter<=5&&(this.workspaceTimeout=(0,o.RAL)().timer.setTimeout((()=>{this.pullWorkspace()}),2e3))}))}async pullWorkspaceAsync(){if(!this.provider.provideWorkspaceDiagnostics||this.isDisposed)return;void 0!==this.workspaceCancellation&&(this.workspaceCancellation.cancel(),this.workspaceCancellation=void 0),this.workspaceCancellation=new r.CancellationTokenSource;const e=this.documentStates.getAllResultIds().map((e=>({uri:this.client.protocol2CodeConverter.asUri(e.uri),value:e.value})));await this.provider.provideWorkspaceDiagnostics(e,this.workspaceCancellation.token,(e=>{if(e&&!this.isDisposed)for(const t of e.items)t.kind===u.DocumentDiagnosticReportKind.full&&(this.documentStates.tracks(h.document,t.uri)||this.diagnostics.set(t.uri,t.items)),this.documentStates.update(h.workspace,t.uri,t.version??void 0,t.resultId)}))}createProvider(){const e={onDidChangeDiagnostics:this.onDidChangeDiagnosticsEmitter.event,provideDiagnostics:(e,t,n)=>{const i=(e,t,n)=>{const i={identifier:this.options.identifier,textDocument:{uri:this.client.code2ProtocolConverter.asUri(e instanceof r.Uri?e:e.uri)},previousResultId:t};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(o.DocumentDiagnosticRequest.type,i,n).then((async e=>null==e||this.isDisposed||n.isCancellationRequested?{kind:u.DocumentDiagnosticReportKind.full,items:[]}:e.kind===o.DocumentDiagnosticReportKind.Full?{kind:u.DocumentDiagnosticReportKind.full,resultId:e.resultId,items:await this.client.protocol2CodeConverter.asDiagnostics(e.items,n)}:{kind:u.DocumentDiagnosticReportKind.unChanged,resultId:e.resultId}),(e=>this.client.handleFailedRequest(o.DocumentDiagnosticRequest.type,n,e,{kind:u.DocumentDiagnosticReportKind.full,items:[]}))):{kind:u.DocumentDiagnosticReportKind.full,items:[]}},s=this.client.middleware;return s.provideDiagnostics?s.provideDiagnostics(e,t,n,i):i(e,t,n)}};return this.options.workspaceDiagnostics&&(e.provideWorkspaceDiagnostics=(e,t,n)=>{const i=async e=>e.kind===o.DocumentDiagnosticReportKind.Full?{kind:u.DocumentDiagnosticReportKind.full,uri:this.client.protocol2CodeConverter.asUri(e.uri),resultId:e.resultId,version:e.version,items:await this.client.protocol2CodeConverter.asDiagnostics(e.items,t)}:{kind:u.DocumentDiagnosticReportKind.unChanged,uri:this.client.protocol2CodeConverter.asUri(e.uri),resultId:e.resultId,version:e.version},r=e=>{const t=[];for(const n of e)t.push({uri:this.client.code2ProtocolConverter.asUri(n.uri),value:n.value});return t},a=(e,t)=>{const a=(0,s.generateUuid)(),c=this.client.onProgress(o.WorkspaceDiagnosticRequest.partialResult,a,(async e=>{if(null==e)return void n(null);const t={items:[]};for(const n of e.items)try{t.items.push(await i(n))}catch(e){this.client.error("Converting workspace diagnostics failed.",e)}n(t)})),u={identifier:this.options.identifier,previousResultIds:r(e),partialResultToken:a};return!0!==this.isDisposed&&this.client.isRunning()?this.client.sendRequest(o.WorkspaceDiagnosticRequest.type,u,t).then((async e=>{if(t.isCancellationRequested)return{items:[]};const r={items:[]};for(const t of e.items)r.items.push(await i(t));return c.dispose(),n(r),{items:[]}}),(e=>(c.dispose(),this.client.handleFailedRequest(o.DocumentDiagnosticRequest.type,t,e,{items:[]})))):{items:[]}},c=this.client.middleware;return c.provideWorkspaceDiagnostics?c.provideWorkspaceDiagnostics(e,t,n,a):a(e,t)}),e}dispose(){this.isDisposed=!0,this.workspaceCancellation?.cancel(),this.workspaceTimeout?.dispose();for(const[e,t]of this.openRequests)t.state===d.active&&t.tokenSource.cancel(),this.openRequests.set(e,{state:d.outDated,document:t.document});this.diagnostics.dispose()}}class v{constructor(e){this.diagnosticRequestor=e,this.documents=new o.LinkedMap,this.isDisposed=!1}add(e){if(!0===this.isDisposed)return;const t=g.asKey(e);this.documents.has(t)||(this.documents.set(t,e,o.Touch.Last),this.trigger())}remove(e){const t=g.asKey(e);this.documents.delete(t),0===this.documents.size?this.stop():t===this.endDocumentKey()&&(this.endDocument=this.documents.last)}trigger(){!0!==this.isDisposed&&(void 0===this.intervalHandle?(this.endDocument=this.documents.last,this.intervalHandle=(0,o.RAL)().timer.setInterval((()=>{const e=this.documents.first;if(void 0!==e){const t=g.asKey(e);this.diagnosticRequestor.pull(e),this.documents.set(t,e,o.Touch.Last),t===this.endDocumentKey()&&this.stop()}}),200)):this.endDocument=this.documents.last)}dispose(){this.isDisposed=!0,this.stop(),this.documents.clear()}stop(){this.intervalHandle?.dispose(),this.intervalHandle=void 0,this.endDocument=void 0}endDocumentKey(){return void 0!==this.endDocument?g.asKey(this.endDocument):void 0}}class y{constructor(e,t,n){const s=e.clientOptions.diagnosticPullOptions??{onChange:!0,onSave:!1},a=e.protocol2CodeConverter.asDocumentSelector(n.documentSelector),c=[],u=e=>e instanceof r.Uri?(e=>{const t=n.documentSelector;if(void 0!==s.match)return s.match(t,e);for(const n of t)if(o.TextDocumentFilter.is(n)){if("string"==typeof n)return!1;if(void 0!==n.language&&"*"!==n.language)return!1;if(void 0!==n.scheme&&"*"!==n.scheme&&n.scheme!==e.scheme)return!1;if(void 0!==n.pattern){const t=new i.Minimatch(n.pattern,{noext:!0});if(!t.makeRe())return!1;if(!t.match(e.fsPath))return!1}}return!0})(e):r.languages.match(a,e)>0&&t.isVisible(e),d=e=>e instanceof r.Uri?this.activeTextDocument?.uri.toString()===e.toString():this.activeTextDocument===e;this.diagnosticRequestor=new m(e,t,n),this.backgroundScheduler=new v(this.diagnosticRequestor);const g=e=>{u(e)&&n.interFileDependencies&&!d(e)&&this.backgroundScheduler.add(e)};this.activeTextDocument=r.window.activeTextEditor?.document,r.window.onDidChangeActiveTextEditor((e=>{const t=this.activeTextDocument;this.activeTextDocument=e?.document,void 0!==t&&g(t),void 0!==this.activeTextDocument&&this.backgroundScheduler.remove(this.activeTextDocument)}));const p=e.getFeature(o.DidOpenTextDocumentNotification.method);c.push(p.onNotificationSent((e=>{const t=e.textDocument;this.diagnosticRequestor.knows(h.document,t)||u(t)&&this.diagnosticRequestor.pull(t,(()=>{g(t)}))}))),c.push(t.onOpen((e=>{for(const t of e){if(this.diagnosticRequestor.knows(h.document,t))continue;const e=t.toString();let n;for(const t of r.workspace.textDocuments)if(e===t.uri.toString()){n=t;break}void 0!==n&&u(n)&&this.diagnosticRequestor.pull(n,(()=>{g(n)}))}})));const f=new Set;for(const e of r.workspace.textDocuments)u(e)&&(this.diagnosticRequestor.pull(e,(()=>{g(e)})),f.add(e.uri.toString()));if(!0===s.onTabs)for(const e of t.getTabResources())!f.has(e.toString())&&u(e)&&this.diagnosticRequestor.pull(e,(()=>{g(e)}));if(!0===s.onChange){const t=e.getFeature(o.DidChangeTextDocumentNotification.method);c.push(t.onNotificationSent((async e=>{const t=e.textDocument;void 0!==s.filter&&s.filter(t,l.onType)||!this.diagnosticRequestor.knows(h.document,t)||this.diagnosticRequestor.pull(t,(()=>{this.backgroundScheduler.trigger()}))})))}if(!0===s.onSave){const t=e.getFeature(o.DidSaveTextDocumentNotification.method);c.push(t.onNotificationSent((e=>{const t=e.textDocument;void 0!==s.filter&&s.filter(t,l.onSave)||!this.diagnosticRequestor.knows(h.document,t)||this.diagnosticRequestor.pull(e.textDocument,(()=>{this.backgroundScheduler.trigger()}))})))}const y=e.getFeature(o.DidCloseTextDocumentNotification.method);c.push(y.onNotificationSent((e=>{this.cleanUpDocument(e.textDocument)}))),t.onClose((e=>{for(const t of e)this.cleanUpDocument(t)})),this.diagnosticRequestor.onDidChangeDiagnosticsEmitter.event((()=>{for(const e of r.workspace.textDocuments)u(e)&&this.diagnosticRequestor.pull(e)})),!0===n.workspaceDiagnostics&&"da348dc5-c30a-4515-9d98-31ff3be38d14"!==n.identifier&&this.diagnosticRequestor.pullWorkspace(),this.disposable=r.Disposable.from(...c,this.backgroundScheduler,this.diagnosticRequestor)}get onDidChangeDiagnosticsEmitter(){return this.diagnosticRequestor.onDidChangeDiagnosticsEmitter}get diagnostics(){return this.diagnosticRequestor.provider}cleanUpDocument(e){this.diagnosticRequestor.knows(h.document,e)&&(this.diagnosticRequestor.forgetDocument(e),this.backgroundScheduler.remove(e))}}class b extends a.TextDocumentLanguageFeature{constructor(e){super(e,o.DocumentDiagnosticRequest.type)}fillClientCapabilities(e){let t=c(c(e,"textDocument"),"diagnostic");t.dynamicRegistration=!0,t.relatedDocumentSupport=!1,c(c(e,"workspace"),"diagnostics").refreshSupport=!0}initialize(e,t){this._client.onRequest(o.DiagnosticRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeDiagnosticsEmitter.fire()}));let[n,i]=this.getRegistration(t,e.diagnosticProvider);n&&i&&this.register({id:n,registerOptions:i})}clear(){void 0!==this.tabs&&(this.tabs.dispose(),this.tabs=void 0),super.clear()}registerLanguageProvider(e){void 0===this.tabs&&(this.tabs=new p);const t=new y(this._client,this.tabs,e);return[t.disposable,t]}}t.DiagnosticFeature=b},9014:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentHighlightFeature=void 0;const i=n(1398),r=n(7354),o=n(4294),s=n(9032);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.DocumentHighlightRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentHighlightProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentHighlights:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.DocumentHighlightRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDocumentHighlights(e,n)),(e=>i.handleFailedRequest(r.DocumentHighlightRequest.type,n,e,null))),s=i.middleware;return s.provideDocumentHighlights?s.provideDocumentHighlights(e,t,n,o):o(e,t,n)}};return[i.languages.registerDocumentHighlightProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentHighlightFeature=a},7656:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLinkFeature=void 0;const i=n(1398),r=n(7354),o=n(4294),s=n(9032);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.DocumentLinkRequest.type)}fillClientCapabilities(e){const t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"documentLink");t.dynamicRegistration=!0,t.tooltipSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentLinkProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentLinks:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.DocumentLinkRequest.type,n.code2ProtocolConverter.asDocumentLinkParams(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asDocumentLinks(e,t)),(e=>n.handleFailedRequest(r.DocumentLinkRequest.type,t,e,null))),o=n.middleware;return o.provideDocumentLinks?o.provideDocumentLinks(e,t,i):i(e,t)},resolveDocumentLink:e.resolveProvider?(e,t)=>{const n=this._client;let i=(e,t)=>n.sendRequest(r.DocumentLinkResolveRequest.type,n.code2ProtocolConverter.asDocumentLink(e),t).then((i=>t.isCancellationRequested?e:n.protocol2CodeConverter.asDocumentLink(i)),(i=>n.handleFailedRequest(r.DocumentLinkResolveRequest.type,t,i,e)));const o=n.middleware;return o.resolveDocumentLink?o.resolveDocumentLink(e,t,i):i(e,t)}:void 0};return[i.languages.registerDocumentLinkProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentLinkFeature=a},9228:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentSymbolFeature=t.SupportedSymbolTags=t.SupportedSymbolKinds=void 0;const i=n(1398),r=n(7354),o=n(4294),s=n(9032);t.SupportedSymbolKinds=[r.SymbolKind.File,r.SymbolKind.Module,r.SymbolKind.Namespace,r.SymbolKind.Package,r.SymbolKind.Class,r.SymbolKind.Method,r.SymbolKind.Property,r.SymbolKind.Field,r.SymbolKind.Constructor,r.SymbolKind.Enum,r.SymbolKind.Interface,r.SymbolKind.Function,r.SymbolKind.Variable,r.SymbolKind.Constant,r.SymbolKind.String,r.SymbolKind.Number,r.SymbolKind.Boolean,r.SymbolKind.Array,r.SymbolKind.Object,r.SymbolKind.Key,r.SymbolKind.Null,r.SymbolKind.EnumMember,r.SymbolKind.Struct,r.SymbolKind.Event,r.SymbolKind.Operator,r.SymbolKind.TypeParameter],t.SupportedSymbolTags=[r.SymbolTag.Deprecated];class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.DocumentSymbolRequest.type)}fillClientCapabilities(e){let n=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"documentSymbol");n.dynamicRegistration=!0,n.symbolKind={valueSet:t.SupportedSymbolKinds},n.hierarchicalDocumentSymbolSupport=!0,n.tagSupport={valueSet:t.SupportedSymbolTags},n.labelSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentSymbolProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentSymbols:(e,t)=>{const n=this._client,i=async(e,t)=>{try{const i=await n.sendRequest(r.DocumentSymbolRequest.type,n.code2ProtocolConverter.asDocumentSymbolParams(e),t);if(t.isCancellationRequested||null==i)return null;if(0===i.length)return[];{const e=i[0];return r.DocumentSymbol.is(e)?await n.protocol2CodeConverter.asDocumentSymbols(i,t):await n.protocol2CodeConverter.asSymbolInformations(i,t)}}catch(e){return n.handleFailedRequest(r.DocumentSymbolRequest.type,t,e,null)}},o=n.middleware;return o.provideDocumentSymbols?o.provideDocumentSymbols(e,t,i):i(e,t)}},o=void 0!==e.label?{label:e.label}:void 0;return[i.languages.registerDocumentSymbolProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,o),n]}}t.DocumentSymbolFeature=a},9073:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteCommandFeature=void 0;const i=n(1398),r=n(7354),o=n(9032),s=n(4294);t.ExecuteCommandFeature=class{constructor(e){this._client=e,this._commands=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._commands.size>0}}get registrationType(){return r.ExecuteCommandRequest.type}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register({id:o.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e){const t=this._client,n=t.middleware,o=(e,n)=>{let i={command:e,arguments:n};return t.sendRequest(r.ExecuteCommandRequest.type,i).then(void 0,(e=>t.handleFailedRequest(r.ExecuteCommandRequest.type,void 0,e,void 0)))};if(e.registerOptions.commands){const t=[];for(const r of e.registerOptions.commands)t.push(i.commands.registerCommand(r,((...e)=>n.executeCommand?n.executeCommand(r,e,o):o(r,e))));this._commands.set(e.id,t)}}unregister(e){let t=this._commands.get(e);t&&t.forEach((e=>e.dispose()))}clear(){this._commands.forEach((e=>{e.forEach((e=>e.dispose()))})),this._commands.clear()}}},4294:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFeature=t.TextDocumentLanguageFeature=t.TextDocumentEventFeature=t.DynamicDocumentFeature=t.DynamicFeature=t.StaticFeature=t.ensure=t.LSPCancellationError=void 0;const i=n(1398),r=n(7354),o=n(8319),s=n(9032);class a extends i.CancellationError{constructor(e){super(),this.data=e}}var c,u;t.LSPCancellationError=a,t.ensure=function(e,t){return void 0===e[t]&&(e[t]={}),e[t]},function(e){e.is=function(e){const t=e;return null!=t&&o.func(t.fillClientCapabilities)&&o.func(t.initialize)&&o.func(t.getState)&&o.func(t.clear)&&(void 0===t.fillInitializeParams||o.func(t.fillInitializeParams))}}(c||(t.StaticFeature=c={})),function(e){e.is=function(e){const t=e;return null!=t&&o.func(t.fillClientCapabilities)&&o.func(t.initialize)&&o.func(t.getState)&&o.func(t.clear)&&(void 0===t.fillInitializeParams||o.func(t.fillInitializeParams))&&o.func(t.register)&&o.func(t.unregister)&&void 0!==t.registrationType}}(u||(t.DynamicFeature=u={}));class l{constructor(e){this._client=e}getState(){const e=this.getDocumentSelectors();let t=0;for(const n of e){t++;for(const e of i.workspace.textDocuments)if(i.languages.match(n,e)>0)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}const n=t>0;return{kind:"document",id:this.registrationType.method,registrations:n,matches:!1}}}t.DynamicDocumentFeature=l,t.TextDocumentEventFeature=class extends l{static textDocumentFilter(e,t){for(const n of e)if(i.languages.match(n,t)>0)return!0;return!1}constructor(e,t,n,r,o,s,a){super(e),this._event=t,this._type=n,this._middleware=r,this._createParams=o,this._textDocument=s,this._selectorFilter=a,this._selectors=new Map,this._onNotificationSent=new i.EventEmitter}getStateInfo(){return[this._selectors.values(),!1]}getDocumentSelectors(){return this._selectors.values()}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=this._event((e=>{this.callback(e).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed.`,e)}))}))),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}async callback(e){const t=async e=>{const t=this._createParams(e);await this._client.sendNotification(this._type,t),this.notificationSent(this.getTextDocument(e),this._type,t)};if(this.matches(e)){const n=this._middleware();return n?n(e,(e=>t(e))):t(e)}}matches(e){return!this._client.hasDedicatedTextSynchronizationFeature(this._textDocument(e))&&(!this._selectorFilter||this._selectorFilter(this._selectors.values(),e))}get onNotificationSent(){return this._onNotificationSent.event}notificationSent(e,t,n){this._onNotificationSent.fire({textDocument:e,type:t,params:n})}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._onNotificationSent.dispose(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getProvider(e){for(const t of this._selectors.values())if(i.languages.match(t,e)>0)return{send:e=>this.callback(e)}}},t.TextDocumentLanguageFeature=class extends l{constructor(e,t){super(e),this._registrationType=t,this._registrations=new Map}*getDocumentSelectors(){for(const e of this._registrations.values()){const t=e.data.registerOptions.documentSelector;null!==t&&(yield this._client.protocol2CodeConverter.asDocumentSelector(t))}}get registrationType(){return this._registrationType}register(e){if(!e.registerOptions.documentSelector)return;let t=this.registerLanguageProvider(e.registerOptions,e.id);this._registrations.set(e.id,{disposable:t[0],data:e,provider:t[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}clear(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}getRegistration(e,t){if(!t)return[void 0,void 0];if(r.TextDocumentRegistrationOptions.is(t)){const n=r.StaticRegistrationOptions.hasId(t)?t.id:s.generateUuid(),i=t.documentSelector??e;if(i)return[n,Object.assign({},t,{documentSelector:i})]}else if(o.boolean(t)&&!0===t||r.WorkDoneProgressOptions.is(t)){if(!e)return[void 0,void 0];const n=o.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e});return[s.generateUuid(),n]}return[void 0,void 0]}getRegistrationOptions(e,t){if(e&&t)return o.boolean(t)&&!0===t?{documentSelector:e}:Object.assign({},t,{documentSelector:e})}getProvider(e){for(const t of this._registrations.values()){let n=t.data.registerOptions.documentSelector;if(null!==n&&i.languages.match(this._client.protocol2CodeConverter.asDocumentSelector(n),e)>0)return t.provider}}getAllProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}},t.WorkspaceFeature=class{constructor(e,t){this._client=e,this._registrationType=t,this._registrations=new Map}getState(){const e=this._registrations.size>0;return{kind:"workspace",id:this._registrationType.method,registrations:e}}get registrationType(){return this._registrationType}register(e){const t=this.registerLanguageProvider(e.registerOptions);this._registrations.set(e.id,{disposable:t[0],provider:t[1]})}unregister(e){let t=this._registrations.get(e);void 0!==t&&t.disposable.dispose()}clear(){this._registrations.forEach((e=>{e.disposable.dispose()})),this._registrations.clear()}getProviders(){const e=[];for(const t of this._registrations.values())e.push(t.provider);return e}}},2485:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesFeature=t.WillRenameFilesFeature=t.WillCreateFilesFeature=t.DidDeleteFilesFeature=t.DidRenameFilesFeature=t.DidCreateFilesFeature=void 0;const i=n(1398),r=n(6045),o=n(7354),s=n(9032);function a(e,t){return void 0===e[t]&&(e[t]={}),e[t]}function c(e,t,n){e[t]=n}class u{constructor(e,t,n,i,r){this._client=e,this._event=t,this._registrationType=n,this._clientCapability=i,this._serverCapability=r,this._filters=new Map}getState(){return{kind:"workspace",id:this._registrationType.method,registrations:this._filters.size>0}}filterSize(){return this._filters.size}get registrationType(){return this._registrationType}fillClientCapabilities(e){const t=a(a(e,"workspace"),"fileOperations");c(t,"dynamicRegistration",!0),c(t,this._clientCapability,!0)}initialize(e){const t=e.workspace?.fileOperations,n=void 0!==t?t[this._serverCapability]:void 0;if(void 0!==n?.filters)try{this.register({id:s.generateUuid(),registerOptions:{filters:n.filters}})}catch(e){this._client.warn(`Ignoring invalid glob pattern for ${this._serverCapability} registration: ${e}`)}}register(e){this._listener||(this._listener=this._event(this.send,this));const t=e.registerOptions.filters.map((e=>{const t=new r.Minimatch(e.pattern.glob,u.asMinimatchOptions(e.pattern.options));if(!t.makeRe())throw new Error(`Invalid pattern ${e.pattern.glob}!`);return{scheme:e.scheme,matcher:t,kind:e.pattern.matches}}));this._filters.set(e.id,t)}unregister(e){this._filters.delete(e),0===this._filters.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._filters.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}getFileType(e){return u.getFileType(e)}async filter(e,t){const n=await Promise.all(e.files.map((async e=>{const n=t(e),r=n.fsPath.replace(/\\/g,"/");for(const e of this._filters.values())for(const t of e)if(void 0===t.scheme||t.scheme===n.scheme)if(t.matcher.match(r)){if(void 0===t.kind)return!0;const e=await this.getFileType(n);if(void 0===e)return this._client.error(`Failed to determine file type for ${n.toString()}.`),!0;if(e===i.FileType.File&&t.kind===o.FileOperationPatternKind.file||e===i.FileType.Directory&&t.kind===o.FileOperationPatternKind.folder)return!0}else if(t.kind===o.FileOperationPatternKind.folder&&await u.getFileType(n)===i.FileType.Directory&&t.matcher.match(`${r}/`))return!0;return!1}))),r=e.files.filter(((e,t)=>n[t]));return{...e,files:r}}static async getFileType(e){try{return(await i.workspace.fs.stat(e)).type}catch(e){return}}static asMinimatchOptions(e){const t={dot:!0};return!0===e?.ignoreCase&&(t.nocase=!0),t}}class l extends u{constructor(e,t,n,i,r,o,s){super(e,t,n,i,r),this._notificationType=n,this._accessUri=o,this._createParams=s}async send(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=async e=>this._client.sendNotification(this._notificationType,this._createParams(e));return this.doSend(t,e)}}}class d extends l{constructor(){super(...arguments),this._fsPathFileTypes=new Map}async getFileType(e){const t=e.fsPath;if(this._fsPathFileTypes.has(t))return this._fsPathFileTypes.get(t);const n=await u.getFileType(e);return n&&this._fsPathFileTypes.set(t,n),n}async cacheFileTypes(e,t){await this.filter(e,t)}clearFileTypeCache(){this._fsPathFileTypes.clear()}unregister(e){super.unregister(e),0===this.filterSize()&&this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}clear(){super.clear(),this._willListener&&(this._willListener.dispose(),this._willListener=void 0)}}t.DidCreateFilesFeature=class extends l{constructor(e){super(e,i.workspace.onDidCreateFiles,o.DidCreateFilesNotification.type,"didCreate","didCreate",(e=>e),e.code2ProtocolConverter.asDidCreateFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.didCreateFiles?n.didCreateFiles(e,t):t(e)}},t.DidRenameFilesFeature=class extends d{constructor(e){super(e,i.workspace.onDidRenameFiles,o.DidRenameFilesNotification.type,"didRename","didRename",(e=>e.oldUri),e.code2ProtocolConverter.asDidRenameFilesParams)}register(e){this._willListener||(this._willListener=i.workspace.onWillRenameFiles(this.willRename,this)),super.register(e)}willRename(e){e.waitUntil(this.cacheFileTypes(e,(e=>e.oldUri)))}doSend(e,t){this.clearFileTypeCache();const n=this._client.middleware.workspace;return n?.didRenameFiles?n.didRenameFiles(e,t):t(e)}},t.DidDeleteFilesFeature=class extends d{constructor(e){super(e,i.workspace.onDidDeleteFiles,o.DidDeleteFilesNotification.type,"didDelete","didDelete",(e=>e),e.code2ProtocolConverter.asDidDeleteFilesParams)}register(e){this._willListener||(this._willListener=i.workspace.onWillDeleteFiles(this.willDelete,this)),super.register(e)}willDelete(e){e.waitUntil(this.cacheFileTypes(e,(e=>e)))}doSend(e,t){this.clearFileTypeCache();const n=this._client.middleware.workspace;return n?.didDeleteFiles?n.didDeleteFiles(e,t):t(e)}};class h extends u{constructor(e,t,n,i,r,o,s){super(e,t,n,i,r),this._requestType=n,this._accessUri=o,this._createParams=s}async send(e){const t=this.waitUntil(e);e.waitUntil(t)}async waitUntil(e){const t=await this.filter(e,this._accessUri);if(t.files.length){const e=e=>this._client.sendRequest(this._requestType,this._createParams(e),e.token).then(this._client.protocol2CodeConverter.asWorkspaceEdit);return this.doSend(t,e)}}}t.WillCreateFilesFeature=class extends h{constructor(e){super(e,i.workspace.onWillCreateFiles,o.WillCreateFilesRequest.type,"willCreate","willCreate",(e=>e),e.code2ProtocolConverter.asWillCreateFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willCreateFiles?n.willCreateFiles(e,t):t(e)}},t.WillRenameFilesFeature=class extends h{constructor(e){super(e,i.workspace.onWillRenameFiles,o.WillRenameFilesRequest.type,"willRename","willRename",(e=>e.oldUri),e.code2ProtocolConverter.asWillRenameFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willRenameFiles?n.willRenameFiles(e,t):t(e)}},t.WillDeleteFilesFeature=class extends h{constructor(e){super(e,i.workspace.onWillDeleteFiles,o.WillDeleteFilesRequest.type,"willDelete","willDelete",(e=>e),e.code2ProtocolConverter.asWillDeleteFilesParams)}doSend(e,t){const n=this._client.middleware.workspace;return n?.willDeleteFiles?n.willDeleteFiles(e,t):t(e)}}},9084:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileSystemWatcherFeature=void 0;const i=n(1398),r=n(7354),o=n(4294);t.FileSystemWatcherFeature=class{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._watchers.size>0}}get registrationType(){return r.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0,(0,o.ensure)((0,o.ensure)(e,"workspace"),"didChangeWatchedFiles").relativePatternSupport=!0}initialize(e,t){}register(e){if(!Array.isArray(e.registerOptions.watchers))return;const t=[];for(const n of e.registerOptions.watchers){const e=this._client.protocol2CodeConverter.asGlobPattern(n.globPattern);if(void 0===e)continue;let o=!0,s=!0,a=!0;void 0!==n.kind&&null!==n.kind&&(o=!!(n.kind&r.WatchKind.Create),s=!!(n.kind&r.WatchKind.Change),a=!!(n.kind&r.WatchKind.Delete));const c=i.workspace.createFileSystemWatcher(e,!o,!s,!a);this.hookListeners(c,o,s,a,t),t.push(c)}this._watchers.set(e.id,t)}registerRaw(e,t){let n=[];for(let e of t)this.hookListeners(e,!0,!0,!0,n);this._watchers.set(e,n)}hookListeners(e,t,n,i,o){t&&e.onDidCreate((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:r.FileChangeType.Created})),null,o),n&&e.onDidChange((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:r.FileChangeType.Changed})),null,o),i&&e.onDidDelete((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:r.FileChangeType.Deleted})),null,o)}unregister(e){let t=this._watchers.get(e);if(t)for(let e of t)e.dispose()}clear(){this._watchers.forEach((e=>{for(let t of e)t.dispose()})),this._watchers.clear()}}},3963:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeFeature=void 0;const i=n(1398),r=n(7354),o=n(4294);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0,t.foldingRangeKind={valueSet:[r.FoldingRangeKind.Comment,r.FoldingRangeKind.Imports,r.FoldingRangeKind.Region]},t.foldingRange={collapsedText:!1},(0,o.ensure)((0,o.ensure)(e,"workspace"),"foldingRange").refreshSupport=!0}initialize(e,t){this._client.onRequest(r.FoldingRangeRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeFoldingRange.fire()}));let[n,i]=this.getRegistration(t,e.foldingRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,o={onDidChangeFoldingRanges:n.event,provideFoldingRanges:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e)};return i.sendRequest(r.FoldingRangeRequest.type,o,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asFoldingRanges(e,n)),(e=>i.handleFailedRequest(r.FoldingRangeRequest.type,n,e,null)))},s=i.middleware;return s.provideFoldingRanges?s.provideFoldingRanges(e,t,n,o):o(e,0,n)}};return[i.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),o),{provider:o,onDidChangeFoldingRange:n}]}}t.FoldingRangeFeature=s},7298:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentOnTypeFormattingFeature=t.DocumentRangeFormattingFeature=t.DocumentFormattingFeature=void 0;const i=n(1398),r=n(7354),o=n(9032),s=n(4294);var a;!function(e){e.fromConfiguration=function(e){const t=i.workspace.getConfiguration("files",e);return{trimTrailingWhitespace:t.get("trimTrailingWhitespace"),trimFinalNewlines:t.get("trimFinalNewlines"),insertFinalNewline:t.get("insertFinalNewline")}}}(a||(a={}));class c extends s.TextDocumentLanguageFeature{constructor(e){super(e,r.DocumentFormattingRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentFormattingProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentFormattingEdits:(e,t,n)=>{const i=this._client,o=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),options:i.code2ProtocolConverter.asFormattingOptions(t,a.fromConfiguration(e))};return i.sendRequest(r.DocumentFormattingRequest.type,o,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asTextEdits(e,n)),(e=>i.handleFailedRequest(r.DocumentFormattingRequest.type,n,e,null)))},s=i.middleware;return s.provideDocumentFormattingEdits?s.provideDocumentFormattingEdits(e,t,n,o):o(e,t,n)}};return[i.languages.registerDocumentFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentFormattingFeature=c;class u extends s.TextDocumentLanguageFeature{constructor(e){super(e,r.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){const t=(0,s.ensure)((0,s.ensure)(e,"textDocument"),"rangeFormatting");t.dynamicRegistration=!0,t.rangesSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentRangeFormattingProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideDocumentRangeFormattingEdits:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),options:o.code2ProtocolConverter.asFormattingOptions(n,a.fromConfiguration(e))};return o.sendRequest(r.DocumentRangeFormattingRequest.type,s,i).then((e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asTextEdits(e,i)),(e=>o.handleFailedRequest(r.DocumentRangeFormattingRequest.type,i,e,null)))},c=o.middleware;return c.provideDocumentRangeFormattingEdits?c.provideDocumentRangeFormattingEdits(e,t,n,i,s):s(e,t,n,i)}};return e.rangesSupport&&(n.provideDocumentRangesFormattingEdits=(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),ranges:o.code2ProtocolConverter.asRanges(t),options:o.code2ProtocolConverter.asFormattingOptions(n,a.fromConfiguration(e))};return o.sendRequest(r.DocumentRangesFormattingRequest.type,s,i).then((e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asTextEdits(e,i)),(e=>o.handleFailedRequest(r.DocumentRangesFormattingRequest.type,i,e,null)))},c=o.middleware;return c.provideDocumentRangesFormattingEdits?c.provideDocumentRangesFormattingEdits(e,t,n,i,s):s(e,t,n,i)}),[i.languages.registerDocumentRangeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.DocumentRangeFormattingFeature=u;class l extends s.TextDocumentLanguageFeature{constructor(e){super(e,r.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){(0,s.ensure)((0,s.ensure)(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.documentOnTypeFormattingProvider);n&&this.register({id:o.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideOnTypeFormattingEdits:(e,t,n,i,o)=>{const s=this._client,c=(e,t,n,i,o)=>{let c={textDocument:s.code2ProtocolConverter.asTextDocumentIdentifier(e),position:s.code2ProtocolConverter.asPosition(t),ch:n,options:s.code2ProtocolConverter.asFormattingOptions(i,a.fromConfiguration(e))};return s.sendRequest(r.DocumentOnTypeFormattingRequest.type,c,o).then((e=>o.isCancellationRequested?null:s.protocol2CodeConverter.asTextEdits(e,o)),(e=>s.handleFailedRequest(r.DocumentOnTypeFormattingRequest.type,o,e,null)))},u=s.middleware;return u.provideOnTypeFormattingEdits?u.provideOnTypeFormattingEdits(e,t,n,i,o,c):c(e,t,n,i,o)}},o=e.moreTriggerCharacter||[];return[i.languages.registerOnTypeFormattingEditProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n,e.firstTriggerCharacter,...o),n]}}t.DocumentOnTypeFormattingFeature=l},1507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HoverFeature=void 0;const i=n(1398),r=n(7354),o=n(4294),s=n(9032);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.HoverRequest.type)}fillClientCapabilities(e){const t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[r.MarkupKind.Markdown,r.MarkupKind.PlainText]}initialize(e,t){const n=this.getRegistrationOptions(t,e.hoverProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideHover:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.HoverRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asHover(e)),(e=>i.handleFailedRequest(r.HoverRequest.type,n,e,null))),s=i.middleware;return s.provideHover?s.provideHover(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerHoverProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.HoverFeature=a},191:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationFeature=void 0;const i=n(1398),r=n(7354),o=n(4294);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.ImplementationRequest.type)}fillClientCapabilities(e){let t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.implementationProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideImplementation:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.ImplementationRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>i.handleFailedRequest(r.ImplementationRequest.type,n,e,null))),s=i.middleware;return s.provideImplementation?s.provideImplementation(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerImplementationProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ImplementationFeature=s},2767:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintsFeature=void 0;const i=n(1398),r=n(7354),o=n(4294);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.InlayHintRequest.type)}fillClientCapabilities(e){const t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"inlayHint");t.dynamicRegistration=!0,t.resolveSupport={properties:["tooltip","textEdits","label.tooltip","label.location","label.command"]},(0,o.ensure)((0,o.ensure)(e,"workspace"),"inlayHint").refreshSupport=!0}initialize(e,t){this._client.onRequest(r.InlayHintRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeInlayHints.fire()}));const[n,i]=this.getRegistration(t,e.inlayHintProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,o={onDidChangeInlayHints:n.event,provideInlayHints:(e,t,n)=>{const i=this._client,o=async(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),range:i.code2ProtocolConverter.asRange(t)};try{const e=await i.sendRequest(r.InlayHintRequest.type,o,n);return n.isCancellationRequested?null:i.protocol2CodeConverter.asInlayHints(e,n)}catch(e){return i.handleFailedRequest(r.InlayHintRequest.type,n,e,null)}},s=i.middleware;return s.provideInlayHints?s.provideInlayHints(e,t,n,o):o(e,t,n)}};return o.resolveInlayHint=!0===e.resolveProvider?(e,t)=>{const n=this._client,i=async(e,t)=>{try{const i=await n.sendRequest(r.InlayHintResolveRequest.type,n.code2ProtocolConverter.asInlayHint(e),t);if(t.isCancellationRequested)return null;const o=n.protocol2CodeConverter.asInlayHint(i,t);return t.isCancellationRequested?null:o}catch(e){return n.handleFailedRequest(r.InlayHintResolveRequest.type,t,e,null)}},o=n.middleware;return o.resolveInlayHint?o.resolveInlayHint(e,t,i):i(e,t)}:void 0,[this.registerProvider(t,o),{provider:o,onDidChangeInlayHints:n}]}registerProvider(e,t){return i.languages.registerInlayHintsProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlayHintsFeature=s},3370:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionItemFeature=void 0;const i=n(1398),r=n(7354),o=n(4294),s=n(9032);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.InlineCompletionRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"inlineCompletion").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.inlineCompletionProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideInlineCompletionItems:(e,t,n,i)=>{const o=this._client,s=this._client.middleware,a=(e,t,n,i)=>o.sendRequest(r.InlineCompletionRequest.type,o.code2ProtocolConverter.asInlineCompletionParams(e,t,n),i).then((e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asInlineCompletionResult(e,i)),(e=>o.handleFailedRequest(r.InlineCompletionRequest.type,i,e,null)));return s.provideInlineCompletionItems?s.provideInlineCompletionItems(e,t,n,i,a):a(e,t,n,i)}};return[i.languages.registerInlineCompletionItemProvider(this._client.protocol2CodeConverter.asDocumentSelector(t),n),n]}}t.InlineCompletionItemFeature=a},3131:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const i=n(1398),r=n(7354),o=n(4294);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.InlineValueRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"inlineValue").dynamicRegistration=!0,(0,o.ensure)((0,o.ensure)(e,"workspace"),"inlineValue").refreshSupport=!0}initialize(e,t){this._client.onRequest(r.InlineValueRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeInlineValues.fire()}));const[n,i]=this.getRegistration(t,e.inlineValueProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=new i.EventEmitter,o={onDidChangeInlineValues:n.event,provideInlineValues:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>{const s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),range:o.code2ProtocolConverter.asRange(t),context:o.code2ProtocolConverter.asInlineValueContext(n)};return o.sendRequest(r.InlineValueRequest.type,s,i).then((e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asInlineValues(e,i)),(e=>o.handleFailedRequest(r.InlineValueRequest.type,i,e,null)))},a=o.middleware;return a.provideInlineValues?a.provideInlineValues(e,t,n,i,s):s(e,t,n,i)}};return[this.registerProvider(t,o),{provider:o,onDidChangeInlineValues:n}]}registerProvider(e,t){return i.languages.registerInlineValuesProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.InlineValueFeature=s},4913:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingFeature=void 0;const i=n(1398),r=n(7354),o=n(4294);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.LinkedEditingRangeRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"linkedEditingRange").dynamicRegistration=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.linkedEditingRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideLinkedEditingRanges:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.LinkedEditingRangeRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asLinkedEditingRanges(e,n)),(e=>i.handleFailedRequest(r.LinkedEditingRangeRequest.type,n,e,null))),s=i.middleware;return s.provideLinkedEditingRange?s.provideLinkedEditingRange(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerLinkedEditingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.LinkedEditingFeature=s},1872:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocumentSyncFeature=void 0;const i=n(1398),r=n(6045),o=n(7354),s=n(9032),a=n(8319);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var u,l,d,h,g;!function(e){let t;!function(t){function n(e,t){return e.map((e=>s(e,t)))}function r(e){return c(new Set,e)}function s(e,t){const n=o.NotebookCell.create(function(e){switch(e){case i.NotebookCellKind.Markup:return o.NotebookCellKind.Markup;case i.NotebookCellKind.Code:return o.NotebookCellKind.Code}}(e.kind),t.asUri(e.document.uri));return Object.keys(e.metadata).length>0&&(n.metadata=r(e.metadata)),void 0!==e.executionSummary&&a.number(e.executionSummary.executionOrder)&&a.boolean(e.executionSummary.success)&&(n.executionSummary={executionOrder:e.executionSummary.executionOrder,success:e.executionSummary.success}),n}function c(e,t){if(e.has(t))throw new Error("Can't deep copy cyclic structures.");if(Array.isArray(t)){const n=[];for(const i of t)if(null!==i&&"object"==typeof i||Array.isArray(i))n.push(c(e,i));else{if(i instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");n.push(i)}return n}{const n=Object.keys(t),i=Object.create(null);for(const r of n){const n=t[r];if(null!==n&&"object"==typeof n||Array.isArray(n))i[r]=c(e,n);else{if(n instanceof RegExp)throw new Error("Can't transfer regular expressions to the server");i[r]=n}}return i}}t.asVersionedNotebookDocumentIdentifier=function(e,t){return{version:e.version,uri:t.asUri(e.uri)}},t.asNotebookDocument=function(e,t,i){const s=o.NotebookDocument.create(i.asUri(e.uri),e.notebookType,e.version,n(t,i));return Object.keys(e.metadata).length>0&&(s.metadata=r(e.metadata)),s},t.asNotebookCells=n,t.asMetadata=r,t.asNotebookCell=s,t.asTextContentChange=function(e,t){const n=t.asChangeTextDocumentParams(e,e.document.uri,e.document.version);return{document:n.textDocument,changes:n.contentChanges}},t.asNotebookDocumentChangeEvent=function(t,n){const i=Object.create(null);if(t.metadata&&(i.metadata=e.c2p.asMetadata(t.metadata)),void 0!==t.cells){const r=Object.create(null),o=t.cells;o.structure&&(r.structure={array:{start:o.structure.array.start,deleteCount:o.structure.array.deleteCount,cells:void 0!==o.structure.array.cells?o.structure.array.cells.map((t=>e.c2p.asNotebookCell(t,n))):void 0},didOpen:void 0!==o.structure.didOpen?o.structure.didOpen.map((e=>n.asOpenTextDocumentParams(e.document).textDocument)):void 0,didClose:void 0!==o.structure.didClose?o.structure.didClose.map((e=>n.asCloseTextDocumentParams(e.document).textDocument)):void 0}),void 0!==o.data&&(r.data=o.data.map((t=>e.c2p.asNotebookCell(t,n)))),void 0!==o.textContent&&(r.textContent=o.textContent.map((t=>e.c2p.asTextContentChange(t,n)))),Object.keys(r).length>0&&(i.cells=r)}return i}}(t=e.c2p||(e.c2p={}))}(u||(u={})),function(e){function t(e,t,i=!0){return!(e.kind!==t.kind||e.document.uri.toString()!==t.document.uri.toString()||e.document.languageId!==t.document.languageId||!function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.executionOrder===t.executionOrder&&e.success===t.success&&function(e,t){return e===t||void 0!==e&&void 0!==t&&(e.startTime===t.startTime&&e.endTime===t.endTime)}(e.timing,t.timing))}(e.executionSummary,t.executionSummary))&&(!i||i&&n(e.metadata,t.metadata))}function n(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),o=Array.isArray(t);if(r!==o)return!1;if(r&&o){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1}if(i(e)&&i(t)){const i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;if(i.sort(),r.sort(),!n(i,r))return!1;for(let r=0;r<i.length;r++){const o=i[r];if(!n(e[o],t[o]))return!1}return!0}return!1}function i(e){return null!==e&&"object"==typeof e}e.computeDiff=function(e,n,i){const r=e.length,o=n.length;let s=0;for(;s<o&&s<r&&t(e[s],n[s],i);)s++;if(s<o&&s<r){let a=r-1,c=o-1;for(;a>=0&&c>=0&&t(e[a],n[c],i);)a--,c--;const u=a+1-s,l=s===c+1?void 0:n.slice(s,c+1);return void 0!==l?{start:s,deleteCount:u,cells:l}:{start:s,deleteCount:u}}return s<o?{start:s,deleteCount:0,cells:n.slice(s)}:s<r?{start:s,deleteCount:r-s}:void 0},e.isObjectLiteral=i}(l||(l={})),function(e){e.matchNotebook=function(e,t){if("string"==typeof e)return"*"===e||t.notebookType===e;if(void 0!==e.notebookType&&"*"!==e.notebookType&&t.notebookType!==e.notebookType)return!1;const n=t.uri;if(void 0!==e.scheme&&"*"!==e.scheme&&n.scheme!==e.scheme)return!1;if(void 0!==e.pattern){const t=new r.Minimatch(e.pattern,{noext:!0});if(!t.makeRe())return!1;if(!t.match(n.fsPath))return!1}return!0}}(d||(d={})),function(e){function t(e,t,n,i){return void 0===t&&void 0===n?{notebook:e,language:i}:{notebook:{notebookType:e,scheme:t,pattern:n},language:i}}e.asDocumentSelector=function(e){const n=e.notebookSelector,i=[];for(const e of n){const n=("string"==typeof e.notebook?e.notebook:e.notebook?.notebookType)??"*",r="string"==typeof e.notebook?void 0:e.notebook?.scheme,o="string"==typeof e.notebook?void 0:e.notebook?.pattern;if(void 0!==e.cells)for(const s of e.cells)i.push(t(n,r,o,s.language));else i.push(t(n,r,o,void 0))}return i}}(h||(h={})),function(e){e.create=function(e){return{cells:e,uris:new Set(e.map((e=>e.document.uri.toString())))}}}(g||(g={}));class p{constructor(e,t){this.client=e,this.options=t,this.notebookSyncInfo=new Map,this.notebookDidOpen=new Set,this.disposables=[],this.selector=e.protocol2CodeConverter.asDocumentSelector(h.asDocumentSelector(t)),i.workspace.onDidOpenNotebookDocument((e=>{this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e)}),void 0,this.disposables);for(const e of i.workspace.notebookDocuments)this.notebookDidOpen.add(e.uri.toString()),this.didOpen(e);i.workspace.onDidChangeNotebookDocument((e=>this.didChangeNotebookDocument(e)),void 0,this.disposables),!0===this.options.save&&i.workspace.onDidSaveNotebookDocument((e=>this.didSave(e)),void 0,this.disposables),i.workspace.onDidCloseNotebookDocument((e=>{this.didClose(e),this.notebookDidOpen.delete(e.uri.toString())}),void 0,this.disposables)}getState(){for(const e of i.workspace.notebookDocuments)if(void 0!==this.getMatchingCells(e))return{kind:"document",id:"$internal",registrations:!0,matches:!0};return{kind:"document",id:"$internal",registrations:!0,matches:!1}}get mode(){return"notebook"}handles(e){return i.languages.match(this.selector,e)>0}didOpenNotebookCellTextDocument(e,t){if(0===i.languages.match(this.selector,t.document))return;if(!this.notebookDidOpen.has(e.uri.toString()))return;const n=this.notebookSyncInfo.get(e.uri.toString()),r=this.cellMatches(e,t);if(void 0!==n){const i=n.uris.has(t.document.uri.toString());if(r&&i||!r&&!i)return;if(r){const t=this.getMatchingCells(e);if(void 0!==t){const i=this.asNotebookDocumentChangeEvent(e,void 0,n,t);void 0!==i&&this.doSendChange(i,t).catch((()=>{}))}}}else r&&this.doSendOpen(e,[t]).catch((()=>{}))}didChangeNotebookCellTextDocument(e,t){0!==i.languages.match(this.selector,t.document)&&this.doSendChange({notebook:e,cells:{textContent:[t]}},void 0).catch((()=>{}))}didCloseNotebookCellTextDocument(e,t){const n=this.notebookSyncInfo.get(e.uri.toString());if(void 0===n)return;const i=t.document.uri,r=n.cells.findIndex((e=>e.document.uri.toString()===i.toString()));if(-1!==r)if(0===r&&1===n.cells.length)this.doSendClose(e,n.cells).catch((()=>{}));else{const t=n.cells.slice(),i=t.splice(r,1);this.doSendChange({notebook:e,cells:{structure:{array:{start:r,deleteCount:1},didClose:i}}},t).catch((()=>{}))}}dispose(){for(const e of this.disposables)e.dispose()}didOpen(e,t=this.getMatchingCells(e),n=this.notebookSyncInfo.get(e.uri.toString())){if(void 0!==n)if(void 0!==t){const i=this.asNotebookDocumentChangeEvent(e,void 0,n,t);void 0!==i&&this.doSendChange(i,t).catch((()=>{}))}else this.doSendClose(e,[]).catch((()=>{}));else{if(void 0===t)return;this.doSendOpen(e,t).catch((()=>{}))}}didChangeNotebookDocument(e){const t=e.notebook,n=this.notebookSyncInfo.get(t.uri.toString());if(void 0===n){if(0===e.contentChanges.length)return;const i=this.getMatchingCells(t);if(void 0===i)return;this.didOpen(t,i,n)}else{const i=this.getMatchingCells(t);if(void 0===i)return void this.didClose(t,n);const r=this.asNotebookDocumentChangeEvent(e.notebook,e,n,i);void 0!==r&&this.doSendChange(r,i).catch((()=>{}))}}didSave(e){void 0!==this.notebookSyncInfo.get(e.uri.toString())&&this.doSendSave(e).catch((()=>{}))}didClose(e,t=this.notebookSyncInfo.get(e.uri.toString())){if(void 0===t)return;const n=e.getCells().filter((e=>t.uris.has(e.document.uri.toString())));this.doSendClose(e,n).catch((()=>{}))}async sendDidOpenNotebookDocument(e){const t=this.getMatchingCells(e);if(void 0!==t)return this.doSendOpen(e,t)}async doSendOpen(e,t){const n=async(e,t)=>{const n=u.c2p.asNotebookDocument(e,t,this.client.code2ProtocolConverter),i=t.map((e=>this.client.code2ProtocolConverter.asTextDocumentItem(e.document)));try{await this.client.sendNotification(o.DidOpenNotebookDocumentNotification.type,{notebookDocument:n,cellTextDocuments:i})}catch(e){throw this.client.error("Sending DidOpenNotebookDocumentNotification failed",e),e}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.set(e.uri.toString(),g.create(t)),void 0!==i?.didOpen?i.didOpen(e,t,n):n(e,t)}async sendDidChangeNotebookDocument(e){return this.doSendChange(e,void 0)}async doSendChange(e,t=this.getMatchingCells(e.notebook)){const n=async e=>{try{await this.client.sendNotification(o.DidChangeNotebookDocumentNotification.type,{notebookDocument:u.c2p.asVersionedNotebookDocumentIdentifier(e.notebook,this.client.code2ProtocolConverter),change:u.c2p.asNotebookDocumentChangeEvent(e,this.client.code2ProtocolConverter)})}catch(e){throw this.client.error("Sending DidChangeNotebookDocumentNotification failed",e),e}},i=this.client.middleware?.notebooks;return void 0!==e.cells?.structure&&this.notebookSyncInfo.set(e.notebook.uri.toString(),g.create(t??[])),void 0!==i?.didChange?i?.didChange(e,n):n(e)}async sendDidSaveNotebookDocument(e){return this.doSendSave(e)}async doSendSave(e){const t=async e=>{try{await this.client.sendNotification(o.DidSaveNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)}})}catch(e){throw this.client.error("Sending DidSaveNotebookDocumentNotification failed",e),e}},n=this.client.middleware?.notebooks;return void 0!==n?.didSave?n.didSave(e,t):t(e)}async sendDidCloseNotebookDocument(e){return this.doSendClose(e,this.getMatchingCells(e)??[])}async doSendClose(e,t){const n=async(e,t)=>{try{await this.client.sendNotification(o.DidCloseNotebookDocumentNotification.type,{notebookDocument:{uri:this.client.code2ProtocolConverter.asUri(e.uri)},cellTextDocuments:t.map((e=>this.client.code2ProtocolConverter.asTextDocumentIdentifier(e.document)))})}catch(e){throw this.client.error("Sending DidCloseNotebookDocumentNotification failed",e),e}},i=this.client.middleware?.notebooks;return this.notebookSyncInfo.delete(e.uri.toString()),void 0!==i?.didClose?i.didClose(e,t,n):n(e,t)}asNotebookDocumentChangeEvent(e,t,n,i){if(void 0!==t&&t.notebook!==e)throw new Error("Notebook must be identical");const r={notebook:e};let o;if(void 0!==t?.metadata&&(r.metadata=u.c2p.asMetadata(t.metadata)),void 0!==t?.cellChanges&&t.cellChanges.length>0){const e=[];o=new Set(i.map((e=>e.document.uri.toString())));for(const n of t.cellChanges)!o.has(n.cell.document.uri.toString())||void 0===n.executionSummary&&void 0===n.metadata||e.push(n.cell);e.length>0&&(r.cells=r.cells??{},r.cells.data=e)}if((void 0!==t?.contentChanges&&t.contentChanges.length>0||void 0===t)&&void 0!==n&&void 0!==i){const e=n.cells,t=i,o=l.computeDiff(e,t,!1);let s,a;if(void 0!==o){s=void 0===o.cells?new Map:new Map(o.cells.map((e=>[e.document.uri.toString(),e]))),a=0===o.deleteCount?new Map:new Map(e.slice(o.start,o.start+o.deleteCount).map((e=>[e.document.uri.toString(),e])));for(const e of Array.from(a.keys()))s.has(e)&&(a.delete(e),s.delete(e));r.cells=r.cells??{};const t=[],n=[];if(s.size>0||a.size>0){for(const e of s.values())t.push(e);for(const e of a.values())n.push(e)}r.cells.structure={array:o,didOpen:t,didClose:n}}}return Object.keys(r).length>1?r:void 0}getMatchingCells(e,t=e.getCells()){if(void 0!==this.options.notebookSelector)for(const n of this.options.notebookSelector)if(void 0===n.notebook||d.matchNotebook(n.notebook,e)){const i=this.filterCells(e,t,n.cells);return 0===i.length?void 0:i}}cellMatches(e,t){const n=this.getMatchingCells(e,[t]);return void 0!==n&&n[0]===t}filterCells(e,t,n){const i=void 0!==n?t.filter((e=>{const t=e.document.languageId;return n.some((e=>"*"===e.language||t===e.language))})):t;return"function"==typeof this.client.clientOptions.notebookDocumentOptions?.filterCells?this.client.clientOptions.notebookDocumentOptions.filterCells(e,i):i}}class f{constructor(e){this.client=e,this.registrations=new Map,this.registrationType=o.NotebookDocumentSyncRegistrationType.type,i.workspace.onDidOpenTextDocument((e=>{if(e.uri.scheme!==f.CellScheme)return;const[t,n]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==n)for(const e of this.registrations.values())e instanceof p&&e.didOpenNotebookCellTextDocument(t,n)})),i.workspace.onDidChangeTextDocument((e=>{if(0===e.contentChanges.length)return;const t=e.document;if(t.uri.scheme!==f.CellScheme)return;const[n]=this.findNotebookDocumentAndCell(t);if(void 0!==n)for(const t of this.registrations.values())t instanceof p&&t.didChangeNotebookCellTextDocument(n,e)})),i.workspace.onDidCloseTextDocument((e=>{if(e.uri.scheme!==f.CellScheme)return;const[t,n]=this.findNotebookDocumentAndCell(e);if(void 0!==t&&void 0!==n)for(const e of this.registrations.values())e instanceof p&&e.didCloseNotebookCellTextDocument(t,n)}))}getState(){if(0===this.registrations.size)return{kind:"document",id:this.registrationType.method,registrations:!1,matches:!1};for(const e of this.registrations.values()){const t=e.getState();if("document"===t.kind&&!0===t.registrations&&!0===t.matches)return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!0}}return{kind:"document",id:this.registrationType.method,registrations:!0,matches:!1}}fillClientCapabilities(e){const t=c(c(e,"notebookDocument"),"synchronization");t.dynamicRegistration=!0,t.executionSummarySupport=!0}preInitialize(e){const t=e.notebookDocumentSync;void 0!==t&&(this.dedicatedChannel=this.client.protocol2CodeConverter.asDocumentSelector(h.asDocumentSelector(t)))}initialize(e){const t=e.notebookDocumentSync;if(void 0===t)return;const n=t.id??s.generateUuid();this.register({id:n,registerOptions:t})}register(e){const t=new p(this.client,e.registerOptions);this.registrations.set(e.id,t)}unregister(e){const t=this.registrations.get(e);t&&t.dispose()}clear(){for(const e of this.registrations.values())e.dispose();this.registrations.clear()}handles(e){if(e.uri.scheme!==f.CellScheme)return!1;if(void 0!==this.dedicatedChannel&&i.languages.match(this.dedicatedChannel,e)>0)return!0;for(const t of this.registrations.values())if(t.handles(e))return!0;return!1}getProvider(e){for(const t of this.registrations.values())if(t.handles(e.document))return t}findNotebookDocumentAndCell(e){const t=e.uri.toString();for(const e of i.workspace.notebookDocuments)for(const n of e.getCells())if(n.document.uri.toString()===t)return[e,n];return[void 0,void 0]}}t.NotebookDocumentSyncFeature=f,f.CellScheme="vscode-notebook-cell"},9870:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressFeature=void 0;const i=n(7354),r=n(9403);t.ProgressFeature=class{constructor(e){this._client=e,this.activeParts=new Set}getState(){return{kind:"window",id:i.WorkDoneProgressCreateRequest.method,registrations:this.activeParts.size>0}}fillClientCapabilities(e){var t,n;(t=e,n="window",void 0===t[n]&&(t[n]=Object.create(null)),t[n]).workDoneProgress=!0}initialize(){const e=this._client,t=e=>{this.activeParts.delete(e)};e.onRequest(i.WorkDoneProgressCreateRequest.type,(e=>{this.activeParts.add(new r.ProgressPart(this._client,e.token,t))}))}clear(){for(const e of this.activeParts)e.done();this.activeParts.clear()}}},9403:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressPart=void 0;const i=n(1398),r=n(7354),o=n(8319);t.ProgressPart=class{constructor(e,t,n){this._client=e,this._token=t,this._reported=0,this._infinite=!1,this._lspProgressDisposable=this._client.onProgress(r.WorkDoneProgress.type,this._token,(e=>{switch(e.kind){case"begin":this.begin(e);break;case"report":this.report(e);break;case"end":this.done(),n&&n(this)}}))}begin(e){this._infinite=void 0===e.percentage,void 0!==this._lspProgressDisposable&&i.window.withProgress({location:i.ProgressLocation.Window,cancellable:e.cancellable,title:e.title},(async(t,n)=>{if(void 0!==this._lspProgressDisposable)return this._progress=t,this._cancellationToken=n,this._tokenDisposable=this._cancellationToken.onCancellationRequested((()=>{this._client.sendNotification(r.WorkDoneProgressCancelNotification.type,{token:this._token})})),this.report(e),new Promise(((e,t)=>{this._resolve=e,this._reject=t}))}))}report(e){if(this._infinite&&o.string(e.message))void 0!==this._progress&&this._progress.report({message:e.message});else if(o.number(e.percentage)){const t=Math.max(0,Math.min(e.percentage,100)),n=Math.max(0,t-this._reported);this._reported+=n,void 0!==this._progress&&this._progress.report({message:e.message,increment:n})}}cancel(){this.cleanup(),void 0!==this._reject&&(this._reject(),this._resolve=void 0,this._reject=void 0)}done(){this.cleanup(),void 0!==this._resolve&&(this._resolve(),this._resolve=void 0,this._reject=void 0)}cleanup(){void 0!==this._lspProgressDisposable&&(this._lspProgressDisposable.dispose(),this._lspProgressDisposable=void 0),void 0!==this._tokenDisposable&&(this._tokenDisposable.dispose(),this._tokenDisposable=void 0),this._progress=void 0,this._cancellationToken=void 0}}},8717:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1398);class r extends i.CallHierarchyItem{constructor(e,t,n,i,r,o,s){super(e,t,n,i,r,o),void 0!==s&&(this.data=s)}}t.default=r},9206:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1398);class r extends i.CodeAction{constructor(e,t){super(e),this.data=t}}t.default=r},5588:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1398);class r extends i.CodeLens{constructor(e){super(e)}}t.default=r},7652:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1398);class r extends i.CompletionItem{constructor(e){super(e)}}t.default=r},7605:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConverter=void 0;const i=n(1398),r=n(7354),o=n(8319),s=n(483),a=n(7652),c=n(5588),u=n(7424),l=n(9206),d=n(7894),h=n(8717),g=n(7321),p=n(6144),f=n(7511),m=n(7354);var v;!function(e){e.is=function(e){let t=e;return t&&o.string(t.language)&&o.string(t.value)}}(v||(v={})),t.createConverter=function(e,t,n){const y=e||(e=>i.Uri.parse(e));function b(e){return y(e)}function C(e){let t=new d.ProtocolDiagnostic(D(e.range),e.message,w(e.severity),e.data);if(void 0!==e.code)if("string"==typeof e.code||"number"==typeof e.code)r.CodeDescription.is(e.codeDescription)?t.code={value:e.code,target:b(e.codeDescription.href)}:t.code=e.code;else if(d.DiagnosticCode.is(e.code)){t.hasDiagnosticCode=!0;const n=e.code;t.code={value:n.value,target:b(n.target)}}return e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++){const r=e[n];t[n]=new i.DiagnosticRelatedInformation(q(r.location),r.message)}return t}(e.relatedInformation)),Array.isArray(e.tags)&&(t.tags=function(e){if(!e)return;let t=[];for(let n of e){let e=R(n);void 0!==e&&t.push(e)}return t.length>0?t:void 0}(e.tags)),t}function R(e){switch(e){case r.DiagnosticTag.Unnecessary:return i.DiagnosticTag.Unnecessary;case r.DiagnosticTag.Deprecated:return i.DiagnosticTag.Deprecated;default:return}}function _(e){return e?new i.Position(e.line,e.character):void 0}function D(e){return e?new i.Range(e.start.line,e.start.character,e.end.line,e.end.character):void 0}async function S(e,t){return s.map(e,(e=>new i.Range(e.start.line,e.start.character,e.end.line,e.end.character)),t)}function w(e){if(null==e)return i.DiagnosticSeverity.Error;switch(e){case r.DiagnosticSeverity.Error:return i.DiagnosticSeverity.Error;case r.DiagnosticSeverity.Warning:return i.DiagnosticSeverity.Warning;case r.DiagnosticSeverity.Information:return i.DiagnosticSeverity.Information;case r.DiagnosticSeverity.Hint:return i.DiagnosticSeverity.Hint}return i.DiagnosticSeverity.Error}function T(e){if(o.string(e))return e;switch(e.kind){case r.MarkupKind.Markdown:return k(e.value);case r.MarkupKind.PlainText:return e.value;default:return`Unsupported Markup content received. Kind is: ${e.kind}`}}function k(e){let o;if(void 0===e||"string"==typeof e)o=new i.MarkdownString(e);else switch(e.kind){case r.MarkupKind.Markdown:o=new i.MarkdownString(e.value);break;case r.MarkupKind.PlainText:o=new i.MarkdownString,o.appendText(e.value);break;default:o=new i.MarkdownString,o.appendText(`Unsupported Markup content received. Kind is: ${e.kind}`)}return o.isTrusted=t,o.supportHtml=n,o}function P(e){if(e===r.CompletionItemTag.Deprecated)return i.CompletionItemTag.Deprecated}function x(e,t,n,s,c,u){const l=function(e){if(null==e)return[];const t=[];for(const n of e){const e=P(n);void 0!==e&&t.push(e)}return t}(e.tags),d=function(e){return r.CompletionItemLabelDetails.is(e.labelDetails)?{label:e.label,detail:e.labelDetails.detail,description:e.labelDetails.description}:e.label}(e),h=new a.default(d);e.detail&&(h.detail=e.detail),e.documentation&&(h.documentation=T(e.documentation),h.documentationFormat=o.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(h.filterText=e.filterText);const g=function(e,t,n){const o=e.insertTextFormat??n;if(void 0!==e.textEdit||void 0!==t){const[n,a]=void 0!==e.textEdit?(s=e.textEdit,r.InsertReplaceEdit.is(s)?[{inserting:D(s.insert),replacing:D(s.replace)},s.newText]:[D(s.range),s.newText]):[t,e.textEditText??e.label];return o===r.InsertTextFormat.Snippet?{text:new i.SnippetString(a),range:n,fromEdit:!0}:{text:a,range:n,fromEdit:!0}}return e.insertText?o===r.InsertTextFormat.Snippet?{text:new i.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0;var s}(e,n,c);if(g&&(h.insertText=g.text,h.range=g.range,h.fromEdit=g.fromEdit),o.number(e.kind)){let[t,n]=(p=e.kind,r.CompletionItemKind.Text<=p&&p<=r.CompletionItemKind.TypeParameter?[p-1,void 0]:[i.CompletionItemKind.Text,p]);h.kind=t,n&&(h.originalItemKind=n)}var p;e.sortText&&(h.sortText=e.sortText),e.additionalTextEdits&&(h.additionalTextEdits=I(e.additionalTextEdits));const f=void 0!==e.commitCharacters?o.stringArray(e.commitCharacters)?e.commitCharacters:void 0:t;f&&(h.commitCharacters=f.slice()),e.command&&(h.command=G(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(h.deprecated=e.deprecated,!0===e.deprecated&&l.push(i.CompletionItemTag.Deprecated)),!0!==e.preselect&&!1!==e.preselect||(h.preselect=e.preselect);const m=e.data??u;void 0!==m&&(h.data=m),l.length>0&&(h.tags=l);const v=e.insertTextMode??s;return void 0!==v&&(h.insertTextMode=v,v===r.InsertTextMode.asIs&&(h.keepWhitespace=!0)),h}function E(e){if(e)return new i.TextEdit(D(e.range),e.newText)}async function O(e,t){if(e)return s.map(e,E,t)}function I(e){if(!e)return;const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=E(e[n]);return t}async function A(e,t){return s.mapAsync(e,F,t)}async function F(e,t){let n=new i.SignatureInformation(e.label);return void 0!==e.documentation&&(n.documentation=T(e.documentation)),void 0!==e.parameters&&(n.parameters=await N(e.parameters,t)),void 0!==e.activeParameter&&(n.activeParameter=e.activeParameter),n}function N(e,t){return s.map(e,M,t)}function M(e){let t=new i.ParameterInformation(e.label);return e.documentation&&(t.documentation=T(e.documentation)),t}function q(e){return e?new i.Location(y(e.uri),D(e.range)):void 0}function L(e){if(!e)return;let t={targetUri:y(e.targetUri),targetRange:D(e.targetRange),originSelectionRange:D(e.originSelectionRange),targetSelectionRange:D(e.targetSelectionRange)};if(!t.targetSelectionRange)throw new Error("targetSelectionRange must not be undefined or null");return t}async function j(e,t){if(e){if(o.array(e)){if(0===e.length)return[];if(r.LocationLink.is(e[0])){const n=e;return s.map(n,L,t)}{const n=e;return s.map(n,q,t)}}return r.LocationLink.is(e)?[L(e)]:q(e)}}function $(e){let t=new i.DocumentHighlight(D(e.range));return o.number(e.kind)&&(t.kind=H(e.kind)),t}function H(e){switch(e){case r.DocumentHighlightKind.Text:return i.DocumentHighlightKind.Text;case r.DocumentHighlightKind.Read:return i.DocumentHighlightKind.Read;case r.DocumentHighlightKind.Write:return i.DocumentHighlightKind.Write}return i.DocumentHighlightKind.Text}function K(e){return e<=r.SymbolKind.TypeParameter?e-1:i.SymbolKind.Property}function W(e){if(e===r.SymbolTag.Deprecated)return i.SymbolTag.Deprecated}function U(e){if(null==e)return;const t=[];for(const n of e){const e=W(n);void 0!==e&&t.push(e)}return 0===t.length?void 0:t}function V(e){const t=e.data,n=e.location,r=void 0===n.range||void 0!==t?new p.default(e.name,K(e.kind),e.containerName??"",void 0===n.range?y(n.uri):new i.Location(y(e.location.uri),D(n.range)),t):new i.SymbolInformation(e.name,K(e.kind),e.containerName??"",new i.Location(y(e.location.uri),D(n.range)));return B(r,e),r}function z(e){let t=new i.DocumentSymbol(e.name,e.detail||"",K(e.kind),D(e.range),D(e.selectionRange));if(B(t,e),void 0!==e.children&&e.children.length>0){let n=[];for(let t of e.children)n.push(z(t));t.children=n}return t}function B(e,t){e.tags=U(t.tags),t.deprecated&&(e.tags?e.tags.includes(i.SymbolTag.Deprecated)||(e.tags=e.tags.concat(i.SymbolTag.Deprecated)):e.tags=[i.SymbolTag.Deprecated])}function G(e){let t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}const X=new Map;function J(e){if(null==e)return;let t=X.get(e);if(t)return t;let n=e.split(".");t=i.CodeActionKind.Empty;for(let e of n)t=t.append(e);return t}async function Y(e,t){if(null==e)return;let n=new l.default(e.title,e.data);return void 0!==e.kind&&(n.kind=J(e.kind)),void 0!==e.diagnostics&&(n.diagnostics=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=C(e[n]);return t}(e.diagnostics)),void 0!==e.edit&&(n.edit=await Z(e.edit,t)),void 0!==e.command&&(n.command=G(e.command)),void 0!==e.isPreferred&&(n.isPreferred=e.isPreferred),void 0!==e.disabled&&(n.disabled={reason:e.disabled.reason}),n}function Q(e){if(!e)return;let t=new c.default(D(e.range));return e.command&&(t.command=G(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}async function Z(e,t){if(!e)return;const n=new Map;if(void 0!==e.changeAnnotations){const i=e.changeAnnotations;await s.forEach(Object.keys(i),(e=>{const t=function(e){if(void 0!==e)return{label:e.label,needsConfirmation:!!e.needsConfirmation,description:e.description}}(i[e]);n.set(e,t)}),t)}const o=e=>void 0===e?void 0:n.get(e),a=new i.WorkspaceEdit;if(e.documentChanges){const n=e.documentChanges;await s.forEach(n,(e=>{if(r.CreateFile.is(e))a.createFile(y(e.uri),e.options,o(e.annotationId));else if(r.RenameFile.is(e))a.renameFile(y(e.oldUri),y(e.newUri),e.options,o(e.annotationId));else if(r.DeleteFile.is(e))a.deleteFile(y(e.uri),e.options,o(e.annotationId));else{if(!r.TextDocumentEdit.is(e))throw new Error(`Unknown workspace edit change received:\n${JSON.stringify(e,void 0,4)}`);{const t=y(e.textDocument.uri);for(const n of e.edits)r.AnnotatedTextEdit.is(n)?a.replace(t,D(n.range),n.newText,o(n.annotationId)):a.replace(t,D(n.range),n.newText)}}}),t)}else if(e.changes){const n=e.changes;await s.forEach(Object.keys(n),(e=>{a.set(y(e),I(n[e]))}),t)}return a}function ee(e){let t=D(e.range),n=e.target?b(e.target):void 0,i=new u.default(t,n);return void 0!==e.tooltip&&(i.tooltip=e.tooltip),void 0!==e.data&&null!==e.data&&(i.data=e.data),i}function te(e){return new i.Color(e.red,e.green,e.blue,e.alpha)}function ne(e){return new i.ColorInformation(D(e.range),te(e.color))}function ie(e){let t=new i.ColorPresentation(e.label);return t.additionalTextEdits=I(e.additionalTextEdits),e.textEdit&&(t.textEdit=E(e.textEdit)),t}function re(e){if(e)switch(e){case r.FoldingRangeKind.Comment:return i.FoldingRangeKind.Comment;case r.FoldingRangeKind.Imports:return i.FoldingRangeKind.Imports;case r.FoldingRangeKind.Region:return i.FoldingRangeKind.Region}}function oe(e){return new i.FoldingRange(e.startLine,e.endLine,re(e.kind))}function se(e){return new i.SelectionRange(D(e.range),e.parent?se(e.parent):void 0)}function ae(e){return r.InlineValueText.is(e)?new i.InlineValueText(D(e.range),e.text):r.InlineValueVariableLookup.is(e)?new i.InlineValueVariableLookup(D(e.range),e.variableName,e.caseSensitiveLookup):new i.InlineValueEvaluatableExpression(D(e.range),e.expression)}async function ce(e,t){const n="string"==typeof e.label?e.label:await s.map(e.label,ue,t),i=new f.default(_(e.position),n);return void 0!==e.kind&&(i.kind=e.kind),void 0!==e.textEdits&&(i.textEdits=await O(e.textEdits,t)),void 0!==e.tooltip&&(i.tooltip=le(e.tooltip)),void 0!==e.paddingLeft&&(i.paddingLeft=e.paddingLeft),void 0!==e.paddingRight&&(i.paddingRight=e.paddingRight),void 0!==e.data&&(i.data=e.data),i}function ue(e){const t=new i.InlayHintLabelPart(e.value);return void 0!==e.location&&(t.location=q(e.location)),void 0!==e.tooltip&&(t.tooltip=le(e.tooltip)),void 0!==e.command&&(t.command=G(e.command)),t}function le(e){return"string"==typeof e?e:k(e)}function de(e){if(null===e)return;const t=new h.default(K(e.kind),e.name,e.detail||"",b(e.uri),D(e.range),D(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=U(e.tags)),t}async function he(e,t){return new i.CallHierarchyIncomingCall(de(e.from),await S(e.fromRanges,t))}async function ge(e,t){return new i.CallHierarchyOutgoingCall(de(e.to),await S(e.fromRanges,t))}function pe(e){return new i.SemanticTokensEdit(e.start,e.deleteCount,void 0!==e.data?new Uint32Array(e.data):void 0)}function fe(e){if(null===e)return;let t=new g.default(K(e.kind),e.name,e.detail||"",b(e.uri),D(e.range),D(e.selectionRange),e.data);return void 0!==e.tags&&(t.tags=U(e.tags)),t}function me(e){let t,n;t="string"==typeof e.insertText?e.insertText:new i.SnippetString(e.insertText.value),e.command&&(n=G(e.command));const r=new i.InlineCompletionItem(t,D(e.range),n);return e.filterText&&(r.filterText=e.filterText),r}return X.set(r.CodeActionKind.Empty,i.CodeActionKind.Empty),X.set(r.CodeActionKind.QuickFix,i.CodeActionKind.QuickFix),X.set(r.CodeActionKind.Refactor,i.CodeActionKind.Refactor),X.set(r.CodeActionKind.RefactorExtract,i.CodeActionKind.RefactorExtract),X.set(r.CodeActionKind.RefactorInline,i.CodeActionKind.RefactorInline),X.set(r.CodeActionKind.RefactorRewrite,i.CodeActionKind.RefactorRewrite),X.set(r.CodeActionKind.Source,i.CodeActionKind.Source),X.set(r.CodeActionKind.SourceOrganizeImports,i.CodeActionKind.SourceOrganizeImports),{asUri:b,asDocumentSelector:function(e){const t=[];for(const n of e)if("string"==typeof n)t.push(n);else if(m.NotebookCellTextDocumentFilter.is(n))if("string"==typeof n.notebook)t.push({notebookType:n.notebook,language:n.language});else{const e=n.notebook.notebookType??"*";t.push({notebookType:e,scheme:n.notebook.scheme,pattern:n.notebook.pattern,language:n.language})}else m.TextDocumentFilter.is(n)&&t.push({language:n.language,scheme:n.scheme,pattern:n.pattern});return t},asDiagnostics:async function(e,t){return s.map(e,C,t)},asDiagnostic:C,asRange:D,asRanges:S,asPosition:_,asDiagnosticSeverity:w,asDiagnosticTag:R,asHover:function(e){if(e)return new i.Hover(function(e){if(o.string(e))return k(e);if(v.is(e))return k().appendCodeblock(e.value,e.language);if(Array.isArray(e)){let t=[];for(let n of e){let e=k();v.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}return k(e)}(e.contents),D(e.range))},asCompletionResult:async function(e,t,n){if(!e)return;if(Array.isArray(e))return s.map(e,(e=>x(e,t)),n);const o=e,{defaultRange:a,commitCharacters:c}=function(e,t){const n=e.itemDefaults?.editRange,i=e.itemDefaults?.commitCharacters??t;return r.Range.is(n)?{defaultRange:D(n),commitCharacters:i}:void 0!==n?{defaultRange:{inserting:D(n.insert),replacing:D(n.replace)},commitCharacters:i}:{defaultRange:void 0,commitCharacters:i}}(o,t),u=await s.map(o.items,(e=>x(e,c,a,o.itemDefaults?.insertTextMode,o.itemDefaults?.insertTextFormat,o.itemDefaults?.data)),n);return new i.CompletionList(u,o.isIncomplete)},asCompletionItem:x,asTextEdit:E,asTextEdits:O,asSignatureHelp:async function(e,t){if(!e)return;let n=new i.SignatureHelp;return o.number(e.activeSignature)?n.activeSignature=e.activeSignature:n.activeSignature=0,o.number(e.activeParameter)?n.activeParameter=e.activeParameter:n.activeParameter=0,e.signatures&&(n.signatures=await A(e.signatures,t)),n},asSignatureInformations:A,asSignatureInformation:F,asParameterInformations:N,asParameterInformation:M,asDeclarationResult:async function(e,t){if(e)return j(e,t)},asDefinitionResult:async function(e,t){if(e)return j(e,t)},asLocation:q,asReferences:async function(e,t){if(e)return s.map(e,q,t)},asDocumentHighlights:async function(e,t){if(e)return s.map(e,$,t)},asDocumentHighlight:$,asDocumentHighlightKind:H,asSymbolKind:K,asSymbolTag:W,asSymbolTags:U,asSymbolInformations:async function(e,t){if(e)return s.map(e,V,t)},asSymbolInformation:V,asDocumentSymbols:async function(e,t){if(null!=e)return s.map(e,z,t)},asDocumentSymbol:z,asCommand:G,asCommands:async function(e,t){if(e)return s.map(e,G,t)},asCodeAction:Y,asCodeActionKind:J,asCodeActionKinds:function(e){if(null!=e)return e.map((e=>J(e)))},asCodeActionResult:function(e,t){return s.mapAsync(e,(async e=>r.Command.is(e)?G(e):Y(e,t)),t)},asCodeLens:Q,asCodeLenses:async function(e,t){if(e)return s.map(e,Q,t)},asWorkspaceEdit:Z,asDocumentLink:ee,asDocumentLinks:async function(e,t){if(e)return s.map(e,ee,t)},asFoldingRangeKind:re,asFoldingRange:oe,asFoldingRanges:async function(e,t){if(e)return s.map(e,oe,t)},asColor:te,asColorInformation:ne,asColorInformations:async function(e,t){if(e)return s.map(e,ne,t)},asColorPresentation:ie,asColorPresentations:async function(e,t){if(e)return s.map(e,ie,t)},asSelectionRange:se,asSelectionRanges:async function(e,t){return Array.isArray(e)?s.map(e,se,t):[]},asInlineValue:ae,asInlineValues:async function(e,t){return Array.isArray(e)?s.map(e,ae,t):[]},asInlayHint:ce,asInlayHints:async function(e,t){if(Array.isArray(e))return s.mapAsync(e,ce,t)},asSemanticTokensLegend:function(e){return e},asSemanticTokens:async function(e,t){if(null!=e)return new i.SemanticTokens(new Uint32Array(e.data),e.resultId)},asSemanticTokensEdit:pe,asSemanticTokensEdits:async function(e,t){if(null!=e)return new i.SemanticTokensEdits(e.edits.map(pe),e.resultId)},asCallHierarchyItem:de,asCallHierarchyItems:async function(e,t){if(null!==e)return s.map(e,de,t)},asCallHierarchyIncomingCall:he,asCallHierarchyIncomingCalls:async function(e,t){if(null!==e)return s.mapAsync(e,he,t)},asCallHierarchyOutgoingCall:ge,asCallHierarchyOutgoingCalls:async function(e,t){if(null!==e)return s.mapAsync(e,ge,t)},asLinkedEditingRanges:async function(e,t){if(null!=e)return new i.LinkedEditingRanges(await S(e.ranges,t),function(e){if(null!=e)return new RegExp(e)}(e.wordPattern))},asTypeHierarchyItem:fe,asTypeHierarchyItems:async function(e,t){if(null!==e)return s.map(e,fe,t)},asGlobPattern:function(e){if(o.string(e))return e;if(r.RelativePattern.is(e)){if(r.URI.is(e.baseUri))return new i.RelativePattern(b(e.baseUri),e.pattern);if(r.WorkspaceFolder.is(e.baseUri)){const t=i.workspace.getWorkspaceFolder(b(e.baseUri.uri));return void 0!==t?new i.RelativePattern(t,e.pattern):void 0}}},asInlineCompletionResult:async function(e,t){if(!e)return;if(Array.isArray(e))return s.map(e,(e=>me(e)),t);const n=e,r=await s.map(n.items,(e=>me(e)),t);return new i.InlineCompletionList(r)},asInlineCompletionItem:me}}},7894:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolDiagnostic=t.DiagnosticCode=void 0;const i=n(1398),r=n(8319);var o;!function(e){e.is=function(e){const t=e;return null!=t&&(r.number(t.value)||r.string(t.value))&&r.string(t.target)}}(o||(t.DiagnosticCode=o={}));class s extends i.Diagnostic{constructor(e,t,n,i){super(e,t,n),this.data=i,this.hasDiagnosticCode=!1}}t.ProtocolDiagnostic=s},7424:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1398);class r extends i.DocumentLink{constructor(e,t){super(e,t)}}t.default=r},7511:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1398);class r extends i.InlayHint{constructor(e,t,n){super(e,t,n)}}t.default=r},7321:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1398);class r extends i.TypeHierarchyItem{constructor(e,t,n,i,r,o,s){super(e,t,n,i,r,o),void 0!==s&&(this.data=s)}}t.default=r},6144:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(1398);class r extends i.SymbolInformation{constructor(e,t,n,r,o){const s=!(r instanceof i.Uri);super(e,t,n,s?r:new i.Location(r,new i.Range(0,0,0,0))),this.hasRange=s,void 0!==o&&(this.data=o)}}t.default=r},420:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReferencesFeature=void 0;const i=n(1398),r=n(7354),o=n(4294),s=n(9032);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.ReferencesRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.referencesProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t=e.documentSelector,n={provideReferences:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>o.sendRequest(r.ReferencesRequest.type,o.code2ProtocolConverter.asReferenceParams(e,t,n),i).then((e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asReferences(e,i)),(e=>o.handleFailedRequest(r.ReferencesRequest.type,i,e,null))),a=o.middleware;return a.provideReferences?a.provideReferences(e,t,n,i,s):s(e,t,n,i)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerReferenceProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.ReferencesFeature=a},875:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenameFeature=void 0;const i=n(1398),r=n(7354),o=n(9032),s=n(8319),a=n(4294);class c extends a.TextDocumentLanguageFeature{constructor(e){super(e,r.RenameRequest.type)}fillClientCapabilities(e){let t=(0,a.ensure)((0,a.ensure)(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0,t.prepareSupportDefaultBehavior=r.PrepareSupportDefaultBehavior.Identifier,t.honorsChangeAnnotations=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.renameProvider);n&&(s.boolean(e.renameProvider)&&(n.prepareProvider=!1),this.register({id:o.generateUuid(),registerOptions:n}))}registerLanguageProvider(e){const t=e.documentSelector,n={provideRenameEdits:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>{let s={textDocument:o.code2ProtocolConverter.asTextDocumentIdentifier(e),position:o.code2ProtocolConverter.asPosition(t),newName:n};return o.sendRequest(r.RenameRequest.type,s,i).then((e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asWorkspaceEdit(e,i)),(e=>o.handleFailedRequest(r.RenameRequest.type,i,e,null,!1)))},a=o.middleware;return a.provideRenameEdits?a.provideRenameEdits(e,t,n,i,s):s(e,t,n,i)},prepareRename:e.prepareProvider?(e,t,n)=>{const i=this._client,o=(e,t,n)=>{let o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),position:i.code2ProtocolConverter.asPosition(t)};return i.sendRequest(r.PrepareRenameRequest.type,o,n).then((e=>n.isCancellationRequested?null:r.Range.is(e)?i.protocol2CodeConverter.asRange(e):this.isDefaultBehavior(e)?!0===e.defaultBehavior?null:Promise.reject(new Error("The element can't be renamed.")):e&&r.Range.is(e.range)?{range:i.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:Promise.reject(new Error("The element can't be renamed."))),(e=>{throw"string"==typeof e.message?new Error(e.message):new Error("The element can't be renamed.")}))},s=i.middleware;return s.prepareRename?s.prepareRename(e,t,n,o):o(e,t,n)}:void 0};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerRenameProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}isDefaultBehavior(e){const t=e;return t&&s.boolean(t.defaultBehavior)}}t.RenameFeature=c},6258:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeFeature=void 0;const i=n(1398),r=n(7354),o=n(4294);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.SelectionRangeRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"selectionRange").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.selectionRangeProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideSelectionRanges:(e,t,n)=>{const i=this._client,o=async(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),positions:i.code2ProtocolConverter.asPositionsSync(t,n)};return i.sendRequest(r.SelectionRangeRequest.type,o,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asSelectionRanges(e,n)),(e=>i.handleFailedRequest(r.SelectionRangeRequest.type,n,e,null)))},s=i.middleware;return s.provideSelectionRanges?s.provideSelectionRanges(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerSelectionRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.SelectionRangeFeature=s},7691:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensFeature=void 0;const i=n(1398),r=n(7354),o=n(4294),s=n(8319);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.SemanticTokensRegistrationType.type)}fillClientCapabilities(e){const t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"semanticTokens");t.dynamicRegistration=!0,t.tokenTypes=[r.SemanticTokenTypes.namespace,r.SemanticTokenTypes.type,r.SemanticTokenTypes.class,r.SemanticTokenTypes.enum,r.SemanticTokenTypes.interface,r.SemanticTokenTypes.struct,r.SemanticTokenTypes.typeParameter,r.SemanticTokenTypes.parameter,r.SemanticTokenTypes.variable,r.SemanticTokenTypes.property,r.SemanticTokenTypes.enumMember,r.SemanticTokenTypes.event,r.SemanticTokenTypes.function,r.SemanticTokenTypes.method,r.SemanticTokenTypes.macro,r.SemanticTokenTypes.keyword,r.SemanticTokenTypes.modifier,r.SemanticTokenTypes.comment,r.SemanticTokenTypes.string,r.SemanticTokenTypes.number,r.SemanticTokenTypes.regexp,r.SemanticTokenTypes.operator,r.SemanticTokenTypes.decorator],t.tokenModifiers=[r.SemanticTokenModifiers.declaration,r.SemanticTokenModifiers.definition,r.SemanticTokenModifiers.readonly,r.SemanticTokenModifiers.static,r.SemanticTokenModifiers.deprecated,r.SemanticTokenModifiers.abstract,r.SemanticTokenModifiers.async,r.SemanticTokenModifiers.modification,r.SemanticTokenModifiers.documentation,r.SemanticTokenModifiers.defaultLibrary],t.formats=[r.TokenFormat.Relative],t.requests={range:!0,full:{delta:!0}},t.multilineTokenSupport=!1,t.overlappingTokenSupport=!1,t.serverCancelSupport=!0,t.augmentsSyntaxTokens=!0,(0,o.ensure)((0,o.ensure)(e,"workspace"),"semanticTokens").refreshSupport=!0}initialize(e,t){this._client.onRequest(r.SemanticTokensRefreshRequest.type,(async()=>{for(const e of this.getAllProviders())e.onDidChangeSemanticTokensEmitter.fire()}));const[n,i]=this.getRegistration(t,e.semanticTokensProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n=s.boolean(e.full)?e.full:void 0!==e.full,o=void 0!==e.full&&"boolean"!=typeof e.full&&!0===e.full.delta,a=new i.EventEmitter,c=n?{onDidChangeSemanticTokens:a.event,provideDocumentSemanticTokens:(e,t)=>{const n=this._client,i=n.middleware,o=(e,t)=>{const i={textDocument:n.code2ProtocolConverter.asTextDocumentIdentifier(e)};return n.sendRequest(r.SemanticTokensRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSemanticTokens(e,t)),(e=>n.handleFailedRequest(r.SemanticTokensRequest.type,t,e,null)))};return i.provideDocumentSemanticTokens?i.provideDocumentSemanticTokens(e,t,o):o(e,t)},provideDocumentSemanticTokensEdits:o?(e,t,n)=>{const i=this._client,o=i.middleware,s=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),previousResultId:t};return i.sendRequest(r.SemanticTokensDeltaRequest.type,o,n).then((async e=>n.isCancellationRequested?null:r.SemanticTokens.is(e)?await i.protocol2CodeConverter.asSemanticTokens(e,n):await i.protocol2CodeConverter.asSemanticTokensEdits(e,n)),(e=>i.handleFailedRequest(r.SemanticTokensDeltaRequest.type,n,e,null)))};return o.provideDocumentSemanticTokensEdits?o.provideDocumentSemanticTokensEdits(e,t,n,s):s(e,t,n)}:void 0}:void 0,u=!0===e.range?{provideDocumentRangeSemanticTokens:(e,t,n)=>{const i=this._client,o=i.middleware,s=(e,t,n)=>{const o={textDocument:i.code2ProtocolConverter.asTextDocumentIdentifier(e),range:i.code2ProtocolConverter.asRange(t)};return i.sendRequest(r.SemanticTokensRangeRequest.type,o,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asSemanticTokens(e,n)),(e=>i.handleFailedRequest(r.SemanticTokensRangeRequest.type,n,e,null)))};return o.provideDocumentRangeSemanticTokens?o.provideDocumentRangeSemanticTokens(e,t,n,s):s(e,t,n)}}:void 0,l=[],d=this._client,h=d.protocol2CodeConverter.asSemanticTokensLegend(e.legend),g=d.protocol2CodeConverter.asDocumentSelector(t);return void 0!==c&&l.push(i.languages.registerDocumentSemanticTokensProvider(g,c,h)),void 0!==u&&l.push(i.languages.registerDocumentRangeSemanticTokensProvider(g,u,h)),[new i.Disposable((()=>l.forEach((e=>e.dispose())))),{range:u,full:c,onDidChangeSemanticTokensEmitter:a}]}}t.SemanticTokensFeature=a},1400:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureHelpFeature=void 0;const i=n(1398),r=n(7354),o=n(4294),s=n(9032);class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[r.MarkupKind.Markdown,r.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0},t.signatureInformation.activeParameterSupport=!0,t.contextSupport=!0}initialize(e,t){const n=this.getRegistrationOptions(t,e.signatureHelpProvider);n&&this.register({id:s.generateUuid(),registerOptions:n})}registerLanguageProvider(e){const t={provideSignatureHelp:(e,t,n,i)=>{const o=this._client,s=(e,t,n,i)=>o.sendRequest(r.SignatureHelpRequest.type,o.code2ProtocolConverter.asSignatureHelpParams(e,t,n),i).then((e=>i.isCancellationRequested?null:o.protocol2CodeConverter.asSignatureHelp(e,i)),(e=>o.handleFailedRequest(r.SignatureHelpRequest.type,i,e,null))),a=o.middleware;return a.provideSignatureHelp?a.provideSignatureHelp(e,t,i,n,s):s(e,t,i,n)}};return[this.registerProvider(e,t),t]}registerProvider(e,t){const n=this._client.protocol2CodeConverter.asDocumentSelector(e.documentSelector);if(void 0===e.retriggerCharacters){const r=e.triggerCharacters||[];return i.languages.registerSignatureHelpProvider(n,t,...r)}{const r={triggerCharacters:e.triggerCharacters||[],retriggerCharacters:e.retriggerCharacters||[]};return i.languages.registerSignatureHelpProvider(n,t,r)}}}t.SignatureHelpFeature=a},1596:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidSaveTextDocumentFeature=t.WillSaveWaitUntilFeature=t.WillSaveFeature=t.DidChangeTextDocumentFeature=t.DidCloseTextDocumentFeature=t.DidOpenTextDocumentFeature=void 0;const i=n(1398),r=n(7354),o=n(4294),s=n(9032);class a extends o.TextDocumentEventFeature{constructor(e,t){super(e,i.workspace.onDidOpenTextDocument,r.DidOpenTextDocumentNotification.type,(()=>e.middleware.didOpen),(t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t)),(e=>e),o.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t}get openDocuments(){return this._syncedDocuments.values()}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:s.generateUuid(),registerOptions:{documentSelector:t}})}get registrationType(){return r.DidOpenTextDocumentNotification.type}register(e){if(super.register(e),!e.registerOptions.documentSelector)return;const t=this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector);i.workspace.textDocuments.forEach((e=>{const n=e.uri.toString();if(!this._syncedDocuments.has(n)&&i.languages.match(t,e)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e)){const t=this._client.middleware,i=e=>this._client.sendNotification(this._type,this._createParams(e));(t.didOpen?t.didOpen(e,i):i(e)).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)})),this._syncedDocuments.set(n,e)}}))}getTextDocument(e){return e}notificationSent(e,t,n){this._syncedDocuments.set(e.uri.toString(),e),super.notificationSent(e,t,n)}}t.DidOpenTextDocumentFeature=a;class c extends o.TextDocumentEventFeature{constructor(e,t,n){super(e,i.workspace.onDidCloseTextDocument,r.DidCloseTextDocumentNotification.type,(()=>e.middleware.didClose),(t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t)),(e=>e),o.TextDocumentEventFeature.textDocumentFilter),this._syncedDocuments=t,this._pendingTextDocumentChanges=n}get registrationType(){return r.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register({id:s.generateUuid(),registerOptions:{documentSelector:t}})}async callback(e){await super.callback(e),this._pendingTextDocumentChanges.delete(e.uri.toString())}getTextDocument(e){return e}notificationSent(e,t,n){this._syncedDocuments.delete(e.uri.toString()),super.notificationSent(e,t,n)}unregister(e){const t=this._selectors.get(e);super.unregister(e);const n=this._selectors.values();this._syncedDocuments.forEach((e=>{if(i.languages.match(t,e)>0&&!this._selectorFilter(n,e)&&!this._client.hasDedicatedTextSynchronizationFeature(e)){let t=this._client.middleware,n=e=>this._client.sendNotification(this._type,this._createParams(e));this._syncedDocuments.delete(e.uri.toString()),(t.didClose?t.didClose(e,n):n(e)).catch((e=>{this._client.error(`Sending document notification ${this._type.method} failed`,e)}))}}))}}t.DidCloseTextDocumentFeature=c;class u extends o.DynamicDocumentFeature{constructor(e,t){super(e),this._changeData=new Map,this._onNotificationSent=new i.EventEmitter,this._onPendingChangeAdded=new i.EventEmitter,this._pendingTextDocumentChanges=t,this._syncKind=r.TextDocumentSyncKind.None}get onNotificationSent(){return this._onNotificationSent.event}get onPendingChangeAdded(){return this._onPendingChangeAdded.event}get syncKind(){return this._syncKind}get registrationType(){return r.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==r.TextDocumentSyncKind.None&&this.register({id:s.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=i.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(e.id,{syncKind:e.registerOptions.syncKind,documentSelector:this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)}),this.updateSyncKind(e.registerOptions.syncKind))}*getDocumentSelectors(){for(const e of this._changeData.values())yield e.documentSelector}async callback(e){if(0===e.contentChanges.length)return;const t=e.document.uri,n=e.document.version,o=[];for(const s of this._changeData.values())if(i.languages.match(s.documentSelector,e.document)>0&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){const i=this._client.middleware;if(s.syncKind===r.TextDocumentSyncKind.Incremental){const s=async e=>{const i=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e,t,n);await this._client.sendNotification(r.DidChangeTextDocumentNotification.type,i),this.notificationSent(e.document,r.DidChangeTextDocumentNotification.type,i)};o.push(i.didChange?i.didChange(e,(e=>s(e))):s(e))}else if(s.syncKind===r.TextDocumentSyncKind.Full){const t=async e=>{const t=e.document.uri.toString();this._pendingTextDocumentChanges.set(t,e.document),this._onPendingChangeAdded.fire()};o.push(i.didChange?i.didChange(e,(e=>t(e))):t(e))}}return Promise.all(o).then(void 0,(e=>{throw this._client.error(`Sending document notification ${r.DidChangeTextDocumentNotification.type.method} failed`,e),e}))}notificationSent(e,t,n){this._onNotificationSent.fire({textDocument:e,type:t,params:n})}unregister(e){if(this._changeData.delete(e),0===this._changeData.size)this._listener&&(this._listener.dispose(),this._listener=void 0),this._syncKind=r.TextDocumentSyncKind.None;else{this._syncKind=r.TextDocumentSyncKind.None;for(const e of this._changeData.values())if(this.updateSyncKind(e.syncKind),this._syncKind===r.TextDocumentSyncKind.Full)break}}clear(){this._pendingTextDocumentChanges.clear(),this._changeData.clear(),this._syncKind=r.TextDocumentSyncKind.None,this._listener&&(this._listener.dispose(),this._listener=void 0)}getPendingDocumentChanges(e){if(0===this._pendingTextDocumentChanges.size)return[];let t;if(0===e.size)t=Array.from(this._pendingTextDocumentChanges.values()),this._pendingTextDocumentChanges.clear();else{t=[];for(const n of this._pendingTextDocumentChanges)e.has(n[0])||(t.push(n[1]),this._pendingTextDocumentChanges.delete(n[0]))}return t}getProvider(e){for(const t of this._changeData.values())if(i.languages.match(t.documentSelector,e)>0)return{send:e=>this.callback(e)}}updateSyncKind(e){if(this._syncKind!==r.TextDocumentSyncKind.Full)switch(e){case r.TextDocumentSyncKind.Full:this._syncKind=e;break;case r.TextDocumentSyncKind.Incremental:this._syncKind===r.TextDocumentSyncKind.None&&(this._syncKind=r.TextDocumentSyncKind.Incremental)}}}t.DidChangeTextDocumentFeature=u;class l extends o.TextDocumentEventFeature{constructor(e){super(e,i.workspace.onWillSaveTextDocument,r.WillSaveTextDocumentNotification.type,(()=>e.middleware.willSave),(t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t)),(e=>e.document),((e,t)=>o.TextDocumentEventFeature.textDocumentFilter(e,t.document)))}get registrationType(){return r.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"synchronization").willSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register({id:s.generateUuid(),registerOptions:{documentSelector:t}})}getTextDocument(e){return e.document}}t.WillSaveFeature=l;class d extends o.DynamicDocumentFeature{constructor(e){super(e),this._selectors=new Map}getDocumentSelectors(){return this._selectors.values()}get registrationType(){return r.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"synchronization").willSaveWaitUntil=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register({id:s.generateUuid(),registerOptions:{documentSelector:t}})}register(e){e.registerOptions.documentSelector&&(this._listener||(this._listener=i.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(e.id,this._client.protocol2CodeConverter.asDocumentSelector(e.registerOptions.documentSelector)))}callback(e){if(o.TextDocumentEventFeature.textDocumentFilter(this._selectors.values(),e.document)&&!this._client.hasDedicatedTextSynchronizationFeature(e.document)){let t=this._client.middleware,n=e=>this._client.sendRequest(r.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then((async e=>{let t=await this._client.protocol2CodeConverter.asTextEdits(e);return void 0===t?[]:t}));e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,n):n(e))}}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}clear(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}t.WillSaveWaitUntilFeature=d;class h extends o.TextDocumentEventFeature{constructor(e){super(e,i.workspace.onDidSaveTextDocument,r.DidSaveTextDocumentNotification.type,(()=>e.middleware.didSave),(t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText)),(e=>e),o.TextDocumentEventFeature.textDocumentFilter),this._includeText=!1}get registrationType(){return r.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){const n=e.resolvedTextDocumentSync;if(t&&n&&n.save){const e="boolean"==typeof n.save?{includeText:!1}:{includeText:!!n.save.includeText};this.register({id:s.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e)})}}register(e){this._includeText=!!e.registerOptions.includeText,super.register(e)}getTextDocument(e){return e}}t.DidSaveTextDocumentFeature=h},5432:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionFeature=void 0;const i=n(1398),r=n(7354),o=n(4294);class s extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.TypeDefinitionRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=(0,o.ensure)((0,o.ensure)(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){let[n,i]=this.getRegistration(t,e.typeDefinitionProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=e.documentSelector,n={provideTypeDefinition:(e,t,n)=>{const i=this._client,o=(e,t,n)=>i.sendRequest(r.TypeDefinitionRequest.type,i.code2ProtocolConverter.asTextDocumentPositionParams(e,t),n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asDefinitionResult(e,n)),(e=>i.handleFailedRequest(r.TypeDefinitionRequest.type,n,e,null))),s=i.middleware;return s.provideTypeDefinition?s.provideTypeDefinition(e,t,n,o):o(e,t,n)}};return[this.registerProvider(t,n),n]}registerProvider(e,t){return i.languages.registerTypeDefinitionProvider(this._client.protocol2CodeConverter.asDocumentSelector(e),t)}}t.TypeDefinitionFeature=s},4622:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const i=n(1398),r=n(7354),o=n(4294);class s{constructor(e){this.client=e,this.middleware=e.middleware}prepareTypeHierarchy(e,t,n){const i=this.client,o=this.middleware,s=(e,t,n)=>{const o=i.code2ProtocolConverter.asTextDocumentPositionParams(e,t);return i.sendRequest(r.TypeHierarchyPrepareRequest.type,o,n).then((e=>n.isCancellationRequested?null:i.protocol2CodeConverter.asTypeHierarchyItems(e,n)),(e=>i.handleFailedRequest(r.TypeHierarchyPrepareRequest.type,n,e,null)))};return o.prepareTypeHierarchy?o.prepareTypeHierarchy(e,t,n,s):s(e,t,n)}provideTypeHierarchySupertypes(e,t){const n=this.client,i=this.middleware,o=(e,t)=>{const i={item:n.code2ProtocolConverter.asTypeHierarchyItem(e)};return n.sendRequest(r.TypeHierarchySupertypesRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,t)),(e=>n.handleFailedRequest(r.TypeHierarchySupertypesRequest.type,t,e,null)))};return i.provideTypeHierarchySupertypes?i.provideTypeHierarchySupertypes(e,t,o):o(e,t)}provideTypeHierarchySubtypes(e,t){const n=this.client,i=this.middleware,o=(e,t)=>{const i={item:n.code2ProtocolConverter.asTypeHierarchyItem(e)};return n.sendRequest(r.TypeHierarchySubtypesRequest.type,i,t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asTypeHierarchyItems(e,t)),(e=>n.handleFailedRequest(r.TypeHierarchySubtypesRequest.type,t,e,null)))};return i.provideTypeHierarchySubtypes?i.provideTypeHierarchySubtypes(e,t,o):o(e,t)}}class a extends o.TextDocumentLanguageFeature{constructor(e){super(e,r.TypeHierarchyPrepareRequest.type)}fillClientCapabilities(e){(0,o.ensure)((0,o.ensure)(e,"textDocument"),"typeHierarchy").dynamicRegistration=!0}initialize(e,t){const[n,i]=this.getRegistration(t,e.typeHierarchyProvider);n&&i&&this.register({id:n,registerOptions:i})}registerLanguageProvider(e){const t=this._client,n=new s(t);return[i.languages.registerTypeHierarchyProvider(t.protocol2CodeConverter.asDocumentSelector(e.documentSelector),n),n]}}t.TypeHierarchyFeature=a},483:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forEach=t.mapAsync=t.map=t.clearTestMode=t.setTestMode=t.Semaphore=t.Delayer=void 0;const i=n(7354);t.Delayer=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e=>{this.onSuccess=e})).then((()=>{this.completionPromise=void 0,this.onSuccess=void 0;var e=this.task();return this.task=void 0,e}))),(t>=0||void 0===this.timeout)&&(this.timeout=(0,i.RAL)().timer.setTimeout((()=>{this.timeout=void 0,this.onSuccess(void 0)}),t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return void 0!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){void 0!==this.timeout&&(this.timeout.dispose(),this.timeout=void 0)}},t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,i.RAL)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};let r=!1;t.setTestMode=function(){r=!0},t.clearTestMode=function(){r=!1};class o{constructor(e=15){this.yieldAfter=!0===r?Math.max(e,2):Math.max(e,15),this.startTime=Date.now(),this.counter=0,this.total=0,this.counterInterval=1}start(){this.counter=0,this.total=0,this.counterInterval=1,this.startTime=Date.now()}shouldYield(){if(++this.counter>=this.counterInterval){const e=Date.now()-this.startTime,t=Math.max(0,this.yieldAfter-e);if(this.total+=this.counter,this.counter=0,e>=this.yieldAfter||t<=1)return this.counterInterval=1,this.total=0,!0;switch(e){case 0:case 1:this.counterInterval=2*this.total}}return!1}}t.map=async function(e,t,n,r){if(0===e.length)return[];const s=new Array(e.length),a=new o(r?.yieldAfter);function c(n){a.start();for(let i=n;i<e.length;i++)if(s[i]=t(e[i]),a.shouldYield())return r?.yieldCallback&&r.yieldCallback(),i+1;return-1}let u=c(0);for(;-1!==u&&(void 0===n||!n.isCancellationRequested);)u=await new Promise((e=>{(0,i.RAL)().timer.setImmediate((()=>{e(c(u))}))}));return s},t.mapAsync=async function(e,t,n,r){if(0===e.length)return[];const s=new Array(e.length),a=new o(r?.yieldAfter);async function c(i){a.start();for(let o=i;o<e.length;o++)if(s[o]=await t(e[o],n),a.shouldYield())return r?.yieldCallback&&r.yieldCallback(),o+1;return-1}let u=await c(0);for(;-1!==u&&(void 0===n||!n.isCancellationRequested);)u=await new Promise((e=>{(0,i.RAL)().timer.setImmediate((()=>{e(c(u))}))}));return s},t.forEach=async function(e,t,n,r){if(0===e.length)return;const s=new o(r?.yieldAfter);function a(n){s.start();for(let i=n;i<e.length;i++)if(t(e[i]),s.shouldYield())return r?.yieldCallback&&r.yieldCallback(),i+1;return-1}let c=a(0);for(;-1!==c&&(void 0===n||!n.isCancellationRequested);)c=await new Promise((e=>{(0,i.RAL)().timer.setImmediate((()=>{e(a(c))}))}))}},8319:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return"function"==typeof e}function r(e){return Array.isArray(e)}function o(e){return e&&i(e.then)}Object.defineProperty(t,"__esModule",{value:!0}),t.asPromise=t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=i,t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=o,t.asPromise=function(e){return e instanceof Promise?e:o(e)?new Promise(((t,n)=>{e.then((e=>t(e)),(e=>n(e)))})):Promise.resolve(e)}},9032:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class n{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class i extends n{static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return i._oneOf(i._chars)}constructor(){super([i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),"-","4",i._randomHex(),i._randomHex(),i._randomHex(),"-",i._oneOf(i._timeHighBits),i._randomHex(),i._randomHex(),i._randomHex(),"-",i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex(),i._randomHex()].join(""))}}function r(){return new i}i._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],i._timeHighBits=["8","9","a","b"],t.empty=new n("00000000-0000-0000-0000-000000000000"),t.v4=r;const o=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return o.test(e)}t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return r().asHex()}},6804:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=t.arrayDiff=void 0;const i=n(9032),r=n(1398),o=n(7354);function s(e,t){if(null!=e)return e[t]}function a(e,t){return e.filter((e=>t.indexOf(e)<0))}t.arrayDiff=a,t.WorkspaceFoldersFeature=class{constructor(e){this._client=e,this._listeners=new Map}getState(){return{kind:"workspace",id:this.registrationType.method,registrations:this._listeners.size>0}}get registrationType(){return o.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){const t=r.workspace.workspaceFolders;this.initializeWithFolders(t),e.workspaceFolders=void 0===t?null:t.map((e=>this.asProtocol(e)))}initializeWithFolders(e){this._initialFolders=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){const t=this._client;t.onRequest(o.WorkspaceFoldersRequest.type,(e=>{const n=()=>{const e=r.workspace.workspaceFolders;return void 0===e?null:e.map((e=>this.asProtocol(e)))},i=t.middleware.workspace;return i&&i.workspaceFolders?i.workspaceFolders(e,n):n()}));const n=s(s(s(e,"workspace"),"workspaceFolders"),"changeNotifications");let a;"string"==typeof n?a=n:!0===n&&(a=i.generateUuid()),a&&this.register({id:a,registerOptions:void 0})}sendInitialEvent(e){let t;if(this._initialFolders&&e){const n=a(this._initialFolders,e),i=a(e,this._initialFolders);(i.length>0||n.length>0)&&(t=this.doSendEvent(i,n))}else this._initialFolders?t=this.doSendEvent([],this._initialFolders):e&&(t=this.doSendEvent(e,[]));void 0!==t&&t.catch((e=>{this._client.error(`Sending notification ${o.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)}))}doSendEvent(e,t){let n={event:{added:e.map((e=>this.asProtocol(e))),removed:t.map((e=>this.asProtocol(e)))}};return this._client.sendNotification(o.DidChangeWorkspaceFoldersNotification.type,n)}register(e){let t=e.id,n=this._client,i=r.workspace.onDidChangeWorkspaceFolders((e=>{let t=e=>this.doSendEvent(e.added,e.removed),i=n.middleware.workspace;(i&&i.didChangeWorkspaceFolders?i.didChangeWorkspaceFolders(e,t):t(e)).catch((e=>{this._client.error(`Sending notification ${o.DidChangeWorkspaceFoldersNotification.type.method} failed`,e)}))}));this._listeners.set(t,i),this.sendInitialEvent(r.workspace.workspaceFolders)}unregister(e){let t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}clear(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}}},8312:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolFeature=void 0;const i=n(1398),r=n(7354),o=n(4294),s=n(9228),a=n(9032);class c extends o.WorkspaceFeature{constructor(e){super(e,r.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=(0,o.ensure)((0,o.ensure)(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:s.SupportedSymbolKinds},t.tagSupport={valueSet:s.SupportedSymbolTags},t.resolveSupport={properties:["location.range"]}}initialize(e){e.workspaceSymbolProvider&&this.register({id:a.generateUuid(),registerOptions:!0===e.workspaceSymbolProvider?{workDoneProgress:!1}:e.workspaceSymbolProvider})}registerLanguageProvider(e){const t={provideWorkspaceSymbols:(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.WorkspaceSymbolRequest.type,{query:e},t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSymbolInformations(e,t)),(e=>n.handleFailedRequest(r.WorkspaceSymbolRequest.type,t,e,null))),o=n.middleware;return o.provideWorkspaceSymbols?o.provideWorkspaceSymbols(e,t,i):i(e,t)},resolveWorkspaceSymbol:!0===e.resolveProvider?(e,t)=>{const n=this._client,i=(e,t)=>n.sendRequest(r.WorkspaceSymbolResolveRequest.type,n.code2ProtocolConverter.asWorkspaceSymbol(e),t).then((e=>t.isCancellationRequested?null:n.protocol2CodeConverter.asSymbolInformation(e)),(e=>n.handleFailedRequest(r.WorkspaceSymbolResolveRequest.type,t,e,null))),o=n.middleware;return o.resolveWorkspaceSymbol?o.resolveWorkspaceSymbol(e,t,i):i(e,t)}:void 0};return[i.languages.registerWorkspaceSymbolProvider(t),t]}}t.WorkspaceSymbolFeature=c},99:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingMonitor=t.LanguageClient=t.TransportKind=void 0;const o=n(5317),s=n(9896),a=n(6928),c=n(1398),u=n(8319),l=n(9538),d=n(6745),h=n(948),g=n(144),p=n(7638);r(n(948),t),r(n(6353),t);const f="^1.82.0";var m,v,y,b,C,R;!function(e){e[e.stdio=0]="stdio",e[e.ipc=1]="ipc",e[e.pipe=2]="pipe",e[e.socket=3]="socket"}(m||(t.TransportKind=m={})),function(e){e.isSocket=function(e){const t=e;return t&&t.kind===m.socket&&u.number(t.port)}}(v||(v={})),function(e){e.is=function(e){return u.string(e.command)}}(y||(y={})),function(e){e.is=function(e){return u.string(e.module)}}(b||(b={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.writer&&void 0!==t.reader}}(C||(C={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.process&&"boolean"==typeof t.detached}}(R||(R={}));class _ extends l.BaseLanguageClient{constructor(e,t,n,i,r){let o,s,a,c,l;u.string(t)?(o=e,s=t,a=n,c=i,l=!!r):(o=e.toLowerCase(),s=e,a=t,c=n,l=i),void 0===l&&(l=!1),super(o,s,c),this._serverOptions=a,this._forceDebug=l,this._isInDebugMode=l;try{this.checkVersion()}catch(e){throw u.string(e.message)&&this.outputChannel.appendLine(e.message),e}}checkVersion(){const e=g(c.version);if(!e)throw new Error(`No valid VS Code version detected. Version string is: ${c.version}`);if(e.prerelease&&e.prerelease.length>0&&(e.prerelease=[]),!p(e,f))throw new Error(`The language client requires VS Code version ${f} but received version ${c.version}`)}get isInDebugMode(){return this._isInDebugMode}async restart(){await this.stop(),this.isInDebugMode?(await new Promise((e=>setTimeout(e,1e3))),await this.start()):await this.start()}stop(e=2e3){return super.stop(e).finally((()=>{if(this._serverProcess){const e=this._serverProcess;this._serverProcess=void 0,void 0!==this._isDetached&&this._isDetached||this.checkProcessDied(e),this._isDetached=void 0}}))}checkProcessDied(e){e&&void 0!==e.pid&&setTimeout((()=>{try{void 0!==e.pid&&(process.kill(e.pid,0),(0,d.terminate)(e))}catch(e){}}),2e3)}handleConnectionClosed(){return this._serverProcess=void 0,super.handleConnectionClosed()}fillInitializeParams(e){super.fillInitializeParams(e),null===e.processId&&(e.processId=process.pid)}createMessageTransports(e){function t(e,t){if(!e&&!t)return;const n=Object.create(null);return Object.keys(process.env).forEach((e=>n[e]=process.env[e])),t&&(n.ELECTRON_RUN_AS_NODE="1",n.ELECTRON_NO_ASAR="1"),e&&Object.keys(e).forEach((t=>n[t]=e[t])),n}const n=["--debug=","--debug-brk=","--inspect=","--inspect-brk="],i=["--debug","--debug-brk","--inspect","--inspect-brk"];function r(e){if(null===e.stdin||null===e.stdout||null===e.stderr)throw new Error("Process created without stdio streams")}const s=this._serverOptions;if(u.func(s))return s().then((t=>{if(l.MessageTransports.is(t))return this._isDetached=!!t.detached,t;if(C.is(t))return this._isDetached=!!t.detached,{reader:new h.StreamMessageReader(t.reader),writer:new h.StreamMessageWriter(t.writer)};{let n;return R.is(t)?(n=t.process,this._isDetached=t.detached):(n=t,this._isDetached=!1),n.stderr.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),{reader:new h.StreamMessageReader(n.stdout),writer:new h.StreamMessageWriter(n.stdin)}}}));let a,c=s;return c.run||c.debug?this._forceDebug||function(){let e=process.execArgv;return!!e&&e.some((e=>n.some((t=>e.startsWith(t)))||i.some((t=>e===t))))}()?(a=c.debug,this._isInDebugMode=!0):(a=c.run,this._isInDebugMode=!1):a=s,this._getServerWorkingDir(a.options).then((n=>{if(b.is(a)&&a.module){let i=a,s=i.transport||m.stdio;if(!i.runtime){let a;return new Promise(((c,l)=>{const d=(i.args&&i.args.slice())??[];s===m.ipc?d.push("--node-ipc"):s===m.stdio?d.push("--stdio"):s===m.pipe?(a=(0,h.generateRandomPipeName)(),d.push(`--pipe=${a}`)):v.isSocket(s)&&d.push(`--socket=${s.port}`),d.push(`--clientProcessId=${process.pid.toString()}`);const g=i.options??Object.create(null);if(g.env=t(g.env,!0),g.execArgv=g.execArgv||[],g.cwd=n,g.silent=!0,s===m.ipc||s===m.stdio){const t=o.fork(i.module,d||[],g);r(t),this._serverProcess=t,t.stderr.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),s===m.ipc?(t.stdout.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),c({reader:new h.IPCMessageReader(this._serverProcess),writer:new h.IPCMessageWriter(this._serverProcess)})):c({reader:new h.StreamMessageReader(t.stdout),writer:new h.StreamMessageWriter(t.stdin)})}else s===m.pipe?(0,h.createClientPipeTransport)(a).then((t=>{const n=o.fork(i.module,d||[],g);r(n),this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),t.onConnected().then((e=>{c({reader:e[0],writer:e[1]})}),l)}),l):v.isSocket(s)&&(0,h.createClientSocketTransport)(s.port).then((t=>{const n=o.fork(i.module,d||[],g);r(n),this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),t.onConnected().then((e=>{c({reader:e[0],writer:e[1]})}),l)}),l)}))}{const r=[],a=i.options??Object.create(null);a.execArgv&&a.execArgv.forEach((e=>r.push(e))),r.push(i.module),i.args&&i.args.forEach((e=>r.push(e)));const c=Object.create(null);c.cwd=n,c.env=t(a.env,!1);const l=this._getRuntimePath(i.runtime,n);let d;if(s===m.ipc?(c.stdio=[null,null,null,"ipc"],r.push("--node-ipc")):s===m.stdio?r.push("--stdio"):s===m.pipe?(d=(0,h.generateRandomPipeName)(),r.push(`--pipe=${d}`)):v.isSocket(s)&&r.push(`--socket=${s.port}`),r.push(`--clientProcessId=${process.pid.toString()}`),s===m.ipc||s===m.stdio){const t=o.spawn(l,r,c);return t&&t.pid?(this._serverProcess=t,t.stderr.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),s===m.ipc?(t.stdout.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),Promise.resolve({reader:new h.IPCMessageReader(t),writer:new h.IPCMessageWriter(t)})):Promise.resolve({reader:new h.StreamMessageReader(t.stdout),writer:new h.StreamMessageWriter(t.stdin)})):D(t,`Launching server using runtime ${l} failed.`)}if(s===m.pipe)return(0,h.createClientPipeTransport)(d).then((t=>{const n=o.spawn(l,r,c);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),t.onConnected().then((e=>({reader:e[0],writer:e[1]})))):D(n,`Launching server using runtime ${l} failed.`)}));if(v.isSocket(s))return(0,h.createClientSocketTransport)(s.port).then((t=>{const n=o.spawn(l,r,c);return n&&n.pid?(this._serverProcess=n,n.stderr.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),n.stdout.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),t.onConnected().then((e=>({reader:e[0],writer:e[1]})))):D(n,`Launching server using runtime ${l} failed.`)}))}}else if(y.is(a)&&a.command){const t=a,i=void 0!==a.args?a.args.slice(0):[];let r;const s=a.transport;if(s===m.stdio)i.push("--stdio");else if(s===m.pipe)r=(0,h.generateRandomPipeName)(),i.push(`--pipe=${r}`);else if(v.isSocket(s))i.push(`--socket=${s.port}`);else if(s===m.ipc)throw new Error("Transport kind ipc is not support for command executable");const c=Object.assign({},t.options);if(c.cwd=c.cwd||n,void 0===s||s===m.stdio){const n=o.spawn(t.command,i,c);return n&&n.pid?(n.stderr.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),this._serverProcess=n,this._isDetached=!!c.detached,Promise.resolve({reader:new h.StreamMessageReader(n.stdout),writer:new h.StreamMessageWriter(n.stdin)})):D(n,`Launching server using command ${t.command} failed.`)}if(s===m.pipe)return(0,h.createClientPipeTransport)(r).then((n=>{const r=o.spawn(t.command,i,c);return r&&r.pid?(this._serverProcess=r,this._isDetached=!!c.detached,r.stderr.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),r.stdout.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),n.onConnected().then((e=>({reader:e[0],writer:e[1]})))):D(r,`Launching server using command ${t.command} failed.`)}));if(v.isSocket(s))return(0,h.createClientSocketTransport)(s.port).then((n=>{const r=o.spawn(t.command,i,c);return r&&r.pid?(this._serverProcess=r,this._isDetached=!!c.detached,r.stderr.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),r.stdout.on("data",(t=>this.outputChannel.append(u.string(t)?t:t.toString(e)))),n.onConnected().then((e=>({reader:e[0],writer:e[1]})))):D(r,`Launching server using command ${t.command} failed.`)}))}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(s,null,4)))})).finally((()=>{void 0!==this._serverProcess&&this._serverProcess.on("exit",((e,t)=>{null!==e&&this.error(`Server process exited with code ${e}.`,void 0,!1),null!==t&&this.error(`Server process exited with signal ${t}.`,void 0,!1)}))}))}_getRuntimePath(e,t){if(a.isAbsolute(e))return e;const n=this._mainGetRootPath();if(void 0!==n){const t=a.join(n,e);if(s.existsSync(t))return t}if(void 0!==t){const n=a.join(t,e);if(s.existsSync(n))return n}return e}_mainGetRootPath(){let e=c.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}_getServerWorkingDir(e){let t=e&&e.cwd;return t||(t=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),t?new Promise((e=>{s.lstat(t,((n,i)=>{e(!n&&i.isDirectory()?t:void 0)}))})):Promise.resolve(void 0)}}function D(e,t){return null===e?Promise.reject(t):new Promise(((n,i)=>{e.on("error",(e=>{i(`${t} ${e}`)})),setImmediate((()=>i(t)))}))}t.LanguageClient=_,t.SettingMonitor=class{constructor(e,t){this._client=e,this._setting=t,this._listeners=[]}start(){return c.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new c.Disposable((()=>{this._client.needsStop()&&this._client.stop()}))}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,n=e>=0?this._setting.substr(e+1):void 0,i=n?c.workspace.getConfiguration(t).get(n,!1):c.workspace.getConfiguration(t);i&&this._client.needsStart()?this._client.start().catch((e=>this._client.error("Start failed after configuration change",e,"force"))):!i&&this._client.needsStop()&&this._client.stop().catch((e=>this._client.error("Stop failed after configuration change",e,"force")))}}},6745:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.terminate=void 0;const i=n(5317),r=n(6928),o="win32"===process.platform,s="darwin"===process.platform,a="linux"===process.platform;t.terminate=function(e,t){if(o)try{let n={stdio:["pipe","pipe","ignore"]};return t&&(n.cwd=t),i.execFileSync("taskkill",["/T","/F","/PID",e.pid.toString()],n),!0}catch(e){return!1}else{if(!a&&!s)return e.kill("SIGKILL"),!0;try{var n=(0,r.join)(__dirname,"terminateProcess.sh");return!i.spawnSync(n,[e.pid.toString()]).error}catch(e){return!1}}}},2339:(e,t,n)=>{"use strict";e.exports=n(99)},6998:e=>{const t="object"==typeof process&&process&&"win32"===process.platform;e.exports=t?{sep:"\\"}:{sep:"/"}},6045:(e,t,n)=>{const i=e.exports=(e,t,n={})=>(m(t),!(!n.nocomment&&"#"===t.charAt(0))&&new y(t,n).match(e));e.exports=i;const r=n(6998);i.sep=r.sep;const o=Symbol("globstar **");i.GLOBSTAR=o;const s=n(8928),a={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},c="[^/]",u=c+"*?",l=e=>e.split("").reduce(((e,t)=>(e[t]=!0,e)),{}),d=l("().*{}+?[]^$\\!"),h=l("[.("),g=/\/+/;i.filter=(e,t={})=>(n,r,o)=>i(n,e,t);const p=(e,t={})=>{const n={};return Object.keys(e).forEach((t=>n[t]=e[t])),Object.keys(t).forEach((e=>n[e]=t[e])),n};i.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return i;const t=i,n=(n,i,r)=>t(n,i,p(e,r));return(n.Minimatch=class extends t.Minimatch{constructor(t,n){super(t,p(e,n))}}).defaults=n=>t.defaults(p(e,n)).Minimatch,n.filter=(n,i)=>t.filter(n,p(e,i)),n.defaults=n=>t.defaults(p(e,n)),n.makeRe=(n,i)=>t.makeRe(n,p(e,i)),n.braceExpand=(n,i)=>t.braceExpand(n,p(e,i)),n.match=(n,i,r)=>t.match(n,i,p(e,r)),n},i.braceExpand=(e,t)=>f(e,t);const f=(e,t={})=>(m(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:s(e)),m=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},v=Symbol("subparse");i.makeRe=(e,t)=>new y(e,t||{}).makeRe(),i.match=(e,t,n={})=>{const i=new y(t,n);return e=e.filter((e=>i.match(e))),i.options.nonull&&!e.length&&e.push(t),e};class y{constructor(e,t){m(e),t||(t={}),this.options=t,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();let n=this.globSet=this.braceExpand();t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,n),n=this.globParts=n.map((e=>e.split(g))),this.debug(this.pattern,n),n=n.map(((e,t,n)=>e.map(this.parse,this))),this.debug(this.pattern,n),n=n.filter((e=>-1===e.indexOf(!1))),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let i=0;i<e.length&&"!"===e.charAt(i);i++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n){var i=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var r=0,s=0,a=e.length,c=t.length;r<a&&s<c;r++,s++){this.debug("matchOne loop");var u,l=t[s],d=e[r];if(this.debug(t,l,d),!1===l)return!1;if(l===o){this.debug("GLOBSTAR",[t,l,d]);var h=r,g=s+1;if(g===c){for(this.debug("** at the end");r<a;r++)if("."===e[r]||".."===e[r]||!i.dot&&"."===e[r].charAt(0))return!1;return!0}for(;h<a;){var p=e[h];if(this.debug("\nglobstar while",e,h,t,g,p),this.matchOne(e.slice(h),t.slice(g),n))return this.debug("globstar found match!",h,a,p),!0;if("."===p||".."===p||!i.dot&&"."===p.charAt(0)){this.debug("dot detected!",e,h,t,g);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!n||(this.debug("\n>>> no match, partial?",e,h,t,g),h!==a))}if("string"==typeof l?(u=d===l,this.debug("string match",l,d,u)):(u=d.match(l),this.debug("pattern match",l,d,u)),!u)return!1}if(r===a&&s===c)return!0;if(r===a)return n;if(s===c)return r===a-1&&""===e[r];throw new Error("wtf?")}braceExpand(){return f(this.pattern,this.options)}parse(e,t){m(e);const n=this.options;if("**"===e){if(!n.noglobstar)return o;e="*"}if(""===e)return"";let i="",r=!1,s=!1;const l=[],g=[];let p,f,y,b,C=!1,R=-1,_=-1,D="."===e.charAt(0),S=n.dot||D;const w=e=>"."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",T=()=>{if(p){switch(p){case"*":i+=u,r=!0;break;case"?":i+=c,r=!0;break;default:i+="\\"+p}this.debug("clearStateChar %j %j",p,i),p=!1}};for(let t,o=0;o<e.length&&(t=e.charAt(o));o++)if(this.debug("%s\t%s %s %j",e,o,i,t),s){if("/"===t)return!1;d[t]&&(i+="\\"),i+=t,s=!1}else switch(t){case"/":return!1;case"\\":if(C&&"-"===e.charAt(o+1)){i+=t;continue}T(),s=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,o,i,t),C){this.debug(" in class"),"!"===t&&o===_+1&&(t="^"),i+=t;continue}this.debug("call clearStateChar %j",p),T(),p=t,n.noext&&T();continue;case"(":{if(C){i+="(";continue}if(!p){i+="\\(";continue}const t={type:p,start:o-1,reStart:i.length,open:a[p].open,close:a[p].close};this.debug(this.pattern,"\t",t),l.push(t),i+=t.open,0===t.start&&"!"!==t.type&&(D=!0,i+=w(e.slice(o+1))),this.debug("plType %j %j",p,i),p=!1;continue}case")":{const e=l[l.length-1];if(C||!e){i+="\\)";continue}l.pop(),T(),r=!0,y=e,i+=y.close,"!"===y.type&&g.push(Object.assign(y,{reEnd:i.length}));continue}case"|":{const t=l[l.length-1];if(C||!t){i+="\\|";continue}T(),i+="|",0===t.start&&"!"!==t.type&&(D=!0,i+=w(e.slice(o+1)));continue}case"[":if(T(),C){i+="\\"+t;continue}C=!0,_=o,R=i.length,i+=t;continue;case"]":if(o===_+1||!C){i+="\\"+t;continue}f=e.substring(_+1,o);try{RegExp("["+(f.replace(/\\([^-\]])/g,"$1").replace(/[[\]\\]/g,"\\$&")+"]")),i+=t}catch(e){i=i.substring(0,R)+"(?:$.)"}r=!0,C=!1;continue;default:T(),!d[t]||"^"===t&&C||(i+="\\"),i+=t}for(C&&(f=e.slice(_+1),b=this.parse(f,v),i=i.substring(0,R)+"\\["+b[0],r=r||b[1]),y=l.pop();y;y=l.pop()){let e;e=i.slice(y.reStart+y.open.length),this.debug("setting tail",i,y),e=e.replace(/((?:\\{2}){0,64})(\\?)\|/g,((e,t,n)=>(n||(n="\\"),t+t+n+"|"))),this.debug("tail=%j\n %s",e,e,y,i);const t="*"===y.type?u:"?"===y.type?c:"\\"+y.type;r=!0,i=i.slice(0,y.reStart)+t+"\\("+e}T(),s&&(i+="\\\\");const k=h[i.charAt(0)];for(let e=g.length-1;e>-1;e--){const n=g[e],r=i.slice(0,n.reStart),o=i.slice(n.reStart,n.reEnd-8);let s=i.slice(n.reEnd);const a=i.slice(n.reEnd-8,n.reEnd)+s,c=r.split(")").length,u=r.split("(").length-c;let l=s;for(let e=0;e<u;e++)l=l.replace(/\)[+*?]?/,"");s=l,i=r+o+s+(""===s&&t!==v?"(?:$|\\/)":"")+a}if(""!==i&&r&&(i="(?=.)"+i),k&&(i=(D?"":S?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)")+i),t===v)return[i,r];if(n.nocase&&!r&&(r=e.toUpperCase()!==e.toLowerCase()),!r)return(e=>e.replace(/\\(.)/g,"$1"))(e);const P=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",P),{_glob:e,_src:i})}catch(e){return new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,n=t.noglobstar?u:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=t.nocase?"i":"";let r=e.map((e=>(e=e.map((e=>"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===o?o:e._src)).reduce(((e,t)=>(e[e.length-1]===o&&t===o||e.push(t),e)),[]),e.forEach(((t,i)=>{t===o&&e[i-1]!==o&&(0===i?e.length>1?e[i+1]="(?:\\/|"+n+"\\/)?"+e[i+1]:e[i]=n:i===e.length-1?e[i-1]+="(?:\\/|"+n+")?":(e[i-1]+="(?:\\/|\\/"+n+"\\/)"+e[i+1],e[i+1]=o))})),e.filter((e=>e!==o)).join("/")))).join("|");r="^(?:"+r+")$",this.negate&&(r="^(?!"+r+").*$");try{this.regexp=new RegExp(r,i)}catch(e){this.regexp=!1}return this.regexp}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const n=this.options;"/"!==r.sep&&(e=e.split(r.sep).join("/")),e=e.split(g),this.debug(this.pattern,"split",e);const i=this.set;let o;this.debug(this.pattern,"set",i);for(let t=e.length-1;t>=0&&(o=e[t],!o);t--);for(let r=0;r<i.length;r++){const s=i[r];let a=e;if(n.matchBase&&1===s.length&&(a=[o]),this.matchOne(a,s,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return i.defaults(e).Minimatch}}i.Minimatch=y},8766:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,r(n(7123),t),r(n(4815),t),r(n(372),t),r(n(1560),t);var o,s=n(1580);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return s.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(o||(t.LSPErrorCodes=o={}))},1580:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const i=n(7123);t.createProtocolConnection=function(e,t,n,r){return i.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,i.createMessageConnection)(e,t,n,r)}},372:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const i=n(7123);var r;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(r||(t.MessageDirection=r={})),t.RegistrationType=class{constructor(e){this.method=e}};class o extends i.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=o;class s extends i.RequestType{constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolRequestType=s;class a extends i.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=a;class c extends i.NotificationType{constructor(e){super(e,i.ParameterStructures.byName)}}t.ProtocolNotificationType=c},8765:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const i=n(372);var r,o,s;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.CallHierarchyPrepareRequest=r={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.CallHierarchyIncomingCallsRequest=o={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(s||(t.CallHierarchyOutgoingCallsRequest=s={}))},7672:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const i=n(372);var r,o;!function(e){e.method="textDocument/documentColor",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.DocumentColorRequest=r={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.ColorPresentationRequest=o={}))},1660:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const i=n(372);var r;!function(e){e.method="workspace/configuration",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(r||(t.ConfigurationRequest=r={}))},6914:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const i=n(372);var r;!function(e){e.method="textDocument/declaration",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.DeclarationRequest=r={}))},6011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const i=n(7123),r=n(8598),o=n(372);var s,a,c,u,l;!function(e){e.is=function(e){const t=e;return t&&r.boolean(t.retriggerRequest)}}(s||(t.DiagnosticServerCancellationData=s={})),function(e){e.Full="full",e.Unchanged="unchanged"}(a||(t.DocumentDiagnosticReportKind=a={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method),e.partialResult=new i.ProgressType}(c||(t.DocumentDiagnosticRequest=c={})),function(e){e.method="workspace/diagnostic",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolRequestType(e.method),e.partialResult=new i.ProgressType}(u||(t.WorkspaceDiagnosticRequest=u={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=o.MessageDirection.serverToClient,e.type=new o.ProtocolRequestType0(e.method)}(l||(t.DiagnosticRefreshRequest=l={}))},9840:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const i=n(372);var r,o,s,a,c,u,l;!function(e){e.file="file",e.folder="folder"}(r||(t.FileOperationPatternKind=r={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.WillCreateFilesRequest=o={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(s||(t.DidCreateFilesNotification=s={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(u||(t.DidDeleteFilesNotification=u={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(l||(t.WillDeleteFilesRequest=l={}))},2874:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const i=n(372);var r,o;!function(e){e.method="textDocument/foldingRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.FoldingRangeRequest=r={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(o||(t.FoldingRangeRefreshRequest=o={}))},9574:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const i=n(372);var r;!function(e){e.method="textDocument/implementation",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.ImplementationRequest=r={}))},7752:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const i=n(372);var r,o,s;!function(e){e.method="textDocument/inlayHint",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.InlayHintRequest=r={})),function(e){e.method="inlayHint/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.InlayHintResolveRequest=o={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(s||(t.InlayHintRefreshRequest=s={}))},3307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;const i=n(372);var r;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.InlineCompletionRequest=r={}))},3124:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const i=n(372);var r,o;!function(e){e.method="textDocument/inlineValue",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.InlineValueRequest=r={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(o||(t.InlineValueRefreshRequest=o={}))},1560:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=void 0;const i=n(372),r=n(4815),o=n(8598),s=n(9574);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return s.ImplementationRequest}});const a=n(8461);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});const c=n(9935);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return c.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return c.DidChangeWorkspaceFoldersNotification}});const u=n(1660);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return u.ConfigurationRequest}});const l=n(7672);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return l.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return l.ColorPresentationRequest}});const d=n(2874);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return d.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return d.FoldingRangeRefreshRequest}});const h=n(6914);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return h.DeclarationRequest}});const g=n(3487);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return g.SelectionRangeRequest}});const p=n(2687);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return p.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return p.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return p.WorkDoneProgressCancelNotification}});const f=n(8765);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return f.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return f.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return f.CallHierarchyPrepareRequest}});const m=n(2478);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return m.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return m.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return m.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return m.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return m.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return m.SemanticTokensRegistrationType}});const v=n(908);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return v.ShowDocumentRequest}});const y=n(5316);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return y.LinkedEditingRangeRequest}});const b=n(9840);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return b.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return b.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return b.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return b.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return b.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return b.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return b.WillDeleteFilesRequest}});const C=n(9047);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return C.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return C.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return C.MonikerRequest}});const R=n(645);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return R.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return R.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return R.TypeHierarchySupertypesRequest}});const _=n(3124);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return _.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return _.InlineValueRefreshRequest}});const D=n(7752);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return D.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return D.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return D.InlayHintRefreshRequest}});const S=n(6011);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return S.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return S.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return S.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return S.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return S.DiagnosticRefreshRequest}});const w=n(5938);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return w.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return w.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return w.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return w.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return w.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return w.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return w.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return w.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return w.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return w.DidCloseNotebookDocumentNotification}});const T=n(3307);var k,P,x,E,O,I,A,F,N,M,q,L,j,$,H,K,W,U,V,z,B,G,X,J,Y,Q,Z,ee,te,ne,ie,re,oe,se,ae,ce,ue,le,de,he,ge,pe,fe,me,ve,ye,be,Ce,Re,_e,De,Se,we,Te,ke,Pe,xe,Ee,Oe,Ie,Ae,Fe,Ne,Me,qe;Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return T.InlineCompletionRequest}}),function(e){e.is=function(e){const t=e;return o.string(t)||o.string(t.language)||o.string(t.scheme)||o.string(t.pattern)}}(k||(t.TextDocumentFilter=k={})),function(e){e.is=function(e){const t=e;return o.objectLiteral(t)&&(o.string(t.notebookType)||o.string(t.scheme)||o.string(t.pattern))}}(P||(t.NotebookDocumentFilter=P={})),function(e){e.is=function(e){const t=e;return o.objectLiteral(t)&&(o.string(t.notebook)||P.is(t.notebook))&&(void 0===t.language||o.string(t.language))}}(x||(t.NotebookCellTextDocumentFilter=x={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!o.string(t)&&!k.is(t)&&!x.is(t))return!1;return!0}}(E||(t.DocumentSelector=E={})),function(e){e.method="client/registerCapability",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(O||(t.RegistrationRequest=O={})),function(e){e.method="client/unregisterCapability",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(I||(t.UnregistrationRequest=I={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(A||(t.ResourceOperationKind=A={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(F||(t.FailureHandlingKind=F={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(N||(t.PositionEncodingKind=N={})),function(e){e.hasId=function(e){const t=e;return t&&o.string(t.id)&&t.id.length>0}}(M||(t.StaticRegistrationOptions=M={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||E.is(t.documentSelector))}}(q||(t.TextDocumentRegistrationOptions=q={})),function(e){e.is=function(e){const t=e;return o.objectLiteral(t)&&(void 0===t.workDoneProgress||o.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&o.boolean(t.workDoneProgress)}}(L||(t.WorkDoneProgressOptions=L={})),function(e){e.method="initialize",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(j||(t.InitializeRequest=j={})),function(e){e.unknownProtocolVersion=1}($||(t.InitializeErrorCodes=$={})),function(e){e.method="initialized",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(H||(t.InitializedNotification=H={})),function(e){e.method="shutdown",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType0(e.method)}(K||(t.ShutdownRequest=K={})),function(e){e.method="exit",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType0(e.method)}(W||(t.ExitNotification=W={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(U||(t.DidChangeConfigurationNotification=U={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(V||(t.MessageType=V={})),function(e){e.method="window/showMessage",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolNotificationType(e.method)}(z||(t.ShowMessageNotification=z={})),function(e){e.method="window/showMessageRequest",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(B||(t.ShowMessageRequest=B={})),function(e){e.method="window/logMessage",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolNotificationType(e.method)}(G||(t.LogMessageNotification=G={})),function(e){e.method="telemetry/event",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolNotificationType(e.method)}(X||(t.TelemetryEventNotification=X={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(J||(t.TextDocumentSyncKind=J={})),function(e){e.method="textDocument/didOpen",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(Y||(t.DidOpenTextDocumentNotification=Y={})),function(e){e.isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(Q||(t.TextDocumentContentChangeEvent=Q={})),function(e){e.method="textDocument/didChange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(Z||(t.DidChangeTextDocumentNotification=Z={})),function(e){e.method="textDocument/didClose",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(ee||(t.DidCloseTextDocumentNotification=ee={})),function(e){e.method="textDocument/didSave",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(te||(t.DidSaveTextDocumentNotification=te={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(ne||(t.TextDocumentSaveReason=ne={})),function(e){e.method="textDocument/willSave",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(ie||(t.WillSaveTextDocumentNotification=ie={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(re||(t.WillSaveTextDocumentWaitUntilRequest=re={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(oe||(t.DidChangeWatchedFilesNotification=oe={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(se||(t.FileChangeType=se={})),function(e){e.is=function(e){const t=e;return o.objectLiteral(t)&&(r.URI.is(t.baseUri)||r.WorkspaceFolder.is(t.baseUri))&&o.string(t.pattern)}}(ae||(t.RelativePattern=ae={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(ce||(t.WatchKind=ce={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolNotificationType(e.method)}(ue||(t.PublishDiagnosticsNotification=ue={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(le||(t.CompletionTriggerKind=le={})),function(e){e.method="textDocument/completion",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(de||(t.CompletionRequest=de={})),function(e){e.method="completionItem/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(he||(t.CompletionResolveRequest=he={})),function(e){e.method="textDocument/hover",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(ge||(t.HoverRequest=ge={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(pe||(t.SignatureHelpTriggerKind=pe={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(fe||(t.SignatureHelpRequest=fe={})),function(e){e.method="textDocument/definition",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(me||(t.DefinitionRequest=me={})),function(e){e.method="textDocument/references",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(ve||(t.ReferencesRequest=ve={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(ye||(t.DocumentHighlightRequest=ye={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(be||(t.DocumentSymbolRequest=be={})),function(e){e.method="textDocument/codeAction",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Ce||(t.CodeActionRequest=Ce={})),function(e){e.method="codeAction/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Re||(t.CodeActionResolveRequest=Re={})),function(e){e.method="workspace/symbol",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(_e||(t.WorkspaceSymbolRequest=_e={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(De||(t.WorkspaceSymbolResolveRequest=De={})),function(e){e.method="textDocument/codeLens",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Se||(t.CodeLensRequest=Se={})),function(e){e.method="codeLens/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(we||(t.CodeLensResolveRequest=we={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(Te||(t.CodeLensRefreshRequest=Te={})),function(e){e.method="textDocument/documentLink",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(ke||(t.DocumentLinkRequest=ke={})),function(e){e.method="documentLink/resolve",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Pe||(t.DocumentLinkResolveRequest=Pe={})),function(e){e.method="textDocument/formatting",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(xe||(t.DocumentFormattingRequest=xe={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Ee||(t.DocumentRangeFormattingRequest=Ee={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Oe||(t.DocumentRangesFormattingRequest=Oe={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Ie||(t.DocumentOnTypeFormattingRequest=Ie={})),function(e){e.Identifier=1}(Ae||(t.PrepareSupportDefaultBehavior=Ae={})),function(e){e.method="textDocument/rename",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Fe||(t.RenameRequest=Fe={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Ne||(t.PrepareRenameRequest=Ne={})),function(e){e.method="workspace/executeCommand",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(Me||(t.ExecuteCommandRequest=Me={})),function(e){e.method="workspace/applyEdit",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType("workspace/applyEdit")}(qe||(t.ApplyWorkspaceEditRequest=qe={}))},5316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const i=n(372);var r;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.LinkedEditingRangeRequest=r={}))},9047:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const i=n(372);var r,o,s;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(r||(t.UniquenessLevel=r={})),function(e){e.$import="import",e.$export="export",e.local="local"}(o||(t.MonikerKind=o={})),function(e){e.method="textDocument/moniker",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(s||(t.MonikerRequest=s={}))},5938:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const i=n(4815),r=n(8598),o=n(372);var s,a,c,u,l,d,h,g,p,f;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(s||(t.NotebookCellKind=s={})),function(e){e.create=function(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function(e){const t=e;return r.objectLiteral(t)&&i.uinteger.is(t.executionOrder)&&(void 0===t.success||r.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(a||(t.ExecutionSummary=a={})),function(e){function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;const i=Array.isArray(e),o=Array.isArray(n);if(i!==o)return!1;if(i&&o){if(e.length!==n.length)return!1;for(let i=0;i<e.length;i++)if(!t(e[i],n[i]))return!1}if(r.objectLiteral(e)&&r.objectLiteral(n)){const i=Object.keys(e),r=Object.keys(n);if(i.length!==r.length)return!1;if(i.sort(),r.sort(),!t(i,r))return!1;for(let r=0;r<i.length;r++){const o=i[r];if(!t(e[o],n[o]))return!1}}return!0}e.create=function(e,t){return{kind:e,document:t}},e.is=function(e){const t=e;return r.objectLiteral(t)&&s.is(t.kind)&&i.DocumentUri.is(t.document)&&(void 0===t.metadata||r.objectLiteral(t.metadata))},e.diff=function(e,n){const i=new Set;return e.document!==n.document&&i.add("document"),e.kind!==n.kind&&i.add("kind"),e.executionSummary!==n.executionSummary&&i.add("executionSummary"),void 0===e.metadata&&void 0===n.metadata||t(e.metadata,n.metadata)||i.add("metadata"),void 0===e.executionSummary&&void 0===n.executionSummary||a.equals(e.executionSummary,n.executionSummary)||i.add("executionSummary"),i}}(c||(t.NotebookCell=c={})),function(e){e.create=function(e,t,n,i){return{uri:e,notebookType:t,version:n,cells:i}},e.is=function(e){const t=e;return r.objectLiteral(t)&&r.string(t.uri)&&i.integer.is(t.version)&&r.typedArray(t.cells,c.is)}}(u||(t.NotebookDocument=u={})),function(e){e.method="notebookDocument/sync",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.RegistrationType(e.method)}(l||(t.NotebookDocumentSyncRegistrationType=l={})),function(e){e.method="notebookDocument/didOpen",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(d||(t.DidOpenNotebookDocumentNotification=d={})),function(e){e.is=function(e){const t=e;return r.objectLiteral(t)&&i.uinteger.is(t.start)&&i.uinteger.is(t.deleteCount)&&(void 0===t.cells||r.typedArray(t.cells,c.is))},e.create=function(e,t,n){const i={start:e,deleteCount:t};return void 0!==n&&(i.cells=n),i}}(h||(t.NotebookCellArrayChange=h={})),function(e){e.method="notebookDocument/didChange",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(g||(t.DidChangeNotebookDocumentNotification=g={})),function(e){e.method="notebookDocument/didSave",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(p||(t.DidSaveNotebookDocumentNotification=p={})),function(e){e.method="notebookDocument/didClose",e.messageDirection=o.MessageDirection.clientToServer,e.type=new o.ProtocolNotificationType(e.method),e.registrationMethod=l.method}(f||(t.DidCloseNotebookDocumentNotification=f={}))},2687:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const i=n(7123),r=n(372);var o,s,a;!function(e){e.type=new i.ProgressType,e.is=function(t){return t===e.type}}(o||(t.WorkDoneProgress=o={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(s||(t.WorkDoneProgressCreateRequest=s={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(a||(t.WorkDoneProgressCancelNotification=a={}))},3487:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const i=n(372);var r;!function(e){e.method="textDocument/selectionRange",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.SelectionRangeRequest=r={}))},2478:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const i=n(372);var r,o,s,a,c,u;!function(e){e.Relative="relative"}(r||(t.TokenFormat=r={})),function(e){e.method="textDocument/semanticTokens",e.type=new i.RegistrationType(e.method)}(o||(t.SemanticTokensRegistrationType=o={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.registrationMethod=o.method}(s||(t.SemanticTokensRequest=s={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.registrationMethod=o.method}(a||(t.SemanticTokensDeltaRequest=a={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method),e.registrationMethod=o.method}(c||(t.SemanticTokensRangeRequest=c={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(u||(t.SemanticTokensRefreshRequest=u={}))},908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const i=n(372);var r;!function(e){e.method="window/showDocument",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(r||(t.ShowDocumentRequest=r={}))},8461:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const i=n(372);var r;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.TypeDefinitionRequest=r={}))},645:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const i=n(372);var r,o,s;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(r||(t.TypeHierarchyPrepareRequest=r={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(o||(t.TypeHierarchySupertypesRequest=o={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySubtypesRequest=s={}))},9935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const i=n(372);var r,o;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType0(e.method)}(r||(t.WorkspaceFoldersRequest=r={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(o||(t.DidChangeWorkspaceFoldersNotification=o={}))},8598:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},7354:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const o=n(2067);r(n(2067),t),r(n(8766),t),t.createProtocolConnection=function(e,t,n,i){return(0,o.createMessageConnection)(e,t,n,i)}},948:(e,t,n)=>{"use strict";e.exports=n(7354)},6587:e=>{e.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){i[e]=t[e]})),i;function i(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var i=t.apply(this,e),r=e[e.length-1];return"function"==typeof i&&i!==r&&Object.keys(r).forEach((function(e){i[e]=r[e]})),i}}},1398:e=>{"use strict";e.exports=require("vscode")},290:e=>{"use strict";e.exports=require("async_hooks")},5317:e=>{"use strict";e.exports=require("child_process")},6982:e=>{"use strict";e.exports=require("crypto")},4434:e=>{"use strict";e.exports=require("events")},9896:e=>{"use strict";e.exports=require("fs")},8611:e=>{"use strict";e.exports=require("http")},5692:e=>{"use strict";e.exports=require("https")},9278:e=>{"use strict";e.exports=require("net")},857:e=>{"use strict";e.exports=require("os")},6928:e=>{"use strict";e.exports=require("path")},932:e=>{"use strict";e.exports=require("process")},2203:e=>{"use strict";e.exports=require("stream")},3557:e=>{"use strict";e.exports=require("timers")},7016:e=>{"use strict";e.exports=require("url")},9023:e=>{"use strict";e.exports=require("util")},4815:(e,t,n)=>{"use strict";var i,r,o,s,a,c,u,l,d,h,g,p,f,m,v,y,b,C,R,_,D,S,w,T,k,P,x,E,O,I,A,F,N,M,q,L,j,$,H,K,W,U,V,z,B,G,X,J,Y,Q,Z,ee,te,ne,ie,re,oe,se,ae,ce,ue,le,de,he,ge,pe,fe,me,ve,ye,be,Ce,Re,_e,De,Se,we,Te;n.r(t),n.d(t,{AnnotatedTextEdit:()=>w,ChangeAnnotation:()=>D,ChangeAnnotationIdentifier:()=>S,CodeAction:()=>oe,CodeActionContext:()=>re,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>ie,CodeDescription:()=>b,CodeLens:()=>se,Color:()=>d,ColorInformation:()=>h,ColorPresentation:()=>g,Command:()=>R,CompletionItem:()=>W,CompletionItemKind:()=>q,CompletionItemLabelDetails:()=>K,CompletionItemTag:()=>j,CompletionList:()=>U,CreateFile:()=>k,DeleteFile:()=>x,Diagnostic:()=>C,DiagnosticRelatedInformation:()=>m,DiagnosticSeverity:()=>v,DiagnosticTag:()=>y,DocumentHighlight:()=>J,DocumentHighlightKind:()=>X,DocumentLink:()=>ce,DocumentSymbol:()=>te,DocumentUri:()=>i,EOL:()=>Ee,FoldingRange:()=>f,FoldingRangeKind:()=>p,FormattingOptions:()=>ae,Hover:()=>z,InlayHint:()=>be,InlayHintKind:()=>ve,InlayHintLabelPart:()=>ye,InlineCompletionContext:()=>we,InlineCompletionItem:()=>Re,InlineCompletionList:()=>_e,InlineCompletionTriggerKind:()=>De,InlineValueContext:()=>me,InlineValueEvaluatableExpression:()=>fe,InlineValueText:()=>ge,InlineValueVariableLookup:()=>pe,InsertReplaceEdit:()=>$,InsertTextFormat:()=>L,InsertTextMode:()=>H,Location:()=>u,LocationLink:()=>l,MarkedString:()=>V,MarkupContent:()=>M,MarkupKind:()=>N,OptionalVersionedTextDocumentIdentifier:()=>A,ParameterInformation:()=>B,Position:()=>a,Range:()=>c,RenameFile:()=>P,SelectedCompletionInfo:()=>Se,SelectionRange:()=>ue,SemanticTokenModifiers:()=>de,SemanticTokenTypes:()=>le,SemanticTokens:()=>he,SignatureInformation:()=>G,StringValue:()=>Ce,SymbolInformation:()=>Z,SymbolKind:()=>Y,SymbolTag:()=>Q,TextDocument:()=>Oe,TextDocumentEdit:()=>T,TextDocumentIdentifier:()=>O,TextDocumentItem:()=>F,TextEdit:()=>_,URI:()=>r,VersionedTextDocumentIdentifier:()=>I,WorkspaceChange:()=>xe,WorkspaceEdit:()=>E,WorkspaceFolder:()=>Te,WorkspaceSymbol:()=>ee,integer:()=>o,uinteger:()=>s}),function(e){e.is=function(e){return"string"==typeof e}}(i||(i={})),function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(o||(o={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return Ie.objectLiteral(t)&&Ie.uinteger(t.line)&&Ie.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,i){if(Ie.uinteger(e)&&Ie.uinteger(t)&&Ie.uinteger(n)&&Ie.uinteger(i))return{start:a.create(e,t),end:a.create(n,i)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${i}]`)},e.is=function(e){let t=e;return Ie.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return Ie.objectLiteral(t)&&c.is(t.range)&&(Ie.string(t.uri)||Ie.undefined(t.uri))}}(u||(u={})),function(e){e.create=function(e,t,n,i){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:i}},e.is=function(e){let t=e;return Ie.objectLiteral(t)&&c.is(t.targetRange)&&Ie.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||Ie.undefined(t.originSelectionRange))}}(l||(l={})),function(e){e.create=function(e,t,n,i){return{red:e,green:t,blue:n,alpha:i}},e.is=function(e){const t=e;return Ie.objectLiteral(t)&&Ie.numberRange(t.red,0,1)&&Ie.numberRange(t.green,0,1)&&Ie.numberRange(t.blue,0,1)&&Ie.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Ie.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(h||(h={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return Ie.objectLiteral(t)&&Ie.string(t.label)&&(Ie.undefined(t.textEdit)||_.is(t))&&(Ie.undefined(t.additionalTextEdits)||Ie.typedArray(t.additionalTextEdits,_.is))}}(g||(g={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(p||(p={})),function(e){e.create=function(e,t,n,i,r,o){const s={startLine:e,endLine:t};return Ie.defined(n)&&(s.startCharacter=n),Ie.defined(i)&&(s.endCharacter=i),Ie.defined(r)&&(s.kind=r),Ie.defined(o)&&(s.collapsedText=o),s},e.is=function(e){const t=e;return Ie.objectLiteral(t)&&Ie.uinteger(t.startLine)&&Ie.uinteger(t.startLine)&&(Ie.undefined(t.startCharacter)||Ie.uinteger(t.startCharacter))&&(Ie.undefined(t.endCharacter)||Ie.uinteger(t.endCharacter))&&(Ie.undefined(t.kind)||Ie.string(t.kind))}}(f||(f={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return Ie.defined(t)&&u.is(t.location)&&Ie.string(t.message)}}(m||(m={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(v||(v={})),function(e){e.Unnecessary=1,e.Deprecated=2}(y||(y={})),function(e){e.is=function(e){const t=e;return Ie.objectLiteral(t)&&Ie.string(t.href)}}(b||(b={})),function(e){e.create=function(e,t,n,i,r,o){let s={range:e,message:t};return Ie.defined(n)&&(s.severity=n),Ie.defined(i)&&(s.code=i),Ie.defined(r)&&(s.source=r),Ie.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t;let n=e;return Ie.defined(n)&&c.is(n.range)&&Ie.string(n.message)&&(Ie.number(n.severity)||Ie.undefined(n.severity))&&(Ie.integer(n.code)||Ie.string(n.code)||Ie.undefined(n.code))&&(Ie.undefined(n.codeDescription)||Ie.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Ie.string(n.source)||Ie.undefined(n.source))&&(Ie.undefined(n.relatedInformation)||Ie.typedArray(n.relatedInformation,m.is))}}(C||(C={})),function(e){e.create=function(e,t,...n){let i={title:e,command:t};return Ie.defined(n)&&n.length>0&&(i.arguments=n),i},e.is=function(e){let t=e;return Ie.defined(t)&&Ie.string(t.title)&&Ie.string(t.command)}}(R||(R={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Ie.objectLiteral(t)&&Ie.string(t.newText)&&c.is(t.range)}}(_||(_={})),function(e){e.create=function(e,t,n){const i={label:e};return void 0!==t&&(i.needsConfirmation=t),void 0!==n&&(i.description=n),i},e.is=function(e){const t=e;return Ie.objectLiteral(t)&&Ie.string(t.label)&&(Ie.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ie.string(t.description)||void 0===t.description)}}(D||(D={})),function(e){e.is=function(e){const t=e;return Ie.string(t)}}(S||(S={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return _.is(t)&&(D.is(t.annotationId)||S.is(t.annotationId))}}(w||(w={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Ie.defined(t)&&A.is(t.textDocument)&&Array.isArray(t.edits)}}(T||(T={})),function(e){e.create=function(e,t,n){let i={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){let t=e;return t&&"create"===t.kind&&Ie.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ie.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ie.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(k||(k={})),function(e){e.create=function(e,t,n,i){let r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),void 0!==i&&(r.annotationId=i),r},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Ie.string(t.oldUri)&&Ie.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ie.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ie.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(P||(P={})),function(e){e.create=function(e,t,n){let i={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(i.options=t),void 0!==n&&(i.annotationId=n),i},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Ie.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ie.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ie.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(x||(x={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Ie.string(e.kind)?k.is(e)||P.is(e)||x.is(e):T.is(e))))}}(E||(E={}));class ke{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let i,r;if(void 0===n?i=_.insert(e,t):S.is(n)?(r=n,i=w.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=w.insert(e,t,r)),this.edits.push(i),void 0!==r)return r}replace(e,t,n){let i,r;if(void 0===n?i=_.replace(e,t):S.is(n)?(r=n,i=w.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(n),i=w.replace(e,t,r)),this.edits.push(i),void 0!==r)return r}delete(e,t){let n,i;if(void 0===t?n=_.del(e):S.is(t)?(i=t,n=w.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),n=w.del(e,i)),this.edits.push(n),void 0!==i)return i}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}class Pe{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(S.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error(`Id ${n} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}}class xe{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Pe(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((e=>{if(T.is(e)){const t=new ke(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}}))):e.changes&&Object.keys(e.changes).forEach((t=>{const n=new ke(e.changes[t]);this._textEditChanges[t]=n}))):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(A.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[],i={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(i),n=new ke(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new ke(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Pe,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,r,o;if(D.is(t)||S.is(t)?i=t:n=t,void 0===i?r=k.create(e,n):(o=S.is(i)?i:this._changeAnnotations.manage(i),r=k.create(e,n,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o}renameFile(e,t,n,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,o,s;if(D.is(n)||S.is(n)?r=n:i=n,void 0===r?o=P.create(e,t,i):(s=S.is(r)?r:this._changeAnnotations.manage(r),o=P.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(o),void 0!==s)return s}deleteFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,r,o;if(D.is(t)||S.is(t)?i=t:n=t,void 0===i?r=x.create(e,n):(o=S.is(i)?i:this._changeAnnotations.manage(i),r=x.create(e,n,o)),this._workspaceEdit.documentChanges.push(r),void 0!==o)return o}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Ie.defined(t)&&Ie.string(t.uri)}}(O||(O={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Ie.defined(t)&&Ie.string(t.uri)&&Ie.integer(t.version)}}(I||(I={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Ie.defined(t)&&Ie.string(t.uri)&&(null===t.version||Ie.integer(t.version))}}(A||(A={})),function(e){e.create=function(e,t,n,i){return{uri:e,languageId:t,version:n,text:i}},e.is=function(e){let t=e;return Ie.defined(t)&&Ie.string(t.uri)&&Ie.string(t.languageId)&&Ie.integer(t.version)&&Ie.string(t.text)}}(F||(F={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(N||(N={})),function(e){e.is=function(e){const t=e;return Ie.objectLiteral(e)&&N.is(t.kind)&&Ie.string(t.value)}}(M||(M={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(q||(q={})),function(e){e.PlainText=1,e.Snippet=2}(L||(L={})),function(e){e.Deprecated=1}(j||(j={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Ie.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}($||($={})),function(e){e.asIs=1,e.adjustIndentation=2}(H||(H={})),function(e){e.is=function(e){const t=e;return t&&(Ie.string(t.detail)||void 0===t.detail)&&(Ie.string(t.description)||void 0===t.description)}}(K||(K={})),function(e){e.create=function(e){return{label:e}}}(W||(W={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(U||(U={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Ie.string(t)||Ie.objectLiteral(t)&&Ie.string(t.language)&&Ie.string(t.value)}}(V||(V={})),function(e){e.is=function(e){let t=e;return!!t&&Ie.objectLiteral(t)&&(M.is(t.contents)||V.is(t.contents)||Ie.typedArray(t.contents,V.is))&&(void 0===e.range||c.is(e.range))}}(z||(z={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(B||(B={})),function(e){e.create=function(e,t,...n){let i={label:e};return Ie.defined(t)&&(i.documentation=t),Ie.defined(n)?i.parameters=n:i.parameters=[],i}}(G||(G={})),function(e){e.Text=1,e.Read=2,e.Write=3}(X||(X={})),function(e){e.create=function(e,t){let n={range:e};return Ie.number(t)&&(n.kind=t),n}}(J||(J={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Y||(Y={})),function(e){e.Deprecated=1}(Q||(Q={})),function(e){e.create=function(e,t,n,i,r){let o={name:e,kind:t,location:{uri:i,range:n}};return r&&(o.containerName=r),o}}(Z||(Z={})),function(e){e.create=function(e,t,n,i){return void 0!==i?{name:e,kind:t,location:{uri:n,range:i}}:{name:e,kind:t,location:{uri:n}}}}(ee||(ee={})),function(e){e.create=function(e,t,n,i,r,o){let s={name:e,detail:t,kind:n,range:i,selectionRange:r};return void 0!==o&&(s.children=o),s},e.is=function(e){let t=e;return t&&Ie.string(t.name)&&Ie.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||Ie.string(t.detail))&&(void 0===t.deprecated||Ie.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(te||(te={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(ne||(ne={})),function(e){e.Invoked=1,e.Automatic=2}(ie||(ie={})),function(e){e.create=function(e,t,n){let i={diagnostics:e};return null!=t&&(i.only=t),null!=n&&(i.triggerKind=n),i},e.is=function(e){let t=e;return Ie.defined(t)&&Ie.typedArray(t.diagnostics,C.is)&&(void 0===t.only||Ie.typedArray(t.only,Ie.string))&&(void 0===t.triggerKind||t.triggerKind===ie.Invoked||t.triggerKind===ie.Automatic)}}(re||(re={})),function(e){e.create=function(e,t,n){let i={title:e},r=!0;return"string"==typeof t?(r=!1,i.kind=t):R.is(t)?i.command=t:i.edit=t,r&&void 0!==n&&(i.kind=n),i},e.is=function(e){let t=e;return t&&Ie.string(t.title)&&(void 0===t.diagnostics||Ie.typedArray(t.diagnostics,C.is))&&(void 0===t.kind||Ie.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||R.is(t.command))&&(void 0===t.isPreferred||Ie.boolean(t.isPreferred))&&(void 0===t.edit||E.is(t.edit))}}(oe||(oe={})),function(e){e.create=function(e,t){let n={range:e};return Ie.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Ie.defined(t)&&c.is(t.range)&&(Ie.undefined(t.command)||R.is(t.command))}}(se||(se={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Ie.defined(t)&&Ie.uinteger(t.tabSize)&&Ie.boolean(t.insertSpaces)}}(ae||(ae={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Ie.defined(t)&&c.is(t.range)&&(Ie.undefined(t.target)||Ie.string(t.target))}}(ce||(ce={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Ie.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(ue||(ue={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(le||(le={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(de||(de={})),function(e){e.is=function(e){const t=e;return Ie.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(he||(he={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Ie.string(t.text)}}(ge||(ge={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Ie.boolean(t.caseSensitiveLookup)&&(Ie.string(t.variableName)||void 0===t.variableName)}}(pe||(pe={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&(Ie.string(t.expression)||void 0===t.expression)}}(fe||(fe={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Ie.defined(t)&&c.is(e.stoppedLocation)}}(me||(me={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ve||(ve={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Ie.objectLiteral(t)&&(void 0===t.tooltip||Ie.string(t.tooltip)||M.is(t.tooltip))&&(void 0===t.location||u.is(t.location))&&(void 0===t.command||R.is(t.command))}}(ye||(ye={})),function(e){e.create=function(e,t,n){const i={position:e,label:t};return void 0!==n&&(i.kind=n),i},e.is=function(e){const t=e;return Ie.objectLiteral(t)&&a.is(t.position)&&(Ie.string(t.label)||Ie.typedArray(t.label,ye.is))&&(void 0===t.kind||ve.is(t.kind))&&void 0===t.textEdits||Ie.typedArray(t.textEdits,_.is)&&(void 0===t.tooltip||Ie.string(t.tooltip)||M.is(t.tooltip))&&(void 0===t.paddingLeft||Ie.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Ie.boolean(t.paddingRight))}}(be||(be={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(Ce||(Ce={})),function(e){e.create=function(e,t,n,i){return{insertText:e,filterText:t,range:n,command:i}}}(Re||(Re={})),function(e){e.create=function(e){return{items:e}}}(_e||(_e={})),function(e){e.Invoked=0,e.Automatic=1}(De||(De={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Se||(Se={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(we||(we={})),function(e){e.is=function(e){const t=e;return Ie.objectLiteral(t)&&r.is(t.uri)&&Ie.string(t.name)}}(Te||(Te={}));const Ee=["\n","\r\n","\r"];var Oe,Ie;!function(e){function t(e,n){if(e.length<=1)return e;const i=e.length/2|0,r=e.slice(0,i),o=e.slice(i);t(r,n),t(o,n);let s=0,a=0,c=0;for(;s<r.length&&a<o.length;){let t=n(r[s],o[a]);e[c++]=t<=0?r[s++]:o[a++]}for(;s<r.length;)e[c++]=r[s++];for(;a<o.length;)e[c++]=o[a++];return e}e.create=function(e,t,n,i){return new Ae(e,t,n,i)},e.is=function(e){let t=e;return!!(Ie.defined(t)&&Ie.string(t.uri)&&(Ie.undefined(t.languageId)||Ie.string(t.languageId))&&Ie.uinteger(t.lineCount)&&Ie.func(t.getText)&&Ie.func(t.positionAt)&&Ie.func(t.offsetAt))},e.applyEdits=function(e,n){let i=e.getText(),r=t(n,((e,t)=>{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=i.length;for(let t=r.length-1;t>=0;t--){let n=r[t],s=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=o))throw new Error("Overlapping edit");i=i.substring(0,s)+n.newText+i.substring(a,i.length),o=s}return i}}(Oe||(Oe={}));class Ae{constructor(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let i=0;i<t.length;i++){n&&(e.push(i),n=!1);let r=t.charAt(i);n="\r"===r||"\n"===r,"\r"===r&&i+1<t.length&&"\n"===t.charAt(i+1)&&i++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return a.create(0,e);for(;n<i;){let r=Math.floor((n+i)/2);t[r]>e?i=r:n=r+1}let r=n-1;return a.create(r,e-t[r])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],i=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,i),n)}get lineCount(){return this.getLineOffsets().length}}!function(e){const t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,i){return"[object Number]"===t.call(e)&&n<=e&&e<=i},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Ie||(Ie={}))},5172:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TextDocument:()=>r});class i{constructor(e,t,n,i){this._uri=e,this._languageId=t,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const t of e)if(i.isIncremental(t)){const e=c(t.range),n=this.offsetAt(e.start),i=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(i,this._content.length);const r=Math.max(e.start.line,0),o=Math.max(e.end.line,0);let a=this._lineOffsets;const u=s(t.text,!1,n);if(o-r===u.length)for(let e=0,t=u.length;e<t;e++)a[e+r+1]=u[e];else u.length<1e4?a.splice(r+1,o-r,...u):this._lineOffsets=a=a.slice(0,r+1).concat(u,a.slice(o+1));const l=t.text.length-(i-n);if(0!==l)for(let e=r+1+u.length,t=a.length;e<t;e++)a[e]=a[e]+l}else{if(!i.isFull(t))throw new Error("Unknown change event received");this._content=t.text,this._lineOffsets=void 0}this._version=t}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=s(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let n=0,i=t.length;if(0===i)return{line:0,character:e};for(;n<i;){const r=Math.floor((n+i)/2);t[r]>e?i=r:n=r+1}const r=n-1;return{line:r,character:(e=this.ensureBeforeEOL(e,t[r]))-t[r]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const i=e.line+1<t.length?t[e.line+1]:this._content.length,r=Math.min(n+e.character,i);return this.ensureBeforeEOL(r,n)}ensureBeforeEOL(e,t){for(;e>t&&a(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}var r;function o(e,t){if(e.length<=1)return e;const n=e.length/2|0,i=e.slice(0,n),r=e.slice(n);o(i,t),o(r,t);let s=0,a=0,c=0;for(;s<i.length&&a<r.length;){const n=t(i[s],r[a]);e[c++]=n<=0?i[s++]:r[a++]}for(;s<i.length;)e[c++]=i[s++];for(;a<r.length;)e[c++]=r[a++];return e}function s(e,t,n=0){const i=t?[n]:[];for(let t=0;t<e.length;t++){const r=e.charCodeAt(t);a(r)&&(13===r&&t+1<e.length&&10===e.charCodeAt(t+1)&&t++,i.push(n+t+1))}return i}function a(e){return 13===e||10===e}function c(e){const 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 u(e){const t=c(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new i(e,t,n,r)},e.update=function(e,t,n){if(e instanceof i)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const n=e.getText(),i=o(t.map(u),((e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));let r=0;const s=[];for(const t of i){const i=e.offsetAt(t.range.start);if(i<r)throw new Error("Overlapping edit");i>r&&s.push(n.substring(r,i)),t.newText.length&&s.push(t.newText),r=e.offsetAt(t.range.end)}return s.push(n.substr(r)),s.join("")}}(r||(r={}))}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i=n(4265);module.exports=i})();